@import "./fonts.css";
/* sternly.ai landing page. Reference tokens come from brand/v4.
   Three widths, two designs: desktop at 1024 px and up; desktop narrowed at 768-1023 (iPad portrait); phone at 767
   and below. Every breakpoint in this file is one of those two: (max-width: 1023px) and (max-width: 767px).
   The paper rule: documents under review (the slide, the sheet, the brief, the opinion, the record) are white paper
   with their own fixed colours (--p-*), in every theme. The product frame carries the product's own theme. */

:root {
  --wrap: 1168px;
  --stage-bg: var(--surface-sunken);
  --header-bg: color-mix(in srgb, var(--surface) 90%, transparent);
  /* Source documents keep their printed colors inside either product theme. */
  --p-ink: var(--doc-ink); --p-muted: var(--doc-ink-muted); --p-faint: var(--doc-line-control); --p-line: var(--doc-line); --p-rule: var(--doc-surface-sunken); --p-action: var(--doc-action);
  --p-holds: var(--doc-verified); --p-holds-tint: var(--doc-verified-soft); --p-wrong: var(--doc-mismatch); --p-wrong-tint: var(--doc-mismatch-soft);
  --p-review: var(--doc-review); --p-review-tint: var(--doc-review-soft); --p-gap-tint: var(--doc-neutral-soft);
  --p-reference-edge: var(--doc-reference-edge); --p-reference-soft: var(--doc-reference-soft); --p-bar: var(--doc-surface-selected); --p-bar-hot: var(--doc-chart-1);
  --band-bg: var(--brand-petrol); --band-ink: var(--brand-paper); --band-muted: color-mix(in srgb, var(--brand-paper) 78%, var(--brand-petrol)); --band-soft: color-mix(in srgb, var(--brand-paper) 90%, var(--brand-petrol)); --band-line: color-mix(in srgb, var(--brand-paper) 45%, var(--brand-petrol));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; }
a { color: inherit; }
code { font-family: var(--font-mono); }
:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-raised); padding: 8px 12px; border-radius: var(--radius-md); z-index: 100; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.eyebrow { margin: 0 0 14px; font: 600 12px/16px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-md); font: 600 14.5px/1 var(--font-sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out); }
.btn span[aria-hidden] { display: inline-block; transition: transform var(--dur-1) var(--ease-out); }
.btn:hover span[aria-hidden] { transform: translateX(2px); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15.5px; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); }
.btn-secondary { border-color: var(--line-control); color: var(--action); background: transparent; }
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--action); }
.link-quiet { color: var(--ink-muted); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.link-quiet:hover { color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.theme-toggle, .nav-toggle { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-md); background: transparent; color: var(--ink); cursor: pointer; transition: background var(--dur-1) var(--ease-out); }
.theme-toggle:hover, .nav-toggle:hover { background: var(--surface-hover); }
.theme-toggle-wide { display: inline-flex; width: auto; height: auto; gap: 8px; border: 0; padding: 0; font: 500 14px var(--font-sans); color: var(--ink-muted); }
.theme-toggle-wide:hover { background: none; color: var(--ink); }

/* ---------------------------------------------------------------- the marks */
.site-logo { display: block; width: auto; flex: none; color: var(--logo-ink); }
.k-mark { width: 22px; height: 22px; flex: none; color: var(--logo-ink); }
.rec-mark { display: inline-flex; line-height: 0; color: var(--ink); }
.rec-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px 0 5px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); font: 600 12px/1 var(--font-sans); white-space: nowrap; }
.rec-chip code { font: 500 12px var(--font-mono); color: var(--ink-muted); }
.paper .rec-chip, .app-frame .rec-chip { font-size: 11.5px; }
.paper .rec-chip code, .app-frame .rec-chip code { font-size: 10.5px; }

/* verdict chips: the group's colour, the engine's word (brand-v3.md); Wrong alone is solid */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--radius-sm); font: 600 12px/1 var(--font-sans); white-space: nowrap; }
.chip b { font-weight: 600; }
.chip-holds { color: var(--verified); background: var(--verified-soft); }
.chip-wrong { color: var(--on-mismatch); background: var(--mismatch); }
.chip-wrong-soft { color: var(--mismatch); background: var(--mismatch-soft); }
.chip-review { color: var(--review); background: var(--review-soft); }
.chip-gap { color: var(--ink-muted); background: var(--surface-selected); outline: 1px dotted var(--line-control); outline-offset: -1px; }
.chip-done { color: var(--ink); background: var(--surface-selected); font-weight: 500; }
.paper .chip-holds { color: var(--p-holds); background: var(--p-holds-tint); }
.paper .chip-wrong { color: #fff; background: var(--p-wrong); }
.paper .chip-wrong-soft { color: var(--p-wrong); background: var(--p-wrong-tint); }
.paper .chip-review { color: var(--p-review); background: var(--p-review-tint); }
.paper .chip-gap { color: var(--p-muted); background: var(--p-gap-tint); outline-color: var(--p-faint); }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--dur-3) var(--ease-out); }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { position: relative; max-width: var(--wrap); margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 36px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.lockup { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-muted); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav-more { display: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; }

/* ---------------------------------------------------------------- 1 hero */
.hero { padding-block: 56px 64px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 576px); gap: 48px; align-items: center; }
.hero-title { margin: 0; font: 450 clamp(42px, 4.4vw, 64px)/1.02 var(--font-display); letter-spacing: -0.045em; color: var(--logo-ink); text-wrap: balance; }
.hero-title em { font-style: italic; font-weight: 410; }
.hero-sub { margin: 22px 0 30px; font-size: 18px; line-height: 1.6; color: var(--ink-muted); max-width: 40ch; }
.hero-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 16px 0 0; font-size: 14px; color: var(--ink-muted); }
.watch { display: inline-flex; align-items: center; gap: 7px; color: var(--action); font-weight: 600; text-decoration: none; }
.watch:hover { text-decoration: underline; text-underline-offset: 3px; }
.hero-note span::before { content: "·"; margin-right: 14px; }

.hero-stage { min-width: 0; background: var(--stage-bg); border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 4px; }
.stage-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 4px 12px; font-size: 13px; color: var(--ink-muted); }
.stage-status { flex: 1 1 0; min-width: 0; }
.stage-status b { color: var(--ink); font-weight: 600; }
.stage-tally { display: inline-flex; gap: 6px; }
.rec-chip-bar { display: none; }

