:root {
  --bg: #0a0a0a;
  --fg: #f2f2f2;
  --mute: #8a8a8a;
  --faint: #4a4a4a;
  --line: #1e1e1e;
  --panel: #111;
  --up: #f2f2f2;
  --down: #8a8a8a;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafafa; --fg: #0a0a0a; --mute: #6b6b6b; --faint: #b5b5b5;
    --line: #e6e6e6; --panel: #fff; --up: #0a0a0a; --down: #6b6b6b;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font: 15px/1.5 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
.muted { color: var(--mute); }
.label {
  font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute);
}

/* ---------- top ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.04em; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--fg); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
nav { display: flex; gap: 8px; min-width: 0; }
.pill {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 13px; text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.pill:hover { border-color: var(--mute); }
.pill.copied { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill[hidden] { display: none; }

main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }

/* ---------- stage: screen + mind ---------- */
.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0;
  border-bottom: 1px solid var(--line);
}
.screen {
  position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden;
  margin: 24px 24px 24px 0; border: 1px solid var(--line);
}
.screen video { width: 100%; height: 100%; object-fit: contain; display: block; }
.screen-off {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #777; font: 13px var(--mono); background: #000;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
}
.screen-off[hidden] { display: none; }
.screen-off span::after { content: '▍'; animation: blink 1s steps(1) infinite; margin-left: 4px; }
@keyframes blink { 50% { opacity: 0; } }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 8px; border-radius: 4px;
  font: 600 11px/1 var(--mono); letter-spacing: 0.1em; background: rgba(0,0,0,.6); color: #777;
  backdrop-filter: blur(6px);
}
.badge.on { color: #fff; }
.badge.on::before { content: '● '; }

.mind { display: flex; flex-direction: column; min-height: 0; padding: 24px 0 0 24px; border-left: 1px solid var(--line); }
.mind-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; }
.mode {
  font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--mute);
}
.mode.live { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.mode.killed { text-decoration: line-through; }
.now { padding: 14px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.now p { margin-top: 8px; font-size: 17px; line-height: 1.4; font-weight: 500; letter-spacing: -0.01em; }

.feed {
  list-style: none; flex: 1; overflow-y: auto; min-height: 0; max-height: calc(56.25vw * 0.72);
  padding: 4px 0 24px; scrollbar-width: thin; scrollbar-color: var(--faint) transparent;
  mask-image: linear-gradient(to bottom, #000 85%, transparent);
}
.feed li { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 52px 1fr; gap: 10px; }
.feed li.fresh { animation: in .5s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(-4px); } }
.feed time { font: 12px/1.6 var(--mono); color: var(--faint); }
.feed .body { min-width: 0; overflow-wrap: anywhere; }
.feed .kind { font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); display: block; margin-bottom: 5px; }
.feed .text { font-size: 14px; }
.feed .why { color: var(--mute); font-size: 13px; margin-top: 3px; }
.feed li.trade .text { font-family: var(--mono); font-size: 13px; }
.feed li.trade.buy .kind, .feed li.win .kind { color: var(--fg); }
.feed li.refused .text { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--faint); }
.feed a { color: var(--mute); text-decoration: none; border-bottom: 1px solid var(--faint); }
.feed .empty { display: block; color: var(--mute); grid-column: 1 / -1; }

/* ---------- money strip ---------- */
.money {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; border-bottom: 1px solid var(--line);
}
.stat, .holds { padding: 28px 24px 28px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat + .stat, .holds { padding-left: 24px; border-left: 1px solid var(--line); }
.value { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big .value { font-size: clamp(36px, 4.5vw, 56px); }
.sub { color: var(--mute); font: 13px var(--mono); }
.value.up { color: var(--up); }
.value.down { color: var(--down); }
.value.tick { animation: tick .8s ease-out; }
@keyframes tick { from { opacity: .35; } }
.holds ul { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 120px; overflow-y: auto; }
.holds li { display: flex; justify-content: space-between; gap: 12px; font: 13px var(--mono); }
.holds li span:last-child { color: var(--mute); }

/* ---------- story ---------- */
.story { max-width: 760px; padding: 72px 0 80px; }
.lead { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; }
blockquote { margin: 48px 0; padding-left: 20px; border-left: 2px solid var(--fg); }
blockquote p { font-size: 18px; line-height: 1.45; }
blockquote a { display: inline-block; margin-top: 10px; color: var(--mute); font-size: 13px; text-decoration: none; }
blockquote a:hover { color: var(--fg); }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.facts dt { font: 500 11px/1.9 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.facts dd { overflow-wrap: anywhere; }
.facts dd a { text-decoration: none; border-bottom: 1px solid var(--faint); }

.foot { padding: 20px clamp(16px, 3vw, 32px); border-top: 1px solid var(--line); color: var(--mute); font-size: 12px; }
.mockflag { position: fixed; bottom: 12px; right: 12px; font: 11px var(--mono); color: var(--mute); border: 1px dashed var(--faint); padding: 4px 8px; border-radius: 4px; background: var(--bg); }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; }
  .screen { margin: 16px 0; }
  .mind { border-left: 0; padding: 0; }
  .feed { max-height: 420px; }
  .money { grid-template-columns: 1fr 1fr; }
  .big, .holds { grid-column: 1 / -1; }
  .stat, .holds { padding: 20px 0; border-left: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--line); }
  .stat + .stat { padding-left: 16px !important; border-left: 1px solid var(--line) !important; }
  .money .stat:nth-child(2) { padding-left: 0 !important; border-left: 0 !important; }
}
@media (max-width: 520px) {
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .story { padding: 48px 0 56px; }
  #caChip { max-width: 140px; overflow: hidden; }
}
.brand .mark { height: 16px; width: auto; display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .brand .mark { filter: invert(1); } }
