/* v4-article.css: one article template in the V4 look, laid over existing pages by CSS only.
   Load AFTER the page's own styles (end of <head>), with the new shell (#v4n header, #v4f footer) and /css/v4.css.
   No words, markup, classes or scripts change. Every rule is scoped:
     section 0  (the shell adapter) lives in /css/v4-old-shell.css;
     sections 1 to 4 only to article-like pages, recognised by structure:
       ARTICLE = :root:is(EVID, RES)
       EVID = an h1.hero-headline AND a section.pad holding .article or .prose AND no form controls or canvas (the cookie banner's own checkboxes do not count)
              (benefit guides, sector pages, duty and wellbeing pages: evidence-tools.css, g09-guides.css, foundation-only)
       RES  = .page-body > .article-layout holding .article-body (resources articles: styles.css)
   Anything else (home, platform, tools with inputs, data pages with charts) matches nothing here.
   Uses CSS nesting and :has(); a browser without them ignores the whole block and shows the old look. */

/* ============ 0. Shell adapter: moved to /css/v4-old-shell.css, which every swapped page loads ============ */

/* ============ 1. Shared article base: both systems ============ */
:root:is(
  :has(h1.hero-headline):has(section.pad :is(.article, .prose)):not(:has(input:not([type=hidden], .consent-modal input), select, textarea, canvas)),
  :has(.page-body > .article-layout .article-body)
) {
  --a-ink: #15191e; --a-body: #2d343c; --a-muted: #52606d; --a-rule: #e2e4e8; --a-line: #c9ced6;
  --a-soft: #f5f5f6; --a-pink: #f62aa0; --a-pink-ink: #cd2386; --a-pink-rest: #fb95d0;
  --a-col: 42rem; --a-wide: 1160px; --a-gut: 24px; /* 1160 with 24px gutters lines the text up with the new header's logo */
  --off-white: #fff; /* old inline style="background:var(--off-white)" bands become plain white */

  & body { background: #fff; color: var(--a-ink); font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 400; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

  /* one colour, sentence case as written: no capitals transform anywhere in the body */
  & body :where(*):not(:where(nav, nav *, .mobile-nav, .mobile-nav *, footer, footer *)) { text-transform: none; }
  & :is(h1, h2, h3, h4, .hero-headline, .sh, .final-headline) {
    color: var(--a-ink); text-transform: none; font-style: normal; overflow-wrap: break-word; text-wrap: balance;
  }
  & :is(h1, h2, h3, h4, .hero-headline, .sh, .final-headline) :is(em, span, i, b, strong) { color: inherit; font-style: normal; }
  & h1, & .hero-headline { font-weight: 900; font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 20px; }
  & :is(h2, .sh) { font-weight: 900; font-size: clamp(1.55rem, 2.6vw, 2.05rem); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 14px; }
  & h3 { font-weight: 800; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em; margin: 28px 0 8px; }
  & h4 { font-weight: 800; font-size: 1rem; line-height: 1.35; letter-spacing: 0; }

  /* body text: 17px on a desktop, never under 16px on a phone */
  & :is(.article, .prose, .article-body, .faq, .q, .answer, .callout, .lede, .final-body, .tldr-text) :is(p, li),
  & :is(.article, .prose, .article-body) > :is(p, ul, ol) {
    font-size: 17px; line-height: 1.65; font-weight: 400; color: var(--a-body); letter-spacing: 0;
  }
  & :is(.article, .prose, .article-body) :is(p, ul, ol) { margin: 0 0 1em; }
  & :is(.article, .prose, .article-body) :is(ul, ol) { padding-left: 1.4em; margin-left: 0; }
  & :is(.article, .prose, .article-body) li { margin: 0 0 .5em; }
  & :is(.article, .prose, .article-body) :is(strong, b) { font-weight: 700; color: var(--a-ink); }

  /* links: ink text, underlined, pink underline; pink is for links and buttons only */
  & :is(.article, .prose, .article-body, .answer, .callout, .faq, .q, .srcmap, .g09-source-list, .about-box, .author, .final-body, .g395-action, .g395-disclosure, .tldr-box, .stat-callout, .inline-callout, .lede, .mech) a:not([class*="btn"]):not(.sidebar-cta):not(:is(.benefit-index, .readnext, .related-grid) a) {
    color: var(--a-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--a-pink);
    text-decoration-thickness: 2px; text-underline-offset: 3px;
    &:hover { color: var(--a-pink-ink); }
  }
  & :focus-visible { outline: 3px solid var(--a-pink); outline-offset: 3px; }

  /* citation markers: small, ordinary text colour, not pink */
  & .srcref, & .srcref a, & sup a, & a sup { color: var(--a-body) !important; font-weight: 500; text-decoration-color: var(--a-line) !important; text-decoration-thickness: 1px !important; }
  & .srcref { font-size: .72em; vertical-align: .25em; line-height: 0; white-space: nowrap; }

  /* labels above headings and inside boxes: ordinary small text, no capitals, no pink, no dot */
  & :is(.eyebrow, .cap, .rn-lbl, .tldr-label, .about-label, .sidebar-heading, .related-heading, .card-pillar, .pillar-pill, .g09-source-org, .group-h, .rh-cap, .rt-when) {
    display: block; font-size: .875rem; font-weight: 700; letter-spacing: 0; line-height: 1.4; color: var(--a-muted);
    background: none; border: 0; padding: 0; margin: 0 0 8px; border-radius: 0;
    &::before, &::after { content: none; }
  }

  /* the one quiet callout: soft fill, no border, no shadow, no inset pink */
  & :is(.callout, .answer, .g395-action, .tldr-box, .stat-callout, .pull-quote, .inline-callout, .qualnote, .g09-example, [data-fin-promo]) {
    background: var(--a-soft) !important; color: var(--a-ink); border: 0 !important; border-radius: 10px; box-shadow: none !important;
    padding: 20px 24px !important; margin: 24px 0 !important; max-width: var(--a-col); font-style: normal;
  }
  & :is(.pull-quote, .stat-callout) { font-size: 1.12rem !important; font-weight: 600 !important; line-height: 1.5; color: var(--a-ink) !important; }
  & :is(.callout, .answer, .g395-action, .tldr-box, .stat-callout, .pull-quote, .inline-callout, .qualnote, .g09-example) :is(p, li, div, span, .tldr-text) { color: var(--a-body); }
  & :is(.callout, .answer, .g395-action, .tldr-box, .pull-quote, .inline-callout) :is(p, .tldr-text) { font-size: 17px; line-height: 1.6; font-weight: 400; }
  & :is(.callout, .answer, .g395-action, .tldr-box, .stat-callout, .pull-quote, .inline-callout, .qualnote, .g09-example) :is(p, ul, ol):last-child { margin-bottom: 0; }
  /* a box inside a box loses its own border and fill */
  & :is(.callout, .answer, .g395-action, .tldr-box, .stat-callout, .pull-quote, .inline-callout, .qualnote, .g09-example, .final-cta, .g395-disclosure) :is(div, section, aside, blockquote, figure, [data-fin-promo], .callout, .g395-disclosure) {
    background: none !important; border: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; border-radius: 0;
  }

  /* quotations of legal or source text: a thin rule, not a box */
  & blockquote { border: 0; border-left: 3px solid var(--a-line); background: none; padding: 2px 0 2px 18px; margin: 20px 0; max-width: var(--a-col);
    font-size: 17px; font-weight: 500; line-height: 1.65; color: var(--a-ink); font-style: normal; }

  /* buttons: the V4 hard-shadow pink button */
  & :is(.btn-primary, .btn-secondary, .sidebar-cta, .final-cta a[class*="btn"]) {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; width: auto;
    background: var(--a-pink-rest); color: #111; border: 1.5px solid var(--a-ink); border-radius: 6px; box-shadow: 4px 4px 0 var(--a-ink);
    font-family: inherit; font-weight: 800; font-size: 15px; letter-spacing: -.005em; text-transform: none; text-decoration: none;
    transform: none; transition: transform 120ms ease, box-shadow 120ms ease;
    &:hover { background: var(--a-pink); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--a-ink); }
    &:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--a-ink); }
  }
  & .btn-secondary { background: #fff; }

  /* tables: plain, legible, scroll sideways inside their own box with a shadow cue at the cut edge */
  & table { border-collapse: collapse; width: 100%; max-width: var(--a-col); font-size: 15.5px; line-height: 1.55; margin: 20px 0; background: none; border: 0; box-shadow: none; }
  & :is(th, td) { padding: 12px 14px 12px 0; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--a-rule);
    background: none !important; color: var(--a-body); font-size: 15.5px; font-weight: 400; letter-spacing: 0; width: auto; }
  & thead th { color: var(--a-ink); font-weight: 700; font-size: 14px; border-bottom: 1.5px solid var(--a-ink); }
  & tbody th { color: var(--a-ink); font-weight: 700; }
  & :is(.tablewrap, .table-wrap, .table-scroll) {
    border: 0; border-radius: 0; margin: 20px 0; max-width: var(--a-col); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    background:
      linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left / 40px 100% no-repeat local,
      linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right / 40px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(21,25,30,.28), rgba(21,25,30,0)) left / 14px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(21,25,30,.28), rgba(21,25,30,0)) right / 14px 100% no-repeat scroll;
    & table { margin: 0; max-width: none; }
  }
  & table:has(tr > :nth-child(3)) { min-width: 34rem; }

  /* collapsed blocks: plain rows with a rule, summary in ink; contents untouched and still open (not the cookie banner's own) */
  & details:not(.consent-modal *) { border: 0; border-bottom: 1px solid var(--a-rule); border-radius: 0; background: none; box-shadow: none; padding: 0; margin: 0; max-width: var(--a-col); }
  & summary:not(.consent-modal *) { cursor: pointer; font-weight: 700; font-size: 1.05rem; line-height: 1.45; letter-spacing: 0; color: var(--a-ink); padding: 16px 0; background: none;
    &::after { color: var(--a-ink) !important; font-weight: 500 !important; }
  }
  & details:not(.consent-modal *) > :not(summary) { margin-bottom: 16px; }
  & details:not(.consent-modal *) p { padding-left: 0 !important; padding-right: 0 !important; }
}

