/* micromarkets explainer: companion-brand shell around exact contract math. */

:root {
  --paper: #faf7f1;
  --surface: #fff;
  --panel: #f5f1e8;
  --panel-edge: #e9e2d4;
  --line: #d9d0bd;
  --ink: #1e1a15;
  --ink-dim: #776d5e;
  --ink-faint: #9c9282;
  --amber: #916924;
  --amber-hot: #6f501b;
  --amber-deep: #b8862e;
  --gold-bg: #fdf4df;
  --yes: #297852;
  --yes-deep: #e3efe7;
  --yes-edge: #bcd8c6;
  --no: #af473f;
  --no-deep: #f6e4e2;
  --no-edge: #e4bdb8;
  --serif: Georgia, "Times New Roman", serif;
  --body: Georgia, "Times New Roman", serif;
  --sans: Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.site-head {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 16px 26px; border-bottom: 1px solid var(--panel-edge);
  font-family: var(--sans); background: var(--paper);
}
.wordmark { font-size: 16px; font-weight: 800; letter-spacing: 0; text-decoration: none; color: var(--ink); }
.wordmark span { color: var(--ink-dim); }
.site-nav { display: flex; gap: 18px; font-size: 12px; color: var(--ink-dim); }
.site-nav a { text-decoration: none; color: inherit; }
.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.btn-ink {
  background: var(--ink); color: var(--paper); font-family: var(--sans);
  font-size: 12px; font-weight: 700; padding: 9px 17px; border-radius: 7px;
  display: inline-flex; align-items: center; text-decoration: none;
}
.btn-ink:hover { color: var(--paper); background: #000; }

@media (max-width: 640px) {
  .site-head { padding: 14px 18px; gap: 10px 14px; align-items: flex-start; }
  .site-nav { order: 3; width: 100%; gap: 14px; overflow-x: auto; }
  .site-head .btn-ink { margin-left: auto; max-width: 100%; white-space: normal; text-align: center; }
}

.mono { font-family: var(--mono); }
.phosphor {
  color: var(--amber);
  text-shadow: none;
}
.phosphor.no, .no .phosphor { color: var(--no); text-shadow: none; }

a { color: var(--amber); text-decoration-color: rgba(145,105,36,.35); text-underline-offset: 3px; }
a:hover { color: var(--amber-hot); }

/* ── reveals ─────────────────────────────────────────────────────── */
.reveal-load { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--d) * 130ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-load { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  * { animation-duration: .01s !important; }
}

/* ═══ HERO ═══ */
.hero { padding: 64px 24px 48px; border-bottom: 1px solid var(--panel-edge); position: relative; overflow: hidden; }
.hero-inner { max-width: var(--max); margin: 0 auto; position: relative; }
.hero-kicker { font-family: var(--sans); font-size: 10px; letter-spacing: 2px; color: var(--ink-dim); font-weight: 700; margin: 0 0 20px; }
.hero-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 7vw, 82px);
  line-height: 1.06; margin: 0 0 24px; letter-spacing: 0;
}
.hero-em { font-style: italic; font-weight: 400; color: var(--amber-hot); }
.hero-sub { max-width: 680px; font-size: 20px; color: var(--ink-dim); margin: 0 0 34px; }
.hero-sub strong, .hero-sub em { color: var(--ink); }

.tote {
  display: inline-block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 22px; margin-bottom: 36px;
  box-shadow: none;
  position: relative; overflow: hidden;
}
.tote-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tote-label { font-family: var(--mono); font-size: 13px; letter-spacing: .2em; color: var(--yes); }
.tote-label.no { color: var(--no); }
.tote-label.dim { color: var(--ink-faint); }
.tote-digits { font-family: var(--mono); font-size: 38px; font-weight: 600; color: var(--amber); text-shadow: none; font-variant-numeric: tabular-nums; }
.tote-digits.no { color: var(--no); text-shadow: none; }
.tote-note { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .08em; margin-left: 10px; }

