/* Geist Sans and Geist Mono, per the OpenSecura brand guide. SIL OFL 1.1. */
@font-face { font-family: "Geist Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist/Geist-Variable.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist/GeistMono-Variable.woff2") format("woff2"); }
/* Layout: a release ledger. Left-aligned column, a mono version stamp as the
   one loud element, components as ruled ledger rows, not cards. */
:root {
  /* Neutrals and accent are the OpenSecura brand values (Paper, Ink, Slate, Line, Navy, Orange). */
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #1C2230;
  --muted: #5A6372;
  --rule: #D5DAE2;
  --accent: #17376F;
  --accent-soft: #DFE5F3;
  --highlight: #295EBD;
  --warm: #964D09;
  --warm-soft: #F4E6D6;
  --display: "Geist Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --body: "Geist Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1322; --surface: #151D30; --ink: #E6E9EF; --muted: #9AA3B5;
    --rule: #2A3550; --accent: #9DB4F0; --accent-soft: #1C2A4E; --highlight: #9DB4F0;
    --warm: #E0A26A; --warm-soft: #3A2815; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1322; --surface: #151D30; --ink: #E6E9EF; --muted: #9AA3B5;
  --rule: #2A3550; --accent: #9DB4F0; --accent-soft: #1C2A4E; --highlight: #9DB4F0;
  --warm: #E0A26A; --warm-soft: #3A2815; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { max-width: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.5;
}
.wrap {
  --page-gutter: 16px;
  margin-inline: auto;
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
}
@media (width > 1100px) { .wrap { --page-gutter: min(3vw, 64px); } }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
p { margin: 0; }
.label {
  font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

/* Top bar */
.top { padding-block: 14px; border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; justify-content: space-between; }
.top #index-tabs { margin-right: auto; }
.brand { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.01em; margin: 0; line-height: 1.1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.brand a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 14px; }
.brand .logo { height: 30px; width: auto; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); text-decoration: underline; }

/* Hero */
#leaderboard { padding-top: 22px; }

/* Sections */
section { padding-block: 36px; border-top: 1px solid var(--rule); }
.head { display: grid; gap: 6px; margin-bottom: 20px; max-width: 40em; }
.head h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.head h2 .task { color: var(--highlight); }
.head p { color: var(--muted); }

/* Component ledger */
.ledger { border-top: 2px solid var(--ink); }
.row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.5fr) 180px;
  gap: 6px 28px; padding-block: 13px; border-bottom: 1px solid var(--rule); align-items: start;
}
.row h3 { font-size: 20px; font-weight: 700; }
.row .tag { color: var(--muted); font-size: 14px; margin-top: 2px; }
.row .cell { min-width: 0; font-size: 15px; }
.row .cell .label { display: block; margin-bottom: 4px; }
.row .cell:last-child { text-align: right; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  padding: 5px 10px; border-radius: 999px;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.build { background: var(--accent-soft); color: var(--accent); }
.pill.design { background: var(--warm-soft); color: var(--warm); }
.pill.plan { background: transparent; color: var(--muted); border: 1px solid var(--rule); }
.note { margin-top: 14px; font-size: 15px; color: var(--muted); max-width: 44em; }

/* Leaderboard */
.board { border-top: 2px solid var(--ink); overflow-x: auto; }
.board .empty { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.board .empty strong { display: block; font-family: var(--display); font-size: 19px; }
.board .empty span { color: var(--muted); }
.testnote { margin-top: 14px; max-width: 46em; font-size: 15px; }
.testnote.wide { max-width: none; }
.testnote.wide .board { max-width: none; }
.testnote.wide td { vertical-align: middle; }
.testnote summary { cursor: pointer; font-weight: 600; color: var(--accent); padding-block: 6px; }
.testnote p { color: var(--muted); margin-block: 8px; }
.testnote .board { border-top: 1px solid var(--rule); max-width: 28em; }
.testnote code { font-family: var(--mono); font-size: 0.92em; }
.board table { width: 100%; border-collapse: collapse; font-size: 15px; }
.board th {
  font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); text-align: right; white-space: nowrap;
  padding: 10px 12px; border-bottom: 1px solid var(--rule);
}
.board th:nth-child(-n+3) { text-align: left; }
.board th:first-child { padding-left: 0; }
.board th.main { color: var(--accent); }
.board td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.board td:first-child { padding-left: 0; }
.board td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.board td.num strong { color: var(--ink); }
.board td:nth-child(-n+2).num { text-align: left; }
.board th#underlying-heading { text-align: left; }
.board .sub { display: block; font-size: 13px; color: var(--muted); }
.board .over { color: var(--warm); }
/* Caveat behind the info icon next to the status pill. */
.board td.empty { padding: 28px 0; border-bottom: 1px solid var(--rule); }
.board td.empty strong { display: block; font-family: var(--display); font-size: 19px; }
.board td.empty span { color: var(--muted); }

/* Method */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 28px; counter-reset: s; border-top: 2px solid var(--ink); }
.steps li { counter-increment: s; padding-block: 12px; }
.steps li::before { content: counter(s); font-family: var(--body); font-weight: 600; color: var(--accent); font-size: 14px; }
.steps strong { display: block; font-weight: 600; }
.steps span { color: var(--muted); font-size: 14px; line-height: 1.45; display: block; }

