/* Bot vs Bot — hi-fi page */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f5;
  --bg-3: #ebebeb;
  --ink: #0a0a0a;
  --ink-2: #2a2a2a;
  --ink-3: #6a6a6a;
  --ink-4: #aaaaaa;
  --rule: #0a0a0a;
  --rule-2: #d8d8d8;
  --accent: #ff6a00;
  --accent-soft: #fff1e6;
  --up: #16894a;
  --up-soft: #e6f5ec;
  --down: #c83622;
  --down-soft: #fae7e3;
  --anth: #d97757;
  --oai:  #10a37f;
  --goog: #4285f4;
  --xai:  #0a0a0a;
  --meta: #7b6ad6;
  --left-col: #0a0a0a;   /* bot A = ink */
  --right-col: #ff6a00;  /* bot B = accent */
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.mono { font-family: "IBM Plex Mono","JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 14px 32px;
  display:flex; align-items:center; gap: 28px;
}
.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  display:flex; align-items:center; gap: 6px;
}
.brand .dot {
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  display: inline-block;
}
.brand .slash { color: var(--ink-3); font-weight: 400; }
.crumbs {
  font-size: 13px; color: var(--ink-3);
  display:flex; align-items:center; gap: 8px;
  white-space: nowrap;
}
.crumbs .here { color: var(--ink); font-weight: 500; }
.topbar nav {
  margin-left: auto;
  display:flex; gap: 22px;
  font-size: 14px;
  color: var(--ink-2);
}
.topbar nav a { text-decoration:none; }
.topbar nav a:hover { color: var(--accent); }
.topbar .live {
  display:inline-flex; align-items:center; gap: 6px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--down);
}
.topbar .live::before {
  content:""; width:7px; height:7px; border-radius:50%;
  background: var(--down); animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%,100% {opacity:1;} 50% {opacity:0.25;} }

/* ---------- page wrap ---------- */
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 32px 80px; }

/* ---------- hero ---------- */
.hero {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--rule);
}
.hero .kicker {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--ink-3);
  display:flex; align-items:center; gap: 10px;
  margin-bottom: 14px;
}
.hero .kicker .pill {
  background: var(--accent); color: white;
  padding: 2px 8px; border-radius: 3px;
  letter-spacing: 1px;
}

.match {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: center;
  gap: 24px;
}

.bot {
  display: flex; gap: 18px; align-items: center;
}
.bot.right { flex-direction: row-reverse; text-align: right; }
.bot .av {
  width: 80px; height: 80px; border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  display:grid; place-items:center;
  font-weight: 700; font-size: 28px;
  letter-spacing: -1px;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}
.bot.left .av { background: var(--ink); color: white; border-color: var(--ink); }
.bot.right .av { background: var(--accent); color: white; border-color: var(--accent); }
.bot .av::after {
  content:""; position:absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 60%);
  pointer-events:none;
}
.bot .meta h1 {
  font-size: 36px; font-weight: 700; letter-spacing: -1px;
  margin: 0 0 4px;
  line-height: 1;
}
.bot .meta .sub {
  font-size: 13px; color: var(--ink-3);
  display:flex; gap: 8px; align-items:center;
  flex-wrap: wrap;
}
.bot.right .meta .sub { justify-content: flex-end; }
.bot .meta .val {
  margin-top: 10px;
  font-family: "IBM Plex Mono","JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 30px; font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1;
}
.bot .meta .chg {
  font-family: "IBM Plex Mono","JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 14px; margin-top: 4px;
}
.bot .meta .chg.up { color: var(--up); }
.bot .meta .chg.dn { color: var(--down); }

.vs {
  text-align: center;
  position: relative;
}
.vs .word {
  font-size: 64px; font-weight: 800;
  letter-spacing: -3px;
  line-height: 1;
  font-style: italic;
}
.vs .word .sl { color: var(--accent); }
.vs .since {
  margin-top: 6px;
  font-size: 11px; color: var(--ink-3);
  letter-spacing: 1px; text-transform: uppercase;
}

