/* ==========================================================================
   ecosphere marketing site: shared styles
   Requires tokens.css (loaded first). Light petrol by default:
   <html lang="en-GB" data-theme="petrol" data-mode="light">.
   Page-specific styles belong in their own file next to this one
   (e.g. hero-map.css), never here.

   CLASS VOCABULARY
   Layout
     .wrap                 centred column, max 1200px (.wrap-narrow: 760px)
     .section              vertical rhythm block; consecutive sections get a rule
     .section-surface      white background variant (alternate with default bg)
     .section-tight        less vertical padding
     .section-head         two-column intro: <div>.eyebrow + .h2</div> + p.lede
     .section-head-stacked single-column variant of .section-head
     .page-hero            interior page header: .breadcrumb, .eyebrow, h1.h1, p.lede, .button-row
     .breadcrumb           <nav class="breadcrumb" aria-label="Breadcrumb"><ol><li><a>…
     .grid .grid-2 .grid-3 .grid-4   responsive equal columns (collapse at 960/620px)
     .split                two columns, text + figure (collapses at 960px)
     .stack                vertical flow with 1rem gaps (.stack-sm, .stack-lg)
     .space-top            large top margin between blocks inside one section (.space-top-sm: 1rem)
     .button-row           wrapping row of buttons
   Type
     .eyebrow              mono, uppercase kicker with a rule before it
     .h1 .h2 .h3           display headings (Fraunces); .lede intro paragraph
     .muted                secondary text colour; .mono data face
     .prose                long-form text (legal, methods): headings, lists, tables
   Components
     .btn + .btn-primary | .btn-secondary | .btn-ghost, size .btn-sm
     .chip                 small rounded label; parts .k (key) and .v (mono value)
     .chip-prov            provenance chip (accent ring before it)
     .tag-illustrative     dashed "Illustrative" tag; required on every synthetic figure
     .card-grid > .card    hairline-joined grid of cards: .picto, .idx, h3, p, .specs, a.more (whole card clickable)
     .tile-grid > .tile    separated tiles (industries): svg, h3 > a (whole tile clickable), p, .tile-foot
     .stats > .stats-grid > .stat   big mono numbers: .stat-value (small), .stat-label, .stat-sub; .stats-note
     .steps > .step        numbered process columns: .step-number, h3, p, dl
     .story > .story-step  numbered rows: .story-number(b), .story-copy (h3, p, ul), figure.figure
     .figure               console fragment: .figure-head(.figure-label, .figure-value small, .figure-range),
                           .figure-body (svg/table), .figure-foot (chips + .tag-illustrative)
                           svg parts: .figure-grid .figure-axis .figure-reference .figure-bar(.is-light|.is-highlight)
                           .figure-band (uncertainty) .figure-line(.figure-line-dashed) .figure-marker .figure-whisker
     .table                data table; td.num / th.num right-aligned mono; wrap in .table-scroll
     .sev + .sev-low | .sev-atrisk | .sev-stressed | .sev-stranded   severity badge (dot + word)
     .panel                tinted accent panel: heading block + .panel-list (li > svg + div > strong)
     .checklist            list with accent ticks
     .notice               bordered note (e.g. "Draft, for legal review")
     .ticker               scrolling capability chips with a pause button (see index.html)
     .cta-band             dark closing band (partial cta.html)
     .form-grid .field label input select textarea .field-hint   simple forms
   Dark bands: add data-mode="dark" to any section to use dark tokens inside it.
   ========================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, figure, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--r-sm); }

:root { --accent-text: var(--accent-strong); --header-height: 68px; }
[data-mode="dark"] {
  --accent-text: color-mix(in oklab, var(--accent) 70%, white);
  color-scheme: dark; color: var(--ink);
}

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 1000; background: var(--ink); color: var(--surface); padding: .55rem .95rem; border-radius: var(--r-md); text-decoration: none; font-weight: 600; font-size: var(--text-sm); }
.skip-link:focus { top: 1rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-data); }

/* ---------- Layout ---------- */
.wrap { width: min(1200px, 100% - 3rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 3rem); margin-inline: auto; }
@media (max-width: 560px) { .wrap, .wrap-narrow { width: calc(100% - 2.25rem); } }

