/* Formal@Home mockup styles. Dark first, light via prefers-color-scheme. */

:root {
  color-scheme: dark;
  --bg: #070a12;
  --bg-2: #0b0f1a;
  --surface: #10131b;            /* effective chart surface (panel over bg) */
  --panel: rgba(20, 25, 38, 0.62);
  --panel-hi: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --text-2: #b8bdcc;
  --muted: #8a90a2;
  --grid: #222838;
  --axis: #363d52;
  --track: rgba(255, 255, 255, 0.06);
  --acc-a: #8b7bff;
  --acc-b: #38d0e6;
  --acc-c: #ff7ac6;
  --grad: linear-gradient(100deg, var(--acc-a), var(--acc-b));
  /* buttons carry white text: darker stops keep >= 4.5:1 across the whole button */
  --btn-grad: linear-gradient(100deg, #5b46e0, #0a7f93);
  --ring: var(--acc-b);
  --shadow: 0 24px 70px -34px rgba(0, 0, 0, 0.85);
  --nav-h: 60px;

  /* categorical slots (dark steps, validated on --surface) */
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
  --s0: #6f7486;                 /* folded "other" */
  --s-human: #c3c7d3;            /* human reviewers: a lighter neutral, distinct from --s0 */
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --crit: #d03b3b;
  --good-text: #3fcf5a;

  /* sequential blue ramp, dark: low recedes to surface */
  --q1: #0d366b; --q2: #184f95; --q3: #1c5cab; --q4: #2a78d6; --q5: #5598e7; --q6: #86b6ef; --q7: #b7d3f6;

  --radius: 20px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  /* prose with maths symbols: Inter's web subset lacks some (≠, ∅), so name fonts that have them */
  --font-math: "Inter", "DejaVu Sans", "Cambria Math", "STIX Two Math", "Segoe UI Symbol", system-ui, sans-serif;
  --warn-ink: var(--warn);       /* warn as a line or small mark; darker in light mode */
  --err-ink: #ff8a7a;            /* error text: >= 7:1 on panels; darker in light mode */
  --field-edge: color-mix(in srgb, var(--text) 42%, transparent);  /* form-field border: >= 3:1 on the card */
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f4f9;
    --bg-2: #e9ebf3;
    --surface: #fcfcfd;
    --panel: rgba(255, 255, 255, 0.78);
    --panel-hi: rgba(255, 255, 255, 0.9);
    --border: rgba(15, 20, 40, 0.09);
    --border-hi: rgba(15, 20, 40, 0.16);
    --text: #0b0d14;
    --text-2: #474b59;
    --muted: #646877;
    --ring: #5b46e0;
    --grid: #e4e5ec;
    --axis: #c4c6d1;
    --track: rgba(15, 20, 40, 0.06);
    --acc-a: #5b46e0;
    --acc-b: #0a9cb3;
    --acc-c: #d4458f;
    --shadow: 0 24px 60px -34px rgba(30, 40, 80, 0.35);
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
    --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
    --s0: #9a9dab;
    --s-human: #4d5162;
    --good-text: #006300;
    --warn-ink: #a86b00;
    --err-ink: #b3261e;
    --field-edge: color-mix(in srgb, var(--text) 50%, transparent);
    --q1: #cde2fb; --q2: #9ec5f4; --q3: #6da7ec; --q4: #3987e5; --q5: #256abf; --q6: #184f95; --q7: #0d366b;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
code, pre { font-family: var(--mono); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.skip { position: fixed; left: -999px; top: 8px; background: var(--bg-2); color: var(--text); border: 1px solid var(--border-hi); box-shadow: var(--shadow); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
section[id], #mathematicians, #agents, #code, #points, #consensus, #disagree, #human-queue, .hq-item { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* ---------- background aurora ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.22; animation: drift 38s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: var(--acc-a); left: -20vmax; top: -20vmax; opacity: 0.16; }
.aurora span:nth-child(2) { background: var(--acc-b); right: -25vmax; top: 30vh; animation-duration: 46s; opacity: 0.14; }
.aurora span:nth-child(3) { background: var(--acc-c); left: 20vw; bottom: -40vmax; animation-duration: 54s; opacity: 0.1; }
@media (prefers-color-scheme: light) { .aurora span { opacity: 0.12; } }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.12); } }
/* Phones: a static wash instead of three animated, heavily blurred blobs. */
@media (max-width: 640px) {
  .aurora span { display: none; }
  .aurora { background:
    radial-gradient(70vmax 50vmax at 0% 0%, color-mix(in srgb, var(--acc-a) 14%, transparent), transparent 70%),
    radial-gradient(60vmax 50vmax at 100% 45%, color-mix(in srgb, var(--acc-b) 10%, transparent), transparent 70%),
    radial-gradient(60vmax 40vmax at 40% 100%, color-mix(in srgb, var(--acc-c) 8%, transparent), transparent 70%); }
}

/* ---------- glass ---------- */
/* Panels are mostly opaque already, so backdrop blur is kept only for the nav
   and the hero tiles (it re-blurs on every aurora frame otherwise). */
.glass {
  background: linear-gradient(180deg, var(--panel-hi), transparent 60%), var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow);
}
.hero .glass { backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); }
.panel { padding: 24px; min-width: 0; }
@media (max-width: 640px) { .panel { padding: 18px 16px; } }

/* ---------- tags ---------- */
.demo-tag, .real-tag, .est-tag, .draft-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 10.5px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; vertical-align: 2px; white-space: nowrap;
}
.demo-tag { color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 60%, transparent);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--warn) 18%, transparent) 0 6px, transparent 6px 12px); }
.demo-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.real-tag { color: var(--text); border: 1px solid color-mix(in srgb, var(--good) 60%, transparent); background: color-mix(in srgb, var(--good) 12%, transparent); }
.real-tag::before { content: "✓"; color: var(--good-text); font-size: 11px; }
.est-tag { color: var(--text-2); border: 1px solid var(--border-hi); }
.est-tag::before { content: "≈"; font-size: 12px; }
.draft-tag { color: var(--text-2); border: 1px solid var(--border-hi); }

