:root {
  color-scheme: light;
  --bg: #fff; --panel: #fff; --panel-2: #f6f6f5;
  --border: #e5e5e2; --border-strong: #c9c9c5;
  --text: #242424; --muted: #666663; --faint: #73736e;
  --brand: #266252; --good: #26704b; --bad: #b43232; --warn: #92641d;
  --panel-3: #efefed; --brand-tint: #e7f0ed; --on-brand: #fff; --new-fg: #a4521b;
  --tp: #266252; --fp: #c8471b; --fn: #6741d9; --tn: #e8e8e5;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191919; --panel: #191919; --panel-2: #242424;
  --border: #353533; --border-strong: #555550;
  --text: #ededeb; --muted: #aaa9a3; --faint: #aaa9a3;
  --brand: #93c5b3; --good: #93c5a2; --bad: #efa1a1; --warn: #d9bc83;
  --panel-3: #2c2c2b; --brand-tint: #233631; --on-brand: #191919; --new-fg: #f0b07c;
  --tp: #93c5b3; --fp: #f59b74; --fn: #b1a3ff; --tn: #2f2f2d;
}
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: var(--bg); font: 14px/1.6 var(--sans); }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.topbar { border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1080px; margin: auto; padding: 16px 28px; display: flex; align-items: center; gap: 24px; }
.brand { color: var(--text); font-size: 17px; font-weight: 650; text-decoration: none; }
.nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.nav a.active { color: var(--text); text-decoration: underline; text-underline-offset: 7px; }
.theme-btn { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel); color: var(--muted); font-size: 18px; }
.container { max-width: 1080px; margin: auto; padding: 40px 28px 64px; }
.page-intro { margin-bottom: 30px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; line-height: 1.2; margin: 0 0 10px; }
.page-intro p { color: var(--muted); max-width: 740px; margin: 0; }
.section { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 30px; min-width: 0; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 5px; line-height: 1.4; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.controls label, .filter-label { color: var(--muted); font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 4px; overflow: hidden; }
.seg button { padding: 5px 11px; border: 0; border-right: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 12px; min-height: 32px; }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--panel-2); color: var(--text); font-weight: 600; }
.seg button:focus-visible { outline-offset: -3px; }
/* A joined single-line segment (like Level) doesn't work once there are too
   many options to fit one row (Category, up to 9) -- wrap into independent
   rounded chips instead of clipping or forcing a horizontal scroll. */
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; border: 0; overflow: visible; }
.chip-group button, .chip-group button:last-child { border: 1px solid var(--border-strong); border-radius: 999px; }
.chip-group button.active { border-color: var(--text); }
.controls select { border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text); background: var(--panel); padding: 5px 8px; min-height: 34px; font-size: 12px; max-width: 100%; }
.chart-wrap { padding: 2px 0 22px; }
.chart-title { font-size: 12px; color: var(--muted); font-weight: 500; margin: 0 0 12px; }
.chart-row { display: grid; grid-template-columns: 18px minmax(90px, 200px) 1fr 52px; align-items: center; gap: 8px; padding: 4px 0; }
.chart-rank { color: var(--faint); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.chart-label { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chart-bar-track { height: 14px; background: var(--panel-2); border-radius: 3px; overflow: hidden; min-width: 24px; }
.chart-bar { height: 100%; background: var(--brand); border-radius: 0 3px 3px 0; }
.chart-value { font-family: var(--mono); font-size: 11.5px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.chart-community-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 5px; vertical-align: middle; }
.tbl-wrap { overflow-x: auto; border-top: 1px solid var(--border-strong); }
table.board { border-collapse: collapse; width: 100%; min-width: 690px; font-size: 13px; }
table.board th, table.board td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.board th { background: var(--panel-2); color: var(--muted); font-weight: 500; font-size: 12px; }
table.board .num { text-align: right; font-variant-numeric: tabular-nums; }
table.board td.num { font-family: var(--mono); }
table.board tbody tr:hover { background: var(--panel-2); }
.rank { width: 42px; color: var(--faint); font-variant-numeric: tabular-nums; }
.method, .metric-strong { font-weight: 600; }
.metric-mut, .group { color: var(--muted); }
.id { font: 11px/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
table .id { max-width: 220px; white-space: normal; margin-top: 3px; }
.submission-name { display: flex; align-items: flex-start; gap: 6px; }
.submission-name .id { display: block; }
.expand-btn { width: 22px; height: 22px; flex: 0 0 22px; padding: 0; border: 0; background: transparent; color: var(--muted); line-height: 22px; }
.expand-btn span { display: inline-block; transition: transform .12s ease; }
.expand-btn[aria-expanded="true"] span { transform: rotate(90deg); }
.del-btn { width: 20px; height: 20px; flex: 0 0 20px; margin-left: auto; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--faint); font-size: 15px; line-height: 20px; transition: color .12s ease, background .12s ease; }
.del-btn:hover, .del-btn:focus-visible { color: var(--bad); background: var(--panel-2); }
.del-btn:disabled { opacity: .5; }
/* Community-board category breakdown: plain <tr>s in the same table.board,
   sharing its column widths exactly -- not a separate nested table, so
   nothing to keep in sync for alignment. */
.category-row td { background: var(--panel-2); font-size: 12px; }
.category-row .category-name { padding-left: 20px; color: var(--muted); }

/* Rows run after the paper (data/paper_results.json rows with `postPaper`):
   brand-tinted row + left accent bar + a filled NEW tag, so they stand out
   without relying on color alone (the tag carries the text and tooltip). */
table.board tr.post-row { background: rgba(38, 98, 82, .07); background: color-mix(in srgb, var(--brand) 8%, transparent); }
table.board tr.post-row:hover { background: color-mix(in srgb, var(--brand) 14%, transparent); }
table.board tr.post-row td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.new-pill { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: var(--bg); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; line-height: 18px; vertical-align: 1px; white-space: nowrap; cursor: help; }
.new-pill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); animation: new-pill-sheen 1.6s ease-out .4s 2; pointer-events: none; }
@keyframes new-pill-sheen { to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .new-pill::after { animation: none; } }
.chart-label .new-pill { margin-left: 5px; }
.chart-bar.post { background: repeating-linear-gradient(135deg, var(--brand) 0 5px, color-mix(in srgb, var(--brand) 55%, var(--bg)) 5px 9px); }

