/* ═══════════════════════════════════════════════════════════
   VANTAGE — landing styles
   Editorial "ledger/print" system: hairline rules, numbered
   sections, mono metadata, serif display accents.
   ═══════════════════════════════════════════════════════════ */

:root {
  --paper: #fcfcfa;
  --paper-tint: #f4f4ef;
  --ink: #14151a;
  --ink-2: #4c4f58;
  --ink-3: #83868f;
  --line: #e2e1da;
  --line-dark: #2b2c33;

  --blue: #2b50e0;
  --blue-deep: #1a339c;
  --gold: #f5b93f;
  --gold-soft: #fbe6b8;
  --green: #178a5b;
  --red: #c4402f;

  --dark: #14151a;
  --dark-2: #1c1d24;
  --dark-card: #202129;
  --dark-text: #ecebe4;
  --dark-dim: #9a9ca6;

  --font-body: "Archivo", -apple-system, "Helvetica Neue", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --maxw: 1140px;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-size: 16.5px;
}

.mono { font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.01em; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; }

em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
}

a { color: inherit; }

button { font-family: inherit; cursor: pointer; }

/* ── buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); box-shadow: 0 6px 18px rgba(43, 80, 224, 0.28); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }

/* ── nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 700; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1;
}
.brand-name { font-size: 1.05rem; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: clamp(0.8rem, 2.4vw, 1.8rem); }
.nav-links a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }

/* ── hero ────────────────────────────────────────────────── */
.hero { border-bottom: 1px solid var(--line); }
.hero-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.2rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem) clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.eyebrow {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.14em !important;
  font-size: 0.72rem;
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.04;
  margin-bottom: 1.3rem;
}
.hero h1 em { color: var(--blue); }
.lede {
  color: var(--ink-2);
  font-size: 1.08rem;
  max-width: 34rem;
  margin-bottom: 1.8rem;
}
.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.hero-meta { color: var(--ink-3); font-size: 0.74rem; display: flex; gap: 0.7rem; flex-wrap: wrap; }
.hero-meta .sep { color: var(--line); }

/* hero console */
.hero-demo { display: flex; flex-direction: column; gap: 0.7rem; }
.console {
  background: var(--dark);
  border-radius: var(--radius);
  border: 1px solid var(--line-dark);
  box-shadow: 0 24px 60px -24px rgba(20, 21, 26, 0.45);
  overflow: hidden;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line-dark);
}
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3b44; }
.console-title { margin-left: auto; color: var(--dark-dim); font-size: 0.7rem; }
.console-body {
  padding: 1rem 1.1rem 1.2rem;
  min-height: 176px;
  font-size: 0.8rem;
  line-height: 1.9;
  color: var(--dark-text);
}
.console-body .cl {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: pre-wrap;
}
.console-body .cl.in { opacity: 1; transform: none; }
.console-body .c-cmd { color: var(--gold); }
.console-body .c-dim { color: var(--dark-dim); }
.console-body .c-hold { color: #e8a020; }
.console-body .c-ok { color: #4cc38a; }
.demo-caption { color: var(--ink-3); font-size: 0.72rem; text-align: right; }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line); padding: 0.85rem 0; }
.marquee-inner {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  animation: marquee 42s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.marquee-inner i { font-style: normal; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── sections ─────────────────────────────────────────────── */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem);
}
.section-dark {
  max-width: none;
  background: var(--dark);
  color: var(--dark-text);
}
.section-dark > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-tint {
  max-width: none;
  background: var(--paper-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-tint > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.sec-head { margin-bottom: clamp(2.2rem, 5vw, 3.5rem); max-width: 44rem; }
.sec-num {
  display: inline-block;
  color: var(--blue);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.72rem;
  margin-bottom: 1rem;
}
.section-dark .sec-num { color: var(--gold); }
.sec-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 0.8rem; line-height: 1.1; }
.sec-sub { color: var(--ink-2); font-size: 1.03rem; }
.section-dark .sec-sub { color: var(--dark-dim); }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── 01 · flow3 ──────────────────────────────────────────── */
.flow3 { display: flex; align-items: stretch; gap: 0; }
.flow-card {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.flow-step { color: var(--blue); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; }
.flow-card h3 { font-size: 1.25rem; }
.flow-card p { color: var(--ink-2); font-size: 0.92rem; flex: 1; }
.plan-mini, .wallet-mini {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  background: var(--paper-tint);
}
.wallet-mini { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, var(--line)); font-weight: 500; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  color: var(--ink-2);
  background: var(--paper);
  white-space: nowrap;
}
.chip.gold { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: var(--gold-soft); color: #6b4d0c; }

.flow-link { position: relative; width: 74px; align-self: center; height: 2px; background: var(--line); flex: none; }
.pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  transform: translate(-50%, -50%);
  animation: travelX 2.4s linear infinite;
}
.pulse.d2 { animation-delay: 1.2s; }
@keyframes travelX {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.footnote {
  margin-top: 2.2rem;
  color: var(--ink-3);
  font-size: 0.78rem;
  max-width: 46rem;
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
  line-height: 1.7;
}
.fn-mark { color: var(--gold); }

/* ── 02 · engines ─────────────────────────────────────────── */
.engine-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}
.etab {
  border: 1px solid var(--line-dark);
  background: transparent;
  color: var(--dark-dim);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  transition: all 0.18s ease;
}
.etab .mono { color: var(--gold); font-size: 0.68rem; }
.etab:hover { border-color: var(--dark-dim); color: var(--dark-text); }
.etab.active { background: var(--dark-text); color: var(--dark); border-color: var(--dark-text); }
.etab.active .mono { color: var(--blue-deep); }

.engine-panel { display: none; }
.engine-panel.active {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  animation: panelIn 0.35s ease;
}
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }

