/* Self-hosted brand fonts (SIL OFL 1.1). See docs/brand/DESIGN_GUIDELINES.md §5. */
@font-face { font-family: "Inter"; src: url("../fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/InterVariable-Italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
/*
 * Fronset design tokens — the ONE source of colour, type, space and motion values.
 * Canonical copy: docs/brand/tokens/fronset-tokens.css (see docs/brand/DESIGN_GUIDELINES.md).
 *
 * Copies live next to each surface's stylesheet and must stay byte-identical to this file:
 *   sites/fronset/assets/css/fronset-tokens.css
 *   sites/llm-bench/assets/css/fronset-tokens.css
 *   apps/service_portal/static/service_portal/css/fronset-tokens.css
 *
 * Rules that the values below encode:
 *   - Dark is the default theme on every web surface. Light exists for e-mail, print,
 *     and anything that must sit on a white page. Opt in with class="fs-light" or
 *     data-theme="light" on a container.
 *   - Lime means "the pick" (the chosen model, the saving, the passing value). Nothing else.
 *   - Lime FILL may sit behind dark text on any theme. Lime TEXT or thin lime LINES are
 *     allowed on dark only — on light use --fs-accent-text, which becomes olive ink.
 *   - No @font-face in this file: font paths differ per surface. Each surface ships its
 *     own fonts.css (see DESIGN_GUIDELINES.md §5).
 */

:root {
  /* ---- brand constants (never change per theme) ---- */
  --fs-lime: #D4F84A;          /* signal lime: the pick */
  --fs-lime-hover: #E2FB7A;    /* hover/active state of a lime fill */
  --fs-lime-ink: #4F6B00;      /* lime as text/lines on light backgrounds (5.7:1 on #F7F7F5) */
  --fs-ink: #0E0F11;           /* brand near-black */
  --fs-paper: #F7F7F5;         /* brand off-white */

  /* ---- surfaces (dark default) ---- */
  --fs-bg: #0E0F11;            /* page canvas */
  --fs-surface: #16181B;       /* cards, panels, table headers */
  --fs-surface-2: #1C1F23;     /* raised: code blocks, hover rows, inputs */
  --fs-border: #262A30;        /* hairlines, card borders */
  --fs-border-strong: #3A3F46; /* input borders, dividers that must be seen */
  --fs-hover: rgba(236, 234, 229, 0.06); /* hover tint over any surface */

  /* ---- text ---- */
  --fs-fg: #ECEAE5;            /* primary text, headings (15.9:1 on bg) */
  --fs-fg-2: #B9BDC3;          /* secondary text, lede, body on dense pages (10.2:1) */
  --fs-muted: #8A9098;         /* labels, captions, axis text (6.0:1) — minimum for text */
  --fs-faint: #5E636B;         /* disabled, decorative only — NEVER for text (3.2:1) */

  /* ---- accent (the pick) ---- */
  --fs-accent-fill: var(--fs-lime);        /* buttons, the picked bar, the 1.0x cell */
  --fs-accent-fill-hover: var(--fs-lime-hover);
  --fs-on-accent: var(--fs-ink);           /* text/icons ON a lime fill, every theme */
  --fs-accent-text: var(--fs-lime);        /* lime text/lines — flips to olive on light */
  --fs-accent-soft: rgba(212, 248, 74, 0.12); /* tinted background behind a picked row */

  /* ---- links ---- */
  --fs-link: var(--fs-fg);
  --fs-link-underline: var(--fs-border-strong);
  --fs-link-hover: var(--fs-accent-text);

  /* ---- states (colour is for exceptions; "ok" is deliberately NOT coloured) ---- */
  --fs-ok: var(--fs-fg);
  --fs-ok-soft: rgba(236, 234, 229, 0.08);
  --fs-warn: #F2B84B;
  --fs-warn-soft: rgba(242, 184, 75, 0.12);
  --fs-error: #FF6B5B;
  --fs-error-soft: rgba(255, 107, 91, 0.12);
  --fs-info: #8FB3FF;
  --fs-info-soft: rgba(143, 179, 255, 0.12);

  /* ---- data visualisation ---- */
  --fs-data-pick: var(--fs-accent-fill);   /* the cheapest model that clears the bar */
  --fs-on-data-pick: var(--fs-ink);        /* text on a --fs-data-pick fill (heat 1.0x cell) */
  --fs-data-qualifies: #565B63;            /* clears the bar but is not the pick */
  --fs-data-below: #33373D;                /* does not clear the bar */
  --fs-data-threshold: var(--fs-fg);       /* the "good enough" line (dashed) */
  --fs-data-grid: #1E2125;
  --fs-data-axis: var(--fs-muted);
  /* overpay heat — cost multiple vs the best-value model (1.0x uses --fs-data-pick) */
  --fs-heat-1: #1C1F23;  /* >1.05x – 2x   text: --fs-fg-2 */
  --fs-heat-2: #262A2F;  /* >2x – 4x      text: --fs-fg   */
  --fs-heat-3: #3A3226;  /* >4x – 8x      text: --fs-fg   */
  --fs-heat-4: #573F22;  /* >8x – 16x     text: --fs-fg   */
  --fs-heat-5: #7A4A1E;  /* >16x          text: --fs-fg   */
  --fs-heat-empty: #121417; /* model does not qualify — striped with --fs-border */

  /* ---- code ---- */
  --fs-code-string: #C9D69A;  /* strings in code samples: desaturated lime, never --fs-lime */

  /* ---- typography ---- */
  --fs-font-sans: "Inter", "InterVariable", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --fs-text-display: clamp(2.5rem, 5vw + 1rem, 4rem); /* 40–64px, marketing heroes only */
  --fs-text-h1: clamp(2rem, 2.5vw + 1rem, 2.75rem);   /* 32–44px */
  --fs-text-h2: 1.875rem;  /* 30px */
  --fs-text-h3: 1.375rem;  /* 22px */
  --fs-text-h4: 1.125rem;  /* 18px */
  --fs-text-body: 1rem;    /* 16px */
  --fs-text-small: 0.875rem; /* 14px */
  --fs-text-micro: 0.8125rem; /* 13px — mono labels, table meta. Nothing smaller. */
  --fs-leading-tight: 1.1;
  --fs-leading-snug: 1.3;
  --fs-leading-body: 1.6;
  --fs-tracking-display: -0.025em;
  --fs-tracking-heading: -0.015em;
  --fs-tracking-label: 0.04em;  /* uppercase mono labels only */

  /* ---- space (4px base) ---- */
  --fs-space-1: 4px;
  --fs-space-2: 8px;
  --fs-space-3: 12px;
  --fs-space-4: 16px;
  --fs-space-5: 24px;
  --fs-space-6: 32px;
  --fs-space-7: 48px;
  --fs-space-8: 64px;
  --fs-space-9: 96px;
  --fs-space-10: 128px;

  /* ---- layout ---- */
  --fs-max: 1200px;        /* marketing + benchmark content width */
  --fs-max-app: 1440px;    /* portal shell */
  --fs-max-prose: 720px;   /* docs/legal text column */
  --fs-gutter: 24px;       /* page side padding; 16px below 768px */
  --fs-header-h: 64px;

  /* ---- shape ---- */
  --fs-radius-sm: 6px;     /* inputs, buttons, chips */
  --fs-radius: 10px;       /* cards, code blocks, tables */
  --fs-radius-lg: 16px;    /* hero panels */
  --fs-border-width: 1px;

  /* ---- focus & motion ---- */
  --fs-focus-ring: 0 0 0 2px var(--fs-bg), 0 0 0 4px var(--fs-lime);
  --fs-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fs-duration: 150ms;
}

/* ---- light theme: e-mail, print, white-page contexts ---- */
.fs-light,
[data-theme="light"] {
  --fs-bg: #F7F7F5;
  --fs-surface: #FFFFFF;
  --fs-surface-2: #F0F0EC;
  --fs-border: #E3E4E0;
  --fs-border-strong: #C9CBC4;
  --fs-hover: rgba(17, 18, 20, 0.04);

  --fs-fg: #111214;
  --fs-fg-2: #3A3D42;
  --fs-muted: #6B7079;
  --fs-faint: #A3A7AD;

  --fs-accent-text: var(--fs-lime-ink);
  --fs-accent-soft: rgba(212, 248, 74, 0.28);

  --fs-warn: #9A5B00;
  --fs-warn-soft: #FDF3E1;
  --fs-error: #B42318;
  --fs-error-soft: #FDECEA;
  --fs-info: #2F4BD8;
  --fs-info-soft: #EEF1FD;
  --fs-ok-soft: rgba(17, 18, 20, 0.05);

  --fs-data-pick: var(--fs-lime-ink);  /* lime fill is too faint on white for a data mark */
  --fs-on-data-pick: #FFFFFF;          /* white on the olive pick fill */
  --fs-data-qualifies: #A3A7AD;
  --fs-data-below: #D6D8D3;
  --fs-data-grid: #ECEDE9;
  --fs-heat-1: #F2F2EE;
  --fs-heat-2: #E8E6DF;
  --fs-heat-3: #F1DDBF;
  --fs-heat-4: #E9C08A;
  --fs-heat-5: #D99A55;
  --fs-heat-empty: #F7F7F5;
  --fs-code-string: #4F6B00;

  --fs-focus-ring: 0 0 0 2px var(--fs-bg), 0 0 0 4px var(--fs-lime-ink);

  /* ⚠ Re-declared on purpose. A custom property that references another one is resolved
     where it is DEFINED (:root) and inherited as a finished value, so without these lines
     a light container would inherit dark-theme links, axes and thresholds. Any new token
     defined as var(--other) in :root must be repeated here. */
  --fs-link: var(--fs-fg);
  --fs-link-underline: var(--fs-border-strong);
  --fs-link-hover: var(--fs-accent-text);
  --fs-ok: var(--fs-fg);
  --fs-data-threshold: var(--fs-fg);
  --fs-data-axis: var(--fs-muted);
}

@media (prefers-reduced-motion: reduce) {
  :root { --fs-duration: 0ms; }
}
/* The Right-Sized LLM Benchmark — minimal scaffold styles. Phase 5 layers on the rich
   chart styling. Tone: serious, readable, tasteful — closer to a docs site
   than a marketing landing. */

/* Legacy token names, now aliases of docs/brand/tokens/fronset-tokens.css (Fronset v1, P1.5). */
:root {
  --color-bg: var(--fs-bg);
  --color-fg: var(--fs-fg);
  --color-muted: var(--fs-muted);
  --color-accent: var(--fs-accent-text);
  --color-border: var(--fs-border);
  --color-card-bg: var(--fs-surface);
  --font-body: var(--fs-font-sans);
  --font-mono: var(--fs-font-mono);
  --max-width: var(--fs-max);
  --pad: var(--fs-gutter);
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-fg);
  background: var(--color-bg);
  line-height: 1.55;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad);
}

