/*
 * Signal Labs LLM Gateway portal.
 * Visual language matches Unsloth Studio's default palette: the token VALUES (colours, radius, flat
 * zero shadows, pill controls, type families) were read from Studio's build. This stylesheet is our
 * own code; no Studio source is copied. Fonts are OFL (Inter, Space Grotesk, Fira Code). Studio's
 * heading face, Hellix, is commercial, so we use Studio's own fallback for it, Space Grotesk.
 */

@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/inter-latin-ext-wght.woff2) format("woff2-variations");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/inter-latin-wght.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk Variable"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(/static/fonts/space-grotesk-latin-ext-wght.woff2) format("woff2-variations");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk Variable"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(/static/fonts/space-grotesk-latin-wght.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Code"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(/static/fonts/fira-code-wght.ttf) format("truetype-variations"); }

/* ---------- tokens ---------- */
:root {
  --background: #fefefd;
  --foreground: oklch(26.86% 0 0);
  --card: #fff;
  --card-foreground: oklch(12.81% .0179 169.276);
  --primary: #17b88b;
  --primary-foreground: #fff;
  --secondary: oklch(95.96% .0275 167.83);
  --secondary-foreground: oklch(28.68% .0649 159.982);
  --muted: oklch(97.02% 0 0);
  --muted-foreground: oklch(54.86% 0 0);
  --accent: #ececec;
  --accent-foreground: #262626;
  --destructive: oklch(63.68% .2078 25.3313);
  --bypass: #c99d00;
  --border: oklch(92.08% .0101 164.854);
  --input: oklch(92.08% .0101 164.854);
  --ring: #262626;
  --success: #11b686;
  --sidebar: #fff;
  --sidebar-border: #f2f2f2;
  --nav-fg: #383835;
  --nav-fg-muted: #8f8f8f;
  --nav-surface-hover: #f0f0f0;
  --panel-input-surface: #f5f5f5;
  --input-surface: var(--background);
  --input-surface-focus: var(--background);
  --wash: rgb(0 0 0 / .05);

  --radius: 1.1rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-4xl: calc(var(--radius) + 16px);

  --font-sans: "Inter Variable", ui-sans-serif, sans-serif, system-ui;
  --font-heading: "Space Grotesk Variable", var(--font-sans);
  --font-mono: "Fira Code", "JetBrains Mono", ui-monospace, monospace;

  --ease-out-quart: cubic-bezier(.165, .84, .44, 1);
  color-scheme: light;
}

.dark {
  --background: #181818;
  --foreground: #dfdfdf;
  --card: #272727;
  --card-foreground: #dfdfdf;
  --primary: #17b88b;
  --primary-foreground: #fff;
  --secondary: #303030;
  --secondary-foreground: #dfdfdf;
  --muted: #303030;
  --muted-foreground: #b0b0b0;
  --accent: #3a3a3a;
  --accent-foreground: #dfdfdf;
  --bypass: #ffd60a;
  --border: #3a3a3a;
  --input: #3a3a3a;
  --ring: #dfdfdf;
  --sidebar: #272727;
  --sidebar-border: #3a3a3a;
  --nav-fg: #dfdfdf;
  --nav-fg-muted: #b0b0b0;
  --nav-surface-hover: #3a3a3a;
  --panel-input-surface: #ffffff12;
  --input-surface: rgb(255 255 255 / .06);
  --input-surface-focus: rgb(255 255 255 / .12);
  --wash: rgb(255 255 255 / .06);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans); font-size: .875rem; line-height: 1.5;
  background: var(--background); color: var(--foreground);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
h1, h2, h3 { font-family: var(--font-heading); font-weight: 500; color: var(--foreground); }
a { color: inherit; text-decoration: none; }
code, pre, kbd { font-family: var(--font-mono); }
svg { width: 16px; height: 16px; flex-shrink: 0; }
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }

/* ---------- shell: sidebar + main, like Studio ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--sidebar); border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; padding: 14px 10px; gap: 4px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px; background: var(--primary);
  display: grid; place-items: center; color: #fff; font-family: var(--font-heading); font-weight: 600; font-size: 15px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--font-heading); font-weight: 600; font-size: 15px; }
.brand-text span { font-size: 11px; color: var(--nav-fg-muted); }
.nav-label { font-size: 11px; color: var(--nav-fg-muted); padding: 12px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 10px;
  color: var(--nav-fg); font-size: 13.5px; transition: background-color .15s;
}
.nav-item svg { width: 16px; height: 16px; color: var(--nav-fg-muted); flex-shrink: 0; }
.nav-item:hover { background: var(--nav-surface-hover); }
.nav-item.active { background: var(--nav-surface-hover); font-weight: 500; }
.nav-item.active svg { color: var(--primary); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; }
.who img, .who .avatar { width: 26px; height: 26px; flex: none; border-radius: 999px; background: var(--accent); }
.who .avatar { display: grid; place-items: center; font: 600 11px var(--font-sans); color: var(--accent-foreground); background: color-mix(in srgb, var(--primary) 22%, var(--accent)); }
.who .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.who .meta b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .meta span { font-size: 11px; color: var(--nav-fg-muted); }

main { padding: 40px 48px 80px; min-width: 0; }
.page { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; }
.page-head p { color: var(--muted-foreground); margin-top: 4px; max-width: 60ch; }

/* ---------- card ---------- */
.card {
  background: var(--card); color: var(--card-foreground); border-radius: var(--radius-4xl);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);
  padding: 24px 0; display: flex; flex-direction: column; gap: 20px; overflow: hidden;
}
.card-head { padding: 0 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 1rem; font-weight: 600; }
.card-head p { color: var(--muted-foreground); font-size: 13px; margin-top: 2px; }
.card-body { padding: 0 24px; }

