/* ============================================================
   MaxFly — research logbook
   Minimal, informative, lab/paper aesthetic.
   Palette: white · ink · one indigo accent (#3C2879).
   Type: serif (reading) · sans (UI) · mono (metadata).
   ============================================================ */

:root {
  --bg:        #ffffff;
  --card:      #ffffff;
  --ink:       #16161c;
  --muted:     #6b6b78;
  --faint:     #8c8c98;
  --line:      #e8e8ef;
  --line-soft: #f1f1f6;
  --accent:        #3c2879;   /* deep indigo */
  --accent-soft:   #efecf8;   /* light indigo wash */
  --accent-bright: #7c5cff;   /* glowing eyes / hover */

  --font-serif: "Iowan Old Style", "Charter", "Bitstream Charter", Georgia, "Times New Roman", serif;
  --font-sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:  ui-monospace, "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;

  --maxw: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 3px solid rgba(124,92,255,0.34);
  outline-offset: 3px;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 96px; }

/* ---------- mono label helper ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.logo { display: inline-flex; align-items: center; gap: 13px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.wordmark { font-family: var(--font-sans); font-size: 25px; font-weight: 700; letter-spacing: -0.02em; }
.wordmark span { color: var(--accent); }
.tagline { color: var(--muted); margin: 14px 0 0; font-size: 15px; max-width: 52ch; }
.site-nav {
  display: flex; gap: 22px; margin-top: 22px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-nav-link {
  color: var(--faint); padding: 3px 0;
  border-bottom: 2px solid transparent;
}
.site-nav-link:hover { color: var(--ink); text-decoration: none; }
.site-nav-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- the eyes ---------- */
.eyes { display: block; height: 34px; width: auto; }
.eyes .face { fill: #16161c; }
.eyes .eye {
  fill: var(--accent-bright);
  filter: drop-shadow(0 0 3px rgba(124,92,255,0.6));
  transform-box: fill-box; transform-origin: center;
  transition: transform .07s ease-out;
}
.eyes .eye-group { transform-box: fill-box; transform-origin: center; transition: transform .28s cubic-bezier(.22,.61,.36,1); }
@media (prefers-reduced-motion: reduce) {
  .eyes .eye, .eyes .eye-group { transition: none; }
}

/* ============================================================
   INDEX (home)
   ============================================================ */
.intro {
  font-size: 16px; color: #3a3a44; line-height: 1.65;
  max-width: 62ch; margin: 0 0 30px;
}
.intro .term-hint { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }

/* filters — text toggles, not pills */
.filters {
  display: flex; flex-wrap: wrap; gap: 4px 20px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;
  padding-bottom: 18px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.filter {
  background: none; border: none; padding: 4px 0; cursor: pointer;
  font: inherit; text-transform: uppercase; color: var(--faint);
  border-bottom: 2px solid transparent; transition: color .12s;
}
.filter:hover { color: var(--ink); }
.filter.active { color: var(--accent); border-bottom-color: var(--accent); }

/* the index list */
.index { list-style: none; margin: 0; padding: 0; }
.index-month {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
  margin: 38px 0 6px; padding-top: 10px;
}
.index-month:first-child { margin-top: 22px; }

.entry {
  display: grid; grid-template-columns: 116px 1fr; gap: 22px;
  padding: 22px 0; border-top: 1px solid var(--line);
  align-items: start;
}
.entry:hover .entry-title { color: var(--accent); }
.entry-meta {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5;
  color: var(--muted); padding-top: 4px;
}
.entry-date { display: block; color: var(--ink); }
.entry-cat  { display: block; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }
.entry-main { min-width: 0; }
.entry-title {
  display: block; font-family: var(--font-serif);
  font-size: 21px; line-height: 1.28; font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em; transition: color .12s;
}
.entry-title:hover { text-decoration: none; }
.entry-sum { margin: 7px 0 0; font-size: 15px; color: var(--muted); line-height: 1.55; }
.index-empty { color: var(--muted); padding: 30px 0; font-style: italic; }

/* ============================================================
   ARTICLE
   ============================================================ */
.back {
  display: inline-block; margin-bottom: 30px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
}
.back:hover { color: var(--accent); text-decoration: none; }

.article-head { margin-bottom: 30px; }
.article-meta {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 14px;
}
.article-meta .sep { color: var(--line); margin: 0 8px; }
.article-meta .cat { color: var(--accent); }

article h1 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 33px; line-height: 1.16; letter-spacing: -0.02em;
  margin: 0 0 4px; color: var(--ink);
}
.lead {
  font-family: var(--font-serif);
  font-size: 19px; line-height: 1.5; color: #34343e;
  margin: 18px 0 0;
  padding-left: 16px; border-left: 2px solid var(--accent);
}

.article-body { font-family: var(--font-serif); }
.article-body h3 {
  font-family: var(--font-sans); font-weight: 700;
  font-size: 15px; letter-spacing: 0.02em;
  margin: 38px 0 14px; color: var(--ink);
}
.article-body p { font-size: 18px; line-height: 1.68; margin: 0 0 18px; color: #26262e; }
.quote {
  font-size: 18px; line-height: 1.55; font-style: italic; color: var(--accent);
  margin: 26px 0; padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent-soft);
}

/* figures */
figure { margin: 28px 0; }
figure .frame { border: 1px solid var(--line); border-radius: 6px; padding: 0; overflow: hidden; background: var(--card); }
figure .frame img { width: 100%; height: auto; display: block; }
figcaption {
  font-family: var(--font-sans); font-size: 13px; color: var(--muted);
  margin-top: 9px; line-height: 1.5;
}
figcaption .credit { display: block; font-family: var(--font-mono); font-size: 11px; margin-top: 4px; color: var(--faint); }
figcaption .credit a { color: var(--faint); text-decoration: underline; }

/* clickable glossary term */
.term {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}
.term:hover { border-bottom-color: var(--accent); }

/* "Concretely" facts block */
.facts {
  margin: 34px 0; padding: 20px 22px;
  background: var(--accent-soft); border-radius: 8px;
}
.facts-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.facts ul { margin: 0; padding: 0; list-style: none; }
.facts li {
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1.55;
  color: #2c2c36; padding-left: 18px; position: relative; margin-bottom: 9px;
}
.facts li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.facts li:last-child { margin-bottom: 0; }
.facts .term { color: var(--accent); }

/* references */
.sources { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); }
.sources .label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.sources ol { margin: 0; padding: 0; list-style: none; counter-reset: ref; }
.sources li {
  font-size: 14px; line-height: 1.5; margin-bottom: 9px;
  padding-left: 30px; position: relative; counter-increment: ref;
}
.sources li::before {
  content: "[" counter(ref) "]"; position: absolute; left: 0;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
}
.sources a { color: var(--ink); }
.sources a:hover { color: var(--accent); }

