:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --hover: rgba(42, 120, 214, 0.08);
  --good: #006300;
  --bad: #d03b3b;
  /* categorical slots (validated: dataviz palette, first three all-pairs) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --de-emphasis: #c3c2b7;
  --shade-errors: #7c5cf0; /* Leaderboard insertions / deletions / substitutions tint */
  --mix-sub: #6d4fcb; /* Leaderboard chart "Error mix": substitutions, deletions, insertions */
  --mix-del: #a48de8;
  --mix-ins: #d8cdf7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --text-primary: #f0efec;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --hover: rgba(57, 135, 229, 0.12);
    --good: #0ca30c;
    --bad: #e66767;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --de-emphasis: #5d5c58;
    --shade-errors: #9a85f5;
    --mix-sub: #b3a0f2;
    --mix-del: #8467dc;
    --mix-ins: #55449a;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --text-primary: #f0efec;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --accent: #3987e5;
  --hover: rgba(57, 135, 229, 0.12);
  --good: #0ca30c;
  --bad: #e66767;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --de-emphasis: #5d5c58;
  --shade-errors: #9a85f5;
  --mix-sub: #b3a0f2;
  --mix-del: #8467dc;
  --mix-ins: #55449a;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent); }

.page-header, .tabs, main {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.page-header { padding-top: 28px; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--text-secondary);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.page-header h1 { margin: 0 0 6px; font-size: 32px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 4px 0 0; color: var(--text-secondary); font-size: 14px; }
.meta > span + span::before { content: "·"; margin: 0 8px; color: var(--text-muted); }

.tabs {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  border-bottom: 1px solid var(--grid);
  overflow-x: auto;
  overflow-y: hidden;
}
.tabs button {
  flex: none;
  padding: 12px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  cursor: pointer;
}
.tabs button:hover { color: var(--text-primary); }
.tabs button[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--accent); font-weight: 600; }

main { padding-top: 20px; padding-bottom: 48px; }
h2 { font-size: 17px; margin: 28px 0 4px; }

/* Leaderboard: Base models / KInIT fine-tuned switch */
.model-set { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
/* page-level switch (what the whole page shows): Leaderboard model set, Trade-offs view */
.set-switch, .tradeoff-views { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: color-mix(in srgb, var(--text-primary) 7%, transparent); }
.set-switch button, .tradeoff-views button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.set-switch button[aria-selected="true"], .tradeoff-views button[aria-pressed="true"] { background: var(--surface); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.set-switch button:hover, .tradeoff-views button:hover { color: var(--text-primary); }
/* dark: the surface colour is almost the track colour, so the picked option gets a lighter fill */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .set-switch button[aria-selected="true"],
  :root:not([data-theme="light"]) .tradeoff-views button[aria-pressed="true"] { background: color-mix(in srgb, var(--text-primary) 16%, var(--surface)); }
}
:root[data-theme="dark"] .set-switch button[aria-selected="true"],
:root[data-theme="dark"] .tradeoff-views button[aria-pressed="true"] { background: color-mix(in srgb, var(--text-primary) 16%, var(--surface)); }
.set-count { padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--text-primary) 9%, transparent); color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.set-switch button[aria-selected="true"] .set-count { background: var(--hover); color: var(--accent); }
.set-note { flex: 1 1 360px; color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.set-note a { color: var(--accent); white-space: nowrap; }
/* Grey note lines (Leaderboard, Compare, Fine-tuned vs. base, Model details), each with an icon
   hanging in front: info = which data is shown, warn = a limitation. Wrapped text stays aligned. */
.note-line { display: block; position: relative; padding-left: 21px; }
.note-line + .note-line { margin-top: 2px; }
.note-icon { position: absolute; left: 0; top: 3px; top: calc((1lh - 15px) / 2); width: 15px; height: 15px; }
.note-icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.note-icon.info { color: var(--text-muted); }
.note-icon.warn { color: var(--series-2); }
.from-base { display: block; margin-top: 2px; color: var(--text-secondary); font-size: 12px; font-weight: 400; }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 8px; }
.filters label { display: flex; flex-direction: column; gap: 4px; color: var(--text-secondary); font-size: 13px; }

.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.segmented button {
  padding: 7px 14px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }

input[type="search"], select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
}
input[type="search"] { min-width: 240px; }
select[multiple] { min-width: 280px; }

.picker { position: relative; }
.picker > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.picker > summary::-webkit-details-marker { display: none; }
.picker > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: -3px 0 0 2px;
  border: solid var(--text-muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  transition: transform 0.12s;
}
.picker[open] > summary { border-color: var(--accent); }
.picker[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.picker > summary:hover { border-color: var(--axis); }
.badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.picker-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  width: max-content;
  min-width: 260px;
  max-width: calc(100vw - 32px);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}
.picker-menu .link-actions {
  align-items: center;
  gap: 12px;
  padding: 10px 14px 8px;
}
.checklist-title { flex: 1; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.picker-menu .link-actions button { font-weight: 600; }
.option-list {
  display: flex;
  flex-direction: column;
  max-height: min(380px, 60vh);
  overflow-y: auto;
  padding: 0 6px 6px;
}
.filters label.option {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.option:hover { background: var(--hover); }
/* Models picker grouped by provider (Leaderboard, Fine-tuned vs. base): columns of groups,
   the group heading is a checkbox for the whole group */
.picker-menu.group-menu { max-width: calc(100vw - 32px); }
.group-list {
  display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(210px, 1fr)); gap: 12px 8px; align-items: start;
  max-height: min(560px, 70vh); overflow-y: auto; padding: 2px 10px 12px;
}
.group-col { display: flex; flex-direction: column; }
.filters .group-list label.option { padding: 5px 8px; }
.filters .group-list label.group-head {
  margin-bottom: 2px; color: var(--text-secondary);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.group-head .option-note { font-size: 12px; letter-spacing: 0; }
@media (max-width: 640px) { .group-list { grid-template-columns: 1fr; } }
.option-note { margin-left: auto; padding-left: 12px; color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.link-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.link-actions button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}
.link-actions button:hover { text-decoration: underline; }

.check {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  display: inline-grid;
  place-content: center;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid var(--axis);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.check::after {
  content: "";
  width: 8px;
  height: 4px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.12s;
}
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
/* some of the group's models ticked: a dash instead of the tick */
.check:indeterminate { background: var(--accent); border-color: var(--accent); }
.check:indeterminate::after { width: 8px; height: 0; border-width: 0 0 2px; transform: none; }
.check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hint { color: var(--text-muted); font-size: 13px; margin: 4px 0 12px; }
.note {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 14px;
}
.error { color: var(--bad); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 20px;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 12px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
td.text, th.text { text-align: left; }
th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--grid);
  cursor: pointer;
  user-select: none;
}
th[aria-sort] { color: var(--text-primary); }
th[aria-sort="ascending"] .th-label::after { content: " ↑"; }
th[aria-sort="descending"] .th-label::after { content: " ↓"; }
.th-note { margin-left: 8px; color: var(--text-muted); font-size: 11px; font-weight: 400; }
td { border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--hover); }

.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: baseline; }