/* the paper and the slide on it */
.paper { background: #fff; color: var(--p-ink); border: 1px solid var(--p-line); border-radius: 10px; }
.slide { position: relative; padding: 20px 22px 14px; box-shadow: 0 14px 40px color-mix(in srgb, var(--ink) 7%, transparent); }
.slide-head, .paper-head { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; letter-spacing: 0.01em; color: var(--p-muted); }
.slide-head b { color: var(--p-action); font-weight: 600; }
.slide .rec-chip-paper { position: absolute; right: 14px; top: 13px; }
.slide:has(.rec-chip-paper) .slide-page { visibility: hidden; }
.rec-chip-paper { background: #fff; border-color: var(--p-line); color: var(--p-ink); }
.rec-chip-paper .rec-mark { color: var(--p-ink); }
.rec-chip-paper code { color: var(--p-muted); }
.slide-title { margin: 14px 0 16px; font: 600 21px/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--p-ink); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { border-top: 1.5px solid var(--p-ink); padding-top: 8px; min-height: 72px; min-width: 0; }
.kpi-k { display: block; font-size: 10px; color: var(--p-muted); margin-bottom: 6px; }
.fig { position: relative; display: inline-block; font: 500 21px/1.15 var(--font-mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--p-ink); }
.fig[data-v="holds"] { box-shadow: inset 0 -2px 0 var(--p-holds); }
.fig[data-v="wrong"] { color: var(--p-muted); }
.fig[data-v="wrong"]::after { content: ""; position: absolute; left: -2px; right: -2px; top: 54%; height: 2px; background: var(--p-wrong); transform-origin: left center; }
.rerun { display: block; margin-top: 5px; font: 500 13px/1.2 var(--font-mono); color: var(--p-wrong); font-variant-numeric: tabular-nums; }
.slide-chart { margin-top: 18px; }
.chart-t { margin: 0 0 8px; font-size: 10px; color: var(--p-muted); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 74px; border-bottom: 1px solid var(--p-rule); }
.bars i { display: block; flex: 1; background: var(--p-bar); border-radius: 2px 2px 0 0; }
.bars i.hot { background: var(--p-bar-hot); }
.bars i.part { background: repeating-linear-gradient(135deg, var(--p-bar) 0 3px, #fff 3px 5px); }
.slide-foot { margin: 14px 0 0; padding-top: 8px; border-top: 1px solid var(--p-rule); font-size: 9.5px; color: var(--p-faint); }

/* A1, "the flip" (assets/motion.js drives the phases; the page without script shows the last one) */
.hero-stage { position: relative; }
.slide .fig { border: 0; padding: 0; background: none; cursor: help; border-radius: 2px; }
.slide .fig:focus-visible { outline-offset: 3px; }
.kpi { position: relative; }
.hero .kpi::after { content: ""; position: absolute; right: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--p-action); transition: opacity var(--dur-2) var(--ease-out); }
.hero .kpi.unfound::after { opacity: 0; }
.fig, .fig::after { transition: color 260ms var(--ease-out), box-shadow 260ms var(--ease-out), background 260ms var(--ease-out), transform 260ms var(--ease-out); }
.fig.clean { color: var(--p-ink); box-shadow: none; }
.fig.clean::after { transform: scaleX(0); }
.fig.hl { color: var(--p-ink); background: linear-gradient(transparent 55%, var(--p-reference-soft) 55%); box-shadow: inset 0 -2px 0 var(--p-reference-edge); }
.rerun { transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
/* the hero's figures are the event: read from arm's length (landing-v4.1-plan.md §3.1) */
.hero .kpi { min-height: 84px; }
.hero .fig { font-size: 24px; }
.hero .rerun { margin-top: 6px; font-size: 15px; font-weight: 600; }
.stage-tally .chip.bump { animation: bump 320ms var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.08); } }
.rerun.clean { opacity: 0; transform: translateY(-4px); }
[data-a1].off { opacity: 0; visibility: hidden; }
.stage-tally, .rec-chip-paper, .rec-chip-bar { transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out), visibility 0s; }
.rec-chip-paper.off { transform: translateY(-6px); }
.scan { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; border-radius: inherit; }
.scan::after { content: ""; position: absolute; inset: 0; transform: translateY(-101%); background: linear-gradient(180deg, transparent calc(100% - 58px), color-mix(in srgb, var(--p-action) 7%, transparent) calc(100% - 2px), var(--p-action) calc(100% - 2px)); opacity: 0; }
.hero-stage[data-phase="read"] .scan::after { animation: scan 1.1s var(--ease-in-out) forwards; }
@keyframes scan { 0% { transform: translateY(-101%); opacity: 1; } 92% { opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes reference-breathe { 50% { opacity: .58; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-stage.alert .k-mark, .app-frame.alert .k-mark { animation: reference-breathe var(--motion-working) ease-in-out infinite; }
}
.hero-stage .slide { transition: opacity 250ms var(--ease-out); }
.hero-stage.resetting .slide { opacity: 0.55; }
.replay { display: inline-flex; align-items: center; gap: 6px; height: 26px; margin-left: 2px; padding: 0 10px; border: 1px solid var(--line-control); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); font: 600 12.5px var(--font-sans); cursor: pointer; }
.replay[hidden] { display: none; }
.replay:hover { background: var(--surface-hover); }
/* two lines reserved, so a longer status never resizes the stage */
.stage-status { display: flex; align-items: center; min-height: 2.9em; line-height: 1.45; }

/* the hover card: as written, re-run, where, the verdict and its reason — nothing about how */
.hovercard { position: absolute; z-index: 5; width: min(320px, calc(100% - 24px)); padding: 12px 14px; background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); font-size: 13px; line-height: 1.45; }
.hovercard[hidden] { display: none; }
.hc-top { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.hc-top b { font-weight: 600; }
.hc-vals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
.hc-vals div { background: var(--surface-sunken); border-radius: 6px; padding: 6px 9px; }
.hc-vals dt { font-size: 12px; color: var(--ink-muted); }
.hc-vals dd { margin: 2px 0 0; font: 500 14px var(--font-mono); font-variant-numeric: tabular-nums; }
.hc-src { margin: 0 0 6px; font-size: 12px; color: var(--ink-muted); }
.hc-src b { color: var(--ink); font-weight: 600; }
.hc-why { margin: 0; }
/* pinned by the stage: the same card, with a caret to its figure */
.hovercard.pinned { width: min(300px, calc(100% - 24px)); padding: 11px 13px; animation: pin-in 220ms var(--ease-out); }
.hovercard.pinned .hc-top { margin-bottom: 6px; }
.hovercard.pinned::before { content: ""; position: absolute; top: -6px; left: var(--caret, 24px); width: 10px; height: 10px; background: inherit; border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
@keyframes pin-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .hero-stage *, .hero-stage { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- 2 the number behind the question */
.stats { border-block: 1px solid var(--line); padding-block: 40px; }
.stats-in { display: grid; grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr)); gap: 40px; align-items: start; }
.stats-title { margin: 0; }
.stats-title a { font: 500 23px/1.3 var(--font-display); letter-spacing: -0.005em; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 5px; font-variation-settings: 'opsz' 36; text-wrap: balance; }
.stats-title a:hover { text-decoration-color: currentColor; }
.stats-title .ext { margin-left: 4px; font: 500 15px var(--font-sans); color: var(--ink-muted); }
.stats-title > span { display: block; margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.stat { margin: 0; }
.stat b { display: block; font: 500 52px/1 var(--font-mono); letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat > span { display: block; margin-top: 10px; font-size: 14.5px; line-height: 1.45; color: var(--ink-muted); max-width: 26ch; text-wrap: pretty; }
.stat-court { padding-left: 28px; border-left: 1px solid var(--line); }
.stat-src { display: inline-block; margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--ink-muted); text-underline-offset: 2px; }
.stat-src .nw { white-space: nowrap; }

/* ---------------------------------------------------------------- sections */
.sec { padding-block: 96px; }
.sec-head { max-width: 64ch; margin-bottom: 40px; }
.sec-title { margin: 0; font: 600 clamp(32px, 3.4vw, 46px)/1.08 var(--font-display); letter-spacing: -0.012em; color: var(--ink); font-variation-settings: 'opsz' 60; text-wrap: balance; }
.sec-lede { margin: 16px 0 0; font-size: 18px; line-height: 1.6; color: var(--ink-muted); }

/* ---------------------------------------------------------------- 3 watch it check: one stage, three moments */
.moments { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.62fr); grid-template-rows: auto auto auto 1fr; column-gap: 32px; row-gap: 10px; }
.moment { display: contents; }
.moment-stage { grid-column: 1; grid-row: 1 / span 4; align-self: stretch; min-width: 0; min-height: 440px; display: grid; align-content: center; justify-items: center; padding: 20px 24px; background: var(--stage-bg); border: 1px solid var(--line); border-radius: 16px; visibility: hidden; opacity: 0; transition: opacity var(--dur-2) var(--ease-out), visibility 0s var(--dur-2); }
.moments[data-active="1"] #moment-stage-1, .moments[data-active="2"] #moment-stage-2, .moments[data-active="3"] #moment-stage-3 { visibility: visible; opacity: 1; transition: opacity var(--dur-2) var(--ease-out); }
#moment-1 .moment-card { grid-row: 1; } #moment-2 .moment-card { grid-row: 2; } #moment-3 .moment-card { grid-row: 3; }
.moment-card { grid-column: 2; display: block; width: 100%; text-align: left; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); color: var(--ink); font: inherit; cursor: pointer; transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out); }
.moment-card:hover { background: var(--surface-hover); }
.moment-card[aria-pressed="true"] { border-color: var(--action); box-shadow: inset 3px 0 0 var(--action); }
.moment-card i { display: block; font: 500 12px/1.4 var(--font-mono); font-style: normal; color: var(--ink-muted); }
.moment-card b { display: block; margin: 6px 0 6px; font: 600 20px/1.25 var(--font-display); }
.moment-card span { display: block; font-size: 14.5px; line-height: 1.5; color: var(--ink-muted); }
.moments-note { margin: 18px 0 0; font-size: 13.5px; color: var(--ink-muted); }
.tally { color: var(--ink-muted); }

.mo-grid { width: 100%; max-width: 760px; display: grid; gap: 14px; align-items: center; }
.mo-grid-1 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.mo-grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.mo-grid-3 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr); align-items: stretch; }
.mo-grid .paper { padding: 14px 16px; box-shadow: 0 10px 30px color-mix(in srgb, var(--ink) 6%, transparent); }
.paper-head { margin-bottom: 10px; }
.mo-sheet table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mo-sheet th { text-align: left; font-weight: 500; font-size: 10px; color: var(--p-muted); padding: 0 6px 5px; border-bottom: 1px solid var(--p-line); }
.mo-sheet th:last-child, .mo-sheet td:last-child { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mo-sheet td { padding: 4px 6px; border-bottom: 1px solid var(--p-rule); }
/* moment 1: an average of averages */
.mo-aov th.o, .mo-aov td.o { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mo-aov tbody td { color: var(--p-ink); transition: color 220ms var(--ease-out), background 220ms var(--ease-out), box-shadow 220ms var(--ease-out); }
.mo-aov tbody tr.dim td { color: var(--p-muted); }   /* not yet read, still 4.5:1 (Lighthouse QA, Nov 8) */
.mo-aov .lit-a td.a, .mo-aov .lit-a th.a, .mo-aov .lit-o td.o, .mo-aov .lit-o th.o { background: color-mix(in srgb, var(--p-action) 8%, #fff); }
.mo-aov .lit-o td.o[data-m] { background: var(--p-reference-soft); box-shadow: inset 0 -2px 0 var(--p-reference-edge); }
.mo-aov tfoot td { padding-top: 7px; border-bottom: 0; color: var(--p-ink); }
.mo-aov tfoot td:last-child { font-weight: 600; }
.mo-aov tfoot tr:first-child td { border-top: 1.5px solid var(--p-ink); }
.mo-aov tfoot tr[data-m="weight"] td { color: var(--p-action); font-weight: 600; }
.mo-aov tfoot small { white-space: nowrap; margin-left: 6px; padding: 1px 5px; border-radius: 3px; background: var(--p-wrong-tint); color: var(--p-wrong); font-size: 10px; font-weight: 600; }
/* moment 3: the slide's chart, and October in the file */
.mo-plot { position: relative; margin-top: 40px; }
.mo-plot .bars { height: 196px; gap: 3px; }
.mo-plot .bars i { transition: opacity 220ms var(--ease-out), background 220ms var(--ease-out); }
.mo-plot .bars i.part { background: var(--p-bar); }
.mo-plot.focus .bars i { opacity: 0.3; }
.mo-plot.focus .bars i:nth-last-child(-n+2) { opacity: 1; background: var(--p-bar-hot); }
.mo-plot.partial .bars i:last-child { background: repeating-linear-gradient(135deg, var(--p-bar-hot) 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1px var(--p-bar-hot); }
.mo-anno { position: absolute; right: 0; bottom: calc(100% + 6px); display: flex; align-items: baseline; gap: 8px; margin: 0; }
.mo-anno .fig { font-size: 22px; }
.mo-anno .rerun { display: inline; margin: 0; font-size: 14px; color: var(--p-holds); }
.fig[data-v="caution"] { box-shadow: inset 0 -2px 0 var(--p-review); }
.mo-axis { display: flex; justify-content: space-between; margin: 5px 0 0; font-size: 10px; color: var(--p-muted); }
.mo-caption { margin: 12px 0 0; padding-top: 9px; border-top: 1px solid var(--p-rule); font: italic 400 14px/1.5 var(--font-display); color: var(--p-ink); }
.mo-month { display: flex; flex-direction: column; }
.mo-run { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--p-muted); }
.mo-run b { font: 500 12.5px var(--font-mono); color: var(--p-ink); font-variant-numeric: tabular-nums; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 0 0 8px; }
.cal .w { font-size: 9px; text-align: center; color: var(--p-faint); }
.cal .d { display: grid; place-items: center; height: 19px; border-radius: 3px; background: var(--doc-surface-sunken); font: 500 9.5px var(--font-mono); color: var(--p-muted); transition: background 200ms var(--ease-out), color 200ms var(--ease-out); }
.cal.on .d { background: color-mix(in srgb, var(--p-action) 15%, #fff); color: var(--p-action); }
.cal.on .d.g { background: repeating-linear-gradient(135deg, var(--p-gap-tint) 0 3px, #fff 3px 6px); color: var(--p-faint); }
.mo-days { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--p-ink); }
.mo-month .chip { align-self: flex-start; }
.mo-tile .kpi { min-height: 0; margin-bottom: 12px; }
.mo-tile .fig { font-size: 28px; }
.mo-tile .rerun { font-size: 17px; margin-top: 6px; }
.mo-reason { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--p-muted); }
.mo-brief p, .mo-opinion p { margin: 0 0 8px; font: 400 13.5px/1.55 var(--font-display); color: var(--p-ink); }
.mo-brief .chip { margin: 0 0 12px; }
.mo-brief mark { color: inherit; background: var(--p-wrong-tint); box-shadow: inset 0 -1.5px 0 var(--p-wrong); padding: 0 1px; }
.mo-brief s { color: var(--p-faint); text-decoration-color: var(--p-wrong); text-decoration-thickness: 1.5px; font-family: var(--font-mono); font-size: 12px; }
.mo-brief .cite-fix { font: 500 12px var(--font-mono); color: var(--p-wrong); }
.mo-opinion p { font-size: 12.5px; color: var(--doc-ink); }
.mo-opinion .found { background: linear-gradient(transparent 55%, var(--p-reference-soft) 55%); box-shadow: inset 0 -2px 0 var(--p-reference-edge); color: var(--p-ink); }
.mo-opinion .mo-note { margin-top: 12px; font: 400 11px/1.45 var(--font-sans); color: var(--p-muted); }

/* the scenes' states (site.js drives them with assets/motion.js; without script, each scene's last frame) */
.moment-stage .off { opacity: 0; visibility: hidden; }
.moment-stage [data-m] { transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), background 220ms var(--ease-out), box-shadow 220ms var(--ease-out), color 220ms var(--ease-out), visibility 0s; }
.mo-tile [data-m].off, .mo-month [data-m].off, .mo-aov tfoot tr.off, .mo-brief .chip.off, .mo-opinion .mo-note.off { transform: translateY(4px); }
.mo-brief mark.plain, .mo-opinion .found.plain { background: transparent; box-shadow: none; }
.mo-brief s.pending { text-decoration-color: transparent; color: var(--p-ink); }
.moments-dots { display: none; }
@media (prefers-reduced-motion: reduce) { .moment-stage *, .moment-stage { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- 4 inside Sternly: the plum band and the product */
.band { background: var(--band-bg); color: var(--band-ink); padding-block: 96px; }
.band .eyebrow { color: var(--band-muted); }
.band .sec-title { color: var(--band-ink); }
.band .sec-lede { color: var(--band-soft); }
.app-frame { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 56px minmax(0, 1fr); min-height: 640px; background: var(--surface); color: var(--ink); border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 30px 80px rgba(16, 0, 18, 0.38); font-size: 14px; line-height: 1.45; }
.af-side { background: var(--surface-raised); border-right: 1px solid var(--line); padding: 14px 8px; min-width: 0; }
.af-lockup { display: flex; justify-content: center; padding: 2px 0 14px; color: var(--action); }
.af-lockup .k-mark { width: 22px; height: 22px; }
.af-nav { list-style: none; margin: 0; padding: 0; display: grid; justify-items: center; gap: 4px; }
.af-nav li { display: grid; place-items: center; width: 38px; min-height: 36px; border-radius: 8px; color: var(--ink-muted); }
.af-nav svg { width: 19px; height: 19px; }
.af-nav li.on { height: auto; padding: 7px 0 5px; gap: 3px; }
.af-nav li.on span { font: 600 10.5px/1 var(--font-sans); letter-spacing: -0.01em; }
.af-nav .af-sep { width: 22px; min-height: 0; height: 1px; margin: 4px 0; border-radius: 0; background: var(--line); }
.af-nav li.on { background: var(--surface-selected); color: var(--action); font-weight: 600; }
.af-main { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.af-bar { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-raised); }
.af-title { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-btn { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--line-control); border-radius: 6px; background: var(--surface-raised); color: var(--ink); font-weight: 600; font-size: 12px; white-space: nowrap; }
.af-btn-done { background: var(--surface-sunken); border-color: var(--line); color: var(--ink-muted); }
.af-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; padding: 16px; min-width: 0; align-items: stretch; }
/* the original, as the viewer shows it: the page on a sunken canvas, the page count under it */
.af-view { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px; border-radius: 10px; background: var(--surface-sunken); }
.af-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.af-strip span { aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 3px; opacity: 0.8;
  background: linear-gradient(var(--p-action), var(--p-action)) 9% 18% / 30% 7% no-repeat, linear-gradient(var(--doc-line), var(--doc-line)) 9% 40% / 82% 6% no-repeat,
    linear-gradient(var(--doc-surface-sunken), var(--doc-surface-sunken)) 9% 82% / 82% 30% no-repeat, #fff; }
.af-strip span.on { opacity: 1; outline: 2px solid var(--action); outline-offset: 1px; }
.af-pages { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0; font-size: 12.5px; color: var(--ink-muted); }
.af-pages b { font: 500 12.5px var(--font-mono); color: var(--ink); }
.af-slide { padding: 18px 20px 14px; box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 8%, transparent); }
.af-slide .slide-page { display: none; }
.af-slide .slide-title { font-size: 18px; margin: 10px 0 14px; }
.af-slide .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.af-slide .kpi { min-height: 64px; padding-top: 7px; border-radius: 0 0 4px 4px; transition: background 160ms var(--ease-out); }
.af-slide .kpi.sel .fig { background: linear-gradient(transparent 55%, var(--p-reference-soft) 55%); }
.af-slide .fig { font-size: 20px; }
.af-slide .rerun { font-size: 13px; margin-top: 4px; }
.af-slide .bars { height: 72px; gap: 3px; }
.af-slide .slide-chart { margin-top: 12px; }
.af-pane { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.af-pane-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--ink-muted); }
.af-list { display: grid; }
.af-list > * { grid-area: 1 / 1; }
.af-skel { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.af-skel li { height: 47px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-sunken) 30%, var(--surface-hover) 50%, var(--surface-sunken) 70%) 0 0 / 300% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
.af-pane-h .k-mark { width: 18px; height: 18px; }
.af-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.af-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); min-width: 0; }
.af-rows li.sel { border-color: var(--action); box-shadow: inset 3px 0 0 var(--action); }
.af-rows b { grid-column: 1; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-rows code { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-rows .chip { grid-row: 1 / span 2; height: 22px; font-size: 11.5px; padding: 0 8px; }
/* a finding and its figure light together (site.js): the visitor's pointer on either */
.af-rows li { transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out); }
.af-rows li.lit { border-color: color-mix(in srgb, var(--action) 55%, var(--line)); background: var(--surface-hover); }
.af-slide .kpi.lit { background: color-mix(in srgb, var(--p-action) 7%, #fff); }
.af-card { padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); }
.af-card-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13.5px; }
.af-vals { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 0 0 8px; }
.af-vals div { background: var(--surface-sunken); border-radius: 6px; padding: 6px 9px; }
.af-vals dt { font-size: 11.5px; color: var(--ink-muted); }
.af-vals dd { margin: 2px 0 0; font: 500 16px var(--font-mono); }
.af-src { margin: 0 0 6px; font-size: 12.5px; color: var(--ink-muted); }
.af-src b { color: var(--ink); font-weight: 600; }
.af-why { margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
.af-decision { margin: 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--verified); }
.af-decision::before { content: "✓"; margin-right: 6px; }
.af-keep { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.band-steps { list-style: none; counter-reset: step; max-width: 1160px; margin: 20px auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.band-steps li { counter-increment: step; position: relative; padding-left: 36px; }
.band-steps li::before { content: "0" counter(step); position: absolute; left: 0; top: 3px; font: 500 12px var(--font-mono); color: var(--band-muted); }
.band-steps b { display: block; margin-bottom: 4px; font-weight: 600; font-size: 15.5px; color: var(--band-ink); }
.band-steps span { display: block; font-size: 14.5px; line-height: 1.55; color: var(--band-soft); }

/* P1, the review screen at work (site.js drives the phases; without script, the signed-off frame) */
.frame-stage { max-width: 1160px; margin: 0 auto; }
.app-frame [data-p] { transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s; }
.app-frame .off { opacity: 0; visibility: hidden; transform: translateY(4px); }
.app-frame .gone { display: none; }
/* the status and the record chip share one slot, so the bar keeps its shape in every phase */
.af-state { display: grid; justify-items: end; align-items: center; flex: none; min-width: 0; }
.af-state > * { grid-area: 1 / 1; }
.af-status { font-size: 12.5px; color: var(--ink-muted); white-space: nowrap; }
.af-btn-primary { background: var(--action); border-color: var(--action); color: var(--on-action); }
.af-act { display: grid; }
.af-act > * { grid-area: 1 / 1; }
.af-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.app-frame .kpi.sel .fig { transition: background 300ms var(--ease-out); }
.app-frame.unsel .kpi.sel .fig { background: none; }
.af-rows li.sel { transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.app-frame.unsel .af-rows li.sel { border-color: var(--line); box-shadow: none; }
.frame-replay { display: flex; justify-content: flex-end; min-height: 34px; margin: 10px 0 0; }
.band .replay { background: transparent; border-color: var(--band-line); color: var(--band-ink); }
.band .replay:hover { background: color-mix(in srgb, var(--band-ink) 8%, transparent); }
@media (prefers-reduced-motion: reduce) { .app-frame *, .app-frame { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- 5 what you keep */
.keep-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.keep-copy .sec-head { margin-bottom: 32px; }
.keep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.keep-list li { padding-left: 20px; border-left: 2px solid var(--line); }
.keep-list b { display: block; margin-bottom: 4px; font: 600 21px/1.3 var(--font-display); }
.keep-list span { color: var(--ink-muted); font-size: 15.5px; line-height: 1.55; }
.keep-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 30px 0 0; font-size: 14px; }
.keep-links a { color: var(--action); font-weight: 600; text-underline-offset: 3px; }
.fan { position: relative; height: 400px; }
.fan-sheet { position: absolute; width: 52%; min-height: 300px; padding: 16px 18px; box-shadow: 0 16px 44px color-mix(in srgb, var(--ink) 9%, transparent); font-size: 11px; line-height: 1.5; color: var(--p-muted); }
/* the tie-out in front; the commented brief and the certificate fanned behind it, each showing its outer edge */
.fan-1 { left: 0; top: 52px; z-index: 1; transform: rotate(-5deg); }
.fan-2 { left: 24%; top: 8px; z-index: 3; }
.fan-3 { left: 48%; top: 52px; z-index: 2; transform: rotate(5deg); text-align: right; }
.fan-3 .fan-mark { justify-content: flex-end; }
.fan-h { margin: 0 0 12px; font: 600 12px var(--font-sans); color: var(--p-ink); }
.fan-text { margin: 0 0 6px; font: 400 12px/1.5 var(--font-display); color: var(--p-ink); }
.fan-text mark { color: inherit; background: var(--p-wrong-tint); }
.fan-c { margin: 0 0 12px; padding: 6px 8px; border-left: 2px solid var(--p-action); background: var(--doc-reference-soft); font-size: 10.5px; }
.fan-c b { color: var(--p-action); margin-right: 4px; }
.fan-2 table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.fan-2 th { text-align: left; font-weight: 500; font-size: 9.5px; padding: 0 4px 4px; border-bottom: 1px solid var(--p-line); }
.fan-2 td { padding: 5px 4px; border-bottom: 1px solid var(--p-rule); color: var(--p-ink); font-family: var(--font-mono); font-size: 10.5px; white-space: nowrap; }
.fan-2 td:first-child { font-family: var(--font-sans); }
.fan-2 .chip { height: 18px; font-size: 9.5px; padding: 0 6px; font-family: var(--font-sans); }
.fan-name { margin: 0 0 14px; font: 600 18px/1.25 var(--font-display); color: var(--p-ink); }
.fan-mark { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.fan-mark .rec-mark { color: var(--p-ink); }
.fan-mark code { font-size: 10.5px; color: var(--p-muted); }
.fan-notice { margin: 0; font-style: italic; font-size: 10.5px; }

/* E: the sheets start stacked behind the tie-out and fan out once, on first entry (transform only; site.js adds .pre
   and then .in through assets/motion.js; reduced motion and no script show them fanned) */
.fan-sheet { transition: transform 320ms var(--ease-out); }
.fan-2 { transition-delay: 0ms; } .fan-1 { transition-delay: 60ms; } .fan-3 { transition-delay: 120ms; }
.fan-mark { transition: opacity 260ms var(--ease-out) 420ms; }
.fan.pre:not(.in) .fan-1 { transform: translate(46.15%, -44px); }
.fan.pre:not(.in) .fan-3 { transform: translate(-46.15%, -44px); }
.fan.pre:not(.in) .fan-mark { opacity: 0; }
.fan-h span { margin-left: 6px; font-weight: 400; color: var(--p-muted); }
.fan-name span { font: 400 12px var(--font-sans); color: var(--p-muted); white-space: nowrap; }
/* D24: the sheets take turns. data-front lifts one sheet (220 ms; `translate` composes with the fan's rotations) and
   the list item and link that name it take the plum rule the cards use. site.js rings 2 → 3 → 1 every 3.2 s while the
   section is half in view, and a pointer or focus on an item brings its sheet forward. Phone: a static stack. */
@media (min-width: 768px) {
  .fan-sheet { transition: transform 320ms var(--ease-out), translate 220ms var(--ease-out); }
  .fan-1 { transition-delay: 60ms, 0ms; } .fan-3 { transition-delay: 120ms, 0ms; }
  /* the sheets behind are dimmed toward the page, not made see-through (no sheet shows through another) */
  .fan-sheet::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: var(--surface); opacity: 0; pointer-events: none; transition: opacity 220ms var(--ease-out); }
  .fan[data-front] .fan-sheet { z-index: 1; }
  .fan[data-front] .fan-sheet::after { opacity: .2; }
  .fan[data-front="1"] .fan-3, .fan[data-front="3"] .fan-1 { z-index: 2; }
  .fan[data-front="1"] .fan-1, .fan[data-front="2"] .fan-2, .fan[data-front="3"] .fan-3 { z-index: 3; translate: 0 -6px; }
  .fan[data-front="1"] .fan-1::after, .fan[data-front="2"] .fan-2::after, .fan[data-front="3"] .fan-3::after { opacity: 0; }
  .keep-list li { transition: border-color 220ms var(--ease-out); }
  .keep-list li.front { border-left-color: var(--action); }
  .keep-links a.front { text-decoration-thickness: 2px; }
}
@media (prefers-reduced-motion: reduce) { .fan-sheet, .fan-sheet::after, .fan-mark, .keep-list li { transition: none; } }

/* ---------------------------------------------------------------- 6 works where the work is */
.fits { padding-block: 0 88px; }
.fits-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--ink-muted); }
.fits-line > span:first-child { margin-right: 6px; }
.pill { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--ink); font-size: 13.5px; font-weight: 500; }

/* ---------------------------------------------------------------- 7 questions */
#faq { border-top: 1px solid var(--line); }
.faq-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; padding: 18px 0; font-weight: 600; font-size: 16.5px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 1.5px solid var(--ink-muted); border-bottom: 1.5px solid var(--ink-muted); transform: translateY(-3px) rotate(45deg); transition: transform var(--dur-2) var(--ease-out); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq p { margin: 0 0 20px; max-width: 64ch; color: var(--ink-muted); font-size: 15.5px; line-height: 1.65; }

/* ---------------------------------------------------------------- 8 close and the footer */
.close { padding-block: 104px 112px; border-top: 1px solid var(--line); }
.close-title { margin: 0 0 30px; font: 600 clamp(38px, 4.8vw, 64px)/1.03 var(--font-display); letter-spacing: -0.015em; font-variation-settings: 'opsz' 72; }
.close-note { margin: 18px 0 0; font-size: 14px; color: var(--ink-muted); }
.foot { border-top: 1px solid var(--line); padding-block: 36px 44px; }
.foot-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 24px; align-items: center; }
.foot-nav { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; justify-content: flex-end; }
.foot-nav a { color: var(--ink-muted); text-decoration: none; font-size: 14px; }
.foot-nav a:hover { color: var(--ink); }
.foot-n, .foot-c { margin: 0; font-size: 13px; color: var(--ink-muted); }
.foot-n { grid-column: 1 / 3; }
.foot-c { grid-column: 3; text-align: right; }
.foot-c a { color: inherit; text-decoration: none; }
.foot-c a:hover { color: var(--ink); text-decoration: underline; }

/* ================================================================ desktop, smaller (1024-1199) */
@media (max-width: 1199px) {
  .hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 468px); gap: 36px; }
  .hero-sub { font-size: 17px; }
  .hero .fig { font-size: 21px; }
  .hero .rerun { font-size: 14px; }
  .hero .slide-deck { display: none; }
  .stats-in { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; }
  .stats-title { grid-column: 1 / -1; }
  .stats-title a { font-size: 22px; }
  .app-frame { min-height: 0; }
  .af-slide .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ================================================================ desktop, narrowed (768-1023: iPad portrait) */
@media (max-width: 1023px) {
  .top-in { gap: 20px; }
  .nav { display: none; }
  .nav-toggle { display: inline-grid; }
  .nav.open { display: flex; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 24px 18px; background: var(--surface-raised); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
  .nav.open a { padding: 10px 0; font-size: 17px; color: var(--ink); }
  .nav.open .nav-more { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
  .nav.open .nav-more a { font-size: 15px; color: var(--ink-muted); }
  .hero { padding-block: 48px 64px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-copy { max-width: 640px; }
  .hero-stage { width: 100%; max-width: 720px; justify-self: center; }
  .hero .fig { font-size: 24px; }
  .hero .rerun { font-size: 15px; }
  .hero .slide-deck { display: inline; }
  .stat b { font-size: 44px; }
  .moments { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: 12px; row-gap: 16px; }
  .moment-stage { grid-column: 1 / -1; grid-row: 1; }
  #moment-1 .moment-card, #moment-2 .moment-card, #moment-3 .moment-card { grid-row: 2; }
  #moment-1 .moment-card { grid-column: 1; } #moment-2 .moment-card { grid-column: 2; } #moment-3 .moment-card { grid-column: 3; }
  .moment-card b { font-size: 18px; }
  .moment-card span { font-size: 13.5px; }
  .app-frame { grid-template-columns: 52px minmax(0, 1fr); }
  .af-side { padding: 14px 6px; }
  .af-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 12px; }
  .af-view { padding: 12px; }
  .keep-in { gap: 32px; }
  .fan { height: 380px; }
  .fan-sheet { width: 56%; }
  .fan-2 { left: 22%; } .fan-3 { left: 44%; }
  .fan.pre:not(.in) .fan-1 { transform: translate(39.3%, -44px); }
  .fan.pre:not(.in) .fan-3 { transform: translate(-39.3%, -44px); }
  .faq-in { gap: 32px; }
}

/* ================================================================ phone (767 and below) */
@media (max-width: 767px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .top-in { height: 56px; gap: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .top .site-logo { height: 24px; }
  .top-actions { gap: 8px; }
  .top-actions .link-quiet, .top-actions .theme-toggle { display: none; }
  .top-actions .btn { height: 40px; padding: 0 13px; font-size: 13.5px; }
  .nav.open { padding: 8px 16px 16px; }
  .hero { padding-block: 32px 48px; }
  .hero-in { gap: 32px; }
  .hero-title { font-size: clamp(36px, 10.6vw, 44px); }
  .hero-sub { font-size: 16px; margin: 16px 0 22px; }
  .cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .cta .btn { width: 100%; }
  .hero-note { font-size: 13px; }
  .hero-stage { padding: 10px 10px 2px; border-radius: 14px; }
  .slide { padding: 16px 16px 12px; }
  .slide .rec-chip-paper { display: none; }
  .rec-chip-bar { display: inline-flex; }
  .slide:has(.rec-chip-paper) .slide-page { visibility: visible; }
  .slide-title { font-size: 19px; margin: 10px 0 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
  .kpi { min-height: 64px; }
  .fig { font-size: 20px; }
  .hero .fig { font-size: 24px; }
  .hero .kpi { min-height: 76px; }
  .hero .slide-chart { display: none; }
  .stage-bar { font-size: 12.5px; padding: 10px 2px; }
  .stage-status { flex: 1 1 calc(100% - 40px); }
  .stats { padding-block: 28px; }
  .stats-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .stats-title a { font-size: 21px; }
  .stat b { font-size: 40px; }
  .stat > span { font-size: 13.5px; }
  .stat-court { grid-column: 1 / -1; padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .stat-src { display: inline-block; padding-block: 12px; margin: -4px 0 -12px; }
  .sec { padding-block: 60px; }
  .sec-head { margin-bottom: 28px; }
  .sec-title { font-size: clamp(28px, 8.4vw, 34px); }
  .sec-lede { font-size: 16px; }
  /* the three moments become a swipeable row of cards */
  .moments { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .moments::-webkit-scrollbar { display: none; }
  .moment { display: flex; flex-direction: column; flex: 0 0 86%; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-raised); }
  .moment-stage { align-self: stretch; visibility: visible; opacity: 1; aspect-ratio: auto; min-height: 300px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 14px; }
  .moment-card, .moment-card[aria-pressed] { border: 0; border-radius: 0; box-shadow: none; padding: 14px 16px 18px; background: transparent; cursor: default; }
  .moment-card:hover { background: transparent; }
  .moment-card b { font-size: 19px; }
  .mo-grid-1, .mo-grid-2, .mo-grid-3 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mo-grid .paper { padding: 12px 14px; }
  .mo-tile .fig { font-size: 24px; }
  .mo-reason, .mo-opinion .mo-note, .mo-tile .paper-head { display: none; }
  .moment-stage { min-height: 0; padding: 12px; }
  .mo-sheet table { font-size: 11.5px; }
  .mo-sheet td { padding: 2px 6px; }
  .mo-tile .kpi { margin-bottom: 8px; }
  .mo-plot { margin-top: 34px; }
  .mo-plot .bars { height: 92px; gap: 2px; }
  .mo-caption { font-size: 13px; }
  .mo-anno .fig { font-size: 20px; }
  .moments-note { margin-top: 14px; font-size: 13px; }
  .moments-dots { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
  .moments-dots button { width: 44px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
  .moments-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-control); opacity: .55; transition: background var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out); }
  .moments-dots button[aria-current="true"]::before { background: var(--action); opacity: 1; }
  /* the product frame becomes its findings pane */
  .band { padding-block: 60px; }
  .app-frame { grid-template-columns: minmax(0, 1fr); border-radius: 12px; }
  .af-side, .af-view { display: none; }
  .af-bar { flex-wrap: wrap; row-gap: 8px; }
  .af-title { flex-basis: 100%; }
  .af-bar .rec-chip code { display: none; }
  .af-state { flex: 1 1 auto; justify-items: start; }
  .af-body { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .af-rows .chip-done { display: none; }
  .band-steps { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 28px; }
  .keep-in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .keep-list { gap: 16px; }
  .keep-list b { font-size: 19px; }
  .keep-links { margin-top: 22px; }
  .fan { height: 262px; }
  .fan-sheet { width: 74%; min-height: 210px; transform: none; padding: 14px; }
  .fan-1 { left: 0; top: 44px; z-index: 1; } .fan-2 { left: 13%; top: 22px; z-index: 2; } .fan-3 { left: 26%; top: 0; z-index: 3; text-align: left; }
  .fan-3 .fan-mark { justify-content: flex-start; }
  .fan.pre:not(.in) .fan-1 { transform: translate(17.6%, -22px); }
  .fan.pre:not(.in) .fan-3 { transform: translate(-17.6%, 22px); }
  .fits { padding-bottom: 60px; }
  .faq-in { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .faq summary { font-size: 16px; padding: 16px 0; }
  .close { padding-block: 60px 68px; }
  .close-title { font-size: clamp(32px, 9.6vw, 40px); }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .foot-nav, .foot-n, .foot-c { grid-column: 1; }
  .foot-nav { justify-content: flex-start; }
  .foot-c { text-align: left; }
  /* text links get a 44 px tap target on phones */
  .watch, .keep-links a, .foot-nav a, .foot-nav .theme-toggle-wide, .foot .lockup { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-nav { gap: 0 20px; }
  .keep-links { gap: 0 20px; }
  .hero-note { row-gap: 0; }
  .hero-note span::before { content: none; }
}

/* ---------------------------------------------------------------- Book a demo (book.js): a dialog, a sheet on phone */
html:has(dialog.demo[open]) { overflow: hidden; }
.demo { width: min(560px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-md); overflow: auto; overscroll-behavior: contain; }
.demo::backdrop { background: color-mix(in srgb, var(--brand-carbon) 52%, transparent); }
.demo[open] .demo-in { animation: demo-in var(--dur-3) var(--ease-out); }
@keyframes demo-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .demo[open] .demo-in { animation: none; } }
.demo-in { position: relative; padding: 36px 36px 28px; }
.demo-x { position: absolute; top: 12px; right: 12px; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); cursor: pointer; }
.demo-x:hover { background: var(--surface-hover); color: var(--ink); }
.demo-title { margin: 0 0 8px; padding-right: 32px; font: 600 30px/1.1 var(--font-display); letter-spacing: -0.01em; font-variation-settings: 'opsz' 72; }
.demo-title em { font-style: italic; font-weight: 500; }
.demo-title:focus { outline: none; }
.demo-sub { margin: 0 0 22px; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.demo-sub b { color: var(--ink); font-weight: 600; word-break: break-all; }
.demo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.fld { display: grid; gap: 6px; margin: 0 0 14px; min-width: 0; }
.fld > span, .demo-pick legend { font: 600 13px/1.3 var(--font-sans); color: var(--ink); }
.fld i { font-style: normal; font-weight: 500; color: var(--ink-muted); margin-left: 4px; }
.fld input, .fld textarea { width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line-control); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: 400 15px/1.4 var(--font-sans); transition: border-color var(--dur-1) var(--ease-out); }
.fld textarea { height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; }
.fld input:focus, .fld textarea:focus { border-color: var(--action); }
.fld [aria-invalid="true"] { border-color: var(--mismatch); }
.fld-hint { margin: -8px 0 14px; font-size: 12.5px; color: var(--ink-muted); }
.demo-pick { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.demo-pick legend { padding: 0; margin-bottom: 8px; }
.demo-pick label { position: relative; display: inline-block; margin: 0 6px 8px 0; }
.demo-pick input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.demo-pick span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line-control); border-radius: var(--radius-pill); font: 500 14px/1 var(--font-sans); color: var(--ink-muted); transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out); }
.demo-pick input:hover + span { background: var(--surface-hover); }
.demo-pick input:checked + span { border-color: var(--action); background: var(--surface-selected); color: var(--ink); font-weight: 600; }
.demo-pick input:focus-visible + span { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
.demo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.demo-err { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--mismatch); border-radius: var(--radius-sm); background: var(--mismatch-soft); font-size: 14px; line-height: 1.45; }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.demo-actions [aria-busy="true"] { opacity: 0.7; cursor: progress; }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink-muted); }
.btn-quiet:hover { background: var(--surface-hover); color: var(--ink); }
.demo-fine { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.demo-fine a { color: var(--ink); }
[data-step="done"] .demo-actions + .demo-fine { margin-top: 18px; }
@media (max-width: 767px) {
  .demo { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .demo-in { min-height: 100%; padding: 60px max(20px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
  .demo-x { top: max(8px, env(safe-area-inset-top, 0px)); right: 8px; width: 44px; height: 44px; }
  .demo-title { font-size: 28px; }
  .demo-row { grid-template-columns: 1fr; }
  /* 16 px on a phone: iPhone Safari zooms the page in on a field under 16 px and does not zoom back */
  .fld input, .fld textarea { font-size: 16px; }
  .demo-pick span { height: 44px; }
  .demo-actions .btn { flex: 1 1 100%; height: 48px; }
  .demo-fine a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (pointer: coarse) {
  .theme-toggle:not(.theme-toggle-wide), .nav-toggle, .demo-x { min-width: 44px; min-height: 44px; }
  /* a phone turned sideways is wider than 767 px: the form's fields stay at 16 px wherever a finger types */
  .fld input, .fld textarea { font-size: 16px; }
  .replay, .theme-toggle-wide, .faq summary { min-height: 44px; }
}

/* The examples of the new engine (helper v1, Dec 1, 2026; web/build.py `examples_into`): the product's own views as
   pictures, each in a box laid out from its own size before it arrives (width and height on the picture and on its
   phone source), the whole picture a link to the example in the app. */
.hero-fine { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.hero-fine b { color: var(--ink); font-weight: 600; }
.hero-shot { margin: 0; padding: 12px; }
.shot { display: block; border-radius: 12px; overflow: hidden; background: var(--surface-raised); }
.shot img { display: block; width: 100%; height: auto; }
.shot:focus-visible { outline: 2px solid var(--focus, currentColor); outline-offset: 3px; }
.shot-cap { margin: 10px 4px 2px; font-size: 13.5px; line-height: 1.45; color: var(--ink-muted); }
.shot-cap b { color: var(--ink); font-weight: 600; }
.moments-shots .moment-stage { padding: 12px; min-height: 0; align-content: start; }
.moments-shots .moment-stage .shot { width: 100%; }
.moments-note a { color: inherit; }

/* Touch targets of at least 44 px on a touch screen (brief W6, the lead's walk of the live site at 390, L9: the logo
   91 x 24, "Book a demo" 130 x 40, the moments' dots 44 x 24, the record links in captions and notes 36 and 16 tall,
   the source link 42, "Sign in" and the footer's Terms, Privacy and Support 16 tall). Each takes room to tap round it,
   drawn by nothing, so nothing on the page moves; "Book a demo" in the header is 44 tall. */
@media (pointer: coarse) {
  .lockup, .shot-cap a, .moments-note a, .stat-src, .nav-more a, .link-quiet, .foot-c a, .moments-dots button { position: relative; }
  .lockup::after, .shot-cap a::after, .moments-note a::after, .stat-src::after, .nav-more a::after, .link-quiet::after, .foot-c a::after,
  .moments-dots button::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 44px; transform: translateY(-50%); }
  .site-head .btn, header .btn { min-height: 44px; }
  .nav > a, .foot-nav > a { position: relative; }
  .nav > a::after, .foot-nav > a::after { content: ""; position: absolute; left: -8px; right: -8px; top: 0; bottom: 0; }
  .foot-c a::after { left: -6px; right: -6px; }
}