/* ---------- buttons (pill) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid transparent;
  font: 500 .875rem/1 var(--font-sans); cursor: pointer; user-select: none; transition: all .15s;
  background: var(--primary); color: var(--primary-foreground);
}
.btn:hover { background: color-mix(in srgb, var(--primary) 80%, transparent); }
.btn:focus-visible { outline: none; border-color: var(--ring); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { height: 32px; padding: 0 12px; }
.btn-xs { height: 24px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 40px; padding: 0 16px; }
.btn-dark { background: var(--foreground); color: var(--background); }
.btn-dark:hover { background: color-mix(in srgb, var(--foreground) 85%, transparent); }
.btn-outline { background: var(--background); border-color: var(--border); color: var(--foreground); }
.btn-outline:hover { background: color-mix(in srgb, var(--accent) 50%, transparent); }
.dark .btn-outline { background: rgb(255 255 255 / .06); border-color: transparent; }
.dark .btn-outline:hover { background: rgb(255 255 255 / .1); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); }
.btn-destructive { background: color-mix(in srgb, var(--destructive) 10%, transparent); color: var(--destructive); }
.btn-destructive:hover { background: color-mix(in srgb, var(--destructive) 20%, transparent); }
.dark .btn-destructive { background: color-mix(in srgb, var(--destructive) 20%, transparent); }

/* ---------- inputs (pill) ---------- */
.input {
  height: 36px; width: 100%; min-width: 0; border-radius: 999px; border: 1px solid var(--border);
  background: var(--input-surface); color: var(--foreground); padding: 4px 14px;
  font: 400 .875rem var(--font-sans); outline: none; transition: background-color .15s, border-color .15s;
}
.dark .input { border-color: transparent; }
.input::placeholder { color: var(--muted-foreground); }
.input:focus-visible { border-color: var(--ring); }
.dark .input:focus-visible { border-color: transparent; background: var(--input-surface-focus); }
.row-form { display: flex; gap: 8px; align-items: center; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; padding: 0 20px; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); transition: background-color .15s;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.list-row .icon-box {
  width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); background: color-mix(in srgb, var(--muted) 40%, transparent);
}
.list-row .icon-box svg { width: 15px; height: 15px; color: var(--muted-foreground); }
.list-row .main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.list-row .main b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .sub { font-size: 11px; color: var(--muted-foreground); display: flex; flex-wrap: wrap; gap: 0 6px; }
.list-row .actions { opacity: 0; transition: opacity .15s; }
.list-row:hover .actions, .list-row:focus-within .actions { opacity: 1; }
.empty { padding: 24px; text-align: center; font-size: 12px; color: var(--muted-foreground); }
.dot { width: 6px; height: 6px; border-radius: 999px; background: #10b981; display: inline-block; }

/* ---------- table ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; font-size: 11px; color: var(--muted-foreground); padding: 0 24px 8px; }
.table td { padding: 11px 24px; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); vertical-align: top; }
.table tr:hover td { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.num { text-align: right; }
.table td.model { font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }
.table td.desc { color: var(--muted-foreground); }

/* ---------- code ---------- */
.code {
  position: relative; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: color-mix(in srgb, var(--muted) 20%, transparent); overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 14px;
  border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted-foreground);
}
.code pre { padding: 12px 14px; overflow-x: auto; font-size: 12px; line-height: 1.6; color: var(--foreground); }
.inline-code {
  font-family: var(--font-mono); font-size: 12px; padding: 1px 6px; border-radius: 6px;
  background: var(--muted); border: 1px solid var(--border);
}
.copy {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 80%, transparent); padding: 2px 7px;
  font: 400 11px var(--font-sans); color: var(--muted-foreground); cursor: pointer; transition: color .15s;
}
.copy:hover { color: var(--foreground); }
.copy svg { width: 12px; height: 12px; }