a { color: var(--color-accent); }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  line-height: 1.2;
  margin: 1.5em 0 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 3px;
}
code { padding: 0.1em 0.3em; }
pre { padding: 0.75rem; overflow-x: auto; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-card-bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand { display: flex; align-items: baseline; gap: 0.75rem; text-decoration: none; color: var(--color-fg); }
.brand-tagline { color: var(--color-muted); font-size: 0.85rem; }
.site-nav { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--color-fg); }
.site-nav a:hover { color: var(--color-accent); }
.site-nav a.active { color: var(--color-accent); font-weight: 600; }

/* Main */
main { padding: 2rem 0 3rem; }

.page-header h1 { margin-top: 0; }
.lede { color: var(--color-muted); font-size: 1.1rem; margin-top: 0.25rem; }

/* Hero / landing
   .lede width is bumped so the hero paragraphs span the full container
   (matching the slider + heatmap below), instead of capping at a prose
   reading-width that left the right half visually empty. */
.hero h1 { font-size: 2.3rem; }
.hero .lede { max-width: 100%; width: 100%; }
.snapshot-date { color: var(--color-muted); font-size: 0.9rem; font-family: var(--font-mono); }

/* Slider controls */
.slider-controls {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.slider-group { flex: 1 1 320px; }
.slider-group label { display: block; font-size: 0.95rem; }
.slider-group input[type="range"] { width: 100%; margin-top: 0.5rem; }
.toggle-group { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
.toggle-label { color: var(--color-muted); }

/* Sections */
section { margin: 2.5rem 0; }
.section-blurb { color: var(--color-muted); }

/* Category grid (landing) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.category-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem;
}
.category-card h3 { margin-top: 0; }
.category-card h3 a { text-decoration: none; }
.category-blurb { color: var(--color-muted); font-size: 0.9rem; }
.placeholder { font-size: 0.85rem; color: var(--color-muted); }

/* Heatmap placeholder */
.heatmap-placeholder,
.composite-placeholder {
  background: var(--color-card-bg);
  border: 1px dashed var(--color-border);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  color: var(--color-muted);
}

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--color-border); }
th { font-weight: 600; color: var(--color-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Judge panel */
.judge-table { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: 6px; overflow: hidden; }
.panel-meta { color: var(--color-muted); font-size: 0.9rem; }

/* Model pages */
.model-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; margin-top: 0.5rem; }
.model-meta dt { color: var(--color-muted); font-size: 0.9rem; }

.model-static-meta { margin-bottom: 1.5rem; }
.model-dynamic-stats { margin-top: 1rem; margin-bottom: 2rem; }
.verdict-paragraph { font-size: 1.05rem; }

/* Index lists */
.index-list ul { list-style: none; padding: 0; }
.index-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
.index-list li a { font-weight: 600; }
.index-list li p { margin: 0.25rem 0 0; color: var(--color-muted); font-size: 0.9rem; }

/* Snapshot changelog */
.changelog-history { margin-top: 1.5rem; }
.changelog-entry {
  padding: 0 0 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}
.changelog-entry:last-child { border-bottom: 0; }
.changelog-entry > h2:first-child { margin-top: 0; }

/* Subscribe form */
.subscribe-form { display: flex; gap: 0.5rem; margin: 0.75rem 0; }
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.subscribe-form button {
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: white;
  border: 0;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
}
.subscribe-form button:hover { background: #1f4677; }

/* =========================================================================
   Heatmap
   =========================================================================
   Cells size to fit their content — category header labels never wrap or
   truncate. Wrapper provides horizontal scroll if the table grows past
   container width on narrow viewports.
*/
.heatmap-wrapper { margin: 1rem 0 1.5rem; overflow-x: auto; }
.heatmap-table {
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}
.heatmap-table th, .heatmap-table td {
  border: 1px solid var(--color-border);
  padding: 0.35rem 0.4rem;
  vertical-align: middle;
}
.heatmap-table th {
  background: var(--color-card-bg);
  position: sticky;
  top: 0;
  z-index: 1;
}
.heatmap-table th.hm-corner {
  width: 12rem;
  text-align: left;
  white-space: nowrap;
  vertical-align: bottom;
}
/* Column headers rotated 90° (reads bottom-to-top), with text wrapped
   into 2–3 lines so the header strip is shorter. Each "line" becomes a
   vertical column after rotation; long labels like "Financial Analysis
   & Trading Decisions" wrap onto 2–3 strips side-by-side.

   Cell height must accommodate the longest unbreakable single word —
   currently "Infrastructure" at 14 chars × ~0.5rem per char ≈ 7rem.
   Setting 8.5rem gives breathing room so nothing clips at the edge. */
.heatmap-table th.hm-col {
  width: 5.5rem;
  height: 8.5rem;
  padding: 0.4rem 0.3rem 0.6rem;
  text-align: center;
  vertical-align: bottom;
}
.heatmap-table th.hm-col a {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: normal;
  /* max-height (pre-rotation) limits how long any single rotated "line"
     can grow before wrapping into a new strip. Must be ≤ cell height
     minus padding (8.5rem - 1rem = 7.5rem) so long single words like
     "Infrastructure" sit fully inside the cell. */
  max-height: 7.5rem;
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--color-accent);
  text-decoration: none;
  display: inline-block;
}
.heatmap-table th.hm-col a:hover { text-decoration: underline; }

/* Summary column — header text rotates to match category headers; data
   cells in tbody keep horizontal numbers. */
.heatmap-table thead th.hm-totals {
  width: 4rem;
  height: 8.5rem;
  padding: 0.4rem 0.3rem 0.6rem;
  text-align: center;
  vertical-align: bottom;
}
.heatmap-table thead th.hm-totals .hm-totals-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  display: inline-block;
}
.heatmap-table tbody td.hm-totals {
  width: 4rem;
  text-align: right;
  font-size: 0.78rem;
  white-space: nowrap;
  vertical-align: middle;
}
.hm-model { font-weight: 500; }
.hm-model a { color: var(--color-accent); text-decoration: none; }
.hm-model a:hover { text-decoration: underline; }
.hm-model small { display: block; color: var(--color-muted); font-size: 0.72rem; font-weight: 400; }

