/* Courtside scoreboard: readable type, aligned scores, and quarter pace first. */
:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  --bg: #151718;
  --surface: #202325;
  --soft: #1b1e1f;
  --selected: #302820;
  --ink: #f4f0e8;
  --muted: #babdb7;
  --accent: #ffad70;
  --line: #414648;
  --line-strong: #69706e;
  --positive: #c4d7b2;
  --error: #ffb3ab;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius: 6px;
  --text-small: .75rem;
  --text-support: .875rem;
  --text-body: 1rem;
  --text-section: 1.125rem;
  --text-metric: clamp(1.75rem, 2.5vw, 2.125rem);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, input, select, a, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: var(--ink); cursor: pointer; }
a { color: inherit; }
button, input, select, summary, a { transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .65; }
button, input, select { min-height: 44px; }
[hidden] { display: none !important; }
.shell { width: 100%; max-width: 1600px; margin: auto; padding: 0 clamp(16px, 3vw, 48px); }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 10; padding: 12px 16px; background: var(--accent); color: var(--bg); font-weight: 700; }
.skip-link:focus { top: 12px; }
.masthead { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; font-size: 1.0625rem; font-weight: 800; letter-spacing: .025em; line-height: 1.2; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; background: var(--accent); color: var(--bg); font-weight: 900; letter-spacing: -.08em; }
.wordmark small { display: block; margin-top: 5px; font-size: var(--text-small); font-weight: 500; color: var(--muted); letter-spacing: .05em; }
.header-actions { display: flex; align-items: center; gap: var(--space-6); }
.local-badge { padding: 4px 8px; border: 1px solid var(--line-strong); color: var(--muted); font-size: var(--text-small); font-weight: 600; }
.text-button { padding: 10px 4px; border: 0; background: none; font-size: var(--text-support); font-weight: 600; }
.text-button span { color: var(--accent); margin-left: 5px; }
.text-button:hover, .refresh-button:hover, .back-to-games:hover { color: var(--accent); }
.subdued { color: var(--muted); }
h1 { font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.2; letter-spacing: -.035em; margin: 0; font-weight: 700; }
h2, h3 { line-height: 1.35; }
.eyebrow { font-size: var(--text-small); letter-spacing: .08em; color: var(--accent); font-weight: 700; margin: 0 0 var(--space-3); }
.desk-intro { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); padding: var(--space-6) 0; }
.desk-title { flex-shrink: 0; }
.count-line { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: var(--space-2); color: var(--muted); font-size: var(--text-support); }
.count-line strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.count-line > span:first-child strong { color: var(--accent); }
.feed-card { max-width: 550px; min-width: 0; }
.feed-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-size: var(--text-support); font-weight: 600; }
.status-dot { height: 8px; width: 8px; flex-shrink: 0; border-radius: 50%; background: var(--accent); }
.status-dot.connected { background: var(--positive); }
.status-dot.offline { background: var(--error); }
.status-dot.loading { background: var(--muted); }
.refresh-button { min-height: 44px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--text-support); white-space: nowrap; }
.refresh-button span { font-size: 1.125rem; color: var(--accent); margin-right: 4px; }
.feed-details { margin-top: 4px; }
.feed-details summary { min-height: 44px; padding: 10px 0; font-size: var(--text-support); color: var(--muted); cursor: pointer; }
.feed-details p, .feed-card > p { margin: 4px 0 8px; font-size: var(--text-support); color: var(--muted); overflow-wrap: anywhere; }
#updated-at { font-size: var(--text-support); font-weight: 400; color: var(--muted); }
.section-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.section-top h2 { font-size: var(--text-section); letter-spacing: -.015em; font-weight: 650; margin: 0; }
.section-index { color: var(--accent); margin-right: var(--space-2); font-size: var(--text-support); }
.filter-panel { padding: var(--space-5); margin-bottom: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.filter-panel > .section-top { margin-bottom: var(--space-3); }
.quick-filters { display: grid; grid-template-columns: 1.25fr .9fr 1.15fr 1.15fr; gap: var(--space-4); }
.field { display: flex; flex-direction: column; min-width: 0; }
.field > label, .direction-field legend { font-size: var(--text-support); color: var(--ink); margin-bottom: var(--space-2); font-weight: 600; letter-spacing: 0; }
.field input, .field select { width: 100%; min-width: 0; height: 48px; padding: 10px 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: var(--text-body); }
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:hover, .field select:hover { border-color: var(--muted); }
.field input[aria-invalid="true"], .field input:invalid { border-color: var(--error); }
.input-wrap { position: relative; }
.input-wrap > span { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: var(--muted); font-size: 1.5rem; pointer-events: none; }
.search-field input { padding-left: 40px; }
.unit-input > span { left: auto; right: 28px; font-size: var(--text-small); }
.unit-input input { padding-right: 64px; }
.field-help, .field-error { margin-top: 6px; font-size: var(--text-small); line-height: 1.5; color: var(--muted); }
.field-error { color: var(--error); }
.field-error:empty { display: none; }
.scoring-help { margin: var(--space-3) 0 0; color: var(--muted); font-size: var(--text-support); max-width: 90ch; }
.comparison-details { margin-top: var(--space-3); }
.comparison-details summary, .advanced-details summary { width: fit-content; min-height: 44px; padding: 10px 0; cursor: pointer; color: var(--ink); font-size: var(--text-support); font-weight: 600; }
.comparison-details summary > span { color: var(--muted); font-weight: 400; }
.comparison-details summary > .comparison-active { color: var(--accent); font-weight: 600; }
.comparison-details[open] { border-top: 1px solid var(--line); padding-top: var(--space-2); }
.comparison-controls { display: grid; grid-template-columns: 1fr 1fr; max-width: 640px; gap: var(--space-5); margin-top: var(--space-3); }
.filter-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); margin-top: var(--space-5); }
.direction-field { display: flex; align-items: center; gap: var(--space-2); min-width: 0; border: 0; padding: 0; margin: 0; }
.direction-field legend { float: left; margin: 0 var(--space-4) 0 0; padding: 12px 0; }
.direction-field label { position: relative; cursor: pointer; }
.direction-field input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.direction-field label > span { display: flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: var(--text-support); }
.direction-field label > span > span { margin-left: 12px; }
.direction-field input:checked + span { color: var(--bg); background: var(--ink); border-color: var(--ink); font-weight: 700; }
.direction-field input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.smash-toggle { display: flex; align-items: center; gap: var(--space-3); position: relative; min-height: 44px; cursor: pointer; font-size: var(--text-support); font-weight: 600; }
.smash-toggle small { display: block; color: var(--muted); font-size: var(--text-small); font-weight: 400; margin-top: 2px; }
.smash-toggle input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; }
.toggle-track { display: inline-block; width: 40px; height: 24px; border: 1px solid var(--line-strong); background: var(--line); border-radius: 16px; position: relative; flex-shrink: 0; }
.toggle-track::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; top: 3px; left: 3px; background: var(--ink); }
.smash-toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.smash-toggle input:checked + .toggle-track::after { left: 19px; background: var(--bg); }
.smash-toggle input:focus-visible + .toggle-track { outline: 3px solid var(--accent); outline-offset: 4px; }
.desk-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(340px, 1fr); gap: var(--space-6); align-items: start; }
.fixtures-panel { min-width: 0; scroll-margin-top: 24px; }
.match-count { color: var(--muted); font-size: var(--text-support); text-align: right; }
.priority-summary { margin: 0 0 var(--space-4); }
#priority-order { font-size: var(--text-support); color: var(--ink); margin: 0 0 4px; font-weight: 600; }
#leading-summary { font-size: var(--text-support); line-height: 1.5; color: var(--muted); margin: 0; overflow-wrap: anywhere; max-width: 90ch; }
/* Every metric keeps its own label; repeating a table header adds visual noise. */
.list-column-labels { display: none; }
.fixture-list { display: flex; flex-direction: column; gap: var(--space-3); }
.fixture-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 132px; gap: var(--space-4); width: 100%; min-width: 0; padding: var(--space-4) var(--space-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); text-align: left; position: relative; }
.fixture-row:hover { background: var(--surface); border-color: var(--line-strong); }
.fixture-row[aria-pressed="true"] { background: var(--selected); border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.fixture-row:focus-visible { outline-offset: 3px; z-index: 1; }
.match-column { min-width: 0; }
.fixture-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: var(--space-3); color: var(--muted); font-size: var(--text-support); line-height: 1.4; }
.priority-rank { color: var(--accent); font-size: var(--text-support); font-weight: 750; font-variant-numeric: tabular-nums; }
.game-status { display: inline-block; padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 3px; font-size: var(--text-small); line-height: 1.4; font-weight: 650; color: var(--muted); }
.game-status.live { border-color: #8e6544; color: var(--accent); }
.snapshot-age { font-size: var(--text-small); color: var(--muted); }
.team-score-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.team-line { display: flex; flex-direction: column; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.team-name { font-size: var(--text-body); line-height: 1.35; font-weight: 650; }
.player-name { font-size: var(--text-support); line-height: 1.35; color: var(--muted); font-weight: 400; }
.team-score { font-size: 1.5rem; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.ppm-column, .estimate-column { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 0; gap: 4px; font-size: var(--text-small); color: var(--muted); text-align: right; }
.ppm-column { border-left: 1px solid var(--line); padding-left: var(--space-3); }
.metric-label { color: var(--muted); font-size: var(--text-small); line-height: 1.4; font-weight: 500; }
.ppm-value, .estimate-value { font-size: var(--text-metric); font-weight: 650; line-height: 1.2; letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--ink); }
.ppm-value { color: var(--accent); }
.metric-note { line-height: 1.4; font-size: var(--text-small); }
.estimate-column .smash-label { color: var(--accent); font-size: var(--text-small); font-weight: 700; }
.diff-positive { color: var(--accent); }
.row-pace { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: var(--space-3); border-top: 1px solid var(--line); font-size: var(--text-support); color: var(--muted); line-height: 1.5; }
.pace-chip, .trend-chip { padding: 3px 7px; border: 1px solid var(--line-strong); border-radius: 3px; font-size: var(--text-small); font-weight: 650; line-height: 1.5; }
.pace-fast { color: var(--accent); border-color: #8e6544; background: #302820; }
.pace-steady { color: var(--positive); border-color: #697961; background: #252d23; }
.pace-slow { color: #ccd6cd; border-color: #66776a; background: #232b26; }
.pace-rate { font-variant-numeric: tabular-nums; }
.early-sample { color: #dec9b8; font-size: var(--text-small); }
.pace-unavailable { font-size: var(--text-support); }
.trend-chip, .quarter-trend { color: #ffc397; border-color: #a97851; background: #342a20; }
.trend-super-slow { color: #ccd6cd; border-color: #748976; background: #29322c; }
.analysis-panel { min-width: 0; padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); position: sticky; top: 24px; }
.analysis-panel > .section-top { padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
#analysis-title { scroll-margin-top: 24px; }
.focus-symbol { color: var(--accent); font-size: 1.25rem; }
.back-to-games { display: none; min-height: 44px; align-items: center; font-size: var(--text-support); color: var(--muted); }
.analysis-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); color: var(--muted); font-size: var(--text-support); }
.scoreboard { margin: var(--space-5) 0; }
.scoreboard-team { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); margin: var(--space-3) 0; }
.scoreboard-team .team-name { font-size: 1.125rem; }
.big-score { font-size: 2rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -.035em; }
.quarter-breakdown { border-top: 1px solid var(--line); padding-top: var(--space-4); margin: 0 0 var(--space-5); }
.quarter-breakdown h3 { font-size: var(--text-body); font-weight: 650; margin: 0 0 var(--space-3); }
.quarter-trend { padding: 8px 10px; border-width: 1px; border-style: solid; border-radius: 3px; font-size: var(--text-small); font-weight: 650; margin: 0 0 var(--space-3); }
.quarter-table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--text-support); font-variant-numeric: tabular-nums; }
.quarter-table caption { caption-side: bottom; text-align: left; color: var(--muted); font-size: var(--text-small); padding-top: var(--space-3); line-height: 1.5; }
.quarter-table thead th { color: var(--muted); font-size: var(--text-small); font-weight: 500; padding: 8px 5px; border-bottom: 1px solid var(--line); }
.quarter-table tbody th, .quarter-table td { padding: 10px 5px; border-bottom: 1px solid var(--line); vertical-align: top; }
.quarter-table tbody th { font-weight: 650; width: 25%; }
.quarter-table small { display: block; color: var(--muted); font-size: var(--text-small); font-weight: 400; line-height: 1.4; margin-top: 3px; }
.current-quarter { background: var(--selected); }
.current-quarter th { color: var(--accent); }
.quarter-tempo-value { font-weight: 650; }
.pace-text-fast { color: var(--accent); }
.pace-text-steady { color: var(--positive); }
.pace-text-slow { color: #ccd6cd; }
.quarter-note { color: var(--muted); font-size: var(--text-support); line-height: 1.5; margin: var(--space-3) 0 0; }
.projection-block { border-top: 1px solid var(--line); padding-top: var(--space-4); }
.projection-label { color: var(--muted); font-size: var(--text-support); font-weight: 500; margin: 0; }
.projection-number { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 650; line-height: 1.15; letter-spacing: -.05em; font-variant-numeric: tabular-nums; margin: var(--space-2) 0; }
.projection-number small { font-size: var(--text-small); letter-spacing: 0; margin-left: var(--space-2); font-weight: 400; color: var(--muted); }
.projection-context { margin: 0 0 var(--space-4); color: var(--muted); font-size: var(--text-support); }
.comparison-box { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3); border: 1px solid #697961; background: #252d23; font-size: var(--text-support); border-radius: var(--radius); }
.comparison-box strong { max-width: 44%; color: var(--accent); font-size: var(--text-support); text-align: right; font-variant-numeric: tabular-nums; }
.comparison-box span small { display: block; color: var(--muted); font-size: var(--text-small); margin-top: 4px; }
.comparison-box.no-match { border-color: var(--line); background: var(--soft); }
.comparison-box.no-match strong { color: var(--ink); }
.detail-facts { margin: var(--space-3) 0 0; }
.detail-facts > div { display: flex; justify-content: space-between; gap: var(--space-4); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--text-support); }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; max-width: 60%; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.advanced-details { margin-top: var(--space-3); }
.advanced-details p { color: var(--muted); font-size: var(--text-support); }
.projection-unavailable { padding: var(--space-4) 0 0; }
.projection-unavailable h3 { font-size: var(--text-body); margin: 0 0 var(--space-2); font-weight: 600; }
.projection-unavailable p { color: var(--muted); font-size: var(--text-support); margin: 0; }
.source-note, .analysis-footnote { color: var(--muted); font-size: var(--text-small); line-height: 1.6; margin: var(--space-4) 0 0; overflow-wrap: anywhere; }
.analysis-empty { padding: var(--space-6) 0; text-align: center; }
.analysis-empty h3 { font-size: var(--text-body); margin: 0 0 var(--space-3); font-weight: 600; }
.analysis-empty p { color: var(--muted); font-size: var(--text-support); margin: 0 auto; max-width: 34ch; }
.empty-state { padding: 40px var(--space-6); text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.empty-symbol { font-size: 2rem; color: var(--accent); }
.empty-state h3 { font-size: 1.125rem; margin: var(--space-4) 0 var(--space-2); font-weight: 600; }
.empty-state p { color: var(--muted); font-size: var(--text-support); line-height: 1.6; margin: 0 auto; max-width: 52ch; }
.empty-state button { margin-top: var(--space-5); padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font-size: var(--text-support); }
footer { display: flex; justify-content: space-between; align-items: start; gap: var(--space-6); margin-top: var(--space-8); padding: var(--space-6) 0 var(--space-8); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--text-small); }
footer > div { display: flex; flex-direction: column; gap: 5px; }
.footer-brand { color: var(--ink); font-size: var(--text-small); letter-spacing: .05em; font-weight: 700; }
footer p { margin: 0; max-width: 55ch; text-align: right; }
dialog { width: calc(100% - 32px); max-width: 700px; max-height: 90dvh; padding: var(--space-8); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #090b0be6; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.dialog-header .eyebrow { margin: 0; }
.close-button { min-width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: none; font-size: 1.5rem; }
.close-button:hover { background: var(--bg); }
dialog h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.04em; line-height: 1.15; margin: var(--space-6) 0 var(--space-5); }
dialog > p { color: var(--muted); font-size: var(--text-body); line-height: 1.65; }
.method-list > div { border-top: 1px solid var(--line); padding: var(--space-4) 0; }
.method-list dt { font-size: var(--text-body); font-weight: 600; margin-bottom: var(--space-2); }
.method-list dd { color: var(--muted); font-size: var(--text-support); line-height: 1.7; margin: 0; }
.method-caveat { border-left: 2px solid var(--accent); padding-left: var(--space-4); font-size: var(--text-support); margin-bottom: 0; }
@media (max-width: 1200px) {
  .quick-filters { grid-template-columns: 1fr 1fr; }
  .fixture-row { grid-template-columns: minmax(0, 1fr) 88px 104px; gap: var(--space-3); padding: var(--space-4); }
  .desk-grid { gap: var(--space-5); grid-template-columns: minmax(0, 1fr) 330px; }
  .analysis-panel { padding: var(--space-4); }
  .desk-intro { gap: var(--space-5); }
}
@media (max-width: 960px) {
  .desk-grid { grid-template-columns: 1fr; }
  .analysis-panel { position: static; padding: var(--space-5); }
  .back-to-games { display: inline-flex; }
  .fixture-row { grid-template-columns: minmax(0, 1fr) 112px 144px; padding: var(--space-5); gap: var(--space-5); }
  .desk-intro { align-items: flex-start; }
  .desk-title { flex-shrink: 1; }
  .feed-card { max-width: 48%; }
  .feed-top { gap: var(--space-2); }
  .analysis-panel:has(.scoreboard) #match-analysis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--space-8); }
  .analysis-meta, .scoreboard, .quarter-breakdown { grid-column: 1; }
  .projection-block { grid-column: 2; grid-row: 1 / 4; }
  .source-note, .analysis-footnote { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .masthead { min-height: 80px; gap: var(--space-3); }
  .wordmark { gap: var(--space-2); font-size: var(--text-body); }
  .wordmark small { max-width: 17ch; font-size: var(--text-small); letter-spacing: 0; }
  .brand-mark { width: 40px; height: 44px; }
  .header-actions { gap: 0; }
  .local-badge { display: none; }
  .header-actions .text-button { max-width: 94px; font-size: var(--text-support); }
  .header-actions .text-button span { display: none; }
  .desk-intro { display: block; padding: var(--space-5) 0; }
  .desk-title h1 { font-size: 1.5rem; }
  .feed-card { max-width: none; margin-top: var(--space-4); }
  .feed-top .refresh-button { margin-left: auto; }
  .filter-panel { padding: var(--space-4); margin-bottom: var(--space-5); }
  .quick-filters { gap: var(--space-4) var(--space-3); }
  .quick-filters .search-field, .quick-filters .field:has(#pace-filter), .quick-filters .field:has(#sort-order) { grid-column: 1 / -1; }
  .quick-filters .field:has(#status-filter) { grid-column: 1 / -1; }
  .field > label, .direction-field legend { font-size: var(--text-support); }
  .filter-bottom { align-items: flex-start; flex-direction: column; gap: var(--space-4); }
  .comparison-controls { gap: var(--space-3); }
  .direction-field legend { margin-right: var(--space-3); }
  .section-top { gap: var(--space-3); }
  .match-count { font-size: var(--text-small); }
  .fixture-row { grid-template-columns: 1fr 1fr; padding: var(--space-4); gap: var(--space-3); }
  .match-column { grid-column: 1 / -1; }
  .fixture-meta { gap: 6px 10px; }
  .snapshot-age { margin-left: auto; }
  .team-name { font-size: 1.0625rem; }
  .team-score { font-size: 1.75rem; }
  .ppm-column, .estimate-column { align-items: flex-start; padding: var(--space-3) 0 0; border: 0; border-top: 1px solid var(--line); text-align: left; }
  .estimate-column { padding-left: var(--space-4); border-left: 1px solid var(--line); }
  .metric-label { font-size: var(--text-support); }
  .ppm-value, .estimate-value { font-size: 2rem; }
  .row-pace { gap: 8px; font-size: var(--text-support); }
  .analysis-panel { padding: var(--space-4); }
  .analysis-panel:has(.scoreboard) #match-analysis { display: block; }
  .quarter-table { font-size: var(--text-support); }
  .quarter-table thead th { font-size: var(--text-small); }
  .back-to-games { font-size: var(--text-small); }
  .projection-number { font-size: 3rem; }
  footer { flex-direction: column; gap: var(--space-4); margin-top: var(--space-6); }
  footer p { text-align: left; }
  dialog { padding: var(--space-5); }
}
@media (max-width: 359px) {
  .shell { padding: 0 12px; }
  .wordmark { font-size: .875rem; }
  .brand-mark { display: none; }
  .comparison-controls { grid-template-columns: 1fr; }
  .snapshot-age { flex-basis: 100%; margin-left: 0; }
  .fixture-row { padding: var(--space-3); }
  .analysis-panel { padding: var(--space-3); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Keep the live board ahead of optional controls. */
.filter-panel { padding: 0 16px; }
.view-controls > summary { min-height: 56px; padding: 14px 0; cursor: pointer; font-size: 16px; font-weight: 600; }
#view-filter-summary { display: inline; margin-left: 16px; color: var(--muted); font-size: 14px; font-weight: 400; }
.view-controls > form { padding: 4px 0 16px; }
@media(max-width:600px) { #view-filter-summary { display: block; margin: 4px 0 0; font-size: 12px; } .view-controls > summary { padding: 12px 0; } }
