/* 11BALLR Control — brand palette: 16C660 green, A4FF3D lime (live only), 080B09 ink, D1D7D2 stone, F5F7F5 chalk.
   Inter throughout (easy on the eyes); heavy tight-tracked Inter with tabular figures for scores and big numbers.
   The sidebar stays brand-black in both themes so the logo always sits on its own background. */
:root {
  --ink: #080B09; --chalk: #F5F7F5; --stone: #D1D7D2; --green: #16C660; --lime: #A4FF3D;
  --bg: #080B09; --bg-2: #0D110E; --card: #111713; --card-2: #172019; --line: #212A24; --line-2: #2C3730;
  --text: #F5F7F5; --text-2: #B9C2BB; --muted: #7F8A82; --accent: #16C660; --accent-ink: #062611; --accent-soft: rgba(22, 198, 96, .12);
  --live: #A4FF3D; --live-soft: rgba(164, 255, 61, .12); --warn: #F5B53D; --bad: #FF5D5D; --ok: #16C660;
  --home: #16C660; --draw: #6E7A72; --away: #D1D7D2;
  --s1: #16C660; --s2: #A4FF3D; --s3: #D1D7D2; --s4: #4FB8FF; --s5: #F5B53D; --s6: #FF7AB6; --s7: #9B8CFF; --s8: #FF5D5D;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.35);
  --r-lg: 14px; --r: 10px; --r-sm: 7px;
  --side: 248px; --top: 60px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F7F5; --bg-2: #EEF1EE; --card: #FFFFFF; --card-2: #F7F9F7; --line: #DEE3DF; --line-2: #D1D7D2;
  --text: #080B09; --text-2: #2E3631; --muted: #6A746D; --accent: #0E9F4C; --accent-ink: #FFFFFF; --accent-soft: rgba(22, 198, 96, .12);
  --live: #0E9F4C; --live-soft: rgba(22, 198, 96, .14); --away: #080B09; --draw: #A9B2AB;
  --s2: #6FB800; --s3: #2E3631;
  --shadow: 0 1px 2px rgba(8,11,9,.06), 0 6px 20px rgba(8,11,9,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --bg: #F5F7F5; --bg-2: #EEF1EE; --card: #FFFFFF; --card-2: #F7F9F7; --line: #DEE3DF; --line-2: #D1D7D2; --text: #080B09; --text-2: #2E3631; --muted: #6A746D; --accent: #0E9F4C; --accent-ink: #FFFFFF; --live: #0E9F4C; --live-soft: rgba(22,198,96,.14); --away: #080B09; --draw: #A9B2AB; --s2: #6FB800; --s3: #2E3631; --shadow: 0 1px 2px rgba(8,11,9,.06), 0 6px 20px rgba(8,11,9,.06); color-scheme: light; }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11' 1, 'ss01' 1; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.01em; }
.display, h1, .mbig, .mscore, .stat-v, .tk-s, .ev-min, .pc-in input { font-weight: 800; letter-spacing: -.03em; font-feature-settings: 'tnum' 1; }
.num, .gc.num, td.num { font-feature-settings: 'tnum' 1; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 15px; font-weight: 700; }
.sub { color: var(--muted); margin: 6px 0 0; max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.grow { flex: 1; }
.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg-2); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.brand img { height: 22px; width: auto; display: block; }
.brand-tag { font-size: 10.5px; font-weight: 600; color: #A4FF3D; border: 1px solid rgba(164,255,61,.35); border-radius: 99px; padding: 1px 8px; }
.side { --bg-2: #080B09; --card: #111713; --card-2: #172019; --line: #1C241F; --line-2: #2C3730; --text: #F5F7F5; --text-2: #B9C2BB; --muted: #7F8A82; --accent: #16C660; color: var(--text); color-scheme: dark; }
.nav-group { margin-top: 12px; }
.nav-h { color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 6px 10px; }
.nav-a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; position: relative; }
.nav-a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-a:hover { background: var(--card); color: var(--text); }
.nav-a.on { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav-a.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 0 7px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me img, .me .face-ph { width: 30px; height: 30px; border-radius: 50%; }
.me-t { min-width: 0; } .me-t div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.search-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-btn { display: flex; align-items: center; gap: 10px; min-width: 280px; padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--card); color: var(--muted); cursor: pointer; }
.search-btn kbd { margin-left: auto; }
kbd { font: 600 11px var(--font); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--card); cursor: pointer; color: var(--text-2); }
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn svg { width: 17px; height: 17px; }
.menu-btn { display: none; }
.pulse { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card); white-space: nowrap; }
.pulse .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pulse.live .dot { background: var(--live); box-shadow: 0 0 0 0 var(--live); animation: beat 1.6s infinite; }
.pulse.idle .dot { background: var(--accent); }
.pulse.stale .dot { background: var(--bad); }
.pulse.stale { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line-2)); }
@keyframes beat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 70%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* live ticker */
.ticker { display: flex; gap: 8px; overflow-x: auto; padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--bg-2); scrollbar-width: none; }
.ticker::-webkit-scrollbar { display: none; }
.tk { flex: none; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); white-space: nowrap; font-size: 12.5px; }
.tk .tk-s { font-size: 16px; }
.tk.live { border-color: color-mix(in srgb, var(--live) 45%, var(--line)); background: var(--live-soft); }
.tk.live .tk-s { color: var(--live); }
.tk .tk-m { grid-column: 1 / -1; font-size: 11px; color: var(--muted); margin-top: -2px; }
.tk.live .tk-m { color: var(--live); }

