/* =========================================================
   ODDS OF WAR — SHOWCASE
   aesthetic: Jony Ive minimalism × Bloomberg terminal × war room
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
:root {
  --bg: #0a0b0d;
  --bg-2: #0f1114;
  --bg-3: #16181d;
  --ink: #f4efe6;
  --ink-2: #c8bfae;
  --ink-3: #8a8275;
  --mute: #55504a;
  --amber: #F5C451;
  --amber-2: #E0A33C;
  --blood: #E06B4E;
  --green: #5FC48A;
  --blue: #6FAAD9;
  --line: rgba(244,239,230,0.08);
  --line-2: rgba(244,239,230,0.14);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --------- ambient background --------- */
.grain {
  position: fixed; inset:0; pointer-events:none; z-index:1; opacity:.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.bg-gradient {
  position: fixed; inset: -20% -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 1000px 700px at 10% -10%, rgba(245,196,81,0.07), transparent 60%),
    radial-gradient(ellipse 900px 700px at 110% 10%, rgba(224,107,78,0.06), transparent 60%),
    radial-gradient(ellipse 1200px 800px at 50% 120%, rgba(111,170,217,0.05), transparent 60%);
  filter: blur(40px);
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-3%,2%) scale(1.05); }
}

/* --------- HUD --------- */
.hud {
  position: fixed; top:18px; right:20px; z-index: 100;
  display: inline-flex; align-items:center; gap:10px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(15,17,20,0.7);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(14px);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-2);
}
.hud-dot { width:8px; height:8px; border-radius:50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity:.4; transform: scale(0.85); } }
.hud-label { color: var(--green); font-weight: 600; }
.hud-sep { opacity: .4; }

/* --------- NAV --------- */
.nav {
  position: fixed; top: 18px; left: 20px; z-index: 100;
  display: flex; align-items: center; gap: 40px;
  padding: 8px 18px; border-radius: 999px;
  background: rgba(15,17,20,0.7);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(14px);
}
.nav-brand { display:flex; align-items:center; gap:10px; }
.brand-mark { color: var(--amber); font-size: 16px; filter: drop-shadow(0 0 8px rgba(245,196,81,0.6)); }
.brand-word { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; font-weight: 600; }
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none; transition: color .25s;
}
.nav-links a:hover { color: var(--ink); }

/* --------- HERO --------- */
.hero {
  position: relative; z-index: 2;
  min-height: 100vh; padding: 120px 6vw 80px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.hero-backticker {
  position: absolute; top: 70px; left:0; right:0;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: rgba(244,239,230,0.18); white-space: nowrap;
  padding: 0 40px; pointer-events: none;
}
.hero-inner { position: relative; z-index: 3; max-width: 1200px; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--amber); text-transform: uppercase; margin-bottom: 32px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 8.5vw, 132px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 32px;
}
.hero-title .line { display: block; }
.hero-title .accent {
  font-style: italic;
  background: linear-gradient(96deg, var(--amber) 0%, var(--blood) 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5; color: var(--ink-2);
  max-width: 680px; margin-bottom: 60px;
}

.hero-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 40px; max-width: 900px; margin-bottom: 90px; }
.stat { border-top: 1px solid var(--line-2); padding-top: 16px; }
.stat-num {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 4vw, 56px); line-height: 1; letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; margin-top: 8px; }

.hero-cta { display: flex; align-items: center; gap: 16px; opacity: .5; }
.cta-hint { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); }
.cta-arrow { animation: bounce 2s ease-in-out infinite; font-size: 20px; color: var(--ink-3); }
@keyframes bounce { 0%,100%{transform:translateY(0);} 50%{transform:translateY(8px);} }

/* floating price chips */
.price-chips { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.chip {
  position: absolute; display: inline-flex; gap: 10px; align-items: center;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(22,24,29,0.85); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11px;
  backdrop-filter: blur(10px);
  max-width: 320px; opacity: 0; transition: opacity .8s ease;
}
.chip.visible { opacity: 1; }
.chip .chip-pct { font-weight: 600; }
.chip .chip-pct.up { color: var(--green); }
.chip .chip-pct.down { color: var(--blood); }
.chip .chip-q { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--sans); font-size: 11px; }