/* ---------- callouts ---------- */
.callout { border-radius: var(--radius-lg); padding: 12px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.callout-success { border: 1px solid rgb(16 185 129 / .3); background: rgb(16 185 129 / .05); }
.callout-success .title { color: #059669; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.callout-success .title svg { width: 14px; height: 14px; }
.dark .callout-success .title { color: #10b981; }
.callout-error { border: 1px solid color-mix(in srgb, var(--destructive) 20%, transparent); background: color-mix(in srgb, var(--destructive) 5%, transparent); color: var(--destructive); }
.callout-warn { border: 1px solid color-mix(in srgb, var(--bypass) 35%, transparent); background: color-mix(in srgb, var(--bypass) 8%, transparent); }
.secret {
  display: flex; align-items: center; gap: 8px; border-radius: 8px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--muted) 30%, transparent); padding: 6px 6px 6px 10px;
}
.secret code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 24px; }
.stat { border-radius: var(--radius-lg); background: var(--wash); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat span { font-size: 11px; color: var(--muted-foreground); }
.stat b { font-family: var(--font-heading); font-weight: 500; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 999px; background: var(--wash); overflow: hidden; margin: 0 24px; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.meter.hot > i { background: var(--bypass); }

/* ---------- tabs (Studio's pill toggle) ---------- */
.tabs { display: inline-flex; height: 32px; align-items: center; border-radius: 999px; padding: 3px; background: var(--wash); gap: 2px; }
.tab {
  height: 26px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center;
  font-size: 12.5px; color: var(--muted-foreground); cursor: pointer; border: 0; background: transparent; font-family: var(--font-sans);
}
.tab:hover { color: var(--foreground); }
.tab[aria-selected="true"] { background: var(--background); color: var(--foreground); box-shadow: 0 2px 8px -2px #00000029; }
.dark .tab[aria-selected="true"] { background: var(--accent); box-shadow: none; }
.tab-panel[hidden] { display: none; }

/* ---------- landing ---------- */
.landing { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.landing .card { width: 100%; max-width: 440px; padding: 36px 0 28px; text-align: center; align-items: center; gap: 18px; }
.landing h1 { font-size: 1.6rem; font-weight: 600; }
.landing p { color: var(--muted-foreground); max-width: 34ch; margin: 0 auto; }
.landing .fine { font-size: 11px; color: var(--muted-foreground); }

.muted { color: var(--muted-foreground); }
.small { font-size: 12px; }
.mono { font-family: var(--font-mono); }
.spacer { flex: 1; }
.gap { height: 12px; }
.theme-toggle { justify-content: flex-start; border: 0; background: transparent; cursor: pointer; font: inherit; width: 100%; text-align: left; }
.brand-mark-lg { width: 44px; height: 44px; border-radius: 14px; font-size: 22px; }
.landing-note { text-align: left; margin: 0 24px; }
.link { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border); }
.link:hover { text-decoration-color: var(--foreground); }
form.inline { display: inline; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar-foot { margin: 0; flex-direction: row; }
  .nav-label { display: none; }
  main { padding: 24px 16px 60px; }
  .stats { grid-template-columns: 1fr; }
  .list-row .actions { opacity: 1; }
}

/* ---------- admin ---------- */
.page-wide { max-width: 1120px; }
.stats-wide { grid-template-columns: repeat(6, 1fr); padding: 20px 24px; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; border-radius: 6px; background: var(--wash); }
.bar > i { display: block; width: 100%; min-height: 2px; border-radius: 6px; background: var(--primary); }
.bar:hover > i { background: color-mix(in srgb, var(--primary) 75%, var(--foreground)); }
.bars-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.meter-sm { height: 5px; margin: 7px 0 0; }
.meter-fixed { width: 96px; }
.table th.share, .table td.share { width: 110px; }
.cell-main { font-weight: 500; }
.cell-sub { font-size: 11.5px; color: var(--muted-foreground); margin-top: 2px; }
.table tr.is-off td { color: var(--muted-foreground); }
.badge { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 500; vertical-align: 1px; }
.badge-error { color: var(--destructive); background: color-mix(in srgb, var(--destructive) 10%, transparent); }
.inline-form { display: flex; align-items: center; gap: 6px; }
.input-sm { height: 28px; width: 84px; padding: 2px 10px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.input-sm.input-wide { width: 112px; }
.input-sm.input-narrow { width: 64px; }
.input-sm.input-select { width: 180px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
/* app key form (/admin/apps) */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; align-items: center; }
.check-list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; border: 0; padding: 0; margin: 4px 0 0; font-size: 12.5px; }
.check-list legend { padding: 0; margin-bottom: 4px; }
.check-list label { display: inline-flex; align-items: center; gap: 5px; }
.badge-info { color: var(--secondary-foreground); background: color-mix(in srgb, var(--primary) 14%, transparent); }
@media (max-width: 1100px) { .stats-wide { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: 1fr; } }

/* ---------- model cards (right-hand drawer) ---------- */
.row-link { cursor: pointer; }
.row-link:focus-visible td { background: color-mix(in srgb, var(--accent) 60%, transparent); outline: none; }
.row-chevron svg { width: 14px; height: 14px; color: var(--muted-foreground); vertical-align: -2px; }
.row-link:hover .row-chevron svg { color: var(--primary); }
.row-link.is-active td { background: color-mix(in srgb, var(--primary) 9%, transparent); }
.row-link.is-active td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(8 8 8 / .42); backdrop-filter: blur(3px); animation: md-fade .2s ease-out; }
.drawer {
  --maker: var(--primary);
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(680px, 100vw);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); color: var(--card-foreground);
  border-radius: var(--radius-4xl) 0 0 var(--radius-4xl);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), -32px 0 64px rgb(0 0 0 / .22);
  animation: md-drawer-in .34s var(--ease-out-quart);
}
.drawer[hidden] { display: none; }
.drawer.is-swap { animation: md-fade .18s ease-out; }
/* Maker accents are decoration only (hero glow, monogram, tab underline, price bars): nothing is read from them. */
.drawer.maker-anthropic { --maker: #d97757; }
.drawer.maker-openai { --maker: #3987e5; }
.drawer.maker-deepseek { --maker: #5b6ee8; }
.drawer.maker-moonshot { --maker: #a463f2; }
.drawer.maker-alibaba { --maker: #e0559a; }
.drawer.maker-amazon { --maker: #e3972b; }

/* head: hero, provenance facts and the tab bar stay put while the body scrolls */
.drawer-head {
  flex: none; position: relative; isolation: isolate; padding: 22px 24px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  background:
    radial-gradient(85% 130% at 0% 0%, color-mix(in srgb, var(--maker) 24%, transparent) 0%, transparent 62%),
    radial-gradient(55% 100% at 100% 0%, color-mix(in srgb, var(--maker) 9%, transparent) 0%, transparent 70%),
    var(--card);
}
.drawer-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--foreground) 16%, transparent) 1px, transparent 1.3px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(110deg, #000 0%, transparent 50%); mask-image: linear-gradient(110deg, #000 0%, transparent 50%);
}
.drawer-hero { display: flex; align-items: flex-start; gap: 14px; }
.drawer-mark {
  width: 50px; height: 50px; flex: none; border-radius: 16px; display: grid; place-items: center;
  font: 600 23px/1 var(--font-heading); color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--maker) 70%, #fff) 0%, var(--maker) 45%, color-mix(in srgb, var(--maker) 65%, #000) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 10px 24px -10px color-mix(in srgb, var(--maker) 80%, transparent);
}
.drawer-titles { flex: 1; min-width: 0; }
.drawer-kicker { font-size: 11px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-foreground); }
.drawer-head h2 { font-size: 1.65rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 2px; }
.drawer-id { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.drawer-id code {
  font-size: 12px; padding: 2px 8px; border-radius: 7px; background: color-mix(in srgb, var(--card) 60%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 85%, transparent);
}
.drawer-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--card) 55%, transparent); color: var(--foreground);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 80%, transparent); transition: background-color .15s;
}
.icon-btn:hover { background: color-mix(in srgb, var(--foreground) 10%, var(--card)); }
.icon-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.drawer-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 12px; }
.drawer-facts li {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; color: var(--muted-foreground); background: color-mix(in srgb, var(--card) 65%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 85%, transparent);
}
.drawer-facts li b { color: var(--foreground); font-weight: 600; font-variant-numeric: tabular-nums; }
.drawer-facts svg { width: 13px; height: 13px; }
.drawer-facts .fact-verified { background: color-mix(in srgb, var(--success) 12%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 30%, transparent); }
.drawer-facts .fact-verified svg { color: var(--success); }