/* ------------------------------------------------------------------ page */
.content { padding: 28px 28px 60px; }
.page { max-width: 1240px; margin: 0 auto; }
.page.wide { max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.block { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); min-width: 0; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.empty { color: var(--muted); padding: 22px 4px; margin: 0; }
.loading { color: var(--muted); padding: 22px 4px; margin: 0; }
.loading::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; margin-right: 8px; vertical-align: -1px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.err-box { border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 9%, var(--card)); color: var(--text); border-radius: var(--r); padding: 12px 14px; margin: 10px 0; }
.note { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 12px 14px; color: var(--text-2); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-k { color: var(--muted); font-size: 12.5px; }
.stat-v { font-size: 28px; line-height: 1.1; margin-top: 4px; }
.stat-n { color: var(--muted); font-size: 12px; }
.stat.live .stat-v { color: var(--live); } .stat.bad .stat-v { color: var(--bad); } .stat.good .stat-v { color: var(--accent); }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--card-2); cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-quiet { background: transparent; }
.btn-danger { color: var(--bad); }
.btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 11px; color: var(--text); font: inherit; min-width: 0; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { padding-right: 28px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { accent-color: var(--accent); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tab-count { margin-left: 6px; font-size: 11px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--card-2); border: 1px solid var(--line-2); color: var(--text-2); }
.pill.live { background: var(--live-soft); border-color: color-mix(in srgb, var(--live) 50%, transparent); color: var(--live); }
.pill.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: beat 1.6s infinite; }
.pill.ok { color: var(--ok); } .pill.bad { color: var(--bad); } .pill.warn { color: var(--warn); } .pill.quiet { color: var(--muted); }
.pop-wrap { position: relative; }
.pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); }
.cols-pop { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 6px 16px; max-height: 60vh; overflow: auto; width: max-content; max-width: 90vw; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border-bottom: 0; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--card-2); }
.tbl-wrap { overflow-x: auto; }

