/* ============================================================
   Cash Cow — single committed dark world
   Palette: night-pasture green ground, cream text, bell-gold
   accent, barn red for the gate, muzzle pink for highlights.
   Green/red/orange stay semantic (buy / sell / burn).
   ============================================================ */
:root {
  --bg: #0e1410;
  --bg-2: #141c17;
  --bg-3: #1b251f;
  --bg-4: #243029;
  --line: #26332b;
  --line-2: #344438;
  --text: #f3e9d2;
  --text-2: #d3c9b2;
  --muted: #8f9a8a;
  --brass: #e4b550;
  --brass-2: #f6d27a;
  --brass-deep: #9c7325;
  --brass-ink: #2a1f08;
  --red: #c2452f;
  --red-2: #d9553d;
  --cream: #f3e9d2;
  --ink: #161a20;
  --teal: #f0a5a0;        /* muzzle pink: secondary accent for links, live, "you" */
  --teal-deep: #b4675f;
  --buy: #47d57f;
  --sell: #f2635c;
  --burn: #ff8a3d;
  --glow: rgba(228, 181, 80, 0.35);
  --glow-teal: rgba(240, 165, 160, 0.25);

  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --r: 14px;
  --r-sm: 8px;
  --gap: 16px;
  --pad: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(228,181,80,.08), transparent 60%),
    radial-gradient(520px 380px at 8% 70%, rgba(0,0,0,.35), transparent 70%),
    radial-gradient(640px 420px at 96% 20%, rgba(0,0,0,.3), transparent 70%),
    radial-gradient(420px 300px at 70% 105%, rgba(0,0,0,.3), transparent 70%);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 700; }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px;
  background: rgba(14,20,16,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; color: var(--brass); align-self: center; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-tag { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--text-2); padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.nav a:hover { color: var(--text); text-decoration: none; background: var(--bg-3); }
.nav a.is-active { color: var(--brass-ink); background: var(--brass); }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sim-badge.is-live { border-style: solid; border-color: var(--buy); color: var(--buy); }
.sim-badge {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border: 1px dashed var(--line-2); padding: 4px 8px; border-radius: 6px; cursor: help;
}
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text-2);
  padding: 7px 10px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { border-color: var(--line-2); color: var(--text); }
.icon-btn[aria-pressed="true"] { background: rgba(240,165,160,.12); border-color: var(--teal-deep); color: var(--teal); }
.icon-btn[aria-pressed="false"] .snd-wave { opacity: .3; }
.wallet-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brass); color: var(--brass-ink); border: 0; font: inherit; font-weight: 700; font-size: 13px;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
.wallet-btn:hover { background: var(--brass-2); }
.wallet-btn .wallet-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brass-ink); opacity: .35; }
.wallet-btn.is-connected { background: var(--bg-3); color: var(--text); border: 1px solid var(--line-2); font-family: var(--mono); font-weight: 500; }
.wallet-btn.is-connected .wallet-dot { background: var(--buy); opacity: 1; box-shadow: 0 0 8px var(--buy); }

/* ---------- price marquee ---------- */
.marquee {
  overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2);
  font-family: var(--mono); font-size: 12px; white-space: nowrap;
}
.marquee-track { display: inline-flex; gap: 36px; padding: 8px 0; animation: marquee 60s linear infinite; }
.marquee-track span { color: var(--text-2); }
.marquee-track b { color: var(--text); font-weight: 500; }
.marquee-track i { font-style: normal; }
.marquee-track .up { color: var(--buy); }
.marquee-track .dn { color: var(--sell); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- views ---------- */
.view { display: none; }
.view.is-active { display: block; }

/* ---------- dashboard grid ---------- */
.dash {
  display: grid; grid-template-columns: 250px minmax(0, 1fr) 340px; gap: var(--gap);
  padding: var(--gap) 24px; max-width: 1560px; margin: 0 auto;
}
.rail, .feed { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.stage { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.stage-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }

/* ---------- panels ---------- */
.panel {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: var(--pad); min-width: 0;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2 {
  margin: 0; white-space: nowrap; font-family: var(--display); font-size: 12.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2);
}
.panel-meta { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.panel-meta.link { color: var(--teal); font-family: var(--body); font-weight: 600; }
.panel-meta.live { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); }
.panel-meta.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--glow-teal); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240,165,160,.6); } 100% { box-shadow: 0 0 0 9px rgba(240,165,160,0); } }

