/* NAS Training platform: design tokens + shared components.
   Light is the default; dark follows the OS unless the viewer picks a theme. */
:root {
  color-scheme: light;
  --bg: #F1F4F5;
  --surface: #FAFCFC;
  --surface-2: #E7ECEE;
  --surface-3: #DDE4E7;
  --line: #DCE3E6;
  --line-2: #C3CDD2;
  --ink: #0E1417;
  --ink-2: #4A565C;
  --ink-3: #5C696F;
  --accent: #007FB0;
  --accent-2: #00A3DA;
  --accent-3: #0C627F;
  --accent-wash: #E2F1F8;
  --accent-ink: #FFFFFF;
  --link: #0C627F;
  --field: #7E8C93;
  --focus-ring: #0C627F;
  --good: #0E7C5A; --good-text: #0B6247; --good-wash: #E1F3EC;
  --warn: #A9660A; --warn-text: #8A5308; --warn-wash: #FAEEDC;
  --serious: #B3591E; --serious-text: #8E4718; --serious-wash: #F9E9DE;
  --critical: #B3261E; --critical-text: #8E1E18; --critical-wash: #F8E4E3;
  --tier-1: #5ABBE3; --tier-2: #0088BB; --tier-3: #0C627F;
  --series-1: #2A78D6; --series-2: #EB6834; --series-3: #1BAF7A; --series-4: #EDA100;
  --chart-line: #007FB0; --chart-fill: rgba(0,127,176,.10); --chart-mute: #B9C3C9; --grid: #E4EAEC; --axis: #C3CDD2;
  /* Console radius scale: flat for data, 4px for controls, 12px for tiles, pill for CTAs only. */
  --r-flat: 0px; --r-ctl: 4px; --r-tile: 12px; --r-pill: 999px;
  --radius: 4px; --radius-lg: 12px; --radius-sm: 4px;
  --shadow: none;
  --shadow-lg: 0 24px 60px -28px rgba(14,20,23,.45);
  --font-display: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --focus: 0 0 0 3px rgba(12,98,127,.28);
  /* Motion. Apple's house curve (counted 122x in their shipped CSS), their
     secondary enter curve, and one push curve for things that travel. */
  --ease:      cubic-bezier(.4,0,.6,1);
  --ease-out:  cubic-bezier(.25,.1,.3,1);
  --ease-push: cubic-bezier(.32,.72,0,1);
  /* One spring, generated from Apple's own equation at bounce 0.15 (.snappy).
     Used on the release of a press and nowhere else. */
  --ease-settle: linear(0, 0.0064 1.333%, 0.0239 2.667%, 0.0929 5.667%, 0.1873 8.667%, 0.5168 18.17%, 0.6124 21.33%, 0.6957 24.5%, 0.7662 27.67%, 0.8244 30.83%, 0.8715 34%, 0.9121 37.5%, 0.945 41.33%, 0.9708 45.67%, 0.9883 50.33%, 0.9997 55.83%, 1.0047 61.17%, 1.0063 68%, 1);
  --ease-smooth: linear(0, 0.0054 1.167%, 0.0201 2.333%, 0.0834 5.167%, 0.4603 16.83%, 0.5555 20.17%, 0.6382 23.5%, 0.7082 26.83%, 0.7666 30.17%, 0.8166 33.67%, 0.8602 37.5%, 0.8992 42%, 0.9296 46.83%, 0.9536 52.33%, 0.9712 58.5%, 0.9832 65.33%, 0.9913 73.67%, 1);
  /* Five-step duration ladder from the measured distribution in Apple's CSS.
     Exits run about two thirds of entrances, which is their own ratio. */
  --d-touch: 20ms; --d-press: 100ms; --d-state: 240ms; --d-move: 320ms;
  --d-sheet: 400ms; --d-exit: 220ms; --d-settle: 260ms; --d-draw: 620ms; --stagger: 60ms;
  --dur: var(--d-state);
  /* Depth from a lighting model, not a shadow stack: a raised panel has a
     bright top edge and a shaded bottom one. Guarded below, because an engine
     without color-mix() would resolve these to currentColor. */
  --edge-lit:   color-mix(in srgb, var(--line) 82%, #FFFFFF 18%);
  --edge-shade: color-mix(in srgb, var(--line) 80%, var(--ink) 20%);
  --edge-side:  color-mix(in srgb, var(--line) 92%, var(--ink) 8%);
  /* 8px grid with a 4px half-step, replacing 18 unrelated spacing values. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0D1115; --surface: #141A1E; --surface-2: #1B2328; --surface-3: #263036;
    --line: #263036; --line-2: #36424A;
    --ink: #ECF1F3; --ink-2: #AEBAC1; --ink-3: #93A1AA;
    --link: #7FD3F2; --field: #5A6872; --focus-ring: #7FD3F2;
    --accent: #00A3DA; --accent-2: #3FC2F0; --accent-3: #7FD3F2; --accent-wash: rgba(0,163,218,.14); --accent-ink: #051D26;
    --good: #3DD68C; --good-text: #6FE0AB; --good-wash: rgba(61,214,140,.15);
    --warn: #E0A33C; --warn-text: #EFC079; --warn-wash: rgba(224,163,60,.15);
    --serious: #E2884F; --serious-text: #EFAA7C; --serious-wash: rgba(226,136,79,.15);
    --critical: #E2635B; --critical-text: #EF9089; --critical-wash: rgba(226,99,91,.16);
    --series-1: #3987E5; --series-2: #D95926; --series-3: #199E70; --series-4: #C98500;
    --chart-line: #00A3DA; --chart-fill: rgba(0,163,218,.14); --chart-mute: #46525A; --grid: #222B31; --axis: #36424A;
    --shadow: none;
    --edge-lit: color-mix(in srgb, var(--line) 86%, #FFFFFF 14%);
    --edge-shade: color-mix(in srgb, var(--line) 74%, #000000 26%);
    --edge-side: color-mix(in srgb, var(--line) 92%, #000000 8%);
    --shadow-lg: 0 24px 60px -28px rgba(0,0,0,.75);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D1115; --surface: #141A1E; --surface-2: #1B2328; --surface-3: #263036;
  --line: #263036; --line-2: #36424A;
  --ink: #ECF1F3; --ink-2: #AEBAC1; --ink-3: #93A1AA;
    --link: #7FD3F2; --field: #5A6872; --focus-ring: #7FD3F2;
  --accent: #00A3DA; --accent-2: #3FC2F0; --accent-3: #7FD3F2; --accent-wash: rgba(0,163,218,.14); --accent-ink: #051D26;
  --good: #3DD68C; --good-text: #6FE0AB; --good-wash: rgba(61,214,140,.15);
  --warn: #E0A33C; --warn-text: #EFC079; --warn-wash: rgba(224,163,60,.15);
  --serious: #E2884F; --serious-text: #EFAA7C; --serious-wash: rgba(226,136,79,.15);
  --critical: #E2635B; --critical-text: #EF9089; --critical-wash: rgba(226,99,91,.16);
  --series-1: #3987E5; --series-2: #D95926; --series-3: #199E70; --series-4: #C98500;
  --chart-line: #00A3DA; --chart-fill: rgba(0,163,218,.14); --chart-mute: #46525A; --grid: #222B31; --axis: #36424A;
  --shadow: none;
  --edge-lit: color-mix(in srgb, var(--line) 86%, #FFFFFF 14%);
  --edge-shade: color-mix(in srgb, var(--line) 74%, #000000 26%);
  --edge-side: color-mix(in srgb, var(--line) 92%, #000000 8%);
  --shadow-lg: 0 24px 60px -28px rgba(0,0,0,.75);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; margin: 0; text-wrap: balance; line-height: 1.2; }
h1 { font-size: 32px; line-height: 1.06; } h2 { font-size: 23px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
p { margin: 0 0 12px; } p:last-child { margin-bottom: 0; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--r-ctl); }
img, svg { max-width: 100%; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.spacer { flex: 1; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 18px; }
.card.tight { padding: 14px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h3 { font-size: 15px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--surface); color: var(--ink); transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { background: var(--surface-3); transform: scale(.975); transition: transform var(--d-press) var(--ease-out), background-color var(--d-touch) linear; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.cta { border-radius: var(--r-pill); min-height: 52px; font-size: 16px; width: 100%; }
.btn.primary:hover { background: var(--accent-3); }
:root[data-theme="dark"] .btn.primary:hover, .btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: var(--field); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.quiet { background: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--critical-wash); color: var(--critical-text); }
.btn.sm { padding: 8px 12px; font-size: 13px; min-height: 40px; }
.btn.lg { padding: 13px 24px; font-size: 16px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .kbd { margin-left: 4px; }
.kbd { display: inline-block; font: 600 11px/1 var(--font-body); padding: 3px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: var(--r-ctl); color: var(--ink-3); background: var(--surface); }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, input[type=text], input[type=email], input[type=number], input[type=password], input[type=date], input[type=datetime-local], input[type=tel], select, textarea { width: 100%; background: var(--surface); border: 1px solid var(--field); border-radius: var(--r-ctl); padding: 11px 12px; font-size: 16px; color: var(--ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); outline: 2px solid var(--focus-ring); outline-offset: 1px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 88px; resize: vertical; }
.help { font-size: 12px; color: var(--ink-3); }
.error { color: var(--critical-text); font-size: 13px; }
.input-row { display: flex; gap: 8px; }
.input-row > * { flex: 1; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* Chips + pills */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--r-ctl); font-size: 12px; font-weight: 700; line-height: 1.4; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.tier-1 { background: color-mix(in srgb, var(--tier-1) 18%, transparent); color: var(--accent-3); }
.chip.tier-2 { background: color-mix(in srgb, var(--tier-2) 18%, transparent); color: var(--accent-3); }
.chip.tier-3 { background: var(--tier-3); color: #fff; }
:root[data-theme="dark"] .chip.tier-1, :root[data-theme="dark"] .chip.tier-2 { color: var(--accent-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.tier-1, :root:not([data-theme="light"]) .chip.tier-2 { color: var(--accent-3); } }
.chip.p1 { background: var(--serious-wash); color: var(--serious-text); }
.chip.p2 { background: var(--accent-wash); color: var(--accent-3); }
.chip.p3 { background: var(--surface-2); color: var(--ink-2); }
.chip.good { background: var(--good-wash); color: var(--good-text); }
.chip.warn { background: var(--warn-wash); color: var(--warn-text); }
.chip.serious { background: var(--serious-wash); color: var(--serious-text); }
.chip.critical { background: var(--critical-wash); color: var(--critical-text); }
.chip.accent { background: var(--accent-wash); color: var(--accent-3); }
.chip.outline { background: transparent; border: 1px solid var(--line-2); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.badge.hot { background: var(--serious); color: #fff; }
.badge.quiet { background: var(--surface-3); color: var(--ink-2); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r-ctl); background: var(--accent-wash); color: var(--accent-3); font-weight: 700; font-size: 13px; flex: none; font-family: var(--font-display); }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }

/* Stat tiles */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.kpi .value { font-size: 27px; font-weight: 600; font-family: var(--font-mono); letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12px; font-weight: 600; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi .delta.up { color: var(--good-text); } .kpi .delta.down { color: var(--critical-text); }
.kpi .spark { margin-top: 6px; height: 28px; }
.hero-figure { font-family: var(--font-mono); font-size: 46px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-ctl); padding: 3px; gap: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 2px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }

/* Misc components */
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-ctl); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: toast .2s ease-out; }
.toast.error { background: var(--critical); color: #fff; }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal-back { position: fixed; inset: 0; background: rgba(6,10,12,.55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 90; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 22px; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(900px, 100%); }
@media (max-width: 600px) { .modal-back { align-items: flex-end; padding: 0; } .modal { border-radius: var(--r-tile) var(--r-tile) 0 0; max-height: 94vh; } }
.empty { padding: 28px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r-tile); }
.callout { border-left: 3px solid var(--accent); background: var(--accent-wash); padding: 12px 14px; border-radius: var(--r-flat); }
.callout.warn { border-color: var(--warn); background: var(--warn-wash); }
.callout.serious { border-color: var(--serious); background: var(--serious-wash); }
.meter { height: 8px; background: var(--surface-2); border-radius: var(--r-flat); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-flat); }
.meter.good > i { background: var(--good); } .meter.warn > i { background: var(--warn); } .meter.critical > i { background: var(--critical); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid img, .photo-thumb { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--line); cursor: zoom-in; }
.list { display: flex; flex-direction: column; }
.list > * { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-ctl); min-height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }
.loading { opacity: .6; pointer-events: none; }