/* Visual separator between provider groups */
.hm-provider-break > td { border-top: 2px solid var(--color-border); }

@media (max-width: 720px) {
  /* On narrow screens, allow horizontal scroll rather than crushing cells. */
  .heatmap-wrapper { overflow-x: auto; }
  .heatmap-table { table-layout: auto; min-width: 720px; }
}

/*
  Divergent cost gradient: cells are colored relative to the
  best-performing (anchor) model's cost on that category.
    .hm-cheaper-N        — model costs LESS than anchor → green (N=1..5, deeper = bigger savings)
    .hm-more-expensive-N — model costs MORE than anchor → red   (N=1..5, deeper = more expensive)
    .hm-neutral          — cost ≈ anchor (within ±0.5%) → cream
    .hm-empty            — model doesn't qualify        → striped grey

  Five fixed shade buckets per side rather than calc-inside-hsl. The
  calc/hsl approach worked in Brave but Safari rendered everything green
  regardless of class. Static colors per bucket sidestep every browser
  CSS quirk. Bucket is picked at render time from |savings| / 20.
*/
.hm-cell {
  text-align: center;
  position: relative;
  padding: 0;
}
.hm-cell.hm-neutral {
  background-color: #f6f5ec;
  color: #7a7766;
}
/* Green scale: lightest at small savings, deepest at ≥80% savings. */
.hm-cell.hm-cheaper-1 { background-color: #e3f1d8; color: #3b5d2c; }
.hm-cell.hm-cheaper-2 { background-color: #cbe5b4; color: #345727; }
.hm-cell.hm-cheaper-3 { background-color: #a9d585; color: #2d4b22; }
.hm-cell.hm-cheaper-4 { background-color: #82bf57; color: #25401d; }
.hm-cell.hm-cheaper-5 { background-color: #5ea83b; color: #1a3414; }
/* Red scale: lightest at small overspend, deepest at ≥80% overspend (≥1.8x). */
.hm-cell.hm-more-expensive-1 { background-color: #f7dfd6; color: #6a3a2b; }
.hm-cell.hm-more-expensive-2 { background-color: #f0c1b1; color: #6a3324; }
.hm-cell.hm-more-expensive-3 { background-color: #e5947b; color: #5a2618; }
.hm-cell.hm-more-expensive-4 { background-color: #d36a4d; color: #471a0f; }
.hm-cell.hm-more-expensive-5 { background-color: #be4729; color: #2e0e07; }
.hm-cell-link {
  display: block;
  padding: 0.5rem 0.5rem;
  color: inherit;
  text-decoration: none;
  line-height: 1.25;
}
.hm-cell-link:hover { background-color: rgba(0, 0, 0, 0.05); }
.hm-cell.hm-empty {
  background-color: #f2f2ee;
  color: #b8b8b0;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(0,0,0,0.04) 4px, rgba(0,0,0,0.04) 6px);
}
.hm-num { font-variant-numeric: tabular-nums; font-size: 0.95rem; font-weight: 600; display: block; }
.hm-savings { font-size: 0.78rem; font-variant-numeric: tabular-nums; display: block; opacity: 0.85; }
.hm-star { color: #c95d3f; font-size: 0.95rem; }
.hm-totals { text-align: right; font-variant-numeric: tabular-nums; }
.hm-totals small { color: var(--color-muted); display: block; font-size: 0.78rem; }

/* Legend below the heatmap. */
.hm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.hm-legend-label { font-weight: 500; color: var(--color-fg); }
.hm-legend-gradient {
  display: inline-block;
  height: 0.7rem;
  width: 200px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    hsl(135, 60%, 60%),
    hsl(135, 60%, 85%),
    #f6f5ec,
    hsl(8, 65%, 80%),
    hsl(8, 65%, 62%)
  );
  border: 1px solid var(--color-border);
}
.hm-legend-tick { font-size: 0.78rem; }
.hm-legend-min::before { content: "←"; margin-right: 0.25em; color: #3f7d4c; }
.hm-legend-max::after  { content: "→"; margin-left: 0.25em; color: #c25240; }
.hm-legend-aside { flex-basis: 100%; font-size: 0.8rem; }

/* =========================================================================
   Composite leaderboard
   ========================================================================= */
.composite-table { width: 100%; font-size: 0.95rem; }
.composite-table th.num, .composite-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.composite-table td.rank { color: var(--color-muted); font-variant-numeric: tabular-nums; }
.composite-table .model-link { font-weight: 600; text-decoration: none; }
.composite-table small { color: var(--color-muted); font-size: 0.82rem; }
.composite-table .rate-pct { color: var(--color-muted); font-size: 0.82rem; margin-left: 0.4em; }
.composite-table .muted { color: var(--color-muted); }
.composite-blurb { color: var(--color-muted); font-size: 0.9rem; }

/* =========================================================================
   Category mini-tables (landing)
   ========================================================================= */
.cat-mini { width: 100%; font-size: 0.85rem; margin-top: 0.5rem; }
.cat-mini th, .cat-mini td { padding: 0.3rem 0.35rem; border-bottom: 1px solid var(--color-border); }
.cat-mini th { font-size: 0.72rem; color: var(--color-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.cat-mini th.num, .cat-mini td.num { text-align: right; font-variant-numeric: tabular-nums; }
.cat-mini tbody tr:last-child td { border-bottom: 0; }
.cat-mini a { text-decoration: none; }
.cat-mini a:hover { text-decoration: underline; }
.cat-cta { margin-top: 0.6rem; font-size: 0.85rem; }

/* "Run this task on Fronset" (task-page.html). `.btn` is nowrap at a fixed 40px; this
   label is ~355px wide, so it would overflow below ~390px unless it may wrap; (0,2,0) beats `.btn` whatever the load order. */
.task-run-cta { margin: 0.75rem 0 1.25rem; }
.task-run-cta .btn { white-space: normal; height: auto; min-height: 40px; padding-top: 0.55rem; padding-bottom: 0.55rem; line-height: 1.3; text-align: center; max-width: 100%; }

/* =========================================================================
   Task page CI bars
   ========================================================================= */
.ci-chart { margin: 1rem 0; }
.ci-svg { width: 100%; max-width: 900px; height: auto; display: block; }
.ci-row { cursor: pointer; }
.ci-row:hover text { fill: var(--color-accent); }
.ci-row-marginal text { fill: var(--color-muted); }
.ci-legend { color: var(--color-muted); font-size: 0.85rem; margin-top: 0.5rem; }
.legend-swatch { display: inline-block; width: 1em; height: 0.7em; vertical-align: middle; margin-right: 0.2em; }
.legend-swatch.legend-solid { background: var(--color-accent); }
.legend-swatch.legend-stripe {
  background: var(--color-accent);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.6) 2px, rgba(255,255,255,0.6) 4px);
  opacity: 0.4;
}

/* =========================================================================
   Cost table on task page
   ========================================================================= */
.cost-table { width: 100%; }
.cost-table th.num, .cost-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.cost-table small { color: var(--color-muted); display: block; font-size: 0.78rem; }
.cost-table .row-anchor { background-color: rgba(201, 93, 63, 0.06); }
.badge {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  font-size: 0.7rem;
  border-radius: 3px;
  margin-left: 0.4em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.badge-frontier { background: rgba(201, 93, 63, 0.15); color: #a04a30; }
.savings { color: #3f7d4c; font-weight: 600; }
.more-expensive { color: #c25240; font-weight: 600; font-size: 0.85em; }
.check { color: #3f7d4c; font-weight: 600; }
.task-token-shape { color: var(--color-muted); font-size: 0.85rem; }

/* =========================================================================
   Category page task cards
   ========================================================================= */
.task-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.task-card h3 { margin-top: 0; }
.task-card h3 a { text-decoration: none; }
.task-card .task-blurb { color: var(--color-muted); font-size: 0.9rem; }
.task-status { font-style: italic; }
.mini-task-table { width: 100%; font-size: 0.9rem; margin-top: 0.5rem; table-layout: fixed; }
.mini-task-table th.num, .mini-task-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mini-task-table td.rank { color: var(--color-muted); }
.mini-task-table th { white-space: nowrap; }
.mini-task-table th, .mini-task-table td { width: 25%; }
.more { margin: 0.4rem 0 0; font-size: 0.85rem; }
.row-anchor { background-color: rgba(201, 93, 63, 0.04); }

/* =========================================================================
   Model page
   ========================================================================= */
.scatter-wrapper { max-width: 720px; margin: 1rem 0; }
.scatter-svg { width: 100%; height: auto; display: block; }
.scatter-svg circle { transition: r 0.1s ease; }
.scatter-svg a:hover circle { r: 6; }
.scatter-legend { color: var(--color-muted); font-size: 0.85rem; }
.dot { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%; vertical-align: middle; }
.dot-green { background: #3f7d4c; }
.dot-amber { background: #c98a3f; }
.dot-red   { background: #c25240; }
.dot-grey  { background: #9aa6b2; }
.model-task-table { width: 100%; font-size: 0.9rem; }
.model-task-table th.num, .model-task-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.task-prompts-section { margin-top: 2.5rem; }
.task-prompts-section .prompts-blurb { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.prompt-pair { border: 1px solid var(--color-border); border-radius: 4px; padding: 0.5rem 0.75rem; margin-bottom: 0.6rem; background: #fafaf6; }
.prompt-pair > summary { cursor: pointer; font-size: 0.9rem; }
.prompt-pair > summary code { font-size: 0.82rem; background: #ececdf; padding: 0 0.3rem; border-radius: 2px; }
.prompt-pair > summary .muted { margin-left: 0.4rem; }
.prompt-pair-body { padding-top: 0.5rem; }
.prompt-pair-body h3 { font-size: 0.95rem; margin-top: 0.8rem; margin-bottom: 0.3rem; color: var(--color-muted); }
.prompt-pair-body h3:first-child { margin-top: 0.2rem; }
.prompt-text {
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.5;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 0.75rem 0.9rem;
  max-height: 32rem;
  overflow: auto;
}

.confidence-legend {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #4a4a4a;
  line-height: 1.55;
}
.confidence-legend .cf {
  display: inline-block;
  padding: 0 0.4rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-right: 0.2rem;
}
.confidence-legend .cf-ranked { background: #d9e8d2; color: #2c4a23; }
.confidence-legend .cf-high   { background: #e4eddc; color: #3a4f2b; }
.confidence-legend .cf-medium { background: #f1ecd9; color: #5a4d20; }

/* =========================================================================
   Empty / muted states
   ========================================================================= */
.empty-state {
  background: var(--color-card-bg);
  border: 1px dashed var(--color-border);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  color: var(--color-muted);
}
.muted { color: var(--color-muted); }

/* =========================================================================
   Rubric
   ========================================================================= */
.rubric {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1rem;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

/* =========================================================================
   Hero / lede polish
   ========================================================================= */
.hero { padding: 1rem 0 1.5rem; border-bottom: 1px solid var(--color-border); margin-bottom: 1.5rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-card-bg);
  margin-top: 3rem;
  padding: 2rem 0 1rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.footer-col h3 { margin-top: 0; font-size: 1rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { padding: 0.2rem 0; }
.footer-fineprint { color: var(--color-muted); font-size: 0.85rem; }
/* The conflict-of-interest line (launch plan D1.4). Deliberately NOT muted:
   it is the one sentence on the page that must not read as fine print. */
.footer-disclosure { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--color-border); font-size: 0.9rem; }
.footer-disclosure a { white-space: nowrap; }
.footer-copyright { color: var(--color-muted); margin-top: 1.5rem; text-align: center; font-size: 0.85rem; }
/*
 * Fronset v1 layer for the Hugo sites (sites/fronset and sites/llm-bench).
 * Canonical copy: docs/brand/migration/hugo-v1-layer.css
 *
 * Loaded LAST in the CSS bundle (fonts.css → fronset-tokens.css → style.css → this file),
 * so it overrides the legacy rules in style.css without editing them. Both sites share
 * the same selectors (style.css was copied from one to the other), so the same file goes
 * into both: sites/fronset/assets/css/fronset-v1.css and sites/llm-bench/assets/css/fronset-v1.css.
 *
 * Values come only from fronset-tokens.css. See docs/brand/DESIGN_GUIDELINES.md.
 */

/* ============ base ============ */
html { font-size: 16px; }
body {
  background: var(--fs-bg);
  color: var(--fs-fg-2);
  font-family: var(--fs-font-sans);
  line-height: var(--fs-leading-body);
  -webkit-font-smoothing: antialiased;
}
.container { max-width: var(--fs-max); padding: 0 var(--fs-gutter); }
@media (max-width: 767px) { .container { padding: 0 var(--fs-space-4); } }

a {
  color: var(--fs-link);
  text-decoration: underline;
  text-decoration-color: var(--fs-link-underline);
  text-underline-offset: 3px;
  transition: color var(--fs-duration) var(--fs-ease), text-decoration-color var(--fs-duration) var(--fs-ease);
}
a:hover { color: var(--fs-link-hover); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: none; box-shadow: var(--fs-focus-ring); border-radius: var(--fs-radius-sm);
}

h1, h2, h3, h4 { color: var(--fs-fg); font-weight: 700; letter-spacing: var(--fs-tracking-heading); line-height: var(--fs-leading-snug); text-wrap: balance; }
h1 { font-size: var(--fs-text-h1); line-height: var(--fs-leading-tight); letter-spacing: var(--fs-tracking-display); }
h2 { font-size: var(--fs-text-h2); margin: var(--fs-space-7) 0 var(--fs-space-3); }
h3 { font-size: var(--fs-text-h3); font-weight: 600; }
h4 { font-size: var(--fs-text-h4); font-weight: 600; }
p, li { color: var(--fs-fg-2); }
strong, b { color: var(--fs-fg); }
hr { border: 0; border-top: 1px solid var(--fs-border); margin: var(--fs-space-7) 0; }
::selection { background: var(--fs-lime); color: var(--fs-on-accent); }

code, pre, kbd, samp { font-family: var(--fs-font-mono); }
:not(pre) > code {
  font-size: .9em; background: var(--fs-surface-2); color: var(--fs-fg);
  border: 1px solid var(--fs-border); border-radius: 4px; padding: .1em .35em;
  overflow-wrap: anywhere;   /* a long URL or identifier in running text must wrap at 320px */
}
pre {
  background: var(--fs-surface-2) !important;  /* beats Hugo's inline highlight style */
  color: var(--fs-fg);
  border: 1px solid var(--fs-border); border-radius: var(--fs-radius);
  padding: var(--fs-space-4) var(--fs-space-5); overflow-x: auto;
  font-size: var(--fs-text-small); line-height: 1.65;
}
pre code { background: none; border: 0; padding: 0; color: inherit; }
/* Hugo "github" highlight theme spans are light-theme colours; flatten them to the house code style. */
pre .chroma, .highlight pre { background: var(--fs-surface-2) !important; }
.highlight span { color: inherit !important; background: none !important; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sd, .highlight .se { color: var(--fs-code-string) !important; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs, .highlight .ch { color: var(--fs-muted) !important; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kc, .highlight .nt { color: var(--fs-fg-2) !important; font-weight: 600; }

blockquote {
  margin: var(--fs-space-5) 0; padding: var(--fs-space-4) var(--fs-space-5);
  border-left: 3px solid var(--fs-border-strong); background: var(--fs-surface);
  border-radius: 0 var(--fs-radius-sm) var(--fs-radius-sm) 0; color: var(--fs-fg-2);
}
blockquote p { margin: 0; }

/* ============ tables ============ */
table { border-collapse: collapse; width: 100%; font-size: var(--fs-text-small); }
th {
  text-align: left; font-family: var(--fs-font-mono); font-size: var(--fs-text-micro); font-weight: 500;
  text-transform: uppercase; letter-spacing: var(--fs-tracking-label); color: var(--fs-muted);
  background: transparent; border-bottom: 1px solid var(--fs-border-strong);
}
th, td { padding: var(--fs-space-3) var(--fs-space-4); border-color: var(--fs-border); }
td { border-bottom: 1px solid var(--fs-border); color: var(--fs-fg-2); }
tbody tr:hover { background: var(--fs-hover); }
td.num, th.num, .num { text-align: right; font-family: var(--fs-font-mono); font-variant-numeric: tabular-nums; }
td.num { color: var(--fs-fg); }

/* ============ header ============ */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--fs-bg) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--fs-border);
}
.site-header .container { min-height: var(--fs-header-h); display: flex; align-items: center; gap: var(--fs-space-6); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: var(--fs-space-3); text-decoration: none; color: var(--fs-fg); }
.brand img { height: 28px; width: auto; display: block; }
.brand-section {                     /* e.g. "Benchmark" next to the lockup on /benchmark/ */
  font-family: var(--fs-font-mono); font-size: var(--fs-text-micro); color: var(--fs-muted);
  text-transform: uppercase; letter-spacing: var(--fs-tracking-label);
  padding-left: var(--fs-space-3); border-left: 1px solid var(--fs-border-strong);
}
.brand-tagline { display: none; }    /* the tagline moves into the page hero */
.site-nav { display: flex; align-items: center; gap: var(--fs-space-5); margin-left: auto; flex-wrap: wrap; }
.site-nav a:not(.btn) { color: var(--fs-fg-2); text-decoration: none; font-size: var(--fs-text-small); font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--fs-fg); }
.site-nav a.active, .site-nav a[aria-current="page"] { color: var(--fs-fg); box-shadow: inset 0 -2px 0 var(--fs-accent-text); padding-bottom: 4px; }

/* ============ buttons (header CTA, signup CTA, subscribe) ============ */
.btn, .cta a, .subscribe-form button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--fs-space-2);
  height: 40px; padding: 0 var(--fs-space-4); border-radius: var(--fs-radius-sm);
  border: 1px solid transparent; font: 600 var(--fs-text-small)/1 var(--fs-font-sans);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--fs-accent-fill); color: var(--fs-on-accent);
  transition: background-color var(--fs-duration) var(--fs-ease);
}
.btn:hover, .cta a:hover, .subscribe-form button:hover { background: var(--fs-accent-fill-hover); color: var(--fs-on-accent); }
.btn--secondary { background: transparent; color: var(--fs-fg); border-color: var(--fs-border-strong); }
.btn--secondary:hover { background: var(--fs-hover); color: var(--fs-fg); }
.btn--lg { height: 48px; padding: 0 var(--fs-space-5); font-size: var(--fs-text-body); }
/* The header CTA is an <a class="btn"> inside .site-nav. style.css's `.site-nav a` and
   `.site-nav a:hover` (0,1,1) beat `.btn` (0,1,0): off-white, then lime, text on the lime fill. */
.site-nav a.btn, .site-nav a.btn:hover { color: var(--fs-on-accent); text-decoration: none; }

/* ============ page chrome ============ */
main { padding-top: var(--fs-space-7); padding-bottom: var(--fs-space-8); }
/* Both sites render <main class="container">, and `.container`'s padding shorthand (0,1,0)
   beats `main` (0,0,1): without this every H1 sat flush against the header. */
main.container { padding-top: var(--fs-space-7); padding-bottom: var(--fs-space-8); }
.hero h1 { margin-top: 0; }
.page-header { margin-bottom: var(--fs-space-6); }
.page-header h1 { margin: 0 0 var(--fs-space-3); }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--fs-fg-2); max-width: 60ch; }
.hero .lede { max-width: 60ch; }   /* style.css sets .hero .lede { max-width: 100% } (0,2,0), which beats .lede */
/* Prose stays at reading width; tables, charts and heatmaps inside .page-body keep the full
   container width (the benchmark's task/model/category pages put data in .page-body too). */
.page-body > p, .page-body > ul, .page-body > ol, .page-body > h2, .page-body > h3, .page-body > h4,
.page-body > blockquote, .page-body > dl { max-width: var(--fs-max-prose); }
.page-body > table { display: block; overflow-x: auto; max-width: 100%; }   /* wide markdown tables scroll, the page does not */
/* The changelog's markdown tables sit outside .page-body (home "What changed", /changelog/).
   At 390px they pushed the page about 70px sideways, before this redesign too. */
.site-changelog table, .changelog-history table { display: block; overflow-x: auto; max-width: 100%; }
/* Home "What changed": the per-model table folds behind this (owner ruling 2026-09-23). */
.site-changelog__more { margin: var(--fs-space-4) 0; }
.site-changelog__more > summary { cursor: pointer; color: var(--fs-fg); font-weight: 600; }
.site-changelog__more[open] > summary { margin-bottom: var(--fs-space-3); }
.table-scroll { overflow-x: auto; max-width: 100%; }   /* benchmark data tables (task cost, model tasks) */
.snapshot-date { font-family: var(--fs-font-mono); font-size: var(--fs-text-micro); color: var(--fs-muted); }
.status-strip { margin: var(--fs-space-3) 0 var(--fs-space-5); }   /* benchmark home, directly under the H1 */
.chart-source { margin: var(--fs-space-3) 0 0; }                     /* under a chart or a table with numbers */
.muted, .panel-meta, .section-blurb, .category-blurb { color: var(--fs-muted); }
.model-meta dt { color: var(--fs-muted); }
.model-meta dd { color: var(--fs-fg); }   /* the value (e.g. "Qualifies on 23/40") is content, not a label */
.empty-state, .placeholder, .composite-placeholder, .heatmap-placeholder {
  background: var(--fs-surface); border: 1px dashed var(--fs-border-strong); color: var(--fs-muted);
  border-radius: var(--fs-radius); padding: var(--fs-space-4);
}

/* ============ home hero (sites/fronset layouts/index.html) ============ */
.fs-hero { display: grid; gap: var(--fs-space-7); grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; padding: var(--fs-space-8) 0 var(--fs-space-9); }
@media (max-width: 1023px) { .fs-hero { grid-template-columns: minmax(0, 1fr); padding-top: var(--fs-space-6); } }
.fs-hero__eyebrow { font-family: var(--fs-font-mono); font-size: var(--fs-text-micro); color: var(--fs-muted); text-transform: uppercase; letter-spacing: var(--fs-tracking-label); margin: 0 0 var(--fs-space-4); }
.fs-hero h1 { font-size: var(--fs-text-display); line-height: var(--fs-leading-tight); letter-spacing: var(--fs-tracking-display); margin: 0 0 var(--fs-space-5); }
.fs-hero__claim { font-size: 1.25rem; line-height: 1.5; color: var(--fs-fg-2); margin: 0 0 var(--fs-space-6); max-width: 36ch; }
.fs-hero__claim strong { color: var(--fs-accent-text); }
.fs-hero__actions { display: flex; flex-wrap: wrap; gap: var(--fs-space-3); }
.fs-hero__code pre { margin: 0; }
.fs-hero__code figcaption { font-size: var(--fs-text-small); color: var(--fs-muted); margin-top: var(--fs-space-3); }
.fs-steps { display: grid; gap: var(--fs-space-5); grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--fs-space-6) 0 var(--fs-space-8); padding: 0; list-style: none; counter-reset: step; }
@media (max-width: 767px) { .fs-steps { grid-template-columns: minmax(0, 1fr); } }
.fs-steps li { background: var(--fs-surface); border: 1px solid var(--fs-border); border-radius: var(--fs-radius); padding: var(--fs-space-5); counter-increment: step; }
.fs-steps li::before { content: "0" counter(step); display: block; font-family: var(--fs-font-mono); font-size: var(--fs-text-micro); color: var(--fs-muted); margin-bottom: var(--fs-space-3); }
.fs-steps h3 { margin: 0 0 var(--fs-space-2); font-size: var(--fs-text-h4); }
.fs-steps p { margin: 0; font-size: var(--fs-text-small); }
.fs-figure svg { width: 100%; height: auto; display: block; }
.fs-figure figcaption { font-size: var(--fs-text-small); color: var(--fs-muted); margin-top: var(--fs-space-3); }

/* ============ docs layout (sites/fronset layouts/docs/single.html) ============ */
.docs-layout { display: grid; gap: var(--fs-space-7); grid-template-columns: minmax(0, 1fr); }  /* minmax(0,…): long code lines must not widen the page */
@media (min-width: 1024px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .docs-layout .index-list { position: sticky; top: calc(var(--fs-header-h) + var(--fs-space-5)); align-self: start; order: -1; }
}
/* Scoped to the docs sidebar. Unscoped, these rules also hit the benchmark's journal, model,
   task and category index lists (layouts/_default/list.html, section/list.html). */
.docs-layout .index-list h2 { font-family: var(--fs-font-mono); font-size: var(--fs-text-micro); font-weight: 500; color: var(--fs-muted); text-transform: uppercase; letter-spacing: var(--fs-tracking-label); margin: 0 0 var(--fs-space-3); }
.docs-layout .index-list ul { list-style: none; padding: 0; margin: 0; }
.docs-layout .index-list li { margin: 0 0 var(--fs-space-2); }
.docs-layout .index-list li a { color: var(--fs-fg-2); text-decoration: none; font-size: var(--fs-text-small); }
.docs-layout .index-list li a:hover { color: var(--fs-fg); }
.docs-layout .index-list li strong[aria-current] { color: var(--fs-fg); font-size: var(--fs-text-small); box-shadow: inset 2px 0 0 var(--fs-accent-text); padding-left: var(--fs-space-2); }
.docs-layout .index-list li p { display: none; }  /* descriptions only in the foot-of-page variant */

/* ============ cards & lists (benchmark) ============ */
.category-card, .task-card { background: var(--fs-surface); border: 1px solid var(--fs-border); border-radius: var(--fs-radius); }
.category-card h3 a, .task-card h3 a { color: var(--fs-fg); text-decoration: none; }
.category-card h3 a:hover, .task-card h3 a:hover { color: var(--fs-accent-text); }
.changelog-entry { border-color: var(--fs-border); }
.prompt-pair { border: 1px solid var(--fs-border); border-radius: var(--fs-radius); background: var(--fs-surface); }
.prompt-pair > summary { color: var(--fs-fg); }
.prompt-pair > summary code { background: var(--fs-surface-2); color: var(--fs-fg); }  /* legacy #ececdf beat the generic code rule */
.prompt-text { background: var(--fs-surface-2); color: var(--fs-fg); border-radius: var(--fs-radius-sm); }

/* ============ controls: slider, toggles, subscribe ============ */
.slider-controls { background: var(--fs-surface); border: 1px solid var(--fs-border); border-radius: var(--fs-radius); }
.slider-group label, .toggle-label { color: var(--fs-fg); }
input[type="range"] { accent-color: var(--fs-lime); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--fs-lime); }
.subscribe-form input[type="email"], input[type="email"], input[type="text"], select {
  background: var(--fs-surface-2); color: var(--fs-fg); border: 1px solid var(--fs-border-strong);
  border-radius: var(--fs-radius-sm); height: 40px; padding: 0 var(--fs-space-3); font: inherit;
}
/* The subscribe form's "Email" label is visible (partials/subscribe-form.html): its own line
   above the input and the button. 16px input text: iPhone Safari zooms on anything smaller. */
.subscribe-form { flex-wrap: wrap; align-items: center; }
.subscribe-form label { flex-basis: 100%; font-size: var(--fs-text-small); font-weight: 500; color: var(--fs-fg); }
.subscribe-form input[type="email"] { font-size: var(--fs-text-body); }

/* ============ heatmap (overpay multiple; bins set by partials/heatmap.html + assets/js/slider.js) ============ */
.heatmap-table th { background: var(--fs-bg); }
.heatmap-table th.hm-col a, .hm-model a { color: var(--fs-fg); text-decoration: none; }
.heatmap-table th.hm-col a:hover, .hm-model a:hover { color: var(--fs-accent-text); }
.hm-model small, .hm-totals small { color: var(--fs-muted); }
.hm-provider-break > td { border-top: 1px solid var(--fs-border-strong); }
.hm-cell { font-family: var(--fs-font-mono); }
.hm-cell.hm-cheaper-1, .hm-cell.hm-cheaper-2, .hm-cell.hm-cheaper-3, .hm-cell.hm-cheaper-4,
.hm-cell.hm-cheaper-5 { background-color: var(--fs-data-pick); color: var(--fs-on-accent); }   /* 1.0x = best value */
.hm-cell.hm-neutral { background-color: var(--fs-surface); color: var(--fs-muted); }
.hm-cell.hm-more-expensive-1 { background-color: var(--fs-heat-1); color: var(--fs-fg-2); }
.hm-cell.hm-more-expensive-2 { background-color: var(--fs-heat-2); color: var(--fs-fg); }
.hm-cell.hm-more-expensive-3 { background-color: var(--fs-heat-3); color: var(--fs-fg); }
.hm-cell.hm-more-expensive-4 { background-color: var(--fs-heat-4); color: var(--fs-fg); }
.hm-cell.hm-more-expensive-5 { background-color: var(--fs-heat-5); color: var(--fs-fg); }
.hm-cell.hm-empty {
  background-color: var(--fs-heat-empty); color: var(--fs-faint);
  background-image: repeating-linear-gradient(45deg, transparent 0 4px, var(--fs-border) 4px 5px);
}
.hm-cell-link:hover { background-color: var(--fs-hover); }
.hm-star { color: var(--fs-muted); }                       /* per-task winner on a non-pick cell: a label, not a second pick */
.hm-cell.hm-cheaper-5 .hm-star { color: var(--fs-on-accent); } /* on the lime 1.0x cell */
.hm-legend-min::before { color: var(--fs-accent-text); }      /* ← best value */
.hm-legend-max::after { color: var(--fs-muted); }             /* → pricier */
.hm-legend { color: var(--fs-muted); }
.hm-legend-label { color: var(--fs-fg); }
.hm-legend-gradient {                              /* fixed bins, hard stops — not a smooth gradient */
  background: linear-gradient(90deg,
    var(--fs-data-pick) 0 16.66%, var(--fs-heat-1) 16.66% 33.33%, var(--fs-heat-2) 33.33% 50%,
    var(--fs-heat-3) 50% 66.66%, var(--fs-heat-4) 66.66% 83.33%, var(--fs-heat-5) 83.33% 100%) !important;
  border: 1px solid var(--fs-border);
}

/* ============ other data styles ============ */
.composite-table .rank, .mini-task-table td.rank { font-family: var(--fs-font-mono); color: var(--fs-muted); }
.cost-table .row-anchor, .row-anchor { background: var(--fs-accent-soft); box-shadow: inset 3px 0 0 var(--fs-accent-text); }
.savings { color: var(--fs-accent-text); font-weight: 600; }
.more-expensive { color: var(--fs-fg-2); }   /* costing more is not an error: quiet by default (DESIGN_GUIDELINES.md §2, principle 5); the heat bins carry it */
.check { color: var(--fs-accent-text); }
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--fs-border-strong); background: transparent; color: var(--fs-fg-2);
  font: 500 var(--fs-text-micro)/1 var(--fs-font-sans);
}
.badge-frontier { background: transparent; color: var(--fs-fg-2); border-color: var(--fs-border-strong); }
.dot-green { background: var(--fs-fg); }
.dot-amber { background: var(--fs-muted); }
.dot-red { background: var(--fs-warn); }       /* heat-5 is too dark for a small mark (2.6:1) */
.dot-grey { background: var(--fs-faint); }
.legend-swatch.legend-solid { background: var(--fs-data-qualifies); }
.legend-swatch.legend-stripe { background: repeating-linear-gradient(45deg, var(--fs-data-qualifies) 0 3px, transparent 3px 6px); opacity: 1; }  /* style.css sets .4 */
/* Task CI chart (partials/task-ci-bars.html + renderTaskCIBars in slider.js). Colours come
   from CLASSES, not SVG attributes, so the script can move the pick and the below-bar state
   when the quality slider or cost mode changes (P4.1, P4.3). CSS properties override SVG
   presentation attributes, so any attribute left behind loses to these rules. */
.ci-svg text { fill: var(--fs-fg); }              /* row labels and the cost line */
.ci-row-marginal text { fill: var(--fs-muted); }
.ci-row:hover text { fill: var(--fs-fg); }
.ci-svg .ci-grid { stroke: var(--fs-data-grid); }
.ci-svg .ci-tick, .ci-svg .ci-cost, .ci-svg .ci-savings, .ci-svg .ci-rule-label { font-family: var(--fs-font-mono); }
.ci-svg .ci-tick { fill: var(--fs-data-axis); font-size: 12px; }
.ci-svg .threshold-rule { stroke: var(--fs-data-threshold); stroke-dasharray: 8 6; }
.ci-svg .ci-rule-label { fill: var(--fs-fg); font-size: 12px; }
.ci-svg .ci-savings { font-size: 12px; }
.ci-svg .ci-savings--pick { fill: var(--fs-accent-text); }   /* "best value" / "cheapest": the pick */
.ci-svg .ci-savings--cheaper { fill: var(--fs-muted); }      /* only below-bar rows can undercut the pick */
.ci-svg .ci-savings--more { fill: var(--fs-fg-2); }
.ci-svg .ci-bar-solid, .ci-svg .ci-point, .ci-svg .ci-bar-band { fill: var(--fs-data-qualifies); }
.ci-svg .ci-bar-band { opacity: .35; }
.ci-svg .ci-point { stroke: var(--fs-bg); stroke-width: 1.2; }
.ci-svg pattern line { stroke: var(--fs-data-qualifies); }   /* the pattern's own stroke="currentColor" cannot be reached through the referencing element */
.ci-svg .ci-bars-row.is-below :is(.ci-bar-solid, .ci-point, .ci-bar-band) { fill: var(--fs-data-below); }
.ci-svg .ci-bars-row.is-below text { fill: var(--fs-muted); }
.ci-svg .ci-bars-row.is-below .ci-row:hover text { fill: var(--fs-fg); }
.ci-svg .ci-bars-row.is-pick :is(.ci-bar-solid, .ci-point) { fill: var(--fs-data-pick); }
.confidence-legend { color: var(--fs-fg-2); }
.confidence-legend .cf, .confidence-legend .cf-ranked, .confidence-legend .cf-high, .confidence-legend .cf-medium {
  background: var(--fs-surface-2); border-color: var(--fs-border-strong); color: var(--fs-fg);
}
.rubric { background: var(--fs-surface); border: 1px solid var(--fs-border); border-radius: var(--fs-radius); }

/* ============ minimum text size (13px, DESIGN_GUIDELINES.md §5) ============ */
/* Legacy style.css sizes below 13px that no other rule here replaces. The rotated heatmap
   headers have a fixed max-height (style.css): check long category names still fit. */
.heatmap-table th.hm-col a, .hm-model small, .heatmap-table thead th.hm-totals .hm-totals-label,
.heatmap-table tbody td.hm-totals, .hm-totals small, .hm-savings, .hm-legend-tick, .hm-legend-aside,
.cat-mini th, .cost-table small, .confidence-legend .cf { font-size: var(--fs-text-micro); }

/* ============ footer ============ */
.site-footer { background: var(--fs-bg); border-top: 1px solid var(--fs-border); color: var(--fs-muted); padding: var(--fs-space-7) 0; margin-top: var(--fs-space-8); }
.footer-col h3 { font-family: var(--fs-font-mono); font-size: var(--fs-text-micro); font-weight: 500; text-transform: uppercase; letter-spacing: var(--fs-tracking-label); color: var(--fs-muted); }
.footer-col p, .footer-col li { color: var(--fs-fg-2); font-size: var(--fs-text-small); }
.footer-col a { color: var(--fs-fg-2); text-decoration: none; }
.footer-col a:hover { color: var(--fs-fg); }
.footer-copyright, .footer-fineprint { font-family: var(--fs-font-mono); font-size: var(--fs-text-micro); color: var(--fs-muted); }
.footer-disclosure { color: var(--fs-fg-2); border-top-color: var(--fs-border); }
