/* styles/ai-bench.css: shared styles for the AI benchmark pages (News/AI_Benchmark.html and
   News/AI_Bench2.html), drawn by scripts/ai-bench.js. Moved out of AI_Benchmark.html's inline
   <style> on 2026-11-06 so both pages use one copy. Colors come from the site theme variables. */
.ab-wrap { margin-top: 32px; display: flex; flex-direction: column; gap: 24px; }
.page-hero .page-lede { max-width: 72ch; }
.ab-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ab-card h2 { margin: 0; font-family: var(--font-display); font-size: 1.35rem; }
.ab-note { margin: 0; color: var(--muted); font-size: 0.92rem; max-width: 90ch; }
.ab-take { margin: 0; color: var(--muted); }
/* Recommended picks */
.ab-recs { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 16px 28px; margin: 0; padding: 0; list-style: none; }
.ab-recs li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ab-recs .r1 { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ab-recs .r2 { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ab-recs .r2 span { display: inline-flex; align-items: center; gap: 6px; }
.ab-recs .r3 { font-size: 0.88rem; color: var(--muted); }
.ab-mark { flex: none; display: inline-block; vertical-align: middle; }
/* Filters: labels in a fixed column, pills wrap inside the right column. */
.ab-filters { display: grid; grid-template-columns: 8.5rem 1fr; gap: 8px 16px; align-items: start; }
/* The bench filters sit in a shaded band across the top of the results card, so they read as the
   card's controls and the chart's title line below reads as the start of its content. The negative
   margins undo the card's 24px padding; the radius matches the card's corners inside its border. */
#results > .ab-filters { margin: -24px -24px 6px; padding: 18px 24px; background: var(--surface-alt);
  border-bottom: 1px solid var(--border); border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.ab-flabel { padding-top: 5px; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ab-pills { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ab-pill { font: inherit; font-size: 0.92rem; line-height: 1.3; padding: 3.5px 13px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; }
.ab-pill:hover { border-color: var(--accent-line); }
.ab-pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ab-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); }
.ab-legend span { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 640px) { .ab-filters { grid-template-columns: 1fr; } .ab-flabel { padding-top: 0; } }
/* Chart */
.ab-chart { position: relative; min-height: 580px; }
.ab-chart svg { display: block; overflow: visible; }
.ab-grid { stroke: var(--border); }
/* Quadrant shading: best (fast and strong) lightest, worst (slow and weak) darkest, the other two
   between, so a zoomed chart still shows which quadrant you are looking at. */
.ab-qbest { fill: #fff; fill-opacity: 0.7; }
.ab-qmid { fill: #000; fill-opacity: 0.028; }
.ab-qworst { fill: #000; fill-opacity: 0.06; }
body[data-theme="dark"] .ab-qbest { fill: #fff; fill-opacity: 0.07; }
body[data-theme="dark"] .ab-qmid { fill: #fff; fill-opacity: 0.035; }
body[data-theme="dark"] .ab-qworst { fill: #000; fill-opacity: 0.12; }
.ab-ref { stroke: var(--muted); stroke-dasharray: 4 4; opacity: 0.6; }
/* Memory chart: the "axis break" strokes on a bar cut at the scale's end (a model larger than the scale). */
.ab-break { stroke: var(--surface); stroke-width: 2.5; }
.ab-quad { fill: var(--muted); font-size: 12px; font-weight: 600; opacity: 0.75; }
.ab-axis-note { fill: var(--muted); font-size: 11px; }
.ab-axis text { fill: var(--muted); font-size: 11px; }
.ab-axis line, .ab-axis path { stroke: var(--border); }
.ab-label { fill: var(--text); font-size: 11px; }
.ab-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 6px 10px; font-size: 0.8rem; max-width: 20rem; z-index: 2; }
.ab-tip-sub { color: var(--muted); }
.ab-famkey { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.82rem; color: var(--muted); padding-top: 8px; }
.ab-famitem { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
/* Table */
.ab-tbl-box { overflow-x: auto; }
/* Title line of the chart and table cards: title, that card's All / Cloud / Local pills, then its
   model filter at the right with the example hint under the box. Wraps on a phone. */
.ab-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; }
.ab-head h2 { padding-top: 2px; }
.ab-head .ab-find { margin-left: auto; }
@media (max-width: 640px) { .ab-head .ab-find { margin-left: 0; } }   /* on its own line: start at the left */
.ab-find { display: flex; flex-direction: column; gap: 3px; }
.ab-find input { font: inherit; font-size: 0.92rem; width: 15rem; max-width: 100%; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.ab-find input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ab-find .ab-note { font-size: 0.8rem; }
.ab-find-row { display: flex; align-items: center; gap: 6px; }
.ab-find-clear { font: inherit; font-size: 1.1rem; line-height: 1; width: 30px; height: 30px; flex: none; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.ab-find-clear:hover { color: var(--text); border-color: var(--accent-line); }
/* One clear control only: hide the browser's own x inside the search box. */
.ab-find input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.ab-tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.ab-tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.8rem; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ab-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ab-tbl .num { text-align: right; white-space: nowrap; }
.ab-tbl .ab-strong { font-weight: 700; }
.ab-tbl .ab-est { font-style: italic; color: var(--muted); }
.ab-tbl .ab-found { min-width: 18rem; color: var(--muted); }
.ab-setup { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
@media (max-width: 640px) { .ab-narrow { display: none; } }
/* Speed */
.ab-speed svg { display: block; }
.ab-speed-head { fill: var(--muted); font-size: 12px; }
.ab-speed-name { fill: var(--text); font-size: 12.5px; }
/* Benches a setup has not run yet: a bold bright-blue count after its name (chart and table). */
.ab-missing { fill: #1a8cff; font-weight: 700; }
.ab-missing-n { color: #1a8cff; font-weight: 700; }
body[data-theme="dark"] .ab-missing { fill: #4db0ff; }
body[data-theme="dark"] .ab-missing-n { color: #4db0ff; }
/* Tooltip: a bench a composite point has not run yet ("B6 not run"), in the same blue as the count. */
.ab-tip-missing { color: #1a8cff; font-weight: 600; }
body[data-theme="dark"] .ab-tip-missing { color: #4db0ff; }
/* DNF: a run that did not finish (time cap, or the agent stopped with nothing to score). Counts as 0. */
.ab-dnf { color: #c2410c; font-weight: 700; }
body[data-theme="dark"] .ab-dnf { color: #fb923c; }
/* A setup rerun on a newer llama.cpp build: the older row stays, dimmed and tagged, and is not ranked. */
.ab-old td { opacity: 0.6; }
.ab-old-label { opacity: 0.55; }
/* A setup missing some of the view's benches: gray text, keeping its place in score order (blue count stays blue). */
.ab-partial td { color: var(--muted); }
.ab-partial .ab-strong { font-weight: 400; }
.ab-old-tag { margin-left: 6px; padding: 0 6px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); font-size: 0.78em; white-space: nowrap; }
/* Quant column beside the model name in both butterfly charts. */
.ab-speed-sep { fill: var(--border); font-size: 12.5px; }
.ab-speed-quant { fill: var(--muted); font-size: 12.5px; }
/* Small pill before a card title, marking local-only sections. */
.ab-tag { display: inline-block; vertical-align: middle; margin-right: 6px; padding: 2px 10px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; }
.ab-machine-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 16px; flex-wrap: wrap; }
.ab-machine-head h2 { margin: 0; }
.ab-machine-head .btn-secondary { flex: none; }
.ab-machine p { margin: 0; color: var(--muted); max-width: 62rem; }
.ab-machine p strong { color: var(--text); }
.ab-speed-val { fill: var(--muted); font-size: 11px; }
.ab-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; color: var(--muted); font-size: 0.92rem; }
.ab-list strong { color: var(--text); }
