:root {
  color-scheme: dark;
  --bg: #111318;
  --bg-2: #0b0d11;
  --panel: #1b1e25;
  --panel-2: #222018;
  --ink: #f4f1e9;
  --muted: #aaa294;
  --gold: #e9bd66;
  --green: #80d99b;
  --border: rgba(255, 255, 255, 0.09);
  --line: rgba(233, 189, 102, 0.25);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(233, 189, 102, 0.1), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.league-header,
.league-layout,
.league-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.league-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 20px;
  padding: 28px 0 18px;
}

.breadcrumbs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.breadcrumbs a {
  color: var(--gold);
  text-decoration: none;
}

.breadcrumbs a:hover,
.league-footer a:hover {
  text-decoration: underline;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 0.98;
}

.summary {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.controls {
  align-self: end;
  display: grid;
  gap: 8px;
}

.controls label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.controls select {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 9px 11px;
}

.hub-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 2px 0 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hub-facts div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.hub-facts div:nth-child(4n) {
  border-right: 0;
}

.hub-facts dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.hub-facts dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.timezone-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.league-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 14px;
  padding-bottom: 24px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(27, 30, 37, 0.88);
  overflow: hidden;
}

.next-panel {
  grid-row: span 2;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-head h2 {
  margin: 0;
  font-size: 22px;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.match-list {
  display: grid;
}

.match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.match-row:last-child {
  border-bottom: 0;
}

.match-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
}

.match-row span {
  color: var(--muted);
  font-size: 13px;
}

.match-row time {
  color: var(--gold);
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.match-row.is-final {
  background: rgba(233, 189, 102, 0.05);
}

.match-row.is-hidden,
tr.is-hidden {
  display: none;
}

.compact .match-row {
  min-height: 62px;
}

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

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

th:nth-child(2),
td:nth-child(2) {
  text-align: left;
}

tbody tr:nth-child(1) td {
  color: var(--gold);
  font-weight: 900;
}

.scorers-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scorers-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}

.scorers-list li:last-child {
  border-bottom: 0;
}

.scorers-list strong {
  color: var(--gold);
}

.league-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.related-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.related-nav a {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.related-nav a:hover {
  text-decoration: underline;
}

.league-footer a {
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 820px) {
  .league-header,
  .league-layout {
    grid-template-columns: 1fr;
  }

  .controls {
    align-self: stretch;
  }

  .match-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .match-row time {
    text-align: left;
  }

  .hub-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hub-facts div:nth-child(4n) {
    border-right: 1px solid var(--border);
  }

  .hub-facts div:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 480px) {
  .hub-facts {
    grid-template-columns: 1fr;
  }

  .hub-facts div,
  .hub-facts div:nth-child(4n),
  .hub-facts div:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .hub-facts div:last-child {
    border-bottom: 0;
  }
}