.grid-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.grid-bar { display: flex; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.grid-bar .input[type=search] { width: 220px; }
.grid-scroll { overflow: auto; }
.grid { position: relative; }
.grid-head { display: grid; position: sticky; top: 0; z-index: 2; background: var(--card-2); border-bottom: 1px solid var(--line); }
.gh { text-align: left; border: 0; background: none; padding: 9px 10px; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh:hover { color: var(--text); } .gh.sorted { color: var(--accent); } .gh.num { text-align: right; }
.grid-row { display: grid; position: absolute; left: 0; right: 0; top: 0; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; }
.grid-row:hover { background: var(--card-2); }
.grid-row.click { cursor: pointer; }
.grid-row.me { background: var(--accent-soft); }
.grid-row.ref { color: var(--muted); }
.gc { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-player { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }

/* identity bits */
.club { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.club span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crest { object-fit: contain; flex: none; }
.crest-ph { display: inline-grid; place-items: center; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line-2); font-size: 10px; font-weight: 800; color: var(--muted); }
.face { border-radius: 50%; object-fit: cover; object-position: top; background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--green) 22%, var(--card-2)), var(--card-2) 70%); flex: none; }
.face-ph { display: inline-block; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line-2); flex: none; }

/* matchday board */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mcard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.mcard:hover { border-color: var(--line-2); transform: translateY(-1px); color: inherit; }
.mcard.live { border-color: color-mix(in srgb, var(--live) 45%, var(--line)); background: linear-gradient(180deg, var(--live-soft), var(--card) 70%); }
.mcard.done { opacity: .88; }
.mrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.mrow .r { justify-self: end; }
.mrow .r .club { flex-direction: row-reverse; }
.mscore { font-size: 26px; line-height: 1; text-align: center; min-width: 70px; }
.mcard.live .mscore { color: var(--live); }
.mmeta { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; font-size: 12.5px; flex-wrap: wrap; }
.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.feed li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed-t { color: var(--muted); font-size: 12px; }