.drawer-tabs { display: flex; gap: 2px; margin: 0 -10px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.drawer-tabs::-webkit-scrollbar { display: none; }
.drawer-tab {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 11px;
  border: 0; background: transparent; cursor: pointer; font: 500 13px var(--font-sans); color: var(--muted-foreground); transition: color .15s;
}
.drawer-tab:hover, .drawer-tab[aria-selected="true"] { color: var(--foreground); }
.drawer-tab::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0;
  background: var(--maker); transform: scaleX(0); transition: transform .25s var(--ease-out-quart);
}
.drawer-tab[aria-selected="true"]::after { transform: scaleX(1); }
.drawer-tab:focus-visible { outline: 2px solid var(--ring); outline-offset: -6px; border-radius: 12px; }
.drawer-tab .count {
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  font-size: 11px; font-variant-numeric: tabular-nums; background: var(--wash); color: var(--muted-foreground);
}
.drawer-tab[aria-selected="true"] .count { background: color-mix(in srgb, var(--maker) 20%, transparent); color: var(--foreground); }

/* body */
.drawer-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 28px;
  display: flex; flex-direction: column; gap: 18px; font-size: 13.5px; line-height: 1.55;
}
.drawer-panel { display: flex; flex-direction: column; gap: 14px; animation: md-rise .3s var(--ease-out-quart); }
.drawer-panel[hidden] { display: none; }
.drawer-body h3 { font-family: var(--font-heading); font-size: 13.5px; font-weight: 600; }
.drawer-summary { font-size: 14.5px; line-height: 1.65; color: var(--foreground); text-wrap: pretty; }
.panel-block {
  border-radius: var(--radius-lg); padding: 16px; background: color-mix(in srgb, var(--foreground) 3%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 80%, transparent);
}
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block-head span { font-size: 11.5px; color: var(--muted-foreground); text-align: right; }
.fine-print { font-size: 11px; color: var(--muted-foreground); margin-top: 10px; }