.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section + .section { border-top: 1px solid var(--border); }
.section-surface { background: var(--surface); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem 4rem; align-items: end; margin-bottom: 3rem; }
.section-head .lede { margin-top: 0; }
.section-head-stacked { grid-template-columns: minmax(0, 1fr); gap: 0; }
.section-head-stacked .lede { margin-top: 1rem; }
@media (max-width: 860px) { .section-head { grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 2.25rem; } }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2rem 4rem; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }

.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.stack-lg > * + * { margin-top: 2rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.space-top { margin-top: clamp(2.5rem, 5vw, 4rem); }
.space-top-sm { margin-top: 1rem; }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-data); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-text); font-weight: 500;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.h1 {
  font-family: var(--font-display); font-weight: 500; font-variation-settings: "opsz" 144;
  font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.06; letter-spacing: -0.015em; margin-top: 1rem; max-width: 20ch; text-wrap: balance;
}
.h1 em, .h2 em { font-style: italic; font-weight: 400; color: var(--accent-text); }
.h2 {
  font-family: var(--font-display); font-weight: 500; font-variation-settings: "opsz" 96;
  font-size: clamp(1.85rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -0.015em;
  margin-top: .9rem; max-width: 22ch; text-wrap: balance;
}
.h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.lede { color: var(--ink-2); font-size: 1.0625rem; max-width: 60ch; margin-top: 1rem; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--border); background: var(--surface); }
.page-hero .lede { font-size: clamp(1.05rem, 1.4vw, 1.1875rem); max-width: 58ch; margin-top: 1.25rem; }
.page-hero .button-row { margin-top: 2rem; }
.breadcrumb { margin-bottom: 1.5rem; font-size: var(--text-sm); color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--border-strong); }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px;
  font: 600 .9375rem/1 var(--font-ui); text-decoration: none; cursor: pointer;
  padding: .8rem 1.25rem; border-radius: var(--r-md); border: 1px solid transparent; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent-strong); color: var(--accent-ink-on); }