.chart { width: 100%; min-height: 120px; margin-bottom: 8px; }

/* Trade-offs: one chart with three views, styled after the supplied Pareto mockup. */
.tradeoff-views { flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 0 0 16px; }
.tradeoff-card { display: flex; flex-direction: column; gap: 16px; padding: 24px 26px 20px; background: var(--surface); border: 1px solid var(--grid); border-radius: 14px; }
.tradeoff-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.tradeoff-head > div:first-child { flex: 1 1 420px; }
.tradeoff-head h2 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.tradeoff-head p { max-width: 680px; margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.tradeoff-zoom { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; }
.tradeoff-scroll { min-height: 530px; overflow-x: auto; padding: 8px 0 4px; }
.tradeoff-plot-wrap, .tradeoff-x-axis, .tradeoff-axis-foot { min-width: 760px; }
.tradeoff-plot-wrap { display: flex; }
.tradeoff-y-axis { position: relative; flex: 0 0 48px; height: 440px; }
.tradeoff-plot { flex: 1 1 auto; min-width: 0; }
.tradeoff-inner { position: relative; height: 440px; border-radius: 10px; background: var(--page); }
.tradeoff-grid { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.tradeoff-grid-h, .tradeoff-grid-v { position: absolute; display: block; background: var(--grid); }
.tradeoff-grid-h { left: 0; right: 0; height: 1px; }
.tradeoff-grid-v { top: 0; bottom: 0; width: 1px; }
.tradeoff-tick { position: absolute; color: var(--text-muted); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; line-height: 16px; white-space: nowrap; }
.tradeoff-y-axis .tradeoff-tick { right: 12px; transform: translateY(-50%); }
.tradeoff-x-axis { position: relative; width: calc(100% - 48px); min-width: 712px; height: 20px; margin: 6px 0 0 48px; }
.tradeoff-x-axis .tradeoff-tick { top: 4px; transform: translateX(-50%); }
.tradeoff-x-axis .tradeoff-tick.edge-left { transform: none; }
.tradeoff-x-axis .tradeoff-tick.edge-right { transform: translateX(-100%); }
.tradeoff-axis-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0 0 48px; color: var(--text-muted); font-size: 12px; }
.tradeoff-curve { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.tradeoff-area { fill: color-mix(in srgb, var(--series-1) 12%, transparent); }
.tradeoff-line { fill: none; stroke: var(--series-1); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tradeoff-corner { position: absolute; top: 12px; z-index: 1; color: var(--series-1); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; }
.tradeoff-corner.left { left: 14px; }
.tradeoff-corner.right { right: 14px; }
.tradeoff-dot { position: absolute; z-index: 2; padding: 0; border: 0; border-radius: 50%; transform: translate(-50%, -50%); cursor: pointer; transition: opacity 0.15s, box-shadow 0.15s; }
.tradeoff-dot.front { background: var(--series-1); border: 3px solid var(--surface); box-shadow: 0 1px 3px color-mix(in srgb, var(--series-1) 40%, transparent); }
.tradeoff-dot.other { background: var(--de-emphasis); }
.tradeoff-dot.bubble { border: 2px solid var(--de-emphasis); background: color-mix(in srgb, var(--de-emphasis) 20%, transparent); }
.tradeoff-dot.bubble.front { border-color: var(--series-1); background: color-mix(in srgb, var(--series-1) 20%, transparent); }
.tradeoff-dot:hover, .tradeoff-dot:focus-visible { z-index: 5; box-shadow: 0 0 0 6px color-mix(in srgb, var(--series-1) 18%, transparent); outline: none; }
.tradeoff-dot.dimmed, .tradeoff-label.dimmed { opacity: 0.3; }
.tradeoff-label { position: absolute; z-index: 3; color: var(--text-primary); font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; pointer-events: none; text-shadow: 0 0 3px var(--page), 0 0 3px var(--page), 0 0 3px var(--page); }
.tradeoff-label.to-right { transform: translate(var(--label-gap), -50%); }
.tradeoff-label.to-left { transform: translate(calc(-100% - var(--label-gap)), -50%); }
.tradeoff-label.to-top { transform: translate(-50%, calc(-100% - var(--label-gap))); }
.tradeoff-label.to-bottom { transform: translate(-50%, var(--label-gap)); }
.tradeoff-tooltip { position: absolute; z-index: 10; display: flex; flex-direction: column; gap: 10px; width: 250px; padding: 12px 14px; border: 1px solid var(--axis); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 28px rgba(21, 23, 28, 0.16); pointer-events: none; }
.tradeoff-tooltip > strong { font-size: 14px; line-height: 1.3; }
.tradeoff-tip-status { font-size: 12px; }
.tradeoff-tip-status.front { color: var(--series-1); }
.tradeoff-tip-status.beaten { color: #a05025; }
.tradeoff-tip-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tradeoff-tip-stat { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 6px 8px; border-radius: 8px; background: var(--page); }
.tradeoff-tip-stat span { color: var(--text-muted); font-size: 11px; }
.tradeoff-tip-stat strong { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; font-weight: 600; }
.tradeoff-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--text-secondary); font-size: 12px; }
.tradeoff-key { display: inline-flex; align-items: center; gap: 8px; }
.tradeoff-key::before { content: ""; display: inline-block; flex: none; }
.tradeoff-key.front::before { width: 22px; height: 3px; border-radius: 2px; background: var(--series-1); }
.tradeoff-key.other::before { width: 10px; height: 10px; border-radius: 50%; background: var(--de-emphasis); }
.tradeoff-legend-hint { color: var(--text-muted); }
.tradeoff-hidden { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--page); }
.tradeoff-show-all { padding: 0; border: 0; background: none; color: var(--series-1); font: inherit; font-weight: 600; cursor: pointer; }
.tradeoff-show-all:hover, .tradeoff-show-all:focus-visible { text-decoration: underline; }
.tradeoff-note { margin-top: 12px; }

@media (max-width: 640px) {
  .tradeoff-card { padding: 18px 14px; }
  .tradeoff-zoom { width: 100%; justify-content: space-between; }
}

/* About tab */
.about { display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.ab-block { display: flex; flex-direction: column; gap: 16px; }
.ab-block:first-child { gap: 20px; }
.about h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.about h2.ab-title { font-size: 24px; }
.about h3 { margin: 0; font-size: 16px; font-weight: 600; }
.ab-lead { display: flex; flex-direction: column; gap: 8px; }
.ab-lead p { margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.6; }
.ab-block:first-child .ab-lead p { font-size: 16px; }
.ab-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 20px 22px; }
.ab-label { color: var(--text-secondary); font-size: 12px; }
.ab-muted { color: var(--text-muted); }
.ab-small { margin: 0; font-size: 12px; }
.ab-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
/* full-width page: columns sized to their titles, so every title fits on one line and
   "KInIT Slovak benchmark test set" gets the widest card */
@media (min-width: 1200px) { .ab-facts { grid-template-columns: 1.5fr 1fr 1fr 0.9fr 1.05fr; } }
.ab-fact { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.ab-fact strong { font-size: 17px; font-weight: 600; }
.ab-fact span:last-child { color: var(--text-secondary); font-size: 13px; }
/* sticky "On this page" bar: stays at the top while About scrolls; the pill of the
   section in view is filled (aria-current, set by the scroll spy in app.js) */
.ab-toc {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: -8px -16px 0; padding: 12px 16px;
  border-bottom: 1px solid var(--grid);
  background: var(--page);
  font-size: 13px;
}
.ab-toc span { color: var(--text-secondary); }
.ab-toc a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--accent); text-decoration: none; }
.ab-toc a:hover { border-color: var(--accent); }
.ab-toc a[aria-current="true"] { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.ab-top { margin-left: auto; padding: 6px 4px; border: 0; background: none; color: var(--text-secondary); font: inherit; cursor: pointer; white-space: nowrap; }
.ab-top:hover { color: var(--text-primary); }
/* in-page jumps land below the sticky bar, not under it */
.about h2[id] { scroll-margin-top: 72px; }
@media (max-width: 700px) {
  /* on a phone the pills scroll sideways in one row, so the bar stays short */
  .ab-toc { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ab-toc a, .ab-toc span { flex: none; }
  .ab-top { display: none; }
  .about h2[id] { scroll-margin-top: 64px; }
}
.ab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.ab-metric { display: flex; flex-direction: column; gap: 16px; }
.ab-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ab-pill { padding: 2px 10px; border-radius: 999px; background: var(--hover); color: var(--accent); font-size: 12px; white-space: nowrap; }
.ab-pill.good { background: color-mix(in srgb, var(--good) 10%, transparent); color: var(--good); }
.ab-metric dl { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.ab-metric dt { font-size: 14px; font-weight: 600; }
.ab-metric dd { margin: 4px 0 0; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.ab-machine { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 10px; background: var(--page); color: var(--text-secondary); font-size: 13px; }
.ab-machine strong { color: var(--text-primary); }
.ab-norm { display: flex; flex-direction: column; gap: 14px; }
.ab-grid.ab-norm-pair { align-items: stretch; }
.ab-norm-text { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.ab-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ab-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--page); font-size: 13px; }
.ab-step-n { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; font-weight: 600; }
.ab-example { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ab-example > div { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; line-height: 1.5; }
.ab-example > .after { border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: var(--hover); }
.ab-example > .after .ab-label { color: var(--accent); }
.ab-chips-card { display: flex; flex-direction: column; gap: 12px; }
.ab-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-chips span { padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--text-primary) 6%, transparent); font-size: 13px; }
.ab-chips.accent span { background: var(--hover); color: var(--accent); }
.ab-chips-card > .ab-small { font-size: 13px; }
/* Dataset: both cards the same height, their notes aligned at the bottom */
.ab-grid.ab-data-pair { align-items: stretch; }
.ab-data-pair .ab-chips-card > .ab-small { margin-top: auto; }
.ab-table-card { padding: 0; overflow: hidden; }
.ab-table-scroll { overflow-x: auto; }
/* KInIT fine-tunes: table card as tall as the column next to it, rows spread evenly */
.ab-grid.ab-ft { align-items: stretch; }
.ab-ft .ab-table-card { display: flex; flex-direction: column; }
.ab-ft .ab-table-scroll { flex: 1; }
.ab-ft .ab-table { height: 100%; }
.ab-table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 13px; }
.ab-table th { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 12px; font-weight: 600; text-align: left; }
.ab-table td { padding: 10px 16px; border-bottom: 1px solid var(--grid); text-align: left; }
.ab-table tr:last-child td { border-bottom: 0; }
.ab-table .num { text-align: right; }
.ab-table .muted { color: var(--text-secondary); }
.ab-table a { color: var(--accent); text-decoration: none; }
.ab-table a:hover { text-decoration: underline; }
.ab-side { display: flex; flex-direction: column; gap: 12px; }
.ab-side .ab-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
.ab-side h3 { font-size: 15px; }
.ab-trained ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 18px; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.ab-lang p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.ab-lang a { color: var(--accent); }
/* Grey limitation line in Model details (fine-tuned models only), like the Leaderboard note */
.details-limit { margin: -12px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.details-limit a { color: var(--accent); white-space: nowrap; }

/* About → Limitations */
.ab-limits { display: flex; flex-direction: column; gap: 16px; }
.ab-limit { display: flex; flex-direction: column; gap: 12px; }
.ab-limit p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.ab-limit ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 18px; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.ab-limit a { color: var(--accent); }
.ab-pill.warn { background: color-mix(in srgb, var(--series-4) 14%, transparent); color: color-mix(in srgb, var(--series-4) 55%, var(--text-primary)); }
.ab-wip { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding: 12px 14px; border-radius: 10px; background: var(--page); color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.ab-wip > strong { color: var(--text-primary); }
.ab-grid.ab-limit-pair { align-items: stretch; }
.ab-views { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.ab-views > div { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.ab-views > div > strong { color: var(--text-primary); font-size: 15px; }
.ab-views a { color: var(--accent); }
/* same light-blue look as the benchmark's other links and the "After normalization" box */
.ab-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 10px; background: var(--hover); color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; }
.ab-cta:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ab-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; border-top: 1px solid var(--grid); color: var(--text-secondary); font-size: 13px; }
code { font-size: 13px; padding: 1px 4px; border-radius: 4px; background: var(--hover); }

@media (max-width: 640px) {
  .page-header, .tabs, main { padding-left: 16px; padding-right: 16px; }
  .page-header h1 { font-size: 26px; }
  /* a wrapped line would start with a dot: space the items instead */
  .meta { gap: 2px 14px; }
  .meta > span + span::before { content: none; }
  input[type="search"], select[multiple] { min-width: 0; width: 100%; }
  .filters > * { width: 100%; }
}

/* Leaderboard chart view: controls, comparison card */
.ci-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 4px 0 8px; }
.ci-top { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 14px; }
.ci-top input[type="range"] { width: 180px; accent-color: var(--accent); }
.ci-top strong { color: var(--text-primary); white-space: nowrap; }
.ci-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented button:disabled { cursor: default; opacity: 0.55; }
.ci-card { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; padding: 20px 24px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ci-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; font-size: 14px; }
.ci-head .muted { color: var(--text-muted); }
#ci-summary { color: var(--text-secondary); font-size: 13px; }
.ci-scroll { overflow-x: auto; }
.ci-plot { position: relative; min-width: 780px; display: flex; flex-direction: column; gap: 2px; --label-w: 274px; --value-w: 190px; }
.ci-row, .ci-axis { display: flex; align-items: center; gap: 16px; padding-left: 10px; }
.ci-row {
  position: relative;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ci-row.zebra { background: color-mix(in srgb, var(--grid) 35%, transparent); }
.ci-row.tied { background: color-mix(in srgb, var(--series-2) 9%, transparent); }
.ci-row.ref { background: var(--hover); }
.ci-row:hover { outline: 1px solid var(--axis); }
.ci-row:focus-visible { outline: 2px solid var(--accent); }
.ci-label { flex: none; width: var(--label-w); display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; }
.ci-row.ref .ci-name { font-weight: 700; }
.ci-rank { flex: none; width: 20px; color: var(--text-muted); font-family: "IBM Plex Mono", ui-monospace, monospace; }
.ci-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-label .tag { margin-left: 0; font-size: 10px; }
.ci-track { position: relative; flex: 1 1 auto; align-self: stretch; min-width: 0; }
.ci-value { flex: none; width: var(--value-w); display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-right: 10px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; box-sizing: border-box; }
.ci-axis { height: 30px; align-items: flex-start; }
.ci-axis .ci-value { padding-top: 8px; color: var(--text-muted); font-family: inherit; font-size: 11px; }
.ci-tick { position: absolute; top: 8px; transform: translateX(-50%); color: var(--text-muted); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; white-space: nowrap; }
/* behind the rows: same horizontal extent as .ci-track */
.ci-back { position: absolute; top: 0; bottom: 32px; left: calc(10px + var(--label-w) + 16px); right: calc(var(--value-w) + 16px); pointer-events: none; z-index: 1; }
.ci-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.ci-band { position: absolute; top: 0; bottom: 0; min-width: 2px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ci-refline { position: absolute; top: 0; bottom: 0; border-left: 1.5px dashed var(--accent); }
.ci-row > * { position: relative; z-index: 2; }
.ci-whisker { position: absolute; top: 14px; height: 12px; border: solid var(--accent); border-width: 0 2px; box-sizing: border-box; min-width: 2px; }
.ci-whisker::after { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--accent); }
.ci-dot { position: absolute; top: 13px; width: 14px; height: 14px; margin-left: -7px; border: 2px solid var(--accent); border-radius: 50%; box-sizing: border-box; background: var(--accent); }
.ci-dot.hollow { background: var(--surface); }
.ci-dot.static { position: static; display: inline-block; margin: 0; width: 12px; height: 12px; }
.ci-seg { position: absolute; top: 12px; height: 16px; }
.ci-seg.sub, .ci-key-seg.sub { background: var(--mix-sub); }
.ci-seg.del, .ci-key-seg.del { background: var(--mix-del); }
.ci-seg.ins, .ci-key-seg.ins { background: var(--mix-ins); }
.ci-seg.sub { border-radius: 3px 0 0 3px; }
.ci-seg.ins { border-radius: 0 3px 3px 0; }
.ci-delta { min-width: 68px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--text-primary) 6%, transparent); color: var(--text-secondary); font-size: 11px; text-align: center; white-space: nowrap; }
.ci-delta.ref { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.ci-delta.tied { background: color-mix(in srgb, var(--series-2) 18%, transparent); color: color-mix(in srgb, var(--series-2) 55%, var(--text-primary)); }
.ci-legend { margin: 0; padding-top: 12px; border-top: 1px solid var(--grid); }
.ci-legend .ci-delta { min-width: 0; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.ci-key-ref { width: 0; height: 14px; border-left: 1.5px dashed var(--accent); }
.ci-key-band { width: 18px; height: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ci-key-seg { width: 12px; height: 12px; border-radius: 2px; }
@media (max-width: 640px) {
  .ci-top { flex-wrap: wrap; }
  .ci-top input[type="range"] { width: 100%; }
  .ci-card { padding: 16px; }
  .ci-plot { min-width: 540px; --label-w: 170px; --value-w: 128px; }
  .ci-delta { min-width: 52px; }
  .ci-tick:nth-child(even) { visibility: hidden; }
}

/* ---------- Fine-tuned vs. base tab ---------- */
.mono { font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.panel { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 20px 24px 14px; margin-bottom: 24px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 24px; margin-bottom: 14px; }
.panel-head h2 { margin: 0 0 6px; font-size: 19px; }
.panel-sub { margin: 0; max-width: 680px; color: var(--text-secondary); font-size: 14px; }
.cmp-head .panel-sub { max-width: none; }

.dp-key { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.dp-key.base { border: 2px solid var(--text-muted); background: var(--surface); }
.dp-key.ft { background: var(--accent); }

/* rows: label | track | value */
.dot-plot { --label-w: 250px; --value-w: 150px; }
.dp-row, .dp-axis { display: grid; grid-template-columns: var(--label-w) 1fr var(--value-w); align-items: center; column-gap: 16px; }
.dp-row { min-height: 46px; border-bottom: 1px solid var(--grid); }
.dp-label { display: flex; flex-direction: column; min-width: 0; padding: 6px 0; }
.dp-label strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-label > span { color: var(--text-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-track { position: relative; height: 46px; }
.dp-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.dp-line { position: absolute; top: 50%; height: 3px; margin-top: -1.5px; background: color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 2px; }
.dp-dot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; }
.dp-dot.ft { background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.dp-dot.base { width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid var(--text-muted); background: var(--surface); }
.dp-val { position: absolute; top: 50%; transform: translateY(-50%); font-size: 11px; white-space: nowrap; }
.dp-val.left { transform: translate(calc(-100% - 12px), -50%); }
.dp-val.right { margin-left: 12px; }
.dp-val.ft { color: var(--accent); font-weight: 700; }
.dp-val.base { color: var(--text-secondary); }
.dp-delta { text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.dp-axis { min-height: 30px; color: var(--text-muted); font-size: 11px; }
.dp-axis .dp-track { height: 24px; }
.dp-tick { position: absolute; top: 4px; transform: translateX(-50%); }
.dp-axis .dp-delta { font-size: 11px; color: var(--text-muted); }

.ftb-intro { margin: 8px 0 18px; }
.ftb-intro h2 { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.ftb-intro p { margin: 0 0 2px; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.ftb-intro a { color: var(--accent); }
#tab-finetuned-vs-base .view-toggle { margin-left: auto; }
#ftb-search { min-width: 180px; }
.ftb-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 8px 0; }
.ftb-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ftb-group .segmented button { white-space: nowrap; }
.ftb-label { color: var(--text-secondary); font-size: 13px; }
.ftb-note { margin: 8px 0 0; color: var(--text-secondary); font-size: 12px; }
#ft-table th { font-size: 12px; font-weight: 500; color: var(--text-muted); }
#ft-table th[aria-sort] { font-weight: 600; color: var(--text-primary); }
#ft-table td { padding-top: 10px; padding-bottom: 10px; }
#ft-table td:not(.text) { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; }
#ft-table td.muted { color: var(--text-secondary); }
#ft-table td.ftb-ft { color: var(--accent); font-weight: 700; }
.dp-track.ftb-mini { width: 240px; height: 16px; }
.gain { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.gain-abs { color: var(--text-secondary); font-size: 12px; }
.gain-pill { padding: 2px 8px; border-radius: 999px; background: var(--hover); color: var(--accent); font-size: 12px; font-weight: 600; }
.dot-plot .dp-delta { display: flex; justify-content: flex-end; }

@media (max-width: 760px) {
  .panel { padding: 16px 14px 10px; }
  /* phone: model name on its own line above the track, so the track gets the full width */
  .dp-row, .dp-axis { grid-template-columns: 1fr 64px; column-gap: 10px; }
  .dp-label { grid-column: 1 / -1; padding-bottom: 0; }
  .dp-spacer { display: none; }
  /* too narrow for values beside the dots: the table and the row tooltip have them */
  .dot-plot .gain-abs, .dot-plot .dp-val { display: none; }
}

/* ---------- Leaderboard tab: table / chart toggle, table styling ---------- */
.columns-picker, .columns-picker[hidden] + .view-toggle { margin-left: auto; }
.view-toggle button { display: inline-grid; place-content: center; padding: 7px 11px; }
.view-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.view-toggle button[aria-pressed="true"] { background: var(--text-primary); color: var(--page); }
#leaderboard-table th { font-size: 12px; font-weight: 500; color: var(--text-muted); }
#leaderboard-table th[aria-sort] { font-weight: 600; color: var(--text-primary); }
#leaderboard-table td:not(.text) { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; }
#leaderboard-table td.strong { font-weight: 600; }
#leaderboard-table td.muted { color: var(--text-muted); }
#leaderboard-table td { padding-top: 10px; padding-bottom: 10px; }
#leaderboard-table tr.ci-overlap { background: color-mix(in srgb, var(--series-2) 7%, transparent); }
#leaderboard-table tr.ci-overlap:hover { background: var(--hover); }
.model-name { min-width: 220px; max-width: 320px; font-weight: 600; white-space: normal; }
.model-name a { text-decoration: none; }
.model-name a:hover { text-decoration: underline; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  vertical-align: 1px;
}
.tag.api { border-radius: 6px; background: color-mix(in srgb, var(--text-primary) 8%, transparent); color: var(--text-secondary); }
.tag.api svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tag.ft { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--hover); color: var(--accent); text-decoration: none; }
.tag.third { border-radius: 6px; border-color: var(--axis); background: transparent; color: var(--text-secondary); }
/* scored on fewer utterances than the full test set: same warning hue as tied ranks and note-icon.warn */
.tag.partial { border-radius: 6px; border-color: color-mix(in srgb, var(--series-2) 45%, transparent); background: transparent; color: color-mix(in srgb, var(--series-2) 75%, var(--text-primary)); cursor: help; }
a.tag.ft:hover { border-color: var(--accent); }
.table-legend .tag { margin-left: 0; }
.rank-tie { color: color-mix(in srgb, var(--series-2) 75%, var(--text-primary)); font-weight: 600; }
.bar-row { display: flex; align-items: center; gap: 10px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; }
.bar-num { min-width: 48px; text-align: right; }
.bar { position: relative; flex: none; height: 12px; border-radius: 2px; background: color-mix(in srgb, var(--grid) 60%, transparent); }
.bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--accent); }
.bar-mark { position: absolute; top: -2px; bottom: -2px; min-width: 3px; background: var(--text-primary); }
.bar.wer { width: 150px; }
.bar.wer-sm { width: 90px; }
.bar.wer-wide { width: 220px; }
.bar-value { min-width: 48px; text-align: right; font-weight: 600; }
.bar.rtfx { width: 72px; }
.bar.rtfx .bar-fill { background: color-mix(in srgb, var(--series-2) 70%, transparent); }
.ci-text { min-width: 104px; color: var(--text-muted); }
.stack small { display: block; color: var(--text-muted); font-size: 11px; }
.table-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; margin: -8px 0 20px; color: var(--text-secondary); font-size: 12px; }
.table-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.shade-scale {
  width: 80px;
  height: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(to right, color-mix(in srgb, var(--shade) 32%, transparent), color-mix(in srgb, var(--shade) 3%, transparent));
}
@media (max-width: 640px) {
  .filters > .view-toggle { width: auto; }
  .columns-picker { margin-left: 0; }
}

/* Edit columns panel and the "+" at the end of the table header */
.columns-picker > summary::after { content: none; }
.columns-picker > summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.summary-count { color: var(--text-muted); font-weight: 400; }
.columns-menu { left: auto; right: 0; width: min(600px, calc(100vw - 32px)); padding: 16px 20px; }
.cols-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.cols-head strong { font-size: 16px; }
.cols-count { color: var(--text-muted); font-size: 13px; }
.cols-close { margin-left: auto; padding: 0 4px; border: 0; background: none; color: var(--text-secondary); font-size: 22px; line-height: 1; cursor: pointer; }
.cols-close:hover { color: var(--text-primary); }
.cols-label {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cols-views { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--grid); }
.cols-view {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.cols-view:hover { border-color: var(--axis); }
.cols-view[aria-pressed="true"] { border-color: var(--accent); background: var(--hover); color: var(--accent); font-weight: 600; }
.cols-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 24px; padding-bottom: 16px; border-bottom: 1px solid var(--grid); }
.filters .cols-grid label { flex-direction: row; align-items: center; gap: 10px; padding: 5px 0; color: var(--text-primary); font-size: 14px; cursor: pointer; }
.cols-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.columns-menu .link-actions { padding: 0; }
.columns-menu .link-actions button { font-weight: 400; }
.cols-done { padding: 8px 22px; border: 0; border-radius: 8px; background: var(--text-primary); color: var(--page); font: inherit; font-weight: 600; cursor: pointer; }
#leaderboard-table th.th-action { width: 1%; cursor: default; }
.add-col {
  display: inline-grid;
  place-content: center;
  width: 32px;
  height: 32px;
  border: 1px dashed var(--axis);
  border-radius: 8px;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.add-col:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) {
  .cols-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Find your model tab ---------- */
.fit-panel { display: flex; flex-direction: column; gap: 18px; padding: 22px 24px; }
.fit-panel h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.fit-head .note-line { margin: 0 0 2px; color: var(--text-secondary); font-size: 13px; }
.fit-controls { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.fit-control { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.fit-control .segmented { flex-wrap: wrap; }
.fit-control > span { color: var(--text-secondary); font-size: 13px; font-weight: 600; }


.fit-best {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 40px;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 12px;
  background: var(--hover);
}
.fit-best-text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; }
.fit-eyebrow { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.fit-best-name { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.fit-best-name a { color: inherit; text-decoration: none; }
.fit-best-name a:hover { color: var(--accent); }
.fit-compare { color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.fit-stats { flex: 1 1 360px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fit-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.fit-stat > span:first-child { color: var(--text-secondary); font-size: 12px; }
.fit-stat-value { font-size: 22px; font-weight: 600; }
.fit-empty { padding: 20px 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--page); color: var(--text-secondary); font-size: 14px; }

.fit-list { display: flex; flex-direction: column; }
.fit-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) minmax(160px, 1fr) minmax(180px, 1fr);
  gap: 0 20px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--grid);
  border-radius: 6px;
}
.fit-row.fit-head { padding-top: 0; padding-bottom: 8px; border-radius: 0; color: var(--text-secondary); font-size: 12px; }
.fit-row.best { background: var(--hover); }
.fit-name { display: flex; flex-direction: column; gap: 2px; }
.fit-name strong { color: var(--text-primary); font-size: 14px; font-weight: 500; }
.fit-row.best .fit-name strong { font-weight: 700; }
.fit-name span { color: var(--text-secondary); font-size: 12px; }
.fit-wer { display: flex; align-items: center; gap: 10px; }
.fit-wer > span:last-child { width: 52px; color: var(--text-primary); font-size: 13px; text-align: right; }
.fit-bar { position: relative; flex: 1 1 auto; height: 8px; border-radius: 4px; background: var(--grid); overflow: hidden; }
.fit-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--accent); }
.fit-status { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 13px; }
.fit-icon { display: inline-grid; flex: none; }
.fit-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fit-row.out .fit-name strong { font-weight: 400; color: var(--text-muted); }
.fit-row.out .fit-wer > span:last-child { color: var(--text-muted); }
.fit-row.out .fit-bar > span { background: var(--de-emphasis); }
.fit-row.out .fit-status { color: var(--text-secondary); }
/* "Show N models that don't fit" toggle and the folded list under it */
.fit-more {
  display: flex; align-items: center; gap: 8px; align-self: flex-start;
  margin-top: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.fit-more:hover { border-color: var(--axis); color: var(--text-primary); }
.fit-more-chevron { width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform 0.12s; }
.fit-more[aria-expanded="true"] .fit-more-chevron { margin-top: 3px; transform: rotate(-135deg); }
.fit-out { display: flex; flex-direction: column; margin-top: 6px; }

@media (max-width: 640px) {
  .fit-panel { padding: 16px 14px; }
  .fit-row { grid-template-columns: 1fr; gap: 6px; }
  .fit-row.fit-head { display: none; }
  .fit-best-name { font-size: 22px; }
}

/* Model details: summary first, then the two most useful breakdowns. */
#tab-model-details {
  --detail-border: #e3e3de;
  --detail-track: #f4f4f0;
  --detail-blue: #2463eb;
  --detail-blue-soft: #e6eefd;
  --detail-purple-1: #6d4fcb;
  --detail-purple-2: #a48de8;
  --detail-purple-3: #d8cdf7;
  --detail-warm: #fdebdc;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-variant-numeric: tabular-nums;
}
.details-heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.details-heading > div:first-child { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.details-label { color: var(--text-secondary); font-size: 12px; }
/* Model dropdown: big trigger with the model name, menu with base models grouped by
   provider in columns and fine-tunes in a tinted side panel */
.model-picker { width: min(100%, 520px); }
.model-picker > summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; min-height: 48px; padding: 8px 16px;
  border-color: var(--axis); border-radius: 10px;
  font-size: 20px; font-weight: 700; line-height: 1.3;
}
.model-picker > summary::after { flex: none; margin-right: 4px; }
.model-menu {
  display: flex; gap: 20px; align-items: stretch;
  width: min(1152px, calc(100vw - 48px)); max-width: none;
  max-height: min(680px, calc(100vh - 160px)); overflow-y: auto;
  padding: 18px 20px;
  border-radius: 12px;
}
.model-menu-set { min-width: 0; }
.model-menu-set.base { flex: 1; }
.model-menu-set.finetuned {
  flex: 0 0 270px; padding: 14px 10px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}
.model-menu-head { padding: 0 10px 6px; font-size: 15px; }
.model-menu-head span { color: var(--text-secondary); }
.model-menu-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 12px; align-items: start; }
.finetuned .model-menu-groups { grid-template-columns: 1fr; gap: 10px; }
.model-menu-group { display: flex; flex-direction: column; }
.model-menu-title {
  padding: 6px 10px 4px; color: var(--text-secondary);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.finetuned .model-menu-title { color: var(--accent); }
.model-menu-item {
  padding: 4px 10px; border: 0; border-radius: 7px; background: none;
  color: var(--text-primary); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.model-menu-item:hover, .model-menu-item:focus-visible { background: var(--hover); outline: none; }
.model-menu-item[aria-current="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 600; }
@media (max-width: 760px) {
  .model-menu { flex-direction: column; width: calc(100vw - 32px); max-height: calc(100vh - 140px); padding: 14px 12px; }
  .model-menu-set.finetuned { flex: none; }
  .model-menu-groups { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.details-badges, .details-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.details-badges { margin-top: 3px; }
.details-badge { padding: 3px 10px; border: 1px solid var(--detail-border); border-radius: 999px; background: var(--surface); color: var(--text-secondary); font-size: 13px; line-height: 1.4; }
.details-badge.primary { border-color: transparent; background: var(--detail-blue-soft); color: #1d4fc4; font-weight: 600; }
.details-actions { gap: 6px; }
.details-model-link, .details-compare { display: inline-flex; align-items: center; min-height: 27px; padding: 3px 10px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; text-decoration: none; white-space: nowrap; cursor: pointer; }
.details-model-link { border: 1px solid #bfd0f8; background: #eef3fe; color: #1d4fc4; }
.details-compare { border: 1px solid transparent; background: #15171c; color: #fff; }
#details-summary > h2 { margin: 0 0 12px; font-size: 18px; }
.details-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.details-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 162px; padding: 18px; border: 1px solid var(--detail-border); border-radius: 12px; background: var(--surface); }
.details-card h3 { margin: 0; padding-right: 80px; color: var(--text-secondary); font-size: 13px; font-weight: 500; line-height: 1.4; }
.details-rank { position: absolute; top: 18px; right: 18px; color: #1d4fc4; font-size: 12px; font-weight: 600; }
.details-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.details-value strong { font-size: 32px; line-height: 1.25; }
.details-card:first-child .details-value strong { color: #1d4fc4; }
.details-value > span, .details-card > small, .details-ci { color: var(--text-secondary); font-size: 12px; }
.details-ci { font-family: "IBM Plex Mono", monospace; }
.details-rank-strip { display: flex; gap: 4px; margin-top: auto; }
.details-rank-strip span { flex: 1; height: 8px; border-radius: 2px; background: var(--detail-border); }
.details-rank-strip span.active { background: var(--detail-blue); }
.details-card small { font-size: 11px; }
.details-card-note { position: absolute; right: 18px; top: 18px; }
.details-error-bar { display: flex; height: 18px; margin-top: 10px; overflow: hidden; border-radius: 4px; }
.details-error-bar span.error-0, .details-error-name .error-0 { background: var(--detail-purple-1); }
.details-error-bar span.error-1, .details-error-name .error-1 { background: var(--detail-purple-2); }
.details-error-bar span.error-2, .details-error-name .error-2 { background: var(--detail-purple-3); }
.details-error-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.details-error-legend > div { display: flex; flex-direction: column; gap: 2px; }
.details-error-name { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 12px; }
.details-error-name i { width: 10px; height: 10px; flex: none; border-radius: 2px; }
.details-error-legend strong { font-size: 18px; }
.details-number-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.details-number-pair > div { display: flex; flex-direction: column; gap: 2px; }
.details-number-pair span, .details-number-pair small { color: var(--text-secondary); font-size: 12px; }
.details-number-pair strong { font-size: 24px; }
.details-number-note { margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--detail-border); color: var(--text-secondary); font-size: 12px; }
.details-card > p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.details-card .details-no-speed { font-size: 32px; }
.details-card ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.details-breakdown { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--detail-border); border-radius: 12px; background: var(--surface); }
.details-breakdown-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.details-breakdown h2 { margin: 0; font-size: 18px; }
.details-breakdown .details-breakdown-pick { margin: 0; }
.details-breakdown .details-breakdown-note { margin: 0; }
.details-breakdown p { margin: 3px 0 0; color: var(--text-secondary); font-size: 13px; }
.details-metric button { min-height: 40px; padding: 0 16px; font-size: 13px; }
.details-breakdown-scroll { overflow-x: auto; }
.details-breakdown-grid { min-width: 760px; }
.details-breakdown-row { display: grid; grid-template-columns: 210px 140px minmax(180px, 1fr) 150px; align-items: center; gap: 16px; min-height: 48px; border-bottom: 1px solid var(--detail-track); }
.details-breakdown[data-dimension="source_dataset_name"] .details-breakdown-grid { min-width: 940px; }
.details-breakdown[data-dimension="source_dataset_name"] .details-breakdown-row { grid-template-columns: 300px 140px minmax(180px, 1fr) 150px; }
.details-breakdown-labels { min-height: 30px; border-bottom-color: var(--detail-border); color: var(--text-secondary); font-size: 12px; }
.details-breakdown-labels span:last-child { text-align: right; }
.details-row-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.details-row-name strong { font-weight: 600; overflow-wrap: anywhere; }
.details-small { padding: 1px 7px; border: 1px solid var(--axis); border-radius: 999px; color: var(--text-secondary); font-size: 11px; }
.details-samples { display: flex; align-items: center; gap: 8px; font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.details-samples > span { width: 46px; text-align: right; }
.details-samples i { position: relative; flex: 1; height: 6px; border-radius: 2px; background: var(--detail-track); }
.details-samples i::before { position: absolute; inset: 0 auto 0 0; width: var(--bar-width); border-radius: 2px; background: #b9b9b2; content: ""; }
.details-rate { display: flex; align-items: center; gap: 10px; }
.details-rate-track { position: relative; flex: 1; height: 16px; border-radius: 3px; background: var(--detail-track); }
.details-rate-track::before { position: absolute; inset: 0 auto 0 0; width: var(--bar-width); border-radius: 3px; background: var(--detail-blue); content: ""; }
.details-rate-track::after { position: absolute; top: -6px; bottom: -6px; left: var(--overall-position); border-left: 1.5px dashed var(--text-primary); content: ""; }
.details-rate strong { width: 62px; flex: none; font-family: "IBM Plex Mono", monospace; font-size: 13px; text-align: right; }
.details-delta { justify-self: end; padding: 2px 9px; border-radius: 999px; font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.details-delta.better { background: var(--detail-blue-soft); color: #1d4fc4; }
.details-delta.worse { background: var(--detail-warm); color: #8a3a12; }
.details-delta.neutral { background: var(--detail-track); color: var(--text-secondary); }
.details-axis { min-height: 22px; border: 0; color: var(--text-secondary); font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.details-axis-ticks { display: flex; justify-content: space-between; padding-right: 72px; }
.details-footer { margin: 0; color: var(--text-secondary); font-size: 13px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #tab-model-details { --detail-border: #383835; --detail-track: #2c2c2a; --detail-blue: #3987e5; --detail-blue-soft: #18345d; --detail-warm: #51301e; }
  :root:not([data-theme="light"]) .details-badge.primary, :root:not([data-theme="light"]) .details-rank, :root:not([data-theme="light"]) .details-card:first-child .details-value strong, :root:not([data-theme="light"]) .details-delta.better { color: #a8c8ff; }
  :root:not([data-theme="light"]) .details-model-link { border-color: #365884; background: #18345d; color: #a8c8ff; }
  :root:not([data-theme="light"]) .details-compare { background: #eee; color: #15171c; }
  :root:not([data-theme="light"]) .details-delta.worse { color: #ffba92; }
}
:root[data-theme="dark"] #tab-model-details { --detail-border: #383835; --detail-track: #2c2c2a; --detail-blue: #3987e5; --detail-blue-soft: #18345d; --detail-warm: #51301e; }
:root[data-theme="dark"] .details-badge.primary, :root[data-theme="dark"] .details-rank, :root[data-theme="dark"] .details-card:first-child .details-value strong, :root[data-theme="dark"] .details-delta.better { color: #a8c8ff; }
:root[data-theme="dark"] .details-model-link { border-color: #365884; background: #18345d; color: #a8c8ff; }
:root[data-theme="dark"] .details-compare { background: #eee; color: #15171c; }
:root[data-theme="dark"] .details-delta.worse { color: #ffba92; }
@media (max-width: 640px) {
  .model-picker { width: 100%; }
  .model-picker > summary { font-size: 18px; }
  .details-heading > div:first-child { width: 100%; }
  .details-breakdown { padding: 18px 14px; }
  .details-actions { width: 100%; }
}

/* ---------- Compare tab: model picker, chips, dot rows, table ---------- */
.cmp-head { margin-bottom: 14px; }
.cmp-head h2 { margin: 0 0 4px; font-size: 20px; }
.cmp-controls { align-items: center; }
.cmp-controls .view-toggle { margin-left: auto; }
.cmp-controls { margin-bottom: 6px; }
.cmp-kind-note { margin: 0 0 12px; color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.cmp-kind-note a { color: var(--accent); white-space: nowrap; }
.cmp-breakdown { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; color: var(--text-secondary); font-size: 13px; }
.cmp-breakdown .segmented { flex-wrap: wrap; }

.cmp-dot { flex: none; display: inline-block; width: 12px; height: 12px; border: 2px solid var(--c); border-radius: 50%; background: var(--c); }
.cmp-dot.hollow { background: var(--surface); }
.cmp-dot.empty { border-color: transparent; background: none; }

.cmp-picker-menu { width: 380px; }
.cmp-picker-menu .option-list { max-height: min(360px, 55vh); }
.cmp-picker-menu label.option span:nth-of-type(2) { flex: 1; }
.cmp-picker-menu .check:disabled { cursor: not-allowed; opacity: 0.45; }
.cmp-picker-menu label.option:has(.check:disabled) { color: var(--text-muted); cursor: not-allowed; }
.cmp-picker-menu label.option:has(.check:checked) { background: var(--hover); }
.cmp-picker-foot { display: flex; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--grid); }
.cmp-done { padding: 7px 16px; border: 0; border-radius: 8px; background: var(--text-primary); color: var(--page); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

.cmp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.cmp-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 4px 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; }
.cmp-chip-remove { display: grid; place-content: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--text-muted); cursor: pointer; }
.cmp-chip-remove:hover { background: var(--hover); color: var(--text-primary); }
.cmp-chip-remove svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cmp-add { min-height: 34px; padding: 0 12px; border: 1px dashed var(--axis); border-radius: 999px; background: none; color: var(--text-secondary); font: inherit; font-size: 13px; cursor: pointer; }
.cmp-add:hover { border-color: var(--accent); color: var(--accent); }

.cmp-empty { padding: 40px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text-secondary); font-size: 14px; text-align: center; }
.cmp-summary { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); font-size: 14px; }

.cmp-chart { overflow-x: auto; padding: 8px 20px 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.cmp-plot { min-width: 760px; }
.cmp-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; column-gap: 16px; border-bottom: 1px solid var(--grid); }
.cmp-row.overall { border-bottom-color: var(--axis); background: color-mix(in srgb, var(--text-primary) 2.5%, transparent); }
.cmp-header { align-items: center; min-height: 36px; color: var(--text-muted); font-size: 12px; }
.cmp-header .cmp-win { justify-content: flex-end; }
.cmp-label { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 8px 0 8px 8px; }
.cmp-label strong { font-size: 14px; font-weight: 600; }
.cmp-row.overall .cmp-label strong { font-weight: 700; }
.cmp-label span { color: var(--text-muted); font-size: 11px; }
.cmp-lanes { position: relative; height: calc(14px + var(--lanes) * 18px); }
.cmp-gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.cmp-lanes .cmp-dot { position: absolute; z-index: 1; margin-left: -6px; cursor: default; }
.cmp-ci { position: absolute; height: 2px; margin-top: 5px; opacity: 0.6; }
.cmp-value { position: absolute; margin: -3px 0 0 10px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; line-height: 16px; white-space: nowrap; }
.cmp-value.left { transform: translateX(calc(-100% - 20px)); }
.cmp-value.best { font-weight: 700; }
.cmp-none { position: absolute; left: 0; margin-top: -3px; color: var(--text-muted); font-size: 11px; }
.cmp-win { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; padding-right: 8px; font-size: 12px; }
.cmp-win .cmp-dot { width: 10px; height: 10px; }
.cmp-win-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-win-gap { color: var(--text-muted); font-family: "IBM Plex Mono", ui-monospace, monospace; }
.cmp-axis { border-bottom: 0; height: 30px; }
.cmp-ticks { position: relative; }
.cmp-ticks span { position: absolute; top: 8px; transform: translateX(-50%); color: var(--text-muted); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; }

.cmp-table th { cursor: default; font-size: 13px; }
.cmp-table thead th { color: var(--text-primary); }
.cmp-table thead th:first-child { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.cmp-table thead th .cmp-dot { width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px; }
.cmp-table tbody th { position: static; border-bottom: 1px solid var(--grid); background: none; font-weight: 400; text-align: left; }
.cmp-table tbody th strong, .cmp-table tbody th span { display: block; }
.cmp-table tbody th strong { color: var(--text-primary); font-weight: 600; }
.cmp-table tbody th span { color: var(--text-muted); font-size: 11px; }
.cmp-table tr.overall th strong { font-weight: 700; }
.cmp-table tr.overall { background: color-mix(in srgb, var(--text-primary) 2.5%, transparent); }
.cmp-table td span { display: block; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.cmp-cell-value { font-size: 13px; }
.cmp-cell-sub { color: var(--text-muted); font-size: 11px; }
.cmp-table td.best { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.cmp-table td.best .cmp-cell-value { font-weight: 700; }
.cmp-table tbody tr:last-child th { border-bottom: 0; }

@media (max-width: 640px) {
  .cmp-controls .view-toggle { margin-left: 0; }
  .cmp-picker-menu { width: calc(100vw - 32px); }
}
