:root {
  color-scheme: dark;
  --bg: #111318;
  --bg-2: #0b0d11;
  --panel: #1b1e25;
  --panel-2: #222018;
  --ink: #f4f1e9;
  --muted: #aaa294;
  --gold: #e9bd66;
  --green: #80d99b;
  --cyan: #74b9d6;
  --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: var(--bg);
  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;
}

.public-preview-banner {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: #211f19;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.public-preview-banner strong {
  color: var(--gold);
  text-transform: uppercase;
}

.league-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  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;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.control-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

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

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

.hub-status {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.hub-status strong {
  color: var(--ink);
}

.data-details {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--border);
}

.data-details summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.data-details summary:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.hub-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 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 {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.public-facts .league-layout {
  grid-template-columns: minmax(0, 1fr);
}

.public-facts .next-panel {
  grid-row: auto;
}

.teams-panel {
  grid-column: 1 / -1;
}

.team-directory > summary {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.team-directory > summary::-webkit-details-marker {
  display: none;
}

.team-directory > summary span {
  display: grid;
  gap: 3px;
}

.team-directory > summary small {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-directory > summary strong {
  font-size: 22px;
}

.team-directory > summary em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.team-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--border);
}

.team-link-grid a {
  display: grid;
  min-width: 0;
  min-height: 56px;
  align-content: center;
  gap: 3px;
  padding: 10px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
}

.team-link-grid a:hover,
.team-link-grid a:focus-visible {
  background: rgba(233, 189, 102, 0.08);
}

.team-link-grid strong {
  overflow-wrap: anywhere;
}

.team-link-grid span {
  color: var(--muted);
  font-size: 12px;
}

.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-group {
  min-width: 0;
}

.match-group[hidden] {
  display: none;
}

.match-group-heading {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(116, 185, 214, 0.06);
  font-size: 13px;
}

.match-group-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.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 strong a {
  color: var(--ink);
  text-decoration: none;
}

.match-row strong a:hover,
.match-row strong a:focus-visible {
  color: var(--gold);
  text-decoration: underline;
}

.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(116, 185, 214, 0.05);
}

.match-row.is-final time {
  color: var(--cyan);
}

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

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

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

table {
  width: 100%;
  table-layout: fixed;
  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;
}

.col-team {
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-full,
.team-short {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.team-short {
  display: none;
  text-decoration: none;
}

.col-pos {
  width: 42px;
}

.col-points,
.col-played,
.col-detail {
  width: 42px;
}

@media (min-width: 821px) and (max-width: 1100px) {
  .team-full {
    display: none;
  }

  .team-short {
    display: inline-block;
  }
}

tbody tr:nth-child(1) .col-pos,
tbody tr:nth-child(1) .col-team,
tbody tr:nth-child(1) .col-points {
  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;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .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) {
  .public-preview-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    text-align: left;
  }

  .league-header {
    gap: 14px;
    padding-top: 20px;
  }

  .summary {
    font-size: 15px;
  }

  .public-facts .league-title .summary,
  .public-facts .hub-status > span:last-child {
    display: none;
  }

  .hub-status {
    gap: 5px 12px;
    padding: 10px 0;
  }

  .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;
  }

  th,
  td {
    padding-inline: 7px;
  }

  .col-detail {
    display: none;
  }

  .col-pos {
    width: 42px;
  }

  .col-points,
  .col-played {
    width: 46px;
  }

  .match-group-heading {
    padding-inline: 14px;
  }
}