/* --------- SECTIONS --------- */
.section {
  position: relative; z-index: 2;
  padding: 140px 6vw;
  border-top: 1px solid var(--line);
  max-width: 1600px; margin: 0 auto;
}
.section-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em;
  color: var(--amber); text-transform: uppercase; margin-bottom: 28px;
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 5.5vw, 78px);
  line-height: 1.02; letter-spacing: -0.025em;
  color: var(--ink); margin-bottom: 28px; max-width: 1200px;
}
.section-title em { font-style: italic; color: var(--amber); }
.section-title.huge { font-size: clamp(64px, 10vw, 180px); }
.section-lede {
  font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-2);
  max-width: 760px; margin-bottom: 70px; line-height: 1.6;
}
.section-lede strong { color: var(--ink); font-weight: 500; }

/* --------- THESIS --------- */
.thesis-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: var(--line-2); border: 1px solid var(--line-2);
  margin-bottom: 80px;
}
.thesis-card {
  background: var(--bg-2);
  padding: 36px 28px 32px;
  display: flex; flex-direction: column; gap: 6px;
  transition: background .3s;
}
.thesis-card:hover { background: var(--bg-3); }
.thesis-big {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1; letter-spacing: -0.03em; color: var(--amber);
}
.thesis-lbl { font-size: 13px; color: var(--ink-2); line-height: 1.4; margin-top: 4px; }
.thesis-delta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--green); margin-top: 14px; text-transform: uppercase; }

.quote-block {
  border-left: 2px solid var(--amber);
  padding: 28px 0 28px 36px;
  max-width: 900px;
}
.q-mark { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--amber); margin-bottom: -14px; }
.q-body { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.1vw, 32px); line-height: 1.4; color: var(--ink); max-width: 800px; }
.q-author { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; margin-top: 20px; }

/* --------- DEMO STACK --------- */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.stack-card {
  position: relative;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--line-2);
  padding: 28px; border-radius: 16px;
  text-decoration: none; color: inherit;
  transition: all .35s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
.stack-card::before {
  content:""; position:absolute; inset:0; opacity:0; transition: opacity .35s;
  background: radial-gradient(300px circle at var(--mx,50%) var(--my,50%), rgba(245,196,81,0.12), transparent 70%);
  pointer-events: none;
}
.stack-card:hover { transform: translateY(-4px); border-color: var(--amber); }
.stack-card:hover::before { opacity: 1; }
.card-num { font-family: var(--serif); font-weight: 500; font-size: 42px; line-height: 1; color: var(--amber); margin-bottom: 18px; }
.card-title { font-family: var(--serif); font-size: 24px; line-height: 1.1; color: var(--ink); margin-bottom: 10px; letter-spacing: -0.01em; }
.card-desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.card-arrow { position: absolute; right: 24px; bottom: 22px; color: var(--amber); font-size: 18px; }

/* --------- PANELS --------- */
.panel {
  background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: 14px;
  padding: 24px 26px; margin-top: 28px;
}
.panel-wide { margin-top: 28px; }
.panel-hdr {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 16px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.panel-hdr > span:first-child { color: var(--ink); font-weight: 600; }
.panel-sub { color: var(--ink-3); }

.split-12 { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; margin-top: 40px; }
.split-21 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }

/* --------- FEED --------- */
.feed-box {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.feed-hdr {
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.feed-title { color: var(--ink); font-weight: 600; }
.feed-pulse {
  width:8px; height:8px; border-radius:50%; background: var(--green); box-shadow: 0 0 10px var(--green);
  animation: pulse 1.4s ease-in-out infinite;
}
.feed-scroll {
  max-height: 620px; overflow-y: auto; padding: 8px 0;
  scrollbar-width: thin; scrollbar-color: var(--mute) transparent;
}
.feed-scroll::-webkit-scrollbar { width: 6px; }
.feed-scroll::-webkit-scrollbar-thumb { background: var(--mute); border-radius: 3px; }
.tweet {
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  animation: slideIn .5s ease;
}
.tweet.fresh { background: linear-gradient(90deg, rgba(245,196,81,0.06), transparent 40%); }
@keyframes slideIn { from { opacity:0; transform:translateY(-6px);} to { opacity:1; transform:translateY(0);} }
.tw-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tw-author { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--amber); letter-spacing: 0.06em; }
.tw-meta { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.tw-text { font-size: 13px; line-height: 1.45; color: var(--ink); }
.tw-stats { margin-top: 6px; font-family: var(--mono); font-size: 10px; color: var(--ink-3); display: flex; gap: 14px; }

/* KV rows */
.kv-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 18px; }
.kv { border-top: 1px solid var(--line); padding-top: 10px; }
.kv-lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; }
.kv-val { font-family: var(--serif); font-size: 28px; line-height: 1.1; color: var(--ink); margin-top: 4px; }

