:root {
  color-scheme: dark;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  font-weight: 400;
  background-color: #050607;
  color: #f0f2f5;
  --card-bg: rgba(255, 255, 255, 0.04);
  --border-color: rgba(255, 255, 255, 0.08);
  --accent: #ff4f4f;
  --accent-dim: rgba(255, 79, 79, 0.25);
  --media-size: 30px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 0.9375rem;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  display: block;
}

main {
  flex: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 3rem) 3rem;
}

.site-header {
  padding: 0 clamp(1rem, 3vw, 3rem) 1.5rem;
  text-align: center;
}

.site-subtitle {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.tournament-switcher {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.25rem auto 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.tournament-switcher::-webkit-scrollbar {
  height: 6px;
}

.tournament-switcher::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.tournament-option {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.tournament-option:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.tournament-option:focus-visible {
  outline: none;
  border-color: var(--accent);
}

.tournament-option--active {
  background: var(--accent);
  color: #050607;
  border-color: var(--accent);
}

.site-footer {
  margin-top: 3rem;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.list-panel {
  margin-top: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  padding: clamp(1rem, 2vw, 1.75rem);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
}

.list-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.list-head-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
}

.list-count {
  margin: 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.list-count--summary {
  margin: 0.25rem 0 0.85rem;
  font-size: 0.95rem;
  text-align: left;
}

.list-head h2 {
  margin: 0;
}

.list-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

.filter-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.filter-toolbar .filter-field--search {
  flex: 1 1 100%;
  min-width: 100%;
}

.tracker-row {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.tracker-row .filter-clear {
  margin-right: auto;
}

.tracker-toggle {
  border: none;
  border-radius: 0.6rem;
  padding: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tracker-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: #050607;
}

.tracker-toggle:hover,
.tracker-toggle:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
}

.tracker-toggle[aria-pressed="true"]:hover,
.tracker-toggle[aria-pressed="true"]:focus-visible {
  background: var(--accent);
}

.tracker-progress {
  flex: 1 0 100%;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.tracker-progress__bar {
  width: 100%;
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.tracker-progress__fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.3s ease;
}

.tracker-progress__label {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tracker-filter {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
}

.tracker-filter__options {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  flex: 1 1 auto;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
  min-width: 0;
  max-width: 100%;
}

.tracker-filter__options::-webkit-scrollbar {
  height: 6px;
}

.tracker-filter__options::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.tracker-filter__option {
  border: none;
  border-radius: 0.6rem;
  padding: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex: 0 0 auto;
  white-space: nowrap;
}

.tracker-filter__option--active {
  background: var(--accent);
  color: #050607;
}

.tracker-filter__option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 79, 79, 0.35);
}

label.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-label,
.filter-field--checkboxes legend {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.filter-field--search input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  padding: 0.65rem 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.filter-field--search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.filter-field--search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 79, 79, 0.24);
  background: rgba(255, 79, 79, 0.05);
}

.filter-field--checkboxes {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 0.6rem 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.filter-field--checkboxes legend {
  margin: 0 0 0.35rem;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 12rem;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-group__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.filter-group__options {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 0.5rem;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.filter-checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.filter-empty {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

.filter-clear {
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 0.5rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.filter-clear:hover:not([disabled]) {
  background: rgba(255, 79, 79, 0.1);
}

.filter-clear[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.filter-advanced-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0.65rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.filter-advanced-toggle:hover {
  border-color: var(--accent);
  background: rgba(255, 79, 79, 0.08);
}

.highlight-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.highlight-card {
  border-radius: 1rem;
  border: 1px solid transparent;
  background: var(--card-bg);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.highlight-card[open] {
  border-color: var(--accent);
  background: rgba(255, 79, 79, 0.07);
}

.highlight-card summary {
  list-style: none;
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
}

.highlight-card summary::-webkit-details-marker {
  display: none;
}

.summary-arrow {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.summary-arrow img {
  width: 100%;
  height: 100%;
  transition: transform 0.2s ease;
}

.highlight-card[open] .summary-arrow img {
  transform: rotate(90deg);
}

.tracker-slot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.tracker-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.summary-main {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1 1 auto;
}

.summary-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.summary-top > * {
  position: relative;
  padding-left: 0.85rem;
  display: flex;
  align-items: center;
}

.summary-top > *:first-child {
  padding-left: 0;
}

.summary-top > *:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1.2rem;
  background: rgba(255, 255, 255, 0.25);
}

.team-logos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.team-logos__team {
  width: var(--media-size);
  height: var(--media-size);
  display: grid;
  place-items: center;
}

.team-logos__team img {
  width: calc(var(--media-size) - 6px);
  height: calc(var(--media-size) - 6px);
  object-fit: contain;
}

.meta-chip {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.meta-chip--divider {
  letter-spacing: 0.12em;
}

.summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.summary-text p {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.summary-text p:last-child {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  font-size: 0.85rem;
}

.highlight-body {
  border-top: 1px solid var(--border-color);
  padding: 1rem;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.link-button img {
  width: 1rem;
  height: 1rem;
  opacity: 0.9;
}

.link-button:hover {
  border-color: var(--accent);
  background: rgba(255, 79, 79, 0.08);
  transform: translateY(-1px);
}

.video-slot {
  background: #0a0e14;
  border: 1px dashed var(--border-color);
  border-radius: 0.75rem;
  min-height: 140px;
  display: grid;
  place-items: center;
  padding: 0.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
}

.video-slot video {
  width: 100%;
  border-radius: 0.5rem;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.error-state {
  margin: 0;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px dashed var(--accent-dim);
  background: rgba(255, 79, 79, 0.08);
}

@media (max-width: 900px) {
  .highlight-card summary {
    grid-template-columns: auto 1fr;
    position: relative;
  }

  .summary-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .tracker-slot {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
  }
}

@media (max-width: 640px) {
  .highlight-card summary {
    padding: 1rem 0.5rem;
    gap: 0.2rem;
    align-items: center;
  }

  .highlight-body {
    padding: 1rem;
  }

  .summary-top {
    align-items: flex-start;
  }

  .tracker-slot {
    top: 0.65rem;
    right: 0.65rem;
  }

  .filter-advanced-toggle {
    display: inline-flex;
    justify-content: center;
    width: 100%;
  }

  .filter-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "search"
      "tracker"
      "progress"
      "trackerfilter";
    gap: 0.5rem;
    align-items: center;
  }

  .filter-toolbar .filter-field--search {
    grid-area: search;
  }

  .filter-toolbar .tracker-row {
    grid-area: tracker;
    width: 100%;
    margin-top: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .filter-toolbar .tracker-progress {
    grid-area: progress;
    width: 100%;
  }

  .filter-toolbar .tracker-filter {
    grid-area: trackerfilter;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .filter-toolbar .tracker-filter__options {
    width: 100%;
  }

  .filter-grid {
    display: none;
    margin-bottom: 0;
  }

  .filter-panel[data-advanced-open="true"] .filter-grid {
    display: grid;
    margin-bottom: 0.75rem;
  }

  .tournament-switcher {
    margin: 1rem 0;
    justify-content: flex-start;
    padding: 0 0.5rem 0.35rem;
    scroll-padding-inline: 0.5rem;
  }

  .summary-arrow {
    align-self: center;
  }

  .summary-top .team-logos {
    flex: 0 0 100%;
    justify-content: flex-start;
    padding-left: 0;
  }

  .summary-top .team-logos::before {
    display: none;
  }

  .summary-top .team-logos + .meta-chip {
    padding-left: 0;
  }

  .summary-top .team-logos + .meta-chip::before {
    display: none;
  }

  .summary-top .meta-chip {
    text-align: left;
  }

  main {
    padding: 0;
  }

  .list-panel {
    margin-top: 0;
    border-radius: 0;
    padding: 0.75rem;
  }
}
