:root {
  --bg: #fafaf7;
  --fg: #1a1a1a;
  --muted: #6b6b66;
  --rule: #d8d8d2;
  --accent: #c8531c;
  --link: #1a4d8f;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Charter", "Source Serif Pro", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --maxw: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --fg: #ececea;
    --muted: #8a8a82;
    --rule: #2c2c29;
    --accent: #e0823f;
    --link: #7fb0ea;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 28px 80px;
}

/* masthead */
.masthead h1 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 18px;
}

.tagline {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--fg);
  max-width: 560px;
  margin: 0 0 16px;
}

.links {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.sep { margin: 0 8px; opacity: 0.5; }

/* sections */
.section { margin-top: 72px; }

.section h2 {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

/* articles list */
.articles { list-style: none; margin: 0; padding: 0; }

.article + .article { margin-top: 2px; }

.article-link {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--rule);
  transition: padding-left 120ms ease;
}
.article-link:hover { padding-left: 6px; }
.article-link:hover .title { color: var(--accent); }

.article .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  min-width: 28px;
}
.article .body { display: flex; flex-direction: column; gap: 2px; }
.article .title {
  font-size: 16px;
  font-weight: 500;
}
.article .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.article.placeholder {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  opacity: 0.45;
}
.article-aux {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  margin: -8px 0 14px 48px;
  border-bottom: 1px dashed var(--rule);
  padding-bottom: 1px;
}
.article-aux:hover { color: var(--accent); border-bottom-color: var(--accent); }
@media (max-width: 540px) { .article-aux { margin-left: 36px; } }

/* bullets */
.bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
}
.bullets li {
  padding: 8px 0 8px 22px;
  position: relative;
}
.bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}
.bullets .bullet-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.bullets .bullet-rule {
  padding-left: 12px;
  position: relative;
}
.bullets .bullet-rule::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--rule);
}

/* two-column row for the short sections */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 72px;
}
.two-col .section { margin-top: 0; }
@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .two-col .section + .section { margin-top: 56px; }
}

/* section lede (one-line intro under an h2) */
.section-lede {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--muted);
  margin: -8px 0 18px;
  max-width: 560px;
}

