/* Stylesheet for the public pages written by frontend/marketing/build/render.mjs.
 *
 * REDESIGN OF 2026-11-18 (tracker #2408, slice 1; the record is docs/marketing/DESIGN_2026_11_18.md).
 * The owner's verdict on the grey pages that came before: "The design is terrible. Plain text and boring."
 * The pages now have a brand: orange as the action colour, a deep ink navy for headings and dark bands, and
 * the steel blue of the logo as the second colour. The colours are defined HERE and are no longer copied
 * from frontend/src/styles/index.css, because the application's neutral greys are what made these pages
 * read as an admin screen. The application keeps its own tokens. Dark mode follows the visitor's system
 * setting (prefers-color-scheme), with values chosen for it, not an inversion.
 *
 * FONT. The previous comment here said: "No web font is requested: the pages use the system font stack, so
 * nothing loads from another origin and the first paint does not wait on one." That reasoning is kept in
 * what it protects and answered in what it ruled out. Headings now use ONE variable display font,
 * Plus Jakarta Sans (SIL Open Font License 1.1, copied from the @fontsource-variable package into
 * frontend/public/fonts, with its licence text beside it). It is SELF HOSTED, so nothing loads from
 * another origin and font-src stays 'self'; it is one 27 KB woff2 (latin subset) with font-display: swap,
 * so the first paint never waits on it, and the pages preload it. Body text stays on the system stack.
 *
 * CONTRAST (computed, WCAG 2.x). Ink text on the orange button #E8743B is 6.0:1 (white on it is 3.0:1,
 * which fails for small text, so the buttons carry ink text). Orange used as TEXT on a light page is the
 * darker --brand-text #B3441A, 5.3:1 on the page background. Body text is 15.5:1 on the page, muted text 7.2:1.
 * Every number is in the docs record.
 *
 * MOTION. CSS only, transform and opacity, no SMIL. Scroll reveals add the class "in" from site.js; with
 * no script everything is visible. prefers-reduced-motion switches all motion off and shows the end state.
 * The hero diagram plays twice and rests (no motion runs longer than 5 seconds), and replays on hover or
 * through its Replay button.
 */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  /* brand */
  --ink: oklch(0.22 0.04 255);
  --ink-2: oklch(0.29 0.05 255);
  --brand: #e8743b;
  --brand-hover: #f08a57;
  --brand-text: #b3441a;
  --teal: #206080;
  --teal-light: #6db9dd;
  --green: #2fa36b;
  --amber: #f2b134;
  --red: #f0666a;
  /* surfaces */
  --bg: #fbf8f4;
  --surface: #ffffff;
  --tint: #f3ece3;
  --band: oklch(0.22 0.04 255);
  --text: oklch(0.24 0.035 255);
  --muted: #4b5469;
  --line: rgb(21 31 58 / 0.12);
  --focus: #206080;
  --shadow: 0 1px 2px rgb(21 31 58 / 0.06), 0 8px 24px rgb(21 31 58 / 0.07);
  --shadow-lift: 0 2px 4px rgb(21 31 58 / 0.08), 0 18px 40px rgb(21 31 58 / 0.14);
  --tile-orange: #fde6d8;
  --tile-teal: #d9ecf5;
  --tile-green: #d6f1e2;
  --tile-amber: #fdeec4;
  --destructive: oklch(0.577 0.245 27.325);
  --success-bg: oklch(0.97 0.03 150);
  --success-border: oklch(0.88 0.08 150);
  --success-text: oklch(0.38 0.1 150);
  /* type and space */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --step-hero: clamp(2.375rem, 1.2rem + 4.6vw, 4rem);
  --step-h2: clamp(1.75rem, 1.2rem + 1.9vw, 2.5rem);
  --step-h3: 1.1875rem;
  --space-section: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  --radius: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-text: #ff9a66;
    --bg: oklch(0.18 0.032 255);
    --surface: oklch(0.235 0.038 255);
    --tint: oklch(0.21 0.036 255);
    --band: oklch(0.145 0.03 255);
    --text: oklch(0.95 0.008 255);
    --muted: #aeb7ca;
    --line: rgb(255 255 255 / 0.12);
    --focus: #ffb48a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 40px rgb(0 0 0 / 0.4);
    --tile-orange: rgb(232 116 59 / 0.2);
    --tile-teal: rgb(109 185 221 / 0.18);
    --tile-green: rgb(47 163 107 / 0.2);
    --tile-amber: rgb(242 177 52 / 0.18);
    --destructive: oklch(0.704 0.191 22.216);
    --success-bg: oklch(0.27 0.05 150);
    --success-border: oklch(0.4 0.08 150);
    --success-text: oklch(0.85 0.1 150);
  }
  /* The logo is dark artwork on a transparent ground: it sits on a white chip in dark mode. */
  .brand img { background: #fff; border-radius: 0.6rem; padding: 0.2rem 0.5rem; height: 2.75rem; box-sizing: border-box; }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); color: var(--text); text-wrap: balance; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; z-index: 90; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap { max-width: 74rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
.narrow { max-width: 48rem; }
@media (min-width: 640px) { .wrap { padding-left: 1.5rem; padding-right: 1.5rem; } }

.icon { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: #ffb48a; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; border-radius: 0.75rem; border: 1.5px solid transparent;
  font: inherit; font-family: var(--font-display); font-size: 1rem; font-weight: 700; text-decoration: none; cursor: pointer;
  line-height: 1.2; min-height: 48px; transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
/* The primary button is the brand orange with INK text: white on #E8743B is 3.0:1 and fails for small text. */
.btn-primary { background: var(--brand); color: oklch(0.2 0.04 255); box-shadow: 0 6px 18px rgb(232 116 59 / 0.32); }
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-2px); }
.btn-outline { border-color: var(--line); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--text); }
.on-dark .btn-outline { border-color: rgb(255 255 255 / 0.4); color: #fff; }
.on-dark .btn-outline:hover { border-color: #fff; background: rgb(255 255 255 / 0.08); }
.btn-small { min-height: 44px; padding: 0.55rem 1.1rem; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn .icon { transition: transform 0.18s ease; }
.btn:hover .icon { transform: translateX(3px); }

/* ------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 40; }
/* The blur sits on a pseudo element, not on the header: a backdrop filter on the header itself would make it the
   containing block of the fixed phone menu sheet inside it, and the sheet would stop covering the screen. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
/* THE LOGO KEEPS ITS SHAPE AT EVERY WIDTH (browser QA of #1972): the link does not shrink and the image has an explicit ratio. */
.brand { display: flex; align-items: center; flex: none; min-height: 44px; }
.brand img { height: 3rem; width: auto; max-width: none; aspect-ratio: 273 / 120; object-fit: contain; }

.nav-desktop { display: none; }
.nav-desktop a, .nav-more summary, .login-link, .btn { white-space: nowrap; }
.nav-desktop a, .nav-more summary {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0 0.8rem; border-radius: 0.6rem;
  text-decoration: none; font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600; color: var(--text); cursor: pointer; list-style: none;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-desktop a:hover, .nav-more summary:hover { background: color-mix(in oklab, var(--text) 7%, transparent); }
.nav-desktop a[aria-current="page"] { color: var(--brand-text); box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0.6rem 0.6rem 0 0; }
.nav-more { position: relative; }
.nav-more summary .icon { transition: transform 0.2s ease; }
.nav-more[open] summary .icon { transform: rotate(180deg); }
.more-panel {
  position: absolute; top: calc(100% + 0.4rem); right: 0; min-width: 15rem; padding: 0.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; animation: pop-in 0.18s ease;
}
.more-panel a { justify-content: flex-start; padding: 0 0.75rem; gap: 0.7rem; }
.more-panel .icon { color: var(--teal); font-size: 1.1rem; }
.header-actions { display: none; align-items: center; gap: 0.5rem; }
.login-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.9rem; border-radius: 0.6rem;
  text-decoration: none; font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600; color: var(--muted);
}
.login-link:hover { color: var(--text); background: color-mix(in oklab, var(--text) 7%, transparent); }

/* PHONE MENU (#2408, replaces the flat nine link list of #2346). One native details element: it works with
   JavaScript off, and site.js adds the animated close, the focus trap, Escape and the scroll lock. */
.m-wrap { display: flex; align-items: center; gap: 0.5rem; }
.m-cta { min-height: 44px; padding: 0.5rem 0.9rem; font-size: 0.875rem; box-shadow: none; }
.m-menu > summary {
  position: relative; z-index: 3; list-style: none; width: 48px; height: 48px; border-radius: 0.8rem; cursor: pointer;
  display: grid; place-items: center; color: var(--text);
}
.m-menu > summary::-webkit-details-marker { display: none; }
.m-menu > summary:hover { background: color-mix(in oklab, var(--text) 7%, transparent); }
.burger { position: relative; width: 22px; height: 16px; display: block; }
.burger i { position: absolute; left: 0; width: 22px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform 0.28s ease, opacity 0.2s ease, top 0.28s ease; }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 7px; }
.burger i:nth-child(3) { top: 14px; }
.m-menu[open] > summary .burger i:nth-child(1) { top: 7px; transform: rotate(45deg); }
.m-menu[open] > summary .burger i:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.m-menu[open] > summary .burger i:nth-child(3) { top: 7px; transform: rotate(-45deg); }
.sheet-backdrop { display: none; }
.sheet { display: none; }
.m-menu[open] .sheet-backdrop {
  display: block; position: fixed; inset: 0; z-index: 1; background: oklch(0.14 0.04 255 / 0.6);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade-in 0.25s ease both;
}
.m-menu[open] .sheet {
  display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; z-index: 2;
  width: min(88vw, 24rem); padding-top: 4.5rem; background: var(--surface); color: var(--text);
  box-shadow: -12px 0 48px rgb(0 0 0 / 0.3); animation: sheet-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.m-menu.is-closing .sheet { animation: sheet-out 0.22s ease both; }
.m-menu.is-closing .sheet-backdrop { animation: fade-out 0.22s ease both; }
.sheet-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 1rem 1rem; }
.sheet-h { margin: 1.1rem 0.5rem 0.25rem; font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.sheet ul { list-style: none; margin: 0; padding: 0; }
.sheet .row {
  display: flex; align-items: center; gap: 0.85rem; min-height: 52px; padding: 0.35rem 0.5rem; border-radius: 0.9rem;
  text-decoration: none; font-size: 1.0625rem; font-weight: 600; color: var(--text);
}
.sheet .row:hover { background: color-mix(in oklab, var(--text) 6%, transparent); }
.sheet .row .tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tile-teal); color: var(--teal); font-size: 1.15rem; flex: none; }
.sheet .row .lbl { flex: 1; }
.sheet .row .chev { color: var(--muted); font-size: 1.1rem; }
.sheet .row[aria-current="page"] { color: var(--brand-text); background: var(--tile-orange); }
.sheet .row[aria-current="page"] .tile { background: var(--brand); color: oklch(0.2 0.04 255); }
.sheet .row[aria-current="page"] .chev { color: var(--brand-text); }
.sheet-foot { flex: none; display: grid; gap: 0.6rem; padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-foot .btn { width: 100%; }
.sheet-foot .btn-outline { color: var(--text); }

/* 1280, not the 900 first asked for: the five links, More, Log in and the orange button need about 1230px on one row. */
@media (min-width: 1280px) {
  .nav-desktop { display: flex; align-items: center; gap: 0.15rem; }
  .header-actions { display: flex; }
  .m-wrap { display: none; }
}
@media (max-width: 389px) { .m-cta { display: none; } }

/* ------------------------------------------------------------------ shared section parts */
.section { padding: var(--space-section) 0; position: relative; }
.section-tint { background: var(--tint); }
.section-dark, .band-dark { background: var(--band); color: #f2f5fb; }
.section-dark h2, .section-dark h3, .band-dark h2, .band-dark h3 { color: #fff; }
.sec-head { max-width: 44rem; margin: 0 auto 2.75rem; text-align: center; }
.sec-head h2, .split-text h2 { margin: 0; font-size: var(--step-h2); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; }
.sec-head p { margin: 1rem 0 0; color: var(--muted); font-size: 1.1875rem; }
.section-dark .sec-head p { color: rgb(255 255 255 / 0.78); }
.kicker {
  display: inline-block; margin-bottom: 0.9rem; font-family: var(--font-display); font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-text);
}
.section-dark .kicker, .band-dark .kicker, .hero .kicker { color: #ffb48a; }

/* ------------------------------------------------------------------ home: hero */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--band); color: #f2f5fb; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero::before { width: 46rem; height: 46rem; left: -14rem; top: -18rem; background: radial-gradient(closest-side, rgb(232 116 59 / 0.34), transparent); }
.hero::after { width: 44rem; height: 44rem; right: -12rem; bottom: -16rem; background: radial-gradient(closest-side, rgb(46 142 190 / 0.38), transparent); }
.hero-grid { display: grid; gap: 2.5rem; padding-top: 2.75rem; padding-bottom: 3.5rem; }
@media (min-width: 640px) { .hero-grid { padding-top: 4rem; padding-bottom: 4.5rem; } }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: 3rem; padding-top: 5rem; padding-bottom: 5.5rem; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.9rem; border-radius: 999px;
  font-family: var(--font-display); font-size: 0.8125rem; font-weight: 600; background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.2); color: #fff;
}
.eyebrow .icon { color: #ffb48a; font-size: 1rem; }
.eyebrow-plain { background: none; border: 0; padding: 0; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-text); margin: 0 0 0.75rem; }
.eyebrow-plain .icon { color: var(--brand-text); }
.hero h1 { margin: 1.4rem 0 0; font-size: var(--step-hero); line-height: 1.03; letter-spacing: -0.04em; font-weight: 800; color: #fff; }
.hero h1 .hl { background: linear-gradient(100deg, #ffb48a, #e8743b 55%, #6db9dd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 1.4rem 0 0; max-width: 34rem; font-size: 1.25rem; line-height: 1.55; color: rgb(255 255 255 / 0.84); }
.cta-row { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.proof { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 0.7rem; grid-template-columns: 1fr; max-width: 38rem; }
@media (min-width: 560px) { .proof { grid-template-columns: 1fr 1fr; gap: 0.8rem 1.5rem; } }
.proof li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9875rem; line-height: 1.4; color: rgb(255 255 255 / 0.88); }
.proof .icon { margin-top: 0.1rem; font-size: 1.15rem; color: #6fd6a2; }

/* hero diagram: the words are SVG text; sizes are in viewBox units (480 wide) and scale with the width */
.hd { position: relative; width: 100%; max-width: 31rem; margin: 0 auto; }
.hd-svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 24px 40px rgb(0 0 0 / 0.35)); }
.hd-line { stroke: rgb(255 255 255 / 0.38); stroke-width: 2; stroke-dasharray: 5 7; stroke-linecap: round; }
.hd-card { fill: #ffffff; }
.hd-title { font: 800 22px var(--font-display); fill: oklch(0.22 0.04 255); letter-spacing: -0.01em; }
.hd-row { fill: #eff3f9; }
.hd-label { font: 700 17px var(--font-display); fill: oklch(0.26 0.04 255); }
.hd-bar { fill: #cdd6e4; }
.hd-av.a { fill: #e8743b; } .hd-av.b { fill: #206080; } .hd-av.c { fill: #7c8aa5; }
.hd-av { stroke: #eff3f9; stroke-width: 3; }
.hd-node { fill: oklch(0.27 0.05 255); stroke-width: 2; }
.hd-node-a { stroke: #e8743b; } .hd-node-b { stroke: #6db9dd; } .hd-node-c { stroke: #f2b134; }
.hd-node-text { font: 700 17px var(--font-display); fill: #fff; }
.hd-chip-ok rect { fill: #cff1dd; } .hd-chip-ok text { font: 700 17px var(--font-display); fill: #0b5130; }
.hd-chip-warn rect { fill: #ffe2a3; } .hd-chip-warn text { font: 700 17px var(--font-display); fill: #5e3a00; }
.hd-tick circle { fill: #1e9e62; } .hd-tick path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hd-dot { fill: #ffb48a; opacity: 0; }
.hd-dot.d2, .hd-dot.d5 { fill: #6db9dd; } .hd-dot.d3 { fill: #f2b134; }
/* the end state, which is what shows with no animation */
.hd-chip-ok { opacity: 0; }
.hd-chip-warn { opacity: 1; }
.hd-tick { opacity: 1; transform-box: fill-box; transform-origin: center; }
.hd-replay {
  display: flex; align-items: center; margin: 0.75rem auto 0; min-height: 40px; padding: 0 1rem;
  border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.3); background: rgb(255 255 255 / 0.08); color: #fff;
  font: 600 0.8125rem var(--font-display); cursor: pointer;
}
.hd-replay:hover { background: rgb(255 255 255 / 0.18); }

/* ------------------------------------------------------------------ home: how it works */
.steps { position: relative; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.steps-line { position: absolute; background: var(--line); border-radius: 3px; left: 1.55rem; top: 1.5rem; bottom: 1.5rem; width: 3px; }
.steps-line::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(180deg, var(--brand), var(--teal)); transform-origin: top; transition: transform 1.4s cubic-bezier(0.3, 0.7, 0.2, 1) 0.2s; }
.js .steps:not(.in) .steps-line::after { transform: scaleY(0); }
.step { position: relative; display: grid; grid-template-columns: 3.1rem 1fr; gap: 1rem; align-items: start; }
.step-num {
  position: relative; z-index: 1; width: 3.1rem; height: 3.1rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: oklch(0.2 0.04 255); font: 800 1.35rem var(--font-display); box-shadow: 0 0 0 6px var(--bg), 0 8px 18px rgb(232 116 59 / 0.35);
}
.step h3 { margin: 0.35rem 0 0.35rem; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.step p { margin: 0; color: var(--muted); }
@media (min-width: 860px) {
  .steps-list { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .steps-line { left: 16%; right: 16%; top: 1.5rem; bottom: auto; width: auto; height: 3px; }
  .steps-line::after { transform-origin: left; }
  .js .steps:not(.in) .steps-line::after { transform: scaleX(0); }
  .step { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 0.5rem; }
  .step h3 { margin-top: 0.75rem; }
}

/* ------------------------------------------------------------------ home: bento feature grid */
.bento { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); grid-auto-flow: dense; } .bento .span-2, .bento .span-3 { grid-column: span 2; } }
@media (min-width: 1024px) { .bento { grid-template-columns: repeat(4, 1fr); gap: 1.15rem; } .bento .span-3 { grid-column: span 3; } .bento .lg-span-2 { grid-column: span 2; } }
.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.6rem;
  box-shadow: var(--shadow); transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.bento .card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.card h2, .card h3 { margin: 0; font-size: var(--step-h3); font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; }
.card p { margin: 0.55rem 0 0; font-size: 1rem; color: var(--muted); }
.card-icon { width: 3.1rem; height: 3.1rem; margin-bottom: 1.1rem; border-radius: 0.95rem; display: grid; place-items: center; font-size: 1.5rem; }
.tile-orange { background: var(--tile-orange); color: var(--brand-text); }
.tile-teal { background: var(--tile-teal); color: var(--teal); }
.tile-green { background: var(--tile-green); color: #1c7a4d; }
.tile-amber { background: var(--tile-amber); color: #8a5a00; }
@media (prefers-color-scheme: dark) { .tile-teal { color: var(--teal-light); } .tile-green { color: #6fd6a2; } .tile-amber { color: #f7c85e; } }
.card-feature { background: linear-gradient(140deg, oklch(0.26 0.05 255), oklch(0.2 0.04 255)); border-color: transparent; color: #fff; }
.card-feature h3 { color: #fff; font-size: 1.5rem; max-width: 26rem; }
.card-feature p { color: rgb(255 255 255 / 0.82); font-size: 1.0625rem; max-width: 34rem; }
.card-feature .card-icon { background: rgb(255 255 255 / 0.1); color: #ffb48a; }
.card-accent { background: var(--tile-orange); border-color: color-mix(in oklab, var(--brand) 40%, transparent); }
.card-accent p { color: var(--text); }

/* ------------------------------------------------------------------ home: expiry chart */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; } }
.split-text p { margin: 1.1rem 0 0; font-size: 1.1875rem; color: rgb(255 255 255 / 0.82); max-width: 32rem; }
.ex-card { background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.14); border-radius: var(--radius); padding: 1.25rem 1rem 1rem; }
.ex-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ex-valid { fill: #2fa36b; } .ex-warn { fill: #f2b134; } .ex-over { fill: #f0666a; }
.ex-in { font: 800 25px var(--font-display); fill: oklch(0.2 0.04 255); }
.ex-cap { font: 700 25px var(--font-display); fill: #fff; }
.ex-bracket { fill: none; stroke: #f2b134; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ex-date { stroke: #fff; stroke-width: 2.5; stroke-dasharray: 3 5; stroke-linecap: round; }
.ex-zone-glow { fill: rgb(242 177 52 / 0.16); }
.ex-marker circle { fill: #fff; } .ex-marker path { fill: none; stroke: oklch(0.2 0.04 255); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ex-marker .ex-stem { stroke: #fff; }
.ex-marker { transform: translateX(310px); }
.ex-fact { margin: 1rem 0 0.25rem; font-size: 1rem; color: rgb(255 255 255 / 0.85); text-align: center; }
.ex-card.reveal.in .ex-marker { animation: ex-slide 2.6s cubic-bezier(0.45, 0.05, 0.3, 1) both; }
.js .ex-card.reveal:not(.in) .ex-marker { transform: translateX(0); }
.ex-card.reveal.in .ex-zone-glow { animation: glow-in 0.8s ease 2s both; }
.js .ex-card.reveal:not(.in) .ex-zone-glow { opacity: 0; }

/* ------------------------------------------------------------------ home: doors */
.doors { display: grid; gap: 1.15rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .doors { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .doors { grid-template-columns: repeat(3, 1fr); } }
a.door { display: flex; flex-direction: column; overflow: hidden; padding: 0; text-decoration: none; color: inherit; border-top: 0; }
.door-band { height: 8px; background: var(--c, var(--brand)); flex: none; }
.door-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); }
.door-body { padding: 1.35rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.door h3 { font-size: 1.2rem; }
.door p { flex: 1; }
.door-go { margin-top: 1rem; display: inline-flex; width: 2.5rem; height: 2.5rem; border-radius: 50%; align-items: center; justify-content: center; background: var(--c, var(--brand)); color: oklch(0.2 0.04 255); transition: transform 0.2s ease; }
.door:hover .door-go { transform: translateX(6px); }
a.door:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.c-orange { --c: #e8743b; } .c-teal { --c: #5aa9cf; } .c-green { --c: #2fa36b; } .c-amber { --c: #f2b134; } .c-ink { --c: #7c8aa5; }
.audiences-more { max-width: 46rem; margin: 1rem auto 0; color: var(--muted); font-size: 1.0625rem; }

/* ------------------------------------------------------------------ closing band (home and every article) */
.closing { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: clamp(3.5rem, 2rem + 6vw, 6rem) 0; background: var(--band); color: #f2f5fb; }
.closing::before { content: ""; position: absolute; z-index: -1; width: 42rem; height: 42rem; left: 50%; top: -20rem; margin-left: -21rem; border-radius: 50%; background: radial-gradient(closest-side, rgb(232 116 59 / 0.3), transparent); }
.closing h2, .cta-band-title { margin: 0 auto; max-width: 40rem; font-family: var(--font-display); font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; color: #fff; text-wrap: balance; }
.closing p { margin: 1.1rem auto 0; max-width: 38rem; font-size: 1.1875rem; color: rgb(255 255 255 / 0.82); }
.closing .cta-row { justify-content: center; margin-top: 2rem; }
.closing-compact { padding: clamp(2.75rem, 2rem + 4vw, 4.25rem) 0; }
.closing-compact h2, .closing-compact .cta-band-title { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.25rem); }

/* ------------------------------------------------------------------ articles */
.page-head { position: relative; overflow: hidden; isolation: isolate; background: var(--tint); border-bottom: 1px solid var(--line); padding: 1.25rem 0 2.5rem; }
.page-head::before { content: ""; position: absolute; z-index: -1; right: -8rem; top: -14rem; width: 34rem; height: 34rem; border-radius: 50%; background: radial-gradient(closest-side, rgb(232 116 59 / 0.2), transparent); }
.page-head::after { content: ""; position: absolute; z-index: -1; left: -10rem; bottom: -18rem; width: 30rem; height: 30rem; border-radius: 50%; background: radial-gradient(closest-side, rgb(32 96 128 / 0.14), transparent); }
.page-head h1 { margin: 0; max-width: 52rem; font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 800; }
.page-head .eyebrow-plain { margin-top: 0.5rem; }
.page-head .updated { margin: 1.1rem 0 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.5rem; font-size: 0.875rem; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: var(--text); }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }
.article-layout { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 4rem; }
.article { min-width: 0; }
.toc { display: none; }
@media (min-width: 1100px) {
  .article-layout.has-toc { grid-template-columns: minmax(0, 46rem) 17rem; justify-content: center; gap: 4rem; }
  .toc { display: block; position: sticky; top: 6rem; align-self: start; max-height: calc(100vh - 4.25rem - 3rem); overflow-y: auto; padding: 1.1rem 1.1rem 1.1rem 1.25rem; border-left: 3px solid var(--brand); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
}
.toc-title { margin: 0 0 0.6rem; font: 700 0.8125rem var(--font-display); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.toc a { display: block; padding: 0.35rem 0.4rem; border-radius: 0.5rem; font-size: 0.9375rem; line-height: 1.35; text-decoration: none; color: var(--text); }
.toc a:hover { background: var(--tint); color: var(--brand-text); }
.prose { color: var(--text); font-size: 1.0625rem; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.75rem 0 0.8rem; font-size: clamp(1.45rem, 1.1rem + 1vw, 1.85rem); line-height: 1.2; letter-spacing: -0.025em; font-weight: 800; scroll-margin-top: 6rem; }
.prose h3 { margin: 2rem 0 0.5rem; font-size: 1.25rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.015em; scroll-margin-top: 6rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.25rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.45rem; padding-left: 0.2rem; }
.prose li::marker { color: var(--brand-text); font-weight: 700; }
.prose a { color: var(--brand-text); text-decoration-thickness: 1.5px; text-underline-offset: 3px; font-weight: 500; }
.prose a:hover { text-decoration-thickness: 3px; }
.prose strong { color: var(--text); }
.prose blockquote { margin: 1.75rem 0; padding: 1.1rem 1.4rem; border-left: 4px solid var(--brand); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose code { padding: 0.12em 0.4em; border-radius: 0.4rem; background: var(--tint); font-size: 0.92em; }
.prose pre { overflow-x: auto; padding: 1rem 1.2rem; border-radius: 0.9rem; background: var(--band); color: #f2f5fb; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.975rem; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--surface); }
.prose th { text-align: left; padding: 0.75rem 1rem; background: var(--tint); font: 700 0.875rem var(--font-display); white-space: nowrap; border-bottom: 2px solid var(--brand); }
.prose td { padding: 0.75rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:nth-child(even) td { background: color-mix(in oklab, var(--tint) 55%, transparent); }
.prose figure.diagram { margin: 2rem 0; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.prose figure.diagram svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.prose img { border-radius: 0.9rem; }
.actions { justify-content: flex-start; margin-top: 2.25rem; }
.updated { font-size: 0.875rem; color: var(--muted); }
.disclaimer, .notice { margin-top: 2.25rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 0 0.9rem 0.9rem 0; background: var(--surface); font-size: 0.9875rem; }
.disclaimer p, .notice p { margin: 0; }
.disclaimer .checked { margin-top: 0.5rem; color: var(--muted); }
.notice-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.notice-success p + p { margin-top: 0.25rem; }
.related { margin-top: 3rem; }
.related-title { margin: 0 0 1rem; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.related li a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 64px; padding: 0.9rem 1.1rem;
  border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); text-decoration: none; font-weight: 600; box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.related li a::after { content: "\2192"; color: var(--brand-text); font-size: 1.2rem; transition: transform 0.2s ease; }
.related li a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.related li a:hover::after { transform: translateX(4px); }
.sources { margin-top: 2.25rem; }
.sources-title { margin: 0 0 0.75rem; font-size: 1.25rem; font-weight: 800; }
.sources blockquote { margin: 0 0 1rem; padding: 0.9rem 1.1rem; border-left: 4px solid var(--teal); background: var(--surface); border-radius: 0 0.9rem 0.9rem 0; font-size: 0.9875rem; }
.sources blockquote p { margin: 0 0 0.5rem; }
.sources blockquote footer { font-size: 0.875rem; color: var(--muted); }

/* contact form */
.contact-form { margin-top: 2rem; display: grid; gap: 1rem; position: relative; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.contact-form .field label { display: block; margin-bottom: 0.3rem; font-size: 0.9375rem; font-weight: 600; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%; padding: 0.6rem 0.85rem; border: 1.5px solid var(--line); border-radius: 0.7rem;
  background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; min-height: 48px;
}
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }
.form-error {
  margin: 0; padding: 0.75rem 1rem; border-radius: 0.7rem; font-size: 0.9375rem;
  color: var(--destructive); border: 1px solid color-mix(in oklab, var(--destructive) 30%, transparent);
  background: color-mix(in oklab, var(--destructive) 10%, transparent);
}
/* Honeypot: off screen rather than display none, so a bot that skips hidden fields still fills it. */
.hp { position: absolute; left: -9999px; top: auto; width: 0; height: 0; overflow: hidden; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--band); color: rgb(255 255 255 / 0.78); }
.footer-grid { display: grid; gap: 2.25rem 2rem; grid-template-columns: 1fr 1fr; padding-top: 3.5rem; padding-bottom: 2.5rem; }
.footer-brand { grid-column: 1 / -1; max-width: 26rem; }
.footer-id { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
.footer-name { font: 800 1.25rem var(--font-display); color: #fff; letter-spacing: -0.02em; }
.footer-logo { display: inline-flex; padding: 0.55rem 0.8rem; border-radius: 0.8rem; background: #fff; }
.footer-logo img { height: 2rem; width: auto; display: block; }
.footer-brand p { margin: 1rem 0 0; font-size: 1rem; line-height: 1.55; }
.footer-h { margin: 0 0 0.6rem; font: 700 0.8125rem var(--font-display); letter-spacing: 0.09em; text-transform: uppercase; color: #ffb48a; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 1rem; color: rgb(255 255 255 / 0.85); }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; padding-top: 4.5rem; } .footer-brand { grid-column: auto; } }

/* ------------------------------------------------------------------ motion */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes sheet-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes sheet-out { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes ex-slide { from { transform: translateX(0); } to { transform: translateX(310px); } }
@keyframes glow-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hd-travel {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
@keyframes chip-out { 0%, 42% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes chip-in { 0%, 48% { opacity: 0; transform: translateY(4px); } 58%, 100% { opacity: 1; transform: none; } }
@keyframes tick-in { 0%, 60% { transform: scale(0); opacity: 0; } 74% { transform: scale(1.18); opacity: 1; } 84%, 100% { transform: scale(1); opacity: 1; } }

/* The sequence runs twice and rests: 2 times 2.4 seconds, under the 5 second limit. */
.hd.play .hd-dot { animation: hd-travel 2.4s ease-in-out 2 both; }
.hd.play .hd-dot.d2 { animation-delay: 0.2s; } .hd.play .hd-dot.d3 { animation-delay: 0.4s; }
.hd.play .hd-dot.d4 { animation-delay: 1.1s; } .hd.play .hd-dot.d5 { animation-delay: 1.3s; }
.hd.play .hd-chip-ok { animation: chip-out 2.4s ease 2 both; }
.hd.play .hd-chip-warn { animation: chip-in 2.4s ease 2 both; }
.hd.play .hd-tick { animation: tick-in 2.4s ease 2 both; }

/* Scroll reveal: hidden only when the script has run, so with no script everything is visible. */
.reveal { transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(22px); }
.js .steps.reveal:not(.in) { opacity: 1; transform: none; }
.js .ex-card.reveal:not(.in) { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal:not(.in) { opacity: 1; transform: none; }
  .js .steps:not(.in) .steps-line::after { transform: none; }
  .js .ex-card.reveal:not(.in) .ex-marker { transform: translateX(310px); }
  .js .ex-card.reveal:not(.in) .ex-zone-glow { opacity: 1; }
  .hd-replay { display: none; }
  .btn:hover, .bento .card:hover, a.door:hover, .related li a:hover { transform: none; }
  .read-progress { display: none; }
  .shell-diagram .ex-marker { transform: translateX(310px); }
}

/* ------------------------------------------------------------------ slice 2 (#2408): page picture, grids, diagrams, prose polish */

/* Page header with a picture: title left, picture right in a rounded frame with an orange and a teal shape behind it. */
.page-head-grid { display: grid; gap: 1.5rem; }
.page-pic { position: relative; isolation: isolate; margin: 0.9rem 1rem 1rem 0.9rem; }
.page-pic::before { content: ""; position: absolute; z-index: -1; inset: 1rem -1rem -1rem 1rem; border-radius: 1.6rem; background: rgb(232 116 59 / 0.38); }
.page-pic::after { content: ""; position: absolute; z-index: -1; inset: -0.9rem 1.4rem 1.4rem -0.9rem; border-radius: 1.6rem; background: rgb(32 96 128 / 0.3); }
.page-pic-frame { aspect-ratio: 16 / 9; border-radius: 1.4rem; overflow: hidden; background: var(--tint); box-shadow: var(--shadow-lift); }
.page-pic-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .page-head.has-pic .page-head-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: 3.5rem; }
  .page-head.has-pic { padding-bottom: 3rem; }
}

/* Prose polish: a larger lead, an orange rule above each h2, a teal quote card, a quiet disclaimer. */
.prose > p:first-of-type { font-size: 1.25rem; line-height: 1.55; }
.prose h2::before { content: ""; display: block; width: 2.5rem; height: 4px; margin-bottom: 0.7rem; border-radius: 2px; background: var(--brand); }
.prose blockquote { border-left-color: var(--teal); }
.disclaimer { border-left-width: 1px; border-radius: 0.9rem; background: var(--tint); color: var(--muted); font-size: 0.9375rem; box-shadow: none; }
.prose table { -webkit-overflow-scrolling: touch; }

/* The contents list on screens under 1100px: a collapsed details under the header band. */
.toc-m-wrap { padding-top: 1.25rem; }
.toc-m { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow); }
.toc-m summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; padding: 0.5rem 1.1rem; cursor: pointer; list-style: none; font: 700 1rem var(--font-display); }
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand-text); }
.toc-m[open] summary::after { content: "\2212"; }
.toc-m ol { list-style: none; margin: 0; padding: 0 1.1rem 0.9rem; display: grid; }
.toc-m a { display: flex; align-items: center; min-height: 44px; padding: 0.3rem 0; text-decoration: none; border-top: 1px solid var(--line); }
.toc-m a:hover { color: var(--brand-text); }
.toc-m-wrap + .article-layout { padding-top: 1.5rem; }
@media (min-width: 1100px) { .toc-m-wrap { display: none; } }

/* Reading progress under the header (site.js sets the transform). */
.read-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--teal)); transform: scaleX(0); transform-origin: left; }

/* A dismissible walkthrough bar on phone article pages, after the first screen. */
.walk-bar { position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 30; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; border-radius: 1rem; background: var(--band); box-shadow: var(--shadow-lift); transform: translateY(150%); transition: transform 0.3s ease; }
.walk-bar[hidden] { display: none; }
.walk-bar.show { transform: none; }
.walk-bar .btn { flex: 1; }
.walk-bar-x { flex: none; width: 48px; height: 48px; border-radius: 0.75rem; border: 1px solid rgb(255 255 255 / 0.28); background: transparent; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.walk-bar-x:hover { background: rgb(255 255 255 / 0.12); }
.menu-open .walk-bar { display: none; }
@media (min-width: 768px) { .walk-bar { display: none; } }

/* Index pages: a grid of cards, each with the page's picture or a coloured tile. */
.page-grid-wrap { margin: 1.75rem 0 2.25rem; }
.prose .page-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); }
.prose .page-grid li { margin: 0; padding: 0; }
.prose a.pcard { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 1.1rem; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font-weight: 400; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.prose a.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.pcard-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.prose .pcard-media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform 0.4s ease; }
.pcard:hover .pcard-media img { transform: scale(1.05); }
/* A card with no picture: a deliberate gradient tile in its accent colour, the same 16 by 9 shape as a photo, with a large icon. */
.pcard-tile { display: grid; place-items: center; font-size: 4.25rem; }
.pcard-tile.tile-orange { background: linear-gradient(135deg, var(--tile-orange), color-mix(in oklab, var(--brand) 42%, var(--tile-orange))); }
.pcard-tile.tile-teal { background: linear-gradient(135deg, var(--tile-teal), color-mix(in oklab, var(--teal) 42%, var(--tile-teal))); }
.pcard-tile.tile-green { background: linear-gradient(135deg, var(--tile-green), color-mix(in oklab, #2fa36b 42%, var(--tile-green))); }
.pcard-tile.tile-amber { background: linear-gradient(135deg, var(--tile-amber), color-mix(in oklab, #f2b134 48%, var(--tile-amber))); }
.pcard-tile svg { width: 1em; height: 1em; filter: drop-shadow(0 4px 8px rgb(0 0 0 / 0.12)); }

/* The guides page: its grouped lists of links read as tidy link cards. */
.article-path-guides .prose h2 + ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.article-path-guides .prose h2 + ul li { margin: 0; padding: 0; }
.article-path-guides .prose h2 + ul a { display: flex; align-items: center; min-height: 3.5rem; height: 100%; padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font-weight: 600; line-height: 1.35; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.article-path-guides .prose h2 + ul a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: var(--brand-text); }
.pcard-body { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; padding: 1rem 1.1rem 1.15rem; }
.pcard-title { font: 800 1.125rem/1.25 var(--font-display); letter-spacing: -0.015em; }
.pcard-text { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-go { margin-top: auto; padding-top: 0.35rem; color: var(--brand-text); transition: transform 0.2s ease; }
.pcard:hover .pcard-go { transform: translateX(4px); }

/* Contact: the form left, what happens next right. About: the steps strip under the prose. */
.contact-cols { display: grid; gap: 2rem; margin-top: 1.5rem; }
.contact-next { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.contact-next-title { margin: 0 0 1.1rem; font: 800 1.25rem var(--font-display); letter-spacing: -0.02em; }
.contact-next ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.15rem; }
.contact-next li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem; align-items: start; }
.contact-next .step-num { width: 2.4rem; height: 2.4rem; font-size: 1.05rem; box-shadow: none; }
.contact-next li p { margin: 0.25rem 0 0; color: var(--muted); }
.contact-next .contact-next-title { color: var(--text); }
.steps-band .steps-list { align-items: start; }
@media (min-width: 900px) { .contact-cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: start; } }
.steps-band { margin-top: 0; }
.steps-band .step-num { box-shadow: 0 0 0 6px var(--tint), 0 8px 18px rgb(232 116 59 / 0.35); }

/* Page diagrams (shell-art.mjs). Drawn on a dark panel so they read the same in light and dark mode. */
.prose figure.shell-diagram { margin: 2.25rem 0; padding: 1.5rem 1.1rem 1.15rem; background: var(--band); border: 0; border-radius: var(--radius); box-shadow: var(--shadow-lift); color: #fff; }
.prose figure.shell-diagram .sd-svg { max-width: 30rem; }
.prose figure.shell-diagram .ex-svg { max-width: 38rem; }
/* The caption repeats a sentence of the page right next to it, so it is hidden from the eye but stays for screen readers and search. */
.shell-diagram figcaption { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.prose figure.shell-diagram { position: relative; }

/* Older diagrams written inside a page body are wide drawings: on a phone they scroll sideways at a readable size. */
@media (max-width: 700px) {
  .prose figure.diagram:not(.shell-diagram) { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; padding-bottom: 2.4rem;
    background: linear-gradient(to left, var(--surface) 0.75rem, transparent) right / 2rem 100% no-repeat local, linear-gradient(to left, rgb(0 0 0 / 0.16), transparent) right / 1.75rem 100% no-repeat scroll, var(--surface); }
  .prose figure.diagram:not(.shell-diagram) svg { min-width: 640px; max-width: none; }
  .prose figure.diagram:not(.shell-diagram)::after { content: "Swipe to see the whole diagram"; position: sticky; left: 0; display: block; width: calc(100vw - 4.5rem); margin-top: 0.6rem; font-size: 0.875rem; color: var(--muted); }
  .prose figure.diagram:not(.shell-diagram) figcaption { min-width: 0; }
}

/* On this page: a long contents list scrolls inside its own box instead of running off the window. */
.toc { scrollbar-width: thin; }
.sd-svg { display: block; width: 100%; height: auto; overflow: visible; }
.sd-line { fill: none; stroke: rgb(255 255 255 / 0.4); stroke-width: 2; stroke-dasharray: 5 7; stroke-linecap: round; }
.sd-line-off { stroke: #f0666a; stroke-width: 2.5; stroke-dasharray: 3 8; stroke-linecap: round; }
.sd-card { fill: #ffffff; }
.sd-title { font: 800 22px var(--font-display); fill: oklch(0.22 0.04 255); letter-spacing: -0.01em; }
.sd-h { font: 800 18px var(--font-display); fill: oklch(0.22 0.04 255); }
.sd-label { font: 700 17px var(--font-display); fill: oklch(0.26 0.04 255); }
.sd-row-bg { fill: #eff3f9; }
.sd-bar, .sd-doc, .sd-sheet-head { fill: #cdd6e4; }
.sd-av { stroke: #eff3f9; stroke-width: 3; } .sd-av.a { fill: #e8743b; } .sd-av.b { fill: #206080; } .sd-av.c { fill: #7c8aa5; }
.sd-node { fill: oklch(0.27 0.05 255); stroke-width: 2; }
.sd-node-a { stroke: #e8743b; } .sd-node-b { stroke: #6db9dd; } .sd-node-c { stroke: #f2b134; }
.sd-node-text { font: 700 17px var(--font-display); fill: #fff; }
.sd-note { font: 700 16px var(--font-display); fill: rgb(255 255 255 / 0.9); }
.sd-chip-ok rect { fill: #cff1dd; } .sd-chip-ok text { font: 700 15px var(--font-display); fill: #0b5130; }
.sd-chip-warn rect { fill: #ffe2a3; } .sd-chip-warn text { font: 700 15px var(--font-display); fill: #5e3a00; }
.sd-chip-bad rect { fill: #ffd3d4; } .sd-chip-bad text { font: 700 15px var(--font-display); fill: #7a1a1d; }
.sd-grid { fill: none; stroke: #cdd6e4; stroke-width: 1.5; }
.sd-cell-warn { fill: #ffe2a3; } .sd-cell-bad { fill: #ffd3d4; }
.sd-folder { stroke: rgb(0 0 0 / 0.18); stroke-width: 1.5; } .sd-folder.f1 { fill: #f2b134; } .sd-folder.f2 { fill: #ffd27a; } .sd-folder.f3 { fill: #e8743b; }
.sd-paper { fill: #ffffff; opacity: 0; }
.sd-arrow { fill: none; stroke: #ffffff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sd-num { fill: #e8743b; } .sd-num-text { font: 800 20px var(--font-display); fill: oklch(0.2 0.04 255); }
.sd-spine-bg { fill: rgb(255 255 255 / 0.2); } .sd-spine { fill: #e8743b; transform-box: fill-box; transform-origin: top; }
.sd-dotp.a { fill: #e8743b; } .sd-dotp.b { fill: #206080; } .sd-dotp.c { fill: #7c8aa5; }
.sd-dotd.g { fill: #2fa36b; } .sd-dotd.w { fill: #f2b134; }
.sd-pulse { transform-box: fill-box; transform-origin: center; }
/* End state first: the consultant's access is ended, the letter of the claim. With no script, or with reduced motion, this is what shows. */
.sd-on-line, .sd-on-chip { opacity: 0; }
.sd-mess { opacity: 0.6; }
.shell-diagram .ex-marker { transform: translateX(310px); }
/* Motion: starts when the figure scrolls into view (class "in", site.js), twice at most, under 5 seconds, then rests. */
@keyframes sd-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sd-out { 0%, 42% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes sd-on { 0%, 45% { opacity: 0; } 58%, 100% { opacity: 1; } }
@keyframes sd-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes sd-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes sd-dim { from { opacity: 1; } to { opacity: 0.6; } }
.shell-diagram.in .sd-rise { animation: sd-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 0.28s); }
.shell-diagram.in .sd-rise-late { animation-delay: calc(1.1s + var(--i, 0) * 0.25s); }
.shell-diagram.in .sd-on-line, .shell-diagram.in .sd-on-chip { animation: sd-out 2.4s ease 2 both; }
.shell-diagram.in .sd-off-line, .shell-diagram.in .sd-off-chip { animation: sd-on 2.4s ease 2 both; }
.shell-diagram.in .sd-pulse { animation: sd-pop 1.2s ease 1.2s 2 both; }
.shell-diagram.in .sd-spine { animation: sd-grow 1.4s ease both; }
.shell-diagram.in .sd-mess { animation: sd-dim 1.2s ease 1s both; }
.shell-diagram.in .sd-paper { animation: hd-travel 2.2s ease-in-out 2 both; }
.shell-diagram.in .sd-paper.p2 { animation-delay: 0.25s; } .shell-diagram.in .sd-paper.p3 { animation-delay: 0.5s; }
.shell-diagram.in .ex-marker { animation: ex-slide 2.6s cubic-bezier(0.45, 0.05, 0.3, 1) both; }
.shell-diagram.in .ex-zone-glow { animation: glow-in 0.8s ease 2s both; }

/* ------------------------------------------------------------------ motion, round 2 (#2408)
   Everything below sits inside prefers-reduced-motion: no-preference, so with reduced motion the page is
   static and complete. Each block that hides anything at its start is also inside @supports for the feature
   it needs: a browser without it shows the finished page. Moves use opacity and the translate / scale
   properties (compositor friendly, and they do not replace the transform that hover uses). */
@media (prefers-reduced-motion: no-preference) {
  /* Page to page: the browser cross fades the old and the new page. The header is in the same place on both,
     so it reads as staying still. Browsers without cross document transitions simply navigate. */
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: 0.28s; }

  /* Hover and keyboard focus lift on buttons and cards. */
  .btn:focus-visible, .bento .card:focus-within, a.door:focus-visible, .prose a.pcard:focus-visible,
  .related li a:focus-visible, .article-path-guides .prose h2 + ul a:focus-visible { translate: 0 -3px; }
  .prose a.pcard:hover, .article-path-guides .prose h2 + ul a:hover { translate: 0 -4px; }
  .btn, .bento .card, a.door, .prose a.pcard, .related li a, .article-path-guides .prose h2 + ul a { transition-property: transform, translate, background-color, box-shadow; }

  /* Phone menu: the rows slide in one after another when the sheet opens (the sheet and backdrop already animate). */
  @keyframes row-in { from { opacity: 0; translate: 18px 0; } }
  .m-menu[open]:not(.is-closing) .sheet li { animation: row-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: 0.1s; }
  .m-menu[open]:not(.is-closing) .sheet li:nth-child(2) { animation-delay: 0.14s; }
  .m-menu[open]:not(.is-closing) .sheet li:nth-child(3) { animation-delay: 0.18s; }
  .m-menu[open]:not(.is-closing) .sheet li:nth-child(4) { animation-delay: 0.22s; }
  .m-menu[open]:not(.is-closing) .sheet li:nth-child(n+5) { animation-delay: 0.26s; }

  /* On this page (phone): opens and closes to its natural height. Without the feature it just opens. */
  @supports (interpolate-size: allow-keywords) and selector(::details-content) {
    :root { interpolate-size: allow-keywords; }
    .toc-m::details-content { block-size: 0; overflow: clip; transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete; }
    .toc-m[open]::details-content { block-size: auto; }
  }

  /* Home hero diagram: the parts come in one after another when the page loads (and again on Replay), then rest.
     The existing sequence of travelling dots follows. Under 900 ms in all. */
  @keyframes hd-in { from { opacity: 0; translate: 0 12px; } }
  @keyframes hd-grow { from { opacity: 0; transform: scaleX(0); } }
  @keyframes hd-pop { from { opacity: 0; transform: scale(0.4); } }
  .hd.play .hd-card { animation: hd-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .hd.play .hd-row, .hd.play .hd-label { animation: hd-in 0.4s ease 0.2s backwards; }
  .hd.play .hd-line { animation: hd-in 0.4s ease 0.3s backwards; }
  .hd.play .hd-bar { transform-box: fill-box; transform-origin: right center; animation: hd-grow 0.4s ease 0.4s backwards; }
  .hd.play .hd-av { transform-box: fill-box; transform-origin: center; animation: hd-pop 0.35s ease 0.45s backwards; }
  .hd.play .hd-node, .hd.play .hd-node-text { animation: hd-in 0.4s ease 0.1s backwards; }
  .hd.play .hd-node-b, .hd.play .hd-node-b + .hd-node-text { animation-delay: 0.22s; }
  .hd.play .hd-node-c, .hd.play .hd-node-c + .hd-node-text { animation-delay: 0.34s; }

  /* The six drawings and the home chart: parts come in when the figure scrolls into view (class "in", site.js), once. */
  @keyframes sd-part { from { opacity: 0; translate: 0 10px; } }
  @keyframes sd-bar-grow { from { transform: scaleX(0); } }
  .shell-diagram.in .sd-card:not(.sd-rise), .shell-diagram.in .sd-node, .shell-diagram.in .sd-row-bg,
  .shell-diagram.in .sd-grid, .shell-diagram.in .sd-folder { animation: sd-part 0.5s ease backwards; }
  .shell-diagram.in .sd-node-b, .shell-diagram.in .sd-folder.f2 { animation-delay: 0.12s; }
  .shell-diagram.in .sd-node-c, .shell-diagram.in .sd-folder.f3 { animation-delay: 0.24s; }
  .shell-diagram.in .sd-line:not(.sd-on-line) { animation: sd-part 0.5s ease 0.2s backwards; }
  .shell-diagram.in .sd-bar { transform-box: fill-box; transform-origin: left center; animation: sd-bar-grow 0.5s ease 0.3s backwards; }
  .shell-diagram.in .ex-valid, .ex-card.reveal.in .ex-valid { transform-box: fill-box; transform-origin: left center; animation: sd-bar-grow 0.35s ease-out backwards; }
  .shell-diagram.in .ex-warn, .ex-card.reveal.in .ex-warn { transform-box: fill-box; transform-origin: left center; animation: sd-bar-grow 0.3s ease-out 0.3s backwards; }
  .shell-diagram.in .ex-over, .ex-card.reveal.in .ex-over { transform-box: fill-box; transform-origin: left center; animation: sd-bar-grow 0.25s ease-out 0.55s backwards; }
  .shell-diagram.in .ex-in, .ex-card.reveal.in .ex-in, .shell-diagram.in .ex-bracket, .ex-card.reveal.in .ex-bracket { animation: sd-part 0.4s ease 0.5s backwards; }
}

/* Scroll driven motion: needs a browser with view and scroll timelines, otherwise nothing here applies. */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes rise-in { from { opacity: 0; translate: 0 26px; } }
    @keyframes pic-in { from { opacity: 0; translate: 0 18px; scale: 0.97; } }
    @keyframes img-settle { from { scale: 1.12; } }

    /* Sections, cards and drawings rise as they enter. They are visible by default and drive from the scroll
       position, so the script's hidden state is not used here (the script's class "in" still starts the drawings). */
    .js .reveal:not(.in), .js .steps.reveal:not(.in), .js .ex-card.reveal:not(.in) { opacity: 1; transform: none; }
    .reveal:not(.steps) {
      animation: rise-in auto linear both;
      animation-timeline: view();
      animation-range: entry calc(var(--i, 0) * 5%) entry calc(45% + var(--i, 0) * 5%);
    }
    .page-pic-frame { animation: pic-in auto linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .page-pic-frame img { animation: img-settle auto linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .pcard-media img { animation: img-settle auto linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  }

  /* Reading progress bar and the header that tightens: both follow the page scroll. The script's own bar still
     sets a transform inline, but an animation wins over it, so there is one bar. */
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    @keyframes grow-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    @keyframes head-row { to { min-height: 3.5rem; } }
    @keyframes head-logo { to { height: 2.4rem; } }
    @keyframes head-shadow { to { box-shadow: 0 8px 28px rgb(0 0 0 / 0.1); } }
    .read-progress span { animation: grow-progress auto linear both; animation-timeline: scroll(root block); }
    .header-row { animation: head-row auto linear both; animation-timeline: scroll(root block); animation-range: 0 90px; }
    .brand img { animation: head-logo auto linear both; animation-timeline: scroll(root block); animation-range: 0 90px; }
    .site-header::before { animation: head-shadow auto linear both; animation-timeline: scroll(root block); animation-range: 0 90px; }
  }
}