/* Filter box between the chart and the table: one rounded card holding the
   Level segments, the Area and Show selects, and the Include 0.0 toggle. */
.filter-card { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 16px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.chips-row { gap: 8px 10px; align-items: flex-start; padding-top: 10px; border-top: 1px solid var(--border); }
.chips-label { flex: 0 0 44px; padding-top: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 0; min-width: 0; }
/* Badges work like checkboxes and start selected: selected = brand tint with
   a check mark, left out = plain outline with muted text. */
.chips button { padding: 2px 7px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 12px; line-height: 1.5; }
.chips button:hover { border-color: var(--brand); }
.chips button.active { background: var(--brand-tint); border-color: color-mix(in srgb, var(--brand) 45%, var(--border-strong)); color: var(--brand); font-weight: 600; }
.chips button.active::before { content: "✓"; margin-right: 2px; }
.chip-sep { width: 1px; align-self: stretch; margin: 3px 4px; background: var(--border-strong); }
.filter-card .seg { gap: 2px; padding: 3px; border: 0; border-radius: 8px; background: var(--panel-3); overflow: visible; }
.filter-card .seg button, .filter-card .seg button:last-child { border: 0; border-radius: 6px; background: transparent; min-height: 30px; padding: 4px 12px; color: var(--muted); font-size: 13px; }
.filter-card .seg button.active { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.field-inline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.field-inline select { border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); background: var(--panel); padding: 5px 8px; min-height: 32px; font-size: 13px; font-weight: 400; max-width: 100%; }
.check-inline { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 13px; cursor: pointer; }
.check-inline input { margin: 0; width: 15px; height: 15px; accent-color: var(--brand); }
.filter-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--brand); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.table-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 560px) {
  .filter-row { gap: 10px 14px; }
  .filter-meta { margin-left: 0; width: 100%; }
  .chips-row { flex-direction: column; gap: 6px; }
  .chips-label { flex: none; padding-top: 0; }
}

