:root {
  color-scheme: dark;
  --canvas: #0b111c;
  --surface: #141f30;
  --surface-alternate: #182538;
  --raised: #1c2a40;
  --line: #304158;
  --ink: #f5f7fc;
  --muted: #aebbd0;
  --accent: #c8fa54;
  --text: "Roboto", system-ui, sans-serif;
  --heading: "Barlow Condensed", var(--text);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 1rem/1.5 var(--text);
}

a { color: var(--accent); }

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

.tipoff-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.tipoff-header-inner,
.tipoff-guide {
  width: min(100%, 66rem);
  margin-inline: auto;
  padding-inline: clamp(0.875rem, 4vw, 2rem);
}

.tipoff-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 3.75rem;
  gap: 1rem;
}

.tipoff-brand {
  color: var(--accent);
  font: italic 800 2.15rem/1 var(--heading);
  text-decoration: none;
  text-transform: uppercase;
}

.tipoff-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--muted);
  font: 700 0.6875rem/1.25 var(--text);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.tipoff-back::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: rotate(45deg);
}

.tipoff-back:hover { color: var(--ink); }

.tipoff-guide { padding-block: clamp(1.3rem, 4vw, 2.5rem) 3rem; }

.tipoff-guide h1 {
  margin: 0;
  font: italic 800 clamp(2.4rem, 8vw, 4.2rem)/0.95 var(--heading);
  text-transform: uppercase;
}

.tipoff-intro {
  margin: 0.5rem 0 1.25rem;
  color: var(--muted);
  font: 600 0.75rem/1.4 var(--text);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tipoff-date {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px auto;
  align-items: center;
  gap: 0.375rem;
  max-width: 26rem;
}

.tipoff-date h2 {
  margin: 0;
  font: 600 1rem/1.15 var(--text);
  text-align: center;
}

.button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.375rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: var(--surface);
  color: var(--ink);
  font: 700 0.875rem/1 var(--text);
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--raised); }

#previous,
#next,
#today {
  border: 0;
  background: transparent;
}

#previous:hover,
#next:hover,
#today:hover {
  background: var(--raised);
}

.tipoff-date svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tipoff-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.375rem;
  max-width: 34rem;
  margin-top: 0.75rem;
}

.tipoff-filters .button {
  position: relative;
  min-height: 3rem;
  padding-inline: 0.2rem;
  border: 0;
  background: transparent;
  font: 700 1.1rem/1 var(--heading);
  text-transform: uppercase;
}

.tipoff-filters .button:hover {
  background: var(--raised);
}

.tipoff-filters [aria-pressed="true"] {
  box-shadow: inset 0 -2px var(--accent);
  color: var(--accent);
}

.tipoff-league-logo {
  width: 2.1rem;
  height: 2.1rem;
  object-fit: contain;
}

.tipoff-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  margin: 0.65rem 0 1.25rem;
  color: var(--muted);
  font: 500 0.75rem/1.4 var(--text);
}