.engine-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.badge-sync, .badge-async {
  font-size: 0.64rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.badge-sync { background: rgba(76, 195, 138, 0.14); color: #4cc38a; border: 1px solid rgba(76, 195, 138, 0.35); }
.badge-async { background: rgba(245, 185, 63, 0.12); color: var(--gold); border: 1px solid rgba(245, 185, 63, 0.35); }
.engine-info p { color: var(--dark-dim); margin-bottom: 1.2rem; font-size: 0.97rem; }
.ex-row { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.ex-label { color: var(--dark-dim); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; min-width: 84px; }
.section-dark .chip { border-color: var(--line-dark); background: var(--dark-2); color: var(--dark-dim); }
.section-dark .chip.gold { border-color: rgba(245, 185, 63, 0.4); background: rgba(245, 185, 63, 0.1); color: var(--gold); }

.engine-stage {
  background: var(--dark-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 300px;
}
.stage { flex: 1; }
.stage-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--dark-dim);
  font-size: 0.72rem;
  border-top: 1px solid var(--line-dark);
  padding-top: 0.8rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dark-dim);
  transition: background 0.2s;
}
.stage-status.live .status-dot { background: var(--gold); animation: blink 1s ease infinite; }
.stage-status.done .status-dot { background: #4cc38a; animation: none; }
@keyframes blink { 50% { opacity: 0.35; } }

.node-label {
  display: block;
  color: var(--dark-dim);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

/* E1 · transform */
.stage-transform { display: flex; align-items: stretch; gap: 0.6rem; }
.tf-node {
  flex: 1;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 0.85rem;
  background: var(--dark-card);
  transition: border-color 0.3s, box-shadow 0.3s;
  min-width: 0;
}
.tf-node.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 185, 63, 0.12); }
.tf-node.wide { flex: 1.25; }
.mini-field {
  height: 22px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  margin-bottom: 7px;
  overflow: hidden;
}
.mini-field.short { width: 60%; }
.mini-field i {
  display: block;
  height: 100%;
  width: 0;
  background: rgba(236, 235, 228, 0.16);
  transition: width 0.5s ease;
}
.mini-field.fill i { width: 86%; }
.prompt-chip {
  font-size: 0.66rem;
  border: 1px dashed var(--line-dark);
  border-radius: 5px;
  padding: 0.32rem 0.5rem;
  margin-bottom: 6px;
  color: var(--dark-dim);
  transition: all 0.3s;
}
.tf-node.active .prompt-chip { border-color: rgba(245, 185, 63, 0.5); color: var(--gold); }
.prompt-chip.alt { border-style: solid; }
.tf-arrow { align-self: center; width: 34px; flex: none; }
.tf-arrow svg { width: 100%; display: block; }
.tf-arrow path {
  stroke: var(--line-dark);
  stroke-width: 1.6;
  stroke-dasharray: 60;
  stroke-dashoffset: 0;
  transition: stroke 0.3s;
}
.tf-arrow.flow path {
  stroke: var(--gold);
  animation: dashflow 0.9s linear infinite;
}
@keyframes dashflow { to { stroke-dashoffset: -60; } }
.out-line {
  height: 9px;
  border-radius: 4px;
  background: rgba(236, 235, 228, 0.22);
  margin-bottom: 8px;
  width: 0;
  transition: width 0.55s ease;
}
.out-line.on.w90 { width: 90%; }
.out-line.on.w85 { width: 85%; }
.out-line.on.w80 { width: 80%; }
.out-line.on.w75 { width: 75%; }
.out-line.on.w70 { width: 70%; }
.out-line.on.w65 { width: 65%; }
.out-line.on.w50 { width: 50%; }

/* E2 · doc pipeline */
.doc-track {
  position: relative;
  display: flex;
  gap: 0.6rem;
  padding-top: 3.1rem;
  margin-bottom: 1.1rem;
}
.doc-station {
  flex: 1;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--dark-card);
  text-align: center;
  padding: 0.85rem 0.3rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.doc-station span { color: var(--dark-dim); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.09em; }
.doc-station.lit { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 185, 63, 0.12); }
.doc-station.lit span { color: var(--gold); }
.doc-chip {
  position: absolute;
  top: 0;
  left: 12.5%;
  transform: translateX(-50%);
  background: var(--red);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 600;
  border-radius: 5px;
  padding: 0.3rem 0.55rem;
  transition: left 0.7s cubic-bezier(0.5, 0, 0.2, 1);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
.json-out {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--dark-card);
  padding: 0.9rem 1rem;
  font-size: 0.74rem;
  line-height: 1.85;
}
.json-line { opacity: 0; transform: translateX(-6px); transition: all 0.35s ease; }
.json-line.in { opacity: 1; transform: none; }
.jk { color: var(--gold); }
.jv { color: #4cc38a; }
.jn { color: #7ea2ff; }

/* E3 · rag */
.stage-rag { display: flex; gap: 1.2rem; align-items: flex-start; }
.rag-left { flex: 0.9; }
.chunk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.chunk {
  aspect-ratio: 1.5;
  border-radius: 4px;
  background: var(--dark-card);
  border: 1px solid var(--line-dark);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.3s ease;
}
.chunk.in { opacity: 1; transform: scale(1); }
.chunk.hit { background: rgba(245, 185, 63, 0.2); border-color: var(--gold); box-shadow: 0 0 10px rgba(245, 185, 63, 0.25); }
.rag-right { flex: 1.1; display: flex; flex-direction: column; gap: 0.8rem; }
.rag-q {
  align-self: flex-end;
  background: var(--dark-text);
  color: var(--dark);
  font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px 12px 3px 12px;
  max-width: 90%;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.35s ease;
}
.rag-q.in { opacity: 1; transform: none; }
.rag-a {
  border: 1px solid var(--line-dark);
  border-radius: 12px 12px 12px 3px;
  background: var(--dark-card);
  padding: 0.9rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.rag-a.in { opacity: 1; }
.cite-row { display: flex; gap: 0.45rem; margin-top: 0.3rem; }
.cite {
  font-size: 0.62rem;
  border: 1px solid rgba(245, 185, 63, 0.45);
  color: var(--gold);
  border-radius: 4px;
  padding: 0.12rem 0.45rem;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s ease;
}
.cite.in { opacity: 1; transform: none; }

/* E4 · agent */
.stage-agent { display: flex; gap: 1.4rem; align-items: center; }
.agent-left { flex: 0.85; display: flex; flex-direction: column; gap: 0.9rem; align-items: center; }
.orbit { position: relative; width: 150px; height: 150px; }
.orbit svg { width: 100%; height: 100%; }
.orbit circle { stroke: var(--line-dark); stroke-width: 1.5; stroke-dasharray: 4 5; }
.orbit-node {
  position: absolute;
  font-size: 0.6rem;
  color: var(--dark-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--dark-2);
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
}
.orbit-node.n1 { top: -4px; left: 50%; transform: translateX(-50%); }
.orbit-node.n2 { bottom: 16%; right: -14px; }
.orbit-node.n3 { bottom: 16%; left: -14px; }
.orbit-spinner {
  position: absolute;
  inset: 17px;
  animation: spin 2.2s linear infinite;
  animation-play-state: paused;
}
.orbit-spinner.go { animation-play-state: running; }
.orbit-dot {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(245, 185, 63, 0.6);
}
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--dark-dim);
  font-size: 0.7rem;
}
.budget { width: 100%; display: flex; align-items: center; gap: 0.6rem; color: var(--dark-dim); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; }
.budget-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--dark-card); border: 1px solid var(--line-dark); overflow: hidden; }
.budget-bar i { display: block; height: 100%; width: 100%; background: var(--gold); transition: width 1.1s ease; }
.agent-right { flex: 1.15; display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.agent-log { font-size: 0.72rem; line-height: 2; color: var(--dark-dim); }
.log-line { opacity: 0; transform: translateX(-6px); transition: all 0.35s ease; }
.log-line.in { opacity: 1; transform: none; }
.report-card {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--dark-card);
  padding: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}