/* Two-column text lists */
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 2px solid var(--ink); }
.pairs div { padding-block: 12px; border-bottom: 1px solid var(--rule); }
.pairs h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.pairs p { color: var(--muted); font-size: 15px; }
.pairs.rules { margin-top: 24px; border-top: 1px solid var(--rule); }

.checks { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); max-width: 46em; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding-block: 9px; border-bottom: 1px solid var(--rule); }
.checks li::before { content: ""; width: 12px; height: 12px; margin-top: 7px; border: 2px solid var(--accent); }

/* FAQ */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding-block: 11px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.faq details p { color: var(--muted); font-size: 15px; padding-bottom: 14px; max-width: 46em; }

footer { border-top: 1px solid var(--rule); padding-block: 20px 28px; color: var(--muted); font-size: 15px; }
footer .wrap { display: grid; gap: 8px; }
footer .wrap:has(.build:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; }
footer .wrap p { grid-column: 1; }
footer .wrap .build { grid-column: 2; grid-row: 1 / span 2; align-self: end; font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { footer .wrap .build { grid-column: 1; grid-row: auto; } }

@media (max-width: 820px) {
  .pairs, .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { border-bottom: 1px solid var(--rule); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row .cell:last-child { text-align: left; }
  section { padding-block: 28px; }
}
/* Charts use one colour. Evidence and estimates use fill styles. See style-guide.html. */
:root { --c-general: #295ebd; --c: var(--c-general); --grid: #E4E8EE; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-general: #3d73d4; --grid: #232D45; } }
:root[data-theme="dark"] { --c-general: #3d73d4; --grid: #232D45; }
/* Segmented control: the one way to switch between views. Spec: style-guide.html. */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: color-mix(in srgb, var(--ink) 8%, var(--bg)); border-radius: 10px; }
.segmented button { font: inherit; font-weight: 500; line-height: 1.3; padding: 8px 16px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; transition: background-color .12s, color .12s; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media (max-width: 600px) {
  #index-tabs button { padding-inline: 6px; font-size: 14px; }
  .index-badge { display: block; width: max-content; margin: 2px auto 0; }
}
@media (prefers-reduced-motion: reduce) { .segmented button { transition: none; } }
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 18px 18px 10px; min-width: 0; }
.chart-wide, .chart-index { grid-column: 1 / -1; }
.chart h3 { font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chart-version { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); }
.chart figcaption p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.key { width: 11px; height: 11px; border-radius: 2px; display: inline-block; flex: none; }
.plot-frame { position: relative; min-width: 0; margin-top: 14px;
  background-image: linear-gradient(to bottom, transparent 23px, var(--grid) 23px 24px, transparent 24px 83px, var(--grid) 83px 84px, transparent 84px 143px, var(--grid) 143px 144px, transparent 144px 203px, var(--grid) 203px 204px, transparent 204px);
  background-repeat: no-repeat; }
.plot-frame::before, .plot-frame::after { content: ''; position: absolute; top: 0; bottom: 0; width: 32px; z-index: 2; pointer-events: none; opacity: 0; }
.plot-frame::before { left: 0; background: linear-gradient(to right, var(--surface), transparent); }
.plot-frame::after { right: 0; background: linear-gradient(to left, var(--surface), transparent); }
.plot-frame.can-scroll-left::before, .plot-frame.can-scroll-right::after { opacity: 1; }
.plot-scroll { min-width: 0; overflow-x: auto; }
.plot { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 64px; grid-template-rows: 204px; column-gap: 2px;
  width: max-content; min-width: 100%; padding: 0 8px 152px 100px; }
.col { min-width: 0; width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.col .val { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink); margin-bottom: 3px; }
.col .bar { width: min(30px, 70%); border-radius: 4px 4px 0 0; min-height: 2px; background: var(--c); transition: opacity .12s; }
.reported .bar, .key.reported { background-image: repeating-linear-gradient(135deg, transparent 0 5px, var(--surface) 5px 6.5px); box-shadow: inset 0 0 0 1px var(--ink); }
.key { background-color: var(--c); }
.col .name { position: absolute; top: 100%; right: 50%; margin-top: 6px; font-size: 12px; color: var(--muted); white-space: nowrap;
  transform-origin: top right; transform: rotate(-60deg) translateX(-2px); text-align: right; }
.col.selected { background: linear-gradient(var(--accent-soft), var(--accent-soft)) center bottom / 100% 204px no-repeat; }
.col.selected .name, .col:hover .name { color: var(--ink); font-weight: 600; }
.col:hover .bar { filter: brightness(1.08); }
.col:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 2px 0; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13px; padding: 6px 9px; border-radius: 4px; max-width: 260px; }
.tip b { display: block; }
.detail { margin-top: 18px; border-top: 2px solid var(--ink); padding-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px 40px; }
.detail h3 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.detail .entry-source { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; border-radius: 4px; color: var(--muted); }
.detail .entry-source:hover { color: var(--accent); background: var(--accent-soft); }
.detail .entry-source:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.entry-about { font-size: 14px; overflow-wrap: anywhere; }
.entry-about p { margin-top: 6px; }
.entry-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.entry-chip { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; line-height: 18px; text-decoration: none; }
a.entry-chip:hover { color: var(--ink); border-color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 8px 28px; margin-top: 12px; }
.stats div { min-width: 0; }
.stats b { display: block; font-family: var(--mono); font-weight: 500; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--muted); }
.breakdown { width: 100%; border-collapse: collapse; font-size: 14px; }
.breakdown caption { text-align: left; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; }
.breakdown th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 4px 10px 4px 0; border-bottom: 1px solid var(--rule); }
.breakdown td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.meter { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter i { display: block; flex: 0 0 72px; height: 8px; border-radius: 4px; background: var(--grid); overflow: hidden; }
.meter i u { display: block; height: 100%; background: var(--ink); border-radius: 4px 0 0 4px; }
.meter.none { color: var(--muted); }
.board.narrow { max-width: 28em; border-top: 1px solid var(--rule); }
@media (max-width: 900px) { .charts, .detail { grid-template-columns: minmax(0, 1fr); } }

/* Index summary inside the leaderboard */
.index-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 40px; align-items: start;
  padding-block: 14px; margin-bottom: 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.index-info .label { display: block; margin-bottom: 3px; }
.index-info p { font-size: 15px; }
.page-head { padding-block: 40px 8px; }
.page-head h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.page-head p { margin-top: 10px; color: var(--muted); max-width: 44em; }
.nav a[aria-current="page"] { color: var(--accent); }
.faq-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; align-items: start; }
@media (max-width: 900px) { .index-info, .faq-cols { grid-template-columns: minmax(0, 1fr); } }
#leaderboard .head { max-width: none; }
#leaderboard .head p { max-width: 46em; }
.lead { margin-bottom: 16px; }
.lead .head { margin-bottom: 0; }