/* --------- CHARTS --------- */
.chart-big { width: 100%; height: 320px; position: relative; }
.chart-replay { height: 380px; }
.chart-big svg { width: 100%; height: 100%; overflow: visible; }
.axis path, .axis line { stroke: var(--line-2); shape-rendering: crispEdges; }
.axis text { fill: var(--ink-3); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; }
.grid line { stroke: var(--line); stroke-dasharray: 2 4; }
.grid path { display: none; }
.line-tw { stroke: var(--blue); stroke-width: 1.5; fill: none; }
.line-op { stroke: var(--amber); stroke-width: 1.5; fill: none; }
.line-po { stroke: var(--blood); stroke-width: 2; fill: none; }
.area-tw { fill: url(#grad-tw); opacity: .28; }
.legend { display: flex; gap: 18px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; margin-top: 10px; color: var(--ink-3); }
.legend .sw { display: inline-block; width: 10px; height: 2px; margin-right: 6px; vertical-align: middle; }

/* --------- ENGINE DIAGRAM --------- */
.engine-diagram {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  margin: 40px 0 60px;
}
.engine-layer {
  width: 100%; max-width: 960px;
  border: 1px solid var(--line-2); border-radius: 14px;
  padding: 20px 26px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
}
.layer-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.layer-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  background: var(--bg); border: 1px solid var(--line-2);
  padding: 8px 14px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
  transition: all .25s;
}
.pill:hover { border-color: var(--amber); color: var(--ink); }
.engine-arrow { font-size: 22px; color: var(--mute); }

/* --------- MOVERS --------- */
.movers-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.mover {
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 16px; cursor: pointer;
  transition: all .25s;
}
.mover:hover { border-color: var(--amber); transform: translateY(-2px); }
.mover.active { border-color: var(--amber); background: linear-gradient(160deg, rgba(245,196,81,0.06), var(--bg-3)); }
.mv-q { font-size: 13px; line-height: 1.4; color: var(--ink); margin-bottom: 10px; height: 36px; overflow: hidden; }
.mv-row { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; }
.mv-price { color: var(--ink-2); }
.mv-delta { font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.mv-delta.up { background: rgba(95,196,138,0.1); color: var(--green); }
.mv-delta.down { background: rgba(224,107,78,0.1); color: var(--blood); }
.mv-cat { margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; }
.replay-meta { margin-top: 16px; padding: 14px; background: var(--bg-3); border-radius: 10px; font-size: 13px; color: var(--ink-2); min-height: 40px; }

/* --------- LEADERBOARD --------- */
.leaderboard { display: flex; flex-direction: column; gap: 2px; max-height: 580px; min-width: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--mute) transparent; }
.leaderboard::-webkit-scrollbar { width: 6px; }
.leaderboard::-webkit-scrollbar-thumb { background: var(--mute); border-radius: 3px; }
.whale {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 16px; align-items: center;
  grid-template-areas: "rank who pnl vol";
  padding: 12px 14px; border-radius: 8px;
  background: var(--bg-3);
  transition: background .25s;
  min-width: 0;
}
.whale:hover { background: var(--bg-2); border: 1px solid var(--line-2); }
.w-rank { grid-area: rank; font-family: var(--serif); font-weight: 500; font-size: 22px; color: var(--amber); }
.w-who { grid-area: who; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-who small { display: block; color: var(--ink-3); font-size: 10px; letter-spacing: 0.08em; margin-top: 2px; }
.w-pnl { grid-area: pnl; font-family: var(--mono); font-size: 13px; font-weight: 600; text-align: right; }
.w-pnl.pos { color: var(--green); }
.w-pnl.neg { color: var(--blood); }
.w-vol { grid-area: vol; font-family: var(--mono); font-size: 11px; color: var(--ink-3); text-align: right; }

/* activity feed */
.activity-feed { display: flex; flex-direction: column; gap: 2px; max-height: 580px; min-width: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--mute) transparent; }
.activity-feed::-webkit-scrollbar { width: 6px; }
.activity-feed::-webkit-scrollbar-thumb { background: var(--mute); border-radius: 3px; }
.trade {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center;
  grid-template-areas:
    "side q size"
    "side meta size";
  padding: 12px 14px; border-radius: 8px; background: var(--bg-3);
  animation: slideIn .5s ease;
  min-width: 0;
}
.t-side { grid-area: side; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; padding: 4px 8px; border-radius: 4px; }
.t-side.buy { background: rgba(95,196,138,0.15); color: var(--green); }
.t-side.sell { background: rgba(224,107,78,0.15); color: var(--blood); }
.t-side.unknown { background: rgba(255,255,255,0.08); color: var(--ink-2); }
.t-q { grid-area: q; min-width: 0; font-size: 12px; color: var(--ink); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-meta { grid-area: meta; min-width: 0; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.t-sz { grid-area: size; font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--amber); text-align: right; }
.t-sz small { display: block; font-weight: 400; font-size: 10px; color: var(--ink-3); margin-top: 2px; }

/* --------- PERFORMANCE --------- */
.perf-grid { display: grid; grid-template-columns: 420px 1fr; gap: 40px; align-items: center; margin-bottom: 60px; }
.perf-hero { display: flex; flex-direction: column; align-items: center; }
.perf-ring { position: relative; width: 300px; height: 300px; }
.perf-svg { width: 100%; height: 100%; }
.perf-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.perf-pct { font-family: var(--serif); font-weight: 500; font-size: 84px; line-height: 1; color: var(--ink); letter-spacing: -0.03em; }
.perf-lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--ink-3); text-transform: uppercase; margin-top: 4px; }
.perf-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-3); margin-top: 20px; text-transform: uppercase; }
.perf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.perf-stat { border-top: 1px solid var(--line-2); padding-top: 18px; }
.ps-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 10px; }
.ps-val { font-family: var(--serif); font-weight: 500; font-size: 52px; line-height: 1; color: var(--ink); letter-spacing: -0.02em; }

