/* ==========================================================================
   JMAC Sports — design tokens
   ========================================================================== */

:root,
:root[data-theme="dark"] {
  --bg: #070a10;
  --bg-glow-1: rgba(37, 99, 235, 0.14);
  --bg-glow-2: rgba(14, 116, 144, 0.10);
  --surface: #0e1522;
  --surface-2: #131c2c;
  --surface-3: #18233a;
  --ink: #e8eef8;
  --muted: #94a5c0;
  --faint: #64748b;
  --line: rgba(148, 163, 184, 0.13);
  --line-strong: rgba(148, 163, 184, 0.26);
  --accent: #4f9cf9;
  --accent-strong: #2f7fe8;
  --accent-soft: rgba(79, 156, 249, 0.14);
  --accent-ink: #a8ceff;
  --live: #2fd484;
  --live-soft: rgba(47, 212, 132, 0.13);
  --warn: #f2b950;
  --warn-soft: rgba(242, 185, 80, 0.13);
  --bad: #f26d6d;
  --gold: #f5c84c;
  --gold-soft: rgba(245, 200, 76, 0.12);
  --teal: #3fd3c0;
  --teal-soft: rgba(63, 211, 192, 0.13);
  --shadow-card: 0 1px 2px rgba(2, 6, 16, 0.5);
  --shadow-pop: 0 12px 32px rgba(2, 6, 16, 0.45);
  --topbar-bg: #0b111c;
}

:root[data-theme="light"] {
  --bg: #eef1f6;
  --bg-glow-1: rgba(37, 99, 235, 0.08);
  --bg-glow-2: rgba(13, 148, 136, 0.06);
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eef2f8;
  --ink: #101828;
  --muted: #51617c;
  --faint: #8494ab;
  --line: rgba(16, 24, 40, 0.10);
  --line-strong: rgba(16, 24, 40, 0.20);
  --accent: #2563eb;
  --accent-strong: #1d4fd7;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --accent-ink: #1d4fd7;
  --live: #0c9d61;
  --live-soft: rgba(12, 157, 97, 0.11);
  --warn: #b97b0c;
  --warn-soft: rgba(185, 123, 12, 0.12);
  --bad: #d64545;
  --gold: #b8860b;
  --gold-soft: rgba(184, 134, 11, 0.12);
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, 0.11);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-pop: 0 12px 32px rgba(16, 24, 40, 0.10);
  --topbar-bg: #f4f6fa;
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1100px 500px at 15% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(900px 420px at 90% -10%, var(--bg-glow-2), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, select, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; }
h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; line-height: 1.1; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
h4 { font-size: 14px; font-weight: 700; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--accent-soft); }

/* ==========================================================================
   Topbar
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
}

.topbar-row {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-row--filters {
  padding-top: 0;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand em { font-style: normal; color: var(--accent); }

.section-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }

.section-nav a {
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.section-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.section-nav a.active { color: var(--accent-ink); background: var(--accent-soft); }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.icon-button:active { transform: scale(0.96); }
.icon-button svg { width: 16px; height: 16px; flex: 0 0 auto; }

.icon-button--spin svg { transition: transform 0.4s ease; }
.icon-button--spin:hover svg { transform: rotate(90deg); }

.theme-icon--sun { display: none; }
:root[data-theme="light"] .theme-icon--sun { display: block; }
:root[data-theme="light"] .theme-icon--moon { display: none; }

/* League filter chips */

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  margin: -2px;
}
.chip-row::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.chip:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }

.chip.active {
  color: #fff;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.chip-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.chip.active .chip-count { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* ==========================================================================
   Page scaffold
   ========================================================================== */

.app {
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 20px 60px;
  display: grid;
  gap: 40px;
}

.section { scroll-margin-top: 118px; display: grid; gap: 16px; }

.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lede { margin: 8px 0 0; color: var(--muted); max-width: 62ch; }

.board-stats { display: flex; flex-wrap: wrap; gap: 8px; }

.stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-size: 13px;
  color: var(--muted);
}

.stat-chip strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stat-chip--live strong { color: var(--live); }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.section-sub { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }

.section-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.updated-note { color: var(--faint); font-size: 12.5px; white-space: nowrap; }