/* match centre */
.mhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 24px; margin-bottom: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: radial-gradient(120% 140% at 50% 0%, var(--card-2), var(--card) 60%); box-shadow: var(--shadow); }
.mteam { display: grid; justify-items: center; gap: 10px; text-align: center; font-weight: 700; font-size: 16px; }
.mmid { display: grid; justify-items: center; gap: 8px; text-align: center; }
.mbig { font-size: 60px; line-height: 1; }
.timeline { list-style: none; padding: 0; margin: 0; }
.ev { display: grid; grid-template-columns: 48px 26px 1fr auto; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ev:last-child { border-bottom: 0; }
.ev.a { background: linear-gradient(90deg, transparent, var(--accent-soft)); }
.ev-min { font-size: 14px; color: var(--muted); }
.ev-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 11px; font-weight: 800; flex: none; }
.ev-ico.goal { border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
.ev-ico.goal.og { background: var(--text-2); color: var(--card); }
.ev-ico.goal.missed { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.ev-ico.card i { display: block; width: 11px; height: 15px; border-radius: 2px; transform: rotate(-8deg); box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.ev-ico.card.yellow i { background: #F5D33D; } .ev-ico.card.red i { background: var(--bad); }
.ev-ico.card.second i { background: var(--bad); box-shadow: -4px -2px 0 0 #F5D33D, 0 1px 2px rgba(0,0,0,.35); transform: rotate(-8deg) translateX(2px); }
.ev-ico.sub { display: inline-flex; gap: 0; font-size: 13px; width: 22px; }
.ev-ico.sub .in { color: var(--accent); } .ev-ico.sub .out { color: var(--bad); margin-left: -3px; }
.ev-ico.var { font-size: 9px; border: 1px solid var(--line-2); border-radius: 4px; width: auto; padding: 0 3px; }

/* match events: home left, away right, minute on the spine */
.story { list-style: none; margin: 0; padding: 4px 0; position: relative; }
.story::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line-2); transform: translateX(-.5px); }
.st { display: grid; grid-template-columns: 1fr 58px 1fr; align-items: center; min-height: 44px; position: relative; }
.st-min { grid-column: 2; grid-row: 1; justify-self: center; font-size: 12px; font-weight: 800; color: var(--text-2); background: var(--card); border: 1px solid var(--line-2); border-radius: 99px; padding: 2px 8px; font-feature-settings: 'tnum' 1; z-index: 1; }
.st-club { display: none; }
.st-body { grid-row: 1; display: flex; align-items: center; gap: 10px; padding: 6px 12px; min-width: 0; }
.st.h .st-body { grid-column: 1; justify-self: end; flex-direction: row-reverse; text-align: right; }
.st.a .st-body { grid-column: 3; justify-self: start; }
.st-text { display: grid; gap: 1px; min-width: 0; }
.st-main { font-size: 13.5px; font-weight: 650; display: inline-flex; align-items: center; gap: 8px; }
.st.h .st-main { justify-content: flex-end; }
.st-sub { font-size: 12px; color: var(--muted); }
.st-sub a { color: var(--text-2); }
.st-out a { color: var(--muted); }
.st.t-goal { min-height: 58px; }
.st.t-goal .st-main { font-size: 15px; font-weight: 750; }
.st.t-goal .ev-ico.goal { width: 28px; height: 28px; font-size: 17px; box-shadow: 0 0 0 4px var(--accent-soft); }
.st.t-goal .st-min { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.st-score { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--card-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-feature-settings: 'tnum' 1; }
.st-score b { font-weight: 800; } .st-score b.on { color: var(--accent); }
.st.h .st-score { order: -1; }
.st-mark { display: flex; justify-content: center; padding: 10px 0; position: relative; }
.st-mark span { position: relative; z-index: 1; display: inline-flex; gap: 8px; align-items: baseline; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid var(--line-2); border-radius: 99px; padding: 3px 12px; }
.st-mark b { color: var(--text); font-size: 13px; font-weight: 800; font-feature-settings: 'tnum' 1; }
.st-mark.ft span { border-color: var(--text-2); }
.st-mark.ft b { color: var(--accent); }
@media (max-width: 640px) {
  .story::before { left: 28px; }
  .st { grid-template-columns: 56px 1fr; }
  .st-min { grid-column: 1; }
  .st.h .st-body, .st.a .st-body { grid-column: 2; justify-self: start; flex-direction: row; text-align: left; padding-left: 4px; }
  .st.h .st-main { justify-content: flex-start; }
  .st.h .st-score { order: 0; }
  .st { grid-template-columns: 56px 1fr auto; }
  .st-club { display: block; grid-column: 3; grid-row: 1; font-size: 11px; font-weight: 700; color: var(--muted); }
  .st.a .st-club { color: var(--text-2); }
  .st-mark { justify-content: flex-start; padding-left: 0; }
}
.pairbars { display: grid; gap: 10px; }
.pb { display: grid; grid-template-columns: 54px 1fr 54px; grid-template-areas: 'v t w' 'l l l'; align-items: center; gap: 2px 10px; }
.pb-v { grid-area: v; font-weight: 700; } .pb-v.r { grid-area: w; text-align: right; }
.pb-track { grid-area: t; display: flex; gap: 3px; height: 8px; }
.pb-h { background: var(--home); border-radius: 4px 0 0 4px; } .pb-a { background: var(--away); border-radius: 0 4px 4px 0; }
.pb-l { grid-area: l; text-align: center; font-size: 12px; color: var(--muted); }
.pitch { background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--green) 14%, var(--card)) 0 44px, color-mix(in srgb, var(--green) 9%, var(--card)) 44px 88px); border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line)); border-radius: var(--r); padding: 14px 6px; display: grid; gap: 14px; margin-bottom: 10px; }
.prow { display: flex; justify-content: space-around; align-items: flex-start; }
.pp { display: grid; justify-items: center; gap: 2px; width: 84px; text-align: center; }
.pp-n { font-size: 11px; font-weight: 800; color: var(--accent); margin-top: -10px; background: var(--card); border-radius: 99px; padding: 0 5px; }
.pp-name { font-size: 11.5px; font-weight: 600; line-height: 1.15; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* probability bars */
.prob { margin: 8px 0; }
.prob-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.prob-track { display: flex; height: 26px; border-radius: 7px; overflow: hidden; font-size: 11.5px; font-weight: 800; }
.prob.small .prob-track { height: 8px; font-size: 0; }
.prob-track > div { display: grid; place-items: center; min-width: 0; overflow: hidden; transition: width .25s; }
.ph { background: var(--home); color: var(--ink); } .pd { background: var(--draw); color: var(--chalk); } .pa { background: var(--away); color: var(--ink); }
:root[data-theme="light"] .pa { color: var(--chalk); }

/* predictions */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.pcard.todo { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.pcard.locked { background: var(--bg-2); }
.pc-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 12px; }
.pc-head .r { justify-self: end; } .pc-head .r .club { flex-direction: row-reverse; }
.pc-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc-in label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.pc-in input { width: 100%; text-align: center; font-size: 18px; }
.pc-pick { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

/* charts */
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.gridline { stroke: var(--line-2); fill: none; stroke-width: 1; }
.axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.line.muted { stroke-dasharray: 5 5; opacity: .7; }
.area { stroke-width: 2; fill-opacity: .16; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; margin-top: 8px; color: var(--text-2); }
.lg::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: currentColor; }
.lg.muted { opacity: .7; }
.s0 { stroke: var(--s1); fill: var(--s1); color: var(--s1); } .s1 { stroke: var(--s2); fill: var(--s2); color: var(--s2); } .s2 { stroke: var(--s3); fill: var(--s3); color: var(--s3); } .s3 { stroke: var(--s4); fill: var(--s4); color: var(--s4); }
.s4 { stroke: var(--s5); fill: var(--s5); color: var(--s5); } .s5 { stroke: var(--s6); fill: var(--s6); color: var(--s6); } .s6 { stroke: var(--s7); fill: var(--s7); color: var(--s7); } .s7 { stroke: var(--s8); fill: var(--s8); color: var(--s8); }
.line.s0, .line.s1, .line.s2, .line.s3, .line.s4, .line.s5, .line.s6, .line.s7 { fill: none; }
.lg.s0, .lg.s1, .lg.s2, .lg.s3, .lg.s4, .lg.s5, .lg.s6, .lg.s7 { fill: none; }
.legend .lg { color: var(--text-2); } .legend .lg::before { background: var(--c, currentColor); }
.legend .lg.s0::before { background: var(--s1); } .legend .lg.s1::before { background: var(--s2); } .legend .lg.s2::before { background: var(--s3); } .legend .lg.s3::before { background: var(--s4); } .legend .lg.s4::before { background: var(--s5); } .legend .lg.s5::before { background: var(--s6); } .legend .lg.s6::before { background: var(--s7); } .legend .lg.s7::before { background: var(--s8); }
.radar { max-width: 340px; margin: 0 auto; }
.spark { stroke: var(--accent); fill: none; stroke-width: 1.6; vertical-align: middle; }
.form-dots { display: inline-flex; gap: 3px; }
.fd { width: 9px; height: 9px; border-radius: 50%; } .fd.w { background: var(--accent); } .fd.d { background: var(--draw); } .fd.l { background: var(--bad); }
.best { color: var(--accent); font-weight: 800; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 4px; font-size: 15px; line-height: 1; }

/* profile header (player / club) */
.hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: radial-gradient(140% 160% at 0% 0%, var(--card-2), var(--card) 55%); box-shadow: var(--shadow); margin-bottom: 16px; }
.hero h1 { font-size: 36px; }
.hero-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-2); margin-top: 6px; font-size: 13px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 15px; height: 15px; color: var(--muted); }