/* --------- ASK --------- */
.ask { padding: 160px 6vw; }
.ask-lede { font-size: clamp(18px, 1.55vw, 24px); color: var(--ink-2); max-width: 800px; margin-bottom: 80px; line-height: 1.5; }
.ask-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; background: var(--line-2); border: 1px solid var(--line-2); margin-bottom: 100px; }
.ask-card { background: var(--bg-2); padding: 42px 32px; transition: background .3s; }
.ask-card:hover { background: var(--bg-3); }
.ask-num { font-family: var(--serif); font-weight: 500; font-size: clamp(54px, 6vw, 88px); line-height: 1; letter-spacing: -0.035em; color: var(--amber); }
.ask-lbl { margin-top: 12px; font-size: 13px; color: var(--ink-2); max-width: 260px; line-height: 1.4; }

.final-quote { text-align: center; padding: 80px 0 40px; }
.fq-mark { color: var(--amber); font-size: 20px; letter-spacing: 0.3em; margin-bottom: 28px; }
.fq-body { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(28px, 3.5vw, 52px); line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); max-width: 900px; margin: 0 auto; }
.fq-sig { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; color: var(--ink-3); margin-top: 36px; text-transform: uppercase; }

.footer { margin-top: 80px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; }

/* responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-stats, .thesis-grid, .stack-grid, .ask-grid { grid-template-columns: 1fr 1fr; }
  .split-12, .split-21, .perf-grid { grid-template-columns: 1fr; }
  .movers-grid { grid-template-columns: 1fr 1fr; }
}

/* --- live chip on panel headers --- */
.live-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(95,196,138,0.08); border: 1px solid rgba(95,196,138,0.25);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em;
  color: var(--green); text-transform: uppercase; font-weight: 600;
  margin-left: auto;
}
.lc-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: pulse 1.4s ease-in-out infinite;
}
.panel-hdr { flex-wrap: wrap; gap: 8px; }
.panel-hdr > span:first-child { flex: 0 1 auto; }
.feed-hdr { justify-content: space-between; }