/* evergreen list */
.evergreen {
  list-style: none;
  margin: 0;
  padding: 0;
}
.evergreen li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.evergreen li:last-child { border-bottom: none; }
.evergreen a {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  align-self: flex-start;
  transition: color 120ms ease, border-color 120ms ease;
}
.evergreen a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.evergreen .anno {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* footer */
.foot {
  margin-top: 96px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* article page */
.article-page {
  max-width: min(1280px, calc(100vw - 48px));
}
.article-page .back,
.explorer-page .back {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  letter-spacing: 0.02em;
}
.article-page .back:hover,
.explorer-page .back:hover { color: var(--accent); border-bottom-color: var(--accent); }

.article-page .article-title {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.2;
  font-weight: 600;
  margin: 28px 0 8px;
  letter-spacing: -0.01em;
}

.article-page .article-sub {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 8px;
}

.article-page .article-stamp {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 36px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.prose {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
}
.prose p { margin: 0 0 18px; }
.prose h2 {
  font-family: var(--sans);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg);
  font-weight: 600;
  margin: 56px 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.prose h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 10px;
}
.prose ul {
  margin: 0 0 20px;
  padding-left: 1.25em;
}
.prose li { margin: 0 0 10px; }

/* structured fact lists in articles */
.prose ul.io,
.prose ul.items {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}
.prose ul.io {
  margin-bottom: 24px;
  padding: 12px 16px;
  background: rgba(127,127,127,0.04);
  border-left: 2px solid var(--accent);
}
.prose ul.io li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  padding: 5px 0;
}
.prose ul.io .k {
  flex: 0 0 auto;
  width: 52px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  text-align: center;
  padding: 3px 0;
  border-radius: 2px;
  line-height: 1.4;
}
/* Input pill — filled accent. */
.prose ul.io li:first-child .k {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}
/* Output pill — outlined accent, same hue, opposite fill. */
.prose ul.io li:last-child .k {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
@media (prefers-color-scheme: dark) {
  .prose ul.io li:first-child .k { color: #1a1a18; }
}
.prose ul.items > li {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.prose ul.items > li:last-child { border-bottom: 0; }
.prose ul.items.flat > li { padding: 8px 0; }

/* Per-stage classical-vs-learned two-column panel */
.prose .stage-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 12px 0 40px;
}
.prose .panel-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.prose .panel-col-head {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.prose .stage-panel ul.io {
  margin-bottom: 16px;
  padding: 10px 12px;
}
.prose .stage-panel ul.io li { gap: 10px; padding: 4px 0; }
.prose .stage-panel ul.io .k { width: 44px; padding: 2px 0; font-size: 9px; }
.prose .stage-panel ul.items { margin-bottom: 0; font-size: 14px; }
.prose .stage-panel ul.items > li { padding: 12px 0; }

@media (max-width: 720px) {
  .prose .stage-panel { grid-template-columns: 1fr; gap: 32px; }
}

/* Compact card grid for "Kinds of learned systems" */
.prose .kinds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 16px 0 28px;
}
.prose .kinds-card {
  border: 1px solid var(--rule);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.prose .kinds-card h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
}
.prose .kinds-card ul.io {
  margin: 0 0 12px;
  padding: 8px 10px;
}
.prose .kinds-card ul.io li { padding: 2px 0; gap: 10px; }
.prose .kinds-card ul.io .k { width: 32px; font-size: 9px; padding: 1px 0; }
.prose .kinds-card ul.techniques {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
}
.prose .kinds-card ul.techniques > li {
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}
.prose .kinds-card ul.techniques > li:last-child { border-bottom: 0; }
.prose .kinds-card ul.techniques .k {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--fg);
  font-size: 12px;
}
.prose .kinds-card p {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 720px) {
  .prose .kinds-grid { grid-template-columns: 1fr; gap: 16px; }
}
.prose ul.items ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.prose ul.items ul li {
  margin: 0;
  padding: 3px 0 3px 14px;
  position: relative;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg);
}
.prose ul.items ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--muted);
}
.prose .k {
  font-weight: 600;
  color: var(--fg);
}
.prose a { color: var(--link); text-decoration: none; border-bottom: 1px solid currentColor; }
.prose a:hover { color: var(--accent); }
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(127,127,127,0.12);
  padding: 1px 5px;
  border-radius: 3px;
}
.prose blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
.prose blockquote p { margin: 0; }
.prose blockquote strong {
  font-weight: 600;
  color: var(--fg);
}
.prose ol.catechism {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  counter-reset: catechism;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
}
.prose ol.catechism li {
  counter-increment: catechism;
  margin: 0 0 12px;
  padding: 0 0 0 2.25em;
  position: relative;
  color: var(--fg);
}
.prose ol.catechism li::before {
  content: counter(catechism) ".";
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.prose figure {
  margin: 32px 0;
  padding: 0;
}
.prose figure img,
.prose figure object,
.prose figure svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
}
.prose figcaption {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 12px;
}
.prose dl {
  margin: 0 0 24px;
  font-family: var(--sans);
  font-size: 15px;
}
.prose dt {
  font-weight: 600;
  margin-top: 14px;
}
.prose dt:first-child { margin-top: 0; }
.prose dd {
  margin: 4px 0 0;
  color: var(--fg);
  line-height: 1.55;
}

/* TOC */
.toc {
  font-family: var(--mono);
  font-size: 12px;
  margin: 0 0 48px;
  padding: 16px 18px;
  background: rgba(127,127,127,0.06);
  border-left: 2px solid var(--rule);
}
.toc ol { margin: 0; padding-left: 22px; }
.toc li { padding: 3px 0; color: var(--muted); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }

/* interactive widget shell */
.widget {
  margin: 28px 0;
  padding: 20px;
  border: 1px solid var(--rule);
  background: rgba(127,127,127,0.03);
  font-family: var(--mono);
  font-size: 13px;
}
.widget .widget-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 14px;
}
.widget .row {
  display: grid;
  grid-template-columns: 140px 1fr 70px;
  gap: 14px;
  align-items: center;
  padding: 6px 0;
}
.widget label { color: var(--muted); }
.widget input[type="range"] { width: 100%; accent-color: var(--accent); }
.widget output { text-align: right; color: var(--fg); }
.widget .result {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  font-size: 14px;
}
.widget .result strong { color: var(--accent); }

@media (max-width: 540px) {
  .wrap { padding: 64px 20px 60px; }
  .article-page .article-title { font-size: 28px; }
  .prose { font-size: 17px; }
  .widget .row { grid-template-columns: 1fr; gap: 4px; }
  .widget output { text-align: left; }
}

/* ============================================================
   Explorer page (/models/) — entity browser
   ============================================================ */

