:root {
  color-scheme: dark;
  --ink: #f2f0e8;
  --muted: #918f89;
  --line: rgba(242, 240, 232, 0.13);
  --line-strong: rgba(242, 240, 232, 0.24);
  --panel: #171817;
  --panel-light: #1d1f1e;
  --black: #0c0d0c;
  --signal: #d8ff34;
  --signal-soft: rgba(216, 255, 52, 0.12);
  --danger: #ff6d57;
  --font-sans: "Manrope", sans-serif;
  --font-mono: "DM Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 80% 0%, rgba(216, 255, 52, 0.055), transparent 26rem),
    var(--black);
  color: var(--ink);
  font-family: var(--font-sans);
}

button,
select {
  font: inherit;
}

button {
  color: inherit;
}

.page-shell {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 0 32px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  gap: 3px;
  align-items: end;
  width: 21px;
  height: 21px;
}

.brand-mark span {
  display: block;
  width: 5px;
  background: var(--signal);
}

.brand-mark span:nth-child(1) {
  height: 10px;
}

.brand-mark span:nth-child(2) {
  height: 18px;
}

.brand-mark span:nth-child(3) {
  height: 13px;
}

.tournament-pill,
.data-status {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: #bbb9b2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.live-dot,
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(216, 255, 52, 0.09);
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(600px, 1.28fr);
  gap: 5vw;
  align-items: center;
  min-height: 145px;
  padding: 12px 0 16px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 14px;
  font-size: clamp(32px, 3.4vw, 50px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.hero-description {
  max-width: 510px;
  margin-bottom: 0;
  color: #a5a39d;
  font-size: 13px;
  line-height: 1.55;
}

.compare-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(23, 24, 23, 0.76);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.selector-grid {
  display: grid;
  grid-template-columns: 1fr 42px 1fr;
  gap: 12px;
  align-items: end;
}

.team-field {
  display: grid;
  gap: 11px;
}

.team-field > span:first-child {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  background: #111211;
}

.flag-chip {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: 9px;
  border-radius: 50%;
  background: #e2e0d7;
  color: #131413;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}

select {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 30px 0 9px;
  border: 0;
  outline: 0;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #8c8c87 50%) calc(100% - 17px) 21px / 5px 5px
      no-repeat,
    linear-gradient(135deg, #8c8c87 50%, transparent 50%) calc(100% - 12px) 21px / 5px 5px
      no-repeat;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.versus {
  display: grid;
  place-items: center;
  height: 48px;
  color: #777873;
  font-family: var(--font-mono);
  font-size: 11px;
}

.compare-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  margin-top: 0;
  padding: 0 17px;
  border: 0;
  background: var(--signal);
  color: #0b0c0a;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.compare-button:hover {
  transform: translateY(-2px);
  background: #e1ff61;
}

.compare-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.form-error {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: -5px 0 -10px;
  color: var(--danger);
  font-size: 12px;
}

.results {
  padding: 30px 0 55px;
  border-top: 1px solid var(--line);
}

.fixtures-panel,
.groups-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.tournament-section-header {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tournament-section-header h2 {
  font-size: 25px;
}

.tournament-section-header p:last-child {
  max-width: 520px;
  margin: 0;
  color: #777974;
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

.fixture-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 7px;
  scrollbar-width: thin;
}

.fixture-card {
  display: grid;
  flex: 0 0 220px;
  gap: 6px;
  min-height: 142px;
  padding: 11px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.fixture-card:hover {
  border-color: var(--signal);
  background: var(--signal-soft);
}

.fixture-card.pending {
  cursor: default;
  opacity: 0.58;
}

.fixture-card.pending:hover {
  border-color: var(--line);
  background: var(--panel);
}

.fixture-stage,
.fixture-date,
.fixture-action {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.fixture-environment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #8a8c86;
  font-family: var(--font-mono);
  font-size: 8px;
}

.fixture-environment strong {
  overflow: hidden;
  color: #c1bfb8;
  font-size: 8px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-environment span {
  white-space: nowrap;
}

.fixture-stage {
  color: var(--signal);
}

.fixture-date {
  color: #70726d;
}

.fixture-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
}

.fixture-teams strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-teams strong:last-child {
  text-align: right;
}

.fixture-teams i {
  color: #5f615d;
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  text-align: center;
}

.fixture-action {
  align-self: end;
  color: #777974;
}

.fixture-card:not(.pending) .fixture-action {
  color: var(--signal);
}

.tournament-loading {
  width: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  color: #777974;
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: center;
}

.results-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 10px;
}

.results-intro .eyebrow {
  margin-bottom: 5px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.045em;
}

h2 span {
  color: #656660;
  font-family: var(--font-mono);
  font-size: 0.35em;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.data-status.error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 109, 87, 0.1);
}

.notice {
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 191, 71, 0.26);
  background: rgba(255, 191, 71, 0.07);
  color: #d7c49d;
  font-size: 10px;
  line-height: 1.45;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 14px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.summary-card {
  min-width: 0;
  min-height: 68px;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.summary-card > span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.summary-values {
  display: grid;
  grid-template-columns: auto auto 1px auto auto;
  gap: 7px;
  align-items: baseline;
  justify-content: start;
  margin-top: 9px;
}

.summary-values strong {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.summary-values small {
  color: #7e807b;
  font-family: var(--font-mono);
  font-size: 10px;
}

.summary-values i {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}

.summary-card.active {
  box-shadow: inset 0 -2px 0 var(--signal);
  background: var(--signal-soft);
}

.section-label {
  margin: 0 0 5px;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.filter-panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.filter-header {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.filter-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.filter-groups,
.filter-group {
  display: flex;
  gap: 4px;
  align-items: center;
}

.filter-groups {
  min-width: 0;
  gap: 12px;
}

.filter-group {
  min-width: 0;
}

#metric-filter {
  max-width: min(760px, 62vw);
  overflow-x: auto;
  scrollbar-width: thin;
}

.period-filter {
  flex: 0 0 auto;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.filter-button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #111211;
  color: #858681;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 9px;
}

.filter-button[aria-pressed="true"] {
  border-color: var(--signal);
  background: var(--signal-soft);
  color: var(--ink);
}

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

.filtered-team + .filtered-team {
  border-left: 1px solid var(--line);
}

.filtered-team > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-light);
}

.filtered-team > header > div:first-child {
  display: flex;
  gap: 9px;
  align-items: center;
}

.team-code {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 8px;
}

.filtered-team h4 {
  margin: 0;
  font-size: 14px;
}

.filtered-average {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.filtered-average span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.filtered-average strong {
  color: var(--signal);
  font-size: 22px;
}

.compact-table-wrap {
  overflow-x: auto;
}

.compact-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.compact-table th,
.compact-table td {
  height: 44px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(242, 240, 232, 0.08);
  font-size: 10px;
  vertical-align: middle;
}

.compact-table th {
  height: 28px;
  color: #696b66;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: left;
}

.compact-table th:nth-child(1),
.compact-table td:nth-child(1) {
  width: 31px;
}

.compact-table th:nth-child(3),
.compact-table td:nth-child(3) {
  width: 34px;
  text-align: center;
}

.compact-table th:nth-child(4),
.compact-table td:nth-child(4),
.compact-table th:nth-child(5),
.compact-table td:nth-child(5) {
  width: 48px;
  text-align: center;
}

.match-index {
  color: #555752;
  font-family: var(--font-mono);
  line-height: 19px;
}

.filtered-fixture {
  overflow: hidden;
}

.filtered-fixture-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.filtered-fixture-layout,
.filtered-fixture-copy,
.filtered-mainline,
.match-tags {
  min-width: 0;
}

.filtered-mainline {
  display: block;
}

.filtered-fixture-copy strong,
.filtered-fixture-copy span,
.match-tags span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filtered-fixture-copy strong {
  font-size: 10px;
}

.filtered-context {
  display: block;
  margin-top: 3px;
  color: #666863;
  font-family: var(--font-mono);
  font-size: 7px;
}

.score-chip {
  display: inline-grid;
  min-width: 35px;
  height: 19px;
  align-self: center;
  place-items: center;
  padding: 0 6px;
  border: 1px solid rgba(216, 255, 52, 0.34);
  background: rgba(216, 255, 52, 0.11);
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.match-tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.match-tags span {
  display: inline-flex;
  max-width: 50%;
  padding: 2px 5px;
  border: 1px solid rgba(242, 240, 232, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: #b9b7af;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.filtered-match-row {
  cursor: pointer;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.filtered-match-row:hover,
.filtered-match-row:focus,
.filtered-match-row.expanded {
  background: rgba(216, 255, 52, 0.075);
  box-shadow: inset 2px 0 0 var(--signal);
  outline: 0;
}

.filtered-stats-row[hidden] {
  display: none;
}

.filtered-stats-row > td {
  height: auto !important;
  padding: 0 0 8px;
  background: #101110;
}

.inline-match-stats {
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.inline-match-stats > header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 31px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.inline-match-stats > header span {
  color: #777974;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.inline-match-stats > header strong {
  overflow: hidden;
  color: #d9d7d0;
  font-family: var(--font-mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-match-stats .stats-scroll {
  padding: 0 6px 6px;
}

.outcome {
  display: inline-grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid var(--line);
  background: #101110;
  color: #b8b6af;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
}

.outcome-w {
  border-color: rgba(216, 255, 52, 0.32);
  color: var(--signal);
}

.outcome-l {
  color: var(--danger);
}

.filter-value {
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 14px !important;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(216, 255, 52, 0.2);
}

.opponent-value {
  color: #aaa8a2;
  font-family: var(--font-mono);
  font-size: 12px !important;
  font-weight: 600;
}

.stats-scroll {
  overflow-x: auto;
  padding: 0 12px 12px;
}

.stats-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
}

.stats-table th,
.stats-table td {
  width: auto;
  height: auto;
  padding: 6px 6px;
  border-bottom: 1px solid var(--line);
}

.stats-table thead th {
  color: #72746f;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-align: center;
}

.stats-table thead th:first-child,
.stats-table tbody th {
  width: 24%;
  padding-left: 0;
  text-align: left;
}

.stats-table thead th:not(:first-child),
.stats-table tbody td {
  width: 25.333%;
}

.stats-table tbody th {
  color: #bab8b1;
  font-size: 11px;
  font-weight: 600;
}

.stats-table tbody tr:hover {
  background: rgba(216, 255, 52, 0.04);
}

.stat-pair {
  display: grid;
  grid-template-columns: minmax(32px, auto) 14px minmax(32px, auto);
  column-gap: 6px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
}

.stat-pair strong {
  display: inline-grid;
  min-width: 32px;
  min-height: 20px;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(242, 240, 232, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: #dddcd5;
  font-weight: 700;
}

.stat-pair span:nth-child(2) {
  color: #50524e;
  font-size: 8px;
}

.stat-pair.total {
  color: var(--signal);
}

.stat-pair.total strong {
  border-color: rgba(216, 255, 52, 0.32);
  background: rgba(216, 255, 52, 0.1);
  color: var(--signal);
}

.loading-state,
.empty-state {
  display: grid;
  min-height: 310px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line);
  color: #858681;
  font-family: var(--font-mono);
  font-size: 11px;
}

.setup-state {
  padding: 38px;
  text-align: center;
}

.setup-state strong {
  margin-bottom: 12px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
}

.setup-state p {
  max-width: 620px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.setup-state code {
  color: var(--signal);
}

.setup-state a {
  padding-bottom: 5px;
  border-bottom: 1px solid var(--signal);
  color: var(--signal);
  text-decoration: none;
}

.loader {
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border: 2px solid #323431;
  border-top-color: var(--signal);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.player-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}

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

.player-team + .player-team {
  border-left: 1px solid var(--line);
}

.player-team > header {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 46px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-light);
}

.player-team h4 {
  margin: 0;
  font-size: 13px;
}

.player-table th:nth-child(3),
.player-table td:nth-child(3) {
  width: 38px;
  text-align: center;
}

.player-table th:nth-child(4),
.player-table td:nth-child(4) {
  width: 48px;
  text-align: center;
}

.player-table th:nth-child(5),
.player-table td:nth-child(5),
.player-table th:nth-child(6),
.player-table td:nth-child(6) {
  width: 52px;
  text-align: center;
}

.player-name {
  position: relative;
  overflow: hidden;
  padding-right: 24px !important;
}

.player-name strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-name span {
  display: inline-block;
  margin-top: 2px;
  margin-right: 6px;
  color: #666863;
  font-family: var(--font-mono);
  font-size: 7px;
}

.player-summary-row {
  cursor: pointer;
}

.player-summary-row:hover,
.player-summary-row.expanded {
  background: var(--signal-soft);
}

.player-summary-row:focus {
  outline: 1px solid var(--signal);
  outline-offset: -1px;
}

.player-expand-indicator {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line);
  transform: translateY(-50%);
}

.player-expand-indicator::before,
.player-expand-indicator::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 1px;
  background: #8a8c86;
  content: "";
  transform: translate(-50%, -50%);
}

.player-expand-indicator::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.player-summary-row.expanded .player-expand-indicator::after {
  display: none;
}

.player-breakdown-row[hidden] {
  display: none;
}

.player-breakdown-row > td {
  height: auto !important;
  padding: 0 !important;
  background: #101110;
}

.player-breakdown {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line-strong);
}

.player-breakdown > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  color: #747671;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.player-breakdown > header strong {
  color: var(--signal);
  font-weight: 500;
}

.player-history-head,
.player-history-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 40px 72px;
  gap: 6px;
  align-items: center;
}

.player-history-head {
  min-height: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #5f615d;
  font-family: var(--font-mono);
  font-size: 7px;
}

.player-history-row {
  min-height: 32px;
  border-bottom: 1px solid rgba(242, 240, 232, 0.06);
  color: #7a7c77;
  font-family: var(--font-mono);
  font-size: 8px;
}

.player-history-head > span:nth-child(n + 3),
.player-history-row > span:nth-child(n + 3) {
  text-align: center;
}

.player-history-row > span:nth-child(2) {
  min-width: 0;
}

.player-history-row > span:nth-child(2) strong,
.player-history-row > span:nth-child(2) small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-history-row > span:nth-child(2) strong {
  color: #aaa8a2;
  font-family: var(--font-sans);
  font-size: 9px;
}

.player-history-row small {
  margin-top: 2px;
  color: #565853;
  font-size: 6px;
}

.player-history-row > span:last-child strong,
.player-history-row > span:last-child small {
  display: block;
}

.player-history-row > span:last-child strong {
  color: var(--signal);
  font-size: 10px;
}

.player-history-row.dnp {
  opacity: 0.48;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
  color: #595b57;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.groups-section {
  padding-bottom: 32px;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.group-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.group-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-light);
}

.group-card h3 {
  margin: 0;
  font-size: 12px;
}

.group-card header span {
  color: #666863;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.group-card table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.group-card th,
.group-card td {
  height: 29px;
  padding: 4px 7px;
  border-bottom: 1px solid rgba(242, 240, 232, 0.07);
  font-family: var(--font-mono);
  font-size: 8px;
  text-align: center;
}

.group-card th {
  color: #62645f;
  font-weight: 400;
}

.group-card th:nth-child(1),
.group-card td:nth-child(1) {
  width: 25px;
}

.group-card th:nth-child(2),
.group-card td:nth-child(2) {
  text-align: left;
}

.group-card th:nth-child(n + 3),
.group-card td:nth-child(n + 3) {
  width: 32px;
}

.group-card td:nth-child(2) {
  overflow: hidden;
  white-space: nowrap;
}

.group-card td:nth-child(2) strong {
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 9px;
  text-overflow: ellipsis;
}

.group-team-code {
  display: inline-block;
  width: 23px;
  color: #6f716c;
}

.group-card tr.qualifies td:first-child {
  box-shadow: inset 2px 0 0 #2ad572;
}

.group-card tr.possible td:first-child {
  box-shadow: inset 2px 0 0 #ffd908;
}

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

footer a:hover {
  color: var(--signal);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .page-shell {
    padding: 0 28px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding: 28px 0 32px;
  }

  .compare-card {
    display: block;
    max-width: none;
  }

  .compare-button {
    margin-top: 14px;
  }

  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-groups {
    width: 100%;
    overflow-x: auto;
  }

  #metric-filter {
    max-width: 100%;
  }

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

@media (max-width: 680px) {
  .page-shell {
    padding: 0 18px;
  }

  .site-header {
    min-height: 56px;
  }

  .hero {
    padding: 24px 0 28px;
  }

  h1 {
    font-size: 40px;
  }

  .compare-card {
    padding: 14px;
  }

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

  .versus {
    height: 20px;
  }

  .results {
    padding: 26px 0 50px;
  }

  .results-intro {
    display: grid;
    gap: 18px;
  }

  .tournament-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tournament-section-header p:last-child {
    text-align: left;
  }

  .data-status {
    justify-self: start;
  }

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

  .summary-card {
    min-height: 68px;
    padding: 10px;
  }

  .filtered-comparison {
    grid-template-columns: 1fr;
  }

  .filtered-team + .filtered-team {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .player-comparison {
    grid-template-columns: 1fr;
  }

  .player-team + .player-team {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .filter-groups {
    align-items: flex-start;
    flex-direction: column;
    overflow: visible;
  }

  .filter-group {
    max-width: 100%;
    overflow-x: auto;
  }

  .period-filter {
    padding-top: 6px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  footer {
    display: grid;
    gap: 8px;
  }

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

@media (max-width: 430px) {
  h1 {
    font-size: 34px;
  }

  .tournament-pill {
    font-size: 9px;
  }

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

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

  .selector-grid {
    gap: 6px;
  }

}