/* --- X embeds --- */
.x-embed {
  background: #0d0f12; border-radius: 10px; padding: 16px;
  min-height: 540px;
  overflow: hidden;
}
.x-embed-narrow { min-height: 400px; max-width: 600px; margin: 0 auto; }
.x-embed iframe { max-width: 100% !important; }
.x-embed .twitter-tweet, .x-embed .twitter-timeline { margin: 0 auto !important; }

/* === tehbag_io collage === */
.tehbag-collage {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "analytics feed"
    "overview reposts";
  gap: 18px;
  padding: 28px 8px 20px;
}
.tbg {
  position: relative; margin: 0;
  background: linear-gradient(180deg, #0d0f12, #07080a);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 2px 10px rgba(0,0,0,0.4);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s;
  overflow: hidden;
}
.tbg img { display: block; width: 100%; height: auto; }
.tbg figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.82) 70%);
  color: var(--ink); font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.tbg figcaption strong { color: var(--amber); font-weight: 700; letter-spacing: 0.04em; }
.tbg-analytics { grid-area: analytics; transform: rotate(-0.8deg); }
.tbg-feed      { grid-area: feed;      transform: rotate(1.2deg); }
.tbg-overview  { grid-area: overview;  transform: rotate(0.6deg); }
.tbg-reposts   { grid-area: reposts;   transform: rotate(-1.4deg); }
.tbg:hover {
  transform: rotate(0) translateY(-4px) scale(1.015);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px var(--amber);
  z-index: 10;
}
/* make the mobile screenshots taller than the analytics cards */
.tbg-feed img, .tbg-reposts img { object-fit: cover; max-height: 520px; }
/* subtle amber glow on the hero analytics */
.tbg-analytics::after {
  content: ""; position: absolute; inset: -2px; border-radius: 14px; pointer-events: none;
  background: linear-gradient(135deg, rgba(245,196,81,0.15), transparent 40%);
  mix-blend-mode: screen;
}
@media (max-width: 900px) {
  .tehbag-collage { grid-template-columns: 1fr; grid-template-areas: "analytics" "feed" "overview" "reposts"; }
  .tbg { transform: none !important; }
}

/* === timeline wrapper === */
.x-embed-timeline { min-height: 560px; padding: 8px; }
.x-embed-timeline .twitter-timeline,
.x-embed-timeline iframe { margin: 0 auto !important; display: block !important; }