.report-card.in { opacity: 1; transform: none; border-color: rgba(76, 195, 138, 0.4); }

/* E5 · coach */
.stage-coach { display: flex; gap: 1.2rem; }
.chat-col { flex: 1.2; display: flex; flex-direction: column; gap: 0.6rem; }
.bub {
  max-width: 88%;
  font-size: 0.85rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.35s ease;
}
.bub.in { opacity: 1; transform: none; }
.bub.user { align-self: flex-end; background: var(--dark-text); color: var(--dark); border-bottom-right-radius: 3px; }
.bub.ai { align-self: flex-start; background: var(--dark-card); border: 1px solid var(--line-dark); border-bottom-left-radius: 3px; }
.mem-panel {
  flex: 0.8;
  border: 1px dashed var(--line-dark);
  border-radius: 8px;
  padding: 0.9rem;
  align-self: stretch;
}
.mem-item {
  font-size: 0.68rem;
  color: var(--gold);
  border: 1px solid rgba(245, 185, 63, 0.3);
  background: rgba(245, 185, 63, 0.07);
  border-radius: 5px;
  padding: 0.32rem 0.55rem;
  margin-bottom: 7px;
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.35s ease;
}
.mem-item.in { opacity: 1; transform: none; }

/* manifest note */
.manifest-note {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: center;
  border-top: 1px solid var(--line-dark);
  padding-top: 2.6rem;
}
.manifest-copy h4 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.manifest-copy p { color: var(--dark-dim); font-size: 0.95rem; }
.manifest {
  background: var(--dark-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  font-size: 0.76rem;
  line-height: 1.8;
  color: var(--dark-text);
  overflow-x: auto;
}

/* ── 03 · credits sim ─────────────────────────────────────── */
.sim {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  align-items: stretch;
}
.sim-left {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.wallet-label { color: var(--ink-3); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; }
.wallet-num { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 0.45rem; }
.wallet-num .cr { color: var(--ink-3); font-size: 1rem; }
.wallet-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-tint);
  margin-top: 0.7rem;
}
.seg-avail { background: var(--blue); width: 100%; transition: width 0.5s ease; }
.seg-held {
  background: repeating-linear-gradient(45deg, var(--gold) 0 5px, var(--gold-soft) 5px 10px);
  width: 0;
  transition: width 0.5s ease;
}
.wallet-legend { display: flex; gap: 1.2rem; margin-top: 0.55rem; color: var(--ink-3); font-size: 0.68rem; }
.wallet-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-avail { background: var(--blue); }
.lg-held { background: repeating-linear-gradient(45deg, var(--gold) 0 3px, var(--gold-soft) 3px 6px); }

