/* Shared presentation for fixtures, match analysis, and model performance. */
:root {
  color-scheme: dark;
  --bg: #090f1c; --bg-raise: #172336; --card-bg: #101b2b;
  --text: #edf3f9; --text-muted: #a3b3c6; --card-border: #2a3b50;
  --home: #a2d969; --draw: #a5afc1; --away: #64b8eb; --warn: #f2c57d;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, monospace;
  --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--home); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button, .button-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid var(--home); border-radius: 7px; background: var(--home); color: #0b1b0e; font-weight: 600; text-decoration: none; gap: 16px; }
button:hover, .button-link:hover { background: #b5e78b; }
:focus-visible { outline: 3px solid #64b8eb; outline-offset: 4px; }
main:focus { outline: none; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 20; padding: 12px 20px; background: var(--card-bg); }
.site-header { background: var(--card-bg); border-bottom: 1px solid var(--card-border); }
.site-header-inner { max-width: 1160px; margin: auto; padding: 0 28px; min-height: 88px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 29px; font-weight: 800; letter-spacing: -1px; text-decoration: none; }
.brand-symbol { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 50%; background: var(--home); color: #fff; font-size: 26px; }
.wordmark-note { border-left: 1px solid var(--card-border); margin-left: 12px; padding-left: 22px; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; color: var(--text-muted); }
nav { display: flex; gap: 24px; }
nav a { min-height: 48px; display: flex; align-items: center; border-bottom: 2px solid transparent; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--text-muted); }
nav a[aria-current] { color: var(--home); border-color: var(--home); }
.app, .match-page { max-width: 1160px; margin: auto; padding: 48px 28px 64px; }
.masthead { padding: 10px 0 36px; }
.eyebrow { color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; margin: 0 0 12px; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { font-size: clamp(30px, 4.4vw, 49px); line-height: 1.15; letter-spacing: -1.8px; margin: 0 0 16px; font-weight: 700; }
h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.5px; }
.subtitle { font-size: 17px; color: var(--text-muted); margin: 0 0 18px; max-width: 660px; }
.intro-note { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-muted); }
.intro-rule { width: 20px; height: 2px; background: var(--home); flex-shrink: 0; }
.fixture-section { border-top: 1px solid var(--card-border); padding-top: 24px; }
.fixtures-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.fixtures-heading h1 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 24px; letter-spacing: -.5px; }
.count-badge { background: #22372a; border-radius: 5px; padding: 3px 8px; font-size: 13px; letter-spacing: 0; }
.timezone-note { font-size: 12px; color: var(--text-muted); }
.filter-bar { display: grid; grid-template-columns: 280px 1fr; gap: 20px; margin-bottom: 24px; }
.control { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
select, input[type="text"] { width: 100%; min-height: 48px; border: 1px solid #43556b; border-radius: 7px; background: var(--card-bg); padding: 10px 14px; color: var(--text); font-size: 16px; }
input::placeholder { color: #a3b3c6; }
.loader { display: flex; align-items: center; gap: 12px; padding: 32px 0; color: var(--text-muted); }
.loader.hidden { display: none; }
.loading-dot { height: 8px; width: 8px; border-radius: 50%; background: var(--home); }
.card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.match-card { position: relative; min-width: 0; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; transition: border-color .15s; }
.match-card:hover { border-color: #638771; }
.match-card:focus-within { outline: 3px solid #64b8eb; outline-offset: 3px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.card-top > div { min-width: 0; }
.card-title { font-size: 19px; line-height: 1.4; letter-spacing: -.35px; margin: 0; }
.match-title-link { color: var(--text); text-decoration: none; }
.match-title-link::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.match-title-link:focus-visible { outline: none; }
.versus { color: var(--text-muted); font-weight: 400; font-size: 13px; padding: 0 3px; }
.card-meta { color: var(--text-muted); font-size: 12px; margin: 7px 0 0; }
.warn-badge { font-size: 10px; font-weight: 700; letter-spacing: .3px; color: var(--warn); background: #302619; border: 1px solid #79603c; border-radius: 4px; padding: 4px 6px; flex-shrink: 0; }
.model-label, .market-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin: 0 0 9px; }
.prob-bar, .large-prob-bar { display: flex; height: 8px; border-radius: 3px; overflow: hidden; background: var(--bg-raise); }
.prob-seg { height: 100%; border-right: 2px solid var(--card-bg); }
.prob-seg:last-child { border-right: 0; }
.prob-seg.home { background: var(--home); }.prob-seg.draw { background: var(--draw); }.prob-seg.away { background: var(--away); }
.outcome-legend { display: grid; grid-template-columns: 1fr .65fr 1fr; gap: 12px; margin-top: 12px; }
.legend-item { min-width: 0; display: grid; grid-template-columns: 8px 1fr; align-content: start; column-gap: 6px; }
.legend-swatch { width: 7px; height: 7px; border-radius: 2px; margin-top: 6px; }
.legend-name { font-size: 11px; line-height: 1.5; }
.legend-value { grid-column: 2; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 4px; }
.market-row { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--card-border); }
.market-missing { color: var(--text-muted); font-size: 12px; }
.compare-bar { height: 5px; }
.compare-legend { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 7px; }
.gap-note { font-size: 12px; margin-top: 9px; }.pos { color: var(--home); }.neg { color: var(--away); }
.metrics-row { display: flex; flex-wrap: wrap; gap: 10px 24px; border-top: 1px solid var(--card-border); padding-top: 14px; margin-top: 16px; }
.metrics-row > div { display: flex; gap: 7px; align-items: baseline; }
.metrics-row span { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; }
.metrics-row b { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card-link { color: var(--home); font-weight: 600; font-size: 12px; margin-top: 18px; display: flex; justify-content: space-between; }
.date-row { font-size: 11px; color: var(--text-muted); margin-top: 10px; }.date-row:empty { display: none; }
.refresh-note { color: var(--text-muted); font-size: 12px; margin: 20px 0 28px; }
.how-to { border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); padding: 0; margin: 28px 0; }
summary { min-height: 52px; padding: 14px 0; font-weight: 600; font-size: 14px; }
.how-to-body { color: var(--text-muted); max-width: 820px; font-size: 14px; padding: 0 0 16px; line-height: 1.75; }
.how-to-body strong { color: var(--text); }.how-to-body li { margin-bottom: 8px; }
.track-record-link { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; border-radius: 10px; background: #142536; }
.track-record-link h2 { margin: 0 0 9px; }.track-record-link p:last-child { margin: 0; font-size: 14px; color: var(--text-muted); }.track-record-link .button-link { flex-shrink: 0; font-size: 13px; }
.site-footer { max-width: 1160px; margin: auto; border-top: 1px solid var(--card-border); padding: 24px 28px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: 12px; }
.error-copy, #data-freshness, .detail-warning { padding: 16px 20px; border: 1px solid #79603c; border-radius: 8px; background: #302619; color: #f2c57d; font-size: 14px; margin: 20px 0; }
.error-copy p { margin-top: 0; }.empty-note, .loading-copy { padding: 32px 0; color: var(--text-muted); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--text-muted); text-decoration: none; }
.match-hero { padding: 28px 0 24px; }
.match-hero h1 { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: clamp(28px, 4vw, 44px); }
.match-hero h1 em { font-size: 16px; font-style: normal; color: var(--text-muted); letter-spacing: 0; }
.match-date { color: var(--text-muted); font-size: 14px; }
.detail-panel { margin-top: 20px; padding: 28px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 24px; }
.section-heading h2, .form-panel h2 { margin: 0; font-size: 22px; }.section-heading > p { color: var(--text-muted); font-size: 12px; margin: 0; }
.large-prob-bar { height: 12px; }.outcome-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.outcome-values span, .model-metrics span { display: block; color: var(--text-muted); font-size: 12px; }.outcome-values b { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.outcome-values div:nth-child(2) { text-align: center; }.outcome-values div:last-child { text-align: right; }
.compare-row { display: grid; grid-template-columns: minmax(0,2fr) repeat(3,minmax(0,1fr)); gap: 12px; padding: 12px 0; font-size: 14px; border-bottom: 1px solid var(--card-border); font-variant-numeric: tabular-nums; }
.compare-head { color: var(--text-muted); font-size: 12px; }.compare-name { font-weight: 600; overflow-wrap: anywhere; }.compare-row > :not(:first-child) { text-align: right; }
.market-empty, .score-note, .form-empty { color: var(--text-muted); font-size: 13px; }.score-note { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.form-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }.form-badge { padding: 5px 11px; border-radius: 4px; color: white; font-size: 13px; font-weight: 600; }
.form-badge.w { background: #365e29; }.form-badge.d { background: #606976; }.form-badge.l { background: #8e4540; }
.form-panel > p:last-child { color: var(--text-muted); font-size: 12px; }
.model-metrics { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 20px; }.model-metrics b { display: block; font-size: 27px; font-weight: 600; font-variant-numeric: tabular-nums; }.model-metrics i { font-style: normal; color: var(--text-muted); }
.likely-scores > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }.score-pick { border: 1px solid var(--card-border); background: var(--bg); border-radius: 6px; padding: 8px 14px; }.score-pick b { font-size: 20px; }
.score-axis { display: flex; justify-content: space-between; gap: 16px; color: var(--text-muted); font-size: 12px; margin-bottom: 12px; }
.score-grid { width: 100%; table-layout: fixed; border-spacing: 4px; font-variant-numeric: tabular-nums; }.score-grid th { font-size: 12px; font-weight: 600; }.score-grid td { text-align: center; background: color-mix(in srgb, #376340 calc(var(--heat) * 85%), #152234); color: #edf3f9; border-radius: 4px; padding: 16px 2px; font-size: 13px; }
.performance-page .masthead .control { max-width: 320px; margin-top: 24px; }
.stats-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); margin: 24px 0; }
.stat { padding: 24px; display: flex; flex-direction: column; gap: 8px; }.stat + .stat { border-left: 1px solid var(--card-border); }.stat-value { font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }.stat-label { color: var(--text-muted); font-size: 12px; }
#performance-message, #performance-range, #performance-content > p { color: var(--text-muted); font-size: 14px; }
.performance-table { width: 100%; border-collapse: collapse; background: var(--card-bg); font-variant-numeric: tabular-nums; font-size: 14px; margin: 24px 0; }.performance-table th, .performance-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--card-border); }.performance-table th { background: #142536; color: var(--text); font-size: 12px; }
@media (max-width: 800px) { .wordmark-note { display: none; }.card-list { grid-template-columns: 1fr; }.track-record-link { align-items: flex-start; flex-direction: column; }.stats-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }.stat:nth-child(3) { border-left: 0; }.stat:nth-child(n+3) { border-top: 1px solid var(--card-border); } }
@media (max-width: 540px) {
 .site-header-inner { padding: 0 18px; min-height: 74px; gap: 16px; }.wordmark { font-size: 25px; }.brand-symbol { width: 30px; height: 30px; font-size: 22px; }nav { gap: 16px; }nav a { font-size: 12px; }
 .app, .match-page { padding: 32px 18px 40px; }h1 { letter-spacing: -1px; }.masthead { padding-bottom: 26px; }.subtitle { font-size: 15px; }.intro-note { align-items: baseline; }
 .fixtures-heading { align-items: start; flex-direction: column; gap: 7px; }.filter-bar { grid-template-columns: 1fr; gap: 14px; }.match-card { padding: 20px; }.card-top { flex-wrap: wrap; gap: 8px; }.card-title { font-size: 18px; }.legend-value { font-size: 19px; }
 .detail-panel { padding: 20px 16px; }.section-heading { flex-direction: column; gap: 8px; }.detail-grid { grid-template-columns: 1fr; gap: 0; }.model-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }.likely-scores { grid-column: 1/-1; }.outcome-values { gap: 8px; }.outcome-values b { font-size: 25px; }.outcome-values span { font-size: 11px; }
 .compare-row { gap: 6px; font-size: 12px; }.compare-head { font-size: 10px; }.score-grid { border-spacing: 2px; }.score-grid td { padding: 10px 0; font-size: 10px; }.score-grid th { font-size: 11px; }.score-axis { font-size: 11px; }
 .stat { padding: 18px; }.stat-value { font-size: 28px; }.performance-table { font-size: 12px; table-layout: fixed; }.performance-table td, .performance-table th { padding: 10px 5px; overflow-wrap: anywhere; }.performance-table th { font-size: 11px; }.site-footer { padding: 24px 18px; }.track-record-link { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .match-card, .detail-panel, .prob-seg, .form-badge { border: 1px solid CanvasText; }.match-card:focus-within { outline-color: Highlight; } }

/* Identity and motion: lightweight CSS only, no animation dependencies. */
.brand-logo { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
.wordmark { letter-spacing: -1.2px; }
.site-header { background: #0c1422; }
nav a { transition: color .18s ease, border-color .18s ease; }
nav a:hover { color: var(--text); }
.masthead { position: relative; padding: 26px 0 42px; }
.masthead .eyebrow { color: var(--home); font-family: var(--font-mono); font-size: 10px; }
.masthead h1 { max-width: 780px; font-weight: 800; letter-spacing: -2px; }
.app:not(.performance-page) .masthead h1 { font-size: clamp(36px, 5.6vw, 64px); }
.intro-rule { background: var(--away); width: 28px; }
.match-card { box-shadow: 0 5px 18px #00000016; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.match-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px #00000030; }
.card-link { border-top: 1px solid var(--card-border); padding-top: 16px; }
.legend-value, .stat-value, .outcome-values b { font-family: var(--font-mono); letter-spacing: -1px; }
.prob-bar { height: 10px; }
.compare-bar { height: 5px; }
.track-record-link { border: 1px solid var(--card-border); border-left: 3px solid var(--home); }
select:hover, input[type="text"]:hover { border-color: #7890aa; }
button, .button-link { transition: background .18s ease, transform .18s ease; }
button:active, .button-link:active { transform: translateY(1px); }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 50% { opacity: .35; } }
.masthead, .match-hero { animation: arrive .4s ease-out both; }
.loading-dot { animation: breathe 1.4s ease-in-out infinite; }
/* Animate only the initial fixture load, not recurring refreshes. */
.card-list { animation: arrive .35s ease-out; }
@media (max-width: 540px) {
 .brand-logo { width: 42px; height: 42px; }
 .wordmark { gap: 7px; font-size: 23px; }
 .site-header-inner { gap: 10px; } nav { gap: 12px; }
 .masthead { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { animation: none !important; transition: none !important; }
 .match-card:hover, button:active, .button-link:active { transform: none; }
}

/* Keep the first view focused; deeper analysis lives on the match page. */
.match-takeaway { font-size: 14px; color: var(--text-muted); margin: 0 0 20px; }
.match-takeaway strong { color: var(--text); font-weight: 600; }
.draw-help { font-weight: 400; }
.match-details { margin-top: 24px; border-top: 1px solid var(--card-border); }
.match-details > summary { color: var(--home); padding: 18px 0; }

.simple-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }

/* Compact dashboard and a decorative pitch, animated only with transforms. */
body { isolation: isolate; }
.pitch-backdrop { position: fixed; z-index: -1; pointer-events: none; inset: 100px -80px auto auto;
 width: min(900px, 110vw); height: 620px; opacity: .28; overflow: hidden;
 border: 1px solid #64b8eb; border-radius: 3px;
 background: linear-gradient(90deg, transparent calc(50% - .5px), #64b8eb 50%, transparent calc(50% + .5px)); }
.pitch-backdrop::before { content: ''; position: absolute; width: 180px; height: 180px;
 border: 1px solid #64b8eb; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.pitch-backdrop::after { content: ''; position: absolute; inset: 25% 0; border: 1px solid #64b8eb; border-left: 0; border-right: 0; }
.pitch-backdrop span { position: absolute; left: -34%; top: 22%; width: 34%; height: 2px;
 background: linear-gradient(90deg, transparent, #64b8eb);
 animation: pitch-run 16s linear infinite; }
.pitch-backdrop span::after { content: ''; position: absolute; right: 0; top: -4px;
 width: 10px; height: 10px; border-radius: 50%; background: #9edbff;
 box-shadow: 0 0 16px 3px #64b8eb80; }
.pitch-backdrop span:nth-child(2) { top: 52%; animation-delay: -6s; animation-duration: 20s;
 background: linear-gradient(90deg, transparent, #a2d969); }
.pitch-backdrop span:nth-child(2)::after { background: #a2d969; box-shadow: 0 0 16px 3px #a2d96980; }
.pitch-backdrop span:nth-child(3) { top: 82%; animation-delay: -12s; animation-duration: 18s; }
@keyframes pitch-run { from { transform: translateX(0); } to { transform: translateX(400%); } }
body.motion-paused .pitch-backdrop span { animation-play-state: paused; }
.app { padding-top: 28px; }
.fixture-section { border-top: 0; padding-top: 0; }
.performance-page .masthead { padding: 0 0 12px; }
.performance-page .masthead h1 { font-size: 26px; letter-spacing: -.5px; }
.match-hero h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.7px; }
@media (prefers-reduced-motion: reduce) { .pitch-backdrop span { animation: none; } }
@media (forced-colors: active) { .pitch-backdrop { display: none; } }