.stage-rail { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.rail-arrow { align-self: center; color: var(--amber-deep); font-size: 22px; }
.stage-chip {
  display: flex; flex-direction: column; gap: 3px; min-width: 180px;
  padding: 14px 18px; border: 1px solid var(--panel-edge); border-radius: 8px;
  background: var(--surface);
  text-decoration: none; color: var(--ink);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.stage-chip:hover { transform: translateY(-2px); border-color: var(--amber-deep); box-shadow: 0 8px 22px rgba(30, 26, 21, .08); }
.stage-chip.grad { border-color: var(--gold-edge, var(--panel-edge)); }
.stage-num { font-family: var(--mono); font-size: 11px; color: var(--amber-deep); }
.stage-name { font-family: var(--serif); font-weight: 620; font-size: 19px; letter-spacing: .04em; }
.stage-desc { font-size: 14px; color: var(--ink-dim); }
.hero-cta { font-family: var(--sans); font-size: 14px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero-cta .text-link { font-weight: 700; }

/* ═══ CHAPTERS ═══ */
.chapter { max-width: var(--max); margin: 0 auto; padding: 96px 24px 36px; }
.ch-head { display: flex; align-items: baseline; gap: 22px; margin-bottom: 40px; flex-wrap: wrap; }
.ch-no {
  font-family: var(--mono); font-size: 15px; color: var(--amber);
  border: 1px solid var(--amber-deep); border-radius: 999px; padding: 5px 14px;
  letter-spacing: .15em; background: rgba(255,181,46,.06);
}
.ch-head h2 {
  font-family: var(--serif); font-weight: 560; font-size: clamp(30px, 4vw, 46px);
  margin: 0; letter-spacing: -.01em; font-variation-settings: "opsz" 100;
}
.ch-head h2 em { color: var(--amber-hot); }
.h-mono { font-size: .82em; color: var(--amber); }

.ch-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
.ch-grid.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.ch-grid.flip .ch-prose { order: 2; }
.ch-grid.flip .ch-fig { order: 1; }
@media (max-width: 900px) {
  .ch-grid, .ch-grid.flip { grid-template-columns: 1fr; gap: 30px; }
  .ch-grid.flip .ch-prose { order: 1; }
  .ch-grid.flip .ch-fig { order: 2; }
}
.ch-prose p, .ch-prose-wide p { margin: 0 0 20px; color: var(--ink-dim); }
.ch-prose strong, .ch-prose-wide strong { color: var(--ink); font-weight: 600; }
.ch-prose em, .ch-prose-wide em { color: var(--amber-hot); }
.ch-prose-wide { max-width: 780px; }

.fine { font-size: 15px; color: var(--ink-faint); border-left: 2px solid var(--panel-edge); padding-left: 16px; font-style: italic; }
.callout {
  border: 1px solid var(--panel-edge); border-left: 3px solid var(--amber);
  background: rgba(255,181,46,.05); padding: 18px 22px; border-radius: 6px;
}
.callout.warn { border-left-color: var(--no); background: rgba(255,110,110,.05); }

.formula {
  font-family: var(--mono); font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--panel-edge); border-radius: 8px;
  padding: 16px 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.f-frac { display: inline-flex; flex-direction: column; text-align: center; vertical-align: middle; font-size: 14px; }
.f-frac span:first-child { border-bottom: 1px solid var(--ink-dim); padding: 0 6px 2px; }
.f-frac span:last-child { padding: 2px 6px 0; }

figure { margin: 0; }
figcaption { font-family: var(--mono); font-size: 12.5px; color: var(--ink-faint); margin-top: 14px; letter-spacing: .04em; }

.panel {
  background: var(--surface);
  border: 1px solid var(--panel-edge); border-radius: 12px; padding: 22px;
  box-shadow: 0 10px 30px rgba(30, 26, 21, .05);
}
.panel-title { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--amber-deep); margin: 0 0 12px; }

.tag {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; font-weight: 600;
  padding: 3px 9px; border-radius: 4px; white-space: nowrap;
}
.tag.yes { color: var(--yes); background: var(--yes-deep); }
.tag.no { color: var(--no); background: var(--no-deep); }

/* ═══ 01 escrow animation ═══ */
.escrow-anim { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 26px 18px; background: var(--surface); border: 1px solid var(--panel-edge); border-radius: 12px; }
.esc-you { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; text-align: center; color: var(--ink); }
.esc-you span { font-size: 10.5px; color: var(--ink-faint); letter-spacing: .05em; }
.esc-lane { position: relative; height: 30px; border-bottom: 1px dashed var(--panel-edge); }
.esc-chip {
  position: absolute; top: 2px; left: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold-bg, #fdf4df);
  border: 1px solid var(--amber-deep);
  color: var(--amber); font-family: var(--mono); font-weight: 600; font-size: 13px;
  display: grid; place-items: center;
  animation: chip-fly 3.6s linear infinite;
}
.esc-chip.c2 { animation-delay: 1.2s; }
.esc-chip.c3 { animation-delay: 2.4s; }
@keyframes chip-fly {
  0% { left: 0; opacity: 0; transform: scale(.6); }
  12% { opacity: 1; transform: scale(1); }
  82% { opacity: 1; }
  100% { left: calc(100% - 24px); opacity: 0; transform: scale(.7); }
}
.esc-vault { width: 232px; }
.esc-vault-title { font-family: var(--mono); letter-spacing: .3em; font-size: 12px; color: var(--amber); margin-bottom: 2px; }
.esc-addr { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); margin-bottom: 12px; }
.esc-gate-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.esc-bar { flex: 1; height: 9px; background: var(--panel); border-radius: 5px; overflow: hidden; border: 1px solid var(--panel-edge); }
.esc-bar i { display: block; height: 100%; width: 0; border-radius: 5px; }
.esc-bar .yes-fill { background: var(--yes); animation: gate-fill 7s ease-in-out infinite; }
.esc-bar .no-fill { background: var(--no); animation: gate-fill 7s ease-in-out infinite 1s; }
@keyframes gate-fill {
  0% { width: 0; } 38% { width: 100%; } 82% { width: 100%; } 92% { width: 100%; opacity: 1; } 100% { width: 0; }
}
.esc-req { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.esc-verdict { height: 22px; }
.esc-launch { font-family: var(--mono); font-size: 11.5px; color: var(--amber); opacity: 0; animation: launch-blink 7s ease-in-out infinite; }
@keyframes launch-blink { 0%, 42% { opacity: 0; } 50%, 85% { opacity: 1; } 95%, 100% { opacity: 0; } }

/* ═══ 02 pool widget ═══ */
.pw-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pw-row input[type=range] { flex: 1; accent-color: var(--amber); }
.pw-row output { min-width: 70px; text-align: right; color: var(--ink); font-size: 15px; }
.pw-bar { height: 14px; border-radius: 7px; overflow: hidden; background: var(--no-deep); margin: 6px 0 18px; border: 1px solid var(--panel-edge); }
.pw-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yes-deep), var(--yes)); width: 60%; transition: width .3s ease; }
.pw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pw-stat { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.pw-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-faint); text-transform: uppercase; }
.pw-v { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pw-foot { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin: 14px 0 0; }
@media (max-width: 560px) { .pw-stats { grid-template-columns: 1fr; } }

/* ═══ 03 graduation ═══ */
.grad-fig { max-width: 880px; margin: 18px auto 26px; }
.grad-pot-bar { display: flex; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--panel-edge); }
.grad-seg { display: grid; place-items: center; padding: 8px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.45; text-align: center; }
.grad-seg.dist { flex: 85; background: repeating-linear-gradient(135deg, var(--yes-deep) 0 14px, #d8e8dd 14px 28px); color: var(--yes); }
.grad-seg.pol { flex: 15; background: repeating-linear-gradient(135deg, #fdf4df 0 14px, #f4e6bd 14px 28px); color: var(--amber); }
.in .grad-seg.pol { animation: pol-pulse 2.6s ease-in-out infinite; }
@keyframes pol-pulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.grad-pot-label { text-align: center; font-size: 11.5px; letter-spacing: .25em; color: var(--ink-faint); margin-top: 10px; }
.grad-arrows { display: flex; justify-content: space-around; font-size: 26px; color: var(--amber-deep); margin: 6px 0; }
.ga { animation: drip 1.8s ease-in-out infinite; }
.ga2 { animation-delay: .9s; }
@keyframes drip { 0% { transform: translateY(-4px); opacity: .2; } 50% { transform: translateY(4px); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
.grad-out { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .grad-out { grid-template-columns: 1fr; } }
.grad-card { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 10px; padding: 18px 20px; }
.grad-card h4 { font-family: var(--serif); font-size: 20px; margin: 0 0 8px; font-weight: 600; }
.grad-card p { font-size: 15.5px; color: var(--ink-dim); margin: 0 0 8px; }
.grad-card .sm { font-size: 13px; color: var(--amber); }
.grad-card.pol-card { border-color: rgba(255,181,46,.4); }

/* ═══ 04 curve widget ═══ */
.curve-widget svg { width: 100%; height: auto; display: block; background: var(--paper); border: 1px solid var(--panel-edge); border-radius: 10px; }
.cw-controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.cw-stats { display: flex; gap: 22px; font-size: 13px; color: var(--ink-faint); flex-wrap: wrap; }
.cw-stats b { color: var(--ink); font-weight: 600; margin-left: 6px; }

.btn {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; cursor: pointer;
  padding: 9px 14px; border-radius: 7px; border: 1px solid var(--panel-edge);
  background: var(--surface); color: var(--ink);
  transition: transform .15s ease, filter .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.18); border-color: var(--amber-deep); }
.btn:active { transform: translateY(0); }
.btn.yes { background: var(--yes-deep); color: var(--yes); border-color: var(--yes-edge); }
.btn.no { background: var(--no-deep); color: var(--no); border-color: var(--no-edge); }
.btn.amber { background: #fdf4df; color: var(--amber-hot); border-color: var(--amber-deep); }
.btn.ghost { background: transparent; color: var(--ink-faint); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; filter: none; }

/* ═══ 05 waterfall ═══ */
.wf-anim { background: var(--surface); border: 1px solid var(--panel-edge); border-radius: 12px; padding: 26px 22px 18px; text-align: center; }
.wf-src { display: flex; justify-content: center; gap: 18px; margin-bottom: 4px; }
.wf-tank { font-family: var(--mono); font-size: 11px; line-height: 1.5; padding: 12px 16px; border-radius: 8px; }
.wf-tank.pol { background: #fdf4df; color: var(--amber-hot); }
.wf-tank.fees { background: var(--yes-deep); color: var(--yes); }
.wf-stream { display: flex; justify-content: center; gap: 10px; height: 34px; align-items: flex-start; }
.wf-stream i { width: 3px; height: 16px; border-radius: 2px; background: var(--amber); display: block; animation: stream 1.4s linear infinite; opacity: 0; }
.wf-stream i:nth-child(2) { animation-delay: .25s; }
.wf-stream i:nth-child(3) { animation-delay: .5s; }
.wf-stream i:nth-child(4) { animation-delay: .75s; }
.wf-stream i:nth-child(5) { animation-delay: 1s; }
@keyframes stream { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }
.wf-pot { display: inline-block; border: 1px solid var(--amber-deep); background: rgba(255,181,46,.08); color: var(--amber); border-radius: 8px; padding: 10px 26px; font-size: 13px; letter-spacing: .1em; }
.wf-dest { display: flex; justify-content: center; gap: 14px; margin-top: 2px; }
.wf-cup { font-family: var(--mono); font-size: 11.5px; color: var(--yes); background: var(--yes-deep); padding: 8px 14px; border-radius: 6px; }
.wf-note { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin: 16px 0 0; }

/* ═══ 06 hatches ═══ */
.hatch-line { max-width: 880px; margin: 10px 0 34px; border-left: 2px solid var(--amber-deep); }
.hatch { display: flex; gap: 18px; align-items: baseline; padding: 14px 0 14px 22px; position: relative; }
.hatch::before { content: ""; position: absolute; left: -6px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.hatch-state { min-width: 96px; color: var(--amber); font-size: 13px; letter-spacing: .1em; }
.hatch-what { color: var(--ink-dim); font-size: 16.5px; }
.cannot { max-width: 780px; background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 12px; padding: 26px 30px; }
.cannot h3 { font-family: var(--serif); margin: 0 0 14px; font-size: 23px; font-weight: 600; }
.cannot ul { margin: 0 0 16px; padding-left: 22px; color: var(--ink-dim); }
.cannot li { margin-bottom: 7px; }

/* ═══ SIMULATOR ═══ */
.sim-section { max-width: 1320px; margin: 0 auto; padding: 110px 24px 60px; }
.sim-no { background: var(--amber); color: var(--paper); border-color: var(--amber); font-weight: 600; }
.sim-sub { flex-basis: 100%; color: var(--ink-dim); margin: 6px 0 0; max-width: 720px; }
.sim-presets { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 26px 0 18px; }
.preset-label { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: .15em; }
.btn.preset { background: var(--surface); }

.sim { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 6fr) minmax(0, 6fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .sim { grid-template-columns: 1fr 1fr; } .sim-state { grid-column: 1 / -1; } }
@media (max-width: 760px) { .sim { grid-template-columns: 1fr; } }
.sim-col { display: flex; flex-direction: column; gap: 18px; }

.sim-statebar { display: flex; gap: 6px; flex-wrap: wrap; }
.state-pill {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--panel-edge);
  color: var(--ink-faint); background: transparent;
}
.state-pill.now { color: var(--paper); background: var(--amber); border-color: var(--amber); font-weight: 600; box-shadow: none; }
.state-pill.past { color: var(--amber-deep); border-color: var(--amber-deep); }

.sim-tote { background: var(--surface); }
.st-price { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.st-k { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--yes); }
.st-k.no { color: var(--no); margin-left: 8px; }
.st-v { font-size: 44px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.st-pools { font-size: 13px; color: var(--ink-dim); margin-bottom: 10px; }
.st-meter { height: 12px; border-radius: 6px; overflow: hidden; background: var(--no-deep); border: 1px solid var(--panel-edge); margin-bottom: 14px; }
.st-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--yes-deep), var(--yes)); width: 50%; transition: width .45s cubic-bezier(.2,.7,.2,1); }
#sim-chart { width: 100%; height: 120px; background: var(--paper); border: 1px solid var(--panel-edge); border-radius: 8px; }

.sim-vitals { font-size: 12.5px; color: var(--ink-dim); display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; }
.sim-vitals b { color: var(--ink); font-weight: 500; float: right; font-variant-numeric: tabular-nums; }
.sim-vitals .vk { display: flex; justify-content: space-between; gap: 10px; }

.sim-grad { font-size: 13px; }

.sim-params { font-size: 12.5px; }
.sim-params .pr { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.sim-params label { color: var(--ink-dim); }
.sim-params .pr-in { display: flex; align-items: center; gap: 6px; }
.sim-params input {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink); text-align: right;
  background: var(--surface); border: 1px solid var(--panel-edge); border-radius: 5px; padding: 4px 8px;
  width: 74px;
}
.sim-params input.nondefault { border-color: var(--amber-deep); color: var(--amber-hot); }
.sim-params .pr-unit { color: var(--ink-faint); font-size: 11.5px; width: 1.2em; }
.sim-params .btn { margin-top: 6px; font-size: 12px; padding: 5px 10px; }
.sim-params .pr-hint { color: var(--amber); font-size: 11.5px; margin: 8px 0 0; }

.sim-proj { font-size: 12.5px; }
.sim-proj .pj { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 1fr 1fr; gap: 4px 10px; margin-bottom: 5px; text-align: right; }
.sim-proj .pj span:first-child { text-align: left; }
.sim-proj .pj-head { color: var(--ink-faint); font-size: 11px; letter-spacing: .08em; }
.sim-proj .pj-head .pos-yes { color: var(--yes); } .sim-proj .pj-head .pos-no { color: var(--no); }
.sim-proj .pj-who { color: var(--c, var(--ink)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-proj .pj-note { color: var(--ink-faint); font-size: 11.5px; margin: 8px 0 0; }
.sim-proj .t-dim { color: var(--ink-faint); }
.grad-check { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-dim); margin-bottom: 8px; }
.grad-check .ok { color: var(--yes); } .grad-check .nok { color: var(--no); }
.grad-progress { height: 8px; background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 4px; overflow: hidden; margin: 4px 0 10px; }
.grad-progress i { display: block; height: 100%; background: var(--amber); transition: width .4s ease; }

#sim-controls .ctrl-group { margin-bottom: 18px; }
#sim-controls h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--amber-deep); margin: 0 0 10px; }
.ctrl-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.ctrl-row label { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.ctrl-row input[type=text], .ctrl-row input[type=number], .ctrl-row select {
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--panel-edge); border-radius: 6px; padding: 8px 10px;
  width: 110px;
}
.ctrl-row select { width: auto; }
.bettor-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.bchip {
  font-family: var(--mono); font-size: 12px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--panel-edge); background: transparent; color: var(--ink-dim); cursor: pointer;
}
.bchip.sel { border-color: var(--c, var(--amber)); color: var(--c, var(--amber)); background: rgba(255,181,46,.06); }
.quote-preview { font-family: var(--mono); font-size: 12px; color: var(--amber); background: rgba(255,181,46,.05); border: 1px dashed var(--amber-deep); border-radius: 6px; padding: 9px 12px; margin-top: 4px; min-height: 18px; }
.quote-preview.empty { color: var(--ink-faint); border-color: var(--panel-edge); }

.sim-log-wrap { display: flex; flex-direction: column; }
.sim-log { font-family: var(--mono); font-size: 12px; line-height: 1.8; max-height: 320px; overflow-y: auto; color: var(--ink-dim); }
.sim-log .le { padding: 2px 0; border-bottom: 1px dotted var(--line); animation: log-in .4s ease; }
@keyframes log-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; } }
.le .t-yes { color: var(--yes); } .le .t-no { color: var(--no); }
.le .t-amber { color: var(--amber); } .le .t-err { color: var(--no); font-style: italic; }
.le .t-dim { color: var(--ink-faint); }

.sim-table-wrap { overflow-x: auto; }
.sim-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sim-table th { text-align: right; font-weight: 500; color: var(--ink-faint); letter-spacing: .08em; padding: 4px 8px; border-bottom: 1px solid var(--panel-edge); }
.sim-table th:first-child, .sim-table td:first-child { text-align: left; }
.sim-table td { text-align: right; padding: 6px 8px; border-bottom: 1px dotted var(--line); color: var(--ink-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sim-table .who { color: var(--c, var(--ink)); font-weight: 600; }
.sim-table .pos-yes { color: var(--yes); } .sim-table .pos-no { color: var(--no); }
.sim-table .pnl-pos { color: var(--yes); } .sim-table .pnl-neg { color: var(--no); }

.sim-conserve { font-size: 12px; color: var(--ink-dim); line-height: 2; }
.sim-conserve b { color: var(--ink); float: right; font-variant-numeric: tabular-nums; }
.sim-conserve .dust { color: var(--amber); }
.conserve-ok { color: var(--yes); font-weight: 600; letter-spacing: .1em; }

/* ═══ footer ═══ */
.foot { border-top: 1px solid var(--panel-edge); margin-top: 80px; padding: 40px 24px 60px; text-align: center; color: var(--ink-faint); font-size: 14.5px; }
.foot .mono { font-size: 12.5px; color: var(--amber-deep); }