/* ============ 2. Evidence system: benefit guides, sector pages, duty and wellbeing pages ============ */
/* classes from evidence-tools.css, g09-guides.css and the foundation-only inline blocks:
   .crumb .hero .eyebrow .hero-headline .answer .reviewed section.pad .sh .article/.prose .callout .faq/.q .srcmap .readnext .author .final-cta .stats-strip */
:root:has(h1.hero-headline):has(section.pad :is(.article, .prose)):not(:has(input:not([type=hidden], .consent-modal input), select, textarea, canvas)) {
  & .inner { max-width: calc(var(--a-wide) - 2 * var(--a-gut)); margin: 0 auto; }
  /* old breadcrumb bar: ordinary small text (it stays in the markup) */
  & .crumb { max-width: var(--a-wide); margin: 0 auto; padding: 20px var(--a-gut) 0; background: none; border: 0;
    font-size: .875rem; font-weight: 500; letter-spacing: 0; color: var(--a-muted); }
  & .crumb :is(b, strong) { color: var(--a-ink); font-weight: 600; }
  & .crumb .sep { color: var(--a-muted); margin: 0 6px; }
  & .crumb a { color: var(--a-ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--a-line); text-underline-offset: 3px;
    &:hover { text-decoration-color: var(--a-pink); } }

  & .hero { padding: 28px var(--a-gut) 8px; border: 0; background: #fff; }
  & .hero .inner { max-width: calc(var(--a-wide) - 2 * var(--a-gut)); }
  & .hero .eyebrow { margin-bottom: 10px; }
  & .hero .hero-headline { max-width: 20ch; }
  & .answer { max-width: var(--a-col); }
  & .answer p { font-size: 17px !important; font-weight: 500; color: var(--a-ink) !important; }
  & .reviewed { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 8px 0 0; font-size: .8125rem; font-weight: 500; letter-spacing: 0; color: var(--a-muted); }
  & .reviewed span { display: inline; font-size: .8125rem !important; color: var(--a-muted) !important; padding: 0 12px 0 0 !important; margin: 0 12px 0 0;
    border: 0 !important; border-right: 1px solid var(--a-line) !important; background: none !important;
    &:last-child { border-right: 0 !important; }
    &::before { content: none; }
  }

  & section.pad:not(.g09-example, .g09-chapter) { padding: 40px var(--a-gut); border: 0; background: #fff !important; }
  & section.pad .inner > :is(h2.sh, .sh) { max-width: var(--a-col); }
  & :is(.article, .prose) { max-width: var(--a-col); }
  & :is(.article, .prose) h2 { margin: 44px 0 12px; }
  & :is(.article, .prose) h2:first-child { margin-top: 0; }
  & :is(.article, .prose) h3 { margin: 28px 0 8px; }
  & .lede { color: var(--a-body); font-size: 17px; max-width: var(--a-col); margin-bottom: 24px; }

  /* duty pages: the closing note band above the author block */
  & .mech { border: 0; border-top: 1px solid var(--a-rule); background: #fff; padding: 32px var(--a-gut); }
  & .mech .inner { max-width: calc(var(--a-wide) - 2 * var(--a-gut)); font-size: 16px; line-height: 1.6; color: var(--a-body); }
  & .mech .inner { padding-right: max(0px, calc(100% - var(--a-col))); }

  /* FAQ: section.pad.faq with <details>, or div.faq holding .q blocks */
  & .faq { border: 0 !important; box-shadow: none !important; }
  & div.faq { background: none !important; max-width: var(--a-col) !important; }
  & .faq summary { font-size: 1.05rem; }
  & .faq summary::after { color: var(--a-ink); }
  & .q { padding: 18px 0; border: 0; border-bottom: 1px solid var(--a-rule); }
  & .q h3 { margin: 0 0 8px; font-size: 1.1rem; }
  & .q p { font-size: 17px; color: var(--a-body); }

  /* sources table and source notes */
  & .srcmap th { width: 30%; font-size: 14px; font-weight: 700; color: var(--a-ink); }
  & .srcnote { color: var(--a-muted); font-size: 14px; font-weight: 400; }

  /* side cards that lead on: kept, calm */
  & .readnext { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; max-width: var(--a-wide); }
  & .readnext a { border: 1px solid var(--a-line); border-radius: 10px; padding: 18px 20px; background: #fff; box-shadow: none; transform: none; color: var(--a-ink); text-decoration: none;
    &:hover { border-color: var(--a-ink); box-shadow: none; transform: none; }
  }
  & .rn-title { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; color: var(--a-ink); text-decoration: underline; text-decoration-color: var(--a-pink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
  & .rn-desc { font-size: 15px; color: var(--a-muted); font-weight: 400; }
  & .benefit-index a { text-decoration: none; color: var(--a-ink); background: #fff; }
  & .bi-title { color: var(--a-ink); text-decoration: underline; text-decoration-color: var(--a-pink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
  & .bi-desc { color: var(--a-muted); }

  /* author: plain lines under a rule */
  & .author { display: flex; gap: 16px; align-items: flex-start; border: 0 !important; border-top: 1px solid var(--a-rule) !important; background: none !important;
    padding: 24px 0 0 !important; margin: 8px 0 0; max-width: var(--a-col); box-shadow: none; }
  & .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--a-soft); color: var(--a-ink); font-size: 16px; font-weight: 800; flex: none; }
  & .author h4 { font-size: 1rem; margin: 0 0 4px; }
  & .author p { font-size: 15px; color: var(--a-body); }

  /* closing ask: a calm block in the column, not a black band */
  & .final-cta { background: #fff; border: 0; border-top: 1px solid var(--a-rule); text-align: left;
    padding: 48px max(var(--a-gut), calc((100% - var(--a-wide)) / 2 + var(--a-gut))) 56px; }
  & .final-cta > * { max-width: var(--a-col); margin-left: 0; margin-right: 0; }
  & .final-headline { font-weight: 900; font-size: clamp(1.55rem, 2.6vw, 2.05rem); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 12px; }
  & .final-body { color: var(--a-body) !important; font-size: 17px; margin: 0 0 24px; }
  & .final-body.g395-adjacent, & .g395-adjacent { font-size: 14px !important; color: var(--a-muted) !important; margin-top: 16px; }
  & .g395-disclosure { margin: 24px 0 0; }
  & .g395-disclosure :is(p, div) { font-size: 14px; line-height: 1.6; color: var(--a-muted); }
  & .g395-action { margin-top: 24px !important; }

  /* duty pages: the black stat strip becomes a quiet row of figures in ink */
  & .stats-strip { background: #fff; border: 0; border-top: 1px solid var(--a-rule); border-bottom: 1px solid var(--a-rule);
    max-width: none; margin: 24px max(var(--a-gut), calc((100% - var(--a-wide)) / 2 + var(--a-gut))) 0; padding: 0; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
  & .stat-item { padding: 22px 20px 22px 0; border: 0; }
  & .stat-number { color: var(--a-ink); font-size: clamp(1.9rem, 3vw, 2.4rem); }
  & .stat-label { color: var(--a-body); font-size: 15px; }
  & .stat-src { color: var(--a-muted); font-size: 13px; }

  /* sector and service-guide blocks with 3px frames: one thin frame, no hard shadow */
  & :is(.rhythm, .ft-card, .benefit-index a, .guide-toc) { border: 1px solid var(--a-line); border-radius: 10px; box-shadow: none; }
  & :is(.rentime .rt-num) { border-width: 1.5px; }
  & .rentime::before { background: var(--a-line); }

  /* --- g09 benefit guides: keep the two-part hero and the left contents rail --- */
  & .g09-layout { --g09-soft: var(--a-soft); --g09-line: var(--a-rule); color: var(--a-ink); }
  & .g09-layout .hero { padding: 28px var(--a-gut) 32px; border: 0; }
  & .g09-layout .hero > .inner { max-width: calc(var(--a-wide) - 2 * var(--a-gut)); column-gap: 48px; }
  & .g09-layout .hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); line-height: 1.04; letter-spacing: -.035em; max-width: 16ch; }
  & .g09-layout .hero .answer { margin: 0 !important; }
  & .g09-layout .reviewed span { font-size: .8125rem !important; }
  & .g09-reading-grid { max-width: var(--a-wide); padding: 32px var(--a-gut) 56px; grid-template-columns: 220px minmax(0, var(--a-col)); gap: 64px; margin: 0 auto; }
  & .g09-rail :is(details, .guide-toc) { border: 0; background: none; box-shadow: none; padding: 0; margin: 0; }
  & .g09-rail summary { font-size: .875rem; font-weight: 700; letter-spacing: 0; color: var(--a-muted); padding: 0 0 10px; border: 0; }
  & .g09-rail a { font-size: 14px; color: var(--a-body); border-left: 1px solid var(--a-rule); padding: 7px 12px; font-weight: 500;
    text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--a-line); text-underline-offset: 3px;
    &:hover, &[aria-current] { background: none; color: var(--a-ink); border-left-color: var(--a-ink); text-decoration-color: var(--a-pink); }
  }
  & .g09-layout .g09-chapter { padding: 0 0 8px; margin: 0 0 32px; border: 0; }
  & .g09-layout .sh { font-size: clamp(1.45rem, 2.4vw, 1.85rem); font-weight: 900; line-height: 1.18; letter-spacing: -.025em; margin: 0 0 14px; }
  & .g09-layout .article p, & .g09-layout .article > p:first-child { font-size: 17px; line-height: 1.7; font-weight: 400; color: var(--a-body); max-width: none; }
  & .g09-layout .g09-example .sh { font-size: 1.3rem; }
  & .g09-layout .g09-example .article > p:first-child { font-size: 17px; }
  & .g09-layout .g09-example .article > p:last-child { border-top: 1px solid var(--a-line); font-size: 15px; color: var(--a-muted); }
  & .g09-figure { color: var(--a-ink); font-weight: 800; }
  & .g09-flow .article > p { padding-left: 0; border-left: 0;
    &::before { content: none; } }
  & .g09-layout .faq details { border: 0; border-bottom: 1px solid var(--a-rule); border-radius: 0; margin: 0; background: none; }
  & .g09-layout .faq summary { padding: 16px 0; font-weight: 700; }
  & .g09-layout .faq details p { padding: 0 0 16px; font-size: 17px; line-height: 1.65; color: var(--a-body); }
  & .g09-source-list { gap: 0; max-width: var(--a-col); }
  & .g09-source { border: 0; border-bottom: 1px solid var(--a-rule); border-radius: 0; background: none; }
  & .g09-source summary { padding: 14px 48px 14px 0; }
  & .g09-source summary::after { right: 40px; color: var(--a-ink); }
  & .g09-source-title { font-size: 16px; font-weight: 600; }
  & .g09-source-body { background: none; border: 0; padding: 0 0 16px; }
  & .g09-source-body .srcnote { font-size: 15px; color: var(--a-body); }
  & .g09-source-link { right: 0; }
  & .g09-layout .g09-tail { max-width: var(--a-wide); padding: 32px var(--a-gut); margin: 0 auto; border: 0; }
  & .g09-layout .g09-tail .author { margin: 0; }
  & .g09-layout .tablewrap { border: 0; border-radius: 0; overflow-x: auto; }
  & .g09-layout table.cmp thead th { background: none; color: var(--a-ink); padding: 12px 14px 12px 0; font-size: 14px; letter-spacing: 0; font-weight: 700; }
  & .g09-layout table.cmp :is(tbody th, td) { padding: 14px 14px 14px 0; font-size: 15.5px; line-height: 1.55; }
  & .g09-layout table.cmp tbody th { background: none; width: 40%; font-weight: 700; color: var(--a-ink); }

  @media (max-width: 1239px) {
    & .g09-reading-grid { margin: 0 auto; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; }
    & .g09-layout .g09-tail { margin: 0 auto; }
  }
  @media (max-width: 900px) {
    & .g09-reading-grid { display: block; padding-top: 16px; }
    & .g09-rail details { border: 0; border-top: 1px solid var(--a-rule); border-bottom: 1px solid var(--a-rule); border-radius: 0; padding: 12px 0; }
    & .g09-layout .hero .answer { margin: 20px 0 16px !important; }
  }
  @media (max-width: 700px) {
    & .g09-layout .hero { padding: 20px var(--a-gut) 16px; }
    & .g09-reading-grid { margin: 0; padding: 16px var(--a-gut) 40px; }
    & .g09-layout .g09-tail { margin: 0; padding: 24px var(--a-gut); }
    /* g09 stacks table rows into blocks on a phone; put the table back and let its box scroll instead */
    & .g09-layout table.cmp { display: table; }
    & .g09-layout table.cmp thead { display: table-header-group; background: none; }
    & .g09-layout table.cmp thead tr, & .g09-layout table.cmp tbody tr { display: table-row; padding: 0; border: 0; }
    & .g09-layout table.cmp tbody { display: table-row-group; }
    & .g09-layout table.cmp :is(thead th, tbody th, td) { display: table-cell; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--a-rule); font-size: 15px; }
    & .g09-layout table.cmp thead th { border-bottom: 1.5px solid var(--a-ink); font-size: 14px; }
    & .g09-layout .tablewrap { overflow-x: auto; }
    & .g09-layout .article p, & .g09-layout .article > p:first-child { font-size: 16.5px; }
  }
}

/* ============ 3. Resources articles (styles.css article layout) ============ */
/* .page-body > .article-header (h1, .pillar-pill, .article-meta) + .article-layout (aside.article-sidebar, .article-body)
   + .tldr-box .stat-callout .pull-quote .inline-callout .about-box .related-strip .cta-lead-magnet .cta-talk */
:root:has(.page-body > .article-layout .article-body) {
  & .page-body { background: #fff; padding-top: 0; margin-top: 0; }
  & .article-header { max-width: var(--a-wide); padding: 32px var(--a-gut) 8px; margin: 0 auto; }
  & .article-header h1 { font-size: clamp(2rem, 4vw, 3.1rem); max-width: 22ch; letter-spacing: -.03em; line-height: 1.06; }
  & .pillar-pill { display: inline-block; margin-bottom: 12px; }
  & .article-meta { font-size: .875rem; font-weight: 500; color: var(--a-muted); margin-bottom: 8px; }
  & .article-layout { max-width: var(--a-wide); margin: 0 auto; padding: 24px var(--a-gut) 64px; gap: 56px; grid-template-columns: 220px minmax(0, var(--a-col)); }
  & .sidebar-heading { margin-bottom: 10px; }
  & .toc-list li { margin-bottom: 6px; }
  & .toc-list a { font-size: 14px; font-weight: 500; color: var(--a-body); line-height: 1.45; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--a-line); text-underline-offset: 3px;
    &:hover, &.active { color: var(--a-ink); text-decoration-color: var(--a-pink); } }
  & .sidebar-hr { border: 0; border-top: 1px solid var(--a-rule); }
  & .sidebar-cta { display: flex; width: 100%; margin-bottom: 24px; font-size: 14px; text-align: center; line-height: 1.3; padding: 10px 14px; }
  & .author-card :is(.author-name) { font-size: 14px; font-weight: 700; color: var(--a-ink); }
  & .author-card :is(.author-title, .author-sub) { font-size: 13px; color: var(--a-muted); }
  & .article-body { max-width: var(--a-col); }
  & .article-body h2 { border: 0; padding-top: 0; margin: 52px 0 12px; }
  & .article-body h3 { margin: 28px 0 8px; }
  & .tldr-box { margin-top: 0 !important; }
  & .tldr-text { color: var(--a-body); font-size: 17px; line-height: 1.6; }
  & .inline-callout { font-size: 16px; line-height: 1.6; color: var(--a-body) !important; }
  & .about-box { border: 0; border-top: 1px solid var(--a-rule); padding: 24px 0 0; margin-top: 40px; max-width: var(--a-col); }
  & .about-box p { font-size: 15px; color: var(--a-body); }
  & .about-box p:last-child a { font-weight: 600; }
  & .article-faq { border-top: 1px solid var(--a-rule); }
  & .faq-item { border-bottom: 1px solid var(--a-rule); }
  & .faq-question { font-weight: 700; font-size: 1.05rem; color: var(--a-ink); text-transform: none; }

  & .related-strip { max-width: var(--a-wide); margin: 0 auto; padding: 40px var(--a-gut); border-top: 1px solid var(--a-rule); }
  & .related-heading { font-size: 1.05rem; color: var(--a-ink); margin-bottom: 16px; }
  & .related-grid { border: 0; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
  & .related-card { border: 1px solid var(--a-line) !important; border-radius: 10px; padding: 18px 20px; background: #fff;
    &:hover { border-color: var(--a-ink) !important; background: #fff; } }
  & .related-card h3 { font-size: 1.05rem; margin: 0 0 6px; text-decoration: underline; text-decoration-color: var(--a-pink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
  & .related-card .card-desc { color: var(--a-muted); font-size: 15px; }
  & .related-card .card-read { color: var(--a-ink); font-size: 14px; font-weight: 700; letter-spacing: 0; }
  & .card-pillar { color: var(--a-muted) !important; }
  & .card-pillar > span:empty { display: none !important; } /* coloured dot: an empty span with an inline style, decoration only */

  /* closing strips: no black or green band, words and form untouched */
  & :is(.cta-lead-magnet, .cta-talk) { background: var(--a-soft); border: 0; text-align: left; padding: 40px max(var(--a-gut), calc((100% - var(--a-wide)) / 2 + var(--a-gut))); }
  & :is(.cta-lead-magnet, .cta-talk) > * { max-width: var(--a-col) !important; margin-left: 0 !important; margin-right: 0 !important; }
  & .cta-lead-magnet + .cta-talk { padding-top: 8px; }
  & :is(.cta-lead-magnet, .cta-talk) h2 { color: var(--a-ink); font-size: clamp(1.45rem, 2.4vw, 1.85rem); margin-bottom: 10px; }
  & :is(.cta-lead-magnet, .cta-talk) :is(p, label, label span) { color: var(--a-body) !important; font-size: 15px !important; }
  & .cta-lead-magnet form { justify-content: flex-start; }
  & .cta-lead-magnet input[type=email] { border: 1.5px solid var(--a-ink) !important; border-radius: 6px; background: #fff !important; color: var(--a-ink) !important; font-size: 16px !important; min-height: 50px; }
  & .cta-lead-magnet button { background: var(--a-pink-rest) !important; color: #111 !important; border: 1.5px solid var(--a-ink) !important; border-radius: 6px; box-shadow: 4px 4px 0 var(--a-ink);
    font-weight: 800 !important; font-size: 15px !important; letter-spacing: 0 !important; text-transform: none !important; min-height: 50px; }

  /* the fixed phone bar (old pink strip) becomes a white bar with an ordinary underlined link */
  & .mobile-bottom-cta { background: #fff; border-top: 1px solid var(--a-line); padding: 12px var(--a-gut); }
  & .mobile-bottom-cta a { color: var(--a-ink); font-size: 15px; font-weight: 700; letter-spacing: 0; text-decoration: underline; text-decoration-color: var(--a-pink); text-decoration-thickness: 2px; text-underline-offset: 3px; }

  @media (max-width: 900px) {
    & .article-layout { display: block; }
    & .article-sidebar { position: static; margin-bottom: 24px; }
  }
}

/* ============ 4. Phones: both systems ============ */
@media (max-width: 700px) {
  :root:is(
    :has(h1.hero-headline):has(section.pad :is(.article, .prose)):not(:has(input:not([type=hidden], .consent-modal input), select, textarea, canvas)),
    :has(.page-body > .article-layout .article-body)
  ) {
    --a-gut: 16px;
    & :is(.article, .prose, .article-body, .faq, .q, .answer, .callout, .lede, .final-body, .tldr-text) :is(p, li),
    & :is(.article, .prose, .article-body) > :is(p, ul, ol), & .q p, & .answer p { font-size: 16.5px !important; }
    & :is(.callout, .answer, .g395-action, .tldr-box, .stat-callout, .pull-quote, .inline-callout, .qualnote, .g09-example, [data-fin-promo]) { padding: 16px 18px !important; }
    & h1, & .hero-headline { font-size: clamp(1.9rem, 8.4vw, 2.4rem) !important; }
    /* any table that is wider than the screen scrolls inside its own box, with the same edge shadow */
    & table:not(:is(.tablewrap, .table-wrap, .table-scroll) table) {
      display: block; overflow-x: auto; max-width: 100%; min-width: 0;
      background:
        linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left / 40px 100% no-repeat local,
        linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right / 40px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(21,25,30,.28), rgba(21,25,30,0)) left / 14px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(21,25,30,.28), rgba(21,25,30,0)) right / 14px 100% no-repeat scroll;
    }
    & section.pad:not(.g09-example, .g09-chapter) { padding: 32px var(--a-gut); }
    & .reviewed { flex-direction: column; }
    & .reviewed span { border-right: 0 !important; padding: 0 !important; margin: 0; }
    & .stats-strip { grid-template-columns: 1fr 1fr; }
  }
}

/* ============ 5. Labels above headings ============ */
/* Small labels above a heading (.eyebrow, .pillar-pill) and the related-link labels (.rn-lbl, .card-pillar) stay visible, styled small and plain
   by section 1. The few that only repeat the heading directly below them are hidden page by page in /css/v4-old-shell.css. */
