:root {
  --ink: #eff7ff;
  --muted: #a9bfd0;
  --navy: #06111f;
  --panel: rgba(8, 24, 37, 0.82);
  --panel-strong: rgba(5, 18, 29, 0.95);
  --line: rgba(166, 218, 243, 0.2);
  --line-bright: rgba(255, 210, 111, 0.48);
  --blue: #9edbff;
  --green: #77e1b7;
  --gold: #ffd26f;
  --rose: #ff9dac;
  --violet: #c9acff;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #030711;
  line-height: 1.65;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 9, 17, 0.86);
  backdrop-filter: blur(18px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  min-height: 62px;
  margin: 0 auto;
  padding: 0 24px;
}
.brand {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-decoration: none;
  text-transform: uppercase;
}
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.nav a {
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.nav a:hover, .nav a:focus-visible, .nav .nav-active { color: var(--ink); background: rgba(158, 219, 255, .1); }

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(3, 9, 17, .1), rgba(3, 9, 17, .82)),
    repeating-linear-gradient(90deg, transparent 0 83px, rgba(158, 219, 255, .025) 84px 85px);
  content: "";
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 370px) 1fr;
  align-items: center;
  gap: clamp(42px, 8vw, 104px);
  max-width: var(--max);
  min-height: 710px;
  margin: 0 auto;
  padding: 76px 24px 84px;
}
.cover-wrap { position: relative; isolation: isolate; }
.cover-wrap::before, .cover-wrap::after {
  position: absolute;
  inset: 8% -10%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(158, 219, 255, .13);
  filter: blur(48px);
  content: "";
}
.cover-wrap::after { inset: 52% -4% -4%; background: rgba(255, 210, 111, .12); }
.cover {
  width: 100%;
  border: 1px solid rgba(158, 219, 255, .32);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
  transform: rotate(-1.2deg);
}
.kicker, .chapter-mark {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 760px;
  margin: 13px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 7.5vw, 96px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .9;
}
.hero h1 span { color: var(--blue); }
.deck { max-width: 720px; margin: 0 0 22px; color: #c4d6e3; font-size: clamp(18px, 2.2vw, 23px); line-height: 1.5; }
.author { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition: border-color .18s, background .18s, transform .18s;
}
.button:hover, .button:focus-visible { border-color: var(--line-bright); transform: translateY(-1px); }
.button-primary { border-color: rgba(255, 210, 111, .5); background: rgba(255, 210, 111, .13); color: #ffe7aa; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max);
  margin: -28px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.metric { padding: 22px; border: 1px solid var(--line); border-right: 0; background: var(--panel-strong); }
.metric:first-child { border-radius: 14px 0 0 14px; }
.metric:last-child { border-right: 1px solid var(--line); border-radius: 0 14px 14px 0; }
.metric strong { display: block; color: var(--blue); font-size: clamp(23px, 4vw, 34px); line-height: 1.1; }
.metric span { color: var(--muted); font-size: 12px; }

main { max-width: var(--max); margin: 0 auto; padding: 110px 24px; }
.section { margin: 0 0 120px; }
.section-heading { display: grid; grid-template-columns: 190px 1fr; gap: 34px; align-items: start; margin-bottom: 36px; }
.section h2 {
  max-width: 820px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1.02;
}
.section-lede { max-width: 720px; margin: 16px 0 0; color: var(--muted); font-size: 18px; }

.invariant-card {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}
.invariant-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 62px); }
.invariant-copy blockquote { margin: 12px 0 18px; font-family: Georgia, serif; font-size: clamp(26px, 4vw, 44px); line-height: 1.1; }
.invariant-copy p { color: var(--muted); }
.invariant-figure { display: flex; align-items: center; padding: 24px; background: #f7f8f8; }
.invariant-figure img { width: 100%; }

.state-lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr);
  gap: 22px;
}
.state-stage, .state-copy { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.state-stage { min-height: 590px; padding: clamp(22px, 4vw, 44px); }
.state-controls { display: flex; gap: 8px; margin-bottom: 28px; }
.state-control {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
  color: var(--muted);
  cursor: pointer;
}
.state-control[aria-selected="true"] { border-color: var(--line-bright); background: rgba(255, 210, 111, .1); color: var(--gold); }
.state-view { display: none; }
.state-view.is-active { display: block; }
.state-view img { width: 100%; max-height: 500px; object-fit: contain; border-radius: 12px; background: #fff; }
.state-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(26px, 4vw, 44px); }
.state-copy h3 { margin: 10px 0 12px; font-family: Georgia, serif; font-size: 30px; }
.state-copy p { margin: 0 0 14px; color: var(--muted); }
.equation { color: var(--gold) !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; }

.voice-guide { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: 18px; }
.voice-player, .voice-transcript { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.voice-player { padding: clamp(26px, 4vw, 42px); }
.voice-player h3 { margin: 22px 0 8px; font-family: Georgia, serif; font-size: 28px; }
.voice-player p { color: var(--muted); }
.voice-player audio { width: 100%; margin: 18px 0; accent-color: var(--gold); }
.voice-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.voice-meta span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 10px; }
.voice-research-link { display: inline-block; margin-top: 26px; color: var(--blue); font-size: 13px; text-decoration: none; }
.voice-transcript { overflow: hidden; }
.voice-transcript summary { padding: 24px 28px; color: var(--gold); font-weight: 800; cursor: pointer; }
.voice-transcript[open] summary { border-bottom: 1px solid var(--line); }
.voice-transcript > div { max-height: 470px; padding: 12px 30px 30px; overflow-y: auto; }
.voice-transcript p { color: var(--muted); font-size: 14px; }

.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.evidence-card { min-height: 270px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.evidence-card h3 { margin: 18px 0 10px; font-size: 22px; }
.evidence-card p { color: var(--muted); font-size: 14px; }
.label { display: inline-flex; padding: 5px 10px; border: 1px solid currentColor; border-radius: 99px; font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.implemented { color: var(--green); }
.measured { color: var(--blue); }
.proposed { color: var(--violet); }

.planes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: plane; }
.plane { position: relative; min-height: 250px; padding: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(160deg, rgba(158,219,255,.07), transparent 58%), var(--panel); }
.plane::after { position: absolute; right: 16px; bottom: -30px; color: rgba(158, 219, 255, .05); font-size: 120px; font-weight: 900; counter-increment: plane; content: counter(plane); }
.plane h3 { margin: 36px 0 10px; font-size: 20px; }
.plane p { color: var(--muted); font-size: 14px; }

.status-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 38px;
  align-items: center;
  padding: clamp(30px, 6vw, 70px);
  border: 1px solid var(--line-bright);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(158, 219, 255, .1), rgba(255, 210, 111, .08)), var(--panel-strong);
}
.status-card h2 { margin: 10px 0 12px; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 58px); font-weight: 500; line-height: 1; }
.status-card p { max-width: 690px; margin: 0; color: var(--muted); }

.footer { border-top: 1px solid var(--line); padding: 34px 24px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; max-width: var(--max); margin: 0 auto; font-size: 13px; }
.footer a { color: var(--blue); text-decoration: none; }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 220px 1fr; min-height: 620px; gap: 38px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric, .metric:first-child, .metric:last-child { border: 1px solid var(--line); border-radius: 0; }
  .metric:first-child { border-radius: 14px 0 0 0; }
  .metric:nth-child(2) { border-radius: 0 14px 0 0; }
  .metric:nth-child(3) { border-radius: 0 0 0 14px; }
  .metric:last-child { border-radius: 0 0 14px 0; }
  .section-heading, .invariant-card, .state-lab, .voice-guide { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr; }
  .planes { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .nav a:not(.nav-active) { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 54px; text-align: center; }
  .cover-wrap { width: min(250px, 72vw); margin: 0 auto; }
  .actions { justify-content: center; }
  .metrics { margin-top: 0; padding: 0; }
  main { padding-top: 80px; }
  .section { margin-bottom: 86px; }
  .section-heading { gap: 10px; }
  .state-stage { min-height: 0; padding: 16px; }
  .state-controls { flex-direction: column; }
  .planes { grid-template-columns: 1fr; }
  .status-card { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