.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.price-tile {
  display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: var(--radius-md); background: var(--card);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 75%, transparent);
}
.price-label { font-size: 11px; color: var(--muted-foreground); }
.price-value { font: 600 1.3rem/1.2 var(--font-heading); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.price-bar { height: 4px; margin-top: 8px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.price-bar > i {
  display: block; height: 100%; min-width: 4px; border-radius: 999px; background: var(--maker);
  transform-origin: left; animation: md-grow .7s .08s var(--ease-out-quart) both;
}

/* sentiment: one score on a diverging -1..+1 scale, red and green arms around a grey zero. The label and the
   number always carry the reading; the colour only repeats it. */
.sentiment { --tone: var(--success); }
.sentiment-mixed, .sentiment-too-little-discussion { --tone: var(--bypass); }
.sentiment-negative, .sentiment-very-negative { --tone: var(--destructive); }
.sent-headline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sent-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px 0 10px; border-radius: 999px;
  font: 600 14px var(--font-heading); color: var(--foreground); background: color-mix(in srgb, var(--tone) 15%, transparent);
}
.sent-pill svg { width: 16px; height: 16px; color: var(--tone); }
.sent-score { font: 600 1.7rem/1 var(--font-heading); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sent-meter { margin-top: 18px; }
.sent-track {
  position: relative; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--destructive) 26%, var(--wash)) 0%, var(--wash) 50%, color-mix(in srgb, var(--success) 26%, var(--wash)) 100%);
}
.sent-zero { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--muted-foreground); opacity: .5; }
.sent-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--tone); transform-origin: left; animation: md-grow .7s .1s var(--ease-out-quart) both; }
.sent-fill.is-neg { transform-origin: right; }
.sent-dot {
  position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 999px; background: var(--tone);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px color-mix(in srgb, var(--tone) 35%, transparent), 0 4px 14px color-mix(in srgb, var(--tone) 55%, transparent);
  animation: md-dot .7s .1s var(--ease-out-quart) both;
}
.sent-scale { display: grid; grid-template-columns: 1fr auto 1fr; margin-top: 9px; font-size: 10.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.sent-scale span:last-child { text-align: right; }
.sent-why { margin-top: 14px; font-size: 13px; color: var(--muted-foreground); }

/* Section tones for strengths (good), weaknesses and "avoid for" (warn) and capabilities (info). Each is >= 3:1
   against the card in its own theme, and always sits next to an icon and a label, so colour never carries it alone. */
:root { --tone-good: #0e9a6e; --tone-warn: #b9740a; --tone-info: #2a78d6; }
.dark { --tone-good: #22c48f; --tone-warn: #f0b03f; --tone-info: #5a9df0; }
.tone-good { --tone: var(--tone-good); }
.tone-warn { --tone: var(--tone-warn); }
.tone-info { --tone: var(--tone-info); }

.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fit {
  --tone: var(--tone-good); border-radius: var(--radius-lg); padding: 14px 16px;
  background: color-mix(in srgb, var(--tone) 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 26%, transparent);
}
.fit-warn { --tone: var(--tone-warn); }
.fit h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.fit h3 svg { color: var(--tone); }
.fit ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.fit li { position: relative; padding-left: 15px; font-size: 13px; line-height: 1.45; }
.fit li::before, .glance-body li::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; border-radius: 2px; background: var(--tone); }

/* tabs for the three sections carry their tone: icon, count and underline */
.drawer-tab svg { width: 14px; height: 14px; }
.drawer-tab.has-tone svg { color: var(--tone); }
.drawer-tab.has-tone::after { background: var(--tone); }
.drawer-tab.has-tone .count { background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--foreground); }
.drawer-tab.has-tone[aria-selected="true"] .count { background: color-mix(in srgb, var(--tone) 28%, transparent); }

/* overview: the first claims of each section */
.glance .block-head { margin-bottom: 4px; }
.glance-row { display: grid; grid-template-columns: 148px 1fr; gap: 16px; padding: 14px 0; }
.glance-row + .glance-row { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.glance-row:last-child { padding-bottom: 2px; }
.glance-label { display: flex; align-items: flex-start; gap: 10px; }
.glance-icon, .section-icon {
  flex: none; display: grid; place-items: center; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 30%, transparent);
}
.glance-icon { width: 32px; height: 32px; border-radius: 10px; }
.glance-icon svg { width: 16px; height: 16px; }
.glance-label b { display: block; font: 600 13.5px/1.3 var(--font-heading); }
.glance-label span { font-size: 11.5px; color: var(--muted-foreground); }
.glance-body ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.glance-body li { position: relative; padding-left: 15px; font-size: 13px; line-height: 1.45; }
.glance-more {
  display: inline-flex; align-items: center; gap: 3px; margin-top: 9px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 12px var(--font-sans); color: var(--muted-foreground); transition: color .15s;
}
.glance-more:hover { color: var(--foreground); }
.glance-more:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
.glance-more svg { width: 13px; height: 13px; color: var(--tone); transition: transform .15s; }
.glance-more:hover svg { transform: translateX(2px); }

/* strengths / weaknesses / capabilities tabs: a tinted intro, then numbered claims with the verified quotes behind them */
.section-intro {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-lg);
  background: linear-gradient(115deg, color-mix(in srgb, var(--tone) 17%, transparent) 0%, color-mix(in srgb, var(--tone) 4%, transparent) 75%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 30%, transparent);
}
.section-icon { width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--tone) 22%, var(--card)); }
.section-icon svg { width: 21px; height: 21px; }
.section-text { flex: 1; min-width: 0; }
.section-text h3 { font-size: 16px; letter-spacing: -.01em; }
.section-text p { font-size: 12.5px; color: var(--muted-foreground); margin-top: 1px; }
.section-stats { display: flex; gap: 6px; }
.section-stats div {
  min-width: 58px; padding: 6px 10px; border-radius: 12px; display: flex; flex-direction: column-reverse; align-items: center;
  background: color-mix(in srgb, var(--card) 70%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent);
}
.section-stats dd { font: 600 1.2rem/1.15 var(--font-heading); font-variant-numeric: tabular-nums; }
.section-stats dt { font-size: 10.5px; color: var(--muted-foreground); }

