:root {
  color-scheme: dark;
  --bg: #030303;
  --surface: rgba(10, 10, 11, 0.86);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f5f0;
  --muted: #a6a6a0;
  --signal: #e9ff70;
  --warn: #ffd166;
  --bad: #ff5c7a;
  --good: #67ff93;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(233, 255, 112, 0.08), transparent 28rem),
    linear-gradient(245deg, rgba(255, 255, 255, 0.06), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.76);
  backdrop-filter: blur(18px);
  padding: 0 clamp(18px, 6vw, 84px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 860;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border: 2px solid var(--text);
  border-radius: 50%;
  box-shadow: inset 6px 0 0 var(--signal);
}

.nav-links {
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
  color: var(--text);
}

.app {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) 0 72px;
}

.hero {
  display: grid;
  justify-items: start;
  padding: 22px 0 clamp(34px, 6vw, 58px);
}

.hero.compact {
  padding-bottom: 34px;
}

.kicker {
  margin: 0;
  color: var(--signal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 1040px;
  margin-top: 14px;
  font-size: clamp(58px, 11vw, 132px);
  font-weight: 900;
  line-height: 0.86;
}

h2 {
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 900;
  line-height: 0.92;
}

h3 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  line-height: 0.94;
}

.lede {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.22;
}

.panel,
.match-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 70%),
    var(--surface);
  padding: clamp(18px, 4vw, 28px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.dashboard-grid.slim {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.hero-card {
  display: grid;
  grid-column: 1 / -1;
  align-content: start;
  gap: 16px;
}

.hero-card .kicker {
  grid-column: auto;
}

.hero-card h2 {
  grid-column: auto;
  max-width: 15ch;
  margin-top: 10px;
  font-size: clamp(48px, 7vw, 92px);
  overflow-wrap: normal;
  word-break: normal;
}

.hero-card time {
  grid-column: auto;
}

.hero-card p {
  grid-column: auto;
  grid-row: auto;
  align-self: auto;
  max-width: 72ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
}

.hero-card .button {
  grid-column: auto;
  justify-self: start;
  align-self: auto;
  margin-top: 8px;
}

.stat-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 150px;
  gap: 12px;
}

.stat-card strong {
  align-self: center;
  max-width: 100%;
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 950;
  line-height: 1.02;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.stat-card span {
  max-width: 22ch;
  font-size: 15px;
}

.stat-card span,
time,
.meta-row,
.match-card p,
.detail-section p,
li {
  color: var(--muted);
  line-height: 1.45;
}

.section-block {
  margin-top: 44px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2,
.table-heading h2 {
  margin-top: 8px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.match-card {
  display: grid;
  min-height: 230px;
  align-content: end;
  gap: 12px;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

a.match-card:hover {
  border-color: rgba(233, 255, 112, 0.55);
  background:
    linear-gradient(135deg, rgba(233, 255, 112, 0.1), transparent 70%),
    rgba(17, 17, 19, 0.92);
  transform: translateY(-2px);
}

.pill,
.match-badges span {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(233, 255, 112, 0.45);
  border-radius: 999px;
  background: rgba(233, 255, 112, 0.09);
  color: var(--signal);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pill.good { color: var(--good); border-color: rgba(103, 255, 147, 0.45); }
.pill.warn { color: var(--warn); border-color: rgba(255, 209, 102, 0.45); }
.pill.bad { color: var(--bad); border-color: rgba(255, 92, 122, 0.45); }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  font-weight: 760;
}

.two-col,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.talking-points {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.talking-points p {
  margin: 0;
  border-left: 3px solid var(--signal);
  color: var(--text);
  padding-left: 12px;
  font-weight: 800;
}

.button {
  display: inline-flex;
  min-height: 42px;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 860;
}

.button-light {
  border: 1px solid #eff2d6;
  background: #f5f7e9;
  color: #11120e;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  cursor: pointer;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 820;
}

.filter.active {
  border-color: rgba(233, 255, 112, 0.55);
  color: var(--signal);
}

.match-detail {
  display: grid;
  gap: 18px;
}

.match-detail h1 {
  white-space: normal;
}

.back-link {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 820;
}

.match-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-section p {
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 760;
}

ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.rating-list,
#ratings-leaderboard {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rating-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.rating-row strong {
  color: var(--text);
}

.rating-row span {
  color: var(--muted);
}

.rating-row b {
  color: var(--signal);
  font-size: 28px;
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-card .kicker,
  .hero-card h2,
  .hero-card time,
  .hero-card p,
  .hero-card .button {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 14px 18px 16px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 10px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    padding: 8px 11px;
  }

  .dashboard-grid,
  .dashboard-grid.slim,
  .card-grid,
  .two-col,
  .detail-grid,
  .rating-row {
    grid-template-columns: 1fr;
  }

  .app {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: clamp(44px, 15vw, 78px);
  }
}
