/* Palette: Vim's retrobox (light) */
:root {
  --bg: #fbf1c7;
  --panel: #f2e5bc;
  --panel-2: #ebdbb2;
  --line: #d5c4a1;
  --line-2: #bdae93;
  --text: #3c3836;
  --muted: #504945;
  --dim: #7c6f64;
  --hf: #b57614;        /* naive side: retrobox yellow */
  --hf-soft: rgba(181, 118, 20, .14);
  --vllm: #076678;      /* vLLM side: retrobox blue */
  --vllm-soft: rgba(7, 102, 120, .12);
  --waste: #cc241d;
  --ok: #79740e;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --top: 46px;
  --bottom: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code, pre { font-family: var(--mono); }
code { font-size: .92em; color: #504945; }
b { font-weight: 600; }

/* ------------------------------------------------------------- chrome */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 3.2vw, 56px);
  background: linear-gradient(var(--bg) 60%, transparent);
}
.brand { font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--hf) 50%, var(--vllm) 50%); }
.brand-sep, .brand-dim { color: var(--dim); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted);
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 99px; font-family: var(--mono);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.pill.up i { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill.loading i { background: var(--hf); animation: blink 1s infinite; }
.pill.down i { background: var(--waste); }
@keyframes blink { 50% { opacity: .25; } }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; padding: 2px; background: var(--panel); }
.seg button { padding: 4px 11px; border-radius: 2px; font-size: 12px; color: var(--muted); font-weight: 500; transition: .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: #bdae93; color: var(--text); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }

.deck-nav {
  position: fixed; inset: auto 0 0 0; height: var(--bottom); z-index: 20;
  display: flex; align-items: center; gap: 6px; padding: 0 clamp(20px, 3.2vw, 56px);
  background: linear-gradient(transparent, var(--bg) 45%);
}
.deck-nav button { flex: 1; text-align: left; padding: 8px 0 6px; border-top: 2px solid var(--line); font-size: 11px; color: var(--dim); letter-spacing: .02em; transition: .2s; white-space: nowrap; overflow: hidden; }
.deck-nav button b { font-family: var(--mono); font-weight: 500; margin-right: 6px; }
.deck-nav button:hover { color: var(--muted); }
.deck-nav button.past { border-color: #a89984; }
.deck-nav button.on { border-color: var(--text); color: var(--text); }
.deck-nav .hint { flex: 0 0 auto; font-size: 11px; color: var(--dim); font-family: var(--mono); padding-left: 10px; }

.toast {
  position: fixed; left: 50%; bottom: 56px; transform: translate(-50%, 12px); z-index: 30;
  background: #ebdbb2; border: 1px solid var(--line-2); padding: 8px 14px; border-radius: 3px;
  font-size: 12.5px; opacity: 0; pointer-events: none; transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------------------------------------- slides */
#deck { height: 100vh; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
#deck::-webkit-scrollbar { display: none; }
.slide {
  height: 100vh; scroll-snap-align: start; scroll-snap-stop: always;
  padding: calc(var(--top) + 1.2vh) clamp(20px, 3.2vw, 56px) calc(var(--bottom) + 1.4vh);
  display: flex; flex-direction: column; gap: clamp(8px, 1.5vh, 16px); overflow: hidden;
}
.slide-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex: 0 0 auto; }
.kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
h2 { font-family: var(--mono); font-size: clamp(20px, 2.2vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; text-wrap: balance; }
h3 { font-family: var(--mono); font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }

.controls { display: flex; align-items: flex-end; gap: 16px; flex: 0 0 auto; }
.control { display: flex; flex-direction: column; gap: 5px; }
.control label { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.control label b { color: var(--text); font-family: var(--mono); margin-left: 4px; }
.btn-primary {
  background: var(--text); color: #fbf1c7; font-weight: 650; font-size: 13px;
  padding: 8px 16px; border-radius: 3px; transition: .15s; white-space: nowrap; min-width: 108px;
}
.btn-primary:hover { background: #282828; }
.btn-primary:disabled { background: #d5c4a1; color: var(--dim); cursor: default; }
.btn-ghost { border: 1px solid var(--line-2); padding: 7px 13px; border-radius: 3px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.btn-ghost:hover { color: var(--text); border-color: #a89984; }

/* stepped slider */
.stepper { position: relative; width: 210px; height: 30px; }
.stepper input { position: absolute; inset: 0 0 auto 0; width: 100%; }
.stepper .ticks { position: absolute; inset: auto 7px 0 7px; height: 12px; }
.stepper .ticks span { position: absolute; transform: translateX(-50%); font-size: 10px; font-family: var(--mono); color: var(--dim); cursor: pointer; }
.stepper .ticks span.on { color: var(--text); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 14px; background: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--text); margin-top: -5px; box-shadow: 0 0 0 4px rgba(60,56,54,.12); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--text); }
input[type=range]:disabled { opacity: .4; }

/* ---------------------------------------------------- panels and stats */
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.panel { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 14px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.panel > header p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.side-hf { --c: var(--hf); --c-soft: var(--hf-soft); }
.side-vllm { --c: var(--vllm); --c-soft: var(--vllm-soft); }
.panel h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 8px; vertical-align: 1px; }
.tag { font-size: 10px; font-weight: 500; font-family: var(--mono); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); padding: 1px 6px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.card { padding: 14px 16px; }

.stats { display: flex; gap: 18px; flex: 0 0 auto; }
.stat { display: flex; flex-direction: column; align-items: flex-end; min-width: 62px; }
.stat b { font-family: var(--mono); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.stat span { font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.stat.big { align-items: flex-start; }
.stat.big b { font-size: clamp(18px, 1.75vw, 26px); }
.stat.big span { font-size: 11px; color: var(--muted); white-space: normal; }
.side-hf .stats b, .side-vllm .stats b { color: var(--c); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 18px); flex: 1 1 0; min-height: 0; }
.col { display: flex; flex-direction: column; gap: clamp(8px, 1.4vh, 14px); min-height: 0; min-width: 0; }
.strip { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }
.fineprint { font-size: 12px; color: var(--muted); max-width: 150ch; text-wrap: pretty; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }

/* ---------------------------------------------------------------- race */
.race-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 18px); flex: 1 1 0; min-height: 0; }
.rows { flex: 1 1 0; min-height: 0; display: grid; grid-auto-flow: column; gap: 0 14px; padding: 6px 12px 8px; align-content: stretch; }
.row { display: grid; grid-template-columns: 26px 1fr 48px; align-items: center; gap: 8px; min-height: 0; position: relative; border-bottom: 1px solid rgba(60,56,54,.08); }
.row .who { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.row .txt { display: flex; justify-content: flex-end; overflow: hidden; white-space: nowrap; font-size: 12px; color: var(--dim);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
.row .txt span { flex: 0 0 auto; white-space: pre; }
.row .st { font-family: var(--mono); font-size: 10.5px; text-align: right; color: var(--dim); white-space: nowrap; }
.row .bar { position: absolute; left: 34px; right: 56px; bottom: 0; height: 2px; background: transparent; }
.row .bar i { display: block; height: 100%; width: 0; background: var(--c); opacity: .9; border-radius: 1px; }
.row.queued .txt span { color: #bdae93; font-style: italic; }
.row.run .txt { color: var(--text); }
.row.run .txt span::after { content: "▍"; color: var(--c); margin-left: 1px; }
.row.run .st { color: var(--c); }
.row.done .txt { color: #928374; }
.row.done .st { color: var(--muted); }
.row.done .bar i { opacity: .35; }
.row.capped .st { color: var(--waste); }
.rows.dense .row { grid-template-columns: 22px 1fr 40px; }
.rows.dense .row .txt { font-size: 11px; }
.rows.dense .row .bar { left: 30px; right: 48px; }

.overlay { position: absolute; inset: 58px 0 0 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(242,229,188,.95); text-align: center; padding: 20px; }
.overlay.show { display: flex; }
.overlay .ov-title { font-size: 15px; font-weight: 600; }
.overlay .ov-sub { font-size: 12.5px; color: var(--muted); max-width: 44ch; }
.overlay .ov-num { font-family: var(--mono); font-size: 30px; font-weight: 600; color: var(--c); font-variant-numeric: tabular-nums; }
.overlay .ov-bar { width: min(280px, 60%); height: 3px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.overlay .ov-bar i { display: block; height: 100%; background: var(--c); width: 0; }

.race-result { flex: 0 0 auto; display: grid; grid-template-columns: minmax(300px, .9fr) 1.4fr; gap: 6px clamp(16px, 2.4vw, 40px); align-items: center; }
.verdict-num { display: flex; align-items: baseline; gap: 10px; color: var(--dim); transition: color .3s; }
.verdict-num span { font-size: clamp(44px, 6.4vw, 96px); font-weight: 700; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums; }
.verdict-num small { font-size: clamp(18px, 1.9vw, 28px); font-weight: 600; letter-spacing: -.02em; }
.verdict.final .verdict-num { color: var(--vllm); }
.verdict.final .verdict-num span { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); display: inline-block; }
@keyframes pop { from { transform: scale(.82); opacity: .3; } }
.verdict p { font-size: 12.5px; color: var(--muted); margin-top: 4px; max-width: 54ch; }
.scaling { min-width: 0; }
.chart-title { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 12px; align-items: baseline; }
.chart-title b { color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chart-title span { color: var(--dim); }
#scaling-chart { width: 100%; height: clamp(86px, 13vh, 132px); display: block; overflow: visible; }
.race-result .fineprint { grid-column: 1 / -1; }
svg text { font-family: var(--mono); font-size: 10px; fill: var(--dim); }

/* ------------------------------------------------------------ kv cache */
.kv-layout { grid-template-columns: 1fr 1.08fr; }
.kv-layout .col, .knob-layout .col { justify-content: center; }
.kv-layout .col { gap: clamp(10px, 2.4vh, 26px); }
.phase-card { padding: 0; overflow: hidden; flex: 0 0 auto; }
.phase-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.phase { padding: 10px 14px; display: flex; flex-direction: column; opacity: .38; transition: .3s; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.phase + .phase { border-left: 1px solid var(--line); }
.phase b { font-size: 14px; }
.phase span { font-size: 11.5px; color: var(--muted); }
.phase em { font-style: normal; font-family: var(--mono); font-size: 10.5px; margin-top: 3px; }
#ph-prefill em { color: var(--hf); } #ph-decode em { color: var(--vllm); }
.phase.on { opacity: 1; }
#ph-prefill.on { border-bottom-color: var(--hf); } #ph-decode.on { border-bottom-color: var(--vllm); }
.phase-stage { padding: clamp(10px, 2vh, 20px) 16px clamp(8px, 1.6vh, 16px); }
.tok-row { display: flex; gap: 5px; height: 30px; flex-wrap: nowrap; overflow: hidden; }
.tok { flex: 0 0 auto; padding: 0 8px; height: 30px; line-height: 28px; border-radius: 5px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12.5px; color: var(--dim); transition: .25s; }
.tok.p.lit { border-color: var(--hf); color: var(--hf); background: var(--hf-soft); }
.tok.g { border-color: var(--vllm); color: var(--vllm); background: var(--vllm-soft); animation: tokin .22s ease-out; }
.tok.p.cached { border-color: #d79921; color: #b57614; background: transparent; }
@keyframes tokin { from { opacity: 0; transform: translateY(4px); } }
.kv-label { font-size: 11px; color: var(--muted); margin: 10px 0 5px; font-weight: 600; }
.kv-label span { color: var(--dim); font-weight: 400; margin-left: 6px; }
.kv-stack { display: flex; gap: 4px; height: clamp(34px, 11vh, 110px); align-items: stretch; }
.kv-col { flex: 0 0 14px; border-radius: 2px; background: repeating-linear-gradient(0deg, var(--kc) 0 4px, transparent 4px 6px); opacity: 0; transition: opacity .3s; }
.kv-col.on { opacity: .9; }
.phase-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-top: 9px; }
.phase-foot .btn-ghost { flex: 0 0 auto; min-width: 74px; padding: 4px 10px; font-size: 12px; }
.phase-caption { font-size: 13px; color: var(--muted); min-height: 2.9em; }
.phase-caption b { color: var(--text); font-family: var(--mono); }

.points { list-style: none; display: flex; flex-direction: column; gap: clamp(7px, 1.3vh, 13px); padding-top: 2px; }
.points li { font-size: clamp(12.5px, 1.02vw, 14.5px); color: var(--muted); padding-left: 14px; border-left: 2px solid var(--line-2); text-wrap: pretty; }
.points li b { color: var(--text); }
.points li em { font-style: normal; color: var(--text); }
.points.tight li { font-size: clamp(12px, .95vw, 13.5px); }
.points code { color: var(--text); }

.calc { display: flex; flex-direction: column; gap: clamp(8px, 2.2vh, 22px); flex: 0 1 auto; min-height: 0; padding: clamp(12px, 2.2vh, 22px) 20px; }
.calc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chips button { font-size: 11.5px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); }
.chips button:hover { color: var(--text); }
.chips button.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.formula { font-family: var(--mono); font-size: clamp(11px, .95vw, 13px); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 9px 12px; line-height: 1.7; }
.formula b { color: var(--text); } .formula .res { color: var(--vllm); font-weight: 600; white-space: nowrap; } .formula i { font-style: normal; color: var(--dim); }
.sliders { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(6px, 1.2vh, 12px) 22px; }
.sl { display: flex; flex-direction: column; gap: 3px; }
.sl-top { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.sl-top b { font-family: var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.sl input { width: 100%; }
.sl select { background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 2px; padding: 3px 6px; font: inherit; font-size: 12px; }
.calc-out, .knob-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 0; }
.knob-out { grid-template-columns: repeat(4, 1fr); margin-top: clamp(14px, 3.5vh, 34px); }
#kv-total { color: var(--vllm); }

.membar-title { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.membar-title b { color: var(--text); font-weight: 500; }
.membar { height: 18px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line-2); display: flex; overflow: hidden; }
.membar.tall { height: clamp(30px, 5.5vh, 52px); }
.membar i { display: block; height: 100%; transition: width .18s ease-out; }
.seg-w, .sw-w { background: #928374; } .seg-kv, .sw-kv { background: var(--vllm); }
.seg-o, .sw-o { background: #bdae93; } .seg-hf, .sw-hf { background: var(--hf); }
.seg-hf { margin-left: 3px; }
.membar.oom { border-color: var(--waste); } .membar.oom .seg-kv { background: var(--waste); }
.membar-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.membar-legend b { font-family: var(--mono); color: var(--text); font-weight: 500; margin-left: 3px; }
.bad { color: var(--waste); font-weight: 600; } .good { color: var(--ok); }

/* ------------------------------------------------------------- paging */
.mem-panel { flex: 1 1 0; }
.memgrid { flex: 1 1 0; min-height: 0; display: grid; gap: 3px; padding: 12px 14px 8px; }
.blk { border-radius: 3px; background: #ebdbb2; border: 1px solid #d5c4a1; transition: background .18s, border-color .18s, opacity .18s; min-height: 0; }
.blk.res { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--rc) 26%, transparent) 0 3px, transparent 3px 6px); border-color: color-mix(in srgb, var(--rc) 34%, transparent); }
.blk.use { background: var(--rc); border-color: var(--rc); }
.blk.part { background: linear-gradient(90deg, var(--rc) var(--fill), color-mix(in srgb, var(--rc) 22%, transparent) var(--fill)); border-color: var(--rc); }
.memgrid.hl .blk:not(.hot) { opacity: .22; }
.usebar { padding: 0 14px 11px; flex: 0 0 auto; }
.usebar-track { height: 6px; border-radius: 3px; background: #ebdbb2; display: flex; overflow: hidden; }
.usebar-track i { display: block; transition: width .2s; }
.u-used, .sw-used { background: var(--c); }
.u-waste, .sw-waste { background: repeating-linear-gradient(135deg, var(--waste) 0 3px, transparent 3px 6px); }
.usebar-legend { display: flex; gap: 18px; font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.usebar-legend b { font-family: var(--mono); color: var(--text); font-weight: 500; }
.blocktable { min-height: 30px; display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; overflow: hidden; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.bt-hint { font-family: var(--sans); font-size: 12px; color: var(--dim); }
.bt-name { color: var(--text); margin-right: 6px; white-space: nowrap; }
.bt-cell { flex: 0 0 auto; border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.bt-cell b { color: var(--rc); font-weight: 600; }

/* ----------------------------------------------------------- batching */
.cb-stack { flex: 1 1 0; min-height: 0; display: grid; grid-template-rows: 1fr 1fr; gap: clamp(8px, 1.3vh, 14px); }
.gantt { flex: 1 1 0; min-height: 0; position: relative; margin: 10px 14px 12px; }
.gantt .lane { position: absolute; left: 0; right: 0; border-radius: 4px; background: #ebdbb2; }
.gantt .bar { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--rc); display: flex; align-items: center; padding-left: 6px; font-family: var(--mono); font-size: 10px; color: rgba(251,241,199,.95); font-weight: 600; overflow: hidden; }
.gantt .idle { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: repeating-linear-gradient(135deg, rgba(204,36,29,.5) 0 4px, rgba(204,36,29,.1) 4px 8px); }
.gantt .cover { position: absolute; top: -2px; bottom: -2px; right: 0; background: var(--panel); border-left: 2px solid var(--text); z-index: 2; }
.gantt .cover.hidden { border-left-color: transparent; }
.gantt .endmark { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1px dashed var(--c); z-index: 1; }
.gantt .endmark span { position: absolute; top: 50%; left: 8px; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--c); white-space: nowrap; }
.cb-legend { display: flex; gap: 20px; align-items: center; font-size: 12px; color: var(--muted); }
.sw-req { background: #076678; } .sw-idle { background: repeating-linear-gradient(135deg, rgba(204,36,29,.7) 0 3px, rgba(204,36,29,.15) 3px 6px); }
.cb-verdict { margin-left: auto; font-size: 13px; color: var(--text); }
.cb-verdict b { color: var(--vllm); font-family: var(--mono); font-size: 16px; }

/* -------------------------------------------------------------- knobs */
.knob-layout { grid-template-columns: 1fr 1.15fr; }
.knob-layout .col { gap: clamp(12px, 3vh, 30px); }
.knob-layout .card { padding: clamp(14px, 2.6vh, 26px) 22px; }
.knob-layout .stat.big b { font-size: clamp(20px, 2.3vw, 36px); }
.knob-layout .membar-legend { margin-top: 10px; }
.knob-layout .sl-top { font-size: 13px; font-family: var(--mono); }
#kn-sliders { grid-template-columns: 1fr; gap: clamp(10px, 2.6vh, 26px); }
.cmd { margin-top: clamp(10px, 2vh, 18px); background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; font-size: clamp(11px, .92vw, 12.5px); line-height: 1.65; color: var(--muted); white-space: pre-wrap; }
.cmd b { color: var(--vllm); font-weight: 600; } .cmd i { color: var(--dim); font-style: normal; }
.limiter { margin-top: clamp(12px, 2.5vh, 24px); padding-top: clamp(11px, 2vh, 20px); border-top: 1px solid var(--line); font-size: clamp(12.5px, 1vw, 14.5px); min-height: 5.2em; color: var(--muted); text-wrap: pretty; }
.limiter b { color: var(--text); }

/* --------------------------------------------------------------- live */
.live-grid { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(10px, 1.2vw, 18px); }
.req-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); }
.sw-wait { background: #bdae93; } .sw-run { background: var(--vllm); } .sw-done { background: #83a598; } .sw-waitline { background: var(--hf); }
.reqgrid { flex: 1 1 0; min-height: 0; display: grid; gap: 3px; padding: 12px 14px; align-content: stretch; }
.rq { border-radius: 3px; background: #d5c4a1; position: relative; overflow: hidden; min-height: 0; }
.rq i { position: absolute; inset: auto 0 0 0; height: 0; background: var(--vllm); }
.rq.done i { background: #83a598; }
.rq.fail { background: var(--waste); }
.live-stats { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.live-stats .stat.big b { font-size: clamp(15px, 1.4vw, 21px); }
#ld-tps { color: var(--vllm); }
.live-charts { display: grid; grid-template-rows: 1.25fr 1fr 1fr; gap: clamp(6px, 1vh, 10px); min-height: 0; }
.chartcard { padding: 9px 12px 8px; display: flex; flex-direction: column; min-height: 0; }
.chartcard svg { flex: 1 1 0; min-height: 0; width: 100%; display: block; overflow: visible; }
.chart-title .lg { color: var(--muted); }
.takeaways { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.2vw, 18px); }
.takeaways div { display: flex; gap: 10px; align-items: baseline; font-size: clamp(12px, .98vw, 14px); color: var(--muted); border-top: 1px solid var(--line-2); padding-top: 8px; text-wrap: pretty; }
.takeaways b { font-family: var(--mono); color: var(--dim); }
.takeaways em { font-style: normal; color: var(--text); font-weight: 600; }

@media (max-height: 760px) {
  .points li { font-size: 12px; }
  .panel > header { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