.points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.point-card {
  position: relative; overflow: hidden; padding: 15px 16px 16px 19px; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--tone) 4%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 85%, transparent);
  transition: box-shadow .15s; animation: md-rise .35s var(--ease-out-quart) both;
}
.point-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tone); }
.point-card:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 45%, transparent); }
.point-card:nth-child(2) { animation-delay: .03s; } .point-card:nth-child(3) { animation-delay: .06s; }
.point-card:nth-child(4) { animation-delay: .09s; } .point-card:nth-child(5) { animation-delay: .12s; }
.point-card:nth-child(n+6) { animation-delay: .15s; }
.point-head { display: flex; align-items: flex-start; gap: 12px; }
.point-num {
  flex: none; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center;
  font: 600 11px var(--font-mono); color: var(--foreground); background: color-mix(in srgb, var(--tone) 24%, transparent);
}
.point { flex: 1; font-size: 14.5px; font-weight: 600; line-height: 1.45; letter-spacing: -.005em; }
.point-quotes {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted-foreground); background: var(--wash);
}
.point-quotes svg { width: 12px; height: 12px; }
.quote {
  position: relative; margin: 10px 0 0 40px; padding: 10px 12px 10px 16px; border-radius: 12px;
  background: var(--card); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 70%, transparent);
}
.quote::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--tone) 80%, transparent); }
.quote p { font-size: 13px; color: var(--foreground); text-wrap: pretty; }
.quote p::before { content: "\201C"; } .quote p::after { content: "\201D"; }
.quote footer { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--muted-foreground); }
.quote-avatar {
  width: 20px; height: 20px; flex: none; border-radius: 999px; display: grid; place-items: center;
  font: 600 10px var(--font-sans); color: var(--accent-foreground); background: var(--accent);
}
.quote-avatar svg { width: 12px; height: 12px; }
.quote-src { min-width: 0; }
.sep { margin: 0 6px; opacity: .6; }
.nowrap { white-space: nowrap; }

/* sources */
.thread-list, .web-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.thread, .web-list a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--card);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 75%, transparent); transition: box-shadow .15s;
}
.thread:hover, .web-list a:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--maker) 55%, transparent); }
.thread-score {
  flex: none; width: 58px; padding: 6px 0; border-radius: 10px; display: flex; flex-direction: column; align-items: center;
  background: var(--wash);
}
.thread-score svg { width: 13px; height: 13px; color: var(--maker); }
.thread-score b { font: 600 13px var(--font-heading); font-variant-numeric: tabular-nums; }
.thread-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.thread-title { font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.thread-title:hover { text-decoration: underline; text-underline-offset: 2px; }
.thread-title svg { width: 12px; height: 12px; margin-left: 5px; vertical-align: -1px; color: var(--muted-foreground); }
.thread-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted-foreground); }
.thread-meta svg { width: 12px; height: 12px; }
.web-list a > svg { color: var(--muted-foreground); }
.web-list a > svg:last-child { width: 13px; height: 13px; margin-left: auto; }
.web-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.web-title { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-domain { font-size: 11px; color: var(--muted-foreground); }

.drawer-foot {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--wash); font-size: 11.5px; line-height: 1.5; color: var(--muted-foreground);
}
.drawer-foot svg { width: 15px; height: 15px; margin-top: 1px; color: var(--success); }
.drawer-foot .mono { font-size: 11px; }