.btn-primary:hover { background: color-mix(in oklab, var(--accent-strong) 85%, black); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-sm { min-height: 38px; padding: .55rem .95rem; font-size: .875rem; }
[data-mode="dark"] .btn-primary { background: var(--accent-text); color: #0B1A1A; }
[data-mode="dark"] .btn-primary:hover { background: color-mix(in oklab, var(--accent-text) 82%, white); }
[data-mode="dark"] .btn-secondary { background: transparent; }
[data-mode="dark"] .btn-secondary:hover, [data-mode="dark"] .btn-ghost:hover { border-color: var(--accent-text); }

/* ---------- Chips and tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; max-width: 100%;
  font-size: var(--text-xs); color: var(--ink-2); line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-full); padding: .12rem .6rem;
}
.chip .k { color: var(--muted); }
.chip .v { font-family: var(--font-data); font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.chip-prov::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--accent); }
.tag-illustrative {
  display: inline-block; font-family: var(--font-data); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5;
  color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--r-sm); padding: .05rem .35rem; white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header-bar { display: flex; align-items: center; gap: 2rem; height: var(--header-height); }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); flex: none; }
.brand .logo { width: 34px; height: 34px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; font-variation-settings: "opsz" 48; }
.site-nav { display: flex; align-items: center; gap: 1rem; flex: 1; }
.nav-links { display: flex; align-items: center; gap: .25rem; margin-right: auto; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .7rem; border-radius: var(--r-md);
  text-decoration: none; color: var(--ink-2); font-size: .9rem; font-weight: 500; background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--ink); background: var(--surface-2); }
.nav-link[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--r-md) var(--r-md) 0 0; }
.nav-chevron { width: 12px; height: 12px; transition: transform var(--dur-fast) var(--ease-out); }
.nav-link[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }

.products-menu {
  position: absolute; top: calc(100% + 10px); left: -1rem; width: min(680px, 90vw); z-index: var(--z-dropdown);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-3); padding: 1rem;
}
.products-menu[hidden] { display: none; }
.products-menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .75rem; }
.products-menu-list a { display: block; padding: .6rem .7rem; border-radius: var(--r-md); text-decoration: none; }
.products-menu-list a:hover { background: var(--surface-2); }
.products-menu-list a[aria-current] { background: var(--accent-subtle); }
.products-menu-list strong { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); }
.products-menu-list small { display: block; font-size: .8rem; color: var(--muted); line-height: 1.4; margin-top: .1rem; }
.products-menu-foot { border-top: 1px solid var(--border); margin-top: .5rem; padding: .75rem .7rem 0; font-size: .8rem; color: var(--muted); }

.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border-strong); border-radius: var(--r-md); cursor: pointer; color: var(--ink);
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle-close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-close { display: inline; }

@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: var(--header-height); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .75rem;
    max-height: calc(100vh - var(--header-height)); overflow-y: auto;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2); padding: .75rem 1.25rem 1.25rem;
  }
  .site-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; margin-right: 0; }
  .nav-link { width: 100%; justify-content: space-between; padding: .8rem .5rem; font-size: 1rem; }
  .nav-link[aria-current] { box-shadow: inset 3px 0 0 var(--accent); border-radius: 0; }
  .products-menu { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 .5rem; }
  .products-menu-list { grid-template-columns: minmax(0, 1fr); }
  .nav-actions { flex-direction: column; align-items: stretch; border-top: 1px solid var(--border); padding-top: .75rem; }
  .nav-actions .btn { width: 100%; }
}

/* ---------- Ticker ---------- */
.ticker { border-bottom: 1px solid var(--border); background: var(--surface); overflow: hidden; position: relative; display: flex; align-items: center; }
.ticker-viewport { overflow: hidden; flex: 1; position: relative; }
.ticker-viewport::before, .ticker-viewport::after { content: ""; position: absolute; top: 0; bottom: 0; width: 64px; z-index: 1; pointer-events: none; }
.ticker-viewport::before { left: 0; background: linear-gradient(90deg, var(--surface), transparent); }
.ticker-viewport::after { right: 0; background: linear-gradient(270deg, var(--surface), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker-scroll 70s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track, .ticker.is-paused .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; gap: .6rem; padding: 1rem .3rem; }
.ticker-list li { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .85rem; border: 1px solid var(--border); border-radius: var(--r-full); font-size: .8125rem; color: var(--ink-2); white-space: nowrap; background: var(--bg); }
.ticker-list b { font-family: var(--font-data); font-weight: 500; font-size: .7rem; color: var(--accent-text); letter-spacing: .03em; }
.ticker-pause {
  flex: none; margin: 0 1rem 0 .25rem; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.ticker-pause:hover { color: var(--ink); border-color: var(--ink-2); }
.ticker-pause svg { width: 12px; height: 12px; }
.ticker-pause .icon-play { display: none; }
.ticker.is-paused .ticker-pause .icon-pause { display: none; }
.ticker.is-paused .ticker-pause .icon-play { display: inline; }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; width: auto; }
  .ticker-list { flex-wrap: wrap; justify-content: center; }
  .ticker-list[aria-hidden="true"], .ticker-pause, .ticker-viewport::before, .ticker-viewport::after { display: none; }
}

/* ---------- Stats band ---------- */
.stats { padding-block: clamp(3rem, 6vw, 4.5rem); }
.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.stat { padding: 1.4rem 1.25rem 0; border-right: 1px solid var(--border); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat-value { font-family: var(--font-data); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-value small { font-size: .45em; color: var(--muted); letter-spacing: 0; margin-left: .15em; }
.stat-label { font-size: .875rem; color: var(--ink); font-weight: 600; margin-top: .75rem; line-height: 1.35; }
.stat-sub { font-size: .8rem; color: var(--muted); margin-top: .3rem; line-height: 1.45; }
.stats-note { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.75rem; font-size: .8rem; color: var(--muted); }
@media (max-width: 1020px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding-bottom: 1.5rem; }
  .stat:nth-child(3n) { border-right: 0; }
  .stat:nth-child(3n+1) { padding-left: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(n) { border-right: 1px solid var(--border); padding-left: 1rem; border-top: 0; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(2n+1) { padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .card-grid, .card-grid-2 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); padding: 1.75rem 1.6rem 1.6rem; display: flex; flex-direction: column; gap: .75rem; position: relative; transition: background var(--dur-base) var(--ease-out); }
.card:has(.more):hover { background: var(--accent-subtle); }
.card .picto { width: 48px; height: 48px; color: var(--accent-strong); margin-bottom: .5rem; }
.card .picto .fill-soft { fill: var(--accent-soft); }
.card .idx { position: absolute; top: 1.6rem; right: 1.6rem; font-family: var(--font-data); font-size: .72rem; color: var(--muted); }
.card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; font-variation-settings: "opsz" 48; }
.card p { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
.card .specs { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .75rem; }
.card .more { font-size: .875rem; font-weight: 600; color: var(--accent-text); text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; margin-top: .25rem; }
.card .more::after { content: ""; position: absolute; inset: 0; }
.card .more:hover { text-decoration: underline; }
.card .more:focus-visible { outline: none; }
.card:has(.more:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: -3px; }

/* ---------- Tiles ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tile-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1020px) { .tile-grid, .tile-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tile-grid, .tile-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.tile { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.4rem 1.3rem 1.3rem; background: var(--bg); display: flex; flex-direction: column; gap: .55rem; position: relative; transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out); }
.section-surface .tile { background: var(--bg); }
.tile:has(h3 a):hover { border-color: var(--accent); background: var(--surface); }
.tile > svg { width: 28px; height: 28px; color: var(--accent-strong); margin-bottom: .35rem; }
.tile h3 { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.tile h3 a { text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.tile h3 a:focus-visible { outline: none; }
.tile:has(h3 a:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.tile p { font-size: .875rem; color: var(--ink-2); line-height: 1.5; }
.tile-foot { margin-top: auto; padding-top: .6rem; font-family: var(--font-data); font-size: .7rem; color: var(--muted); border-top: 1px dashed var(--border-strong); }

/* ---------- Steps (process) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { padding: 0 2rem 0 0; }
.step + .step { padding-left: 2rem; border-left: 1px solid var(--border); }
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step, .step + .step { padding: 1.75rem 0; border-left: 0; border-top: 1px solid var(--border); }
  .step:first-child { border-top: 0; padding-top: 0; }
}
.step-number { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent-text); font-family: var(--font-data); font-size: .85rem; font-weight: 500; }
.step h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; margin-top: 1.1rem; letter-spacing: -0.01em; }
.step p { color: var(--ink-2); margin-top: .6rem; font-size: .9375rem; }
.step dl { margin-top: 1.1rem; display: grid; gap: .45rem; font-size: .85rem; }
.step dl div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .45rem; border-bottom: 1px solid var(--border); }
.step dt { color: var(--muted); }
.step dd { font-family: var(--font-data); font-size: .8rem; color: var(--ink); text-align: right; }

/* ---------- Story (numbered rows with a figure) ---------- */
.story-step { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.5rem 3rem; padding-block: 2.75rem; border-top: 1px solid var(--border); align-items: start; }
.story-step:last-child { border-bottom: 1px solid var(--border); }
.story-number { font-family: var(--font-data); font-size: .8rem; color: var(--accent-text); letter-spacing: .05em; padding-top: .45rem; display: flex; flex-direction: column; gap: .5rem; }
.story-number b { font-family: var(--font-display); font-weight: 400; font-size: 3rem; line-height: 1; color: var(--ink); letter-spacing: -0.03em; font-variation-settings: "opsz" 144; }
.story-copy h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.18; letter-spacing: -0.012em; }
.story-copy p { color: var(--ink-2); margin-top: .8rem; max-width: 48ch; }
.story-copy ul { margin-top: 1rem; display: grid; gap: .4rem; }
.story-copy li { font-size: .9rem; color: var(--ink-2); padding-left: 1.2rem; position: relative; }
.story-copy li::before { content: ""; position: absolute; left: 0; top: .75em; width: 8px; height: 1px; background: var(--accent); }
@media (max-width: 960px) { .story-step { grid-template-columns: 4rem minmax(0, 1fr); } .story-step > .figure { grid-column: 2; } }
@media (max-width: 600px) {
  .story-step { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .story-step > .figure { grid-column: auto; }
  .story-number { flex-direction: row; align-items: baseline; gap: .75rem; }
  .story-number b { font-size: 2.25rem; }
}

/* ---------- Figure (console fragment) ---------- */
.figure { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.figure-head { padding: 1rem 1.1rem .9rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; border-bottom: 1px solid var(--border); }
.figure-label { font-size: var(--text-xs); color: var(--muted); font-weight: 500; }
.figure-value { font-family: var(--font-data); font-size: 2rem; line-height: 1.05; letter-spacing: -0.02em; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.figure-value small { font-size: .45em; color: var(--ink-2); letter-spacing: 0; }
.figure-range { font-family: var(--font-data); font-size: var(--text-xs); color: var(--ink-2); text-align: right; white-space: nowrap; }
.figure-body { padding: .9rem 1.1rem .5rem; }
.figure-body svg { width: 100%; height: auto; }
.figure-body svg text { font-family: var(--font-data); font-size: 9px; fill: var(--muted); }
.figure-foot { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .6rem 1.1rem .8rem; }
.figure-foot .tag-illustrative { margin-left: auto; }
@media (max-width: 420px) { .figure-head { flex-direction: column; align-items: flex-start; } .figure-range { text-align: left; } }
/* SVG chart primitives for figures (classes on svg elements) */
.figure-grid { stroke: var(--grid-line); stroke-width: 1; fill: none; }
.figure-axis { stroke: var(--axis-line); stroke-width: 1; fill: none; }
.figure-reference { stroke: var(--axis-line); stroke-dasharray: 3 3; fill: none; }
.figure-bar { fill: color-mix(in oklab, var(--accent) 55%, var(--surface)); }
.figure-bar.is-light { fill: var(--seq-min); stroke: var(--accent); stroke-width: .8; }
.figure-bar.is-highlight { fill: var(--accent-strong); }
.figure-band { fill: var(--uncertainty-band); }
.figure-line { fill: none; stroke: var(--accent-strong); stroke-width: 2; }
.figure-line-dashed { stroke-width: 1; stroke-dasharray: 2 3; }
.figure-marker { fill: var(--surface); stroke: var(--accent-strong); stroke-width: 2; }
.figure-whisker { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.figure-body svg text.figure-value-label { fill: var(--ink); }

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table caption { text-align: left; font-size: var(--text-xs); color: var(--muted); padding-bottom: .5rem; }
.table th { text-align: left; font-size: var(--text-xs); font-weight: 600; color: var(--muted); padding: .45rem .5rem; border-bottom: 1px solid var(--border-strong); white-space: nowrap; vertical-align: bottom; }
.table td { padding: .45rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { font-family: var(--font-data); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Severity (never colour alone: always a word) ---------- */
.sev { display: inline-flex; align-items: center; gap: .35em; font-size: .7rem; font-weight: 600; padding: .05rem .45rem; border-radius: var(--r-full); white-space: nowrap; }
.sev::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sev-low { color: #22773A; background: var(--sev-low-tint); }
.sev-atrisk { color: #8A5806; background: var(--sev-atrisk-tint); }
.sev-stressed { color: #B42525; background: var(--sev-stressed-tint); }
.sev-stranded { color: #7A2A8E; background: var(--sev-stranded-tint); }

/* ---------- Panel ---------- */
.panel { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); gap: 2rem 3rem; padding: 2rem; border-radius: var(--r-lg); background: var(--accent-subtle); border: 1px solid color-mix(in oklab, var(--accent) 18%, var(--border)); }
@media (max-width: 860px) { .panel { grid-template-columns: minmax(0, 1fr); padding: 1.5rem; } }
.panel h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.01em; margin-top: .8rem; }
.panel-intro p { color: var(--ink-2); margin-top: .6rem; font-size: .9375rem; }
.panel-intro .more-link { display: inline-flex; margin-top: 1rem; font-weight: 600; font-size: .9rem; color: var(--accent-text); }
.panel-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.75rem; }
@media (max-width: 560px) { .panel-list { grid-template-columns: minmax(0, 1fr); } }
.panel-list li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .6rem; font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.panel-list strong { display: block; color: var(--ink); font-weight: 600; }
.panel-list svg { width: 20px; height: 20px; color: var(--accent-strong); margin-top: .15rem; }

/* ---------- Checklist and notice ---------- */
.checklist { display: grid; gap: .55rem; }
.checklist li { position: relative; padding-left: 1.6rem; color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; left: .1rem; top: .45em; width: .7rem; height: .4rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.notice { border: 1px solid var(--border-strong); border-left: 3px solid var(--sev-atrisk-fill); background: var(--surface); border-radius: var(--r-md); padding: .9rem 1.1rem; font-size: .9rem; color: var(--ink-2); }
.notice strong { color: var(--ink); }

/* ---------- Prose ---------- */
.prose { color: var(--ink-2); font-size: 1rem; line-height: 1.7; max-width: 68ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-family: var(--font-display); font-weight: 500; color: var(--ink); font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.01em; margin-top: 2.25em; }
.prose h3 { font-weight: 600; color: var(--ink); font-size: 1.05rem; margin-top: 1.75em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--accent-text); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--accent); }
.prose code { font-family: var(--font-data); font-size: .88em; background: var(--surface-2); padding: .05em .3em; border-radius: var(--r-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.prose th, .prose td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; font-size: var(--text-xs); border-bottom-color: var(--border-strong); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.form-grid .field-full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: .35rem; }
.field label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: .6rem .75rem; background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); font-size: 1rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; border-color: var(--accent); }
.field-hint { font-size: .8rem; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--bg); color: var(--ink); padding-block: clamp(3.5rem, 7vw, 5.5rem); position: relative; overflow: hidden; }
.cta-band-ring { position: absolute; right: -120px; top: 50%; transform: translateY(-50%); width: 520px; height: 520px; color: var(--accent-text); opacity: .16; pointer-events: none; }
.cta-band-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 2rem 3rem; align-items: end; position: relative; }
@media (max-width: 860px) { .cta-band-inner { grid-template-columns: minmax(0, 1fr); } }
.cta-band-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.1; letter-spacing: -0.02em; margin-top: .9rem; max-width: 24ch; text-wrap: balance; }
.cta-band-text { color: var(--ink-2); margin-top: 1rem; max-width: 56ch; }
@media (max-width: 420px) { .cta-band .btn { width: 100%; white-space: normal; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 3.5rem 2rem; font-size: .875rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footer-brand p { color: var(--ink-2); margin-top: .9rem; max-width: 40ch; }
.footer-brand .footer-contact { margin-top: 1rem; }
.footer-mail { font-family: var(--font-data); font-size: .85rem; color: var(--accent-text); overflow-wrap: anywhere; }
.footer-console { display: inline-block; margin-top: .6rem; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.footer-console:hover { color: var(--ink); text-decoration: underline; }
.footer-heading { font-size: .75rem; font-family: var(--font-data); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
.footer-column li + li { margin-top: .5rem; }
.footer-column a { color: var(--ink-2); text-decoration: none; }
.footer-column a:hover { color: var(--ink); text-decoration: underline; }
.footer-base { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; color: var(--muted); font-size: .8125rem; }
