:root {
  --bg: #0b1220;
  --panel: #111a2e;
  --panel-2: #172239;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: #25324d;
  --good: #22c55e;
  --warn: #eab308;
  --bad: #ef4444;
  --accent: #3b82f6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  padding: 16px;
}
header h1 { font-size: 20px; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0 0 12px; max-width: 1100px; }
.controls {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.group.inject { border-top: 1px solid var(--line); padding-top: 8px; }
button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: white; min-width: 80px; }
label { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
input[type=number] {
  width: 76px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 6px;
  font: inherit;
}
input[type=range] { width: 140px; }
.clock { margin-left: auto; color: var(--muted); }
.clock b { color: var(--text); font-variant-numeric: tabular-nums; }
details summary { cursor: pointer; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; padding: 10px 0 4px; }
.grid label { justify-content: space-between; }
.grid label.check { justify-content: flex-start; }

.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1100px) { .sides { grid-template-columns: 1fr; } }
.side {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
.side h2 { margin: 0 0 8px; font-size: 16px; }
.side h2 span { color: var(--muted); font-weight: normal; font-size: 13px; margin-left: 8px; }
#old h2 { color: #f59e0b; }
#new h2 { color: #60a5fa; }
canvas { width: 100%; height: auto; display: block; border-radius: 4px; margin-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.stat {
  background: var(--panel-2);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--line);
}
.stat span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.stat b { font-size: 18px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 11px; }
.stat.good { border-left-color: var(--good); }
.stat.warn { border-left-color: var(--warn); }
.stat.bad { border-left-color: var(--bad); }
.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lists h3 { margin: 0 0 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lists ul { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.lists li { padding: 3px 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lists li i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.lists li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.lists li.chunked { color: #fdba74; }
.muted { color: var(--muted); }
.state { font-size: 11px; padding: 1px 6px; border-radius: 10px; background: var(--panel-2); }
.state.decoding { background: #1d4ed8; }
.state.prefilling { background: #b45309; }
.state.queued { background: #7f1d1d; }
footer { color: var(--muted); margin-top: 12px; max-width: 1100px; }