/* Artificial Analysis (model card: Overview block and the Benchmarks tab) */
.aa-tiles .price-value { font-size: 1.1rem; }
.aa-tiles + .glance-more { margin-top: 12px; }
.aa-intro { font-size: 12.5px; color: var(--muted-foreground); margin-bottom: 12px; }
.aa-stale { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 12px; padding: 8px 12px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bypass) 16%, transparent); }
.aa-stale svg { width: 14px; height: 14px; flex: none; }
.aa-tiles b[title], .aa-table td[title] { cursor: help; }
.aa-scroll { overflow-x: auto; margin: 0 -6px; }
.aa-table { font-size: 12px; }
.aa-table th { padding: 0 6px 6px; white-space: nowrap; }
.aa-table td { padding: 5px 6px; }
.aa-table tr:hover td { background: none; }
.aa-table th.aa-default, .aa-table tr.aa-default td { color: var(--foreground); font-weight: 500; }
.aa-table tr.aa-default td { background: color-mix(in srgb, var(--maker) 8%, transparent); }
.aa-bench tr.aa-cat td { padding-top: 12px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted-foreground); border-top: 0; }
.aa-compare { list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; margin-top: 10px; }
.aa-source { margin-top: 0; }
.aa-panel .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aa-panel .chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px;
  background: var(--card); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 75%, transparent); }
@media (max-width: 560px) { .aa-tiles { grid-template-columns: repeat(2, 1fr); } }
body.drawer-open { overflow: hidden; }

