/* "lithograph": an 1890s Paris Art Nouveau poster on the Fluid base v2.
   Cream paper, a flat muted palette (sage, ochre, dusty rose, deep teal),
   whiplash-curve rules and dotted halos drawn in CSS, arched tops on cards
   and media frames, ochre buttons and teal links. Headings in Italiana,
   labels, nav and buttons in Marcellus SC, text in Cormorant Garamond.
   Dark mode is a deep teal-ink ground with cream text and ochre accents;
   it follows the OS or <html data-theme>. The nav and the inverse band are
   the other scheme: a teal bar on the cream page, cream on the dark one.
   Fonts: themes/fonts/lithograph.css. Link after the base: fluid.min.css,
   then this file. Theme-private tokens are prefixed --lg-. */
@layer reset, tokens, base, layouts, components, themes, utilities;

@layer themes {

  /* ---------- Knobs ---------- */
  :root {
    --font-heading: "Italiana", "Marcellus", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
    --font-body: "Cormorant Garamond Variable", "Cormorant Garamond", Garamond, "EB Garamond", "Iowan Old Style", Georgia, serif;
    --lg-font-caps: "Marcellus SC", "Marcellus", "Iowan Old Style", Georgia, serif;
    --accent: #c99040;                 /* ochre: the fill; deep teal on it 5.3:1 */
    --on-accent: #102c2c;
    --neutral-tint: oklch(50% 0.03 85);
    --text-min: 1.125;                 /* Cormorant runs small: 18 → 21px */
    --text-max: 1.3125;
    --type-ratio: 1.333;
    --weight-display: 400;
    --leading-body: 1.55;
    --tracking-display: 0.005em;
    --tracking-heading: 0.01em;
    --radius-card: 6px;
    --radius-control: 9999px;
    --border-width: 1.5px;
    --measure: 60ch;
    --display-max: 8.5rem;
    --container-content: 76rem;
    --nav-tracking: 0.12em;
    --nav-tracking-min: 0.04em;
    --toc-font: var(--lg-font-caps);
    --toc-dock-font: var(--lg-font-caps);

    /* The palette, named. Light values; the dark scheme is below. */
    --lg-teal: #1e4646;
    --lg-teal-deep: #143434;
    --lg-ochre: #c99040;
    --lg-ochre-light: #e3bf7f;
    --lg-ochre-deep: #9c6a27;
    --lg-sage: #6f7a57;
    --lg-sage-light: #c9cdb0;
    --lg-rose: #8f5148;                /* the label colour: 4.9:1 on the cream */
    --lg-paper: #f8f1df;
  }

  /* ---------- Colour roles: the page, the bands and the bar ----------
     light-dark() so each surface follows its own scheme (the nav and the
     inverse band are the page's other scheme). Behind the base's own test:
     a browser without relative colour keeps the base's legacy floor. */
  @supports (color: oklch(from red min(l, 0.5) c h)) {
    :root,
    :is(.section, section)[data-bg="inverse"],
    .hero[data-theme="dark"],
    .site-footer[data-dark],
    .nav:not([data-bg="plain"], [data-variant="transparent"]), .nav[data-bg="inverse"] {
      --color-background: light-dark(#f1e6cd, #132b2b);
      --color-surface: light-dark(#e8dabb, #193636);
      --color-surface-raised: light-dark(#f8f1df, #1d3d3d);
      --color-text: light-dark(#2a2620, #f1e6cd);
      --color-text-muted: light-dark(#564d41, #d3c6a8);
      --color-text-subtle: light-dark(#5e5446, #c2b493);
      --color-border: light-dark(#c4ae84, #3d5c57);
      --color-border-subtle: light-dark(#dccba6, #234545);
      --color-border-strong: light-dark(#1e4646, #e3bf7f);
      --accent-ink: light-dark(#1e4646, #e3bf7f);      /* links and focus: teal, ochre on the dark */
      --accent-subtle: light-dark(#ecdcb6, #1f3c39);
      --color-selection: light-dark(#e3cf9f, #2f5552);
      --lg-heading: light-dark(#1e4646, #e3bf7f);
      --lg-label: light-dark(#8f5148, #e3ab9e);           /* dusty rose */
      --lg-line: light-dark(#6f7a57, #9ba57f);            /* sage ornament lines */
      --lg-dot: light-dark(#c58b3c, #d6a55a);
      --lg-panel: light-dark(#f8f1df, #183535);
      --lg-panel-edge: light-dark(#1e4646, #c99040);
      --lg-panel-inner: light-dark(rgb(197 139 60 / 0.65), rgb(227 191 127 / 0.45));
      --lg-shadow: light-dark(rgb(20 52 52 / 0.5), rgb(0 0 0 / 0.55));
    }
    /* The inverse band: deep teal under a cream page, deeper on the dark
       one. Set per scheme: the band itself is always dark, so a
       light-dark() there would always pick the dark value. The bar is the
       other scheme, so its light-dark() reads the other way round. */
    :root { --band-inverse: #1e4646; --nav-bg: light-dark(#f1e6cd, #1e4646); }
    :root[data-theme="dark"] { --band-inverse: #0d2222; }
    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) { --band-inverse: #0d2222; }
    }
    @media (prefers-contrast: more) {
      :root,
      :is(.section, section)[data-bg="inverse"],
      .nav:not([data-bg="plain"], [data-variant="transparent"]), .nav[data-bg="inverse"] {
        --color-text-muted: var(--color-text);
        --color-text-subtle: var(--color-text);
        --color-border: var(--color-border-strong);
        --lg-label: var(--color-text);
      }
    }
  }

  /* ---------- Ornament: inline SVG, one set per scheme ---------- */
  :root {
    /* The whiplash rule: two sage curves meeting at an ochre jewel. */
    --lg-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 40'%3E%3Cg fill='none' stroke='%236f7a57' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M10 20C90 20 120 4 170 14c40 8 60 20 92 8'/%3E%3Cpath d='M550 20c-80 0-110-16-160-6-40 8-60 20-92 8'/%3E%3C/g%3E%3Cg fill='none' stroke='%23c58b3c' stroke-width='1' stroke-dasharray='1 5' stroke-linecap='round'%3E%3Cpath d='M56 27c70 0 110-10 176-6'/%3E%3Cpath d='M504 27c-70 0-110-10-176-6'/%3E%3C/g%3E%3Ccircle cx='280' cy='20' r='11' fill='%23e3bf7f' stroke='%231e4646' stroke-width='1.2'/%3E%3Ccircle cx='280' cy='20' r='4' fill='%231e4646'/%3E%3Ccircle cx='10' cy='20' r='2.5' fill='%23c58b3c'/%3E%3Ccircle cx='550' cy='20' r='2.5' fill='%23c58b3c'/%3E%3C/svg%3E");
    /* The halo: rings, a dotted ring and faint rays, behind the hero. */
    --lg-halo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Ccircle cx='320' cy='320' r='314' fill='none' stroke='%236f7a57' stroke-width='1'/%3E%3Ccircle cx='320' cy='320' r='304' fill='none' stroke='%236f7a57' stroke-width='.6'/%3E%3Ccircle cx='320' cy='320' r='292' fill='none' stroke='%23c58b3c' stroke-width='6' stroke-linecap='round' stroke-dasharray='0 15.29'/%3E%3Ccircle cx='320' cy='320' r='280' fill='%23c9cdb0' fill-opacity='.38' stroke='%236f7a57' stroke-width='.8'/%3E%3Cpath d='M320 40V600M40 320H600M122 122 518 518M518 122 122 518M213 61 427 579M427 61 213 579M61 213 579 427M61 427 579 213' stroke='%23c58b3c' stroke-width='.8' stroke-opacity='.5'/%3E%3Ccircle cx='320' cy='320' r='232' fill='%23e3bf7f' fill-opacity='.4' stroke='%23c58b3c' stroke-width='1'/%3E%3Ccircle cx='320' cy='320' r='222' fill='none' stroke='%231e4646' stroke-width='.7' stroke-dasharray='2 5'/%3E%3Ccircle cx='320' cy='320' r='170' fill='%23f1e6cd' fill-opacity='.6' stroke='%23c58b3c' stroke-width='.8'/%3E%3C/svg%3E");
    /* A whiplash corner for frames. */
    --lg-corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath d='M4 40C4 18 18 4 40 4' fill='none' stroke='%231e4646' stroke-width='1.6'/%3E%3Cpath d='M10 40c0-16 12-28 20-22 6 4 0 12-6 8' fill='none' stroke='%23c58b3c' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='40' cy='4' r='3' fill='%23c58b3c'/%3E%3Ccircle cx='4' cy='40' r='3' fill='%23c58b3c'/%3E%3C/svg%3E");
    /* A boss: four ochre lobes around a teal centre. */
    --lg-boss: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='15' r='14' fill='%23f8f1df' stroke='%231e4646' stroke-width='1.2'/%3E%3Cg fill='%23e3bf7f' stroke='%231e4646'%3E%3Ccircle cx='15' cy='8' r='4.6'/%3E%3Ccircle cx='22' cy='15' r='4.6'/%3E%3Ccircle cx='15' cy='22' r='4.6'/%3E%3Ccircle cx='8' cy='15' r='4.6'/%3E%3C/g%3E%3Ccircle cx='15' cy='15' r='3.6' fill='%231e4646'/%3E%3C/svg%3E");
  }
  /* The dark set: sage and ochre lifted, the jewel's teal turned cream. */
  :root[data-theme="dark"],
  :is(.section, section)[data-bg="inverse"],
  .hero[data-theme="dark"],
  .site-footer[data-dark] {
    --lg-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 40'%3E%3Cg fill='none' stroke='%239ba57f' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M10 20C90 20 120 4 170 14c40 8 60 20 92 8'/%3E%3Cpath d='M550 20c-80 0-110-16-160-6-40 8-60 20-92 8'/%3E%3C/g%3E%3Cg fill='none' stroke='%23d6a55a' stroke-width='1' stroke-dasharray='1 5' stroke-linecap='round'%3E%3Cpath d='M56 27c70 0 110-10 176-6'/%3E%3Cpath d='M504 27c-70 0-110-10-176-6'/%3E%3C/g%3E%3Ccircle cx='280' cy='20' r='11' fill='%23c99040' stroke='%23f1e6cd' stroke-width='1.2'/%3E%3Ccircle cx='280' cy='20' r='4' fill='%23132b2b'/%3E%3Ccircle cx='10' cy='20' r='2.5' fill='%23d6a55a'/%3E%3Ccircle cx='550' cy='20' r='2.5' fill='%23d6a55a'/%3E%3C/svg%3E");
    --lg-halo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Ccircle cx='320' cy='320' r='314' fill='none' stroke='%239ba57f' stroke-width='1' stroke-opacity='.6'/%3E%3Ccircle cx='320' cy='320' r='304' fill='none' stroke='%239ba57f' stroke-width='.6' stroke-opacity='.6'/%3E%3Ccircle cx='320' cy='320' r='292' fill='none' stroke='%23d6a55a' stroke-width='6' stroke-linecap='round' stroke-dasharray='0 15.29' stroke-opacity='.8'/%3E%3Ccircle cx='320' cy='320' r='280' fill='%236f7a57' fill-opacity='.16' stroke='%239ba57f' stroke-width='.8' stroke-opacity='.6'/%3E%3Cpath d='M320 40V600M40 320H600M122 122 518 518M518 122 122 518M213 61 427 579M427 61 213 579M61 213 579 427M61 427 579 213' stroke='%23d6a55a' stroke-width='.8' stroke-opacity='.28'/%3E%3Ccircle cx='320' cy='320' r='232' fill='%23c99040' fill-opacity='.12' stroke='%23d6a55a' stroke-width='1' stroke-opacity='.7'/%3E%3Ccircle cx='320' cy='320' r='222' fill='none' stroke='%23f1e6cd' stroke-width='.7' stroke-dasharray='2 5' stroke-opacity='.5'/%3E%3Ccircle cx='320' cy='320' r='170' fill='%23132b2b' fill-opacity='.5' stroke='%23d6a55a' stroke-width='.8' stroke-opacity='.7'/%3E%3C/svg%3E");
    --lg-corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath d='M4 40C4 18 18 4 40 4' fill='none' stroke='%23e3bf7f' stroke-width='1.6'/%3E%3Cpath d='M10 40c0-16 12-28 20-22 6 4 0 12-6 8' fill='none' stroke='%239ba57f' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='40' cy='4' r='3' fill='%23d6a55a'/%3E%3Ccircle cx='4' cy='40' r='3' fill='%23d6a55a'/%3E%3C/svg%3E");
    --lg-boss: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='15' r='14' fill='%23132b2b' stroke='%23e3bf7f' stroke-width='1.2'/%3E%3Cg fill='%23c99040' stroke='%23e3bf7f'%3E%3Ccircle cx='15' cy='8' r='4.6'/%3E%3Ccircle cx='22' cy='15' r='4.6'/%3E%3Ccircle cx='15' cy='22' r='4.6'/%3E%3Ccircle cx='8' cy='15' r='4.6'/%3E%3C/g%3E%3Ccircle cx='15' cy='15' r='3.6' fill='%23f1e6cd'/%3E%3C/svg%3E");
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --lg-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 40'%3E%3Cg fill='none' stroke='%239ba57f' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M10 20C90 20 120 4 170 14c40 8 60 20 92 8'/%3E%3Cpath d='M550 20c-80 0-110-16-160-6-40 8-60 20-92 8'/%3E%3C/g%3E%3Cg fill='none' stroke='%23d6a55a' stroke-width='1' stroke-dasharray='1 5' stroke-linecap='round'%3E%3Cpath d='M56 27c70 0 110-10 176-6'/%3E%3Cpath d='M504 27c-70 0-110-10-176-6'/%3E%3C/g%3E%3Ccircle cx='280' cy='20' r='11' fill='%23c99040' stroke='%23f1e6cd' stroke-width='1.2'/%3E%3Ccircle cx='280' cy='20' r='4' fill='%23132b2b'/%3E%3Ccircle cx='10' cy='20' r='2.5' fill='%23d6a55a'/%3E%3Ccircle cx='550' cy='20' r='2.5' fill='%23d6a55a'/%3E%3C/svg%3E");
      --lg-halo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Ccircle cx='320' cy='320' r='314' fill='none' stroke='%239ba57f' stroke-width='1' stroke-opacity='.6'/%3E%3Ccircle cx='320' cy='320' r='304' fill='none' stroke='%239ba57f' stroke-width='.6' stroke-opacity='.6'/%3E%3Ccircle cx='320' cy='320' r='292' fill='none' stroke='%23d6a55a' stroke-width='6' stroke-linecap='round' stroke-dasharray='0 15.29' stroke-opacity='.8'/%3E%3Ccircle cx='320' cy='320' r='280' fill='%236f7a57' fill-opacity='.16' stroke='%239ba57f' stroke-width='.8' stroke-opacity='.6'/%3E%3Cpath d='M320 40V600M40 320H600M122 122 518 518M518 122 122 518M213 61 427 579M427 61 213 579M61 213 579 427M61 427 579 213' stroke='%23d6a55a' stroke-width='.8' stroke-opacity='.28'/%3E%3Ccircle cx='320' cy='320' r='232' fill='%23c99040' fill-opacity='.12' stroke='%23d6a55a' stroke-width='1' stroke-opacity='.7'/%3E%3Ccircle cx='320' cy='320' r='222' fill='none' stroke='%23f1e6cd' stroke-width='.7' stroke-dasharray='2 5' stroke-opacity='.5'/%3E%3Ccircle cx='320' cy='320' r='170' fill='%23132b2b' fill-opacity='.5' stroke='%23d6a55a' stroke-width='.8' stroke-opacity='.7'/%3E%3C/svg%3E");
      --lg-corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath d='M4 40C4 18 18 4 40 4' fill='none' stroke='%23e3bf7f' stroke-width='1.6'/%3E%3Cpath d='M10 40c0-16 12-28 20-22 6 4 0 12-6 8' fill='none' stroke='%239ba57f' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='40' cy='4' r='3' fill='%23d6a55a'/%3E%3Ccircle cx='4' cy='40' r='3' fill='%23d6a55a'/%3E%3C/svg%3E");
      --lg-boss: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='15' r='14' fill='%23132b2b' stroke='%23e3bf7f' stroke-width='1.2'/%3E%3Cg fill='%23c99040' stroke='%23e3bf7f'%3E%3Ccircle cx='15' cy='8' r='4.6'/%3E%3Ccircle cx='22' cy='15' r='4.6'/%3E%3Ccircle cx='15' cy='22' r='4.6'/%3E%3Ccircle cx='8' cy='15' r='4.6'/%3E%3C/g%3E%3Ccircle cx='15' cy='15' r='3.6' fill='%23f1e6cd'/%3E%3C/svg%3E");
    }
  }

  /* ---------- Type ---------- */
  body { font-feature-settings: "kern", "liga", "onum"; }
  :is(h1, h2, h3, .display, .hero__headline) { color: var(--lg-heading); font-weight: 400; }
  :is(h1, .display, .hero__headline) { letter-spacing: var(--tracking-display); line-height: 1.02; }
  h2 { letter-spacing: 0.01em; line-height: 1.08; }
  /* An italic phrase in a heading turns to the body face, in ochre. */
  :is(h1, h2, .display, .hero__headline) em {
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: light-dark(var(--lg-ochre-deep), var(--lg-ochre-light));
  }
  /* Card and feature titles in the label face. */
  :is(h3, .card__title, .feature__title) {
    font-family: var(--lg-font-caps);
    letter-spacing: 0.06em;
    line-height: 1.2;
  }
  h3 { font-size: var(--step-1); }
  /* The lede and pull quotes read in the text face: Italiana is for display. */
  :is(.lede, .pullquote) { font-family: var(--font-body); color: var(--color-text-muted); }

  /* The label voice: Marcellus SC, tracked, in dusty rose. */
  .eyebrow, .card__meta, .stat__label, .testimonial__role, .site-footer__title, .plate, th {
    font-family: var(--lg-font-caps);
    font-weight: 400;
    letter-spacing: 0.18em;
  }
  .eyebrow { color: var(--lg-label); font-size: var(--step--1); }
  .section__num { color: var(--lg-heading); }
  .card__meta { font-size: var(--step--1); color: var(--color-text-muted); letter-spacing: 0.1em; }

  /* ---------- Links ---------- */
  a:where(:not(.button, .nav__link, .nav__brand, .nav__cta, .skip-link)) {
    color: var(--accent-ink);
    text-decoration-color: color-mix(in oklab, var(--lg-dot) 80%, transparent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }
  a:where(:not(.button, .nav__link, .nav__brand, .nav__cta, .skip-link)):hover { text-decoration-color: currentColor; }
  :focus-visible { outline-color: var(--color-focus); }

  /* ---------- Nav: a teal bar over a dotted frieze ---------- */
  .nav:not([data-bg="plain"], [data-variant="transparent"]) {
    --_frieze: 16px;
    padding-block-end: calc(var(--_frieze) + 0.25rem);
    background-image:
      linear-gradient(var(--lg-ochre), var(--lg-ochre)),
      radial-gradient(circle, var(--lg-ochre) 1.6px, transparent 2.2px),
      linear-gradient(var(--lg-ochre), var(--lg-ochre));
    background-size: 100% 1px, 14px var(--_frieze), 100% 1px;
    background-position: 0 calc(100% - var(--_frieze) + 1px), 0 100%, 0 100%;
    background-repeat: no-repeat, repeat-x, no-repeat;
    border-block-end: 0;
  }
  .nav__brand {
    font-family: var(--font-heading);
    font-size: clamp(var(--step-1), 1rem + 1.2vw, var(--step-2));
    letter-spacing: 0.04em;
    color: var(--lg-heading);
  }
  :is(.nav__link, .nav__dropdown-link), .nav__cta, .toc a {
    font-family: var(--lg-font-caps);
    font-weight: 400;
  }
  .nav__cta {
    border-radius: var(--radius-pill);
    letter-spacing: 0.12em;
  }

  /* ---------- Buttons: ochre pills in the label face ---------- */
  :is(button, .button) {
    font-family: var(--lg-font-caps);
    font-weight: 400;
    letter-spacing: 0.12em;
    --_btn-padding-inline: 1.7em;
  }
  :is(button, .button):not([data-variant]) {
    box-shadow: 0 2px 0 var(--lg-ochre-deep);
  }
  :is(button, .button)[data-variant="outline"] {
    --_btn-color: var(--accent-ink);
    --_btn-border: var(--accent-ink);
    --_btn-bg-hover: var(--accent-ink);
    --_btn-color-hover: var(--color-background);
  }
  :is(button, .button):focus-visible { outline: var(--focus-ring-width) solid var(--color-focus); outline-offset: 3px; }

  /* ---------- Hero: a halo behind the headline, an arched plate ---------- */
  .hero:not([data-theme], [data-overlay]) {
    background-image:
      radial-gradient(circle at 78% 18%, color-mix(in oklab, var(--lg-ochre-light) 30%, transparent), transparent 40%),
      var(--lg-halo);
    background-repeat: no-repeat;
    background-size: auto, clamp(22rem, 12rem + 30vw, 40rem);
    background-position: 0 0, right max(-8rem, -10vw) top -4rem;
  }
  .hero .eyebrow::before, .section__head .eyebrow::before {
    content: "";
    display: inline-block;
    inline-size: 1.15em;
    block-size: 1.15em;
    margin-inline-end: 0.6em;
    vertical-align: -0.2em;
    background: var(--lg-boss) center / contain no-repeat;
  }
  .hero__subheadline { font-size: var(--step-1); line-height: 1.45; }
  /* The plate in an arched window: a paper mat inside a teal line, an
     ochre inner line, and whiplash corners at the foot. */
  .hero__plate {
    position: relative;
    margin-inline: 0;
    padding: clamp(0.5rem, 1.2vw, 0.85rem);
    background: var(--lg-panel);
    border: var(--border-width) solid var(--lg-panel-edge);
    border-radius: 50% 50% 6px 6px / clamp(9rem, 22vw, 18rem) clamp(9rem, 22vw, 18rem) 6px 6px;
    box-shadow: 0 22px 44px -30px var(--lg-shadow), 6px 6px 0 -1px var(--lg-sage-light), 6px 6px 0 0 var(--lg-sage);
  }
  .hero__plate :is(img, video) {
    border-radius: 50% 50% 3px 3px / clamp(8.4rem, 21vw, 17.2rem) clamp(8.4rem, 21vw, 17.2rem) 3px 3px;
    outline: 1px solid var(--lg-panel-inner);
    outline-offset: -6px;
  }
  .hero__plate figcaption { margin-inline: 0.25rem; padding-block: 0.6rem 0.2rem; text-align: center; }

  /* ---------- Section heads: the whiplash rule instead of a thick line ---------- */
  :is(.section__head, .features__header, .stats__header, .team__header, .testimonials__header) {
    border-block-start: 0;
    padding-block-start: calc(40px + var(--space-m));
    background: var(--lg-rule) center top / min(35rem, 100%) 40px no-repeat;
    justify-items: center;
    text-align: center;
  }
  :is(.section__head, .features__header, .stats__header, .team__header, .testimonials__header) h2 { margin-inline: auto; }
  :is(.section__head, .features__header, .stats__header, .team__header, .testimonials__header) .lede { max-inline-size: 36em; }
  .section__head .eyebrow::before { display: none; }

  /* ---------- Cards: arched panels, a paper mat in a double line ---------- */
  .card {
    --_card-bg: var(--lg-panel);
    --_card-border: var(--lg-panel-edge);
    --_card-radius: 999px 999px 6px 6px;
    --_card-pad: 0.75rem;
    --_card-rule: transparent;
    padding: 0.7rem 0.7rem 0;
    box-shadow: 0 22px 40px -30px var(--lg-shadow);
    text-align: center;
  }
  .card > .card__media {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 999px 999px 3px 3px;
    border: 1px solid var(--lg-panel-edge);
  }
  .card :is(.card__content, .card__body) {
    align-items: center;
    padding-inline: 0.75rem;
    padding-block-end: 1.5rem;
    border-block-start: 0;
    background: var(--lg-rule) center bottom 0.4rem / 9rem 18px no-repeat;
    padding-block-end: 2.6rem;
  }
  .card .eyebrow { font-size: var(--step--2); margin: 0; }
  .card__title { font-size: var(--step-1); }
  .card__title a { color: var(--lg-heading); text-decoration: none; }
  .card__title a:hover { text-decoration: underline; text-decoration-color: var(--lg-dot); }
  .card__description { color: var(--color-text-muted); }

  /* ---------- Features: arched triptych panels ---------- */
  .feature {
    position: relative;
    background: var(--lg-panel);
    border: var(--border-width) solid var(--lg-panel-edge);
    border-radius: 10rem 10rem 6px 6px;
    /* Deep enough under the arch that a one-line title clears its curve. */
    padding: 4.75rem clamp(1.5rem, 2.5vw, 2rem) 2.2rem;
    text-align: center;
    box-shadow: 0 22px 40px -30px var(--lg-shadow);
    outline: 1px solid var(--lg-panel-inner);
    outline-offset: -8px;
  }
  .feature::before {
    content: "";
    position: absolute;
    inset-block-start: 1.1rem;
    inset-inline-start: 50%;
    inline-size: 30px;
    block-size: 30px;
    translate: -50% 0;
    background: var(--lg-boss) center / contain no-repeat;
  }
  .feature__title { color: var(--lg-heading); text-wrap: balance; max-inline-size: 14em; margin-inline: auto; }

  /* ---------- Stats: the teal band with a dotted frieze ---------- */
  .stats .stat__value { font-family: var(--font-heading); color: var(--lg-heading); font-weight: 400; }
  .stats .stat__label { color: var(--color-text-muted); font-size: var(--step--1); }
  .stats .stat { border-color: var(--color-border); }
  :is(.section, section)[data-bg="inverse"] {
    background-image:
      linear-gradient(var(--lg-dot), var(--lg-dot)),
      radial-gradient(circle, var(--lg-dot) 1.5px, transparent 2px),
      linear-gradient(var(--lg-dot), var(--lg-dot));
    background-size: 100% 1px, 12px 12px, 100% 1px;
    background-position: 0 10px, 0 10px, 0 21px;
    background-repeat: no-repeat, repeat-x, no-repeat;
  }

  /* ---------- Testimonial ---------- */
  .testimonial__quote {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--lg-heading);
  }
  .testimonial__name { font-family: var(--font-heading); font-style: normal; font-size: var(--step-1); color: var(--lg-heading); }
  .testimonial__role { font-size: var(--step--2); color: var(--lg-label); }
  blockquote:not(.testimonial__quote) {
    font-style: italic;
    border-inline-start-color: var(--lg-dot);
  }

  /* ---------- The ochre band (accent-strong): teal text, teal buttons ---------- */
  :is(.section, section)[data-bg="accent-strong"], .hero[data-theme="accent"] {
    --lg-heading: var(--on-accent);
    --lg-label: var(--on-accent);
    --_btn-color: var(--lg-ochre-light);
    --_btn-bg: var(--on-accent);
    --_btn-bg-hover: #1e4646;
    background-image:
      radial-gradient(circle, color-mix(in oklab, var(--on-accent) 22%, transparent) 1.5px, transparent 2px);
    background-size: 18px 18px;
  }
  :is(.section, section)[data-bg="accent-strong"] :is(button, .button):not([data-variant]) { box-shadow: none; }

  /* ---------- Fields ---------- */
  :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"]), textarea, select) {
    font-family: var(--font-body);
    font-size: var(--step-0);
    border-radius: 9999px;
    padding-inline: 1.1em;
  }
  /* The select keeps its arrow clear of the text at this wider padding. */
  select:not([multiple], [size]) { --select-arrow-inset: 1.1em; padding-inline-end: calc(1.1em + 0.6em + 0.75em); }
  textarea { border-radius: 18px; }
  label { font-family: var(--lg-font-caps); letter-spacing: 0.1em; }
  input:is([type="radio"], [type="checkbox"]) { accent-color: var(--lg-teal); }

  /* ---------- Footer: a whiplash rule over centred columns ---------- */
  .site-footer {
    border-block-start: 0;
    background-image: var(--lg-rule);
    background-repeat: no-repeat;
    background-position: center top 1.5rem;
    background-size: min(40rem, 90%) 40px;
    padding-block-start: calc(var(--space-xl) + 2.5rem);
  }
  .site-footer__title { color: var(--lg-heading); font-size: var(--step--1); }
  .site-footer__links a { font-family: var(--lg-font-caps); letter-spacing: 0.1em; font-size: var(--step--1); }

  /* ---------- Small things ---------- */
  hr {
    border: 0;
    block-size: 40px;
    background: var(--lg-rule) center / min(35rem, 100%) 40px no-repeat;
  }
  th { font-size: var(--step--1); color: var(--color-text-muted); }
  ::selection { background: var(--color-selection); }
  .skip-link { font-family: var(--lg-font-caps); letter-spacing: 0.1em; }

  @media (forced-colors: active) {
    .hero, .nav, .site-footer, :is(.section, section)[data-bg], :is(.section__head, .features__header, .stats__header, .team__header, .testimonials__header), .card :is(.card__content, .card__body), hr { background-image: none; }
    .feature::before, .hero .eyebrow::before { display: none; }
    hr { border-block-start: 1px solid CanvasText; block-size: 0; }
  }
}