.explorer-page {
  max-width: min(1280px, calc(100vw - 48px));
}
.explorer-head { margin-top: 28px; margin-bottom: 36px; }
.explorer-title {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.explorer-sub {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 6px;
}
.explorer-sub .muted { color: var(--muted); }
.explorer-sub code,
.foot code {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(127,127,127,0.10);
  padding: 1px 5px;
  border-radius: 3px;
}
.explorer-companion {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.explorer-companion a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule); }
.explorer-companion a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* category palette — used by timeline dots, swatches, type chips */
[data-palette="0"] { --pal: #c8531c; }   /* accent (LLM-planner) */
[data-palette="1"] { --pal: #1a4d8f; }   /* link blue (VLA) */
[data-palette="2"] { --pal: #4a7a2c; }   /* olive (VAM) */
[data-palette="3"] { --pal: #7a3c8f; }   /* plum (Policy) */
[data-palette="4"] { --pal: #6b6b66; }   /* muted (fallback) */
@media (prefers-color-scheme: dark) {
  [data-palette="0"] { --pal: #e0823f; }
  [data-palette="1"] { --pal: #7fb0ea; }
  [data-palette="2"] { --pal: #8fbf5c; }
  [data-palette="3"] { --pal: #c08fe0; }
  [data-palette="4"] { --pal: #8a8a82; }
}

/* timeline */
.overview {
  margin-bottom: 44px;
  padding: 18px 0 8px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.overview-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.overview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.tl-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.tl-swatch {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pal, var(--muted));
}

.timeline {
  position: relative;
  height: 64px;
  margin: 0 6px;
  border-bottom: 1px solid var(--rule);
}
.tl-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background-color: var(--pal, var(--muted));
  background-image: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  opacity: 0.95;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 0 0 1px var(--bg);
  transition: transform 120ms ease, opacity 120ms ease;
  z-index: 2;
}
.tl-dot:hover { transform: translate(-50%, -50%) scale(1.35); opacity: 1; }
.tl-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Model name labels — horizontal, to the right of each dot */
.tl-label {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  color: var(--pal, var(--muted));
  transform: translate(10px, -50%);
  z-index: 3;
}

/* Lane labels on the left edge of the timeline */
.tl-lane-label {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pal, var(--muted));
  opacity: 0.75;
  padding: 0 8px 0 0;
  background: var(--bg);
  z-index: 5;
  pointer-events: none;
}

/* SVG overlay for lineage edges */
.tl-edges {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.tl-edge {
  stroke: var(--muted);
  stroke-width: 1;
  opacity: 0.35;
}

.timeline-axis {
  position: relative;
  height: 18px;
  margin: 4px 6px 0;
}
.tl-tick {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.tl-minor {
  position: absolute;
  top: -4px;
  width: 1px;
  height: 4px;
  background: var(--rule);
  opacity: 0.6;
}

/* timeline benchmark filter */
.overview-bench-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.overview-bench-label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.overview-bench {
  font-family: var(--mono);
  font-size: 11px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--rule);
  padding: 4px 8px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.overview-bench:focus { border-color: var(--accent); outline: none; }
.tl-empty {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

/* timeline popover */
.timeline-wrap { position: relative; }
.tl-popover {
  position: absolute;
  z-index: 50;
  min-width: 200px;
  max-width: 320px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--fg);
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .tl-popover { background: #1a1a18; box-shadow: 0 6px 24px rgba(0,0,0,0.6); }
}
.tl-pop-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.tl-pop-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}
.tl-pop-chip {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border: 1px solid var(--pal, var(--rule));
  color: var(--pal, var(--muted));
  border-radius: 2px;
  white-space: nowrap;
}
.tl-pop-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.tl-pop-bench {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
}
.tl-pop-bench em { color: var(--fg); font-style: normal; }
.tl-pop-scores {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 14px;
  margin-top: 4px;
}
.tl-pop-score {
  display: contents;
}
.tl-pop-score-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.tl-pop-score-value {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg);
  text-align: right;
}
.tl-pop-todo {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
}
.tl-pop-desc {
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 4px;
}

/* tabs */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 22px;
}
.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.02em;
  margin-bottom: -1px;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.tab-count {
  font-size: 10px;
  color: var(--muted);
  margin-left: 4px;
  vertical-align: 1px;
}

/* filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.filter-search {
  flex: 1 1 240px;
  min-width: 200px;
  font-family: var(--mono);
  font-size: 13px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--rule);
  padding: 8px 12px;
  border-radius: 2px;
  outline: none;
}
.filter-search:focus { border-color: var(--accent); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.chip:hover { color: var(--fg); border-color: var(--muted); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .chip[aria-pressed="true"] { color: #111; }
}
.filter-sort {
  font-family: var(--mono);
  font-size: 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--rule);
  padding: 7px 8px;
  border-radius: 2px;
  cursor: pointer;
}
.filter-sort:disabled { opacity: 0.4; cursor: not-allowed; }
.filter-reset {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  padding: 5px 4px;
  text-decoration: underline dashed;
  text-underline-offset: 3px;
}
.filter-reset:hover { color: var(--accent); }

/* cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.cards.is-list {
  grid-template-columns: 1fr;
  gap: 24px;
}
.cards.is-list .card { padding: 20px 22px; }
.cards.is-list .card-desc { font-size: 15px; }
.card {
  border: 1px solid var(--rule);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 160ms ease, background 160ms ease;
}
.card:hover { border-color: var(--muted); }
.card.highlight {
  border-color: var(--accent);
  background: rgba(200,83,28,0.05);
}
@media (prefers-color-scheme: dark) {
  .card.highlight { background: rgba(224,130,63,0.08); }
}

.card-head { display: flex; flex-direction: column; gap: 4px; }
.card-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}
.card-typechip {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border: 1px solid var(--pal, var(--rule));
  color: var(--pal, var(--muted));
  border-radius: 2px;
  white-space: nowrap;
}
.card-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.card-meta .mono { color: var(--fg); }

.card-desc {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  margin: 4px 0 2px;
}

.card-details {
  font-family: var(--sans);
  font-size: 13px;
  margin-top: 4px;
  border-top: 1px dashed var(--rule);
  padding-top: 8px;
}
.card-details summary {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
}
.card-details summary::-webkit-details-marker { display: none; }
.card-details summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform 120ms ease;
  color: var(--muted);
}
.card-details[open] summary::before { content: '▾ '; }

.detail-block { margin: 10px 0 0; }
.detail-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 4px;
}
.detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 10px 0 0;
}
.detail-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--link);
  text-decoration: none;
  word-break: break-all;
  border-bottom: 1px solid var(--rule);
  align-self: flex-start;
}
.detail-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.detail-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.5;
}
.detail-bullets li {
  padding: 2px 0 2px 14px;
  position: relative;
  color: var(--fg);
}
.detail-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted);
}

.detail-prose {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
}

.detail-papers {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
}
.detail-papers li {
  padding: 2px 0;
  color: var(--fg);
}
.detail-papers .paper-name { color: var(--fg); }
.detail-papers .paper-meta { color: var(--muted); }
.detail-papers .paper-link {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  margin-left: 4px;
}
.detail-papers .paper-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: rgba(127,127,127,0.08);
  padding: 3px 7px;
  border-radius: 2px;
}
.ref {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(127,127,127,0.06);
  color: var(--fg);
  border: 1px solid var(--rule);
  padding: 3px 8px;
  border-radius: 2px;
  cursor: pointer;
}
.ref:hover { border-color: var(--accent); color: var(--accent); }
.ref.ref-broken { opacity: 0.5; text-decoration: line-through; cursor: not-allowed; }

.cards-empty {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 60px 0;
}

/* per-eval-run training-config table on benchmark cards */
.runs-block { margin-top: 14px; }
.runs-source {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.runs-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  background: rgba(127,127,127,0.03);
}
.runs-table {
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 11px;
  width: 100%;
  min-width: 720px;
}
.runs-table th,
.runs-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
  vertical-align: baseline;
}
.runs-table th {
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(127,127,127,0.04);
}
.runs-table tr:last-child td { border-bottom: 0; }
.runs-table .runs-model { font-family: var(--mono); }

.runs-chart-block { margin-top: 14px; }
.runs-chart-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 8px;
}
.runs-chart-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}
.runs-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--rule);
  padding: 10px 12px;
  background: rgba(127,127,127,0.03);
  margin-bottom: 10px;
}
.chart-row {
  display: grid;
  grid-template-columns: minmax(110px, 18%) minmax(0, 14%) 1fr 56px;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
}
.chart-name {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-name:hover { color: var(--accent); }
.chart-name.ref-broken { opacity: 0.5; text-decoration: line-through; cursor: not-allowed; }
.chart-split {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-track {
  position: relative;
  height: 14px;
  background: rgba(127,127,127,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.chart-fill {
  height: 100%;
  background: var(--pal, var(--muted));
  transition: width 200ms ease;
  min-width: 1px;
}
.chart-value {
  text-align: right;
  color: var(--fg);
  white-space: nowrap;
}

.ref.ref-inline {
  padding: 2px 6px;
  font-size: 11px;
  background: transparent;
  border-color: var(--rule);
}

.foot-sep { margin: 0 8px; opacity: 0.5; }

@media (max-width: 640px) {
  .explorer-title { font-size: 28px; }
  .cards { grid-template-columns: 1fr; }
  .tabs { font-size: 12px; }
  .overview-legend { font-size: 10px; }
}