@keyframes md-drawer-in { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes md-fade { from { opacity: 0; } }
@keyframes md-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes md-grow { from { transform: scaleX(0); } }
@keyframes md-dot { from { left: 50%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer *, .drawer *::after, .drawer-backdrop { animation: none !important; transition: none !important; }
}
@media (max-width: 640px) {
  .drawer { border-radius: 0; }
  .drawer-head { padding: 16px 16px 0; }
  .drawer-head h2 { font-size: 1.35rem; }
  .drawer-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 19px; }
  .drawer-actions [data-drawer-step] { display: none; }
  .drawer-body { padding: 18px 16px 24px; }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .fit-grid { grid-template-columns: 1fr; }
  .quote { margin-left: 0; }
  .glance-row { grid-template-columns: 1fr; gap: 10px; }
  .section-intro { flex-wrap: wrap; }
  .section-stats { width: 100%; }
  .section-stats div { flex: 1; }
  .point-quotes { display: none; }
  .block-head { flex-direction: column; gap: 2px; }
  .block-head span { text-align: left; }
}

/* ---------- benchmark charts (palette validated: blue/orange/aqua, light on #fff, dark on #272727) ---------- */
:root {
  --viz-s1: #2a78d6; --viz-s2: #eb6834; --viz-s3: #1baf7a; --viz-ink: #0b0b0b; --viz-single: #898781;
  --viz-grid: #eceae4; --viz-axis: #c3c2b7; --viz-tick: #6b6a66; --viz-surface: var(--card);
  --h0: #cde2fb; --h1: #b7d3f6; --h2: #9ec5f4; --h3: #86b6ef; --h4: #5598e7; --h5: #2a78d6; --h6: #1c5cab; --h7: #184f95; --h8: #0d366b;
  --h-dark-ink: #0b0b0b; --h-light-ink: #ffffff;
}
.dark {
  --viz-s1: #3987e5; --viz-s2: #d95926; --viz-s3: #199e70; --viz-ink: #f0efec; --viz-single: #898781;
  --viz-grid: #333331; --viz-axis: #4a4a47; --viz-tick: #a8a79f;
  /* dark mode: low values recede toward the dark surface, high values brighten */
  --h0: #1d2a3c; --h1: #13325a; --h2: #104281; --h3: #184f95; --h4: #1c5cab; --h5: #256abf; --h6: #3987e5; --h7: #6da7ec; --h8: #b7d3f6;
}
.page-wide .bench-head { margin-top: 24px; }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stat em { font-style: normal; font-size: 11.5px; color: var(--muted-foreground); line-height: 1.35; }
.viz { width: 100%; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--font-sans); }
.viz-sub { font-size: 12px; color: var(--muted-foreground); margin: 12px 0 4px; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { stroke: var(--viz-axis); stroke-width: 1; }
.viz-zero { stroke: var(--viz-tick); stroke-width: 1; }
.viz-tick { fill: var(--viz-tick); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-axis-label { fill: var(--viz-tick); font-size: 11.5px; }
.viz-group { fill: var(--foreground); font-size: 12px; font-weight: 600; }
.viz-label { fill: var(--foreground); font-size: 11px; stroke: var(--viz-surface); stroke-width: 3px; stroke-linejoin: round; paint-order: stroke; pointer-events: none; }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: .28; }
.viz-mark { stroke: var(--viz-surface); stroke-width: 2; paint-order: stroke; }
.viz-cross { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.viz-ring { fill: var(--viz-surface); stroke: var(--viz-ink); stroke-width: 2; }
.viz-range { stroke: var(--viz-axis); stroke-width: 2; stroke-linecap: round; }
.viz-mean { stroke: var(--viz-ink); stroke-width: 2; stroke-linecap: round; }
.viz-hit { fill: transparent; }
.viz-pt { cursor: default; outline: none; }
.viz-pt:hover .viz-mark, .viz-pt:focus-visible .viz-mark { stroke: var(--viz-ink); stroke-width: 1.5; }
circle.viz-s1, rect.viz-s1, path.viz-mark.viz-s1 { fill: var(--viz-s1); }
circle.viz-s2, rect.viz-s2, path.viz-mark.viz-s2 { fill: var(--viz-s2); }
circle.viz-s3, rect.viz-s3, path.viz-mark.viz-s3 { fill: var(--viz-s3); }
.viz-single { fill: var(--viz-single); }
.viz-line.viz-s1 { stroke: var(--viz-s1); } .viz-line.viz-s2 { stroke: var(--viz-s2); } .viz-line.viz-s3 { stroke: var(--viz-s3); }
.viz-cross.viz-ink { stroke: var(--viz-ink); }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-size: 12px; color: var(--foreground); }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 10px; height: 10px; flex: none; }
.key-dot { border-radius: 999px; }
.key-square { border-radius: 2px; }
.key-diamond { transform: rotate(45deg) scale(.85); border-radius: 1px; }
.key.viz-s1 { background: var(--viz-s1); } .key.viz-s2 { background: var(--viz-s2); } .key.viz-s3 { background: var(--viz-s3); }
.key.viz-single { background: var(--viz-single); }
.key-ring { border-radius: 999px; border: 2px solid var(--viz-ink); width: 10px; height: 10px; }
.key-cross { position: relative; }
.key-cross::before, .key-cross::after { content: ""; position: absolute; left: 4px; top: -1px; width: 2.5px; height: 12px; border-radius: 2px; background: var(--viz-ink); }
.key-cross::before { transform: rotate(45deg); } .key-cross::after { transform: rotate(-45deg); }
.viz-table { margin-top: 10px; font-size: 12.5px; }
.viz-table summary { cursor: pointer; color: var(--muted-foreground); font-size: 12px; }
.viz-table .table { margin-top: 8px; }
.viz-table .table td, .viz-table .table th { padding-left: 12px; padding-right: 12px; }
.num-left { font-variant-numeric: tabular-nums; }
.heat-wrap { overflow-x: auto; padding-bottom: 8px; }
.heat td { vertical-align: middle; }
.heat th, .heat td { padding-left: 8px; padding-right: 8px; }
.heat th:first-child, .heat td:first-child { padding-left: 24px; }
.heat td.model { font-size: 12px; }
.heat-cell { min-width: 44px; }
.heat th.ood { color: var(--foreground); }
.heat-oracle td { border-top: 2px solid color-mix(in srgb, var(--border) 90%, transparent); }
.heat-cell { display: inline-block; min-width: 48px; padding: 3px 8px; border-radius: 6px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; outline: none; }
.heat-cell:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.h0 { background: var(--h0); color: var(--h-dark-ink); } .h1 { background: var(--h1); color: var(--h-dark-ink); }
.h2 { background: var(--h2); color: var(--h-dark-ink); } .h3 { background: var(--h3); color: var(--h-dark-ink); }
.h4 { background: var(--h4); color: var(--h-light-ink); } .h5 { background: var(--h5); color: var(--h-light-ink); }
.h6 { background: var(--h6); color: var(--h-light-ink); } .h7 { background: var(--h7); color: var(--h-light-ink); }
.h8 { background: var(--h8); color: var(--h-light-ink); }
.dark .h0, .dark .h1, .dark .h2, .dark .h3, .dark .h4, .dark .h5 { color: var(--h-light-ink); }
.dark .h6, .dark .h7, .dark .h8 { color: var(--h-dark-ink); }
.bench-foot { font-size: 11.5px; color: var(--muted-foreground); max-width: 90ch; }
.viz-tooltip { position: fixed; z-index: 60; pointer-events: none; max-width: 320px; padding: 7px 10px; border-radius: 10px;
  background: var(--card); color: var(--foreground); font-size: 12px; line-height: 1.4;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 12%, transparent), 0 8px 24px rgb(0 0 0 / .16); }
@media (max-width: 1100px) { .stats-4 { grid-template-columns: repeat(2, 1fr); } }
