/* report.css — light, clean layout for the V&V site.
 * References var(--brand-*) from theme.css ONLY (no raw hex), so the theme stays swappable.
 */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--brand-font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: var(--brand-maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Header ---------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--brand-border);
  background: var(--brand-bg);
  position: sticky; top: 0; z-index: 10;
}
.site-header .container {
  display: flex; align-items: center; gap: 16px;
  padding-top: 18px; padding-bottom: 18px;
}
.site-header img.logo { height: 26px; width: auto; display: block; }
.site-header .subtitle {
  font-family: var(--brand-font-mono);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-text-muted); padding-left: 16px; border-left: 1px solid var(--brand-border);
}
.site-header nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }

/* ---- Hero / intro ---------------------------------------------------- */
.hero { padding: 56px 0 28px; }
.hero h1 {
  font-family: var(--brand-font-display);
  font-weight: 600; font-size: 40px; line-height: 1.1; margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.hero p { font-size: 18px; color: var(--brand-text-muted); max-width: 720px; }

h2 { font-family: var(--brand-font-display); font-weight: 600; font-size: 26px; margin: 40px 0 16px; }
h3 { font-family: var(--brand-font-display); font-weight: 600; font-size: 20px; margin: 28px 0 12px; }

/* ---- Coverage matrix ------------------------------------------------- */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--brand-border); border-radius: var(--brand-radius); }
table.matrix { border-collapse: collapse; width: 100%; font-size: 13px; }
table.matrix th, table.matrix td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--brand-border); }
table.matrix thead th {
  background: var(--brand-surface); position: sticky; top: 0;
  font-family: var(--brand-font-mono); font-weight: 500; font-size: 11px;
  white-space: nowrap; color: var(--brand-text-muted);
}
table.matrix th.group-head { background: var(--brand-surface); color: var(--brand-text); border-bottom: 2px solid var(--brand-border-strong); }
table.matrix td.case-name, table.matrix th.case-name { text-align: left; white-space: nowrap; font-weight: 500; }
table.matrix td.mark { color: var(--brand-accent-strong); font-weight: 700; }
/* Internal "Reviewed" first column (render-time toggle; hidden in shipped builds). */
table.matrix th.review-head { background: var(--brand-surface); color: var(--brand-text-muted); white-space: nowrap; }
table.matrix td.review-mark { color: var(--brand-border-strong); font-weight: 700; }
table.matrix td.review-mark.reviewed { color: var(--brand-pass); background: var(--brand-pass-bg); }
table.matrix td.review-mark.under-construction { color: var(--brand-warn); background: var(--brand-warn-bg); }
.coverage-stats { color: var(--brand-text-muted); font-size: 14px; margin: 8px 0 0; }
.gaps { font-family: var(--brand-font-mono); font-size: 12px; color: var(--brand-text-muted); }