footer {
  max-width: var(--maxw); margin: 60px auto 0; padding: 22px 24px 40px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--faint);
}

/* ============================================================
   KNOWLEDGE PANEL
   ============================================================ */
.kpanel {
  position: absolute; z-index: 100;
  width: 408px; max-width: calc(100vw - 28px);
  max-height: 80vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 18px 50px rgba(20,18,40,0.16);
}
.kp-loading { display: flex; align-items: center; min-height: 22px; }
.kp-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.kp-head { padding: 14px 18px 0; }
.kp-term { font-family: var(--font-serif); font-weight: 600; font-size: 17px; color: var(--ink); }
.kp-def {
  padding: 7px 18px 13px; margin: 0; font-size: 13.5px; color: var(--muted);
  line-height: 1.55; border-bottom: 1px solid var(--line);
}
.kp-wiki { padding: 14px 18px; overflow: hidden; }
.kp-thumb { float: right; width: 74px; height: 74px; object-fit: cover; border-radius: 6px; margin: 2px 0 8px 14px; }
.kp-extract { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--ink); }
.kp-ext-link {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--accent); border-bottom: 1px solid var(--accent-soft);
}
.kp-ext-link:hover { text-decoration: none; border-bottom-color: var(--accent); }
.kp-paper { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--accent-soft); }
.kp-paper-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.kp-paper-title { font-family: var(--font-serif); font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; line-height: 1.35; }
.kp-paper-meta  { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.kp-paper-abs   { font-size: 12.5px; color: #45454f; line-height: 1.5; margin: 0 0 9px; }
.kp-paper .kp-ext-link { display: inline-block; }

.kpanel-backdrop { position: fixed; inset: 0; z-index: 99; background: rgba(20,18,40,0.32); animation: fade-in .18s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .wrap { padding: 0 18px 70px; }
  .masthead { padding: 30px 18px 18px; margin-bottom: 30px; }
  .site-nav { margin-top: 18px; }

  .filters {
    flex-wrap: nowrap; overflow-x: auto; gap: 20px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; }

  .entry { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .entry-meta { padding-top: 0; display: flex; gap: 10px; align-items: baseline; }
  .entry-cat { margin-top: 0; }
  .entry-title { font-size: 19px; }

  article h1 { font-size: 26px; }
  .lead { font-size: 17px; }
  .article-body p { font-size: 17px; }

  /* knowledge panel → bottom sheet pinned to the viewport */
  .kpanel {
    position: fixed !important;
    top: auto !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important; max-width: 100%; max-height: 80vh;
    border-radius: 16px 16px 0 0; overflow-y: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    animation: slide-up .22s ease;
  }
  @keyframes slide-up { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  .kpanel::before {
    content: ""; display: block; width: 36px; height: 4px;
    background: var(--line); border-radius: 2px; margin: 10px auto 2px;
  }
}

/* ============================================================
   NEW CONTENT — unseen entry (< 72h) highlight on the index
   ============================================================ */
.entry.is-new {
  background: #eef4ff;
  box-shadow: inset 3px 0 0 #2563eb;
  border-top-color: #c7dbff;
  padding-left: 14px; padding-right: 12px;
  border-radius: 0 8px 8px 0;
}
.entry.is-new .entry-cat { color: #2563eb; }
.new-badge {
  display: inline-block; vertical-align: middle; position: relative; top: -2px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: #2563eb; color: #fff;
  padding: 2px 7px; border-radius: 999px; margin-left: 8px;
}

/* ============================================================
   VIDEO — click-to-load YouTube
   ============================================================ */
figure.video { margin: 28px 0; }
.yt {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer;
}
.yt-thumb { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; transition: opacity .15s, transform .3s; }
.yt:hover .yt-thumb { opacity: 1; transform: scale(1.02); }
.yt-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 66px; height: 66px; border-radius: 50%; padding-left: 4px;
  background: rgba(60,40,121,.92); color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 26px rgba(0,0,0,.4); transition: background .15s, transform .15s;
}
.yt:hover .yt-play { background: var(--accent-bright); transform: translate(-50%, -50%) scale(1.06); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   FORMULA — KaTeX block
   ============================================================ */
.formula {
  margin: 22px 0; padding: 16px 18px;
  background: var(--accent-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 8px;
}
.formula .fmath { overflow-x: auto; overflow-y: hidden; }
.formula .katex-display { margin: 0; }
.formula .fnote {
  font-family: var(--font-sans); font-size: 13.5px; line-height: 1.5;
  color: var(--muted); margin-top: 10px;
}
.formula .fnote .term { color: var(--accent); }

/* ============================================================
   CAPITAL RACE
   ============================================================ */
.capital-page { background: #f5f4fa; }
.capital-page .capital-masthead {
  max-width: 1180px; margin-bottom: 28px; background: #fff;
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 18px 18px;
}
.capital-wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto; padding-bottom: 90px;
}
.capital-hero {
  position: relative; overflow: hidden; color: #fff;
  border: 1px solid #2f2943; border-radius: 24px;
  background:
    radial-gradient(circle at 82% 8%, rgba(124,92,255,.42), transparent 30%),
    radial-gradient(circle at 12% 100%, rgba(36,115,232,.2), transparent 34%),
    #17141f;
  box-shadow: 0 24px 55px rgba(31,25,48,.14);
}
.capital-hero::after {
  content: ""; position: absolute; width: 240px; height: 240px; right: -110px; bottom: -140px;
  border: 1px solid rgba(255,255,255,.09); border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,.018), 0 0 0 76px rgba(255,255,255,.012);
  pointer-events: none;
}
.capital-hero-main {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .7fr);
  gap: 34px; padding: 42px 42px 34px;
}
.capital-status { display: flex; gap: 8px; margin-bottom: 26px; }
.capital-status span {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
  color: #c9c5d5; background: rgba(255,255,255,.045);
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
}
.capital-status i {
  width: 6px; height: 6px; border-radius: 50%; background: #3bd28f;
  box-shadow: 0 0 0 4px rgba(59,210,143,.12);
}
.capital-hero .kicker { color: #aaa3bc; }
.capital-hero h1 {
  max-width: 12ch; margin: 8px 0 18px;
  font-family: var(--font-serif); font-size: clamp(43px, 5.4vw, 68px);
  line-height: .98; letter-spacing: -.045em; font-weight: 600;
}
.capital-hero h1 span { color: #a891ff; }
.capital-lead {
  max-width: 60ch; margin: 0; color: #c7c3d0;
  font-family: var(--font-serif); font-size: 18px; line-height: 1.55;
}
.capital-lead strong { color: #fff; }
.model-toolbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 22px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.11);
}
.model-toolbar-live { justify-content: flex-end; }
.model-clock {
  margin: 0 0 6px; color: #a8a2b5; font-family: var(--font-mono); font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.live-dot {
  display: inline-block; width: 7px; height: 7px; margin-right: 7px;
  border-radius: 50%; background: #3bd28f; box-shadow: 0 0 0 4px rgba(59,210,143,.1);
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse { 50% { box-shadow: 0 0 0 7px rgba(59,210,143,0); } }
.maxfly-anchor {
  display: flex; min-height: 100%; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 25px; border: 1px solid rgba(177,155,255,.38); border-radius: 18px;
  background: linear-gradient(145deg, rgba(124,92,255,.28), rgba(124,92,255,.09));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
}
.maxfly-anchor-top, .anchor-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: #c8bff0; font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: .09em; text-transform: uppercase;
}
.maxfly-mark {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 38px; height: 25px; border-radius: 9px; background: #111018;
}
.maxfly-mark i {
  display: block; width: 7px; height: 13px; border-radius: 5px; background: #8b6dff;
  box-shadow: 0 0 7px rgba(139,109,255,.65);
}
.maxfly-anchor .anchor-number {
  margin: 8px 0 10px; color: #fff; white-space: nowrap;
  font-family: var(--font-mono); font-size: clamp(36px, 4.2vw, 52px);
  line-height: .95; letter-spacing: -.065em;
}
.money-major, .money-micro { font-variant-numeric: tabular-nums; }
.money-micro {
  display: inline-block; margin-left: .06em; opacity: .52;
  font-size: .52em; font-weight: 500; letter-spacing: -.02em;
  vertical-align: .42em;
}
.anchor-number .money-micro { color: #c7baff; opacity: .72; }
.maxfly-anchor p:not(.kicker) { max-width: 24ch; margin: 0; color: #c6bfd4; font-size: 13px; line-height: 1.5; }
.anchor-foot { padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.anchor-foot strong { color: #fff; font-size: 10px; }
.hero-metrics {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid rgba(255,255,255,.1); background: rgba(8,7,12,.23);
}
.hero-metrics article { padding: 21px 28px 23px; border-right: 1px solid rgba(255,255,255,.1); }
.hero-metrics article:last-child { border-right: 0; }
.hero-metrics span {
  display: block; color: #9892a5; font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
}
.hero-metrics strong {
  display: block; margin: 5px 0 3px; color: #fff; font-family: var(--font-mono);
  font-size: 25px; line-height: 1.15; letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.hero-metrics small { color: #aaa5b5; font-size: 11px; }
.context-metrics {
  margin-top: 20px; overflow: hidden;
  border: 1px solid rgba(60,40,121,.35); border-radius: 18px;
  background:
    radial-gradient(circle at 88% 0, rgba(168,145,255,.18), transparent 34%),
    linear-gradient(110deg, #211a37, #342361);
  box-shadow: 0 12px 34px rgba(33,26,55,.13);
}
.capital-panel {
  padding: 28px; border: 1px solid #e4e1eb; border-radius: 18px;
  background: #fff; box-shadow: 0 8px 26px rgba(28,23,44,.045);
}
.capital-section { margin-top: 20px; }
.section-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.section-heading h2 {
  margin: 4px 0 0; font-family: var(--font-serif);
  font-size: 26px; line-height: 1.12; letter-spacing: -.02em;
}
.section-heading > p {
  max-width: 34ch; margin: 0; color: var(--muted); text-align: right; font-size: 12.5px;
}
.burn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.burn-card {
  min-width: 0; padding: 19px; border: 1px solid var(--program-soft);
  border-radius: 13px; background: linear-gradient(145deg, var(--program-soft), #fff 72%);
}
.burn-card.is-maxfly, .time-row.is-maxfly {
  border-color: rgba(60,40,121,.25);
  box-shadow: inset 0 0 0 1px rgba(60,40,121,.04);
}
.burn-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.program-label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.program-mark {
  width: 8px; height: 28px; border-radius: 999px;
  background: var(--program-color, var(--accent)); flex: 0 0 auto;
  box-shadow: 0 4px 10px var(--program-soft);
}
.program-label strong { display: block; line-height: 1.2; font-size: 13.5px; }
.program-label small {
  display: block; margin-top: 3px; color: var(--faint);
  font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em;
}
.burn-number {
  margin-top: 26px; overflow: hidden; text-overflow: ellipsis;
  color: #1d1b23; font-family: var(--font-mono); font-size: clamp(27px, 3vw, 38px);
  line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums;
}
.burn-rate {
  flex: 0 0 auto; padding: 5px 7px; border-radius: 999px;
  color: var(--program-color); background: rgba(255,255,255,.78);
  font-family: var(--font-mono); font-size: 9px; font-variant-numeric: tabular-nums;
}
.burn-rate .money-micro { font-size: .72em; vertical-align: .28em; }
.rate-unit { opacity: .66; }
.burn-caption { margin-top: 9px; color: var(--muted); font-size: 11px; }
.combined-burn {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 12px; padding: 17px 20px; color: #fff;
  border-radius: 12px; background: linear-gradient(105deg, #211a37, #3c2879);
}
.combined-burn span { display: block; color: #d5cee8; font-size: 12.5px; }
.combined-burn strong {
  display: inline-flex; align-items: baseline; justify-content: flex-end;
  font-family: var(--font-mono); font-size: 25px;
  white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.04em;
}
.combined-burn .money-micro {
  color: #c7baff; opacity: .75; transform: translateY(-.38em);
}
.combined-burn small { display: block; color: #9f95bd; font-family: var(--font-mono); font-size: 9.5px; }
.capital-dashboard { display: grid; grid-template-columns: .82fr 1.18fr; gap: 20px; }
.capital-dashboard .capital-panel { min-width: 0; }
.time-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.time-row {
  display: grid; grid-template-columns: 1fr auto; gap: 11px 16px; align-items: center;
  padding: 14px; border: 1px solid var(--program-soft); border-radius: 11px;
  background: linear-gradient(105deg, var(--program-soft), #fff 68%);
}
.time-value {
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.time-track, .scale-track {
  grid-column: 1 / -1; height: 7px; overflow: hidden;
  border-radius: 999px; background: rgba(22,22,28,.065);
}
.time-track span, .scale-track span {
  display: block; height: 100%; border-radius: inherit;
  background: var(--program-color, var(--accent));
  transition: width .45s cubic-bezier(.22,.61,.36,1);
}
.scale-chart { display: grid; gap: 14px; }
.scale-row {
  display: grid; grid-template-columns: 115px minmax(80px, 1fr) 190px;
  gap: 12px; align-items: center;
}
.scale-label strong { display: block; font-size: 13px; }
.scale-label small {
  display: block; overflow: hidden; color: var(--faint);
  font-family: var(--font-mono); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap;
}
.scale-track { grid-column: auto; height: 16px; border-radius: 4px; }
.scale-value {
  text-align: right; font-family: var(--font-mono); font-size: 12px;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.scale-row.is-maxfly .scale-value { color: var(--program-color); font-weight: 600; }
.scale-axis {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin: 9px 202px 0 127px; color: var(--faint);
  font-family: var(--font-mono); font-size: 8px;
}
.scale-axis span { text-align: center; }
.scale-axis span:first-child { text-align: left; }
.scale-axis span:last-child { text-align: right; }
.methodology { background: linear-gradient(145deg, #faf9fd, #fff); }
.methodology .section-heading { margin-bottom: 18px; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.method-grid p { margin: 0; color: #3e3e48; font-size: 13.5px; line-height: 1.65; }
.assumption-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.assumption {
  padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff;
}
.assumption > div strong { display: block; font-size: 13px; }
.assumption > div span {
  color: var(--accent); font-family: var(--font-mono); font-size: 8.5px;
  letter-spacing: .08em; text-transform: uppercase;
}
.assumption p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.capital-sources {
  max-width: none; margin-top: 20px; padding: 27px 28px;
  border: 1px solid #e4e1eb; border-radius: 18px; background: #fff;
}
.capital-sources ol { columns: 2; column-gap: 42px; }
.capital-sources li { break-inside: avoid; }

/* ============================================================
   ACCESS GATE
   ============================================================ */
.gate-page {
  min-height: 100vh; display: grid; place-items: center; padding: 34px 22px;
  background:
    radial-gradient(circle at 15% 15%, rgba(124,92,255,.15), transparent 28%),
    radial-gradient(circle at 90% 90%, rgba(36,115,232,.1), transparent 30%),
    #f4f2f8;
}
.gate-shell {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  width: min(1020px, 100%); overflow: hidden;
  border: 1px solid #ddd9e7; border-radius: 24px; background: #fff;
  box-shadow: 0 30px 80px rgba(34,27,55,.15);
}
.gate-intro {
  position: relative; overflow: hidden; min-height: 570px; padding: 48px;
  color: #fff; background:
    radial-gradient(circle at 75% 8%, rgba(124,92,255,.42), transparent 29%),
    radial-gradient(circle at 8% 95%, rgba(36,115,232,.22), transparent 35%),
    #17141f;
}
.gate-intro::after {
  content: ""; position: absolute; right: -120px; bottom: -150px;
  width: 310px; height: 310px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255,255,255,.018), 0 0 0 96px rgba(255,255,255,.012);
}
.gate-logo {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 13px;
  margin-bottom: 90px; color: #fff;
}
.gate-logo:hover { text-decoration: none; }
.gate-logo .eyes { height: 37px; }
.gate-logo .wordmark { font-size: 27px; }
.gate-intro .kicker { position: relative; z-index: 1; color: #a9a2b8; }
.gate-intro h1 {
  position: relative; z-index: 1; max-width: 10ch; margin: 10px 0 18px;
  font-family: var(--font-serif); font-size: clamp(42px, 5vw, 59px);
  line-height: 1.02; letter-spacing: -.04em; font-weight: 600;
}
.gate-copy {
  position: relative; z-index: 1; max-width: 48ch; margin: 0;
  color: #c3bfcc; font-size: 14px; line-height: 1.65;
}
.gate-signal {
  position: absolute; z-index: 1; left: 48px; bottom: 42px;
  display: flex; align-items: center; gap: 9px; color: #9e98aa;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
}
.gate-signal span {
  width: 7px; height: 7px; border-radius: 50%; background: #3bd28f;
  box-shadow: 0 0 0 4px rgba(59,210,143,.1);
}
.gate-card { display: flex; flex-direction: column; justify-content: center; padding: 48px 42px; }
.gate-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.gate-lock {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 13px; background: var(--accent-soft); color: var(--accent);
}
.gate-lock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.gate-card-head .kicker { margin: 0 0 3px; color: var(--accent); }
.gate-card h2 {
  margin: 0; font-family: var(--font-serif); font-size: 30px;
  line-height: 1.1; letter-spacing: -.02em;
}
.gate-label {
  display: block; margin-bottom: 8px; color: var(--muted);
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
}
.gate-field { position: relative; }
.gate-input {
  width: 100%; padding: 14px 66px 14px 15px; border: 1.5px solid #dedbe6;
  border-radius: 11px; outline: none; background: #fbfafd; color: var(--ink);
  font-family: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.gate-input:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 4px rgba(60,40,121,.09);
}
.gate-reveal {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  padding: 6px 7px; border: 0; background: none; color: var(--accent);
  cursor: pointer; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase;
}
.gate-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin-top: 13px; padding: 14px 16px; border: 0; border-radius: 11px;
  background: linear-gradient(100deg, #34216c, #5b3eae); color: #fff;
  cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 650;
  box-shadow: 0 9px 20px rgba(60,40,121,.2); transition: transform .12s, box-shadow .12s, opacity .12s;
}
.gate-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(60,40,121,.25); }
.gate-btn:active { transform: translateY(0); }
.gate-btn:disabled { cursor: wait; opacity: .62; transform: none; }
.gate-error { min-height: 42px; margin: 10px 0 0; color: #b43535; font-size: 12px; line-height: 1.45; }
.gate-input.shake { border-color: #c74a4a; animation: shake .35s ease; }
.gate-note {
  margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 11px; line-height: 1.5;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .time-track span, .scale-track span { transition: none; }
  .gate-input.shake { animation: none; }
}

@media (max-width: 900px) {
  .capital-hero-main { grid-template-columns: 1fr; }
  .maxfly-anchor { min-height: 250px; }
  .capital-dashboard { grid-template-columns: 1fr; }
  .burn-grid, .time-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-shell { grid-template-columns: 1fr; max-width: 620px; }
  .gate-intro { min-height: 380px; }
  .gate-logo { margin-bottom: 46px; }
}

@media (max-width: 640px) {
  .capital-page .capital-masthead {
    width: 100%; border-left: 0; border-right: 0; border-radius: 0;
  }
  .capital-wrap { width: calc(100% - 28px); padding-bottom: 70px; }
  .capital-hero { border-radius: 18px; }
  .capital-hero-main { padding: 27px 22px 23px; gap: 22px; }
  .capital-status { margin-bottom: 22px; overflow-x: auto; }
  .capital-status span { flex: 0 0 auto; }
  .capital-hero h1 { font-size: clamp(39px, 12.6vw, 53px); }
  .capital-lead { font-size: 16.5px; }
  .model-toolbar { align-items: flex-start; }
  .maxfly-anchor { min-height: 230px; padding: 21px; }
  .maxfly-anchor .anchor-number { font-size: clamp(34px, 10.5vw, 43px); }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-metrics article {
    display: grid; grid-template-columns: 1fr auto; align-items: baseline;
    padding: 15px 21px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09);
  }
  .hero-metrics article:last-child { border-bottom: 0; }
  .hero-metrics strong { grid-column: 2; grid-row: 1 / span 2; font-size: 22px; }
  .hero-metrics small { grid-column: 1; }
  .capital-panel { padding: 21px 18px; border-radius: 15px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .section-heading h2 { font-size: 24px; }
  .section-heading > p { text-align: left; }
  .burn-grid, .time-list { grid-template-columns: 1fr; }
  .burn-card { padding: 17px; }
  .burn-number { margin-top: 20px; font-size: 32px; }
  .combined-burn { padding: 16px; }
  .combined-burn strong { font-size: 22px; }
  .scale-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .scale-track { grid-column: 1 / -1; grid-row: 2; }
  .scale-value { grid-column: 2; grid-row: 1; }
  .scale-axis { margin: 9px 0 0; }
  .method-grid, .assumption-list { grid-template-columns: 1fr; gap: 12px; }
  .capital-sources { padding: 22px 19px; }
  .capital-sources ol { columns: 1; }
  .gate-page { display: block; padding: 0; background: #fff; }
  .gate-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .gate-intro { min-height: 300px; padding: 30px 24px 72px; }
  .gate-logo { margin-bottom: 42px; }
  .gate-intro h1 { font-size: 39px; }
  .gate-copy { font-size: 13px; }
  .gate-signal { left: 24px; bottom: 27px; }
  .gate-card { padding: 34px 24px 44px; }
}