/* ------------------------- Compile vs. SA-PASS page ------------------------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi-k { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.kpi-v { font-family: var(--mono); font-size: 26px; line-height: 1.25; }
.kpi-d { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.card-head { padding: 16px 18px 0; }
.card-head h2 { margin: 0; }
.card-head .sub { margin: 2px 0 0; }
.map-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.plot-card { flex: 999 1 600px; }
.detail-card { flex: 1 1 300px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.plot { padding: 16px 24px 52px 62px; }
.plot-area { position: relative; aspect-ratio: 1.45 / 1; }
.plot-bg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot-bg .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot-bg .diag { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.plot-bg .region-fp { fill: var(--fp); opacity: .07; }
.plot-bg .region-fn { fill: var(--fn); opacity: .06; }
.region-label { position: absolute; font-size: 12px; line-height: 1.35; color: var(--muted); }
.region-label b { font-weight: 700; }
.fp-label { right: 10px; bottom: 32%; text-align: right; }
.fp-label b { color: var(--fp); }
.fn-label { left: 10px; top: 10px; }
.fn-label b { color: var(--fn); }
.diag-label { position: absolute; right: 9%; top: 7%; font-size: 11.5px; color: var(--muted); transform: rotate(-34deg); transform-origin: right; }
.origin-note { position: absolute; left: 10px; bottom: 16%; font-size: 11.5px; color: var(--muted); }
.tick { position: absolute; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tick.x { bottom: -24px; transform: translateX(-50%); }
.tick.x.end { transform: translateX(-100%); }
.tick.y { left: -34px; transform: translateY(50%); }
.axis-title { position: absolute; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.axis-title.x { bottom: -46px; left: 50%; transform: translateX(-50%); }
.axis-title.y { left: -56px; top: 50%; transform: rotate(-90deg) translateX(50%); transform-origin: left top; }
.pt { position: absolute; width: 26px; height: 26px; margin: 0 0 -13px -13px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; z-index: 2; }
.pt i { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid var(--brand); box-sizing: border-box; }
.pt.direct i { background: var(--panel); }
.pt.lean i { border-radius: 2px; }
.pt.post i { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--new-fg); }
.pt.sel { z-index: 3; }
.pt.sel i { width: 17px; height: 17px; outline: 2px solid var(--text); outline-offset: 3px; }
.pt-label { position: absolute; z-index: 4; font-size: 12px; font-weight: 600; padding: 0 5px; border-radius: 4px; background: color-mix(in srgb, var(--panel) 88%, transparent); white-space: nowrap; pointer-events: none; }
.pt-label.sel { font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 18px 14px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.sw.dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--brand); background: var(--brand); box-sizing: border-box; }
.sw.dot.direct { background: var(--panel); }
.sw.dot.lean { border-radius: 2px; }
.sw.dot.ring { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--new-fg); }
.sw.tp, .seg-tp { background: var(--tp); }
.sw.fp, .seg-fp { background: var(--fp); }
.sw.fn, .seg-fn { background: var(--fn); }
.sw.to, .seg-to { background: repeating-linear-gradient(135deg, var(--fn) 0 3px, transparent 3px 6px); }
.sw.tn, .seg-tn { background: var(--tn); }
.detail-name { font-size: 17px; font-weight: 700; }
.detail-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.detail-note b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.confusion { display: grid; gap: 6px; font-size: 12px; }
.c-row { display: grid; grid-template-columns: 92px repeat(2, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.ch { color: var(--muted); font-weight: 600; text-align: center; align-self: end; }
.rh { color: var(--muted); font-weight: 600; align-self: center; }
.cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 6px; border-radius: 6px; text-align: center; color: var(--muted); background: var(--panel-2); border: 1px solid var(--border); }
.cell b { font-family: var(--mono); font-size: 20px; font-weight: 500; color: var(--text); }
.cell.tp b { color: var(--tp); }
.cell.fp b { color: var(--fp); }
.cell.fn b { color: var(--fn); }
.strip-card .legend { padding-top: 12px; }
.strips { display: flex; flex-direction: column; padding: 0 8px 10px; }
.strip-row { display: grid; grid-template-columns: minmax(150px, 290px) minmax(0, 1fr) 118px; gap: 14px; align-items: center; width: 100%; padding: 7px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; }
.strip-row:hover { background: var(--panel-2); }
.strip-row.sel { background: var(--brand-tint); }
.strip-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-width: 0; }
.strip-name .new-pill { margin-left: 0; }
.strip-name .name-sub { width: 100%; color: var(--muted); font-size: 12px; }
.detail-head .name-sub { color: var(--muted); font-size: 12.5px; }
.detail-head .name-line { display: flex; align-items: center; flex-wrap: wrap; }
.strip-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--tn); }
.strip-bar > span { display: block; height: 100%; }
.strip-stats { display: flex; justify-content: flex-end; gap: 10px; font-family: var(--mono); font-size: 12px; }
.fp-t { color: var(--fp); }
.fn-t { color: var(--fn); }
@media (max-width: 560px) {
  .plot { padding: 12px 12px 48px 46px; }
  .plot-area { aspect-ratio: 1 / 1; }
  .tick.y { left: -26px; }
  .axis-title.y { left: -44px; }
  .region-label, .diag-label, .origin-note { font-size: 10.5px; }
  .strip-row { grid-template-columns: minmax(0, 1fr) 76px; gap: 6px 10px; }
  .strip-bar { grid-column: 1 / -1; grid-row: 2; }
  .strip-stats { grid-row: 1; grid-column: 2; flex-direction: column; align-items: flex-end; gap: 0; }
}

/* Per-job category breakdown on submit.html (assets/submit.js renderJobs) --
   a standalone card, not a table row, so it uses its own small table. */
