:root {
  --bg: #07090d;
  --ink: #e7eef6;
  --muted: #93a0b2;
  --line: rgba(232, 238, 246, 0.12);
  --card: rgba(255, 255, 255, 0.03);
  --pess: #ffb020;
  --base: #d6ff4a;
  --opt: #3ee0ff;
  --accent: #d6ff4a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(214, 255, 74, 0.09), transparent 55%),
    radial-gradient(680px 360px at -12% 18%, rgba(62, 224, 255, 0.06), transparent 52%),
    var(--bg);
  color: var(--ink);
  font-family: Manrope, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 72%);
}

h1, h2, h3, .hero-num, .brand, .card strong, .stat b, .phase .when, .spine b {
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 500;
  letter-spacing: -0.03em;
}

h1 { margin: 0; }
h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 14px; letter-spacing: -0.02em; }

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.top, main, footer { position: relative; z-index: 1; }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(7, 9, 13, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
}

.brand-mark {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  background: var(--base);
  box-shadow: 0 0 16px rgba(214, 255, 74, 0.7);
}

nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav a:hover { color: var(--ink); }

main { max-width: 1160px; margin: 0 auto; padding: 0 28px 72px; }

section { scroll-margin-top: 76px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
  gap: 20px 36px;
  padding: 56px 0 12px;
}

.kicker {
  margin: 0 0 16px;
  color: var(--base);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-figure {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.hero-num {
  font-size: clamp(84px, 12vw, 148px);
  line-height: 0.82;
  letter-spacing: -0.06em;
}

.hero-unit {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 20px;
  letter-spacing: 0.04em;
}

.hero-line {
  display: block;
  max-width: 16ch;
  margin-top: 18px;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-stats {
  display: grid;
  align-content: end;
  gap: 10px;
}

.stat, .card, .panel, .phase, .term {
  background: var(--card);
  border: 1px solid var(--line);
}

.stat, .card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.stat {
  padding: 14px 16px 13px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.stat:hover, .card:hover { border-color: rgba(231, 238, 246, 0.32); }

.stat b, .card strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

.stat span, .card em, .caption, .phase span, .term span {
  color: var(--muted);
}

.stat .role, .card .tag {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat.pess .role, .card.pess .tag { color: var(--pess); }
.stat.base .role, .card.base .tag { color: var(--base); }
.stat.opt .role, .card.opt .tag { color: var(--opt); }

.spine {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 28px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.spine li { position: relative; padding-right: 12px; }

.spine li::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 0;
  width: 7px;
  height: 7px;
  background: #d5dde8;
}

.spine li.is-key::before {
  background: var(--base);
  box-shadow: 0 0 0 5px rgba(214, 255, 74, 0.16);
}

.spine b { display: block; margin-bottom: 6px; font-size: 18px; }
.spine span { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }

.riskoff {
  margin-top: 36px;
  padding: 28px 28px 24px;
  background:
    linear-gradient(90deg, rgba(214, 255, 74, 0.14), transparent 28%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 255, 74, 0.28);
}

.riskoff h2 { max-width: 18em; }

.risk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 32px;
}

.risk-grid p { margin: 0; color: var(--muted); }

.section-head { max-width: 720px; margin: 0 0 22px; }
.section-head p, .band p { margin: 0; color: var(--muted); }

#terms, #paths, #cash, #model { padding-top: 64px; }

.terms { display: grid; gap: 8px; }

.term {
  display: grid;
  grid-template-columns: 52px 180px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 16px 18px;
}

.term .idx {
  color: var(--base);
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 12px;
}

.term strong { font-size: 18px; font-weight: 600; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.card {
  padding: 18px 18px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.card[aria-selected="true"] {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.card em {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 14px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metrics .stat { cursor: default; }
.metrics .stat b { font-size: clamp(22px, 2vw, 28px); }

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.panel { padding: 18px 18px 8px; }

.caption { font-size: 13px; margin: -4px 0 8px; }

.source { padding: 12px 0 14px; border-top: 1px solid var(--line); }
.source-top { display: flex; justify-content: space-between; gap: 16px; }
.source span { color: var(--muted); }
.source b { font-weight: 700; white-space: nowrap; }
.source.total b { color: var(--accent); }

.bar {
  height: 3px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: Manrope, Helvetica, Arial, sans-serif; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
#compare td.base, #compare th.base { background: rgba(214, 255, 74, 0.06); }
tr.total td { font-weight: 700; color: var(--accent); }

.phases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.phase { padding: 16px; }
.phase .when {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
}
.phase b { display: block; margin-bottom: 8px; }
.phase span { font-size: 14px; }

.disclaimer {
  margin-top: 56px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.disclaimer p { max-width: 760px; color: var(--muted); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px 32px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .hero, .risk-grid, .split, .cards, .phases, .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .hero-stats { grid-column: 1 / -1; grid-template-columns: 1fr 1fr 1fr; }
  .spine { grid-template-columns: 1fr 1fr; gap: 16px; }
  .spine li::before { top: 4px; left: -2px; }
  .spine li { padding-left: 14px; }
}

@media (max-width: 720px) {
  .top {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 12px 16px;
  }
  nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  nav a { letter-spacing: 0.04em; font-size: 11px; }
  section { scroll-margin-top: 108px; }
  main { padding: 0 16px 48px; }
  .hero { padding-top: 32px; }
  .hero, .risk-grid, .split, .cards, .phases, .metrics, .hero-stats, footer {
    grid-template-columns: 1fr;
    display: grid;
  }
  .term { grid-template-columns: 36px 1fr; }
  .term strong { grid-column: 2; }
  .riskoff { padding: 20px 16px; }
  .hero-num { font-size: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stat, .card { transition: none; }
}
