/* kolibri-kv.css: the Kolibri-1 rotated INT4 KV cache post. Depends on the site's theme.css variables (--ink, --ink2,
   --ink3, --void, --s1, --s2, --line, --line2, --accent, --accent-text, --accent-soft, --accent-ink, --mono,
   --sans, --grotesk). Figure vocabulary follows the sparse-down and Heimr 570M posts so the series reads as one.
   Two literal pairs, both tokens that theme.css does not expose: --tok-* is a vector's own numbers (amber
   positive, slate negative: color.signal.amber and color.dataviz.slate, the same in both themes, as in the
   sparse-down post), and --err is what rounding loses (color.functional.error, swapped for paper). */

/* ---- the throughput chart */
.kq-fig{margin:34px 0 42px;position:relative;}
.kq-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px;}
.kq-title{font-family:var(--grotesk);font-weight:500;font-size:20px;letter-spacing:-.01em;color:var(--h1);}
.kq-toggles{display:flex;gap:8px;flex-wrap:wrap;}
.kq-toggle{display:inline-flex;border:1px solid var(--line2);border-radius:999px;padding:2px;gap:2px;}
.kq-toggle button{font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink2);
  background:none;border:0;border-radius:999px;padding:5px 11px;cursor:pointer;line-height:1.2;}
.kq-toggle button:hover{color:var(--ink);}
.kq-toggle button[aria-pressed="true"]{color:var(--accent-ink);background:var(--accent);}
.kq-plot{position:relative;}
.kq-plot svg{display:block;width:100%;background:var(--void);touch-action:pan-y;}
.kq-plot text{font-family:var(--sans);fill:var(--ink);}
.kq-plot .tick{font-family:var(--mono);font-size:11px;fill:var(--ink2);}
.kq-plot .axl{font-family:var(--mono);font-size:11px;fill:var(--ink2);letter-spacing:.04em;}
.kq-plot .grid{stroke:var(--line);stroke-width:1;}
.kq-plot .axis{stroke:var(--line2);stroke-width:1;}
.kq-plot .ln-ours{fill:none;stroke:var(--accent);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round;}
.kq-plot .ln-base{fill:none;stroke:var(--ink3);stroke-width:2;stroke-linejoin:round;stroke-linecap:round;}
.kq-plot .dot-ours{fill:var(--accent);stroke:var(--void);stroke-width:2;}
.kq-plot .dot-base{fill:var(--ink3);stroke:var(--void);stroke-width:2;}
.kq-plot .cap-ours{stroke:var(--accent);stroke-width:1;stroke-dasharray:3 4;}
.kq-plot .cap-base{stroke:var(--ink3);stroke-width:1;stroke-dasharray:3 4;}
.kq-plot .lab-ours{font-family:var(--grotesk);font-weight:500;font-size:13.5px;fill:var(--accent-text);}
.kq-plot .lab-base{font-family:var(--grotesk);font-weight:500;font-size:13.5px;fill:var(--ink2);}
.kq-plot .capl{font-family:var(--mono);font-size:10.5px;}
.kq-plot .capl-base{fill:var(--ink3);}
.kq-plot .capl-ours{fill:var(--accent-text);}
.kq-plot .cross{stroke:var(--ink3);stroke-width:1;}
.kq-tip{position:absolute;pointer-events:none;background:var(--s1);border:1px solid var(--line2);border-radius:6px;
  padding:8px 10px;font-family:var(--sans);font-size:12.5px;line-height:1.5;color:var(--ink);white-space:nowrap;
  box-shadow:0 4px 18px rgba(0,0,0,.18);z-index:2;}
.kq-tip b{font-family:var(--mono);font-weight:500;}
.kq-tip .k{font-family:var(--mono);font-size:11px;color:var(--ink2);letter-spacing:.04em;}
.kq-tip .sw{display:inline-block;width:10px;height:3px;border-radius:2px;vertical-align:middle;margin-right:6px;}
.kq-fig figcaption{font-family:var(--sans);font-size:13.5px;line-height:1.55;color:var(--ink2);margin-top:12px;}