.meter b { font-weight: 600; min-width: 3.2em; }
.breakdown td.src-score { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown td.weight { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.weight-value { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.weight-track { width: 72px; height: 6px; flex: none; border-radius: 3px; background: var(--rule); overflow: hidden; }
.weight-track > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.breakdown-note { font-size: 13px; color: var(--muted); margin-top: 8px; max-width: 52em; }
.detail { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); }
.meter i { flex-basis: 56px; }

.chart h3 a { color: inherit; text-decoration-color: var(--rule); }
.breakdown tr.main td { font-weight: 500; }
.breakdown tr.sub td:first-child { padding-left: 18px; }
.breakdown tr.sub td { font-size: 13px; color: var(--muted); border-bottom-style: dotted; }
.breakdown tr.sub td.src-score { font-weight: 400; }
.breakdown td.src-score { white-space: normal; }
.stats b { min-height: 1.1em; }

/* Shared result-file interface. Each chart keeps a readable column width. */
.charts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); align-items: stretch; gap: 28px 24px; }
.charts.two-benchmarks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-benchmarks .chart { grid-column: auto; }
.two-benchmarks .chart-index { grid-column: 1 / -1; }
@media (max-width: 900px) { .charts.two-benchmarks { grid-template-columns: minmax(0, 1fr); } }
.chart { min-width: 0; margin: 0; display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; }
.compact-charts { margin-bottom: 20px; }
.chart-empty { display: block; grid-row: auto; padding-bottom: 18px; }
#empty-switch { display: block; margin-top: 10px; }
.chart h3 { overflow-wrap: anywhere; }
.col.selected { background-size: min(100%, 56px) 204px; }
.chart-help { font-size: 13px; color: var(--muted); margin-top: 4px; min-height: 1.5em; }
.detail { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
.detail > * { min-width: 0; }
.result-explanation { margin-top: 14px; max-width: 40em; }
.evaluation-disclaimer p + p { margin-top: 6px; }
.breakdown-scroll { overflow-x: auto; }
.table-help { display: none; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.breakdown { min-width: 660px; }
.breakdown th[scope="row"] { font-size: 14px; font-weight: 500; vertical-align: middle; min-width: 132px; }
.breakdown tr.sub th { padding-left: 16px; font-size: 13px; }
.breakdown tr.sub-head th { padding: 8px 0 2px 16px; border-bottom: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.breakdown td { min-width: 55px; }
.breakdown .meter { white-space: normal; display: grid; gap: 0; min-width: 100px; font-size: 13px; }
.measure-label { display: block; color: var(--muted); font-size: 12px; }
.text-button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
button:focus-visible, .breakdown-scroll:focus-visible, .plot-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1000px) { .detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .table-help { display: block; }
  .breakdown { table-layout: fixed; }
  .breakdown thead th:first-child { width: 166px; }
  .breakdown thead th:nth-child(2) { width: 62px; }
  .breakdown thead th:nth-child(3) { width: 130px; }
}
@media (max-width: 600px) { .brand { font-size: 21px; } .brand a { gap: 10px; } .brand .logo { height: 26px; } }

.benchmark-toolbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-block: 7px; margin-bottom: 8px; border-bottom: 1px solid var(--rule); background: var(--bg);
  color: var(--muted); font-size: 13px;
}
.benchmark-filter { position: relative; flex: none; }
.benchmark-filter summary {
  display: flex; align-items: center; gap: 7px; padding: 4px 9px;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--accent);
  cursor: pointer; list-style: none;
}
.benchmark-filter summary::-webkit-details-marker { display: none; }
.benchmark-filter summary::after {
  content: ''; width: 5px; height: 5px; margin-inline: 3px 1px;
  border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-1px) rotate(45deg);
}
.benchmark-filter[open] summary, .benchmark-filter summary:hover { border-color: var(--accent); }
.benchmark-filter summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.benchmark-filter-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.benchmark-filter-panel {
  position: absolute; inset: calc(100% + 5px) 0 auto auto; width: min(280px, calc(100vw - 32px));
  padding: 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface);
  box-shadow: 0 6px 18px rgb(0 0 0 / .12); color: var(--ink);
}
.benchmark-filter-options label { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 3px 6px; cursor: pointer; }
.benchmark-filter-options label:hover { background: var(--accent-soft); }
.benchmark-filter-options input { margin: 0; accent-color: var(--accent); }
.benchmark-filter-reset { display: block; width: 100%; padding: 6px 6px 2px; border-top: 1px solid var(--rule); }
.benchmark-filter-reset:disabled { color: var(--muted); cursor: default; }
.guardrail-breakdown { min-width: 820px; table-layout: fixed; }
.guardrail-breakdown thead th:nth-child(1) { width: 19%; }
.guardrail-breakdown thead th:nth-child(2) { width: 18%; }
.guardrail-breakdown thead th:nth-child(3) { width: 11%; }
.guardrail-breakdown thead th:nth-child(4) { width: 15.5%; }
.guardrail-breakdown thead th:nth-child(5) { width: 18%; }
.controlled-results { border-block: 2px dashed var(--accent); }
.controlled-results > .main > * { padding-block: 12px; }
.controlled-results > .main > th { padding-inline-start: 10px; }
.breakdown .controlled-results > :is(.sub-head, .sub) > th { padding-inline-start: 20px; }
.benchmark-scenario { color: var(--muted); }
.benchmark-preview-score { margin-top: 6px; color: var(--accent); font-size: 14px; font-weight: 600; }

