/* ==========================================================================
   Scoreboard Hub — styles
   Neutral dark ground; each league carries its own accent via --lg
   (NFL blue, WNBA orange, MLB red, NCAAF green).
   ========================================================================== */
:root {
  --bg: #0b0f16;
  --surface: #121826;
  --surface-2: #182033;
  --surface-3: #212b42;
  --border: #263046;
  --text: #e8edf5;
  --text-2: #b4bfd1;
  --muted: #7d8aa3;
  --accent: #f0b429;
  --lg: var(--accent);
  --win: #4ade80;
  --loss: #f87171;
  --tie: #fbbf24;
  --danger: #ef4444;
  --info: #60a5fa;
  --opp: #8593a8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .4);
  --font-head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--lg); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: .01em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(28px, 4vw, 44px); text-transform: uppercase; }
h2 { font-size: clamp(20px, 2.6vw, 26px); text-transform: uppercase; }
h3 { font-size: 18px; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.crumbs { margin: 0 0 12px; }
.crumbs a { color: var(--text-2); }

/* ---------- Top bar & league nav ---------- */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 8px 20px; background: #0e1420; border-bottom: 1px solid var(--border); box-shadow: 0 2px 12px rgba(0,0,0,.4); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-head); font-size: 26px; text-transform: uppercase; letter-spacing: .04em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--accent); font-weight: 700; }
.brand-mark { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.brand-mark i { width: 7px; border-radius: 2px; background: var(--accent); }
.brand-mark i:nth-child(1) { height: 12px; background: #4f8cff; } .brand-mark i:nth-child(2) { height: 26px; background: #ff7a1a; } .brand-mark i:nth-child(3) { height: 18px; background: #ff4d4d; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; row-gap: 0; min-width: 0; }
.nav a { display: inline-flex; align-items: center; gap: 6px; color: #d5deea; padding: 7px 9px; border-radius: 8px; white-space: nowrap; font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-head); line-height: 1.2; border-bottom: 3px solid transparent; }
.nav a img { width: 22px; height: 22px; object-fit: contain; }
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.nav a.active { color: #fff; border-bottom-color: var(--lg); background: rgba(255,255,255,.05); }
.nav-sport { align-self: center; margin: 0 2px 0 10px; padding-left: 10px; border-left: 1px solid var(--border); color: var(--muted); font-family: var(--font-head); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.nav-sport:first-of-type { margin-left: 6px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 6px 4px 6px 10px; align-items: center; gap: 10px; color: #fff; }
.nav-toggle b { font-family: var(--font-head); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.nav-toggle .bars span { display: block; width: 24px; height: 3px; background: #fff; margin: 4px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1280px) { .nav a img { display: none; } }
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 0; gap: 2px; padding-top: 6px; }
  .nav.open { display: flex; }
  .topbar { flex-wrap: wrap; }
  .nav a { padding: 10px 12px; border-bottom: 0; border-left: 3px solid transparent; }
  .nav a.active { border-left-color: var(--lg); }
  .nav-sport { border-left: 0; margin: 8px 0 0; padding: 4px 12px 2px; }
}
.subnav { position: sticky; top: var(--topbar-h, 51px); z-index: 40; background: #0e1420; border-bottom: 2px solid var(--lg); }
.subnav-inner { max-width: 1200px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav-lg { display: inline-flex; align-items: center; gap: 6px; padding: 9px 10px 9px 4px; color: var(--lg); font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .05em; white-space: nowrap; }
.subnav-lg img { width: 20px; height: 20px; object-fit: contain; }
.subnav a { color: var(--text-2); padding: 9px 12px; font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.subnav a:hover { color: #fff; text-decoration: none; }
.subnav a.active { color: #fff; border-bottom-color: var(--lg); }
@media (max-width: 720px) { .subnav { top: 0; position: static; } }

/* ---------- Live ticker ---------- */
.live-bar { display: flex; align-items: center; gap: 10px; padding: 6px 16px; background: #2a0f12; border-bottom: 1px solid #7f1d1d; color: #fff; font-weight: 600; font-size: 13px; }
.live-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: pulse 1.2s infinite; flex: none; }
.live-bar .lbl { text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-head); color: #fca5a5; flex: none; }
.ticker { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ticker::-webkit-scrollbar { display: none; }
.ticker a { display: inline-flex; align-items: center; gap: 5px; color: #fff; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.08); white-space: nowrap; border-left: 3px solid var(--lg); }
.ticker a:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.ticker a small { color: var(--lg); font-size: 10px; letter-spacing: .08em; margin-right: 2px; }
.ticker a img { width: 18px; height: 18px; }
.ticker a em { font-style: normal; color: #fca5a5; font-size: 12px; margin-left: 4px; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ---------- Layout ---------- */
.app { max-width: 1200px; margin: 0 auto; padding: 20px 20px 48px; min-height: 60vh; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 5px; height: 22px; background: var(--lg); border-radius: 2px; }
.section-head h2 a { color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.section-head h2 .sub { font-size: 15px; text-transform: none; font-family: var(--font-body); font-weight: 500; }
.lg-logo { width: 26px; height: 26px; object-fit: contain; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-st { grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); }
@media (max-width: 620px) { .grid-st { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card h3 { margin-bottom: 8px; }
.footer { max-width: 1200px; margin: 0 auto; padding: 24px 20px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
.footer-meta { margin-top: 6px; }
.footer a { color: var(--text-2); }

/* ---------- Hero / league strip ---------- */
.hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 24px; border-radius: var(--radius); background: radial-gradient(900px 260px at 0% 0%, color-mix(in srgb, var(--lg) 18%, transparent), transparent 60%), linear-gradient(135deg, #141c2c 0%, var(--surface) 70%); border: 1px solid var(--border); }
.hero img { width: 96px; height: 96px; object-fit: contain; }
.hero p { margin: 8px 0 0; max-width: 720px; }
.eyebrow { color: var(--lg); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.eyebrow img { width: 18px; height: 18px; object-fit: contain; }
.hero .record { font-family: var(--font-head); font-size: 20px; color: var(--text-2); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.hero .record b { color: #fff; font-size: 28px; }
.hero-right { margin-left: auto; text-align: right; color: var(--text-2); font-size: 14px; }
.hero-right .countdown { justify-content: flex-end; margin-top: 8px; }
.next-line { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-family: var(--font-head); font-size: 20px; text-transform: uppercase; }
.next-line img { width: 28px; height: 28px; }
.score-line { font-family: var(--font-head); font-size: 32px; color: #fff; }
@media (max-width: 700px) { .hero-right { margin-left: 0; text-align: left; } .hero-right .countdown { justify-content: flex-start; } }
.team-hero { background: radial-gradient(900px 300px at 0% 0%, color-mix(in srgb, var(--tc) 55%, transparent), transparent 60%), linear-gradient(135deg, #141c2c 0%, var(--surface) 70%); }
.league-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; }
.lg-chip { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--lg); color: inherit; }
.lg-chip:hover { background: var(--surface-2); text-decoration: none; }
.lg-chip img { width: 32px; height: 32px; object-fit: contain; }
.lg-chip span { display: flex; flex-direction: column; line-height: 1.2; }
.lg-chip b { font-family: var(--font-head); font-size: 18px; letter-spacing: .04em; }
.lg-chip small { color: var(--muted); font-size: 11px; }
.lg-chip .lg-live { margin-left: auto; flex-direction: row; }

/* ---------- Stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.tile .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tile .value { font-family: var(--font-head); font-size: 28px; font-weight: 600; margin-top: 2px; line-height: 1.1; }
.tile .sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.rank { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); margin-left: 6px; vertical-align: middle; font-family: var(--font-body); }
.rank.top { background: color-mix(in srgb, var(--lg) 22%, transparent); color: var(--lg); }
small.rank { margin: 0 4px 0 0; padding: 0 5px; font-size: 11px; color: var(--lg); background: color-mix(in srgb, var(--lg) 18%, transparent); font-weight: 700; }

/* ---------- Scoreboard cards ---------- */
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sb-grid > * { min-width: 0; }
.app, .footer, .subnav-inner { min-width: 0; }
body { overflow-x: hidden; }
.sb-grid-lg { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sb-grid-lg .sb-card { font-size: 14px; padding: 10px 12px; }
.sb-card { display: block; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px 9px; color: inherit; font-size: 13px; border-left: 3px solid var(--lg); }
.sb-card:hover { background: var(--surface-2); text-decoration: none; border-color: var(--surface-3); border-left-color: var(--lg); }
.sb-card.in { border-color: #7f1d1d; border-left-color: var(--danger); }
.sb-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-card.in .sb-status { color: #fca5a5; }
.sb-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); animation: pulse 1.2s infinite; flex: none; }
.sb-status .rz { color: var(--accent); font-weight: 700; }
.sb-note { margin-left: auto; color: var(--lg); overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: 0; }
.sb-team { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 6px; padding: 2px 0; }
.sb-team img { width: 22px; height: 22px; object-fit: contain; }
.sb-name { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.sb-abbr { font-family: var(--font-head); font-size: 16px; letter-spacing: .02em; }
.sb-full { display: none; color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-grid-lg .sb-full { display: inline; }
.sb-score { font-family: var(--font-head); font-size: 19px; min-width: 24px; text-align: right; font-variant-numeric: tabular-nums; display: inline-flex; align-items: baseline; gap: 6px; justify-content: flex-end; }
.sb-score small { font-family: var(--font-body); font-size: 11px; color: var(--muted); font-weight: 400; }
.sb-score .he { font-size: 10px; }
.sb-team.win .sb-abbr, .sb-team.win .sb-score { color: #fff; }
.sb-team.lose { opacity: .55; }
.sb-poss { font-size: 11px; }
.sb-dd { font-size: 11px; color: var(--text-2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-dd.bb { display: flex; align-items: center; gap: 8px; }
@media (max-width: 600px) { .sb-grid { grid-template-columns: repeat(2, 1fr); } .sb-grid-lg { grid-template-columns: 1fr; } }

/* Baseball: bases + outs */
.diamond { position: relative; width: 18px; height: 18px; display: inline-block; flex: none; }
.diamond i { position: absolute; width: 7px; height: 7px; background: var(--surface-3); transform: rotate(45deg); border: 1px solid var(--border); }
.diamond i.on { background: var(--accent); border-color: var(--accent); }
.diamond .b1 { right: 0; top: 5px; } .diamond .b2 { left: 5.5px; top: 0; } .diamond .b3 { left: 0; top: 5px; }
.diamond.big { width: 30px; height: 30px; }
.diamond.big i { width: 12px; height: 12px; }
.diamond.big .b1 { right: 0; top: 9px; } .diamond.big .b2 { left: 9px; top: 0; } .diamond.big .b3 { left: 0; top: 9px; }
.outs { display: inline-flex; gap: 3px; }
.outs i { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border); }
.outs i.on { background: var(--danger); border-color: var(--danger); }

/* ---------- Team directory ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.team-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--tc); color: inherit; }
.team-tile:hover { background: var(--surface-2); text-decoration: none; }
.team-tile img { width: 36px; height: 36px; object-fit: contain; }
.team-tile span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.team-tile b { font-family: var(--font-head); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-tile small { color: var(--muted); font-size: 11px; }

/* ---------- Schedule list ---------- */
.sched { display: flex; flex-direction: column; gap: 8px; }
.sched-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; color: inherit; transition: background .15s; }
.sched-row:hover { background: var(--surface-2); text-decoration: none; }
.sched-row .week { font-family: var(--font-head); color: var(--muted); font-size: 12px; text-transform: uppercase; }
.sched-row .week b { display: block; font-size: 22px; color: var(--text); }
.sched-row .opp { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sched-row .opp img { width: 36px; height: 36px; flex: none; object-fit: contain; }
.sched-row .opp > div { min-width: 0; flex: 1; }
.sched-row .opp .n { font-family: var(--font-head); font-size: 18px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-row .opp .n small { color: var(--muted); font-size: 13px; margin-right: 6px; }
.sched-row .opp .d { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-row .res { text-align: right; min-width: 100px; }
.sched-row .res .s { font-family: var(--font-head); font-size: 20px; }
.sched-row .res .t { color: var(--muted); font-size: 12px; }
.sched-row.live { border-color: #7f1d1d; box-shadow: inset 4px 0 0 var(--danger); }
.res-w { color: var(--win); } .res-l { color: var(--loss); } .res-t { color: var(--tie); }
@media (max-width: 600px) { .sched-row { grid-template-columns: 44px 1fr auto; padding: 8px 10px; gap: 8px; } .sched-row .opp img { width: 30px; height: 30px; } .sched-row .opp .n { font-size: 16px; } .sched-row .res { min-width: 72px; } .sched-row .res .s { font-size: 17px; } }

/* ---------- Controls ---------- */
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.controls select, .controls input { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-height: 38px; }
.controls input[type="search"] { min-width: 200px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.chip:hover { background: var(--surface-3); }
.chip.active { background: var(--lg); color: #0b0f16; border-color: var(--lg); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--text-2); padding: 10px 14px; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab:hover { color: #fff; text-decoration: none; }
.tab.active { color: #fff; border-bottom-color: var(--lg); }
.tab-logo { width: 20px; height: 20px; object-fit: contain; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 8px; background: var(--lg); color: #0b0f16; font-weight: 700; border: 0; text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-head); font-size: 14px; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--lg); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
.tbl th[data-sort] { cursor: pointer; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr.hl td { background: color-mix(in srgb, var(--lg) 10%, transparent); }
.tbl tr.hl td:first-child { box-shadow: inset 3px 0 0 var(--lg); }
.tbl tr.cut td { border-bottom: 2px dashed var(--accent); }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.sub-head td { background: var(--surface-2); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px; }
.tbl tr.totals td { background: var(--surface-2); }
.tbl .team-cell, .team-cell { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.team-cell img { width: 24px; height: 24px; object-fit: contain; }
.team-cell .pos { width: 16px; text-align: right; }
.tbl .tot { border-left: 1px solid var(--border); }
.linescore td:first-child, .linescore th:first-child { text-align: left; }
.player-cell { display: flex; align-items: center; gap: 10px; }
.player-cell img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.player-cell .nm { font-weight: 600; }
.box-cat { margin: 14px 0 6px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.team-h { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.team-h img { width: 22px; height: 22px; object-fit: contain; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.badge.out, .badge.ir { background: rgba(239,68,68,.18); color: #fca5a5; }
.badge.doubtful { background: rgba(249,115,22,.18); color: #fdba74; }
.badge.questionable { background: rgba(245,158,11,.18); color: #fcd34d; }
.badge.probable, .badge.active { background: rgba(74,222,128,.15); color: #86efac; }
.badge.neutral { background: var(--surface-3); color: var(--text-2); }
.badge.live { background: var(--danger); color: #fff; }
.badge.gold { background: color-mix(in srgb, var(--lg) 20%, transparent); color: var(--lg); }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: inherit; }
.news-card:hover { text-decoration: none; border-color: var(--surface-3); }
.news-card .img { position: relative; aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.news-card .img img { width: 100%; height: 100%; object-fit: cover; }
.news-card .img.noimg { background: linear-gradient(135deg, color-mix(in srgb, var(--lg) 30%, var(--surface-2)) 0%, var(--surface-2) 100%); }
.news-card .play-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; border: 2px solid rgba(255,255,255,.7); }
.news-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.news-card .type { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--lg); font-weight: 700; }
.news-card h3 { font-family: var(--font-body); font-size: 16px; font-weight: 700; line-height: 1.3; }
.news-card p { margin: 0; color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .meta { margin-top: auto; padding-top: 6px; color: var(--muted); font-size: 12px; }
.news-list { display: flex; flex-direction: column; gap: 6px; }
.news-item { display: flex; gap: 12px; color: inherit; padding: 8px; border-radius: var(--radius-sm); }
.news-item:hover { background: var(--surface-2); text-decoration: none; }
.news-item img { width: 88px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface-2); }
.news-item .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.news-item .m { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* ---------- Game center ---------- */
.game-card-head { border-top: 3px solid var(--lg); }
.game-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 22px 24px; }
.game-head .team { display: flex; align-items: center; gap: 14px; min-width: 0; }
.game-head .team.home { flex-direction: row-reverse; text-align: right; }
.game-head .team img { width: 72px; height: 72px; object-fit: contain; }
.game-head .team .name { font-family: var(--font-head); font-size: 24px; text-transform: uppercase; line-height: 1.1; }
.game-head .team .name a { color: inherit; }
.game-head .team .rec { color: var(--muted); font-size: 13px; }
.game-head .score { font-family: var(--font-head); font-size: 56px; font-weight: 700; line-height: 1; }
.game-head .score.loser { color: var(--muted); }
.game-head .status { text-align: center; }
.game-head .status .st { font-family: var(--font-head); font-size: 18px; text-transform: uppercase; color: var(--lg); }
.game-head .status .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
@media (max-width: 700px) {
  .game-head { grid-template-columns: 1fr; padding: 16px; }
  .game-head .team, .game-head .team.home { flex-direction: row; text-align: left; justify-content: space-between; }
  .game-head .team img { width: 52px; height: 52px; }
  .game-head .score { font-size: 40px; }
}
.sit { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; padding: 10px 24px 16px; border-top: 1px solid var(--border); font-size: 14px; }
.sit .rz { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: 12px; }
.countdown { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.countdown div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; min-width: 62px; text-align: center; }
.countdown b { display: block; font-family: var(--font-head); font-size: 26px; color: var(--lg); }
.countdown span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.plays { display: flex; flex-direction: column; }
.play { display: grid; grid-template-columns: 60px 30px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.play:last-child { border-bottom: 0; }
.play .q { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.play .q b { display: block; color: var(--text); font-size: 13px; }
.play img { width: 28px; height: 28px; object-fit: contain; }
.play .txt { font-size: 14px; }
.play .txt .type { color: var(--lg); font-weight: 700; font-size: 12px; text-transform: uppercase; margin-right: 6px; }
.play .sc { font-family: var(--font-head); font-size: 16px; white-space: nowrap; }
@media (max-width: 600px) { .play { grid-template-columns: 50px 24px 1fr; } .play .sc { grid-column: 3; text-align: right; } }
.cmp { display: flex; flex-direction: column; gap: 12px; }
.cmp-row .lbl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.cmp-row .lbl .k { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.cmp-row .bars { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; height: 10px; }
.cmp-row .bar { position: relative; height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.cmp-row .bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.cmp-row .bar.l i { right: 0; background: var(--away); }
.cmp-row .bar.r i { left: 0; background: var(--home); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--sw); }
.more-stats { margin-top: 14px; }
.more-stats summary { cursor: pointer; color: var(--lg); font-weight: 600; font-size: 13px; }
.drives { display: flex; flex-direction: column; gap: 6px; }
.drive { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.drive.score { border-left: 3px solid var(--win); }
.drive summary { cursor: pointer; padding: 10px 12px; display: flex; align-items: center; gap: 10px; list-style: none; flex-wrap: wrap; }
.drive summary::-webkit-details-marker { display: none; }
.drive summary img { width: 22px; height: 22px; object-fit: contain; }
.drive summary .res { font-family: var(--font-head); font-size: 16px; text-transform: uppercase; }
.drive-plays { padding: 4px 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.pbp { display: grid; grid-template-columns: 78px 1fr; gap: 8px; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--border); align-items: center; }
.pbp .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pbp .dd { color: var(--text-2); font-size: 12px; }
.pbp.score { color: #fff; }
.pbp.score > span:last-of-type::before, .pbp.score .dd + span::before { content: "●"; color: var(--win); margin-right: 6px; font-size: 10px; }
.pbp.to > span:last-child::before { content: "●"; color: var(--loss); margin-right: 6px; font-size: 10px; }
.pbp img { width: 18px; height: 18px; object-fit: contain; }
.pbp .nologo { width: 18px; }
.pbp .sc { font-family: var(--font-head); font-size: 15px; }
.pbp-groups .pbp { grid-template-columns: 52px 18px 1fr auto; }
.drive-plays .pbp:has(.dd) { grid-template-columns: 78px auto 1fr; }
.wp { width: 100%; height: 140px; display: block; background: var(--surface-2); border-radius: var(--radius-sm); }
.wp .mid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 4 4; }
.wp .line { fill: none; stroke: var(--lg); stroke-width: 2; vector-effect: non-scaling-stroke; }
.wp-labels, .wp-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 4px 0; }
.wp-labels span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); }
.wp-labels img { width: 20px; height: 20px; }
.pred-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.pred-bar i { display: block; height: 100%; }

/* ---------- Leaders ---------- */
.leader-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.leader-card .cat { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.leader { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.leader.clickable { cursor: pointer; }
.leader:last-child { border-bottom: 0; }
.leader img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.leader.first img { width: 52px; height: 52px; }
.leader .nm { font-weight: 600; font-size: 14px; }
.leader .pos { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.leader .pos .tlogo { width: 14px; height: 14px; border-radius: 0; }
.leader .val { margin-left: auto; font-family: var(--font-head); font-size: 22px; white-space: nowrap; }
.leader .val.small { font-size: 14px; font-family: var(--font-body); color: var(--text-2); text-align: right; white-space: normal; max-width: 45%; }
.leader.first .val { font-size: 28px; color: var(--lg); }
.leader .lrank { width: 14px; font-size: 12px; text-align: right; }
.leader .pos.line { font-size: 11px; white-space: normal; line-height: 1.3; }
.leader > div { min-width: 0; }

/* ---------- Standings ---------- */
.standings-group { margin-bottom: 16px; }
.standings-group h3 { padding: 12px 16px 8px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; font-size: 14px; }
.standings-group h3 .muted { text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 400; margin-left: 8px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.modal-panel { position: relative; width: min(860px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.modal-close { position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-3); color: #fff; font-size: 22px; line-height: 1; z-index: 1; }
.modal-body { padding: 22px; }
.player-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.player-head img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; background: var(--surface-3); border: 3px solid var(--lg); }
.player-head .num { font-family: var(--font-head); font-size: 40px; color: var(--lg); line-height: 1; }
.player-head h2 { font-size: 30px; }
.player-head .bio { color: var(--text-2); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 600px) { .modal { padding: 8px; } .modal-body { padding: 16px; } .player-head img { width: 80px; height: 80px; } }

/* ---------- Skeleton / empty / error / update bar ---------- */
.skeleton { display: flex; flex-direction: column; gap: 12px; }
.skeleton .sk { height: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton .sk.lg { height: 120px; }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.error { padding: 16px; border-radius: var(--radius); background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); color: #fecaca; }
.banner { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 110px; padding: 20px 24px; margin-bottom: 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: radial-gradient(800px 240px at 0% 0%, color-mix(in srgb, var(--lg) 22%, transparent), transparent 60%), linear-gradient(135deg, #141c2c 0%, var(--surface) 70%); }
.banner p { margin: 6px 0 0; }
@media (max-width: 600px) { .banner { min-height: 90px; padding: 14px 16px; } }
.update-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--surface-3); border: 1px solid var(--lg); border-radius: 999px; box-shadow: var(--shadow); font-size: 14px; max-width: calc(100% - 24px); }
.update-bar button { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--lg); color: #0b0f16; font-weight: 700; }
.update-bar .update-later { background: transparent; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(20px); opacity: 0; transition: all .3s; z-index: 91; background: var(--surface-3); border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; font-size: 14px; }
.toast.show { transform: translateX(-50%); opacity: 1; }

/* ---------- Favorites ---------- */
.fav-btn { background: none; border: 0; padding: 0 4px; color: var(--muted); font-size: 18px; line-height: 1; display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.fav-btn:hover, .fav-btn.on { color: var(--accent); }
.fav-btn .lbl { font-size: 13px; font-weight: 600; color: var(--text-2); }
.fav-btn.on .lbl { color: var(--accent); }
.team-hero .fav-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); }
.team-hero .fav-btn.on { border-color: var(--accent); }
.team-tile .fav-btn { margin-left: auto; }
.team-tile.fav { border-color: var(--accent); }
.tbl .team-cell .fav-btn { font-size: 15px; opacity: .5; }
.tbl .team-cell .fav-btn.on { opacity: 1; }
.tbl tr:hover .fav-btn { opacity: 1; }
.sb-card.fav { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.sb-card.fav.in { border-left-color: var(--danger); }
.sb-team.fav .sb-abbr { color: var(--accent); }
.sb-name .star { color: var(--accent); font-size: 11px; margin-right: 2px; }
.fav-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fav-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--lg); color: var(--text); font-weight: 600; font-size: 13px; }
.fav-chip:hover { background: var(--surface-2); text-decoration: none; }
.fav-chip img { width: 20px; height: 20px; object-fit: contain; }

/* ---------- History / head-to-head ---------- */
.h2h-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 8px 0 6px; }
.h2h-head span { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 18px; text-transform: uppercase; min-width: 0; }
.h2h-head span:last-child { justify-content: flex-end; text-align: right; }
.h2h-head img { width: 32px; height: 32px; object-fit: contain; }
.h2h-head b { font-family: var(--font-head); font-size: 32px; white-space: nowrap; }
.h2h-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.h2h-bar i { display: block; height: 100%; }
details.collapsible { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
details.collapsible summary { cursor: pointer; padding: 10px 14px; font-family: var(--font-head); font-size: 15px; text-transform: uppercase; letter-spacing: .03em; list-style: none; display: flex; justify-content: space-between; }
details.collapsible summary::-webkit-details-marker { display: none; }
details.collapsible summary::after { content: "+"; color: var(--lg); }
details.collapsible[open] summary::after { content: "–"; }
details.collapsible .table-wrap { padding: 0 8px 8px; }
.tbl th[data-sort]::after { content: " ↕"; color: var(--muted); font-size: 9px; }
.tbl th[data-dir="asc"]::after { content: " ↑"; color: var(--lg); }
.tbl th[data-dir="desc"]::after { content: " ↓"; color: var(--lg); }
tr.muted td { color: var(--muted); }
@media (max-width: 700px) { .h2h-head { grid-template-columns: 1fr; } .h2h-head span:last-child { justify-content: flex-start; flex-direction: row-reverse; } .h2h-head b { text-align: center; } }

/* ---------- Soccer: timeline, form ---------- */
.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 44px 24px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.tl:last-child { border-bottom: 0; }
.tl-min { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-who img { width: 20px; height: 20px; object-fit: contain; flex: none; }
.tl.goal { color: #fff; }
.tl-score { font-family: var(--font-head); font-size: 17px; }
.res-d { color: var(--tie); }
.form i { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 4px; font-style: normal; font-size: 12px; font-weight: 700; margin-left: 3px; background: var(--surface-3); color: var(--text-2); }
.form .f-w { background: rgba(74,222,128,.25); color: var(--win); } .form .f-l { background: rgba(248,113,113,.25); color: var(--loss); } .form .f-d { background: rgba(251,191,36,.2); color: var(--tie); }
tr.subbed .pl { color: var(--muted); }

/* ---------- Standings zones (European spots, relegation, play-in) ---------- */
.zone { width: 4px; height: 22px; border-radius: 2px; background: var(--z); flex: none; margin-right: 2px; }
.zone-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 16px 12px; margin: 0; }
.zone-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--z); margin-right: 6px; vertical-align: middle; }
.tbl tr.releg td { background: rgba(239,68,68,.06); }