.stat-label { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* ---------- rail stats ---------- */
.stat-block { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 0; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px var(--pad); border-bottom: 1px solid var(--line); }
.stat:last-child { border-bottom: 0; }
.stat-value { font-family: var(--display); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-sub { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.burn-text { color: var(--burn); }

.you-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: var(--pad); }
.you-card.is-connected { border-color: var(--brass-deep); box-shadow: inset 0 0 0 1px rgba(228,181,80,.15), 0 0 30px -10px var(--glow); }
.you-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.you-status { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.you-card.is-connected .you-status { color: var(--buy); }
.you-hint { margin: 0; font-size: 13px; color: var(--muted); }
.you-addr { font-family: var(--mono); font-size: 12px; color: var(--text-2); margin: 0 0 10px; word-break: break-all; }
.you-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.you-grid .stat-value { font-size: 18px; }
.you-grid .kv { display: flex; flex-direction: column; gap: 2px; }
.you-grid .kv span:last-child { font-size: 11px; color: var(--muted); }
.you-actions { margin-top: 12px; display: flex; gap: 8px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-2); border-radius: 20px; padding: 22px 24px 18px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px 320px at 50% 62%, var(--glow), transparent 70%);
  opacity: var(--pot-glow, .3); transition: opacity 1s;
}
.hero-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.pot-row { display: flex; align-items: baseline; gap: 10px; }
.pot-sol { font-family: var(--display); font-size: clamp(34px, 4.6vw, 54px); font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--brass-2); text-shadow: 0 0 30px var(--glow); }
.pot-unit { font-family: var(--display); font-size: 16px; font-weight: 500; color: var(--brass); }
.pot-usd { font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.clock { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.clock-time { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); font-weight: 500; letter-spacing: .02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.clock-time.is-hot { color: var(--brass-2); animation: hot .5s steps(2) infinite; }
@keyframes hot { 50% { opacity: .55; } }
.clock-wave { font-size: 13px; color: var(--muted); }
.clock-wave b { color: var(--text); font-family: var(--mono); font-weight: 500; }

/* vault scene */
.vault-scene {
  position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: 6px auto 4px;
  perspective: 1300px;
}
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line-2); stroke-width: 6; }
.ring-fill {
  fill: none; stroke: url(#ringGrad); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 1294; stroke-dashoffset: 1294; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1);
  filter: drop-shadow(0 0 6px var(--glow));
}
.ring-ticks line { stroke: var(--line-2); stroke-width: 2; }
.ring-ticks line.on { stroke: var(--brass); }
.vault-interior {
  position: absolute; inset: 9.5%; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #4a2418, #1a0e0a 72%);
  box-shadow: inset 0 0 60px #000, inset 0 0 0 6px #2a1510;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden;
}
.cow { position: relative; width: 44%; height: auto; display: block; transform: translateY(6px); transition: transform .8s cubic-bezier(.2,1.2,.4,1); }
.vault-scene.is-open .cow { transform: translateY(-4px); animation: nod 1.6s ease-in-out .6s infinite alternate; }
@keyframes nod { to { transform: translateY(-4px) rotate(-3deg); } }
.interior-glow { position: absolute; inset: 0; background: radial-gradient(circle, rgba(246,210,122,.55), transparent 60%); opacity: 0; transition: opacity .6s; }
.vault-scene.is-open .interior-glow { opacity: 1; animation: glowpulse 1.4s ease-in-out infinite alternate; }
@keyframes glowpulse { to { transform: scale(1.15); opacity: .7; } }
.prize-badge {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  transform: scale(.4); opacity: 0; transition: transform .7s cubic-bezier(.2,1.4,.4,1) .35s, opacity .4s .35s;
}
.vault-scene.is-open .prize-badge { transform: scale(1); opacity: 1; }
.prize-ticker { font-family: var(--display); font-weight: 900; font-size: 30px; color: var(--brass-2); text-shadow: 0 0 24px var(--glow); letter-spacing: -.02em; }
.prize-amount { font-family: var(--mono); font-size: 18px; color: var(--text); }
.prize-usd { font-size: 13px; color: var(--muted); }
.vault-door {
  position: absolute; inset: 4.5%;
  transform-origin: 7% 50%; transform-style: preserve-3d;
  transition: transform 1.3s cubic-bezier(.6,0,.2,1);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.65));
}
.vault-door svg { width: 100%; height: 100%; display: block; }
.vault-scene.is-open .vault-door { transform: rotateY(-108deg); }
.vault-scene.is-shaking .vault-door { animation: shake .5s ease-in-out; }
@keyframes shake { 0%,100% { transform: translateX(0) } 20% { transform: translateX(-3px) rotate(-.4deg) } 40% { transform: translateX(3px) rotate(.4deg) } 60% { transform: translateX(-2px) } 80% { transform: translateX(2px) } }
.dial { transform-origin: 180px 180px; transition: transform 4.2s cubic-bezier(.12,.75,.12,1); }
.dial .seg { fill: var(--ink); stroke: #160a07; stroke-width: 1.5; transition: fill .3s; }
.dial .seg:nth-child(4n+1) { fill: var(--cream); }
.dial text { font-family: var(--mono); font-size: 10.5px; font-weight: 700; fill: var(--cream); letter-spacing: .02em; }
.dial text:nth-child(4n+2) { fill: var(--ink); }
.dial .seg.hit { fill: var(--brass); }
.dial .seg.hit + text { fill: var(--brass-ink) !important; }
.spokes { transform-origin: 180px 180px; }
.spokes line { stroke: #dcae48; stroke-width: 7; stroke-linecap: round; }
.vault-scene.is-spinning .spokes { animation: spokes 1.2s linear infinite; }
@keyframes spokes { to { transform: rotate(-360deg); } }
.phase-chip {
  position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--text-2); padding: 6px 14px; border-radius: 999px;
}
.phase-chip.is-hot { color: var(--brass-ink); background: var(--brass); border-color: var(--brass); }
.phase-chip.is-burn { color: #fff; background: var(--burn); border-color: var(--burn); }

/* timeline */
.timeline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; position: relative; }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding-top: 14px; }
.timeline li::before { content: ""; position: absolute; top: 5px; left: -50%; right: 50%; height: 2px; background: var(--line-2); }
.timeline li:first-child::before { display: none; }
.timeline li.is-done::before { background: var(--brass); }
.timeline li.is-active::before { background: linear-gradient(90deg, var(--brass), var(--line-2)); }
.tl-dot { position: absolute; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); }
.timeline li.is-done .tl-dot { background: var(--brass); border-color: var(--brass); }
.timeline li.is-active .tl-dot { border-color: var(--brass-2); background: var(--brass-2); box-shadow: 0 0 0 4px rgba(246,210,122,.2); animation: pulse-brass 1.2s infinite; }
@keyframes pulse-brass { 50% { box-shadow: 0 0 0 7px rgba(246,210,122,.08); } }
.tl-name { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.timeline li.is-active .tl-name { color: var(--brass-2); }
.timeline li.is-done .tl-name { color: var(--text-2); }
.tl-desc { font-size: 11px; color: var(--muted); line-height: 1.3; max-width: 11ch; }

/* ---------- reel ---------- */
.reel { position: relative; height: 132px; overflow: hidden; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); }
.reel-window {
  position: absolute; left: 0; right: 0; top: 44px; height: 44px; pointer-events: none; z-index: 2;
  border-top: 1px solid var(--brass-deep); border-bottom: 1px solid var(--brass-deep);
  background: linear-gradient(90deg, rgba(228,181,80,.12), transparent 30%, transparent 70%, rgba(228,181,80,.12));
}
.reel::before, .reel::after { content: ""; position: absolute; left: 0; right: 0; height: 44px; z-index: 3; pointer-events: none; }
.reel::before { top: 0; background: linear-gradient(var(--bg), transparent); }
.reel::after { bottom: 0; background: linear-gradient(transparent, var(--bg)); }
.reel-list { list-style: none; margin: 0; padding: 0; will-change: transform; }
.reel-list li { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.reel-list li .tix { color: var(--muted); font-size: 11px; }
.reel-list li.you { color: var(--teal); }
.reel-list li.you::after { content: "you"; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-left: 8px; }
.reel.is-idle .reel-list li { color: var(--muted); opacity: .6; }
.reel-result { margin-top: 10px; min-height: 22px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reel-result .win { font-family: var(--mono); color: var(--brass-2); }
.reel-result .chip { font-family: var(--mono); font-size: 11px; background: var(--bg-3); border: 1px solid var(--line-2); padding: 2px 7px; border-radius: 5px; color: var(--text); }

/* ---------- log ---------- */
.log { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 12px; display: flex; flex-direction: column; gap: 5px; max-height: 190px; overflow: hidden; }
.log li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; color: var(--text-2); animation: rise .35s ease-out; }
.log li time { color: var(--muted); }
.log li.hi { color: var(--brass-2); }
.log li.burn { color: var(--burn); }
.log li.teal { color: var(--teal); }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- odds ---------- */
.odds-form { display: flex; gap: 8px; }
.odds-form input {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-2); color: var(--text);
  font-family: var(--mono); font-size: 12.5px; padding: 10px 12px; border-radius: var(--r-sm);
}
.odds-form input::placeholder { color: var(--muted); }
.btn {
  background: var(--brass); color: var(--brass-ink); border: 0; border-radius: var(--r-sm); padding: 10px 16px;
  font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--brass-2); }