.author-note, .config-note { display: block; font-size: 12px; color: var(--warm); margin-top: 6px; }
.absence-reason { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.chart-note { font-size: 13px; color: var(--ink); margin-top: 10px; }
.chart-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
/* Plot actions: download as PNG, download data. Same two icons, same order, after every plot title. */
.plot-actions { display: inline-flex; gap: 2px; align-self: center; }
.icon-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; transition: background-color .12s, color .12s; }
.icon-button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, var(--surface)); }
.icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.score-help { font-size: 12px; color: var(--muted); }
.score-help summary { cursor: pointer; color: var(--accent); }
.score-help[open] { flex-basis: 100%; }
.charts.stacked .chart { grid-column: 1 / -1; }
.estimated .bar, .key.estimated { border: 2px dashed var(--ink); background-color: color-mix(in srgb, var(--c, var(--muted)) 65%, var(--surface)); }
.col.estimated .val { position: absolute; font-size: 11px; white-space: nowrap; margin: 0; }
.score-floor-marker { position: absolute; left: 50%; width: 10px; height: 6px; transform: translateX(-50%); background: var(--c); clip-path: polygon(0 0, 100% 0, 50% 100%); pointer-events: none; }
.col .score-floor-marker { bottom: -6px; }
.score-floor-jump { display: flex; gap: 12px; margin-top: 4px; font-size: 13px; }
.whisker { position: absolute; left: 72%; width: 0; border-left: 2px solid var(--ink); z-index: 1; pointer-events: none; }
.whisker::before, .whisker::after { content: ''; position: absolute; left: -5px; width: 8px; border-top: 2px solid var(--ink); }
.whisker::before { top: 0; }
.whisker::after { bottom: 0; }
.benchmarks-collapsed .chart:not(.chart-index) { display: none; }
.benchmark-toggle { display: block; margin: 10px 0 8px; font-size: 14px; font-weight: 600; }
.chart-index figcaption:has(> .legend) { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); column-gap: 32px; justify-items: start; }
.chart-index figcaption:has(> .legend) > * { grid-column: 1; }
.chart-index figcaption > .legend { grid-column: 2; grid-row: 1 / span 3; justify-self: end; align-self: start; justify-content: flex-end; align-content: flex-start; margin: 5px 0 0; }
@media (max-width: 900px) {
  .chart-index figcaption:has(> .legend) { grid-template-columns: minmax(0, 1fr); }
  .chart-index figcaption > .legend { grid-column: 1; grid-row: auto; justify-self: start; justify-content: flex-start; margin: 8px 0 0; }
}

