/* v4-old-shell.css: the new header and footer on an old page (scripts/v4/swap-shell.mjs). Load at the end of <head>,
   after the page's own styles. Every swapped page loads it; article pages also load /css/v4-article.css.
   swap-shell.mjs only accepts one plain <nav> and one plain <footer>, so the new header (#v4n) sits inside a plain <nav>
   and the new footer (#v4f) inside a plain <footer>. Old page CSS that styles bare nav/footer must not reach them. */
nav:has(> #v4n), footer:has(> #v4f) { all: revert; display: contents; }
body:has(> nav > #v4n) { padding-top: 0; }
/* styles.css pads .page-body by the height of the old fixed nav; the new header is sticky and takes its own room */
:root:has(> body > nav > #v4n) .page-body { padding-top: 0; }
/* the changelog hero is pushed down by the same height (68px, 65px on phones) in its own page styles */
:root:has(> body > nav > #v4n) .cl-hero { margin-top: 0; }
/* four pages whose first block was drawn to sit under the old fixed 68px bar: it now starts at the top of the page again,
   under the sticky header, exactly where it sat before (scoped to each page by its canonical address). On phones the home and
   newsroom labels above the headline sat partly under the old bar, so there the block keeps its place and the label shows in full. */
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/facts"]) body > main.fx-wrap { margin-top: -68px; }
@media (min-width: 701px) {
  :root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/"]) body > section.hero:first-of-type,
  :root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/newsroom"]) body > section.nr-hero { margin-top: -68px; }
}
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/security-disclosure"]) .legal-container { margin-top: 12px; }
/* the page's own footer text kept by the swap (phone line, disclaimers) reads as the footer's small print */
#v4f.v4s .v4n-foot .v4n-in > :is(div, p):not(.v4n-fgrid, .v4n-nodemo-line, .v4n-legal-links, .footer-legal) {
  display: block; margin-top: 20px; max-width: 80ch; font-size: .8rem; line-height: 1.6; color: var(--muted, #52606d);
}
#v4f.v4s .v4n-foot .v4n-in > :is(div, p) :is(p, div) { margin: 0 0 8px; font: inherit; color: inherit; }
#v4f.v4s .v4n-foot .v4n-in > :is(div, p) a { color: inherit !important; text-decoration: underline !important; text-underline-offset: 3px; } /* phone and email links carry inline pink */
/* an old footer's own text-logo (kept with that footer's text) would repeat the new footer's logo */
#v4f.v4s .v4n-foot .v4n-in > div > .ato-mark, #v4f.v4s .v4n-foot .v4n-in > a.wordmark { display: none; }
#v4f.v4s .v4n-foot .v4n-in > small { display: block; margin-top: 20px; font-size: .8rem; color: var(--muted, #52606d); }

/* Labels above headings (eyebrows, kickers) and related-link labels stay visible. Hidden, page by page, only where the label
   repeats the heading directly below it, and never a label that carries regulated wording (FCA, authorised, appointed representative): */
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/advised-or-non-advised"]) body > section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1).eyebrow,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/employee-benefits"]) body > div:nth-of-type(2) > section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1).eyebrow,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/employee-benefits/pensions-support"]) body > section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1).eyebrow,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/employer-duty-of-care"]) body > section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1).eyebrow,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/evp"]) body > div:nth-of-type(1) > section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1).lp-kicker,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/facts"]) body > main:nth-of-type(1) > header:nth-of-type(1) > div:nth-of-type(1).fx-eyebrow,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/faq"]) body > section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1).eyebrow,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/psychosocial-risk-assessment"]) body > section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1).eyebrow,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/resources/what-is-people-risk"]) body > div:nth-of-type(1) > section:nth-of-type(1) > span:nth-of-type(1).pillar-pill.pillar-people_risk,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/sectors"]) body > section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1).eyebrow,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/security"]) body > main:nth-of-type(1) > section:nth-of-type(1) > div:nth-of-type(1) > span:nth-of-type(1).kicker,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/wellbeing-measurement"]) body > section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1).eyebrow,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/games/inbox-zero"]) body > main:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(6) > div:nth-of-type(1) > span:nth-of-type(1).kicker,
:root:has(> body > nav > #v4n):has(link[rel="canonical"][href="https://www.alltoogether.com/iwe"]) body > main:nth-of-type(1) > section:nth-of-type(8) > div:nth-of-type(1) > span:nth-of-type(1).kicker { display: none; }