/* === poly feed (custom X-style) === */
.poly-feed {
  background: linear-gradient(180deg, #0b0d10, #07080a);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
}
.pf-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.pf-av {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: #000; color: #fff;
  border: 1px solid var(--line-2);
}
.pf-name { font-family: var(--serif); font-weight: 500; font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.pf-handle { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; letter-spacing: 0.05em; }
.pf-check { color: #1d9bf0; font-size: 13px; margin-left: 4px; }
.pf-open {
  margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--amber); text-decoration: none; text-transform: uppercase;
  padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  transition: all .2s;
}
.pf-open:hover { border-color: var(--amber); background: rgba(245,196,81,0.06); }
.pf-body { max-height: 640px; overflow-y: auto; padding: 6px 0; scrollbar-width: thin; scrollbar-color: var(--mute) transparent; }
.pf-body::-webkit-scrollbar { width: 6px; }
.pf-body::-webkit-scrollbar-thumb { background: var(--mute); border-radius: 3px; }
.pf-loading { padding: 40px; text-align: center; color: var(--ink-3); font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; }
.pf-loading a { color: var(--amber); }
.pf-item { padding: 16px 22px; border-bottom: 1px solid var(--line); animation: slideIn .4s ease; }
.pf-item:hover { background: rgba(245,196,81,0.02); }
.pf-item-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.pf-item-who strong { color: var(--ink); }
.pf-item-handle { color: var(--ink-3); font-family: var(--mono); font-size: 11px; margin-left: 6px; }
.pf-item-time { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.pf-item-text { font-size: 14px; line-height: 1.5; color: var(--ink); margin: 6px 0 10px; }
.pf-item-text a { color: #1d9bf0; text-decoration: none; }
.pf-item-text a:hover { text-decoration: underline; }
.pf-item-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 4px; text-transform: uppercase;
}
.pf-tag-bull { background: rgba(95,196,138,0.12); color: var(--green); }
.pf-tag-bear { background: rgba(224,107,78,0.12); color: var(--blood); }
.pf-tag-conv { background: rgba(245,196,81,0.1); color: var(--amber); }
.pf-tag-cat  { background: rgba(111,170,217,0.1); color: var(--blue); }
.pf-item-open { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-3); text-decoration: none; text-transform: uppercase; }
.pf-item-open:hover { color: var(--amber); }

/* === event markers on replay chart === */
.event-tooltip {
  position: absolute; pointer-events: none; z-index: 9999;
  max-width: 380px; padding: 12px 14px;
  background: rgba(10,11,13,0.96);
  border: 1px solid var(--line-2); border-radius: 10px;
  font-family: var(--sans); font-size: 12px; line-height: 1.45;
  color: var(--ink);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  transition: opacity .15s;
  backdrop-filter: blur(10px);
}
.event-tooltip .et-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 6px; }
.event-tooltip .et-h strong { color: var(--ink); font-weight: 600; }
.event-tooltip .et-meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 8px; }
.event-tooltip .et-text { color: var(--ink); margin-bottom: 6px; }
.event-tooltip .et-reason { color: var(--ink-2); font-style: italic; font-size: 11.5px; padding-top: 6px; border-top: 1px solid var(--line); }
circle.evt { transition: r .2s, opacity .2s; }
circle.evt:hover { r: 6.5; opacity: 1; }

/* make chart-replay positioned so tooltip anchors work */
.chart-replay { position: relative; }

/* === SIGNAL ACCURACY TABLE === */
.sig-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sig-table {
  width: 100%; min-width: 880px;
  border-collapse: separate; border-spacing: 0;
  font-family: var(--sans); font-size: 13px;
  color: var(--ink);
}
.sig-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-2);
  padding: 12px 14px; text-align: left;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--ink-3); text-transform: uppercase; font-weight: 600;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.sig-table thead th.num { text-align: right; }
.sig-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.sig-table tbody tr { transition: background .18s; }
.sig-table tbody tr:hover { background: rgba(245,196,81,0.04); }
.sig-table tbody td.num { text-align: right; font-family: var(--mono); font-size: 12px; }
.sig-empty { text-align: center; color: var(--ink-3); padding: 30px !important; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; }

