:root {
  color-scheme: dark;
  --ink: #f4f0e8;
  --muted: #a9a79f;
  --ground: #0a0c0d;
  --panel: #111516;
  --line: #2a3031;
  --acid: #c7ff4a;
  --cyan: #6cf0dd;
  --warn: #ffbd59;
  --bad: #ff6b6b;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); line-height: 1.55; }
a { color: inherit; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 18px max(20px, calc((100vw - var(--max)) / 2)); background: color-mix(in srgb, var(--ground) 88%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 750; text-decoration: none; letter-spacing: -.02em; }
.mark { color: var(--acid); font-size: 1.5em; }
nav { display: flex; gap: 24px; }
nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--ink); }
.hero { min-height: 78vh; display: grid; align-content: center; padding-block: 100px; background: radial-gradient(circle at 70% 45%, rgba(108,240,221,.10), transparent 32%); }
.eyebrow, .section-number, .kicker { margin: 0 0 18px; color: var(--acid); font: 700 .74rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: balance; }
h1 { max-width: 950px; margin: 0; font-size: clamp(3.6rem, 9vw, 8.7rem); line-height: .88; letter-spacing: -.07em; }
h1 em { color: var(--acid); font-style: normal; }
h2 { margin: 0; font-size: clamp(2.1rem, 4.8vw, 4.6rem); line-height: .98; letter-spacing: -.05em; }
h3 { margin: 0; font-size: 1.15rem; }
.lede { max-width: 760px; margin: 34px 0 0; color: #d1cec6; font-size: clamp(1.1rem, 2vw, 1.45rem); }
.actions, .demo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.button:hover, .button:focus-visible { border-color: var(--cyan); }
.button.primary { border-color: var(--acid); background: var(--acid); color: #111; font-weight: 750; }
.truth-label { margin-top: 20px; color: var(--muted); font-size: .84rem; }
.problem, .results, .protocol, .build { padding-block: 120px; }
.problem { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; }
.comparison { display: grid; gap: 18px; }
.comparison article, .state-card, .evidence-card, .invariant-grid article, .result-card { padding: 26px; border: 1px solid var(--line); background: var(--panel); }
.comparison pre, .flow { overflow-x: auto; margin: 18px 0; color: var(--cyan); font: .92rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.comparison p { margin-bottom: 0; color: var(--muted); }
.bad, .good, .status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font: 700 .68rem ui-monospace, monospace; letter-spacing: .08em; }
.bad { color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); }
.good, .status.active { color: var(--acid); border: 1px solid color-mix(in srgb, var(--acid) 45%, transparent); }
.demo-shell { padding-block: 120px; border-block: 1px solid var(--line); background: #0d1112; }
.demo-heading, .results-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.demo-heading > div, .results-head h2 { max-width: 790px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: .8rem; }
select { max-width: 300px; padding: 11px 36px 11px 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--panel); color: var(--ink); }
.demo-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.card-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.question, .source { color: var(--muted); }
.candidate-bars { display: grid; gap: 18px; margin: 34px 0; }
.candidate-row { display: grid; gap: 8px; }
.candidate-label { display: flex; justify-content: space-between; gap: 20px; font-size: .9rem; }
.candidate-label b { font-family: ui-monospace, monospace; }
.bar { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 0; appearance: none; background: #252b2c; }
.bar::-webkit-progress-bar { background: #252b2c; }
.bar::-webkit-progress-value { background: linear-gradient(90deg, var(--cyan), var(--acid)); transition: width 420ms ease; }
.bar::-moz-progress-bar { background: linear-gradient(90deg, var(--cyan), var(--acid)); }
.candidate-row.leader .candidate-label { color: var(--acid); }
.policy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.policy-grid span { padding: 10px; background: #0b0e0f; color: var(--muted); font-size: .75rem; }
.policy-grid b { display: block; color: var(--ink); font: 700 .95rem ui-monospace, monospace; }
.evidence-card { min-height: 400px; display: flex; flex-direction: column; }
.evidence-card .demo-actions { margin-top: auto; }
.resolution-note { min-height: 48px; margin: 18px 0 0; color: var(--cyan); }
.status.resolved { color: #111; background: var(--acid); }
.status.unresolved { color: var(--warn); border: 1px solid var(--warn); }
.results-head p { max-width: 440px; color: var(--muted); }
.empirical-head { margin-top: 64px; }
.result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.result-card.featured { border-color: var(--acid); }
.result-card .big { margin: 18px 0 8px; font-size: 2.8rem; letter-spacing: -.05em; }
.result-card p { color: var(--muted); }
.result-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 20px; }
.result-meta span { padding: 8px; background: #0b0e0f; color: var(--muted); font-size: .74rem; }
.result-meta b { display: block; color: var(--ink); font-size: .95rem; }
.result-note { max-width: 72ch; margin: 24px 0 0; color: var(--muted); }
.evidence-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; border: 1px solid var(--line); }
.evidence-strip span { padding: 22px; color: var(--muted); border-right: 1px solid var(--line); }
.evidence-strip span:last-child { border-right: 0; }
.evidence-strip b { display: block; color: var(--ink); font-size: 1.5rem; }
.invariant-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 44px; }
.invariant-grid b { color: var(--acid); }
.invariant-grid p { margin-bottom: 0; color: var(--muted); font-size: .9rem; }
.flow { margin-top: 42px; padding: 24px; border: 1px solid var(--line); background: var(--panel); }
.build { border-top: 1px solid var(--line); }
.build-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 44px; }
.build-grid article { padding: 26px; border: 1px solid var(--line); background: var(--panel); }
.build-grid b { color: var(--acid); }
.build-grid p { margin-bottom: 0; color: var(--muted); font-size: .9rem; }
.limits { padding-block: 120px; background: var(--ink); color: #141616; }
.limits .section-number { color: #4d6420; }
.limit-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 42px; }
.limit-columns h3 { margin-bottom: 14px; }
.limit-columns ul { margin: 0; padding-left: 20px; color: #4a4d49; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 45px; color: var(--muted); }
.footer div { color: var(--ink); font-weight: 700; }
.footer p { margin: 0; font-size: .8rem; }

@media (max-width: 820px) {
  nav { display: none; }
  .problem, .demo-grid, .limit-columns { grid-template-columns: 1fr; }
  .demo-heading, .results-head { align-items: start; flex-direction: column; }
  .result-cards, .invariant-grid, .build-grid { grid-template-columns: 1fr 1fr; }
  .evidence-strip { grid-template-columns: 1fr 1fr; }
  .evidence-strip span:nth-child(2) { border-right: 0; }
  .evidence-strip span { border-bottom: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .wrap { width: min(100% - 24px, var(--max)); }
  .hero, .problem, .results, .protocol, .build, .demo-shell, .limits { padding-block: 76px; }
  h1 { font-size: 3.25rem; }
  .result-cards, .invariant-grid, .build-grid, .policy-grid, .evidence-strip { grid-template-columns: 1fr; }
  .evidence-strip span { border-right: 0; }
  .footer { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar::-webkit-progress-value { transition: none; }
}
