:root {
  --bg: #08111F;
  --panel: #0E1B2D;
  --panel-elevated: #13243A;
  --panel-glass: rgba(10, 29, 43, .82);
  --border: #203650;
  --border-soft: rgba(111, 190, 202, .15);
  --cyan: #48E1DB;
  --cyan-deep: #18A8B8;
  --cyan-soft: rgba(72, 225, 219, .13);
  --cyan-wash: rgba(72, 225, 219, .06);
  --green: #45D483;
  --amber: #F3B94C;
  --red: #F16B7A;
  --home: #64B9E8;
  --draw: #C2A8E9;
  --away: #F39A75;
  --text-primary: #EAF3F8;
  --text-secondary: #A4BBC9;
  --text-tertiary: #718B9E;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2.25rem;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-panel: 0 24px 70px rgba(0, 0, 0, .28);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sidebar-width: 220px;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  min-width: 320px; min-height: 100vh; margin: 0; color: var(--text-primary);
  background: radial-gradient(ellipse 78% 58% at 78% -10%, rgba(20, 119, 145, .25), transparent 67%),
              radial-gradient(ellipse 48% 52% at 102% 76%, rgba(20, 94, 117, .13), transparent 70%), var(--bg);
  font: 15px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px;
}
::selection { background: rgba(72, 225, 219, .25); color: white; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--text-tertiary); }
.eyebrow { margin: 0; color: var(--cyan); font: 700 .67rem/1.35 var(--font-mono); letter-spacing: .15em; text-transform: uppercase; }