.btn.ghost { background: transparent; color: var(--brass); border: 1px solid var(--brass-deep); }
.btn.ghost:hover { background: rgba(228,181,80,.1); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.odds-out { margin-top: 12px; }
.odds-out p { margin: 0; font-size: 13px; }
.odds-out .fail { color: var(--sell); }
.odds-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; margin-top: 4px; }
.odds-grid .kv { display: flex; flex-direction: column; }
.odds-grid .kv b { font-family: var(--display); font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.odds-grid .kv span { font-size: 11px; color: var(--muted); }
.odds-note { margin-top: 10px !important; color: var(--muted); }
.odds-note code { font-family: var(--mono); color: var(--text-2); }

/* ---------- fair ---------- */
.fair-grid, .proof-grid { margin: 0 0 10px; display: flex; flex-direction: column; gap: 10px; }
.fair-grid dt, .proof-grid dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.fair-grid dd, .proof-grid dd { margin: 0; color: var(--text-2); }
.fair-panel .btn { margin-top: 6px; }

/* ---------- trades ---------- */
.spark { width: 100%; height: 48px; display: block; margin-bottom: 10px; border-radius: 6px; background: var(--bg); }
.trades { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow: hidden; }
.trades li {
  display: grid; grid-template-columns: 46px 1fr auto auto; gap: 10px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; animation: rise .3s ease-out;
}
.trades li:last-child { border-bottom: 0; }
.trades .side { font-weight: 700; font-size: 11px; letter-spacing: .06em; }
.trades .buy .side { color: var(--buy); }
.trades .sell .side { color: var(--sell); }
.trades .amt { color: var(--text); }
.trades .fee { color: var(--brass); }
.trades .ago { color: var(--muted); font-size: 11px; }

/* ---------- winners ---------- */
.winners { list-style: none; margin: 0; padding: 0; }
.winners li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); animation: rise .4s ease-out; }
.winners li:last-child { border-bottom: 0; }
.winners .wn { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.winners .stk { display: flex; flex-direction: column; min-width: 0; }
.winners .stk b { font-family: var(--mono); font-size: 13px; color: var(--text); }
.winners .stk span { font-size: 11.5px; color: var(--muted); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.winners .val { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.winners .val b { font-family: var(--display); font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; }
.winners .val a { font-size: 11px; }
.winners li.you .stk b::after { content: "you"; margin-left: 6px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: center; padding: 22px 24px 40px; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.foot b { color: var(--brass); font-weight: 500; }

/* ---------- pages ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 40px 24px 80px; }
.prose { max-width: 720px; }
.page-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 12px; text-wrap: balance; }
.lede { font-size: 17px; color: var(--text-2); margin: 0 0 32px; max-width: 62ch; }
.prose h2 { font-family: var(--display); font-weight: 500; font-size: 18px; margin: 40px 0 12px; color: var(--brass-2); }
.prose p { max-width: 68ch; margin: 0 0 14px; color: var(--text-2); }
.prose b { color: var(--text); }
.loop-list { counter-reset: step; list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.loop-list li { counter-increment: step; position: relative; padding-left: 40px; min-height: 26px; color: var(--text-2); }
.loop-list li::before { content: counter(step); position: absolute; left: 0; top: 0; font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--brass-ink); background: var(--brass); border-radius: 6px; width: 26px; height: 26px; display: grid; place-items: center; }
.callout { background: rgba(240,165,160,.07); border: 1px solid var(--teal-deep); border-radius: var(--r); padding: 14px 16px; margin: 18px 0; color: var(--text-2); }
.stock-grid { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.stock-grid li { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; }
.stock-grid b { font-family: var(--mono); font-size: 13px; }
.stock-grid span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stock-grid .up { color: var(--buy); }
.stock-grid .dn { color: var(--sell); }

/* draws table */
.draw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.draw-stats .tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.draw-stats .tile b { display: block; font-family: var(--display); font-weight: 500; font-size: 22px; font-variant-numeric: tabular-nums; }
.draw-stats .tile span { font-size: 12px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.draws-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 820px; }
.draws-table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.draws-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.draws-table tr:last-child td { border-bottom: 0; }
.draws-table tr:hover td { background: var(--bg-3); }
.draws-table .mono { font-size: 12px; }
.draws-table td b { font-family: var(--mono); font-weight: 700; }
.draws-table .usd { font-family: var(--display); font-weight: 500; }
.draws-table .burn { color: var(--burn); }
.draws-table tr.you td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.draws-table .rollover td { color: var(--muted); font-style: italic; }

/* ---------- proof dialog ---------- */
.proof { border: 1px solid var(--line-2); border-radius: 18px; background: var(--bg-2); color: var(--text); padding: 28px; width: min(680px, 94vw); max-height: 90vh; overflow: auto; }
.proof::backdrop { background: rgba(6,8,12,.8); backdrop-filter: blur(4px); }
.proof-close-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.proof-head h2 { font-family: var(--display); font-weight: 700; font-size: 30px; margin: 2px 0 8px; }
.proof-head p { margin: 0 0 18px; }
.proof-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 12px; }
.proof-steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 8px 10px; background: var(--bg); border-radius: var(--r-sm); border: 1px solid var(--line); animation: rise .3s; color: var(--text-2); }
.proof-steps li::before { content: "·"; color: var(--muted); }
.proof-steps li.ok::before { content: "✓"; color: var(--buy); }
.proof-steps li.bad::before { content: "✕"; color: var(--sell); }
.proof-steps li b { color: var(--brass-2); font-weight: 500; }
.proof-steps li.final { border-color: var(--brass-deep); color: var(--text); }

/* ---------- vote ---------- */
.stage-row.one { grid-template-columns: 1fr; }
.vote-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.vote-list li { display: grid; grid-template-columns: 26px 96px 1fr 52px 64px auto; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.vote-list li.out { opacity: .6; }
.vote-list li.mine { opacity: 1; }
.vote-list .rank { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.vote-list .tk { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.vote-list .tk b { font-family: var(--mono); font-size: 12.5px; }
.vote-list .tk span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vote-list .bar { display: block; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.vote-list .bar i { display: block; height: 100%; background: var(--line-2); border-radius: 4px; }
.vote-list li.in .bar i { background: linear-gradient(90deg, var(--brass-deep), var(--brass)); }
.vote-list li.mine .bar i { background: linear-gradient(90deg, var(--teal-deep), var(--teal)); }
.vote-list .votes { font-family: var(--mono); font-size: 11.5px; text-align: right; font-variant-numeric: tabular-nums; }
.vote-list .state { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.vote-list .state.enters { color: var(--buy); }
.vote-list .state.drops-out { color: var(--sell); }
.vote-list .btn.sm { padding: 4px 9px; font-size: 11px; }
.vote-list .btn[disabled] { opacity: .35; cursor: not-allowed; }
.vote-list li.mine .btn { background: var(--teal); color: var(--ink); border-color: var(--teal); }

/* ---------- you card extras ---------- */
.you-streak { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.you-streak b { color: var(--brass-2); }
.you-actions .btn { text-decoration: none; }

/* ---------- Milk Bar ---------- */
.bar-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.mono-h1 { font-family: var(--mono) !important; letter-spacing: 0 !important; }
.bar-actions { display: flex; gap: 8px; margin-bottom: 14px; }
.bar-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--gap); margin: 0 0 var(--gap); }
.page .panel + .panel, .page .draw-stats + .bar-cols { margin-top: var(--gap); }
.holdings { list-style: none; margin: 0; padding: 0; }
.holdings li { display: grid; grid-template-columns: 80px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.holdings li:last-child { border-bottom: 0; }
.holdings b { font-family: var(--mono); }
.holdings .usd { font-family: var(--display); font-weight: 500; font-variant-numeric: tabular-nums; }
.streak-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0 12px; }
.streak-track span { text-align: center; font-family: var(--mono); font-size: 11px; padding: 8px 0; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.streak-track span.on { background: rgba(228,181,80,.15); border-color: var(--brass-deep); color: var(--brass-2); }
.table-wrap.plain { border: 0; background: transparent; }
.draws-table .actions { display: flex; gap: 6px; }
.addr { font-family: var(--mono); color: var(--text-2); }
.addr:hover { color: var(--teal); }
.reel-result a.win { text-decoration: none; }

/* ---------- Verify page ---------- */
.verify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.verify-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.field input, .field textarea, .field select {
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font-family: var(--mono); font-size: 12px;
  padding: 9px 11px; border-radius: var(--r-sm); width: 100%;
}
.field select { font-family: var(--body); font-size: 13px; }
.field textarea { resize: vertical; line-height: 1.5; }
.callout.small { font-size: 13px; margin-top: 16px; }

/* ---------- share ---------- */
.share-img { width: 100%; border-radius: 10px; border: 1px solid var(--line-2); display: block; margin-bottom: 14px; }
.proof-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.proof-actions .btn { text-decoration: none; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 14px; background: var(--bg-3); border: 1px solid var(--brass-deep); color: var(--text);
  padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); font-size: 14px; animation: rise .3s;
}

/* ---------- confetti ---------- */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .dash { grid-template-columns: minmax(0, 1fr) 320px; }
  .rail { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .stat-block { display: grid; grid-template-columns: repeat(4, 1fr); grid-column: 1; }
  .stat { border-bottom: 0; border-right: 1px solid var(--line); }
  .stat:last-child { border-right: 0; }
  .stage { grid-column: 1; grid-row: 2; }
  .feed { grid-column: 2; grid-row: 2; }
}
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
  .brand-tag { display: none; }
  .nav { order: 3; width: 100%; margin: 0; }
  .topbar-tools { margin-left: auto; }
  .sim-badge, .icon-btn span { display: none; }
  .dash { grid-template-columns: 1fr; padding: 12px; }
  .rail, .stage, .feed { grid-column: 1; grid-row: auto; }
  .rail { grid-template-columns: 1fr; }
  .stat-block { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stage-row { grid-template-columns: 1fr; }
  .hero { padding: 16px; }
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 14px 6px; }
  .vote-list { grid-template-columns: 1fr; }
  .vote-list li { grid-template-columns: 22px 84px 1fr 44px auto; }
  .vote-list .state { display: none; }
  .bar-cols, .verify-grid { grid-template-columns: 1fr; }
  .page { padding: 24px 16px 60px; }
  .draw-stats { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 19px; }
  .pot-sol { font-size: 38px; }
  .clock-time { font-size: 30px; }
  .foot { gap: 6px 16px; }
  .proof { padding: 20px 16px; }
  .timeline li::before { display: none; }
  .tl-desc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
  .marquee-track { animation: none; }
}
