:root {
  --bg: #0a1729;
  --bg-soft: #112947;
  --card: #112947;
  --accent: #ffc400;
  --accent-soft: rgba(255, 196, 0, .18);
  --text: #f5f7fb;
  --muted: #c3cedf;
  --border: #38516e;
  --radius: 18px;
  --table-row-even: #132f50;
  --table-row-odd: #112947;
  --table-row-highlight: rgba(255, 196, 0, .18);
  --fixture-bg: #132f50;
  --fixture-border: #38516e;
  --fixture-meta: #c3cedf;
}
body.theme-light {
  --bg: #eef1f5;
  --bg-soft: #f7f9fb;
  --card: #fff;
  --text: #0b1f3a;
  --muted: #4a5568;
  --border: #dde2ea;
  --table-row-even: #f7f9fb;
  --table-row-odd: #fff;
  --table-row-highlight: #fff5c7;
  --fixture-bg: #f7f9fb;
  --fixture-border: #dde2ea;
  --fixture-meta: #4a5568;
}
body { display: block; min-height: 100vh; padding: 0; background: var(--bg); color: var(--text); font: 17px/1.4 Barlow, system-ui, sans-serif; }
.app { width: 100%; max-width: 1100px; margin: 0 auto; padding: 16px 16px 42px; gap: 16px; }
.site-header { display: block; width: 100%; margin: 0; padding: 22px 16px 24px; background: #0b1f3a; color: #fff; }
.header-inner { width: 100%; max-width: 1100px; margin: 0 auto; }
.title-row { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.brand-row { display: flex; align-items: center; gap: 14px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; border: 3px solid var(--accent); border-radius: 50%; color: #fff; font: 800 18px/1 'Barlow Condensed', sans-serif; text-decoration: none; }
h1 { display: block; color: #fff; font: 800 clamp(30px, 4vw, 36px)/1 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .5px; }
.subtitle { margin-top: 3px; color: #c3cedf; font-size: 16px; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.team-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(380px, 100%); padding: 6px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.theme-light .team-tabs { border: 0; background: rgba(255, 255, 255, .08); }
.team-btn { display: flex; flex-direction: column; justify-content: center; min-height: 60px; padding: 6px 12px; border: 0; border-radius: 10px; background: transparent; color: #fff; font-size: 21px; font-weight: 700; line-height: 1.1; }
.theme-light .team-btn { color: #fff; }
.team-btn span { color: #c3cedf; font-size: 15px; font-weight: 500; line-height: 1.2; opacity: 1; }
.team-btn.active, body.theme-light .team-btn.active { background: var(--accent); color: #0b1f3a; box-shadow: none; transform: none; }
.team-btn.active span { color: #0b1f3a; }
.team-btn:hover { background: rgba(255, 255, 255, .16); }
.team-btn.active:hover { background: var(--accent); }
.home-link, .theme-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 15px; line-height: 1.2; text-decoration: none; box-shadow: none; }
.home-link:hover, .theme-toggle:hover { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; transform: none; }
.theme-toggle { cursor: pointer; }
.theme-toggle span { color: #fff; }
.group-section { margin-top: 0; gap: 16px; }
.card, body.theme-light .card { width: 100%; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: 0 1px 3px rgba(11, 31, 58, .08); }
.card::before { display: none; }
.group-section > .card:first-child, body.theme-light .group-section > .card:first-child { padding: 0; border: 0; background: transparent; box-shadow: none; }
.group-section > .card:first-child .card-header { margin-bottom: 14px; }
.card-header { align-items: center; gap: 10px; margin-bottom: 14px; }
.card-title { display: flex; flex-wrap: wrap; font: 800 clamp(24px, 3vw, 30px)/1.1 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.card-title small { color: var(--muted); font: 500 15px/1.3 Barlow, system-ui, sans-serif; text-transform: none; }
.chip, body.theme-light .chip, .round-pill { padding: 5px 10px; border: 0; border-radius: 999px; background: var(--bg-soft); color: var(--text); font-size: 15px; font-weight: 600; }
.small-text { color: var(--muted); font-size: 15px; }
.view-tabs, body.theme-light .view-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; padding: 6px; border: 0; border-radius: 14px; background: #0b1f3a; }
.view-btn, body.theme-light .view-btn { justify-content: center; min-height: 52px; padding: 8px 10px; border-radius: 10px; color: #fff; font-size: 17px; font-weight: 600; }
.view-btn span { display: none; }
.view-btn.active, body.theme-light .view-btn.active { background: var(--accent); color: #0b1f3a; box-shadow: none; transform: none; }
.view-btn:hover { background: rgba(255, 255, 255, .13); }
.view-btn.active:hover { background: var(--accent); }
.table-wrap { overflow-x: auto; }
table { margin-top: 14px; font-size: 16px; }
thead tr, body.theme-light thead tr { background: var(--bg-soft); }
th, body.theme-light th { color: var(--muted); font-size: 13px; font-weight: 700; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); }
tbody tr.highlight { background: var(--table-row-highlight); box-shadow: none; }
tbody tr.highlight td:first-child { border-left: 3px solid var(--accent); }
.team-name { font-weight: 600; }
.team-name span, body.theme-light .team-name span, .pill-team, body.theme-light .pill-team { border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); }
.fixture, body.theme-light .fixture, .calendar-item, body.theme-light .calendar-item { border: 1px solid var(--fixture-border); border-radius: 12px; background: var(--fixture-bg); box-shadow: none; }
.fixture.highlight, body.theme-light .fixture.highlight { border-color: var(--accent); background: var(--table-row-highlight); box-shadow: none; }
.fixture-team, .calendar-teams { color: var(--text); }
.fixture-score, .calendar-score { font: 800 23px/1 'Barlow Condensed', sans-serif; }
.status-pill, body.theme-light .status-pill, .calendar-round-pill, .home-away-pill { border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--text); }
.calendar-teams .opponent, body.theme-light .calendar-teams .opponent { color: var(--text); }
.calendar-item.win { border-color: #25a866; }
.calendar-item.loss { border-color: #e05555; }
.calendar-item.draw { border-color: var(--accent); }
.pill-goals, body.theme-light .pill-goals { border: 0; background: var(--accent); color: #0b1f3a; font-weight: 700; }
footer, body.theme-light footer { color: var(--muted); font-size: 13px; opacity: 1; }
footer a { color: var(--text); }
.brand-mark:focus-visible, .home-link:focus-visible, .theme-toggle:focus-visible, .team-btn:focus-visible, .view-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (max-width: 640px) {
  body { padding: 0; font-size: 16px; }
  .site-header { padding: 22px 16px 20px; }
  .app { padding: 16px 16px 36px; gap: 14px; }
  h1 { font-size: 30px; }
  .controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .team-tabs { grid-column: 1 / -1; width: 100%; }
  .home-link, .theme-toggle { padding: 8px 10px; font-size: 14px; }
  .theme-toggle { width: auto; }
  .view-tabs { width: 100%; }
  .card, body.theme-light .card { padding: 18px; }
  .card-header { align-items: flex-start; }
  table { font-size: 14px; }
  th, td { padding: 9px 5px; }
  .block-standings th:nth-child(n+4):nth-child(-n+8), .block-standings td:nth-child(n+4):nth-child(-n+8) { display: none; }
  .block-standings th:nth-child(2), .block-standings td:nth-child(2) { width: 100%; }
  .fixture, .calendar-item { padding: 12px; }
}