/* ---- Case index (taxonomy-grouped) ----------------------------------- */
.tax-group { margin: 28px 0; }
.tax-group h3 { display: flex; align-items: baseline; gap: 10px; }
.tax-group h3 .count { font-family: var(--brand-font-mono); font-size: 12px; color: var(--brand-text-muted); }
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.case-card {
  border: 1px solid var(--brand-border); border-radius: var(--brand-radius);
  background: var(--brand-surface-2); padding: 18px; transition: border-color .15s, transform .15s;
}
.case-card:hover { border-color: var(--brand-accent); transform: translateY(-2px); }
.case-card .card-title { color: inherit; text-decoration: none; display: block; }
.case-card .card-title:hover h4 { color: var(--brand-accent-strong); }
.case-card h4 { margin: 0 0 6px; font-family: var(--brand-font-display); font-size: 17px; }
.case-card p { margin: 0 0 12px; color: var(--brand-text-muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* Chips are the ONE keyword vocabulary (= the case's active coverage-matrix features); every chip
 * is clickable to filter, whether rendered as a <button> (index) or an <a> (case page). */
.chip {
  display: inline-block;
  font-family: var(--brand-font-mono); font-size: 11px; line-height: 1.5; padding: 2px 8px;
  border-radius: 999px; background: var(--brand-surface); color: var(--brand-text-muted);
  border: 1px solid var(--brand-border); cursor: pointer; text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
}
.chip:hover { background: var(--brand-accent); color: var(--brand-bg); border-color: var(--brand-accent); text-decoration: none; }
/* A selected chip — reads the same as an active matrix column. */
.chip.chip-active { background: var(--brand-accent); color: var(--brand-bg); border-color: var(--brand-accent); }

/* ---- Feature filter (matrix ⇄ tiles) --------------------------------- */
.filter-hint { color: var(--brand-text-muted); }
.filter-bar {
  margin: 12px 0; padding: 8px 14px; font-size: 14px;
  background: var(--brand-surface); border: 1px solid var(--brand-accent);
  border-radius: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.filter-bar-label { color: var(--brand-text-muted); }
#filter-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
/* A removable active-filter term in the bar — click to drop just that term. */
.filter-tag { background: var(--brand-accent-bg); color: var(--brand-accent-strong); border-color: var(--brand-accent); }
.filter-tag:hover { background: var(--brand-accent); color: var(--brand-bg); border-color: var(--brand-accent); }
.filter-clear {
  font-family: var(--brand-font-mono); font-size: 12px; cursor: pointer;
  background: none; border: 1px solid var(--brand-border); border-radius: 999px;
  padding: 1px 8px; color: var(--brand-text-muted);
}
.filter-clear:hover { border-color: var(--brand-accent); color: var(--brand-accent-strong); }
table.matrix th.feat-head { cursor: pointer; }
table.matrix th.feat-head:hover { color: var(--brand-accent-strong); background: var(--brand-accent-bg); text-decoration: underline; }
table.matrix th.feat-head.col-active,
table.matrix td.mark.col-active { background: var(--brand-accent-bg); color: var(--brand-accent-strong); }
table.matrix tbody tr.row-dim { opacity: 0.28; }
.is-hidden { display: none !important; }

/* ---- Badges ---------------------------------------------------------- */
.badge { display: inline-block; font-family: var(--brand-font-mono); font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; }
.badge.pass { color: var(--brand-pass); background: var(--brand-pass-bg); }
.badge.fail { color: var(--brand-fail); background: var(--brand-fail-bg); }
.badge.draft { color: var(--brand-orange); background: #FCEBE3; }
.badge.cat { color: var(--brand-text-muted); background: var(--brand-surface); }
.badge.flagship { color: var(--brand-bg); background: var(--brand-accent-strong); letter-spacing: .03em; }

/* ---- Flagship / showcase benchmarks (top of index) ------------------- */
#flagship { margin: 8px 0 36px; }
.flagship-intro { color: var(--brand-text-muted); max-width: 760px; margin: 6px 0 18px; }
.flagship-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.flagship-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--brand-border-strong); border-radius: var(--brand-radius);
  background: var(--brand-surface-2); color: inherit; text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.flagship-card:hover { border-color: var(--brand-accent); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.flagship-thumb { background: var(--brand-text); aspect-ratio: 16 / 7; overflow: hidden; }
.flagship-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flagship-body { padding: 16px 18px 18px; }
.flagship-body h3 { margin: 8px 0 10px; font-family: var(--brand-font-display); font-size: 19px; }
.flagship-card:hover .flagship-body h3 { color: var(--brand-accent-strong); }
/* Static (non-clickable) keyword chip on a flagship tile — same vocabulary as elsewhere. */
.chip.chip-static { cursor: default; }
.chip.chip-static:hover { background: var(--brand-surface); color: var(--brand-text-muted); border-color: var(--brand-border); }

/* ---- Case page ------------------------------------------------------- */
.case-header { padding: 40px 0 8px; }
.case-header h1 { font-family: var(--brand-font-display); font-size: 34px; margin: 8px 0; }
.breadcrumb { font-size: 13px; color: var(--brand-text-muted); }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--brand-text); }
.citation { font-size: 14px; color: var(--brand-text-muted); border-left: 3px solid var(--brand-border-strong);
  padding: 4px 0 4px 14px; margin: 8px 0; }

/* ---- Result tables --------------------------------------------------- */
table.results { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 14px; }
table.results th, table.results td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--brand-border); }
table.results thead th { font-family: var(--brand-font-mono); font-size: 12px; color: var(--brand-text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; }
table.results th.num, table.results td.num { text-align: right; }
table.results td.num { font-family: var(--brand-font-mono); }
/* Luminary results are ALWAYS highlighted the same way across both table shapes: a light-purple
 * tint + brand-purple bold. In a transposed comparison table that's the Luminary ROW; in a
 * Quantity/Luminary/Reference scalar table it's the Luminary COLUMN (cells carry class "lum"). */
table.results.compare tr.luminary-row td,
table.results td.lum, table.results th.lum {
  color: var(--brand-accent-strong); font-weight: 600; background: var(--brand-accent-bg);
}

figure.artifact { margin: 20px 0; }
figure.artifact img { max-width: 100%; border: 1px solid var(--brand-border); border-radius: var(--brand-radius); display: block; }
figure.artifact figcaption { font-size: 13px; color: var(--brand-text-muted); margin-top: 8px; }

figure.case-hero { margin: 8px 0 28px; }
figure.case-hero img { max-width: 100%; border: 1px solid var(--brand-border); border-radius: var(--brand-radius); display: block; }
figure.case-hero figcaption { font-size: 13px; color: var(--brand-text-muted); margin-top: 8px; }
.ref-cite { font-size: 13px; color: var(--brand-text-muted); margin: 6px 0 18px; }

.reproduce { background: var(--brand-surface); border: 1px solid var(--brand-border);
  border-radius: var(--brand-radius); padding: 16px 18px; margin: 28px 0; font-size: 13px; }
.reproduce h3 { margin-top: 0; }
.reproduce dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.reproduce dt { font-family: var(--brand-font-mono); color: var(--brand-text-muted); }
.reproduce dd { margin: 0; font-family: var(--brand-font-mono); word-break: break-all; }

/* ---- Footer ---------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--brand-border); margin-top: 56px; padding: 28px 0; color: var(--brand-text-muted); font-size: 13px; }
.note { font-size: 13px; color: var(--brand-text-muted); font-style: italic; }
.caption { font-size: 13px; color: var(--brand-text-muted); margin: 6px 0 18px; }

/* ---- Math (native MathML) -------------------------------------------- */
math { font-size: 1.05em; }
math[display="block"] { display: block; margin: 14px 0; text-align: center; }
code.math-inline, code.math-block { font-family: var(--brand-font-mono); }