/* Charts */
.fig { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 16px 18px; margin: 0; min-width: 0; }
.fig-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.fig-h h3 { font-size: 14px; font-weight: 700; }
.fig-h .sub { font-size: 12px; color: var(--ink-3); }
.fig .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin: 6px 0 4px; }
.fig .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.fig .legend i.line { height: 3px; width: 14px; border-radius: 2px; vertical-align: 2px; }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig text { font-family: var(--font-body); font-size: 11px; fill: var(--ink-3); }
.fig .grid line { stroke: var(--grid); stroke-width: 1; }
.fig .axis { stroke: var(--axis); stroke-width: 1; }
.fig .mark { transition: opacity .12s; cursor: default; }
.fig .mark:hover { opacity: .8; }
.fig .mark:focus-visible { opacity: .8; outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.fig .dlabel { fill: var(--ink-2); font-weight: 600; }
.fig .table-toggle { background: none; border: 0; color: var(--link); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.fig table { margin-top: 8px; }
.chart-tip { position: fixed; z-index: 80; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 10px; border-radius: var(--r-ctl); font-size: 12px; box-shadow: var(--shadow-lg); min-width: 120px; }
.chart-tip .t { font-weight: 700; opacity: .8; margin-bottom: 4px; }
.chart-tip .r { display: flex; justify-content: space-between; gap: 12px; }
.chart-tip .r i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 2px; }
.chart-tip .r b { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  :root { --d-touch: 1ms; --d-press: 1ms; --d-state: 1ms; --d-move: 1ms; --d-sheet: 1ms; --d-exit: 1ms; --d-settle: 1ms; --d-draw: 1ms; --stagger: 0ms; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  /* A looping placeholder must stop looping, not loop faster. */
  .skeleton { animation: none !important; background: var(--surface-2); }
}

/* ============================================================
   Console components: mono numerals, data bands, spectrum meters,
   bento tiles, sticky CTA. Shared by the marketing pages, the
   client portal and the coach hub so one token change moves all.
   ============================================================ */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mlabel { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.mnum { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -0.02em; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Data band: a flat strip split into cells by hairlines. */
.band { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-flat); overflow: hidden; }
.band > div { padding: 12px 10px; text-align: center; border-left: 1px solid var(--line); min-width: 0; }
.band > div:first-child { border-left: 0; }
.band b { display: block; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.band span { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.band.wrap4 { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; }
@media (max-width: 420px) { .band b { font-size: 17px; } .band > div { padding: 11px 6px; } }

/* Spectrum meter: 5 segments, the matching range filled. One schema shared by
   the quiz result, the tier cards and the guide cards. */
.spec { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; padding: 7px 0; }
.spec + .spec { border-top: 1px solid var(--line); }
.spec .ax { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.spec .segs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.spec .segs i { display: block; height: 8px; background: var(--surface-2); border-radius: var(--r-flat); transition: background var(--dur) var(--ease); }
.spec .segs i.on { background: var(--accent); }
.spec .segs i:first-child { border-radius: 2px 0 0 2px; }
.spec .segs i:last-child { border-radius: 0 2px 2px 0; }
.spec .val { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.spec.mute .segs i.on { background: var(--line-2); }

/* Bento tile */
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 18px; }
.tile.accent { background: var(--accent-wash); border-color: var(--accent); }

/* Compact link rows (the /links "more" list) */
.lrow { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--ink); text-decoration: none; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.lrow.lrow:hover { border-color: var(--accent); background: var(--surface-3); text-decoration: none; }
.lrow .t { font-weight: 600; font-size: 15px; }
.lrow .v { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.lrow .chev { color: var(--ink-3); font-size: 15px; }

/* Sticky bottom CTA. The only blurred surface on the site. */
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: 0 -1px 0 var(--line); }
.stickybar .px { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.stickybar .btn { margin-left: auto; min-height: 46px; padding: 0 22px; border-radius: var(--r-pill); }
body.has-sticky { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

/* Segmented step bar for the questionnaire */
.stepbar { display: grid; gap: 2px; height: 3px; border-radius: var(--r-flat); }
.stepbar i { display: block; height: 100%; background: var(--surface-2); border-radius: var(--r-flat); }
.stepbar i.done { background: var(--accent-3); }
.stepbar i.now { background: var(--accent); }

/* Screenshot mat */
.shot { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-flat); padding: 10px; }
.shot img { width: 100%; display: block; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.shot figcaption { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }

/* Marketing page scaffolding */
.col { max-width: 460px; margin: 0 auto; padding: 0 20px; }
.sect { padding: 34px 0; }
.sect.band-bg { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lede { font-size: 17px; color: var(--ink-2); }
.risk { font-size: 12px; color: var(--ink-3); margin-top: 8px; text-align: center; }
.strike { color: var(--ink-3); text-decoration: line-through; }
@media (min-width: 720px) { .col.wide { max-width: 1000px; } }

/* Guide cover squares */
.covers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.covers a { display: block; color: inherit; text-decoration: none; }
.covers img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--surface-2); }
.covers .t { display: block; font-size: 12.5px; font-weight: 600; margin-top: 7px; line-height: 1.25; }
.covers .p { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.covers a:hover img { border-color: var(--accent); }
.fan { display: flex; flex: none; }
.fan img { width: 52px; height: 52px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2); }
.fan img + img { margin-left: -18px; }

@media print {
  .stickybar, .tabs, .btn, nav, footer .nolink { display: none !important; }
  body { background: #fff; color: #000; }
  .card.card, .tile.tile, .band.band, .tier.tier, .rec.rec { border-color: #999 !important; break-inside: avoid; }
}

/* Skip link: visible only when focused. */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 0 0 var(--r-ctl) 0; font-weight: 600; }
.skip-link:focus { left: 0; text-decoration: none; }

/* Launch checklist */
.lrow-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); }
.lrow-item:first-of-type { border-top: 0; }
.lrow-item .mark { flex: none; margin-top: 1px; }
.lrow-item.done .mark { color: var(--good); }
.lrow-item.block .mark { color: var(--critical); }
.lrow-item.soft .mark { color: var(--ink-3); }
.lrow-item .t { font-weight: 600; font-size: 15px; }
.lrow-item .how { margin-top: 5px; color: var(--accent-3); }
.lrow-item.done .t { color: var(--ink-2); font-weight: 500; }
.ok-card { border-color: var(--good); background: var(--good-wash); }
.warn-card { border-color: var(--warn); background: var(--warn-wash); }

/* ============================================================
   MOTION AND MATERIAL
   Base is "Push" (motion), with the drawn moments from "Ink" and the
   lighting model from "Anodise". Hand-written: no animation library,
   no third-party asset, nothing that needs a credit line.
   ============================================================ */

/* No 300ms double-tap delay, no grey flash box on tap. */
a, button, summary, label, input, select, textarea,
.lrow, .opt, .soc, .gcard, .covers a, .tier, .step, [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* --- Press response. The most literal answer to "feels like an iPhone":
       the tint changes in 20ms so the tap never reads as laggy, and the
       release rides one spring. --- */
.btn, .lrow, .soc, .covers a, .gcard, .opt, .tier, .step {
  transition: transform var(--d-settle) var(--ease-settle),
              background-color var(--d-touch) linear,
              border-color var(--d-state) var(--ease);
}
.lrow:active, .soc:active, .covers a:active, .opt:active {
  transform: scale(.975);
  transition: transform var(--d-press) var(--ease-out), background-color var(--d-touch) linear;
}
.gcard:active, .tier:active, .step:active { transform: scale(.99); transition: transform var(--d-press) var(--ease-out); }
.btn.primary:active { background: var(--accent-3); }

/* --- Depth: every raised surface is lit from above. This replaces shadow. --- */
@supports (color: color-mix(in srgb, red 50%, blue)) {
.card.card, .tile.tile, .tier.tier, .gcard.gcard, .report.report,
.lrow.lrow, .modal.modal, .kpi.kpi, .fig.fig, .step.step {
  border-top-color: var(--edge-lit);
  border-left-color: var(--edge-side);
  border-right-color: var(--edge-side);
  border-bottom-color: var(--edge-shade);
}
/* Inset surfaces are lit the other way round: shaded at the top. */
.band.band, .panel.panel, .shot.shot, .cells.cells, .stepbar.stepbar, .seg.seg {
  border-top-color: var(--edge-shade);
  border-bottom-color: var(--edge-lit);
}

}
/* Cards whose border IS the emphasis keep it: the lighting model must not
   quietly grey out an accent outline. */
.tile.tile.accent, .tier.tier.pick { border-color: var(--accent); }
.card.card.ok-card { border-color: var(--good); }
.card.card.warn-card { border-color: var(--warn); }

/* --- Glass: saturate is the part that makes a blurred bar read as iOS
       rather than flat grey. --- */
header.nav.nav, .stickybar.stickybar, .top.top {
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header.nav.nav, .stickybar.stickybar, .top.top { background: var(--bg); }
}

/* --- Optical vertical trim: a heading's cap-height sits flush to its box,
       so the gap around it is the gap you actually specified. --- */
@supports (text-box: trim-both cap alphabetic) {
  h1, h2, h3, h4, .sh { text-box: trim-both cap alphabetic; }
}

/* --- Type. One tracking value across a 2x size range is the loudest
       fingerprint of generated CSS; this is an optical ramp. --- */
h1, .hero h1 { letter-spacing: -0.038em; line-height: 1.04; }
h2, .sh, section.block h2, section.block h2.sh, .q h2 { letter-spacing: -0.028em; line-height: 1.10; }
h3 { letter-spacing: -0.018em; line-height: 1.22; }
h4 { letter-spacing: -0.011em; line-height: 1.30; }
.mlabel, .eyebrow, .label { letter-spacing: .085em; }
p, li, .lede, .tag, .small, .muted, .bestfor, .diff { text-wrap: pretty; }

/* --- Monospace figures hold a grid. Tightening them destroys the fixed
       advance width that is the only reason to choose a monospace. --- */
.mnum, .mono, .band b, .kpi .value, .hero-figure, .scoren, .tnum,
.covers .p, .lrow .v, .spec .val, .fan + div .mono { letter-spacing: 0; }

/* --- Treated imagery: one grade and a specular top edge. No filter is ever
       applied to a face, only the grade. --- */
.covers img, .gcard img, .fan img, .id .pic, .avatar img { filter: saturate(1.04) contrast(1.02); }
.covers a, .gcard { position: relative; }
.covers a::after, .gcard::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 1; pointer-events: none; border-radius: var(--r-tile);
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 22%, rgba(0,0,0,.05) 100%);
}
.gcard::after { border-radius: var(--r-tile); }

/* --- Scroll settle. Five element types, not forty, and tied to scroll
       POSITION so it tracks the finger frame for frame instead of firing
       on a threshold. Entirely absent where unsupported. --- */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .steps .step, .tiers .tier, .gwrap .gcard, .incl div, .faq details, .others .card {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 8% entry 78%;
    }
    @keyframes settle { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: none; } }
  }
}

/* --- Page-to-page: the white flash between documents goes away. No router,
       no JavaScript, and older browsers simply navigate as they do today. --- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: pageout 90ms var(--ease) both; }
  ::view-transition-new(root) { animation: pagein var(--d-move) var(--ease-out) both; }
  @keyframes pageout { to { opacity: 0; } }
  @keyframes pagein { from { opacity: 0; transform: translate3d(0, 8px, 0); } }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* --- The quiz push. The question travels; the chrome and the progress bar
       stay nailed in place, which is the whole effect. --- */
html[data-vt="step"]::view-transition-old(root),
html[data-vt="step"]::view-transition-new(root) { animation: none; }
::view-transition-old(qstep) { animation: qout var(--d-exit) var(--ease) both; }
::view-transition-new(qstep) { animation: qin var(--d-move) var(--ease-push) both; }
html[data-nav="back"] ::view-transition-old(qstep) { animation: qoutb var(--d-exit) var(--ease) both; }
html[data-nav="back"] ::view-transition-new(qstep) { animation: qinb var(--d-move) var(--ease-push) both; }
@keyframes qout  { to { opacity: 0; transform: translateX(-26%); } }
@keyframes qin   { from { opacity: 0; transform: translateX(34%); } }
@keyframes qoutb { to { opacity: 0; transform: translateX(26%); } }
@keyframes qinb  { from { opacity: 0; transform: translateX(-34%); } }

/* --- The mark ignites, then draws itself. The one moving thing on the site
       that belongs to Nolan outright. --- */
.wordmark .inkmark, i.inkmark { width: 28px; height: 28px; font-style: normal; border-radius: var(--r-ctl); background: var(--accent); display: block; overflow: hidden; flex: none; }
.wordmark .inkmark svg { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .wordmark .inkmark { animation: ignite 420ms var(--ease-settle) both; }
  .wordmark .inkmark path { stroke-dasharray: var(--len, 96); animation: draw var(--d-draw) var(--ease-smooth) 160ms both; }
  @keyframes ignite { from { transform: scale(.86); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes draw { from { stroke-dashoffset: var(--len, 96); } to { stroke-dashoffset: 0; } }
}

/* --- The readiness arc: a ring travels to the score rather than sitting at it. --- */
.arcwrap { position: relative; width: 104px; height: 104px; flex: none; display: grid; place-items: center; }
.arcwrap svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.arcwrap circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.arcwrap .track { stroke: var(--surface-2); }
.arcwrap .val { stroke: var(--accent); stroke-dasharray: var(--c); stroke-dashoffset: calc(var(--c) - (var(--c) * var(--p))); }
.arcwrap b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 600; color: var(--accent); line-height: 1; letter-spacing: 0; }
@media (prefers-reduced-motion: no-preference) {
  .arcwrap .val { animation: arc 900ms var(--ease-smooth) 160ms both; }
  @keyframes arc { from { stroke-dashoffset: var(--c); } to { stroke-dashoffset: calc(var(--c) - (var(--c) * var(--p))); } }
}

/* --- The cell wave: fifty cells fill as one travelling edge, not fifty
       things blinking on. --- */
@media (prefers-reduced-motion: no-preference) {
  .cells i { transform-origin: bottom; }
  .cells i.on { animation: cell 220ms var(--ease-smooth) both; animation-delay: calc(var(--i, 0) * 9ms); }
  @keyframes cell { from { opacity: .18; transform: scaleY(.35); } to { opacity: 1; transform: none; } }
  .spec .segs i { transform-origin: left; }
  .spec .segs i.on { animation: seg 260ms var(--ease-smooth) both; animation-delay: calc(var(--i, 0) * 45ms); }
  @keyframes seg { from { transform: scaleX(0); opacity: .3; } to { transform: none; opacity: 1; } }
}

/* --- Arrival. The hero assembles rather than appearing all at once. The
       sticky CTA bar is deliberately excluded: it is above the fold on a
       phone, so animating it in would animate the primary call to action
       on every cold tap from a bio link. --- */
@media (prefers-reduced-motion: no-preference) {
  .hero > div > *, .hero .report { animation: lift var(--d-move) var(--ease-out) both; }
  .hero > div > :nth-child(1) { animation-delay: 0ms; }
  .hero > div > :nth-child(2) { animation-delay: 60ms; }
  .hero > div > :nth-child(3) { animation-delay: 120ms; }
  .hero > div > :nth-child(4) { animation-delay: 180ms; }
  .hero > div > :nth-child(5) { animation-delay: 240ms; }
  .hero .report { animation-delay: 140ms; }
  @keyframes lift { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
}

/* The arc wraps the numeral rather than replacing it, so the score keeps its
   own markup, its count-up and whatever a screen reader reads. */
.arcwrap .arcnum.arcnum, .report .score .arcwrap .arcnum, .scorerow .arcwrap .arcnum { font-size: 30px; line-height: 1; letter-spacing: 0; color: var(--accent); }
.report .score .arcwrap + div, .scorerow .arcwrap + div { min-width: 0; }

/* The readiness ring is taller than the numeral it wraps, so reserve its
   height up front: the score must not push the page down when it lands. */
.report .score, .scorerow { min-height: 104px; }