/* command palette */
.cmdk-back { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); display: grid; place-items: start center; padding-top: 12vh; }
.cmdk { width: min(640px, 92vw); background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: hidden; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cmdk-in svg { width: 18px; height: 18px; color: var(--muted); }
.cmdk-in input { flex: 1; border: 0; background: none; color: var(--text); font: 500 16px var(--font); outline: none; }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 6px; list-style: none; margin: 0; }
.cmdk-h { font-size: 11.5px; color: var(--muted); padding: 8px 10px 4px; font-weight: 600; }
.cmdk-i { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.cmdk-i.on { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.cmdk-i .muted { margin-left: auto; font-size: 12px; }
.cmdk-i svg { width: 16px; height: 16px; color: var(--muted); }

/* gate */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-box { width: min(420px, 100%); text-align: center; display: grid; gap: 18px; justify-items: center; }
.gate-logo { width: min(340px, 80vw); height: auto; }
.gate { background: radial-gradient(80% 60% at 50% 0%, rgba(22,198,96,.18), #080B09 70%); color: #F5F7F5; }
.gate .muted { color: #9AA59D; } .gate-box p { color: #C9D1CB; }
.gate .btn { background: #111713; border-color: #2C3730; color: #F5F7F5; }
.gate-box p { color: var(--text-2); margin: 0; }
.btn-google { padding: 12px 20px; background: var(--card); border: 1px solid var(--line-2); font-size: 15px; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-weight: 600; transition: .2s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* notification centre */
.bell { position: relative; }
.bell.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line-2)); }
.bell.critical { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, var(--line-2)); animation: ring 2.4s infinite; }
@keyframes ring { 0%, 90%, 100% { transform: none; } 92% { transform: rotate(-10deg); } 94% { transform: rotate(10deg); } 96% { transform: rotate(-6deg); } }
.bell-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.bell.warn .bell-n { background: var(--warn); color: var(--ink); }
.notif { width: min(420px, 92vw); padding: 0; overflow: hidden; }
.notif-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-desk { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--accent-soft); cursor: pointer; }
.notif-desk svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 2px; }
.notif-list { list-style: none; margin: 0; padding: 4px; max-height: 60vh; overflow-y: auto; }
.notif-i a { display: flex; gap: 10px; padding: 10px; border-radius: 9px; color: var(--text); }
.notif-i a:hover { background: var(--card-2); }
.notif-i svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--muted); }
.notif-i.critical svg { color: var(--bad); } .notif-i.warn svg { color: var(--warn); } .notif-i.info svg { color: var(--accent); }
.notif-i span { display: grid; gap: 2px; min-width: 0; }
.notif-t { font-size: 13px; line-height: 1.4; }
.notif-i.new .notif-t { font-weight: 600; }
.notif-i.new a { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.notif-i.critical.new a { background: color-mix(in srgb, var(--bad) 9%, transparent); }
.notif-all { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--accent); }