.operational-alert-banner { position: relative; z-index: 10; padding: .65rem 1rem; text-align: center; font-size: .82rem; font-weight: 650; }
.operational-alert-banner.hidden { display: none; }
.operational-alert-banner.severity-warning { border-bottom: 1px solid rgba(243, 185, 76, .35); background: rgba(93, 66, 17, .5); color: #ffd783; }
.operational-alert-banner.severity-critical { border-bottom: 1px solid rgba(241, 107, 122, .4); background: rgba(91, 28, 39, .65); color: #ffabb4; }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; display: flex; height: 100vh; min-height: 650px; flex-direction: column;
  padding: 2rem 1rem 1.35rem; border-right: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(7, 25, 37, .98), rgba(7, 20, 32, .96));
}
.brand-lockup { display: flex; flex-direction: column; align-items: flex-start; padding: .35rem .8rem 2.3rem; }
.brand-kicker { color: var(--text-tertiary); font: 700 .58rem/1.4 var(--font-mono); letter-spacing: .16em; }
.brand-name { margin: .8rem 0 1rem; color: #f1fbfd; font-size: 2.05rem; font-weight: 720; letter-spacing: -.075em; line-height: .91; }
.brand-period { color: var(--cyan); }
.badge { display: inline-flex; align-items: center; gap: .35rem; width: fit-content; padding: .22rem .55rem; border: 1px solid transparent; border-radius: var(--radius-pill); font: 700 .63rem/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.badge-readonly { border-color: rgba(143, 177, 190, .2); background: rgba(143, 177, 190, .07); color: var(--text-secondary); }
.badge-ok { border-color: rgba(69, 212, 131, .3); background: rgba(69, 212, 131, .1); color: var(--green); }
.badge-degraded, .badge-stale { border-color: rgba(243, 185, 76, .32); background: rgba(243, 185, 76, .1); color: var(--amber); }
.badge-down { border-color: rgba(241, 107, 122, .3); background: rgba(241, 107, 122, .1); color: var(--red); }
.badge-unknown, .badge-disabled { border-color: var(--border); background: rgba(113, 139, 158, .09); color: var(--text-tertiary); }
.badge-accent { border-color: rgba(72, 225, 219, .27); background: var(--cyan-soft); color: var(--cyan); }

.tabs { display: flex; flex-direction: column; gap: .28rem; }
.tab-button {
  position: relative; display: grid; grid-template-columns: 2.2rem 1fr; align-items: center; width: 100%; min-height: 49px;
  padding: .65rem .8rem; border: 1px solid transparent; border-radius: 10px; background: transparent;
  color: #91a9b8; text-align: left; cursor: pointer; transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.tab-button > span:first-child { color: #527083; font: 600 .65rem/1 var(--font-mono); }
.tab-button > span:last-child { font-size: .88rem; font-weight: 580; letter-spacing: .005em; }
.tab-button:hover { border-color: rgba(72, 225, 219, .11); background: rgba(72, 225, 219, .045); color: #e4fbfb; }
.tab-button.active { border-color: rgba(72, 225, 219, .17); background: linear-gradient(100deg, rgba(35, 167, 177, .16), rgba(16, 69, 88, .1)); color: #efffff; }
.tab-button.active::before { position: absolute; left: -1px; top: 10px; bottom: 10px; width: 2px; border-radius: 4px; background: var(--cyan); content: ""; box-shadow: 0 0 15px rgba(72, 225, 219, .7); }
.tab-button.active > span:first-child { color: var(--cyan); }
.sidebar-foot { display: flex; align-items: center; gap: .75rem; margin: auto .8rem .15rem; color: #617d8d; font: 600 .63rem/1.6 var(--font-mono); letter-spacing: .04em; }
.sidebar-foot-rule { width: 25px; height: 1px; background: var(--cyan-deep); }

.main-column { min-width: 0; }
.status-header { position: sticky; top: 0; z-index: 8; min-height: 64px; padding: .75rem clamp(1.25rem, 3vw, 3.4rem); border-bottom: 1px solid var(--border-soft); background: rgba(7, 19, 30, .87); backdrop-filter: blur(16px); }
.status-header-row { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 1rem; }
.status-location { display: flex; align-items: center; gap: .55rem; color: #7893a2; font: 700 .62rem/1 var(--font-mono); letter-spacing: .12em; }
.status-location-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(72, 225, 219, .7); }
.status-summary { display: inline-flex; min-width: 0; align-items: center; gap: .5rem; color: var(--text-secondary); font-size: .74rem; }
.status-summary-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--text-tertiary); }
.status-summary-dot.is-ok { background: var(--green); }
.status-summary-dot.is-degraded { background: var(--amber); }
.status-summary-dot.is-down { background: var(--red); }
.system-status-disclosure { position: relative; }
.system-status-disclosure > summary { color: var(--text-tertiary); font: 600 .65rem/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.system-status-disclosure > summary:hover { color: var(--cyan); }
.system-status-disclosure[open] { z-index: 10; }
.system-status-disclosure[open] .status-line { position: absolute; top: 2rem; right: 0; width: min(680px, calc(100vw - 2rem)); max-height: 70vh; overflow: auto; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: #0a1a27; box-shadow: var(--shadow-panel); }
.status-line { display: flex; flex-wrap: wrap; gap: .65rem 1.1rem; color: var(--text-secondary); font-size: .72rem; }
.status-line .item { white-space: nowrap; }

main { width: min(100%, 1660px); margin: 0 auto; padding: 1.4rem clamp(1.25rem, 3vw, 3.4rem) 4rem; }
.tab-panel { min-width: 0; }
.content-area { max-width: 1480px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: .2rem 0 1.55rem; padding: .75rem 0 1.25rem; border-bottom: 1px solid var(--border-soft); }
.page-heading-copy { max-width: 70ch; }
.page-heading h1 { margin: .46rem 0 .5rem; color: #f0fbfc; font-size: clamp(2.3rem, 4.8vw, 4.1rem); font-weight: 690; letter-spacing: -.075em; line-height: .98; }
.page-heading p:not(.eyebrow) { max-width: 62ch; margin: 0; color: var(--text-secondary); font-size: .9rem; }
.heading-index { display: flex; align-items: baseline; gap: .65rem; padding-bottom: .25rem; color: var(--text-tertiary); font: 600 .68rem/1 var(--font-mono); text-transform: uppercase; }
.heading-index span:first-child { color: var(--cyan); font-size: .82rem; }
.readonly-mark { margin-bottom: .35rem; padding: .45rem .65rem; border: 1px solid var(--border-soft); border-radius: var(--radius-pill); color: #88a6b4; font: 650 .61rem/1 var(--font-mono); letter-spacing: .07em; white-space: nowrap; }

/* Quiet, usable filters: controls remain real buttons and retain their API semantics. */
.match-toolbar, .filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.match-toolbar { margin: 0 0 .8rem; }
.match-chip-row { display: flex; max-width: 100%; align-items: center; gap: .32rem; overflow-x: auto; padding: .18rem 0; }
.match-chip, .filter-button { min-height: 34px; padding: .42rem .68rem; border: 1px solid rgba(99, 143, 163, .2); border-radius: var(--radius-pill); background: rgba(13, 34, 48, .55); color: #9cb3bf; font-size: .71rem; white-space: nowrap; cursor: pointer; transition: .15s ease; }
.match-chip:hover, .filter-button:hover { border-color: rgba(72, 225, 219, .35); color: #e7ffff; }
.match-chip.is-selected, .filter-button-active { border-color: rgba(72, 225, 219, .53); background: rgba(72, 225, 219, .13); color: var(--cyan); }
.filter-input, .filter-select, input[type="search"], select { min-height: 36px; padding: .45rem .68rem; border: 1px solid rgba(99, 143, 163, .24); border-radius: 8px; background: #0b1c2a; color: var(--text-primary); font-size: .75rem; }
.filter-input::placeholder, input[type="search"]::placeholder { color: #667f8d; }
.match-filters { position: relative; color: var(--text-secondary); font-size: .73rem; }
.match-filters summary { padding: .42rem .65rem; border: 1px solid rgba(99, 143, 163, .2); border-radius: var(--radius-pill); cursor: pointer; }
.match-filter-options { position: absolute; z-index: 4; top: calc(100% + .45rem); left: 0; display: grid; min-width: 205px; gap: .6rem; padding: .85rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: #0b1b29; box-shadow: var(--shadow-panel); }
.filter-toggle { display: inline-flex; align-items: center; gap: .45rem; color: var(--text-secondary); font-size: .7rem; }
.filter-toggle input { accent-color: var(--cyan); }
.competition-visual { display: inline-flex; align-items: center; gap: .42rem; color: #a8c1cd; }
.competition-flag { color: var(--cyan); }

/* Matches: one editorial lead fixture followed by a compact reading rail. */
.featured-match { position: relative; overflow: hidden; margin: 1.15rem 0 2.7rem; padding: clamp(1.1rem, 2.7vw, 2rem) clamp(1rem, 4.6vw, 4rem) 1.35rem; border: 1px solid rgba(72, 225, 219, .19); border-radius: 24px; background: radial-gradient(ellipse at 49% 42%, rgba(28, 117, 137, .2), transparent 45%), linear-gradient(135deg, rgba(16, 48, 63, .92), rgba(9, 27, 41, .96) 58%, rgba(8, 31, 43, .94)); box-shadow: var(--shadow-panel); }
.featured-match::before, .featured-match::after { position: absolute; z-index: 0; pointer-events: none; content: ""; }
.featured-match::before { inset: 14% 34%; border: 1px solid rgba(82, 205, 205, .075); border-radius: 50%; }
.featured-match::after { top: 0; bottom: 0; left: 50%; width: 1px; background: linear-gradient(transparent, rgba(82, 205, 205, .12), transparent); }
.featured-match > * { position: relative; z-index: 1; }
.featured-match-topline { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.featured-match-context { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; color: #b5cbd4; font: 600 .69rem/1.4 var(--font-mono); }
.featured-match-context .eyebrow { font-size: .64rem; }
.context-divider { color: #597688; }
.featured-kickoff { color: #a8bdc7; }
.fixture-status { display: inline-flex; align-items: center; gap: .4rem; color: #a1b7c1; font: 650 .63rem/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.fixture-status.is-live { color: #a8f2d0; }
.featured-match-stage { display: grid; grid-template-columns: minmax(0, 1fr) 130px minmax(0, 1fr); align-items: center; gap: .8rem; min-height: 300px; padding: 1.35rem 0 1.6rem; }
.featured-team { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: .68rem; text-align: center; }
.featured-team strong { max-width: 100%; color: #eff9fa; font-size: clamp(1.2rem, 2.5vw, 2rem); font-weight: 640; letter-spacing: -.045em; line-height: 1.15; overflow-wrap: anywhere; }
.featured-side-label { color: #678595; font: 650 .58rem/1 var(--font-mono); letter-spacing: .18em; }
.team-visual { display: inline-grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; object-fit: contain; border: 1px solid rgba(125, 194, 202, .2); border-radius: 50%; background: rgba(10, 34, 49, .7); color: var(--cyan); font: 700 .7rem var(--font-mono); }
.team-visual-hero { width: clamp(76px, 10vw, 116px); height: clamp(76px, 10vw, 116px); flex: 0 0 auto; padding: .6rem; border-color: rgba(94, 218, 216, .28); background: radial-gradient(circle, rgba(24, 102, 120, .28), rgba(7, 27, 40, .5)); box-shadow: 0 15px 35px rgba(0,0,0,.22); font-size: 1.05rem; }
.team-visual-fallback, .team-visual-flag { display: inline-grid; place-items: center; }
.team-visual-flag { font-size: 1.2rem; }
.featured-versus { display: flex; flex-direction: column; align-items: center; gap: .35rem; color: #68d5d4; font: 700 .79rem/1 var(--font-mono); letter-spacing: .2em; }
.featured-versus::before, .featured-versus::after { width: 1px; height: 28px; background: linear-gradient(transparent, rgba(72, 225, 219, .35)); content: ""; }
.featured-versus::after { transform: rotate(180deg); }
.featured-versus.has-score { gap: .5rem; color: #f1fbfc; letter-spacing: -.04em; }
.featured-live-score { font: 650 clamp(1.5rem, 3vw, 2.4rem)/1 var(--font-mono); white-space: nowrap; }
.featured-versus small { color: var(--cyan); font: 650 .7rem/1 var(--font-mono); letter-spacing: .03em; }
.featured-match-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid rgba(128, 187, 197, .14); }
.feature-evidence { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; }
.feature-evidence-item { display: grid; gap: .22rem; min-width: 130px; }
.evidence-label { color: #708b9a; font: 650 .58rem/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.feature-evidence-item strong { color: #dfedef; font-size: .76rem; font-weight: 590; }
.evidence-model strong { color: var(--home); }
.evidence-ai strong { color: #c4aae8; }
.evidence-market strong { color: #a9e5c7; }
.feature-unavailable { max-width: 520px; }
.feature-unavailable p { margin: .35rem 0 0; color: #a0b7c2; font-size: .78rem; }
.match-detail-action { min-height: 36px; padding: .5rem .8rem; border: 1px solid rgba(72, 225, 219, .36); border-radius: 7px; background: rgba(72, 225, 219, .08); color: #bdf9f5; font-size: .7rem; font-weight: 650; cursor: pointer; white-space: nowrap; }
.match-detail-action:hover { border-color: var(--cyan); background: rgba(72, 225, 219, .15); }
.match-detail-unavailable { color: #748e9a; font-size: .68rem; }
.match-rail-section { margin-top: 2rem; }
.section-heading-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
.section-heading-line h2 { margin: .25rem 0 0; color: #dfecef; font-size: 1.25rem; font-weight: 610; letter-spacing: -.03em; }
.section-heading-line > .muted { font: 600 .63rem/1.4 var(--font-mono); }
.editorial-match-rail { border-top: 1px solid var(--border-soft); }
.editorial-match { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: .85rem; min-height: 82px; padding: .9rem .35rem; border-bottom: 1px solid rgba(119, 165, 181, .11); }
.editorial-match-index { color: #527285; font: 650 .65rem/1 var(--font-mono); }
.editorial-match-main { min-width: 0; }
.editorial-match-meta { display: flex; flex-wrap: wrap; gap: .45rem .8rem; color: #829ba9; font-size: .66rem; }
.editorial-competition { color: #9db9c5; font-weight: 600; }
.editorial-time { color: #708b9a; font-family: var(--font-mono); }
.editorial-teams { display: flex; align-items: center; gap: .55rem; margin-top: .25rem; }
.editorial-teams strong { overflow: hidden; color: #e1edf0; font-size: .84rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.team-visual-sm { width: 22px; height: 22px; flex: 0 0 22px; object-fit: contain; border: 1px solid rgba(125, 194, 202, .16); border-radius: 50%; background: rgba(9, 31, 44, .7); font: 600 .47rem var(--font-mono); }
.editorial-score { padding: 0 .4rem; color: #7c9baa; font: 600 .68rem/1 var(--font-mono); white-space: nowrap; }
.matches-empty, .live-empty { margin: 2rem 0; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(17, 48, 62, .5), rgba(9, 25, 38, .72)); }
.matches-empty h2, .live-empty h2 { margin: .55rem 0 .35rem; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 600; letter-spacing: -.045em; }
.matches-empty p, .live-empty p { max-width: 58ch; margin: .4rem 0 0; font-size: .83rem; }

/* Live: clear score first, with only source-provided minute and freshness. */
.page-heading-live { border-bottom-color: rgba(72, 225, 219, .24); }
.page-heading-live h1 { color: #dffff8; }
.live-scoreboard { margin-top: 1.35rem; border-top: 1px solid rgba(72, 225, 219, .2); }
.live-score-row { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(350px, 1.8fr) minmax(145px, .7fr) auto; align-items: center; gap: 1.25rem; min-height: 132px; padding: 1rem .65rem; border-bottom: 1px solid rgba(112, 166, 182, .14); background: linear-gradient(90deg, rgba(9, 37, 49, .28), transparent 72%); }
.live-score-context { display: grid; gap: .65rem; color: #adc3cb; font-size: .75rem; }
.live-state { display: inline-flex; align-items: center; gap: .45rem; width: fit-content; color: #a0d9c1; font: 650 .62rem/1.4 var(--font-mono); text-transform: uppercase; }
.live-state.is-stale { color: var(--amber); }
.live-state-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #62dfad; box-shadow: 0 0 10px rgba(98, 223, 173, .5); }
.live-state.is-stale .live-state-dot { background: var(--amber); box-shadow: none; }
.live-score-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; }
.live-side { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.live-side strong { overflow-wrap: anywhere; color: #eaf5f6; font-size: .91rem; font-weight: 620; }
.live-side.is-away { justify-content: flex-end; text-align: right; }
.live-score-value { min-width: 120px; color: white; font: 650 1.6rem/1 var(--font-mono); letter-spacing: -.07em; text-align: center; white-space: nowrap; }
.live-score-value.is-unavailable { color: #708994; font-size: .68rem; letter-spacing: 0; }
.live-score-meta { display: grid; justify-items: end; gap: .28rem; color: #78929f; font: 550 .62rem/1.45 var(--font-mono); text-align: right; }
.live-minute { color: var(--cyan); font-size: .83rem; font-weight: 700; }
.live-empty.is-degraded { border-color: rgba(243, 185, 76, .24); }

/* Markets: a dense information board, not a collection of fixture cards. */
.markets-toolbar { padding: .75rem 0; border-bottom: 1px solid var(--border-soft); }
.markets-toolbar .match-chip-row { flex: 1 1 auto; }
.markets-board { margin-top: .9rem; border: 1px solid rgba(101, 154, 171, .18); border-radius: var(--radius-md); background: rgba(9, 25, 38, .72); }
.markets-table-wrap { max-width: 100%; overflow: auto; }
.markets-table { width: 100%; min-width: 1120px; border-collapse: separate; border-spacing: 0; }
.markets-table th { position: sticky; top: 0; z-index: 1; padding: .74rem .78rem; border-bottom: 1px solid rgba(105, 164, 181, .17); background: #102435; color: #849eac; font: 650 .59rem/1.3 var(--font-mono); letter-spacing: .1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.markets-table td { padding: .75rem .78rem; border-bottom: 1px solid rgba(105, 164, 181, .09); color: #d9e6e9; font-size: .72rem; vertical-align: middle; }
.markets-row:hover td { background: rgba(72, 225, 219, .035); }
.markets-fixture-cell { min-width: 205px; }
.markets-detail-action { min-height: 24px; margin-top: .25rem; padding: .24rem .42rem; border-radius: 5px; font-size: .56rem; }
.markets-fixture-teams { display: flex; align-items: center; gap: .18rem; color: #eaf3f5; font-weight: 600; }
.markets-cell-prices { color: #dce9eb; font: 600 .66rem/1.5 var(--font-mono); white-space: nowrap; }
.markets-cell-status { display: block; margin-top: .18rem; color: #79919d; font: 550 .58rem/1.4 var(--font-mono); }
.markets-cell.is-current .markets-cell-status { color: #6bc79c; }
.markets-cell.is-stale .markets-cell-status, .markets-cell.is-incomplete .markets-cell-status { color: var(--amber); }
.markets-cell.is-unavailable .markets-cell-status { color: #738996; font-style: normal; }
.markets-cell.is-model { background: rgba(72, 225, 219, .045); }
.markets-model-pick { display: block; font-weight: 700; }
.markets-model-prob { color: #afc4cb; font: 600 .64rem/1.6 var(--font-mono); }
.markets-coverage-primary { color: #c9dedf; font-size: .69rem; font-weight: 600; }
.markets-coverage-detail { display: block; margin-top: .15rem; color: #718a98; font: 550 .56rem/1.4 var(--font-mono); }
.markets-provenance-note { margin: .85rem 0; color: #718995; font-size: .68rem; line-height: 1.6; }
.markets-toolbar .filter-toggle { padding-inline: .35rem; }

/* Model results remain tied to the leaderboard's real integrity metadata. */
.model-filters { margin: .7rem 0 1.1rem; }
.model-list { border-top: 1px solid rgba(105, 164, 181, .18); }
.model-row { padding: 1.05rem .8rem 1.15rem; border-bottom: 1px solid rgba(105, 164, 181, .13); background: linear-gradient(100deg, rgba(14, 39, 53, .46), transparent 75%); }
.model-row-heading { display: grid; grid-template-columns: 42px minmax(170px, 1fr) minmax(145px, auto) auto; align-items: center; gap: .85rem; }
.model-rank { color: var(--cyan); font: 650 .7rem/1 var(--font-mono); }
.model-name-block { display: grid; gap: .22rem; }
.model-name { color: #eaf6f7; font-size: 1rem; font-weight: 640; letter-spacing: -.025em; }
.model-type { color: #7893a1; font: 600 .62rem/1.3 var(--font-mono); }
.model-bankroll-label { color: #829aa7; font-size: .66rem; text-align: right; }
.model-bankroll { color: #e7f6f5; font: 650 1.05rem/1 var(--font-mono); white-space: nowrap; }
.model-integrity { display: flex; align-items: center; gap: .65rem; margin: .75rem 0 .35rem 52px; }
.integrity-value { color: #a6bac2; font: 600 .63rem/1.4 var(--font-mono); }
.integrity-value.has-status { color: var(--amber); }
.integrity-value.is-unknown { color: #718995; }
.model-metrics { display: flex; flex-wrap: wrap; gap: .42rem; margin-left: 52px; }
.model-metrics > span { padding: .34rem .52rem; border: 1px solid rgba(100, 147, 164, .15); border-radius: 5px; color: #9bb0b9; font: 550 .62rem/1.3 var(--font-mono); }
.model-recent-form { display: flex; flex-wrap: wrap; gap: .4rem .75rem; margin: .68rem 0 .35rem 52px; color: #8099a5; font-size: .68rem; }
.metric-subtle { color: #758c98 !important; }
.scoring-details, .technical-details { margin-top: .8rem; color: #91a8b1; font-size: .7rem; }
.scoring-details summary, .technical-details summary { color: #82a7b1; cursor: pointer; }
.leaderboard-positions { margin-left: 52px; padding-top: .55rem; border-top: 1px solid rgba(100, 147, 164, .12); }
.leaderboard-positions-heading { margin-bottom: .4rem; color: #7f99a5; font: 600 .6rem var(--font-mono); text-transform: uppercase; }
.leaderboard-position { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(125px, 1fr) repeat(3, auto); gap: .65rem; padding: .45rem 0; border-bottom: 1px solid rgba(100, 147, 164, .1); color: #a7b9c0; font-size: .65rem; }
.leaderboard-position-match { color: #dae8ea; }
.leaderboard-position-id { color: #67808e; }
.link-button { border: 0; background: none; color: var(--cyan); font-size: .68rem; cursor: pointer; }

/* Early-exit simulation (Models tab), 2026-10-13 -- read-only measurement
   section, never a live rule; reuses .model-row's card look and
   .leaderboard-position's row-grid pattern rather than a new style. */
.early-exit-simulation { margin-top: 2.2rem; }
.early-exit-model-card .model-row-heading { display: block; margin-bottom: .55rem; }
.early-exit-threshold-table { display: grid; gap: .15rem; }
.early-exit-threshold-row { display: grid; grid-template-columns: minmax(110px, 1fr) 46px repeat(3, minmax(90px, auto)); gap: .65rem; align-items: center; padding: .45rem .2rem; border-bottom: 1px solid rgba(100, 147, 164, .1); color: #a7b9c0; font-size: .68rem; }
.early-exit-threshold-row:last-child { border-bottom: none; }
.early-exit-threshold-header { color: #7f99a5; font: 600 .6rem var(--font-mono); text-transform: uppercase; border-bottom: 1px solid rgba(105, 164, 181, .18); }

/* Research: audit evidence in compact, explicitly separated workspaces. */
.research-evidence-card { margin: .8rem 0; padding: 1.05rem 1.1rem; border: 1px solid rgba(105, 164, 181, .16); border-radius: var(--radius-md); background: linear-gradient(115deg, rgba(13, 37, 51, .74), rgba(8, 26, 38, .62)); }
.research-card-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; }
.research-card-heading h2 { margin: 0; color: #e2f0f2; font-size: .95rem; font-weight: 630; }
.research-card-heading .eyebrow { color: var(--cyan); }
.research-card-heading .badge { margin-left: auto; }
.research-evidence-card > .muted { margin: .55rem 0; font-size: .69rem; line-height: 1.6; }
.research-counts { display: flex; flex-wrap: wrap; gap: .38rem; }
.research-count { display: grid; min-width: 112px; gap: .25rem; padding: .5rem .62rem; border: 1px solid rgba(99, 150, 168, .13); border-radius: 6px; background: rgba(4, 20, 30, .35); }
.research-count strong { color: #ddf1f1; font: 650 .79rem/1.2 var(--font-mono); }
.research-count span { color: #7994a0; font: 550 .57rem/1.35 var(--font-mono); text-transform: capitalize; }
.research-version-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .45rem; margin-top: .6rem; }
.research-version { display: grid; gap: .3rem; min-width: 0; padding: .62rem .7rem; border: 1px solid rgba(99, 150, 168, .13); border-radius: 6px; background: rgba(4, 20, 30, .35); color: #c9dfe2; font-size: .68rem; }
.research-version > strong { overflow-wrap: anywhere; color: #ddf1f1; }
.hash-details { overflow-wrap: anywhere; font: 500 .58rem/1.5 var(--font-mono); }
.research-isolation-note { margin-top: .55rem; padding-left: .65rem; border-left: 2px solid var(--cyan); color: #9bb2ba; font-size: .66rem; line-height: 1.55; }
.research-generated-at { margin: .8rem 0; font: 550 .59rem/1.4 var(--font-mono); }

/* Match Detail: a genuinely different layout from the rest of the
   dashboard's cyan ocean-terminal theme, not just a different accent
   color (2026-10 redesign, round 2 -- direct Amir feedback on round 1:
   "you only changed the color, actually design a beautiful match
   detail". Desktop is the stated priority). Warm graphite + gold/rust,
   a serif display face for team names/headlines paired with a distinct
   mono for data, and a persistent left-hand "dossier" tab rail instead
   of a horizontal pill bar -- scoped entirely under
   #detail-overlay/.detail-panel so no other tab in the dashboard is
   touched. */
#detail-overlay {
  --mx-bg: #0E0C09;
  --mx-panel: #1A160F;
  --mx-panel-raised: #231D14;
  --mx-border: rgba(214, 165, 84, .22);
  --mx-border-soft: rgba(214, 165, 84, .14);
  --mx-gold: #D6A554;
  --mx-gold-rgb: 214, 165, 84;
  --mx-rust: #DD8356;
  --mx-rust-rgb: 221, 131, 86;
  --mx-green-rgb: 107, 196, 139;
  --mx-home: #7FB0DB;
  --mx-draw: #B9A0DE;
  --mx-away: #E0A268;
  --mx-text-primary: #F3ECE0;
  --mx-text-secondary: #BDB09B;
  --mx-text-tertiary: #8A7D68;
  --mx-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --mx-font-mono: "JetBrains Mono", var(--font-mono);
}
.detail-overlay { position: fixed; inset: 0; z-index: 30; display: flex; justify-content: flex-end; background: rgba(8, 6, 4, .82); backdrop-filter: blur(12px) saturate(115%); }
.detail-overlay.hidden { display: none; }
.detail-panel {
  position: relative; width: min(1220px, 100%); height: 100%; overflow: auto;
  padding: clamp(1rem, 3vw, 2.4rem); border-left: 1px solid var(--mx-border);
  background:
    repeating-linear-gradient(135deg, rgba(var(--mx-gold-rgb), .025) 0 1px, transparent 1px 25px),
    radial-gradient(circle at 68% -8%, rgba(var(--mx-gold-rgb), .12), transparent 35%),
    linear-gradient(155deg, var(--mx-panel-raised) 0%, var(--mx-bg) 52%, #0a0806 100%);
  box-shadow: -28px 0 90px rgba(0, 0, 0, .55);
  scrollbar-color: rgba(var(--mx-gold-rgb), .35) var(--mx-bg);
}
.detail-close { position: sticky; top: 0; z-index: 5; float: right; width: 40px; height: 40px; border: 1px solid var(--mx-border); border-radius: 50%; background: rgba(26, 22, 15, .92); color: var(--mx-text-primary); font-size: 1.2rem; cursor: pointer; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.detail-close:hover { border-color: var(--mx-gold); background: rgba(var(--mx-gold-rgb), .14); color: #fff8ec; }
#detail-content { clear: both; max-width: 1140px; margin: 0 auto; padding-bottom: 3rem; }
#detail-content::after { display: table; clear: both; content: ""; }
.detail-panel h1, .detail-panel h2, .detail-panel h3 { color: var(--mx-text-primary); }
.detail-panel .card, .detail-panel .fixture-card, .detail-panel .leaderboard-card { border: 1px solid var(--mx-border-soft); border-radius: var(--radius-md); background: linear-gradient(145deg, var(--mx-panel-raised), var(--mx-panel)); }
.detail-panel .match-card-header, .detail-panel .match-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; color: var(--mx-text-tertiary); font-size: .68rem; }

/* ---- Letterhead-style header: competition eyebrow, a large serif
   team-name line, kickoff/feed meta underneath. ---- */
.match-detail-header-section { position: relative; overflow: hidden; margin: 0 0 1.5rem; padding: clamp(1.1rem, 3vw, 2.1rem) clamp(1.1rem, 3vw, 2.3rem); border: 1px solid var(--mx-border); border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--mx-panel-raised), var(--mx-panel)); box-shadow: 0 24px 58px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 232, 190, .035); }
.match-detail-header-section::before { position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--mx-gold), transparent); opacity: .78; content: ""; }
.match-detail-header-section::after { position: absolute; width: 250px; height: 250px; right: -120px; bottom: -170px; border-radius: 50%; background: rgba(var(--mx-gold-rgb), .09); filter: blur(12px); content: ""; pointer-events: none; }
.match-detail-hero-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--mx-border-soft); }
.match-detail-competition { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .75rem; color: var(--mx-text-secondary); font: 650 .67rem/1.4 var(--mx-font-mono); letter-spacing: .07em; text-transform: uppercase; }
.match-detail-country { color: var(--mx-text-tertiary); }
.match-detail-status { display: inline-flex; align-items: center; gap: .48rem; flex: none; padding: .35rem .62rem; border: 1px solid var(--mx-border-soft); border-radius: var(--radius-pill); color: var(--mx-text-secondary); background: rgba(0, 0, 0, .28); font: 700 .61rem/1.2 var(--mx-font-mono); letter-spacing: .06em; text-transform: uppercase; }
.match-detail-status.has-feed-state { border-color: rgba(var(--mx-green-rgb), .3); color: #9fe3b8; }
.match-detail-status .live-state-dot { width: 6px; height: 6px; }
.detail-panel .match-detail-team-row { position: relative; z-index: 1; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto minmax(0, 1fr) 62px; align-items: center; gap: clamp(.6rem, 2vw, 1.3rem); margin: clamp(1.6rem, 4vw, 2.9rem) 0; color: var(--mx-text-primary); }
.detail-panel .match-detail-team-row .team-visual { width: 62px; height: 62px; padding: .4rem; border-color: var(--mx-border); background: linear-gradient(145deg, var(--mx-panel-raised), var(--mx-bg)); box-shadow: 0 12px 28px rgba(0, 0, 0, .3); }
.detail-panel .match-detail-team-row .match-header-team-name { min-width: 0; margin: 0; color: var(--mx-text-primary); font-family: var(--mx-font-display); font-size: clamp(1.3rem, 2.7vw, 2.15rem); font-weight: 560; font-optical-sizing: auto; letter-spacing: -.01em; line-height: 1.1; overflow-wrap: anywhere; }
.detail-panel .match-detail-team-row .match-header-team-name:nth-child(2) { text-align: right; }
.detail-panel .match-detail-team-row .match-header-team-name:nth-child(4) { text-align: left; }
.detail-panel .match-card-vs { display: inline-flex; align-items: center; justify-content: center; color: var(--mx-text-tertiary); font: 700 .66rem var(--mx-font-mono); letter-spacing: .2em; text-transform: uppercase; }
.match-detail-hero-meta { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.match-detail-meta-item { display: grid; gap: .25rem; min-width: 0; padding: .72rem .82rem; border: 1px solid var(--mx-border-soft); border-radius: 8px; background: rgba(0, 0, 0, .22); }
.match-detail-meta-label { color: var(--mx-gold); font: 700 .57rem/1.2 var(--mx-font-mono); letter-spacing: .13em; text-transform: uppercase; }
.match-detail-meta-value { color: var(--mx-text-secondary); font: 600 .69rem/1.45 var(--mx-font-mono); }
.match-detail-result-proof { position: relative; z-index: 1; margin-top: .7rem; color: #9fe3b8; font: 600 .64rem/1.5 var(--mx-font-mono); }
.detail-section-title { display: flex; align-items: center; gap: .7rem; margin: 1.1rem 0 .7rem; color: var(--mx-text-secondary) !important; font: 700 .64rem/1.3 var(--mx-font-mono); letter-spacing: .14em; text-transform: uppercase; }
.detail-section-title::before { width: 18px; height: 1px; background: var(--mx-gold); box-shadow: 0 0 10px rgba(var(--mx-gold-rgb), .5); content: ""; }

/* ---- Desktop-first "dossier" tab rail: a sticky column of folder-style
   tabs that stays level with whichever section is in view, with the
   active tab's sections flowing beside it. A tab whose group has
   nothing real for this fixture is never offered at all (see
   openCanonicalMatchDetail's groupHasContent) -- unchanged from round 1,
   just a different, more deliberate shape here. Collapses to a plain
   horizontal row under 860px: desktop is the stated priority, but this
   keeps narrow screens usable rather than broken. ---- */
.detail-tabs { position: sticky; top: .35rem; float: left; z-index: 2; width: 214px; margin: 0 1.9rem 1.5rem 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; border: none; }
.detail-tabs::before { display: block; margin: 0 .1rem .65rem; color: var(--mx-text-tertiary); font: 700 .58rem/1.3 var(--mx-font-mono); letter-spacing: .22em; text-transform: uppercase; content: "Sections"; }
.detail-tab-button { position: relative; display: flex; align-items: center; gap: .62rem; padding: .66rem .85rem .66rem .9rem; border: 1px solid transparent; border-left: 3px solid transparent; border-radius: 3px 9px 9px 3px; background: rgba(0, 0, 0, .17); color: var(--mx-text-secondary); font: 630 .75rem/1.25 var(--font-sans); text-align: left; cursor: pointer; clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%); transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.detail-tab-button:hover { background: rgba(var(--mx-gold-rgb), .09); color: var(--mx-text-primary); transform: translateX(2px); }
.detail-tab-button.active { border-color: var(--mx-border-soft); border-left-color: var(--mx-gold); background: linear-gradient(90deg, rgba(var(--mx-gold-rgb), .19), rgba(var(--mx-gold-rgb), .03) 85%); color: #fff6e6; }
.detail-tab-mark { position: relative; flex: none; width: 15px; height: 15px; color: var(--mx-text-tertiary); transition: color .15s ease; }
.detail-tab-button.active .detail-tab-mark { color: var(--mx-gold); }
.detail-tab-mark.is-circle { border: 1.6px solid currentColor; border-radius: 50%; }
.detail-tab-mark.is-diamond { width: 10px; height: 10px; margin: 2px; border: 1.6px solid currentColor; transform: rotate(45deg); }
.detail-tab-mark.is-triangle { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 13px solid currentColor; }
.detail-tab-mark.is-square { border: 1.6px solid currentColor; }
.detail-tab-mark.is-plus { background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; }
.detail-tab-mark.is-dot { width: 9px; height: 9px; margin: 3px; border-radius: 50%; background: currentColor; }
.detail-tab-num { color: var(--mx-text-tertiary); font: 700 .6rem var(--mx-font-mono); }
.detail-tab-button.active .detail-tab-num { color: var(--mx-gold); }
.detail-tab-label { flex: 1; min-width: 0; }
[data-tab-group] { margin-left: 252px; }
@media (max-width: 860px) {
  .detail-tabs { position: static; float: none; width: auto; margin: 0 0 1.3rem; flex-direction: row; flex-wrap: wrap; }
  .detail-tabs::before { display: none; }
  [data-tab-group] { margin-left: 0; }
}

/* ---- Prediction tab ---- */
.prediction-card { margin-top: 0; padding: 1.35rem 1.4rem; border: 1px solid var(--mx-border); border-radius: var(--radius-md); background: linear-gradient(150deg, var(--mx-panel-raised), var(--mx-panel)); }
.prediction-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.prediction-card-heading strong { color: var(--mx-text-primary); font-family: var(--mx-font-display); font-size: 1.25rem; font-weight: 560; }
.status-pill { padding: .2rem .55rem; border-radius: var(--radius-pill); font: 700 .62rem var(--mx-font-mono); letter-spacing: .04em; text-transform: uppercase; }
.status-pill.is-research { color: var(--mx-gold); background: rgba(var(--mx-gold-rgb), .12); border: 1px solid rgba(var(--mx-gold-rgb), .32); }
.status-pill.is-fallback { color: var(--mx-rust); background: rgba(var(--mx-rust-rgb), .12); border: 1px solid rgba(var(--mx-rust-rgb), .34); }
.prediction-card-body { display: flex; align-items: center; gap: 1.8rem; margin: 0 0 .5rem; }
.prediction-card-figure { flex: none; }
.prediction-card-detail { flex: 1; min-width: 0; }
.prediction-dial { position: relative; width: 134px; height: 134px; }
.prediction-dial-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.prediction-dial-track { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 9; }
.prediction-dial-progress { fill: none; stroke: currentColor; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .7s cubic-bezier(.22, 1, .36, 1); }
.prediction-dial.is-home { color: var(--mx-home); }
.prediction-dial.is-draw { color: var(--mx-draw); }
.prediction-dial.is-away { color: var(--mx-away); }
.prediction-dial.is-neutral { color: var(--mx-text-secondary); }
.prediction-dial-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.prediction-dial-pct { font: 700 1.9rem/1 var(--mx-font-mono); color: var(--mx-text-primary); }
.prediction-dial-pick { margin-top: .22rem; font: 700 .66rem/1.3 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.prediction-dial-pick.is-home { color: var(--mx-home); }
.prediction-dial-pick.is-draw { color: var(--mx-draw); }
.prediction-dial-pick.is-away { color: var(--mx-away); }
.prediction-dial-pick.is-neutral { color: var(--mx-text-secondary); }
.prediction-bar { display: flex; overflow: hidden; height: 15px; border-radius: var(--radius-pill); background: rgba(0, 0, 0, .35); }
.prediction-bar-segment { min-width: 6px; opacity: .45; transition: opacity .15s ease; }
.prediction-bar-segment.is-home { background: var(--mx-home); }
.prediction-bar-segment.is-draw { background: var(--mx-draw); }
.prediction-bar-segment.is-away { background: var(--mx-away); }
.prediction-bar-segment.is-pick { opacity: 1; }
.prediction-bar-legend { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .55rem; font: 650 .66rem var(--mx-font-mono); }
.prediction-bar-legend-item.is-home { color: var(--mx-home); }
.prediction-bar-legend-item.is-draw { color: var(--mx-draw); }
.prediction-bar-legend-item.is-away { color: var(--mx-away); }
.prediction-note { margin-top: .75rem; color: var(--mx-text-secondary); font-size: .72rem; }
.prediction-value-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--mx-border-soft); }
.market-analysis-label { color: var(--mx-text-secondary); font: 650 .64rem/1.35 var(--mx-font-mono); letter-spacing: .06em; text-transform: uppercase; }
.market-analysis-abstain { color: var(--mx-rust); }
.market-analysis-warning { color: #e8c184; font-size: .74rem; line-height: 1.45; }
.market-analysis-rejected { margin-top: .8rem; color: var(--mx-text-secondary); font-size: .75rem; }
.market-analysis-rejected summary { cursor: pointer; color: var(--mx-text-secondary); }
.market-analysis-rejected li { margin: .35rem 0; line-height: 1.45; }
@media (max-width: 640px) {
  .prediction-card-body { flex-direction: column; align-items: flex-start; }
}
.detail-panel .hero-strip { display: flex; overflow: hidden; border: 1px solid var(--mx-border-soft); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--mx-panel-raised), var(--mx-panel)); box-shadow: 0 16px 38px rgba(0, 0, 0, .2); }
.detail-panel .hero-inputs { display: grid; flex: 1; grid-template-columns: repeat(3, 1fr); }
.detail-panel .hero-cell { min-width: 0; padding: 1rem; border-right: 1px solid var(--mx-border-soft); }
.detail-panel .hero-cell-label { color: var(--mx-gold); font: 700 .59rem/1.3 var(--mx-font-mono); letter-spacing: .13em; text-transform: uppercase; }
.detail-panel .hero-cell-sub { margin-top: .35rem; color: var(--mx-text-secondary); font: 600 .62rem/1.45 var(--mx-font-mono); }
.detail-panel .hero-cell-headline { display: flex; flex-wrap: wrap; gap: .38rem; margin-top: .5rem; font-size: 1.18rem; font-weight: 700; }
.detail-panel .hero-cell-headline.is-home { color: var(--mx-home); }
.detail-panel .hero-cell-headline.is-draw { color: var(--mx-draw); }
.detail-panel .hero-cell-headline.is-away { color: var(--mx-away); }
.detail-panel .hero-cell-headline.is-neutral { color: var(--mx-text-secondary); }
.detail-panel .hero-arrow { display: grid; place-items: center; width: 38px; color: rgba(var(--mx-gold-rgb), .55); background: rgba(var(--mx-gold-rgb), .035); font-family: var(--mx-font-mono); }
.detail-panel .hero-decision { min-width: 205px; padding: 1rem; border-left: 1px solid var(--mx-border-soft); background: rgba(var(--mx-gold-rgb), .08); }
.detail-panel .hero-decision-word { color: var(--mx-gold); font: 700 1.1rem var(--mx-font-mono); }
.detail-panel .hero-decision-reason, .detail-panel .hero-decision-warn { margin-top: .45rem; color: var(--mx-text-secondary); font-size: .72rem; }
.detail-panel .material-strip, .detail-panel .sparse-detail-notice, .detail-panel .intelligence-source-section, .detail-panel .section-card { margin: .8rem 0; padding: .95rem; border: 1px solid var(--mx-border-soft); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--mx-panel-raised), var(--mx-panel)); }
.detail-panel .material-strip { display: flex; align-items: center; gap: .7rem; border-color: rgba(var(--mx-rust-rgb), .3); }
.detail-panel .material-strip .jump { margin-left: auto; color: var(--mx-gold); font: 650 .65rem var(--mx-font-mono); }
.detail-panel .sparse-detail-headline { color: var(--mx-text-primary); font-family: var(--mx-font-display); font-size: 1.05rem; font-weight: 560; }
.detail-panel .sparse-detail-reasons { padding-left: 1.1rem; color: var(--mx-text-secondary); font-size: .7rem; }
.detail-panel .intelligence-probability-grid, .detail-panel .probability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: .6rem 0; }
.detail-panel .intelligence-probability-grid span, .detail-panel .probability-grid > * { padding: .65rem; border: 1px solid var(--mx-border-soft); border-radius: 7px; background: rgba(0, 0, 0, .25); color: var(--mx-text-secondary); font: 600 .66rem var(--mx-font-mono); }
.detail-panel .outcome-table { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: .68rem; }
.detail-panel .outcome-table th { color: var(--mx-text-tertiary); text-align: left; font: 600 .59rem var(--mx-font-mono); text-transform: uppercase; }
.detail-panel .outcome-table td, .detail-panel .outcome-table th { padding: .5rem .45rem; border-bottom: 1px solid var(--mx-border-soft); }
.detail-panel .technical-details { margin-top: .8rem; padding: .65rem .75rem; border: 1px solid var(--mx-border-soft); border-radius: 7px; background: rgba(0, 0, 0, .2); color: var(--mx-text-secondary); }
.detail-panel .technical-details summary { color: var(--mx-text-secondary); font: 650 .62rem/1.4 var(--mx-font-mono); letter-spacing: .035em; cursor: pointer; }
.detail-panel .technical-details[open] summary { margin-bottom: .55rem; color: var(--mx-gold); }
.detail-section-expandable { margin-top: .65rem; border: 1px solid var(--mx-border-soft); border-radius: 9px; background: rgba(0, 0, 0, .18); }
.detail-section-expandable > summary { position: relative; padding: .9rem 2.7rem .9rem 1rem; color: var(--mx-text-secondary); font: 650 .72rem/1.4 var(--font-sans); cursor: pointer; list-style: none; }
.detail-section-expandable > summary::after { position: absolute; top: .88rem; right: 1rem; color: var(--mx-gold); content: "+"; }
.detail-section-expandable[open] > summary { border-bottom: 1px solid var(--mx-border-soft); color: var(--mx-text-primary); }
.detail-section-expandable[open] > summary::after { content: "−"; }
.detail-section-expandable > :not(summary) { margin-right: .9rem; margin-left: .9rem; }
/* The small deep-dive sections nested in each tab (Intelligence
   Timeline, AI/Elo detail, M5 reasoning, news & availability, Team
   Form, provenance, Laya Shadow) -- styled a little more muted/dashed
   than their own children so each reads as a drawer, not an equal-weight
   section competing with the tab's primary content. */
.detail-panel .itinerary, .detail-panel .itimeline { display: grid; gap: .35rem; }
.detail-panel .itimeline { position: relative; padding: .65rem .8rem; border: 1px solid var(--mx-border-soft); border-radius: var(--radius-md); background: rgba(0, 0, 0, .2); }
.detail-panel .itimeline::before { position: absolute; top: 1.3rem; bottom: 1.3rem; left: 1.2rem; width: 1px; background: linear-gradient(var(--mx-gold), rgba(var(--mx-gold-rgb), .08)); content: ""; }
.detail-panel .itimeline-row { position: relative; display: flex; gap: .8rem; padding: .55rem 0; }
.detail-panel .itimeline-dot { position: relative; z-index: 1; width: 9px; height: 9px; flex: 0 0 9px; margin-top: .28rem; border: 2px solid var(--mx-bg); border-radius: 50%; background: var(--mx-gold); box-shadow: 0 0 0 3px rgba(var(--mx-gold-rgb), .12); }
.detail-panel .itimeline-body { min-width: 0; color: var(--mx-text-secondary); font-size: .7rem; }
.detail-panel .itimeline-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; color: var(--mx-text-primary); }
.detail-panel .itimeline-when { color: var(--mx-text-tertiary); font: 600 .6rem var(--mx-font-mono); }
.detail-panel .itimeline-detail { margin-top: .14rem; color: var(--mx-text-secondary); }
.detail-panel .intelligence-divider { margin: .75rem 0; color: var(--mx-gold); font: 650 .64rem var(--mx-font-mono); letter-spacing: .1em; }
.detail-panel .provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.detail-panel .provider-box { padding: .75rem; border: 1px solid var(--mx-border-soft); border-radius: 7px; background: rgba(0, 0, 0, .22); }
.detail-panel .provider-heading { display: flex; justify-content: space-between; gap: .4rem; color: var(--mx-text-secondary); font-size: .68rem; }
.detail-panel .market-outcomes { display: grid; gap: .2rem; margin-top: .45rem; color: var(--mx-text-secondary); font: 550 .63rem var(--mx-font-mono); }
.xmarket-wrap { overflow-x: auto; border: 1px solid var(--mx-border); border-radius: var(--radius-md); background: linear-gradient(145deg, var(--mx-panel-raised), var(--mx-panel)); box-shadow: 0 15px 36px rgba(0, 0, 0, .2); }
.xmarket-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .69rem; }
.xmarket-table th { padding: .78rem .65rem; border-bottom: 1px solid var(--mx-border-soft); color: var(--mx-text-tertiary); font: 700 .58rem/1.3 var(--mx-font-mono); letter-spacing: .075em; text-align: left; text-transform: uppercase; }
.xmarket-table td { min-width: 118px; padding: .75rem .65rem; border-bottom: 1px solid var(--mx-border-soft); vertical-align: top; }
.xmarket-table tbody tr:last-child td { border-bottom: 0; }
.xmarket-table tbody tr:hover td { background: rgba(var(--mx-gold-rgb), .035); }
.xmarket-model-col { background: rgba(var(--mx-gold-rgb), .07); }
.xmarket-model-price, .xmarket-price { color: var(--mx-text-primary); font: 700 .9rem/1.2 var(--mx-font-mono); }
.xmarket-outcome { display: inline-flex; align-items: center; gap: .45rem; color: var(--mx-text-secondary); font-weight: 650; }
.xmarket-dot { width: 7px; height: 7px; border-radius: 50%; }
.xmarket-fresh { margin-top: .22rem; color: var(--mx-text-tertiary); font: 550 .57rem/1.35 var(--mx-font-mono); }
.xmarket-table td.is-best { background: rgba(var(--mx-green-rgb), .08); box-shadow: inset 0 2px rgba(var(--mx-green-rgb), .4); }
.xmarket-best-tag, .venue-live-badge { display: inline-flex; margin-top: .35rem; padding: .16rem .34rem; border: 1px solid rgba(var(--mx-green-rgb), .3); border-radius: var(--radius-pill); color: #8be3a8; font: 700 .52rem/1.2 var(--mx-font-mono); letter-spacing: .04em; text-transform: uppercase; }
.venue-live-badge { margin: 0 0 0 .35rem; border-color: rgba(var(--mx-gold-rgb), .3); color: var(--mx-gold); }
.xmarket-noquote { display: grid; gap: .18rem; max-width: 155px; }
.xmarket-noquote strong { color: var(--mx-rust); font: 700 .64rem/1.3 var(--mx-font-mono); }
.xmarket-noquote-reason { color: var(--mx-text-tertiary); font-size: .59rem; line-height: 1.35; }
.xmarket-noquote-time { color: var(--mx-text-tertiary); font: 550 .54rem/1.35 var(--mx-font-mono); }
.xmarket-caption { padding: .65rem .75rem; border-top: 1px solid var(--mx-border-soft); color: var(--mx-text-secondary); font: 600 .61rem/1.4 var(--mx-font-mono); }
.xmarket-wrap > .technical-details { margin: 0 .7rem .7rem; }
.empty-state, .error-state { margin: 1rem 0; padding: 1rem; border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: rgba(14, 36, 51, .45); color: #a6bac1; font-size: .8rem; }
.error-state { border-color: rgba(241, 107, 122, .25); color: #ed9ba4; }
.filter-bar { margin: .6rem 0; }
.leaderboard-grid { display: grid; gap: .8rem; }
.metric-grid { display: flex; flex-wrap: wrap; gap: .35rem; }
.metric-grid > span { padding: .28rem .45rem; border: 1px solid rgba(100, 147, 164, .15); border-radius: 5px; color: #a0b3bb; font: 550 .61rem var(--font-mono); }
.clickable { cursor: pointer; }
.clickable:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.readonly-banner { color: var(--amber); }
.section-title { margin: .9rem 0 .4rem; color: #9db6c0; font: 650 .64rem var(--font-mono); text-transform: uppercase; }
.match-header-team-name { margin-inline: .1rem; }
.competition-navigation { display: flex; }
.position-state { font: 600 .61rem var(--font-mono); }
.position-state-won { color: var(--green); }
.position-state-lost { color: var(--red); }

@media (max-width: 1120px) {
  :root { --sidebar-width: 185px; }
  .live-score-row { grid-template-columns: minmax(130px, .65fr) minmax(280px, 1.6fr) minmax(130px, .7fr); }
  .live-score-row .match-detail-action { grid-column: 2 / 3; justify-self: center; }
}
@media (max-width: 760px) {
  .market-analysis-grid { grid-template-columns: 1fr; }
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 12; display: block; width: 100%; height: auto; min-height: 0; padding: .55rem .65rem; border-right: 0; border-bottom: 1px solid var(--border-soft); background: rgba(7, 23, 34, .96); backdrop-filter: blur(14px); }
  .brand-lockup, .sidebar-foot { display: none; }
  .tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .2rem; }
  .tab-button { display: flex; min-width: 0; min-height: 48px; flex-direction: column; justify-content: center; gap: .22rem; padding: .35rem .15rem; border-radius: 8px; text-align: center; }
  .tab-button > span:first-child { font-size: .56rem; }
  .tab-button > span:last-child { font-size: .62rem; }
  .tab-button.active::before { top: auto; right: 18%; bottom: 0; left: 18%; width: auto; height: 2px; }
  .status-header { position: relative; min-height: 0; padding: .6rem .9rem; }
  .status-header-row { flex-wrap: wrap; min-height: 0; gap: .6rem; }
  .status-location { display: none; }
  .status-summary { flex: 1; font-size: .65rem; }
  .system-status-disclosure > summary { font-size: .59rem; }
  main { padding: .9rem .9rem 3rem; }
  .page-heading { align-items: flex-start; margin-bottom: 1rem; padding-top: .35rem; }
  .page-heading h1 { font-size: clamp(2.2rem, 12vw, 3.25rem); }
  .heading-index { display: none; }
  .readonly-mark { margin-top: .35rem; font-size: .54rem; }
  .featured-match { margin: .8rem 0 2rem; padding: 1rem; border-radius: 17px; }
  .featured-match-stage { grid-template-columns: minmax(0, 1fr) 67px minmax(0, 1fr); min-height: 225px; gap: .25rem; padding: 1rem 0; }
  .team-visual-hero { width: 64px; height: 64px; padding: .4rem; }
  .featured-team strong { font-size: clamp(.9rem, 4vw, 1.28rem); }
  .featured-versus::before, .featured-versus::after { height: 17px; }
  .featured-live-score { font-size: 1.25rem; }
  .featured-match-bottom { align-items: flex-start; flex-direction: column; }
  .feature-evidence { gap: .7rem 1rem; }
  .editorial-match { grid-template-columns: 25px minmax(0, 1fr) auto; gap: .45rem; min-height: 75px; }
  .editorial-teams { gap: .32rem; }
  .editorial-teams strong { font-size: .72rem; }
  .editorial-teams .team-visual-sm { width: 18px; height: 18px; flex-basis: 18px; }
  .editorial-match .match-detail-action { padding: .4rem .45rem; font-size: .61rem; }
  .live-score-row { grid-template-columns: 1fr; gap: .65rem; padding: 1rem .45rem; }
  .live-score-context { display: flex; align-items: center; justify-content: space-between; }
  .live-score-main { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .4rem; }
  .live-side { gap: .3rem; }
  .live-side strong { font-size: .72rem; }
  .live-side.is-away { text-align: right; }
  .live-side .team-visual { width: 25px; height: 25px; flex-basis: 25px; }
  .live-score-value { min-width: 84px; font-size: 1.12rem; }
  .live-score-meta { grid-template-columns: repeat(2, auto); justify-items: start; text-align: left; }
  .live-score-row .match-detail-action { grid-column: auto; justify-self: start; }
  .markets-toolbar { align-items: flex-start; }
  .model-row-heading { grid-template-columns: 28px minmax(120px, 1fr) auto; gap: .55rem; }
  .model-bankroll-label { display: none; }
  .model-bankroll { font-size: .83rem; }
  .model-integrity, .model-metrics, .model-recent-form, .leaderboard-positions { margin-left: 36px; }
  .leaderboard-position { grid-template-columns: 1fr 1fr; }
  .detail-panel { width: 100%; padding: 1rem; }
  .match-detail-header-section { margin-top: .35rem; padding: 1rem; }
  .match-detail-hero-topline { align-items: flex-start; flex-direction: column; }
  .detail-panel .match-detail-team-row { grid-template-columns: 44px minmax(0, 1fr) auto minmax(0, 1fr) 44px; gap: .45rem; margin: 1.5rem 0; }
  .detail-panel .match-detail-team-row .team-visual { width: 44px; height: 44px; }
  .detail-panel .match-detail-team-row .match-header-team-name { font-size: clamp(.82rem, 3.8vw, 1.08rem); }
  .match-detail-hero-meta { grid-template-columns: 1fr; }
  .detail-panel .hero-strip { flex-direction: column; }
  .detail-panel .hero-inputs { grid-template-columns: 1fr; }
  .detail-panel .hero-cell { border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .detail-panel .hero-arrow { width: 100%; height: 30px; transform: rotate(90deg); }
  .detail-panel .hero-decision { min-width: 0; }
}
@media (max-width: 640px) {
  main { padding-right: .72rem; padding-left: .72rem; }
  .section-heading-line { align-items: flex-start; }
  .section-heading-line > .muted { padding-top: .25rem; text-align: right; }
  .markets-toolbar .filter-input, .markets-toolbar .filter-select, .markets-toolbar input[type="search"] { max-width: 100%; }
}
@media (max-width: 420px) {
  .tab-button > span:last-child { font-size: .57rem; }
  .featured-match-topline { align-items: flex-start; flex-direction: column; }
  .featured-match-context { gap: .35rem; font-size: .59rem; }
  .featured-match-stage { grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr); }
  .team-visual-hero { width: 53px; height: 53px; }
  .featured-versus { font-size: .66rem; }
  .editorial-teams strong { max-width: 88px; }
  .editorial-match .match-detail-action { font-size: .55rem; }
  .model-row-heading { grid-template-columns: 22px minmax(100px, 1fr) auto; }
}
