:root {
  color-scheme: light;
  --ink: #121212;
  --muted: #2f3a4a;
  --panel: #ffffff;
  --accent: #ff3b30;
  --accent-2: #e8eef6;
  --accent-3: #ffec3d;
  --bg: #f3f4f6;
  --shadow: 4px 4px 0 rgba(18, 18, 18, 0.9);
  --radius: 10px;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

.page {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 56px) clamp(14px, 3.5vw, 24px) 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ink);
  margin: 0 0 12px;
  font-size: 0.8rem;
  background: var(--accent-3);
  display: inline-block;
  padding: 4px 10px;
  border: 2px solid var(--ink);
}

h1 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  margin: 0 0 12px;
  text-transform: none;
}

h2 {
  margin: 0;
  font-size: 1.4rem;
  text-transform: none;
}

.player-name {
  min-height: 4.2em;
  line-height: 1.4;
}

.subhead {
  max-width: 520px;
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}

.section-head {
  display: grid;
  gap: 8px;
}

.section-head .subhead {
  margin-bottom: 18px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 10px;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.tab {
  border: 2px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  min-width: 120px;
}

.tab.active {
  background: var(--accent-3);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.tab-panels {
  margin-top: 20px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card {
  display: grid;
  grid-template-columns: minmax(84px, 96px) minmax(0, 1fr);
  gap: 18px;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  z-index: 1;
  --more-space: 340px;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), transparent 60%);
  pointer-events: none;
}

.photo {
  position: relative;
  width: 96px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-fallback {
  color: #e2e8f0;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.65rem;
  text-align: center;
}

.details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.label {
  margin: 0;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  background: var(--accent-3);
  padding: 3px 8px;
  display: inline-block;
  border: 2px solid var(--ink);
  margin-bottom: 6px;
}

.team {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.points {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.points span:first-child {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
}

.points .pts {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.more {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.more-list {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--accent-2);
  border-radius: 10px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  max-height: var(--more-space);
  overflow: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
  margin-top: 6px;
}

.more-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.more-row .rank {
  color: var(--muted);
  font-weight: 600;
  min-width: 24px;
}

.more-row .name {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.more-row .value {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: right;
}

.more-meta {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 6px;
  min-height: 1.1em;
  font-weight: 500;
}

.status {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 8px 0 0;
  line-height: 1.4;
}

.footnote {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .page {
    gap: 18px;
  }

  .leaders-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    min-width: 0;
  }

  .card {
    grid-template-columns: 1fr;
  }

  .photo {
    width: 100%;
    height: 180px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(1.8rem, 11vw, 2.4rem);
  }

  .leaders-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 14px;
    gap: 14px;
  }

  .points span:first-child {
    font-size: clamp(1.8rem, 10vw, 2.2rem);
  }

  .more-row {
    align-items: flex-start;
  }

  .more-row .value {
    font-size: 0.88rem;
  }
}

@container (max-width: 360px) {
  .card {
    grid-template-columns: 1fr;
  }

  .photo {
    width: 100%;
    height: 170px;
  }

  .points {
    flex-wrap: wrap;
  }
}
