:root {
  --navy: #09243a;
  --navy-soft: #123b57;
  --cream: #f7f0dd;
  --cream-deep: #e9dfc7;
  --paper: #fffdf7;
  --orange: #f58208;
  --orange-light: #fff0d7;
  --red: #ce211c;
  --green: #337333;
  --ink: #14283a;
  --muted: #607080;
  --line: rgba(9, 36, 58, .14);
  --shadow: 5px 5px 0 rgba(9, 36, 58, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "Montserrat", Arial, sans-serif; line-height: 1.55; }
a { color: inherit; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; transform: translateY(-160%); background: var(--navy); color: white; }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 4px solid var(--cream); background: var(--navy); color: white; }
.header-inner { width: min(1200px, calc(100% - 40px)); min-height: 76px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 180px; text-decoration: none; font-size: 19px; font-weight: 900; letter-spacing: -.045em; }
.brand b, .footer-brand b { color: #ffc15c; }
.brand-logo { display: none; width: 154px; max-height: 44px; object-fit: contain; object-position: left center; }
.brand.has-logo .brand-logo { display: block; }
.brand.has-logo .brand-fallback { display: none; }
.brand-fallback { display: inline-flex; align-items: center; gap: 9px; }
.brand-ball { width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--cream); border-radius: 50%; background: var(--orange); color: var(--navy); font-size: 12px; }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { padding: 10px 15px; border-radius: 999px; color: rgba(255,255,255,.78); text-decoration: none; font-size: 13px; font-weight: 700; transition: background .18s ease, color .18s ease; }
.main-nav a:hover, .main-nav a.is-active { background: rgba(255,255,255,.12); color: white; }
.back-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; color: white; text-decoration: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.back-link:hover { background: rgba(255,255,255,.1); }