.subsection-title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.ghost-button:hover { color: var(--ink); background: var(--surface-2); border-color: var(--line-strong); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { filter: brightness(1.08); box-shadow: 0 4px 14px var(--accent-soft); }
.button:active { transform: scale(0.98); }

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

/* ==========================================================================
   Status chips
   ========================================================================== */

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip--live { background: var(--live-soft); color: var(--live); }
.status-chip--final { background: var(--surface-3); color: var(--muted); }
.status-chip--soon { background: var(--warn-soft); color: var(--warn); }

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--live);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* ==========================================================================
   Score ticker
   ========================================================================== */

.ticker {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: -2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.ticker-card {
  flex: 0 0 auto;
  width: 178px;
  scroll-snap-align: start;
  display: grid;
  gap: 7px;
  padding: 11px 13px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.ticker-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }

.ticker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  font-size: 11px;
  color: var(--faint);
}

.ticker-league {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ticker-head .status-chip { flex: 0 0 auto; }

.ticker-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

.ticker-team-id { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ticker-team-id span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker-team img { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }
.ticker-team strong { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.ticker-team.winner { color: var(--ink); }
.ticker-team.winner strong { color: var(--ink); }

/* ==========================================================================
   Spotlight (headline game)
   ========================================================================== */

.headline-card {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
  border-radius: 18px;
  background:
    radial-gradient(600px 220px at 0% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.headline-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.headline-title { font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; }

.headline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.headline-score { display: flex; gap: 12px; flex-wrap: wrap; }

.score-pill {
  display: grid;
  gap: 3px;
  min-width: 150px;
  padding: 12px 15px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.score-pill.winner { border-color: var(--live); background: var(--live-soft); }

.team-pill-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.team-pill-head img { width: 20px; height: 20px; object-fit: contain; }
.score-pill strong { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.score-pill .muted { font-size: 12.5px; }

/* ==========================================================================
   Score groups & cards
   ========================================================================== */

.score-groups { display: grid; gap: 22px; }

.score-group { display: grid; gap: 12px; }

.group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.group-title .muted { font-weight: 500; font-size: 13px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.score-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.score-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-pop);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-head-meta { display: grid; gap: 4px; min-width: 0; }

.card-context {
  color: var(--faint);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  text-align: right;
}

.card-detail { color: var(--muted); font-size: 12.5px; }

.card-fav {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.teams { display: grid; }

.team-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.team-row:last-child { border-bottom: 0; padding-bottom: 0; }
.team-row:first-child { padding-top: 0; }

.team-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }

.team-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: 0 0 auto;
}

.team-logo--flag { border-radius: 999px; }

.team-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-meta { display: block; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }

.team-score {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.team-row.winner .team-name,
.team-row.winner .team-score { color: var(--ink); }

.team-row.winner .team-score { position: relative; }

/* ==========================================================================
   World Cup
   ========================================================================== */

.wc-columns { align-items: stretch; }

.world-cup-card--final { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--surface)); }
.world-cup-card--third-place { border-color: var(--line-strong); }

.world-cup-stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.world-cup-stage-pill--muted { border-color: var(--line-strong); background: var(--surface-3); color: var(--muted); }

.usa-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.usa-highlight { border-color: var(--accent); }

.world-cup-card-flags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.world-cup-team-row--champion .team-name::after { content: " 🏆"; }

.world-cup-bracket {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
}

.world-cup-round {
  flex: 0 0 264px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  border-radius: 15px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  scroll-snap-align: start;
}

.world-cup-round--final { background: linear-gradient(180deg, var(--gold-soft), var(--surface-2)); border-color: var(--gold); }
.world-cup-round--final .world-cup-round-label { color: var(--gold); }

.world-cup-round-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.world-cup-round-label { font-weight: 800; font-size: 14px; }
.world-cup-round-count { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.world-cup-round-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* Guard against long strings forcing a card wider than its column (grid/flex
   min-content overflow) — cards must shrink to the round width, never spill. */
.world-cup-round .world-cup-card { min-width: 0; max-width: 100%; }
.world-cup-card .card-head { min-width: 0; }

.world-cup-scores--compact .score-card { padding: 11px 13px; }
.world-cup-scores--compact .team-row { padding: 5px 0; }
.world-cup-scores--compact .team-name { font-size: 13.5px; }
.world-cup-scores--compact .team-score { font-size: 18px; }

/* ==========================================================================
   Standings (tabbed)
   ========================================================================== */

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  padding: 9px 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 700; }

.standings-panel { display: none; }
.standings-panel.active { display: grid; gap: 18px; }

.standings-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
  align-items: start;
}

.standings-card {
  display: grid;
  gap: 10px;
  padding: 15px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.table-scroll { overflow-x: auto; }

.standings-table, .poll-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.standings-table th, .poll-table th {
  padding: 7px 8px;
  text-align: left;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.standings-table td, .poll-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.standings-table tbody tr:last-child td,
.poll-table tbody tr:last-child td { border-bottom: 0; }

.standings-table tbody tr:hover td,
.poll-table tbody tr:hover td { background: var(--surface-2); }

.standings-table td:first-child, .poll-table td:nth-child(2) { font-weight: 600; white-space: normal; min-width: 140px; }

.poll-table td:first-child { color: var(--accent-ink); font-weight: 800; }

/* ==========================================================================
   News
   ========================================================================== */

.news-groups { display: grid; gap: 22px; }

.news-group { display: grid; gap: 12px; }

.news-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
  align-items: start;
}

.news-card {
  display: grid;
  gap: 10px;
  padding: 15px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.source-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.source-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
}

.news-list { display: grid; }

.news-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: baseline;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: 10px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.news-item:last-of-type { border-bottom: 0; }
.news-item:hover { background: var(--surface-2); }
.news-item:hover .news-item-title { color: var(--accent-ink); }

.news-tag {
  align-self: start;
  margin-top: 2px;
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-tag--wire { background: var(--accent-soft); color: var(--accent-ink); }
.news-tag--beat { background: var(--teal-soft); color: var(--teal); }
.news-tag--rumor { background: var(--warn-soft); color: var(--warn); }

.news-item-body { display: grid; gap: 3px; min-width: 0; }

.news-item-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-meta { color: var(--faint); font-size: 12px; }

.news-more {
  justify-self: start;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.news-more:hover { color: var(--ink); background: var(--surface-2); }

/* ==========================================================================
   Settings page
   ========================================================================== */

.settings-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  align-items: start;
}

.settings-column { display: grid; gap: 16px; }

.settings-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.settings-card > p { margin: 0; }

.field-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field::placeholder { color: var(--faint); }

.inline { display: flex; flex-wrap: wrap; gap: 9px; }

.preset-button, .toggle-button {
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.preset-button:hover, .toggle-button:hover { color: var(--ink); border-color: var(--line-strong); }

.toggle-button { display: inline-flex; align-items: center; gap: 8px; }
.toggle-button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--faint);
  transition: background 0.15s ease;
}

.toggle-button.active { color: var(--live); border-color: var(--live); background: var(--live-soft); }
.toggle-button.active::before { background: var(--live); }

.small-note { margin: 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; }

.favorites-list { display: grid; gap: 8px; }

.favorite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease;
}

.favorite-item:hover { border-color: var(--line-strong); }

.favorite-title { font-weight: 700; font-size: 14.5px; }

.league-tag {
  display: inline-block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 12.5px;
}

.remove-button {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.remove-button:hover { color: var(--bad); border-color: var(--bad); background: transparent; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--faint);
  font-size: 12.5px;
  text-align: center;
}

.site-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .settings-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .app { padding: 18px 14px 48px; gap: 32px; }
  .topbar-row { padding: 9px 14px; gap: 10px; }
  .topbar-row--filters { padding-bottom: 9px; }
  .section-nav { order: 3; flex-basis: 100%; margin: 0 -14px; padding: 0 14px; }
  .topbar-row--main { flex-wrap: wrap; }
  .section { scroll-margin-top: 158px; }
  .updated-note { display: none; }
  .section-header .updated-note { display: inline; }
  .board-head { flex-direction: column; align-items: flex-start; }
  .card-grid { grid-template-columns: 1fr; }
  .news-group-cards { grid-template-columns: 1fr; }
  .standings-groups { grid-template-columns: 1fr; }
  .headline-card { padding: 16px; }
  .score-pill { flex: 1 1 130px; min-width: 0; }
  .world-cup-round { flex-basis: 82vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