.sim-actions { display: flex; flex-direction: column; gap: 0.55rem; }
.run-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-size: 0.9rem;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.run-btn:hover:not(:disabled) { border-color: var(--ink); background: var(--paper-tint); }
.run-btn:active:not(:disabled) { transform: translateY(1px); }
.run-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.run-btn .mono { color: var(--ink-3); font-size: 0.72rem; white-space: nowrap; }
.fail-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-2);
  font-size: 0.74rem;
  padding: 0.2rem 0.1rem;
  cursor: pointer;
}
.fail-toggle input { accent-color: var(--red); }
.sim-status {
  border-top: 1px dashed var(--line);
  padding-top: 0.9rem;
  color: var(--ink-2);
  font-size: 0.76rem;
  min-height: 2.2em;
}
.sim-status.ok { color: var(--green); }
.sim-status.err { color: var(--red); }

.sim-note {
  margin-top: 1.1rem;
  color: var(--ink-3);
  font-size: 0.74rem;
  max-width: 46rem;
  border-left: 2px solid var(--blue);
  padding-left: 1rem;
  line-height: 1.7;
}

.sim-ledger {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--dark);
  color: var(--dark-text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ledger-head {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.78rem;
  color: var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.ledger-head span { color: var(--dark-dim); font-size: 0.64rem; }
#ledgerList {
  list-style: none;
  padding: 0.7rem 1.2rem;
  font-size: 0.74rem;
  line-height: 2.15;
  overflow-y: auto;
  max-height: 380px;
  flex: 1;
}
#ledgerList li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.35s ease;
  border-bottom: 1px dashed rgba(43, 44, 51, 0.7);
}
#ledgerList li.in { opacity: 1; transform: none; }
.lk {
  flex: none;
  width: 66px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lk-grant { color: #7ea2ff; }
.lk-reserve { color: #e8a020; }
.lk-capture { color: var(--dark-text); }
.lk-release { color: #4cc38a; }
.lk-refund { color: #4cc38a; }
.lref { flex: 1; color: var(--dark-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lamt { flex: none; font-weight: 500; }
.lamt.pos { color: #4cc38a; }
.lamt.neg { color: #e8a020; }

/* rules */
.rules {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.rule {
  border-top: 2px solid var(--ink);
  padding-top: 0.9rem;
}
.rule-num { color: var(--blue); font-size: 0.7rem; }
.rule h4 { font-size: 1.02rem; margin: 0.35rem 0 0.4rem; }
.rule p { color: var(--ink-2); font-size: 0.84rem; }

/* ── 04 · catalog ─────────────────────────────────────────── */
.cat-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.cf {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.15s;
}
.cf:hover { border-color: var(--ink); color: var(--ink); }
.cf.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 0.9rem;
}
.mod-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: cardIn 0.35s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
.mod-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 14px 30px -18px rgba(20, 21, 26, 0.35);
}
.mod-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.mod-cat { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); }
.mod-cr { font-size: 0.68rem; color: #6b4d0c; background: var(--gold-soft); border-radius: 4px; padding: 0.12rem 0.45rem; white-space: nowrap; }
.mod-card h4 { font-size: 1.02rem; line-height: 1.25; }
.mod-card p { font-size: 0.82rem; color: var(--ink-2); flex: 1; }
.mod-arch { font-size: 0.64rem; color: var(--ink-3); }
.mod-arch b { color: var(--ink-2); font-weight: 500; }

/* ── 05 · plans ───────────────────────────────────────────── */
.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--paper);
}
.plan.featured {
  border-color: var(--ink);
  box-shadow: 0 20px 44px -24px rgba(20, 21, 26, 0.4);
  position: relative;
  transform: translateY(-8px);
}
.plan-tag { color: var(--blue); font-size: 0.66rem; letter-spacing: 0.12em; }
.plan.featured .plan-tag { color: #6b4d0c; background: var(--gold-soft); align-self: flex-start; padding: 0.15rem 0.55rem; border-radius: 4px; }
.plan-price { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; }
.plan-price span { font-size: 0.95rem; font-weight: 500; color: var(--ink-3); }
.plan-cr { color: var(--green); font-size: 0.8rem; font-weight: 500; }
.plan ul { list-style: none; flex: 1; }
.plan li {
  font-size: 0.86rem;
  color: var(--ink-2);
  padding: 0.32rem 0 0.32rem 1.1rem;
  position: relative;
}
.plan li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold);
}
.plan .btn { justify-content: center; }
.topup { margin-top: 1.6rem; text-align: center; color: var(--ink-3); font-size: 0.78rem; }

/* ── footer ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
}
.foot-left { display: flex; align-items: center; gap: 0.9rem; }
.foot-left p { color: var(--ink-3); font-size: 0.72rem; }
.foot-right { display: flex; gap: 1.4rem; align-items: baseline; flex-wrap: wrap; font-size: 0.76rem; }
.foot-right a { color: var(--ink-2); text-decoration: none; }
.foot-right a:hover { color: var(--ink); }
.foot-note { color: var(--ink-3); }

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .engine-panel.active { grid-template-columns: 1fr; }
  .manifest-note { grid-template-columns: 1fr; }
  .sim { grid-template-columns: 1fr; }
  .rules { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .plan.featured { transform: none; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .flow3 { flex-direction: column; gap: 0; }
  .flow-link { width: 2px; height: 44px; align-self: center; }
  .pulse { animation-name: travelY; left: 50%; top: 0; }
  @keyframes travelY {
    0% { top: 0; opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
  }
  .stage-transform { flex-direction: column; }
  .tf-arrow { transform: rotate(90deg); margin: -4px auto; }
  .stage-rag, .stage-agent, .stage-coach { flex-direction: column; }
  .rules { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
}

/* ── reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-inner, .pulse, .orbit-spinner, .tf-arrow.flow path { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}