a.src { color: var(--text-2); font-size: 0.86em; text-decoration: none; border-bottom: 1px solid var(--border-hi); white-space: nowrap; }
a.src::after { content: " ↗"; font-size: 0.9em; }
a.src:hover { color: var(--text); border-color: var(--acc-b); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid var(--border-hi);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--btn-grad); color: #fff; border-color: transparent; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--acc-a) 70%, transparent); }
.btn.primary:hover { box-shadow: 0 14px 40px -10px color-mix(in srgb, var(--acc-b) 70%, transparent); }
.btn.ghost { background: var(--panel); backdrop-filter: blur(10px); }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  background: color-mix(in srgb, var(--bg) 62%, transparent); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.nav-cta .short { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand svg { width: 28px; height: 28px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0 auto 0 8px; padding: 0; }
.nav-links a { display: block; text-decoration: none; color: var(--text-2); font-size: 14px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--track); }
.mock-pill { font: 600 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; border: 1px dashed var(--border-hi); color: var(--text-2); white-space: nowrap; }
/* Narrower screens: the section links become a scrollable strip under the bar. */
@media (max-width: 1240px) {
  :root { --nav-h: 102px; }
  .nav-inner { flex-wrap: wrap; height: auto; row-gap: 0; padding-top: 10px; }
  .mock-pill { margin-left: auto; }
  .nav-links { order: 3; flex: 0 0 calc(100% + 48px); margin: 6px -24px 0; padding: 0 20px 8px; overflow-x: auto; scrollbar-width: none;
    scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 28px), transparent); }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links li { scroll-snap-align: start; }
  .nav-links a { font-size: 13.5px; padding: 6px 10px; }
}
@media (max-width: 640px) { .nav-links { flex-basis: calc(100% + 32px); margin: 4px -16px 0; padding: 0 12px 8px; } }
@media (max-width: 420px) { .nav-cta .long { display: none; } .nav-cta .short { display: inline; } .nav-inner { gap: 10px; } .brand { font-size: 17px; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100vh, 980px); display: flex; align-items: center; padding: 72px 0 96px; overflow: hidden; }
#hero-graph { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
/* No solid --bg stop: the aurora runs on continuously behind the hero's lower edge. */
.hero-scrim { position: absolute; inset: 0; background:
  radial-gradient(ellipse 70% 60% at 30% 45%, color-mix(in srgb, var(--bg) 82%, transparent), transparent 75%); pointer-events: none; }
.hero-inner { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); backdrop-filter: blur(10px); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(42px, 11vw, 132px); font-weight: 800; letter-spacing: -0.055em; margin: 22px 0 14px;
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--text) 78%, var(--acc-a))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .at { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .02em; }
.pitch { font-size: clamp(17px, 2.1vw, 21px); color: var(--text-2); max-width: 680px; }
.pitch em { color: var(--text); font-style: normal; font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 30px 0 44px; }
.text-link { color: var(--text-2); font-size: 14.5px; text-underline-offset: 3px; text-decoration-color: var(--border-hi); }
.text-link:hover { color: var(--text); }

