:root {
  --bg: #0b0d12;
  --panel: #161a23;
  --text: #f2f4f8;
  --muted: #9aa3b2;
  --accent: #3b82f6;
  --won: #22c55e;
  --bad: #f97316;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main { max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 1.6rem; margin: 0.2em 0 0.8em; }
.muted { color: var(--muted); }
.step { color: var(--accent); font-weight: 600; margin: 0; }
.note { background: var(--panel); border-left: 4px solid var(--bad); padding: 12px; border-radius: 8px; }

button { font: inherit; cursor: pointer; border: 0; border-radius: 10px; }
button:disabled { opacity: 0.4; cursor: default; }

.choice {
  display: block; width: 100%; margin: 0 0 14px; padding: 22px 18px; text-align: left;
  background: var(--panel); color: var(--text); border: 2px solid transparent; font-size: 1.15rem;
}
.choice.picked { border-color: var(--accent); background: #1c2740; }

.bar { position: relative; background: var(--panel); border-radius: 10px; margin: 0 0 12px; padding: 16px; overflow: hidden; }
.bar .fill { position: absolute; inset: 0 auto 0 0; background: #24324f; transition: width 0.4s; }
.bar .label, .bar .count { position: relative; }
.bar .count { float: right; font-weight: 700; }

.summary li { margin-bottom: 6px; }
.steps { list-style: none; padding: 0; }
.steps li { background: var(--panel); padding: 12px 14px; border-radius: 8px; margin-bottom: 8px; }
.steps li.done { color: var(--won); }
.steps li.bad { border-left: 4px solid var(--bad); }
.crash { color: var(--bad); }
.steps .crash { display: block; font-size: 0.85rem; margin-top: 4px; }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs button { flex: 1; padding: 12px; background: var(--panel); color: var(--muted); }
.tabs button.on { background: var(--accent); color: white; }
.log { min-height: 120px; }
.msg { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { background: #1c2740; margin-left: 15%; }
.msg.assistant { background: var(--panel); margin-right: 5%; }
.msg.error { color: var(--bad); }
.msg .meta { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 6px; }
.ask { display: flex; gap: 8px; position: sticky; bottom: 12px; }
.ask input { flex: 1; min-width: 0; font: inherit; padding: 12px; border-radius: 10px; border: 1px solid #2a3140; background: var(--panel); color: var(--text); }
.ask button { padding: 0 18px; background: var(--accent); color: white; }

/* Presenter: the same views, sized for a projector. */
.presenter header { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: var(--panel); flex-wrap: wrap; }
.presenter header .spacer { flex: 1; }
.presenter header input { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid #2a3140; background: var(--bg); color: var(--text); width: 180px; }
.presenter header button { padding: 10px 18px; background: var(--accent); color: white; }
.presenter header button.ghost { background: transparent; color: var(--muted); border: 1px solid #2a3140; }
.presenter main { max-width: 1400px; }
.presenter h1 { font-size: 2.6rem; }
.qr { display: block; width: min(60vh, 90%); height: auto; margin: 0 0 0.6em; background: #fff; padding: 12px; border-radius: 8px; image-rendering: pixelated; }
.presenter .bar { padding: 22px; font-size: 1.4rem; }
.pill { background: var(--bg); padding: 6px 12px; border-radius: 999px; color: var(--accent); font-weight: 600; }
.pill.bad { color: var(--bad); }

/* Deploying: the pick and its opposite, one under the other. */
.deploying { margin-bottom: 20px; }
.deploying h2 { margin-bottom: 4px; }
.deploying .config { color: var(--accent); font-family: ui-monospace, Menlo, monospace; margin-left: 8px; }

/* The race: the deployments side by side, then their manifests line by line. */
/* Both columns share the grid's rows (subgrid), so the numbers line up even when
   one side's answers take more lines. */
.race { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; column-gap: 20px; margin-bottom: 24px; }
.side { background: var(--panel); border-radius: 12px; padding: 16px 20px; display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.side h2 { margin: 0 0 8px; }
.side.leading { outline: 3px solid var(--won); }
.crown { font-size: 0.9em; }
.stats tr.big td, .stats tr.big th { font-size: 1.5rem; }
.stats tr.big td { color: var(--won); }

/* Who is ahead right now: big for the pick against its opposite, smaller for the rest. */
.standings { margin: -8px 0 20px; }
.standing { background: var(--panel); border-radius: 12px; padding: 14px 20px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; border-left: 6px solid var(--muted); }
.standing .headline { font-size: 2rem; font-weight: 700; }
.standing.won { border-left-color: var(--won); }
.standing.won .headline { color: var(--won); }
.standing.lost { border-left-color: var(--bad); }
.standing.secondary .headline { font-size: 1.3rem; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.applied { margin-bottom: 24px; }
.side .config { color: var(--accent); font-family: ui-monospace, Menlo, monospace; margin-left: 8px; }
.side .summary { color: var(--muted); padding-left: 1.2em; }
.stats { width: 100%; border-collapse: collapse; font-size: 1.25rem; }
.stats th { text-align: left; font-weight: 400; color: var(--muted); padding: 6px 0; }
.stats td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Results: the table on the left, the model's explanation on the right. */
.verdict { background: var(--panel); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; }
.verdict h2 { margin: 0 0 12px; }
.verdict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.results { width: 100%; border-collapse: collapse; font-size: 1.1rem; margin-bottom: 16px; }
.results thead th { text-align: right; color: var(--muted); font-weight: 400; padding: 4px 0; }
.results thead th:first-child { text-align: left; }
.results tbody th { text-align: left; font-weight: 400; color: var(--muted); padding: 5px 0; }
.results td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; padding-left: 12px; }
.results td.win { color: var(--won); }
.results.evidence { font-size: 0.95rem; }
.analysis { font-size: 1.3rem; line-height: 1.5; margin: 0 0 8px; white-space: pre-wrap; }

/* What each deployment became: composed resources, what controllers created, and vLLM inside. */
.stack { margin-top: 32px; }
.stack h3 { margin: 20px 0 8px; }
.stack h3 .muted, .stack h4 .muted { font-weight: 400; font-size: 0.9rem; }
.stack details { background: var(--panel); border-radius: 8px; margin-bottom: 8px; padding: 8px 12px; }
.stack summary { cursor: pointer; }
.stack code { font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; }
.pairs .pair { padding: 8px 12px; }
.state { font-size: 0.85rem; padding: 2px 8px; border-radius: 999px; margin-left: 8px; }
.state.same { color: var(--muted); }
.state.differs, .state.left, .state.right { color: var(--bad); border: 1px solid var(--bad); }
.inventory { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.inventory td { padding: 3px 10px 3px 0; vertical-align: top; }
.engines { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.engine { background: var(--panel); border-radius: 12px; padding: 12px 16px; }
.engine h4 { margin: 0 0 6px; }
.engine .stats { font-size: 1rem; }
.engine tr.big td { font-size: 1.5rem; color: var(--won); }
.manifests tr.fold td { color: var(--muted); font-style: italic; text-align: center; }

.manifests { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.85rem; }
.manifests th { text-align: left; color: var(--muted); padding: 6px 10px; }
.manifests td { padding: 0 10px; vertical-align: top; border-left: 1px solid #2a3140; }
.manifests pre { margin: 0; font: inherit; font-family: ui-monospace, Menlo, monospace; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.5em; }
.manifests tr.changed td { background: #2a2414; }
.manifests tr.left td:first-child, .manifests tr.right td:last-child { background: #2a2414; }
.manifests tr.left td:last-child, .manifests tr.right td:first-child { background: repeating-linear-gradient(45deg, transparent 0 6px, #161a23 6px 12px); }

/* The column counts are set inline, from how many sides there are; on a narrow screen they stack. */
@media (max-width: 800px) { .race, .columns, .verdict-grid { grid-template-columns: 1fr !important; } .side { grid-template-rows: auto; grid-row: auto; } }