.category-table-wrap { max-width: 720px; overflow-x: auto; border-top: 1px solid var(--border-strong); }
.category-table { width: 100%; min-width: 500px; border-collapse: collapse; font-size: 12px; }
.category-table th, .category-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.category-table th { color: var(--muted); font-weight: 500; background: transparent; }
.category-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.badge { font-size: 12px; font-weight: 500; color: var(--muted); }
.badge.good { color: var(--good); }
.badge.bad { color: var(--bad); }
.badge.warn { color: var(--warn); }
.badge.run { color: var(--brand); }
.empty { color: var(--muted); padding: 24px 0; font-size: 13px; }
.empty-row { color: var(--muted); padding: 16px 12px !important; font-size: 13px; text-align: center; white-space: normal !important; }
.metric-definitions { margin: 20px 0 0; font-size: 12px; color: var(--muted); }
summary { cursor: pointer; color: var(--text); width: fit-content; }
.metric-definitions dl { display: grid; grid-template-columns: 135px 1fr; gap: 7px 15px; margin: 12px 0 0; max-width: 800px; }
.metric-definitions dt { font-weight: 600; }
.metric-definitions dd { margin: 0; }
.submit-container { max-width: 820px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--panel); color: var(--text); }
.field textarea { font: 12px/1.65 var(--mono); min-height: 220px; resize: vertical; tab-size: 2; }
.field input[type="file"] { font-size: 12px; }
input::file-selector-button { padding: 5px 9px; margin-right: 10px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.file-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.file-row input { flex: 1 1 260px; }
.file-row a { font-size: 12px; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--panel); color: var(--text); font-size: 13px; font-weight: 600; }
.btn.primary { background: var(--brand); color: var(--bg); border-color: var(--brand); min-width: 130px; }
.btn:hover:not(:disabled) { filter: brightness(.94); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.rate-note { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
#form-msg { margin-top: 10px; }
.jobs { display: flex; flex-direction: column; gap: 12px; }
.job { padding: 16px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.job .top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.job .name { font-weight: 600; overflow-wrap: anywhere; }
.mini-del { margin-left: auto; padding: 3px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; }
.mini-del:hover { color: var(--bad); }
.job .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: 6px; overflow-wrap: anywhere; }
.job .metrics { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px; }
.job .metrics .m { display: flex; flex-direction: column; }
.job .metrics .k { font-size: 12px; color: var(--muted); }
.job .metrics .v { font-family: var(--mono); font-size: 20px; }
.job-categories { margin-top: 18px; }
.job-categories h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.spinner { width: 12px; height: 12px; border: 2px solid var(--border-strong); border-top-color: var(--brand); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 3px; background: var(--border); overflow: hidden; margin-top: 12px; }
.progress > span { display: block; height: 100%; width: 30%; background: var(--brand); }
.progress.indet > span { animation: indet 2s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
footer { max-width: 1024px; margin: 0 auto; padding: 22px 0 36px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }

/* --------------------------------- Paper page -------------------------------- */
.venue-badge { display: inline-block; margin-bottom: 10px; padding: 3px 9px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.authors { color: var(--muted); max-width: 740px; margin: 0; }
.paper-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.abstract { max-width: 720px; color: var(--text); }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 14px; }
.stat-tile { flex: 1 1 160px; min-width: 140px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); }
.stat-value { font-size: 26px; font-weight: 650; line-height: 1.2; }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 4px; }
.bibtex-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 720px; margin-bottom: 5px; }
.bibtex-head h2 { margin: 0; }
.bibtex-wrap { max-width: 720px; }
.bibtex { margin: 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); color: var(--text); font: 12px/1.6 var(--mono); overflow-x: auto; white-space: pre; }
.copy-btn { flex: 0 0 auto; min-height: 28px; padding: 4px 10px; font-size: 12px; }

@media (max-width: 720px) {
  .topbar-inner { padding: 13px 18px; gap: 12px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin: 0; gap: 6px 18px; flex-wrap: wrap; font-size: 13px; }
  .theme-btn { margin-left: auto; }
  .container { padding: 28px 18px 48px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .controls { gap: 8px; }
  .metric-definitions dl { grid-template-columns: 1fr; gap: 3px; }
  .metric-definitions dd { margin-bottom: 8px; }
  footer { margin: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}