.counters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.counter { padding: 16px 16px 14px; border-radius: 16px; position: relative; overflow: hidden; }
.counter::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); opacity: .7; }
.counter .v { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.counter .l { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.counter .bump { position: absolute; right: 12px; top: 12px; font-size: 11px; color: var(--good-text); font-weight: 600; opacity: 0; transition: opacity .3s, transform .6s; }
.counter .bump.on { opacity: 1; transform: translateY(-4px); }
@media (max-width: 1020px) { .counters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 24px; height: 38px; border: 2px solid var(--border-hi); border-radius: 14px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--text-2); animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- sections ---------- */
.section { padding: 96px 0; position: relative; }
@media (max-width: 640px) { .section { padding: 64px 0; } }
/* A soft accent glow on alternate sections, so the hero's colour carries down the page
   (light mode is otherwise flat grey below the fold). */
.section:nth-of-type(even)::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  background: radial-gradient(60% 55% at 85% 20%, color-mix(in srgb, var(--acc-a) 7%, transparent), transparent 70%),
              radial-gradient(50% 50% at 10% 85%, color-mix(in srgb, var(--acc-b) 6%, transparent), transparent 70%); }
@media (prefers-color-scheme: light) {
  .section:nth-of-type(even)::before { background:
    linear-gradient(180deg, transparent, color-mix(in srgb, #ffffff 55%, transparent) 20%, color-mix(in srgb, #ffffff 55%, transparent) 80%, transparent),
    radial-gradient(60% 55% at 85% 20%, color-mix(in srgb, var(--acc-a) 9%, transparent), transparent 70%),
    radial-gradient(50% 50% at 10% 85%, color-mix(in srgb, var(--acc-b) 8%, transparent), transparent 70%); }
}
.section-head { max-width: 800px; margin-bottom: 36px; }
.kicker { font: 600 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.section h2 { font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; margin: 14px 0 16px; letter-spacing: -0.035em; }
.lead { font-size: 18px; color: var(--text-2); }
.panel h3, .chart-card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.chart-sub { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.caption { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- gap ---------- */
.gap-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
@media (max-width: 980px) { .gap-hero { grid-template-columns: minmax(0, 1fr); } }
.dot-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-fig { font-size: clamp(56px, 7vw, 84px); font-weight: 800; letter-spacing: -0.05em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fig-label { font-size: 16px; font-weight: 600; margin-top: 8px; max-width: 420px; }
.fig-sub { color: var(--text-2); font-size: 14px; margin-top: 6px; }
.fig-why { color: var(--muted); font-size: 12.5px; margin-top: 4px; max-width: 460px; }
.section h2 .est-tag { vertical-align: 0.5em; }
.dot-legend, .dot-key { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.dot-key { flex-direction: row; flex-wrap: wrap; gap: 18px; margin: 12px 0 6px; }
.k { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.k-lit { background: var(--acc-b); box-shadow: 0 0 8px var(--acc-b); }
.k-ring { border: 2px solid var(--acc-a); }
.k-off { background: var(--axis); }
.k-fill { background: var(--s1); }
.k-hollow { border: 2px solid var(--s1); }
.k-todo { background: var(--track); border: 1.5px solid var(--muted); }
#dot-field { width: 100%; height: 300px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles-1 { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 340px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tile { padding: 16px; border-radius: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .tl { font-size: 13px; color: var(--text-2); }
.tile .tv { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.2; }
@media (max-width: 480px) { .tile { padding: 13px 12px; } .tile .tv { font-size: 22px; } .tile .tl { font-size: 12.5px; } }
.tile .ts { font-size: 12.5px; color: var(--muted); }
.meter { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--s1) 22%, transparent); overflow: hidden; margin: 6px 0 4px; }
.meter i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--s1); transition: width 1.4s cubic-bezier(.2,.7,.2,1); }
.tile .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }

/* chart card */
.chart-card { margin-top: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--track); border: 1px solid var(--border); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 6px rgba(0,0,0,.25), inset 0 0 0 1px var(--border-hi); }
@media (max-width: 640px) {
  .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; flex-wrap: nowrap; }
  .seg button { padding: 7px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.chart-foot { margin-top: 8px; }

.hbars { display: flex; flex-direction: column; gap: 4px; position: relative; }
.hbar { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 14px; align-items: center; padding: 5px 6px; border-radius: 8px; cursor: default; transition: background .2s, transform .6s cubic-bezier(.2,.7,.2,1); }
.hbar:hover, .hbar:focus-visible { background: var(--track); }
.hbar .hl { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .ht { position: relative; height: 18px; }
.hbar .hb { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--s1); border-radius: 0 4px 4px 0; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.hbar .hb.na { background: transparent; }
.hbar .hw { position: absolute; top: 50%; height: 1.5px; background: var(--text-2); opacity: 0; transition: opacity .6s .6s, left 1s, width 1s; }
.hbar .hw::before, .hbar .hw::after { content: ""; position: absolute; top: -4px; width: 1.5px; height: 9px; background: var(--text-2); }
.hbar .hw::before { left: 0; } .hbar .hw::after { right: 0; }
.hbar.show .hw { opacity: .85; }
.hbar .hv { position: absolute; left: 0; top: 50%; transform: translate(8px, -50%); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; transition: left 1s cubic-bezier(.2,.7,.2,1); }
.hbar .hv.na { color: var(--muted); font-weight: 500; }
.hbars.compact .hbar { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); padding: 3px 6px; }
.hbars.compact .hbar .hl { font-size: 13px; }
.hbars.compact .hbar .ht { height: 14px; }
.hbars .axis-row { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 14px; padding: 0 6px; font-size: 11.5px; color: var(--muted); }
.hbars .axis-row .ticks { position: relative; height: 16px; border-top: 1px solid var(--axis); }
.hbars .axis-row .ticks span { position: absolute; top: 2px; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .hbar, .hbars .axis-row, .hbars.compact .hbar, .hbars.compact .axis-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hbar .hl { white-space: normal; font-size: 13px; }
  .hbar .rng, .hbar .hw { display: none; }
  .hbars .axis-row > span:first-child { display: none; }
}
.table-view summary { cursor: pointer; color: var(--text-2); font-size: 13px; margin-top: 12px; }
.table-view-wrap { overflow-x: auto; margin-top: 10px; }
.table-view-wrap table { border-collapse: collapse; width: 100%; font-size: 13px; }
.table-view-wrap th, .table-view-wrap td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.table-view-wrap td.num, .table-view-wrap th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* columns */
.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; height: 240px; align-items: end; margin: 22px 0 0; border-bottom: 1px solid var(--axis); padding: 0 8px; position: relative; }
.col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: default; }
.col .cb { width: min(24px, 60%); height: 0; background: var(--s1); border-radius: 4px 4px 0 0; transition: height 1.2s cubic-bezier(.2,.7,.2,1); }
.col .cv { font-size: 13.5px; font-weight: 700; margin-bottom: 6px; opacity: 0; transition: opacity .5s 1s; }
.cols.in .col .cv { opacity: 1; }
.col-x { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 6px 8px 0; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- live ---------- */
.live-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 980px) { .live-grid { grid-template-columns: minmax(0, 1fr); } }
.live-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.feed-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.live-badge { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.feed { list-style: none; margin: 0; padding: 0; height: 520px; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent); mask-image: linear-gradient(180deg, #000 80%, transparent); }
/* Each row is a one-row grid whose track grows from 0fr to 1fr, so the rows below
   slide down smoothly instead of jumping. */
.ev-row { display: grid; grid-template-rows: 1fr; }
.ev-row.new { animation: evGrow .55s cubic-bezier(.2,.7,.2,1); }
.ev-row.new .ev { animation: evIn .8s cubic-bezier(.2,.7,.2,1); }
@keyframes evGrow { from { grid-template-rows: 0fr; } to { grid-template-rows: 1fr; } }
.ev-clip { min-height: 0; overflow: hidden; }
.ev { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 8px; border-bottom: 1px solid var(--grid); }
@keyframes evIn { from { opacity: 0; background: color-mix(in srgb, var(--acc-b) 10%, transparent); } to { opacity: 1; background: transparent; } }
.ev .ei { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--track); border: 1px solid var(--border); }
.ev .ei svg { width: 18px; height: 18px; stroke: var(--text-2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ev.kind-pass .ei svg, .ev.kind-publish .ei svg { stroke: var(--good-text); }
.ev.kind-reject .ei svg, .ev.kind-challenge .ei svg, .ev.kind-flag .ei svg { stroke: var(--serious); }
.ev.kind-equiv .ei svg { stroke: var(--good-text); }
.ev.kind-oneway .ei svg { stroke: var(--warn-ink); }
.ev.kind-human .ei svg, .ev.kind-sealed .ei svg { stroke: var(--acc-a); }
.ev.kind-implication .ei svg { stroke: var(--good-text); }
.ev.kind-escalate .ei svg { stroke: var(--acc-b); }
.ev .et { font-size: 14px; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.ev .et b { color: var(--text); font-weight: 600; }
.ev .et .mono { font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.ev .em { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ev .ew { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.fam { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text); padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--track); border: 1px solid var(--border); white-space: nowrap; }
.fam i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--s0)); }

.line-chart { position: relative; height: 200px; margin-top: 14px; }
.line-chart svg { width: 100%; height: 100%; overflow: visible; }
.line-chart .grid line { stroke: var(--grid); stroke-width: 1; }
.line-chart .grid text, .line-chart .xl { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.line-chart .area { fill: color-mix(in srgb, var(--s1) 14%, transparent); }
.line-chart .ln { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .end { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }
.line-chart .xh { stroke: var(--text-2); stroke-width: 1; opacity: 0; }
.line-chart .xd { fill: var(--s1); stroke: var(--surface); stroke-width: 2; opacity: 0; }
.line-chart.hover .xh, .line-chart.hover .xd { opacity: 1; }
.line-chart .endl { fill: var(--text); font-size: 12px; font-weight: 700; font-family: var(--font); }

/* ---------- how ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; position: relative; }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { padding: 22px; position: relative; overflow: hidden; transition: transform .3s, border-color .3s; min-width: 0; }
.step:hover { transform: translateY(-3px); border-color: var(--border-hi); }
.step::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad); opacity: 0; transition: opacity .3s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.step:hover::before, .step.lit::before { opacity: .9; }
.step-n { position: absolute; right: 18px; top: 12px; font: 800 44px/1 var(--font); color: var(--track); letter-spacing: -0.05em; }
.step-ic { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--track); border: 1px solid var(--border); fill: none; stroke: var(--acc-b); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text-2); }
.step p em { color: var(--text); font-style: normal; font-weight: 600; }
.step p.why { font-size: 13px; color: var(--muted); margin-top: 8px; }
.step p.why b { color: var(--text-2); font-weight: 600; }
.feed-head .btn.is-paused { background: var(--surface); border-color: var(--ring); }
.feed-panel.paused .pulse-dot { animation: none; background: var(--muted); }
.pz { display: inline-block; width: 8px; height: 10px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.btn.is-paused .pz { border: 0; width: 0; height: 0; border-left: 9px solid currentColor; border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; }
.step > code { display: inline-block; margin-top: 12px; font-size: 12px; padding: 5px 9px; border-radius: 8px; background: var(--track); border: 1px solid var(--border); color: var(--text); max-width: 100%; overflow-wrap: anywhere; }
code.inline { font-size: .86em; padding: 1px 5px; border-radius: 5px; background: var(--track); border: 1px solid var(--border); white-space: nowrap; }
.how-grid { margin-top: 20px; }

.split-svg { width: 100%; height: auto; margin: 14px 0 6px; }
.split-h { max-width: 600px; margin-left: auto; margin-right: auto; }
.split-v { display: none; max-width: 400px; margin-left: auto; margin-right: auto; }
.split-v text.tag { font-size: 11.5px; }
@media (max-width: 640px) { .split-h { display: none; } .split-v { display: block; } }
.split-svg .flow path { fill: none; stroke: url(#gA); stroke-width: 2; opacity: .55; }
.split-svg .pulses circle { fill: var(--acc-b); filter: drop-shadow(0 0 4px var(--acc-b)); }
.split-svg .box rect { fill: var(--track); stroke: var(--border-hi); }
.split-svg .rev rect { stroke: color-mix(in srgb, var(--acc-a) 60%, transparent); }
.split-svg .kern rect { stroke: color-mix(in srgb, var(--good) 70%, transparent); }
.split-svg text { text-anchor: middle; fill: var(--text); font-family: var(--font); font-size: 14px; }
.split-svg text.mono { font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
.split-svg text.small { fill: var(--text-2); font-size: 12px; }
.split-svg text.b { font-weight: 600; font-size: 13.5px; }
.split-svg text.tag { fill: var(--muted); font-size: 10.5px; letter-spacing: .12em; font-weight: 600; }
/* consensus panel */
.cons-panel { margin-top: 20px; }
.cons-head { max-width: 760px; }
.cons-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; margin-top: 8px; align-items: start; }
@media (max-width: 1020px) { .cons-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.cons-svg { width: 100%; height: auto; margin: 14px 0 6px; overflow: visible; }
.cons-h { max-width: 680px; margin-left: auto; margin-right: auto; }
.cons-v { display: none; max-width: 400px; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .cons-h { display: none; } .cons-v { display: block; } }
.cons-svg .flow path { fill: none; stroke: url(#gC); stroke-width: 2; opacity: .55; }
.cons-v .flow path { stroke: url(#gCv); }
.cons-svg .pulses circle { fill: var(--acc-b); filter: drop-shadow(0 0 4px var(--acc-b)); }
.cons-svg .box rect, .cons-svg .out rect { fill: var(--track); stroke: var(--border-hi); }
.cons-svg .mid rect { stroke: color-mix(in srgb, var(--acc-b) 65%, transparent); stroke-width: 1.5; }
.cons-svg .mid .sep, .cons-svg .blind path { fill: none; stroke: var(--border-hi); }
.cons-svg .blind path { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.cons-svg text { text-anchor: middle; fill: var(--text); font-family: var(--font); font-size: 14px; }
.cons-svg text.mono { font-family: var(--mono); font-weight: 600; font-size: 14px; }
.cons-svg text.iff { font-family: var(--mono); font-weight: 600; font-size: 22px; }
.cons-svg text.small { fill: var(--text-2); font-size: 12px; }
.cons-svg text.b { font-weight: 700; font-size: 15px; }
.cons-svg text.tag { fill: var(--muted); font-size: 10.5px; letter-spacing: .12em; font-weight: 600; }
.cons-svg .o-good rect { stroke: color-mix(in srgb, var(--good) 75%, transparent); }
.cons-svg .o-warn rect { stroke: color-mix(in srgb, var(--warn-ink) 75%, transparent); }
.cons-svg .o-bad rect { stroke: color-mix(in srgb, var(--serious) 80%, transparent); }
.cons-svg .out rect.hl { stroke: none; opacity: 0; animation: outGlow 9s infinite; }
.cons-svg .o-good rect.hl { fill: color-mix(in srgb, var(--good) 22%, transparent); }
.cons-svg .o-warn rect.hl { fill: color-mix(in srgb, var(--warn) 22%, transparent); animation-delay: 3s; }
.cons-svg .o-bad rect.hl { fill: color-mix(in srgb, var(--serious) 22%, transparent); animation-delay: 6s; }
@keyframes outGlow { 0%, 25% { opacity: 0; } 29%, 36% { opacity: 1; } 44%, 100% { opacity: 0; } }
.outcomes { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.outcomes li { padding-left: 14px; border-left: 3px solid var(--c); }
.outcomes b { color: var(--text); }
.outcomes .o-good { --c: var(--good); } .outcomes .o-warn { --c: var(--warn-ink); } .outcomes .o-bad { --c: var(--serious); }
.cons-code { min-width: 0; padding-top: 14px; }
.cons-code-h { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.lean-ex { margin: 0; padding: 14px 16px; border-radius: 12px; font-size: 12.5px; line-height: 1.6; background: color-mix(in srgb, var(--bg) 45%, transparent); border: 1px solid var(--border); overflow-x: auto; color: var(--text); white-space: pre; }
@media (max-width: 480px) { .lean-ex { font-size: 11.5px; padding: 12px; } }
.lean-ex .c { color: var(--muted); font-style: italic; }
.lean-ex .kw { color: color-mix(in srgb, var(--acc-a) 70%, var(--text)); font-weight: 600; }
.cons-caveats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
@media (max-width: 760px) { .cons-caveats { grid-template-columns: minmax(0, 1fr); } }
.caveat { padding: 14px 16px; border-radius: 14px; background: var(--track); border: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.caveat b { color: var(--text); display: block; margin-bottom: 2px; }
/* entailment graph panel: what happens when two versions disagree */
.eg-panel { margin-top: 20px; }
.eg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; margin-top: 8px; align-items: start; }
@media (max-width: 1020px) { .eg-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.eg-fig, .eg-text { min-width: 0; }
.eg-text { padding-top: 14px; }
.eg-text .outcomes { margin: 0 0 16px; }
.outcomes .o-acc { --c: var(--acc-b); }
.eg-svg { width: 100%; max-width: 420px; height: auto; margin: 14px auto 6px; overflow: visible; }
.eg-svg text { text-anchor: middle; fill: var(--text); font-family: var(--font); font-size: 14px; }
.eg-svg text.mono { font-family: var(--mono); font-weight: 600; font-size: 14px; }
.eg-svg text.small { fill: var(--text-2); font-size: 12.5px; font-family: var(--font-math); }
.eg-svg text.b { font-weight: 700; font-size: 15px; }
.eg-svg text.tag { fill: var(--muted); font-size: 10.5px; letter-spacing: .12em; font-weight: 600; text-anchor: start; }
.eg-svg .axis path { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.eg-svg .node rect { fill: var(--surface); stroke: var(--border-hi); }
.eg-svg .node.merged rect { stroke: color-mix(in srgb, var(--acc-b) 70%, transparent); stroke-width: 1.5; }
.eg-svg .e, .eg-svg .ah { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eg-svg .e-ok { stroke: var(--good); }
.eg-svg .e-open { stroke: var(--warn-ink); }
.eg-svg .pill rect { fill: var(--surface); stroke-width: 1.5; }
.eg-svg .p-ok rect { stroke: var(--good); }
.eg-svg .p-open rect { stroke: var(--warn-ink); }
.eg-svg .pill text { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.eg-svg .gap .band { fill: color-mix(in srgb, var(--warn) 8%, transparent); stroke: color-mix(in srgb, var(--warn-ink) 70%, transparent); stroke-width: 1.5; stroke-dasharray: 5 5; }
.eg-svg .gap .glow { fill: color-mix(in srgb, var(--warn) 16%, transparent); opacity: 0; animation: egGlow 8s infinite; }
@keyframes egGlow { 0%, 44% { opacity: 0; } 50%, 86% { opacity: 1; } 100% { opacity: 0; } }
.eg-svg .pulses circle { fill: var(--acc-b); filter: drop-shadow(0 0 4px var(--acc-b)); }
.eg-svg .pulses circle.wp { fill: var(--warn); filter: drop-shadow(0 0 4px var(--warn)); }
.eg-key { justify-content: center; gap: 6px 18px; margin: 4px 0 0; font-size: 12.5px; }
.eg-cite { margin-top: 16px; }
/* Keep the figure beside the longer text column on wide screens. */
@media (min-width: 1021px) {
  .eg-fig { position: sticky; top: calc(var(--nav-h) + 16px); }
  .eg-panel .cons-caveats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* At phone width the SVG scales down to about 0.8, so raise its small labels. */
@media (max-width: 520px) {
  .eg-svg text.small { font-size: 15px; }
  .eg-svg text.tag { font-size: 13px; }
  .eg-svg .pill text { font-size: 14px; }
}

.checks { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.checks b { color: var(--text); }

.code-panel { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.code-bar { display: flex; align-items: flex-end; gap: 6px; padding: 10px 10px 0; border-bottom: 1px solid var(--border); }
.code-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
.code-tabs button { border: 0; background: transparent; padding: 9px 13px; font: 600 13px var(--mono); color: var(--muted); cursor: pointer; border-radius: 10px 10px 0 0; white-space: nowrap; position: relative; }
.code-tabs button[aria-selected="true"] { color: var(--text); background: var(--track); }
.code-tabs .short { display: none; }
@media (max-width: 640px) { .code-tabs .long { display: none; } .code-tabs .short { display: inline; } .code-tabs button { padding: 9px 9px; font-size: 12.5px; } }
/* Narrower than this, the last tab no longer fits: fade the edge so it reads as "scroll for more". */
@media (max-width: 379px) { .code-tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); padding-right: 16px; } }
.code-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--grad); border-radius: 2px; }
.code-bar .copy { flex: none; margin-bottom: 6px; border: 1px solid var(--border-hi); background: transparent; border-radius: 999px; padding: 5px 12px; font: 600 12.5px var(--font); color: var(--text-2); cursor: pointer; }
.code-bar .copy:hover { color: var(--text); }
/* Prose (AGENTS.md) flows with pre-wrap; code keeps its lines and scrolls sideways.
   The bottom fade shows there is more; extra bottom padding lets the last line clear it. */
.code { margin: 0; padding: 18px 20px 56px; font-size: 12.5px; line-height: 1.65; overflow: auto; white-space: pre; max-height: 520px; flex: 1; min-height: 360px; color: var(--text); background: color-mix(in srgb, var(--bg) 45%, transparent);
  -webkit-mask-image: linear-gradient(#000 85%, transparent); mask-image: linear-gradient(#000 85%, transparent); }
.code[data-lang="md"] { white-space: pre-wrap; overflow-wrap: break-word; }
/* Side by side with the checks panel: the code pane fills the row height instead of setting it. */
@media (min-width: 901px) { .how-grid .code-panel .code { contain: size; max-height: none; } }
.quick { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.7; background: color-mix(in srgb, var(--bg) 45%, transparent); border: 1px solid var(--border); overflow-x: auto; color: var(--text); }
.quick .c { color: var(--muted); }
.code .c { color: var(--muted); font-style: italic; }
.code .s { color: color-mix(in srgb, var(--acc-b) 80%, var(--text)); }
.code .kw { color: color-mix(in srgb, var(--acc-a) 70%, var(--text)); font-weight: 600; }
.code .h { color: var(--text); font-weight: 700; }
.code-panel .note { padding: 0 20px 16px; }

.points { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.points td { padding: 8px 4px; border-bottom: 1px solid var(--grid); color: var(--text-2); }
.points td:last-child { text-align: right; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.points td.pos::before { content: "▲ "; font-size: 9px; color: var(--good-text); }
.points td.neg::before { content: "▼ "; font-size: 9px; color: var(--crit); }
.gift-panel p { color: var(--text-2); font-size: 15px; margin-top: 10px; }
.gift-panel p strong { color: var(--text); }
/* take part */
.part h3 { font-size: 19px; }
.part-list { margin: 14px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); font-size: 15px; }
.part-list b, .part-get b { color: var(--text); }
.part-get { margin-top: 14px; color: var(--text-2); font-size: 15px; }
.part-cta { margin-top: 16px; }
.part-dl { margin: 14px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 16px; font-size: 14.5px; }
.part-dl dt { font-weight: 600; color: var(--text); }
.part-dl dd { margin: 0; color: var(--text-2); }
@media (max-width: 560px) { .part-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .part-dl dd { margin-bottom: 10px; } }
.gift-ic svg { width: 54px; height: 54px; fill: none; stroke: var(--acc-c); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 12px; filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--acc-c) 50%, transparent)); }

/* ---------- matrix ---------- */
.matrix-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 980px) { .matrix-grid { grid-template-columns: minmax(0, 1fr); } }
.matrix-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.heatmap { display: grid; grid-template-columns: max-content repeat(10, minmax(0, 1fr)); gap: 2px; align-items: stretch; }
.hm-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: stretch; }
.hm-cl { font-size: 11.5px; color: var(--text-2); writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; align-self: end; padding: 4px 0; white-space: nowrap; }
.hm-rl { font-size: 12.5px; color: var(--text-2); padding-right: 10px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hm-rl i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.hm-c { height: 44px; border-radius: 4px; background: var(--q1); display: grid; place-items: center; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: default;
  opacity: 0; transform: scale(.6); transition: opacity .5s, transform .5s cubic-bezier(.2,.7,.2,1), background .5s, outline-color .2s; outline: 2px solid transparent; outline-offset: -2px; min-width: 0; }
.heatmap.in .hm-c { opacity: 1; transform: none; }
.hm-c:hover, .hm-c:focus-visible { outline-color: var(--text); }
.hm-c.x { background: repeating-linear-gradient(135deg, var(--track) 0 4px, transparent 4px 8px); border: 1px solid var(--border); }
.hm-corner { font-size: 10.5px; color: var(--muted); align-self: end; padding: 0 10px 6px 0; line-height: 1.2; }
@media (max-width: 560px) { .hm-c { font-size: 0; height: auto; aspect-ratio: 1; } .hm-rl { font-size: 11px; padding-right: 6px; } .hm-cl { font-size: 10.5px; } }
.hm-legend { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.hm-legend .ramp { display: flex; gap: 2px; }
.hm-legend .ramp i { width: 26px; height: 10px; border-radius: 2px; }
.hm-legend .xk { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.hm-legend .xk i { width: 14px; height: 14px; border-radius: 3px; background: repeating-linear-gradient(135deg, var(--track) 0 3px, transparent 3px 6px); border: 1px solid var(--border-hi); }
.mini-steps { margin: 12px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14.5px; display: flex; flex-direction: column; gap: 8px; }
.mini-steps b { color: var(--text); }

/* human review queue */
.hq-panel { margin-top: 20px; }
.hq-panel .chart-head { margin-bottom: 12px; }
.hq-key { margin: 4px 0 0; gap: 8px 16px; font-size: 12.5px; }
.hq { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hq-item { border: 1px solid var(--border); border-radius: 14px; background: var(--track); }
.hq-item[open] { border-color: var(--border-hi); }
.hq-item summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content 14px; gap: 12px; align-items: center; padding: 11px 14px; font-size: 14px; }
.hq-item summary::-webkit-details-marker { display: none; }
.hq-item summary::after { content: "+"; content: "+" / ""; color: var(--muted); font-size: 18px; line-height: 1; }
.hq-item[open] summary::after { content: "−"; content: "−" / ""; }
.hq-reason { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.hq-reason::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.hq-what { color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.hq-what .mono { font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.hq-age { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .hq-item summary { grid-template-columns: minmax(0, 1fr) 14px; gap: 4px 10px; }
  .hq-item summary .hq-reason { grid-column: 1; }
  .hq-item summary::after { grid-column: 2; grid-row: 1; }
  .hq-what, .hq-age { grid-column: 1; }
}
.hq-body { padding: 0 14px 14px; }
.hq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; }
/* Two columns: the two Lean versions share the first row, so the reviewer can compare them. */
@media (max-width: 1020px) {
  .hq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "a b" "paper goal"; }
  .hq-grid > .hq-paper { grid-area: paper; } .hq-grid > .hq-goal { grid-area: goal; }
  .hq-grid > .hq-code:nth-child(2) { grid-area: a; } .hq-grid > .hq-code:nth-child(3) { grid-area: b; }
}
@media (max-width: 560px) { .hq-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "paper" "a" "b" "goal"; } }
.hq-col { min-width: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 40%, transparent); border: 1px solid var(--border); }
.hq-h { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hq-h .fam { text-transform: none; letter-spacing: 0; }
.hq-txt { font-size: 13.5px; color: var(--text-2); }
.hq-pre { font: 12px/1.55 var(--mono); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.hq-goal .hq-pre { font-family: var(--font-math); font-size: 13px; color: var(--text-2); }
.hq-goal .hq-pre::first-line { font-family: var(--mono); color: var(--text); font-weight: 600; }
.hq-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.hq-note { font-size: 12.5px; color: var(--muted); }
.hq-sep { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); border-left: 3px solid var(--acc-b); background: color-mix(in srgb, var(--acc-b) 7%, transparent); }
.hq-sep-h { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hq-sep-c { font: 600 13px/1.4 var(--mono); color: var(--text); }
.hq-sep-q { flex-basis: 100%; font-size: 14px; color: var(--text); font-weight: 600; }

/* ---------- leaderboard ---------- */
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fam-filter { font-size: 13px; color: var(--text-2); display: inline-flex; gap: 8px; align-items: center; }
.fam-filter select { font: inherit; color: var(--text); background: var(--track); border: 1px solid var(--border-hi); border-radius: 10px; padding: 6px 10px; }
.fam-filter select option { background: var(--bg-2); }
.table-wrap { overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; font-size: 14px; }
.board th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--axis); white-space: nowrap; user-select: none; }
.board th button { all: unset; cursor: pointer; border-radius: 4px; }
.board th button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.board th button:hover { color: var(--text); }
.board th[aria-sort="descending"] { color: var(--text); }
.board th[aria-sort="descending"] button::after { content: " ↓"; }
.board td { padding: 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.board .num { text-align: right; font-variant-numeric: tabular-nums; }
.board td.pts { font-weight: 700; font-size: 15px; }
.board .rk { width: 36px; color: var(--muted); font-variant-numeric: tabular-nums; }
.board tbody tr { transition: background .2s; animation: rowIn .5s both; }
.board tbody tr:hover { background: var(--track); }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } }
.medal { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 800; color: #111; }
.m1 { background: linear-gradient(135deg, #ffe58a, #e0a82e); } .m2 { background: linear-gradient(135deg, #f1f3f7, #a9afbd); } .m3 { background: linear-gradient(135deg, #f7c79a, #b9733c); }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; flex: none;
  background-image: linear-gradient(135deg, rgba(255,255,255,.12), transparent 60%); }
.who .h { font-weight: 600; }
.who .m { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.spark { width: 90px; height: 24px; }
.spark path { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; }
.spark circle { fill: var(--s1); }
@media (max-width: 860px) { .hide-m { display: none; } }
@media (max-width: 560px) { .hide-s { display: none; } .board td, .board th { padding: 8px 6px; } .who .m { display: none; } }
/* The column being sorted on always shows, even where it is normally hidden. */
.board[data-sort="statements"] .col-statements, .board[data-sort="proofs"] .col-proofs, .board[data-sort="equivs"] .col-equivs,
.board[data-sort="reviews"] .col-reviews, .board[data-sort="challenges"] .col-challenges,
.board[data-sort="gifts"] .col-gifts { display: table-cell; }

/* ---------- queue ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips button { border: 1px solid var(--border-hi); background: var(--panel); padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .2s; display: inline-flex; gap: 6px; align-items: center; }
.chips button[aria-pressed="true"] { color: var(--text); background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.chips button .n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.queue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .queue { grid-template-columns: minmax(0, 1fr); } }
.paper { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; animation: rowIn .5s both; min-width: 0; }
.paper .ph { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.paper .pid { font: 600 12.5px var(--mono); color: var(--text-2); }
.paper .pid a { text-decoration: none; }
.paper .pid a:hover { color: var(--text); }
.paper h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.paper .pa { font-size: 13.5px; color: var(--muted); }
.paper .pf { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: auto; padding-top: 2px; }
.paper .pp { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
.paper .pp .pt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paper .pf .claim { flex: none; }
@media (max-width: 560px) { .paper .pf { flex-direction: column; align-items: stretch; gap: 10px; } }
.paper h3 sub, .paper h3 sup { font-size: .7em; line-height: 0; }
.thin { display: flex; height: 6px; gap: 2px; margin-top: 5px; }
.thin i { display: block; height: 100%; border-radius: 999px; }
.thin .t-p { background: var(--s3); } .thin .t-s { background: var(--s1); } .thin .t-o { background: var(--track); flex: 1; }
.area-chip { font-size: 11.5px; font-family: var(--mono); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-2); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--track); border: 1px solid var(--border); white-space: nowrap; }
.status svg { width: 13px; height: 13px; fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.paper .claim { border: 1px solid var(--border-hi); background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; }
.paper .claim:hover:not(:disabled) { background: var(--btn-grad); color: #fff; border-color: transparent; }
.paper .claim:disabled { opacity: .45; cursor: not-allowed; }
.paper .pn { font-size: 12.5px; color: var(--text-2); }

/* ---------- shoulders ---------- */
.tl-wrap { position: relative; margin-bottom: 20px; }
.timeline { display: flex; gap: 14px; overflow-x: auto; padding: 24px 4px 18px; scroll-snap-type: x proximity; scroll-padding: 0 4px; position: relative; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.timeline.at-end { -webkit-mask-image: none; mask-image: none; }
.tl-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.tl-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-hi); background: var(--panel); color: var(--text); cursor: pointer; font-size: 16px; }
.tl-btn:hover:not(:disabled) { border-color: var(--ring); }
.tl-btn:disabled { opacity: .35; cursor: default; }
.timeline::before { content: ""; position: absolute; left: 0; top: 33px; height: 2px; width: var(--tl-w, 100%); background: var(--grad); opacity: .5; transform-origin: left; transform: scaleX(0); transition: transform 2s cubic-bezier(.2,.7,.2,1); }
.timeline.in::before { transform: scaleX(1); }
.tl-item { flex: 0 0 220px; scroll-snap-align: start; position: relative; padding-top: 26px; text-decoration: none; }
.tl-item::before { content: ""; position: absolute; left: 14px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--acc-a); }
.tl-item.ai::before { border-color: var(--acc-b); background: var(--acc-b); box-shadow: 0 0 10px var(--acc-b); }
.tl-card { padding: 14px; border-radius: 14px; height: 100%; transition: transform .25s, border-color .25s; }
.tl-item:hover .tl-card { transform: translateY(-3px); border-color: var(--border-hi); }
.tl-date { font: 600 12px var(--mono); color: var(--text-2); }
.tl-title { font-weight: 650; font-size: 14.5px; margin: 4px 0; line-height: 1.3; }
.tl-by { font-size: 12.5px; color: var(--muted); }

.dotplot { margin-top: 10px; position: relative; }
.dp-row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 14px; align-items: center; padding: 4px 6px; border-radius: 8px; text-decoration: none; color: inherit; }
.dp-row:hover, .dp-row:focus-visible { background: var(--track); }
.dp-l { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-t { position: relative; height: 22px; }
.dp-t .stem { position: absolute; left: 0; top: 50%; height: 1px; background: var(--grid); width: 0; transition: width 1.2s cubic-bezier(.2,.7,.2,1); }
.dp-t .d { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--s1); box-shadow: 0 0 0 2px var(--surface); left: 0; transition: left 1.2s cubic-bezier(.2,.7,.2,1); }
.dp-t .d.hollow { background: var(--surface); border: 2px solid var(--s1); }
.dp-t .dv { position: absolute; top: 50%; transform: translate(12px, -50%); font-size: 12.5px; font-weight: 600; white-space: nowrap; left: 0; transition: left 1.2s cubic-bezier(.2,.7,.2,1); font-variant-numeric: tabular-nums; }
.dp-t .dv.flip { transform: translate(calc(-100% - 12px), -50%); }
.dp-axis { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 14px; padding: 0 6px; }
.dp-axis .ticks { position: relative; height: 18px; border-top: 1px solid var(--axis); font-size: 11.5px; color: var(--muted); }
.dp-axis .ticks span { position: absolute; top: 2px; transform: translateX(-50%); }
@media (max-width: 640px) {
  .dp-row, .dp-axis { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dp-l { white-space: normal; font-size: 12.5px; }
  .dp-axis > span:first-child { display: none; }
}

.callout { padding: 26px 28px; margin: 20px 0 0; position: relative; overflow: hidden; }
.callout::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.callout h3 { font-size: 20px; margin-bottom: 8px; }
.callout p { color: var(--text-2); font-size: 15.5px; max-width: 900px; }
.callout strong { color: var(--text); }

.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 980px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .projects { grid-template-columns: minmax(0, 1fr); } }
.proj { padding: 20px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: transform .25s, border-color .25s; animation: rowIn .5s both; min-width: 0; }
.proj:hover { transform: translateY(-3px); border-color: var(--border-hi); }
.proj .pt { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.proj h3 { font-size: 16.5px; }
.proj .lead-by { font-size: 12.5px; color: var(--muted); }
.proj .what { font-size: 14px; color: var(--text-2); }
.proj .nums { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: auto; padding-top: 6px; }
.proj .nums div { display: flex; flex-direction: column; }
.proj .nums b { font-size: 19px; letter-spacing: -0.02em; }
.proj .nums span { font-size: 12px; color: var(--muted); }
.proj .cav { font-size: 12.5px; color: var(--text-2); border-left: 2px solid var(--serious); padding-left: 8px; }
.proj .go { font-size: 12.5px; color: var(--text-2); }
.proj .go::after { content: " ↗"; }
.kind { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border-hi); white-space: nowrap; color: var(--text-2); }
.pstat { font-size: 12px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; }
.pstat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); }

.proj-chips { margin-top: 28px; }

/* ---------- beyond ---------- */
.beyond { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 980px) { .beyond { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .beyond { grid-template-columns: minmax(0, 1fr); } }
.tile-soon { padding: 24px; position: relative; overflow: hidden; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.tile-soon .soon { margin-top: auto; }
.tile-soon p { margin-bottom: 14px; }
.tile-soon::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.07) 50%, transparent 70%); transform: translateX(-100%); animation: sheen 6s infinite; pointer-events: none; }
.tile-soon:nth-child(2)::after { animation-delay: 1.5s; } .tile-soon:nth-child(3)::after { animation-delay: 3s; } .tile-soon:nth-child(4)::after { animation-delay: 4.5s; }
@keyframes sheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.tile-soon svg { width: 46px; height: 46px; fill: none; stroke: var(--acc-a); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; opacity: .9; }
.tile-soon h3 { font-size: 18px; margin-bottom: 8px; }
.tile-soon p { color: var(--text-2); font-size: 14.5px; }
.soon { display: inline-block; margin-top: 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--border-hi); color: var(--text-2); }

/* ---------- faq + closing call to action ---------- */
/* One column, like the section heads: opening an answer never leaves a hole beside it. */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.faq details[open] { border-color: var(--border-hi); }
.faq summary { cursor: pointer; font-weight: 600; padding: 15px 18px; border-radius: 13px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary:focus-visible { outline-offset: -2px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; content: "+" / ""; color: var(--muted); font-weight: 500; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "−"; content: "−" / ""; }
.faq details p { color: var(--text-2); font-size: 14.5px; padding: 0 18px 16px; margin: 0; }
.cta-band { padding: 0 0 96px; }
.cta-card { padding: 44px 40px; text-align: center; position: relative; overflow: hidden; }
.cta-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 90% at 50% 0%, color-mix(in srgb, var(--acc-a) 16%, transparent), transparent 70%); }
.cta-card > * { position: relative; }
.cta-card h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.035em; }
.cta-card > p { color: var(--text-2); font-size: 17px; margin: 12px auto 0; max-width: 620px; }
.cta-card .cta-row { justify-content: center; margin: 26px 0 0; }
.cta-card .note { margin-top: 14px; }
@media (max-width: 640px) { .cta-band { padding-bottom: 64px; } .cta-card { padding: 32px 18px; } }

/* ---------- early-access sign-up + privacy page ---------- */
.cta-card h2, .doc h1 { text-wrap: balance; }
.su-form { max-width: 560px; margin: 28px auto 0; text-align: left; display: flex; flex-direction: column; gap: 18px; }
.su-form[hidden], .su-done[hidden], .su-unavail[hidden] { display: none; }
.su-field { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.su-label { font-size: 14px; font-weight: 600; color: var(--text); padding: 0; }
.su-optional { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.su-input { width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--track); border: 1px solid var(--field-edge);
  border-radius: 12px; padding: 11px 14px; transition: border-color .2s, background .2s; }
textarea.su-input { resize: vertical; min-height: 84px; line-height: 1.45; }
.su-input::placeholder { color: var(--muted); opacity: 1; }
.su-input:hover, .su-opt:hover { border-color: color-mix(in srgb, var(--acc-b) 55%, var(--field-edge)); }
.su-input:focus { outline: 2px solid var(--ring); outline-offset: 1px; border-color: transparent; }
.su-input[aria-invalid="true"] { border-color: var(--crit); }
.su-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.su-opt { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14.5px; color: var(--text-2);
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--field-edge); background: var(--track); transition: border-color .2s, color .2s, background .2s; }
.su-opt:hover { color: var(--text); }
.su-opt:has(:checked) { color: var(--text); border-color: var(--acc-b); background: color-mix(in srgb, var(--acc-b) 12%, transparent); }
.su-opt:has(:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.su-opt input, .su-check input { accent-color: var(--acc-a); margin: 0; width: 16px; height: 16px; flex: none; }
.su-opt input:focus-visible, .su-check input:focus-visible { outline: none; }
.su-roles:has([aria-invalid="true"]) .su-opt { border-color: var(--crit); }
.su-check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.su-check input { margin-top: 3px; }
.su-check:has(:focus-visible) { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: 6px; }
.su-check:has([aria-invalid="true"]) input { outline: 2px solid var(--crit); outline-offset: 1px; }
.su-hint { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }
.su-count { font-variant-numeric: tabular-nums; }
.su-err { font-size: 13px; font-weight: 600; color: var(--err-ink); }
.su-err::before { content: "! "; content: "! " / ""; }
.su-err:empty { display: none; }
/* Off-screen rather than display: none, so simple bots still see and fill it. */
.su-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.su-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.su-submit { justify-content: center; min-width: 150px; }
.su-submit[aria-disabled="true"] { cursor: progress; opacity: .85; transform: none; }
.su-spin { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
.su-submit.is-busy .su-spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.su-status { font-size: 14px; color: var(--text-2); flex: 1 1 220px; }
/* Always rendered, even when empty: some screen readers only announce live regions that already exist. */
.su-status:empty { flex-basis: 0; }
.su-status[data-kind="error"] { color: var(--err-ink); font-weight: 600; }
.su-status[data-kind="ok"] { color: var(--good-text); font-weight: 600; }
.su-form.is-off { opacity: .55; }
.su-form.is-off .su-opt, .su-form.is-off .su-check { cursor: not-allowed; }
.su-unavail, .cta-card > .su-unavail { max-width: 560px; margin: 26px auto 0; padding: 12px 16px; border-radius: 12px; font-size: 14px; color: var(--text); text-align: left;
  border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.su-done { max-width: 560px; margin: 28px auto 0; padding: 26px 24px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--good) 55%, transparent);
  background: color-mix(in srgb, var(--good) 9%, transparent); }
.su-done h3:focus, .su-unavail:focus { outline: none; }
.su-done-ic { width: 40px; height: 40px; margin: 0 auto 10px; fill: none; stroke: var(--good-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.su-done h3 { font-size: 22px; font-weight: 800; }
.su-done p { color: var(--text-2); margin-top: 8px; overflow-wrap: anywhere; }
.su-done b { color: var(--text); }
.cta-card > .note { font-size: 13.5px; color: var(--muted); }
.cta-card .su-privacy, .cta-card .su-more { max-width: 560px; margin: 18px auto 0; text-align: left; }
.su-privacy a, .doc a { color: var(--text); text-underline-offset: 3px; }
.cta-card .su-more { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.su-more a { color: var(--text-2); text-underline-offset: 3px; }
@media (prefers-color-scheme: light) { .su-input, .su-opt { background: var(--surface); } }
@media (max-width: 640px) { .su-submit { width: 100%; } .su-opts { flex-direction: column; } }

/* privacy.html */
.nav-plain .nav-inner { flex-wrap: nowrap; height: 60px; padding-top: 0; }
.nav-plain .mock-pill { margin-left: auto; }
.nav-plain .brand svg { flex: none; }
.nav-plain .btn { white-space: nowrap; }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; margin: 14px 0 16px; letter-spacing: -0.035em; }
.doc .panel h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.doc .panel h2:not(:first-child) { margin-top: 24px; }
.doc .panel + .panel { margin-top: 20px; }
.doc .panel p { color: var(--text-2); margin-top: 10px; }
.doc .panel p:first-of-type { margin-top: 8px; }
.doc ul { color: var(--text-2); margin: 10px 0 0; padding-left: 20px; }
.doc li + li { margin-top: 6px; }
.doc .su-form { margin: 18px 0 0; max-width: none; }
.doc .su-unavail { margin: 16px 0 0; max-width: none; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.foot-grid { display: grid; grid-template-columns: 1.1fr 1.3fr 1.2fr 1fr; gap: 28px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin-bottom: 10px; }
.footer p { font-size: 13.5px; color: var(--text-2); }
.foot-mock { margin-top: 12px; }
.foot-mock strong { color: var(--text); }
.foot-links { list-style: none; padding: 0; margin: 0; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.foot-links a { color: var(--text-2); }
.foot-base { margin-top: 36px; font-size: 12.5px; color: var(--muted); }

/* ---------- tooltip, toast ---------- */
.tip { position: fixed; z-index: 200; pointer-events: none; max-width: 300px; padding: 10px 12px; border-radius: 12px; font-size: 13px;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent); border: 1px solid var(--border-hi); box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); backdrop-filter: blur(12px); }
.tip .tv { font-size: 16px; font-weight: 700; color: var(--text); }
.tip .tn { color: var(--text-2); }
.tip .tx { color: var(--muted); font-size: 12px; margin-top: 4px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; z-index: 210; padding: 12px 18px; border-radius: 14px; font-size: 14px; max-width: calc(100vw - 32px);
  background: color-mix(in srgb, var(--bg-2) 94%, transparent); border: 1px solid var(--border-hi); box-shadow: var(--shadow); transition: all .35s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hm-c { opacity: 1; transform: none; }
  .timeline::before { transform: none; }
  .split-svg .pulses, .cons-svg .pulses, .eg-svg .pulses { display: none; }
  .cons-svg .out rect.hl { opacity: 0; }
}

/* ---------- forced colors ---------- */
@media (forced-colors: active) {
  .hbar .hb, .col .cb, .meter i { background: CanvasText; }
  .hm-c { border: 1px solid CanvasText; }
}

/* compact bar axis matches compact rows */
.hbars.compact .axis-row { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); }
.q-key { margin: -6px 0 16px; }
.hbar .rng { color: var(--text-2); font-weight: 500; margin-left: .6em; }
.more { margin: 20px auto 0; display: flex; }
.more[hidden] { display: none; }
