/*
 * Accelerate 2026–2030 inside the site.
 *
 * Loaded after the theme's style.css and before the page's own stylesheets (see
 * template-accelerate.php). Rules 1–2 switch off site-wide theme styles inside the page, so it
 * looks exactly as delivered. Rules 3–4 fit it under the site header, and rule 5 blends the site's
 * ad banner after it into the page. Everything is scoped to .accelerate-page, the template's
 * wrapper around the delivered markup (the skip link sits before the page's own
 * <main class="srw-strategy">), or to what follows it, so nothing here reaches the rest of the site.
 *
 * The theme's link and button transitions (.loaded) need no rule here: site.js does not add
 * .loaded inside [data-own-transitions], which the template puts on the wrapper.
 */

/* 1. style.css styles bare elements: * { margin: 0; padding: 0 }, the sizes of p and h1–h6, and
      header { position: sticky; top: -52px; z-index: 10 }, which is meant for the site header
      but also catches the page's cover and chapter covers. "revert" undoes them, and :where()
      keeps these rules at one class, so every rule of the page, loaded after this file, wins. */
.accelerate-page :where(*) {
    margin: revert;
    padding: revert;
}

.accelerate-page :where(p, small, h1, h2, h3, h4, h5, h6) {
    font-size: revert;
    line-height: revert;
    letter-spacing: revert;
    font-family: revert;
    display: revert;
}

.accelerate-page :where(header) {
    position: revert;
    top: revert;
    z-index: revert;
    overflow: revert;
    background-color: revert;
}

/* On phones style.css also sets header { padding-inline: 0 !important }: keep the cover's own padding */
.accelerate-page .srw-cover {
    padding-inline: var(--gutter) !important;
}

/* 2. site.js gives the whole site thin grey scrollbars (body.sr-scroll). Inside the page, e.g. in
      the message drawers, keep the browser's own, as delivered. */
.accelerate-page {
    scrollbar-color: auto;
}

/* 3. The site header (sticky, z-index 10) holds the site's menus. Keep the page's sticky menu
      (z-index 20 in final-layout.css) under it, so those menus open over the page's menu. */
.accelerate-page .srw-nav {
    z-index: 9;
}

/* 4. At the top of the page the site header also shows its top bar (52px on screens wider than
      1235px), which scrolls away. Leave room for the whole header, so the cover and the page's
      menu fit in the first screen as designed. Same formula as .srw-cover in
      assets/final-layout.css, with the header's full height (from integration.js) instead of
      the part that stays on screen. */
.accelerate-page .srw-cover {
    min-height: calc(100vh - var(--nav-h) - var(--accelerate-header-at-top, var(--srw-host-header-height, 0px)));
    min-height: calc(100svh - var(--nav-h) - var(--accelerate-header-at-top, var(--srw-host-header-height, 0px)));
}

/* 5. The site's ad banner above the footer (templates/ads-wide.php, printed right after this page)
      is light grey on pages. Here it takes the dark blue of the page, the same colour as the
      banner's own .dark-bg variant, so the page runs on into it and then into the footer. */
.accelerate-page ~ .ad-banner-container {
    background-color: #0b1e3a;
}