/* Guardrail efficiency comparison. Colours and furniture follow style-guide.html. */
.efficiency { grid-column: 1 / -1; min-width: 0; padding: 18px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }
.efficiency h3 { font-size: 19px; font-weight: 600; }
.efficiency .chart-heading { align-items: flex-start; }
.efficiency .chart-heading h3 { line-height: 28px; }
.efficiency .plot-actions { align-self: flex-start; }
.efficiency .chart-heading button { font-size: 13px; }
.efficiency-filters { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 20px; margin-top: 10px; }
.efficiency-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 28px; }
.filter-label { margin-right: 3px; color: var(--muted); font-size: 12px; }
button.entry-chip { cursor: pointer; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); }
button.entry-chip:hover { color: var(--ink); border-color: var(--muted); }
button.entry-chip[aria-pressed="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.efficiency-cost { display: grid; grid-template-columns: auto 62px 280px; align-items: start; gap: 4px 10px; margin-left: auto; padding-bottom: 18px; font-size: 13px; line-height: 28px; }
.efficiency-reset { align-self: flex-start; min-height: 28px; font-size: 13px; }
.efficiency-reset:disabled { color: var(--muted); text-decoration: none; cursor: default; opacity: .6; }
.efficiency-cost label { font-weight: 500; }
.efficiency-cost output { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.efficiency-range { position: relative; min-width: 0; height: 28px; }
.efficiency-range input { --track: linear-gradient(to right, var(--accent) var(--fill), var(--rule) var(--fill)); appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.efficiency-range input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--track); }
.efficiency-range input::-moz-range-track { height: 4px; border-radius: 2px; background: var(--track); }
.efficiency-range input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.efficiency-range input::-moz-range-thumb { box-sizing: border-box; width: 16px; height: 16px; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.efficiency-cost-ticks { position: absolute; top: 27px; left: 8px; right: 8px; height: 16px; color: var(--muted); font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; pointer-events: none; }
.efficiency-cost-ticks > span { position: absolute; }
.efficiency-cost-ticks > span::before { content: ''; position: absolute; top: -5px; height: 3px; border-left: 1px solid var(--rule); }
.efficiency-cost-ticks > span > span { display: inline-block; transform: translateX(-50%); white-space: nowrap; }
.efficiency-cost-ticks > span:first-child > span { transform: none; }
.efficiency-cost-ticks > span:last-child > span { transform: translateX(-100%); }
@media (max-width: 1100px) {
  .efficiency-cost { flex: 1 1 100%; grid-template-columns: auto 62px minmax(0, 1fr); margin: 0; }
}
.efficiency-plot { position: relative; height: 320px; margin: 52px 12px 34px 36px; }
.efficiency-plot::before { content: 'Guardrail score (0 to 100)'; position: absolute; top: -40px; left: -36px; font-size: 12px; color: var(--muted); }
.efficiency-grid { position: absolute; z-index: 1; width: 100%; border-top: 1px solid var(--grid); pointer-events: none; }
.efficiency-grid > span { position: absolute; right: calc(100% + 9px); top: -10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.efficiency-timed { position: absolute; inset: 0 8px; }
.has-untimed .efficiency-timed { right: 96px; }
.efficiency-region { position: absolute; top: 0; bottom: 50%; left: 0; background: color-mix(in srgb, var(--accent-soft) 60%, transparent); pointer-events: none; }
.efficiency-frontier { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.efficiency-frontier polyline { fill: none; stroke: var(--accent); stroke-width: 1.25px; stroke-opacity: .65; }
.efficiency-untimed { position: absolute; right: 0; top: 0; bottom: 0; width: 72px; border-left: 1px dashed var(--rule); }
.efficiency-lane-label { position: absolute; top: -28px; width: 100%; text-align: center; font-size: 12px; color: var(--muted); }
.efficiency-tick { position: absolute; top: calc(100% + 10px); transform: translateX(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; }
.efficiency-axis-title { text-align: center; font-size: 13px; color: var(--muted); }
.efficiency-dot { position: absolute; z-index: 2; transform: translate(-50%, 50%); width: max(24px, calc(var(--size) + 8px)); height: max(24px, calc(var(--size) + 8px)); display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.efficiency-dot .score-floor-marker { top: calc(50% + var(--size) / 2 + 2px); }
.efficiency-dot.filtered .score-floor-marker { opacity: .3; }
.efficiency-plot:has(.score-floor-marker) { margin-bottom: 47px; }
.efficiency-plot:has(.score-floor-marker) .efficiency-tick { top: calc(100% + 23px); }
.efficiency-marker { display: inline-block; width: var(--size, 10px); height: var(--size, 10px); flex: none; border: 2px solid var(--c, var(--muted)); background: var(--c, var(--muted)); border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.efficiency-dot.selected { background: var(--accent-soft); }
.efficiency-plot .efficiency-dot.selected { outline: 1px solid var(--accent); }
.efficiency-dot:hover, .efficiency-dot:focus-visible { z-index: 3; }
.efficiency-cost-unknown { outline: 2px dotted var(--ink); outline-offset: 2px; }
.efficiency-dot.filtered .efficiency-marker { background: var(--surface); border-color: color-mix(in srgb, var(--c) 24%, var(--surface)); }
.efficiency-label { position: absolute; width: max-content; max-width: 140px; font-size: 12px; line-height: 1.15; text-align: left; color: var(--ink); pointer-events: none; }
.efficiency-timed:has(.efficiency-frontier:not([hidden])) .efficiency-label { paint-order: stroke fill; -webkit-text-stroke: 2.5px var(--surface); }
.efficiency .legend { margin-top: 14px; }
.efficiency .legend .efficiency-marker { margin-inline: 2px; }
.efficiency .efficiency-sizes { gap: 10px 18px; }
.efficiency-missing { margin-top: 12px; overflow-wrap: anywhere; }
.efficiency-unscored { font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.efficiency-unscored .efficiency-dot { position: static; transform: none; width: auto; height: auto; display: inline-flex; gap: 6px; padding: 3px 6px; border-radius: 6px; }
.efficiency-unscored .efficiency-dot.selected { color: var(--accent); }
.efficiency-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.efficiency-table caption { text-align: left; color: var(--muted); padding-block: 8px; }
.efficiency-table th, .efficiency-table td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.efficiency-table th { font-weight: 500; }
.efficiency-table thead { color: var(--muted); }
.efficiency-table .cost-note { color: var(--muted); font-size: 12px; }
.efficiency-filtered-row { color: var(--muted); }
@media (max-width: 600px) {
  .efficiency { padding: 14px; }
  .efficiency-cost { grid-template-columns: minmax(0, 1fr) 52px; }
  .efficiency-range { grid-column: 1; }
  .efficiency-plot { height: 360px; }
  .efficiency-label { max-width: 112px; }
  .efficiency-table, .efficiency-table tbody, .efficiency-table tr, .efficiency-table td, .efficiency-table th { display: block; width: 100%; }
  .efficiency-table caption { display: block; width: 100%; }
  .efficiency-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .efficiency-table tr { border-bottom: 1px solid var(--rule); padding-block: 8px; }
  .efficiency-table td, .efficiency-table th { border: 0; padding: 3px 0; }
  .efficiency-table td::before { content: attr(data-label) ': '; font-weight: 500; }
}

/* Benchmark samples and descriptions, opened from the detail table. */
.benchmark-actions { display: flex; gap: 6px; margin-top: 6px; }
.sub .benchmark-actions { flex-wrap: wrap; }
.sample-button, .about-button { display: inline-flex; flex: none; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); color: var(--accent); font: inherit; font-size: 12px; font-weight: 500; vertical-align: middle; cursor: pointer; }
.sample-button:hover, .about-button:hover { border-color: var(--accent); }
.sample-dialog { width: min(760px, calc(100vw - 32px)); }
.sample-dialog, .about-dialog { max-height: min(85vh, 900px); margin: auto; padding: 20px 22px; border: 1px solid var(--rule); border-radius: 8px; background: var(--bg); color: var(--ink); overflow-y: auto; }
.sample-dialog::backdrop, .about-dialog::backdrop { background: rgb(0 0 0 / .45); }
.sample-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sample-head h3 { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.sample-sees, .sample-source { color: var(--muted); font-size: 13px; margin-top: 6px; }
.sample-dialog .label { display: block; margin-top: 16px; }
.sample-task { margin-top: 6px; padding: 12px 14px; max-height: 44vh; overflow: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.sample-label { margin-bottom: 14px; }
.sample-label b { font-weight: 600; }
.about-dialog { width: 1040px; max-width: calc(100vw - 32px); padding: 0; scroll-padding-top: 84px; }
.about-head { position: sticky; top: 0; z-index: 1; padding: 16px 22px; background: var(--bg); border-bottom: 1px solid var(--rule); }
.about-head .text-button { font-size: 14px; min-height: 28px; }
.about-content { padding: 16px 22px 18px; font-size: 14px; overflow-wrap: anywhere; }
.about-facts { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }
.about-facts dd { margin: 2px 0 0; font-weight: 600; }
.about-facts.has-author-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.about-facts.has-author-list > :first-child { grid-column: 1 / -1; }
.about-content .about-byline :is(ul, ol) { display: flex; flex-wrap: wrap; gap: 3px 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.about-content .about-authors { color: var(--ink); }
.about-affiliations { color: var(--muted); font-size: 13px; font-weight: 400; }
.about-byline sup { line-height: 0; }
.about-authors sup { margin-inline-start: 1px; }
.about-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-block: 18px; }
.about-overview h4 { margin: 0; font-size: 15px; font-weight: 650; }
.about-content p, .about-content ul { color: var(--muted); margin-block: 6px; }
.about-content .about-key { color: var(--ink); font-weight: 550; }
.about-details { padding-block: 9px; border-top: 1px solid var(--rule); }
.about-details summary { color: var(--accent); font-weight: 600; cursor: pointer; }
.about-details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.about-details ul { padding-inline-start: 20px; }
.about-details li + li { margin-top: 6px; }
.about-paper p + p { margin-top: 10px; }
@media (max-width: 560px) {
  .about-head, .about-content { padding-inline: 16px; }
  .about-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-facts > :first-child { grid-column: 1 / -1; }
  .about-overview { grid-template-columns: minmax(0, 1fr); }
}