/* ---- the self-playing explainer (same chrome as the sparse-down post's opening figures) */
.aha{margin:30px 0 40px;--tok-neg:#7B8494;--tok-pos:#E8B14C;--err:#E5604B;}
:root[data-theme="light"] .aha{--err:#C0442E;}
.aha canvas{display:block;width:100%;background:var(--void);cursor:pointer;}
.aha-bar{display:flex;align-items:center;gap:6px;margin-top:8px;flex-wrap:wrap;}
.aha-chip{font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink2);
  background:none;border:1px solid var(--line2);border-radius:999px;padding:5px 11px;cursor:pointer;line-height:1.2;}
.aha-chip:hover{color:var(--ink);border-color:var(--ink3);}
.aha-chip.is-active{color:var(--accent-ink);background:var(--accent);border-color:var(--accent);}
.aha-play{margin-left:auto;font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--ink2);background:none;border:0;padding:5px 2px;cursor:pointer;}
.aha-play:hover{color:var(--accent-text);}
/* the beat captions: an ordinary list without JavaScript, one caption at a time with it */
.note .body .aha-beats{margin:14px 0 0;padding-left:22px;font-family:var(--sans);font-size:15px;line-height:1.55;color:var(--ink2);}
.note .body .aha-beats li{margin-bottom:6px;}
.aha.is-live .aha-beats{display:none;}
/* one caption for the whole run, so it never changes height and needs no reserved space */
.note .body .aha-cap{font-family:var(--sans);font-size:15px;line-height:1.55;color:var(--ink2);margin:10px 0 0;}
@media(max-width:600px){
  .aha-chip{padding:4px 8px;font-size:10px;}
  .kq-title{font-size:17px;}
  .kq-toggle button{padding:5px 9px;font-size:10px;}
}

/* ---- the benchmark tables (the Heimr 570M post's table, on this post's tokens) */
.kq-tablefig{overflow-x:auto;}  /* below ~320px a table scrolls sideways instead of being clipped */
.kq-table{width:100%;border-collapse:collapse;font-family:var(--sans);font-size:14px;line-height:1.45;}
.kq-table th,.kq-table td{text-align:left;padding:8px 12px;border-bottom:1px solid var(--line);}
.kq-table th{font-family:var(--mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink2);font-weight:500;}
.kq-table th.num,.kq-table td.num{text-align:right;}
.kq-table td.num{font-family:var(--mono);font-size:13.5px;white-space:nowrap;}
.kq-table td.dim{color:var(--ink3);}
.kq-table td.ci{white-space:normal;}  /* the interval may break onto two lines on a phone */
.kq-table .ours{color:var(--accent-text);}
@media(max-width:600px){.kq-table{font-size:13px;}.kq-table th,.kq-table td{padding:7px 6px;}.kq-table td.num{font-size:12.5px;}}

/* ---- the KV cache size chart */
/* colour is the layers (grey: sliding-window, amber: full-attention); the fill is the format (solid FP8, striped INT4),
   so the two full-attention parts read as the same data stored two ways */
.kq-plot .seg-swa{fill:var(--ink3);}
.kq-plot .seg-stock{fill:var(--accent);}
.kq-plot .seg-rot{fill:url(#kq-int4);stroke:var(--accent);stroke-width:1;}
.kq-plot .hatch-bg{fill:var(--accent);fill-opacity:.22;}
.kq-plot .hatch{stroke:var(--accent);stroke-width:2.2;}
.kq-plot .legend{font-family:var(--sans);font-size:12.5px;fill:var(--ink2);}
/* the bar labels carry a halo in the plot's background, so they stay legible where they cross the neighbouring bar */
.kq-plot .barl-base,.kq-plot .barl-ours{paint-order:stroke;stroke:var(--void);stroke-width:3px;stroke-linejoin:round;}
.kq-plot .barl-base{font-family:var(--mono);font-size:11px;fill:var(--ink2);}
.kq-plot .barl-ours{font-family:var(--mono);font-size:11px;fill:var(--accent-text);}

/* the serve commands in the setup grid, one flag per line */
.note .body .setup > div{min-width:0;}  /* lets a long command scroll inside its cell instead of widening the grid */
.note .body pre.kq-cmd{margin:2px 0 0;padding:10px 12px;font-family:var(--mono);font-size:12.5px;line-height:1.6;
  color:var(--code-ink);background:var(--code-bg);white-space:pre;overflow-x:auto;}
/* a formula in running text stays on one line */
.kq-math{white-space:nowrap}