.page-hero { position: relative; overflow: hidden; background: var(--navy); color: white; }
.page-hero::after { position: absolute; top: -145px; right: -75px; width: 390px; height: 390px; border: 2px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,.035), 0 0 0 72px rgba(255,255,255,.025); content: ""; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; width: min(1200px, calc(100% - 40px)); min-height: 260px; margin: auto; padding: 46px 0 42px; display: flex; align-items: end; justify-content: space-between; gap: 36px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: #ffcf83; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.eyebrow-dot { width: 9px; height: 9px; border: 2px solid #ffd278; border-radius: 50%; background: var(--orange); }
h1, h2, h3, p { margin-top: 0; }
.page-hero h1 { margin: 0; font-size: clamp(38px, 6vw, 66px); line-height: 1.05; letter-spacing: -.065em; }
.page-hero h1 span { color: #ffbd58; }
.hero-copy { max-width: 550px; margin: 16px 0 0; color: rgba(255,255,255,.74); font-size: 15px; }
.hero-meta { display: flex; gap: 10px; }
.hero-meta div { min-width: 98px; padding: 13px 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(255,255,255,.07); text-align: center; }
.hero-meta strong, .hero-meta span { display: block; }
.hero-meta strong { color: #ffbd58; font-size: 25px; line-height: 1.15; }
.hero-meta span { margin-top: 4px; color: rgba(255,255,255,.75); font-size: 10px; font-weight: 700; }

.prototype-note { width: min(1200px, calc(100% - 40px)); margin: 22px auto 0; padding: 13px 16px; display: flex; align-items: flex-start; gap: 12px; border: 1px solid #f1d39c; border-radius: 13px; background: #fff8e9; color: #62491f; }
.prototype-note__icon { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; border-radius: 50%; background: #f2c76e; color: #493513; font-size: 13px; font-weight: 800; }
.prototype-note p { margin: 0; font-size: 12px; line-height: 1.6; }

.section { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.fixtures-section { padding: 48px 0 58px; }
.standings-section { padding: 50px 0 70px; border-top: 1px solid rgba(9,36,58,.12); }
.section-heading { margin-bottom: 24px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-kicker { margin: 0 0 7px; color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: clamp(25px, 3vw, 36px); line-height: 1.15; letter-spacing: -.05em; }
.section-description { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.match-summary { display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,247,.75); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #bd7840; box-shadow: 0 0 0 4px rgba(189,120,64,.13); }
.filter-panel { margin-bottom: 22px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.filter-label { color: var(--muted); font-size: 11px; font-weight: 800; }
.group-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-button { min-width: 37px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--navy); cursor: pointer; font-size: 11px; font-weight: 800; transition: .16s ease; }
.filter-button:hover { border-color: var(--line); background: #f7f4ec; }
.filter-button.is-active { border-color: var(--navy); background: var(--navy); color: white; }
.court-filter { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 700; }
.court-filter select { min-height: 36px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--navy); font-size: 11px; font-weight: 700; }
.court-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
.court-column { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,247,.75); }
.court-heading { margin-bottom: 14px; padding: 3px 3px 13px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.court-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; background: var(--orange); color: var(--navy); font-size: 12px; font-weight: 900; }
.court-icon--alt { background: #f3dca9; }
.court-heading h3 { margin: 0; color: var(--navy); font-size: 16px; font-weight: 900; }
.court-heading p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.match-list { display: grid; gap: 10px; }
.match-card { min-width: 0; padding: 12px; border: 1px solid rgba(9,36,58,.12); border-radius: 14px; background: white; }
.match-card__top { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.match-group { color: var(--red); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.match-status { padding: 4px 7px; border-radius: 999px; background: #f4f1e8; color: #766f60; font-size: 8px; font-weight: 800; white-space: nowrap; }
.match-status--final { background: #e5f2e5; color: #27602c; }
.match-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.match-team { min-width: 0; color: var(--navy); font-size: 11px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.match-team:last-child { text-align: right; }
.score-box { min-width: 66px; padding: 7px 8px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #eadfc9; border-radius: 10px; background: #fffaf0; color: #8c7754; font-size: 13px; font-weight: 900; white-space: nowrap; }
.score-box.has-score { border-color: #b6d4b3; background: #edf7eb; color: var(--green); }
.score-separator { opacity: .55; }
.match-card__meta { margin-top: 10px; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(9,36,58,.08); color: var(--muted); font-size: 9px; font-weight: 700; }
.match-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.empty-state { padding: 30px 16px; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); text-align: center; font-size: 13px; }

.standings-legend { display: flex; gap: 11px; flex-wrap: wrap; justify-content: flex-end; color: var(--muted); font-size: 9px; }
.standings-legend span { white-space: nowrap; }
.standings-legend b { color: var(--navy); }
.standings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.group-table-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 3px 3px 0 rgba(9,36,58,.08); }
.group-table-heading { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: white; }
.group-table-heading h3 { margin: 0; font-size: 13px; font-weight: 900; }
.group-table-heading span { color: #ffd17d; font-size: 9px; font-weight: 700; }
.table-scroll { overflow-x: auto; }
.standings-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.standings-table th, .standings-table td { padding: 9px 8px; border-bottom: 1px solid rgba(9,36,58,.08); text-align: center; white-space: nowrap; }
.standings-table th { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .03em; }
.standings-table td { color: var(--ink); font-size: 9px; font-weight: 700; }
.standings-table tbody tr:last-child td { border-bottom: 0; }
.standings-table th:first-child, .standings-table td:first-child { width: 28px; color: var(--muted); }
.standings-table th:nth-child(2), .standings-table td:nth-child(2) { min-width: 112px; text-align: left; }
.standings-table td:nth-child(2) { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.standings-table td:last-child { color: var(--red); font-weight: 900; }
.standings-table .leader-row td { background: rgba(245,130,8,.08); }
.standings-table .leader-row td:first-child { color: var(--red); font-weight: 900; }
.standings-table .qualifier-row td { background: rgba(245,130,8,.12); }
.standings-table .qualifier-row td:first-child { color: var(--red); font-weight: 900; }
.standings-table .leader-row.qualifier-row td { background: rgba(245,130,8,.18); }
.points-note { margin: 14px 0 0; color: var(--muted); font-size: 10px; }

.site-footer { min-height: 72px; padding: 20px max(20px, calc((100% - 1200px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--navy); color: rgba(255,255,255,.7); }
.footer-brand { color: white; text-decoration: none; font-size: 13px; font-weight: 900; letter-spacing: -.04em; }
.footer-brand b { color: #ffc15c; }
.site-footer p { margin: 0; font-size: 10px; }
.back-to-top { color: white; text-decoration: none; font-size: 10px; font-weight: 700; }

@media (min-width: 980px) {
  .standings-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .standings-table th, .standings-table td { padding-inline: 5px; }
  .standings-table th:nth-child(2), .standings-table td:nth-child(2) { min-width: 90px; }
}
@media (max-width: 720px) {
  .header-inner { width: min(100% - 28px, 600px); min-height: 66px; gap: 10px; }
  .brand { min-width: auto; font-size: 15px; }
  .brand-ball { width: 28px; height: 28px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 9px; font-size: 10px; }
  .back-link { padding: 8px 10px; font-size: 0; }
  .back-link span { font-size: 16px; }
  .hero-inner { width: min(100% - 32px, 600px); min-height: 0; padding: 36px 0 30px; display: block; }
  .page-hero::after { top: -115px; right: -170px; }
  .hero-meta { margin-top: 24px; }
  .hero-meta div { min-width: 0; flex: 1; padding: 10px 8px; }
  .hero-meta strong { font-size: 21px; }
  .prototype-note, .section { width: min(100% - 28px, 600px); }
  .prototype-note { margin-top: 14px; }
  .fixtures-section { padding: 36px 0 44px; }
  .standings-section { padding: 38px 0 48px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .match-summary { align-self: flex-start; }
  .filter-panel { padding: 12px; gap: 9px; }
  .court-filter { margin-left: 0; width: 100%; justify-content: space-between; }
  .court-filter select { flex: 1; max-width: 220px; }
  .court-grid { grid-template-columns: 1fr; gap: 12px; }
  .court-column { padding: 12px; }
  .standings-grid { grid-template-columns: 1fr; }
  .standings-legend { justify-content: flex-start; }
  .standings-table th, .standings-table td { padding: 9px 7px; }
  .standings-table th:nth-child(2), .standings-table td:nth-child(2) { min-width: 100px; }
  .site-footer { padding: 18px 14px; flex-wrap: wrap; }
}
@media (max-width: 390px) {
  .main-nav a { padding-inline: 6px; font-size: 9px; }
  .brand-fallback { gap: 6px; }
  .brand { font-size: 13px; }
  .match-teams { gap: 5px; }
  .match-team { font-size: 10px; }
  .score-box { min-width: 58px; padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.main-nav a.final-stage-link {
  background: #f58208;
  color: #09243a;
}

.main-nav a.final-stage-link:hover {
  background: #ffbd58;
  color: #09243a;
}
.footer-logo {
  display: block;
  width: 130px;
  max-height: 38px;
  object-fit: contain;
}
@media (max-width: 820px) {
  .header-inner {
    width: calc(100% - 24px);
    min-height: 0;
    padding: 10px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand home"
      "nav nav";
    align-items: center;
    gap: 10px 8px;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
    font-size: 14px;
  }

  .brand-logo {
    width: 130px;
    max-height: 36px;
  }

  .main-nav {
    grid-area: nav;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .main-nav a {
    min-width: 0;
    min-height: 40px;
    padding: 8px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: clamp(9px, 2.8vw, 11px);
  }

  .back-link {
    grid-area: home;
    padding: 8px 10px;
    font-size: 10px;
    white-space: nowrap;
  }

  .back-link span {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .header-inner {
    width: calc(100% - 18px);
  }

  .main-nav {
    gap: 4px;
  }

  .main-nav a {
    padding: 7px 2px;
    font-size: 9px;
  }

  .brand-logo {
    width: 112px;
  }

  .back-link {
    padding: 7px 8px;
    font-size: 9px;
  }
}