/* data browser */
.data-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.data-nav { position: sticky; top: calc(var(--top) + 12px); display: grid; gap: 2px; max-height: calc(100vh - 120px); overflow-y: auto; }
.data-nav .nav-a { padding: 6px 10px; font-size: 13px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 25; }
  .menu-btn { display: inline-grid; }
  .top { padding: 0 14px; }
  .search-btn { min-width: 0; flex: 1; }
  .search-btn kbd { display: none; }
  .content { padding: 18px 14px 50px; }
  .two, .three { grid-template-columns: 1fr; }
  .data-layout { grid-template-columns: 1fr; }
  .data-nav { position: static; display: flex; overflow-x: auto; max-height: none; }
  .data-nav > div { display: flex; gap: 4px; align-items: center; }
  .data-nav .nav-h { white-space: nowrap; }
  .data-nav .nav-a { white-space: nowrap; }
  h1 { font-size: 28px; }
  .mhead { grid-template-columns: 1fr; padding: 18px; }
  .mbig { font-size: 56px; }
  .hero { grid-template-columns: auto 1fr; }
  .hero > :last-child { grid-column: 1 / -1; }
  .hero h1 { font-size: 34px; }
  .board, .pcards { grid-template-columns: 1fr; }
  .pulse-text { display: none; }
  .search-btn span { display: none; }
  .search-btn::after { content: 'Search'; }
  .tbl { display: block; overflow-x: auto; white-space: nowrap; }
  .grid-bar .input[type=search] { width: 100%; }
  .kv { grid-template-columns: 1fr; }
  .ticker { padding: 8px 14px; }
}