.sig-time { font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.sig-market { max-width: 340px; min-width: 220px; }
.sig-market-q { color: var(--ink); font-size: 13px; line-height: 1.35; margin-bottom: 4px; }
.sig-market-cat { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; }
.sig-market-tw { color: var(--ink-2); font-size: 11.5px; line-height: 1.45; margin-top: 6px; font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.sig-call { font-family: var(--mono); font-weight: 600; font-size: 11px; letter-spacing: 0.1em; padding: 3px 10px; border-radius: 4px; }
.sig-call.up { background: rgba(95,196,138,0.12); color: var(--green); }
.sig-call.down { background: rgba(224,107,78,0.12); color: var(--blood); }

.sig-mood { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--amber); text-transform: uppercase; }
.sig-conv { font-family: var(--mono); font-size: 13px; color: var(--amber); }

.sig-delta { font-family: var(--mono); font-weight: 600; padding: 4px 10px; border-radius: 4px; display: inline-block; min-width: 64px; text-align: right; }
.sig-delta.win { background: rgba(95,196,138,0.14); color: var(--green); }
.sig-delta.loss { background: rgba(224,107,78,0.14); color: var(--blood); }
.sig-delta.flat { background: rgba(255,255,255,0.06); color: var(--ink-3); }

.sig-verdict { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; font-weight: 600; }
.sig-verdict.win { background: rgba(95,196,138,0.14); color: var(--green); border: 1px solid rgba(95,196,138,0.3); }
.sig-verdict.loss { background: rgba(224,107,78,0.14); color: var(--blood); border: 1px solid rgba(224,107,78,0.3); }
.sig-verdict.flat { background: rgba(255,255,255,0.05); color: var(--ink-2); border: 1px solid var(--line-2); }

/* === REMOVE SMOOTH SCROLL (fixes the jumpy nav-click effect) === */
html { scroll-behavior: auto !important; }

/* === MOBILE OPTIMIZATION === */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  .nav { gap: 14px; padding: 6px 12px; max-width: calc(100vw - 180px); }
  .nav-brand .brand-word { display: none; }
  .hud { top: auto; bottom: 14px; right: 14px; font-size: 9px; padding: 6px 10px; }
  .hud-text { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .section { padding: 72px 5vw; }
  .hero { padding: 100px 5vw 60px; min-height: auto; }
  .hero-title { font-size: clamp(38px, 11vw, 72px); letter-spacing: -0.03em; }
  .hero-sub { font-size: 16px; margin-bottom: 36px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 48px; }
  .hero-backticker { display: none; }
  .price-chips .chip { display: none; }
  .section-title { font-size: clamp(32px, 8vw, 52px); }
  .section-title.huge { font-size: clamp(52px, 14vw, 96px); }
  .section-lede { font-size: 15px; margin-bottom: 40px; }
  .thesis-grid { grid-template-columns: 1fr 1fr; }
  .stack-grid { grid-template-columns: 1fr; gap: 12px; }
  .ask-grid { grid-template-columns: 1fr 1fr; }
  .split-12, .split-21, .perf-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .movers-grid { grid-template-columns: 1fr; }
  .engine-layer { padding: 16px 18px; }
  .panel, .panel-wide { padding: 16px 14px; }
  .panel-hdr { flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; font-size: 10px; }
  .panel-hdr > span:first-child, .panel-sub { white-space: normal; }
  .chart-big { height: 260px !important; min-height: 260px; }
  .perf-ring { width: 240px; height: 240px; }
  .perf-pct { font-size: 60px; }
  .feed-scroll { max-height: 480px; }
  .leaderboard, .activity-feed { max-height: 460px; }
  .pf-item { padding: 14px 16px; }
  .pf-item-text { font-size: 13px; }
  .kv-row { grid-template-columns: 1fr 1fr; }
  .tehbag-collage { grid-template-columns: 1fr; grid-template-areas: "analytics" "feed" "overview" "reposts"; gap: 14px; padding: 14px 4px; }
  .tbg { transform: none !important; }
  .whale {
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-areas:
      "rank who"
      "rank pnl"
      "rank vol";
    gap: 6px 10px;
    align-items: start;
  }
  .w-rank { font-size: 18px; padding-top: 2px; }
  .w-who { white-space: normal; overflow-wrap: anywhere; }
  .w-pnl, .w-vol { text-align: left; }
  .trade {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "side size"
      "q q"
      "meta meta";
    gap: 8px 10px;
    align-items: start;
  }
  .t-q { white-space: normal; overflow-wrap: anywhere; }
  .t-meta { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
  .t-sz { text-align: right; }
  .sig-table { font-size: 12px; min-width: 760px; }
  .poly-feed .pf-open { font-size: 10px; padding: 5px 10px; }
  .footer { flex-direction: column; gap: 6px; }
  .ask { padding: 100px 5vw; }
  .final-quote { padding: 50px 0 20px; }
}

@media (max-width: 560px) {
  .thesis-grid, .ask-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .kv-row { grid-template-columns: 1fr 1fr; }
  .stack-card { padding: 20px; }
  .card-num { font-size: 32px; }
  .card-title { font-size: 20px; }
}

/* make sure there's no visual-jump as images load */
img { content-visibility: auto; }
.tbg img { min-height: 120px; }

/* reserve space for charts so their late-render doesn't cause page shift */
.chart-big { background: transparent; }

/* make signal table scrollable after the first 7 rendered rows */
.sig-table-wrap { max-height: var(--sig-max-height, none); overflow-y: auto; overflow-x: auto; overscroll-behavior: contain; }
.sig-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.sig-table-wrap::-webkit-scrollbar-thumb { background: var(--mute); border-radius: 4px; }
.sig-table-wrap::-webkit-scrollbar-track { background: transparent; }