.tipoff-zone-label {
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tipoff-meta,
.tipoff-league-status {
  color: var(--muted);
  font-size: 0.8125rem;
}

.tipoff-league {
  margin-top: 0.875rem;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
}

.tipoff-league h2 {
  margin: 0;
  padding: 0.4rem 0.75rem;
  border-left: 4px solid var(--accent);
  border-radius: 0.4375rem 0.4375rem 0 0;
  background: var(--raised);
  font: 700 1.55rem/1 var(--heading);
  letter-spacing: 0.025em;
}

.tipoff-league-status,
.tipoff-league > div > .tipoff-meta { margin: 0.55rem 0.75rem; }

.tipoff-games {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tipoff-game,
.tipoff-game-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.22rem 0.65rem;
  align-items: center;
}

.tipoff-game {
  padding: 0.7rem 0.75rem;
}

.tipoff-game:nth-child(odd) { background: var(--surface-alternate); }

.tipoff-game:last-child:not(.tipoff-game-national, .tipoff-game-followed) {
  border-radius: 0 0 0.4375rem 0.4375rem;
}

.tipoff-game p { margin: 0; }

.tipoff-start {
  color: var(--accent);
  font: 700 1.1rem/1.2 var(--heading);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tipoff-broadcasts,
.tipoff-game-notice,
.tipoff-altitude {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.875rem;
}

.tipoff-altitude summary {
  width: fit-content;
  padding-block: 0.4rem;
  color: var(--accent);
  cursor: pointer;
}

@media (max-width: 22rem) {
  .tipoff-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tipoff-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.tipoff-matchup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 700;
}

.tipoff-matchup-home {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.tipoff-matchup-separator {
  flex-shrink: 0;
  color: var(--muted);
}

.tipoff-team {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.tipoff-team-logo {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
  flex-shrink: 0;
}

ul.tipoff-broadcasts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tipoff-broadcast {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.2rem 0.45rem;
}

.tipoff-network-logo {
  width: 4.25rem;
  height: 1.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.tipoff-network-logo-light {
  filter: brightness(0) invert(1);
}

.tipoff-station-tag {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
}

.tipoff-pass .tipoff-station-tag {
  padding-inline: 0.25rem;
  border-radius: 0.15rem;
  background: var(--accent);
  color: var(--canvas);
}

.tipoff-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tipoff-summary {
  margin-bottom: 1.25rem;
}

.tipoff-summary h2 {
  margin: 0;
  font: 700 1.65rem/1.1 var(--heading);
}

.tipoff-summary h3 {
  margin: 0;
  padding: 0.45rem 0.75rem;
  background: var(--raised);
  font: 700 1.35rem/1 var(--heading);
}

.tipoff-summary-groups {
  display: grid;
  gap: 0.75rem;
}

.tipoff-summary-groups .tipoff-league {
  margin: 0;
}

.tipoff-summary .tipoff-game {
  gap: 0.35rem 0.6rem;
}

.tipoff-game.tipoff-game-national,
.tipoff-game.tipoff-game-followed {
  border: 1px solid var(--accent);
  border-radius: 0.375rem;
  margin: 0.4rem;
}

.tipoff-game.tipoff-game-followed {
  border-color: #72bdff;
}

@media (min-width: 44rem) {
  .tipoff-summary-groups {
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    align-items: start;
  }
}

.tipoff-summary-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 0 0.75rem;
}

.tipoff-game-details {
  grid-column: 1 / -1;
}

.tipoff-game-toggle {
  cursor: pointer;
  list-style: none;
}

.tipoff-game-toggle::-webkit-details-marker {
  display: none;
}

.tipoff-game-toggle .tipoff-start::after {
  content: "▸" / "";
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--muted);
}

.tipoff-game-details[open] .tipoff-start::after {
  transform: rotate(90deg);
}

.tipoff-game-details[open] > .tipoff-broadcasts {
  margin-top: 0.35rem;
}

.tipoff-game:has(> .tipoff-game-details:not([open])) {
  filter: brightness(50%);
}

.tipoff-inactive-league:not([open]) {
  filter: brightness(50%);
}

.tipoff-inactive-league summary {
  cursor: pointer;
  list-style: none;
}

.tipoff-inactive-league summary::-webkit-details-marker {
  display: none;
}

.tipoff-inactive-league h2::after {
  content: "▸" / "";
  flex-shrink: 0;
  color: var(--muted);
}

.tipoff-inactive-league[open] h2::after {
  transform: rotate(90deg);
}

.tipoff-inactive-league:not([open]) h2 {
  border-radius: 0.4375rem;
}

.tipoff-league-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tipoff-league-count,
.tipoff-national-marker {
  color: var(--muted);
  font: 800 0.65rem/1.2 var(--text);
  text-transform: uppercase;
  white-space: nowrap;
}

.tipoff-league-freshness {
  margin-inline-start: auto;
  color: var(--muted);
  font: 500 0.6875rem/1.3 var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  letter-spacing: normal;
}

.tipoff-league-freshness > span {
  display: block;
}

.tipoff-league-source {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.tipoff-national-marker {
  margin-inline-start: 0.5rem;
  color: var(--accent);
}

.tipoff-inactive-league:not([open]) .tipoff-league-freshness {
  visibility: hidden;
}