/* model chips */
.chip {
  display:inline-flex; align-items:center; gap: 4px;
  padding: 2px 8px;
  font-family: "IBM Plex Mono","JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 3px;
  text-transform: uppercase;
  color: white;
  white-space: nowrap;
}
.chip.anth { background: var(--anth); }
.chip.oai  { background: var(--oai); }
.chip.goog { background: var(--goog); }
.chip.xai  { background: var(--xai); }
.chip.meta { background: var(--meta); }
.chip.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }

/* ---------- score strip ---------- */
.scorestrip {
  display:grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 24px;
}
.scorestrip .cell {
  padding: 14px 18px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.scorestrip .cell:last-child { border-right: none; }
.scorestrip .cell .lbl {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.scorestrip .cell .row {
  display:flex; justify-content:space-between; align-items:baseline;
  font-family: "IBM Plex Mono","JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
}
.scorestrip .cell .row .l { color: var(--ink); }
.scorestrip .cell .row .r { color: var(--accent); }
.scorestrip .cell .bar {
  margin-top: 8px;
  height: 4px;
  background: var(--bg-2);
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}
.scorestrip .cell .bar .lfill {
  position:absolute; top:0; left:0; bottom:0;
  background: var(--ink);
}
.scorestrip .cell .bar .rfill {
  position:absolute; top:0; right:0; bottom:0;
  background: var(--accent);
}
.scorestrip .cell .winner {
  position:absolute; top: 12px; right: 14px;
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--ink); color: white;
}
.scorestrip .cell .winner.r { background: var(--accent); }

/* ---------- chart section ---------- */
.section {
  padding: 28px 0 0;
}
.section-head {
  display:flex; justify-content:space-between; align-items:flex-end;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0;
}
.section-head .sub {
  color: var(--ink-3); font-size: 13px;
  margin-top: 4px;
}
.section-head .actions {
  display:flex; gap: 6px;
}
.tf {
  display:flex; gap: 2px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.tf button {
  background: transparent; border: none;
  padding: 6px 12px;
  font-family: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer; color: var(--ink-2);
  border-right: 1px solid var(--rule);
}
.tf button:last-child { border-right: none; }
.tf button:hover { background: var(--bg-2); }
.tf button.on { background: var(--ink); color: white; }

/* main chart */
.chartcard {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px;
  background: var(--bg);
}
.chartcard .legend {
  display:flex; gap: 24px;
  font-size: 13px;
  margin-bottom: 18px;
}
.chartcard .legend .item {
  display:flex; align-items:center; gap: 8px;
}
.chartcard .legend .sw {
  width: 14px; height: 4px; border-radius: 2px;
}
.chartcard .legend .sw.l { background: var(--ink); }
.chartcard .legend .sw.r { background: var(--accent); }
.chartcard .legend .name { font-weight: 600; }
.chartcard .legend .val { color: var(--ink-3); font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace; margin-left: 4px; }

.chartwrap {
  position: relative;
  height: 340px;
}
.chartwrap svg { display:block; width:100%; height:100%; overflow: visible; }
.ax-line { stroke: var(--rule-2); stroke-width: 1; }
.ax-text { font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace; font-size: 10px; fill: var(--ink-3); }
.series-l { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.series-r { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.series-l-fill { fill: rgba(10,10,10,0.04); stroke: none; }
.series-r-fill { fill: rgba(255,106,0,0.06); stroke: none; }
.zero-line { stroke: var(--ink-4); stroke-width: 1; stroke-dasharray: 3 3; }

.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.marker .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: white; border: 2px solid var(--ink);
  box-shadow: 0 0 0 3px white;
}
.marker .lbl {
  position: absolute;
  white-space: nowrap;
  font-size: 11px;
  background: var(--ink); color: white;
  padding: 3px 7px; border-radius: 3px;
  margin-top: 10px; left: 50%; transform: translateX(-50%);
  font-weight: 500;
}
.marker.right .dot { border-color: var(--accent); }
.marker.right .lbl { background: var(--accent); }
.marker.above .lbl { margin-top: 0; bottom: 18px; }

/* gap chart underneath */
.gapchart {
  margin-top: 18px;
  border-top: 1px dashed var(--rule-2);
  padding-top: 14px;
}
.gapchart .lbl-row {
  display:flex; justify-content:space-between;
  font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
  margin-bottom: 6px;
}
.gapchart .gap-svg { height: 60px; width: 100%; display:block; }
.gap-fill-up { fill: var(--up); opacity: 0.18; }
.gap-fill-dn { fill: var(--down); opacity: 0.18; }
.gap-stroke { fill: none; stroke: var(--ink); stroke-width: 1.5; }

/* ---------- showdown stats ---------- */
.grid-2 {
  display:grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  margin-top: 28px;
}
@media (max-width: 1080px) { .grid-2 { grid-template-columns: 1fr; } }

.statlist {
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
.statlist .row {
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--rule-2);
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  font-variant-numeric: tabular-nums;
}
.statlist .row:last-child { border-bottom: none; }
.statlist .row > .l, .statlist .row > .r {
  padding: 14px 16px;
  font-size: 16px; font-weight: 500;
  display:flex; align-items:center; gap: 8px;
}
.statlist .row > .r { justify-content: flex-end; }
.statlist .row > .lbl {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  font-weight: 600; color: var(--ink-3);
  padding: 0 10px;
  text-align: center;
  white-space: nowrap;
}
.statlist .row .win {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 6px; border-radius: 2px;
}
.statlist .row .win.l { background: var(--ink); color: white; }
.statlist .row .win.r { background: var(--accent); color: white; }
.statlist .row.head {
  background: var(--bg-2);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink-3);
}
.statlist .row.head > .l, .statlist .row.head > .r {
  font-size: 13px; color: var(--ink);
}
.statlist .row .winning { font-weight: 700; }

/* sparkline cell */
.spark { width: 80px; height: 22px; display:inline-block; }
.spark path { fill: none; stroke-width: 1.5; }

/* ---------- moments column ---------- */
.moments {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px;
}
.moments h3 {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink-3);
  margin: 0 0 14px;
}
.moment {
  padding: 12px 0;
  border-bottom: 1px dashed var(--rule-2);
}
.moment:last-child { border-bottom: none; padding-bottom: 0; }
.moment .when {
  font-size: 11px; color: var(--ink-3);
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  margin-bottom: 4px;
  display:flex; justify-content:space-between;
}
.moment .who {
  display:flex; align-items:center; gap: 6px;
  font-weight: 600; font-size: 14px;
  margin-bottom: 4px;
}
.moment .who .av-mini {
  width: 18px; height: 18px; border-radius: 3px;
  display:grid; place-items:center;
  font-size: 10px; font-weight: 700; color: white;
}
.moment .who .av-mini.l { background: var(--ink); }
.moment .who .av-mini.r { background: var(--accent); }
.moment .trade {
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  font-size: 13px; margin-bottom: 6px;
}
.moment .reasoning {
  font-size: 13px; color: var(--ink-2);
  font-style: italic;
  line-height: 1.45;
  padding-left: 10px;
  border-left: 2px solid var(--rule-2);
}
.moment .outcome {
  margin-top: 6px;
  font-size: 11px;
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  display: inline-block;
  padding: 2px 6px; border-radius: 3px;
}
.moment .outcome.up { background: var(--up-soft); color: var(--up); }
.moment .outcome.dn { background: var(--down-soft); color: var(--down); }

/* ---------- ax pills (buy/sell) reused ---------- */
.ax {
  display:inline-block; padding: 1px 6px;
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  border-radius: 2px;
  color: white;
}
.ax.buy { background: var(--up); }
.ax.sell { background: var(--down); }

/* ---------- timeline ---------- */
.timeline {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px 22px;
  margin-top: 24px;
}
.timeline .tl-head {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom: 14px;
}
.timeline .tl-head h3 {
  margin: 0;
  font-size: 16px; font-weight: 600;
}
.tl-grid {
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  align-items: stretch;
  gap: 0;
}
.tl-axis {
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  position: relative;
  background:
    linear-gradient(to bottom, var(--bg-3) 0 1px, transparent 1px) 0 0 / 100% 80px;
}
.tl-axis .tick {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  font-size: 10px;
  color: var(--ink-3);
  background: var(--bg);
  padding: 2px 0;
  border-top: 1px dashed var(--rule-2);
}
.tl-side {
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.tl-side.left { align-items: flex-end; padding-right: 14px; min-width: 0; }
.tl-side.right { align-items: flex-start; padding-left: 14px; min-width: 0; }
.tl-trade {
  width: 100%;
  max-width: 480px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--bg-2);
  border-left: 3px solid var(--ink);
  position: relative;
}
.tl-side.right .tl-trade {
  border-left: none;
  border-right: 3px solid var(--accent);
}
.tl-trade .t-when {
  display:flex; justify-content:space-between;
  font-size: 10px; color: var(--ink-3);
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  margin-bottom: 3px;
}
.tl-trade .t-trade {
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  font-weight: 600;
  margin-bottom: 4px;
}
.tl-trade .t-rs {
  color: var(--ink-2);
  font-style: italic;
  font-size: 12px;
  line-height: 1.4;
}
.tl-trade .t-outcome {
  margin-top: 4px;
  font-size: 10px;
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  display:inline-block;
  padding: 1px 5px;
  border-radius: 2px;
}
.tl-trade .t-outcome.up { background: var(--up-soft); color: var(--up); }
.tl-trade .t-outcome.dn { background: var(--down-soft); color: var(--down); }
.tl-spacer { height: 14px; }

/* connector arrow from axis -> card */
.tl-trade::before {
  content: "";
  position: absolute;
  top: 14px;
  width: 14px; height: 1px;
  background: var(--rule);
}
.tl-side.left .tl-trade::before { right: -14px; }
.tl-side.right .tl-trade::before { left: -14px; }

/* ---------- bottom row ---------- */
.btm {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}
.holdings {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px;
}
.holdings h3 {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink-3);
  margin: 0 0 14px;
}
.holdings .who {
  display:flex; align-items:center; gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
}
.holdings .who .av-mini {
  width: 22px; height: 22px; border-radius: 3px;
  display:grid; place-items:center;
  font-size: 11px; font-weight: 700; color: white;
}
.holdings .who .av-mini.l { background: var(--ink); }
.holdings .who .av-mini.r { background: var(--accent); }
.bars {
  display:flex; flex-direction: column; gap: 8px;
}
.holding-row {
  display:grid;
  grid-template-columns: 64px 1fr 80px 60px;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Mono","JetBrains Mono",ui-monospace,monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.holding-row .sym {
  font-weight: 700;
}
.holding-row .bar {
  height: 14px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.holding-row .bar .fill {
  position:absolute; left:0; top:0; bottom:0;
  background: var(--ink);
}
.holdings.right .holding-row .bar .fill { background: var(--accent); }
.holding-row .val { text-align: right; }
.holding-row .pct { text-align: right; font-size: 11px; color: var(--ink-3); }

/* footer */
.foot {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  display:flex; justify-content:space-between;
  font-size: 12px; color: var(--ink-3);
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .match { grid-template-columns: 1fr; gap: 16px; }
  .bot.right { flex-direction: row; text-align: left; }
  .bot.right .meta .sub { justify-content: flex-start; }
  .scorestrip { grid-template-columns: 1fr 1fr; }
  .scorestrip .cell:nth-child(2) { border-right: none; }
  .scorestrip .cell:nth-child(1), .scorestrip .cell:nth-child(2) {
    border-bottom: 1px solid var(--rule);
  }
  .btm { grid-template-columns: 1fr; }
  .tl-grid { grid-template-columns: 1fr; }
}
