:root {
  color-scheme: light;
  --bg: #f4f6f1;
  --surface: #ffffff;
  --ink: #18211b;
  --muted: #647067;
  --line: #dbe1d8;
  --accent: #0d6b5f;
  --accent-soft: rgba(13, 107, 95, 0.08);
  --warn: #8f3d28;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 246, 241, 0.94);
  backdrop-filter: blur(12px);
}

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

h1 {
  font-size: 22px;
  line-height: 1.15;
}

h2 {
  font-size: 16px;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.titleblock {
  min-width: 0;
}

.topbarRight {
  display: flex;
  align-items: center;
  gap: 18px;
}

.navLinks {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.navLinks a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.navLinks a:hover {
  background: var(--accent-soft);
}

.navLinks a[aria-current="page"] {
  background: var(--accent);
  color: #ffffff;
}

.stats {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 24px 40px;
}

.notice {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-left: 4px solid var(--warn);
  background: rgba(143, 61, 40, 0.08);
  color: #4d322f;
  font-size: 13px;
  line-height: 1.45;
}

.kpiGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
  gap: 8px;
  margin-bottom: 16px;
}

.kpi {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.15;
}

.graphGrid {
  display: grid;
  gap: 14px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel header {
  padding: 13px 14px 4px;
}

.panel header p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.teamTextLink,
.teamHeroLink,
.teamPageLink {
  color: inherit;
  text-decoration: none;
}

.teamTextLink:hover,
.teamHeroLink:hover,
.teamPageLink:hover,
.teamPageLink:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.teamPageLink {
  cursor: pointer;
}

.teamPageLink:focus-visible {
  outline: 2px solid rgba(13, 107, 95, 0.35);
  outline-offset: 2px;
}

.chartLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.chartLegend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.chartLegend i {
  display: inline-block;
  flex: 0 0 auto;
}

.legendDot {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: #b98879;
  box-shadow: 0 0 0 1px rgba(37, 45, 38, 0.1);
}

.legendDensity {
  width: 22px;
  height: 9px;
  border-radius: 999px;
  background: #dfe4dc;
}

.legendAverage {
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: #9a5738;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.legendStddev {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: #9a5738;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.controls {
  display: grid;
  gap: 12px;
  padding: 8px 14px 0;
}

.compactControls {
  max-width: 260px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 0 10px;
}

.chart {
  width: 100%;
  min-height: 280px;
  padding: 8px 12px 12px;
  overflow: hidden;
}

.tallChart {
  min-height: 620px;
  overflow-x: hidden;
  overflow-y: auto;
}

.chart svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
}

.chart text {
  fill: var(--muted);
  font-size: 12px;
}

.chartGrid line,
.tickLine {
  stroke: #e4e9e1;
  stroke-width: 1;
}

.axis {
  stroke: #aab5ac;
  stroke-width: 1.5;
}

.axisLabel {
  font-weight: 800;
}

.bar {
  opacity: 0.22;
}

.teamAxisLabel {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.teamBaseline {
  stroke: #eef2ec;
  stroke-width: 1;
}

.averageMarker,
.miniAverage {
  stroke: #9a5738;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.95;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 2px rgba(24, 33, 27, 0.2));
}

.densityBand {
  opacity: 0.28;
}

body[data-page="graphs"] .bar,
body[data-page="graphs"] .densityBand {
  opacity: 0.46;
}

.anonPoint,
.teamAnonPoint,
.miniPoint {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.1;
  opacity: 0.86;
}

.teamAnonPoint {
  opacity: 0.82;
}

.tableWrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

th,
td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  width: 56px;
  text-align: right;
}

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

th:nth-child(3),
td:nth-child(3) {
  width: 380px;
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf1ea;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

th[data-key] {
  cursor: pointer;
  user-select: none;
}

th[aria-sort="ascending"]::after {
  content: " ▲";
}

th[aria-sort="descending"]::after {
  content: " ▼";
}

tbody tr:hover {
  background: #f8faf6;
}

.miniDistribution {
  display: block;
  width: min(360px, 100%);
  min-width: 300px;
  height: 38px;
}

.miniDistribution svg {
  display: block;
  width: 100%;
  height: 100%;
}

.miniBaseline {
  stroke: #d7ddd4;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.miniStddev {
  stroke: #9a5738;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.7;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9));
}

.miniDensityBand {
  opacity: 0.76;
}

.rankCell {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.methodPage {
  max-width: 880px;
}

.methodSection {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.methodSection ol {
  margin: 10px 0 0;
  padding-left: 22px;
  line-height: 1.55;
}

.methodSection li {
  margin: 4px 0;
  font-size: 14px;
}

.bracketPage,
.matchPage {
  width: min(1360px, 100%);
}

body:has(.bracketPage) {
  overflow-x: auto;
}

.bracketPage {
  width: max-content;
  min-width: 100%;
  max-width: none;
}

.sourceStrip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sourceStrip span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.bracketGrid {
  min-width: 0;
}

.bracketScroller {
  overflow: visible;
  padding: 2px 0 16px;
}

.bracketBoard {
  --slot-h: 214px;
  --bracket-gap: 48px;
  display: grid;
  grid-auto-columns: minmax(236px, 252px);
  grid-auto-flow: column;
  gap: var(--bracket-gap);
  min-width: max-content;
  padding: 0 24px 6px 0;
}

.bracketBoardRound {
  min-width: 236px;
}

.bracketBoardRound h2,
.roundColumn h2,
.consolationBracket h2 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.bracketRoundTrack {
  display: grid;
  position: relative;
  grid-template-rows: repeat(var(--round-slots), var(--slot-h));
  min-height: calc(var(--round-slots) * var(--slot-h));
  overflow: visible;
}

.bracketSlot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  grid-row: var(--row-start) / span var(--row-span);
}

.bracketSlot.hasNext::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(var(--bracket-gap) * -0.5);
  width: calc(var(--bracket-gap) * 0.5);
  border-top: 2px solid #cbd5cf;
}

.bracketSlot.hasNext.pairTop::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(var(--bracket-gap) * -0.5);
  height: calc(var(--slot-h) * var(--row-span));
  border-right: 2px solid #cbd5cf;
}

.bracketSlot.hasPrevious .bracketMatchCard::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -24px;
  width: 24px;
  border-top: 2px solid #cbd5cf;
}

.bracketMatchCard {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(24, 33, 27, 0.04);
}

.bracketMatchCard:hover {
  border-color: rgba(13, 107, 95, 0.55);
  box-shadow: 0 8px 18px rgba(24, 33, 27, 0.08);
}

.bracketMatchCard.isComplete {
  border-color: rgba(143, 61, 40, 0.34);
  border-left: 4px solid var(--warn);
  background: #fff8f4;
}

.bracketMatchCard.isComplete .statusPill {
  background: rgba(143, 61, 40, 0.13);
  color: var(--warn);
}

.bracketMatchCard.isComplete .bracketTeamLine.winner {
  border-color: rgba(143, 61, 40, 0.35);
  background: rgba(143, 61, 40, 0.07);
}

.bracketMatchCard.isLive {
  border-color: rgba(47, 111, 221, 0.45);
  border-left: 4px solid #2f6fdd;
}

.bracketMatchMeta,
.bracketDeltaLine {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.bracketTeamLine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 6px;
  align-items: center;
  padding: 4px 5px;
  border: 1px solid #edf1ea;
  border-radius: 6px;
  background: #fbfcfa;
}

.bracketTeamLine.winner {
  border-color: rgba(13, 107, 95, 0.35);
  background: rgba(13, 107, 95, 0.07);
}

.bracketTeamIdentity {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.bracketTeamIdentity span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracketTeamIdentity small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
}

.bracketTeamScore {
  min-width: 26px;
  text-align: right;
  font-size: 14px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.bracketProfileLine {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.bracketDistribution {
  grid-column: 1 / -1;
  width: 100%;
  height: 20px;
}

.bracketDistribution svg {
  display: block;
  width: 100%;
  height: 100%;
}

.consolationBracket {
  margin-top: 14px;
  max-width: 280px;
}

.roundColumn {
  min-width: 0;
}

.roundMatches {
  display: grid;
  gap: 10px;
}

.matchCard {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.matchCard:hover {
  border-color: rgba(13, 107, 95, 0.5);
  box-shadow: 0 8px 20px rgba(24, 33, 27, 0.07);
}

.matchCardMeta,
.matchDiffs {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.statusPill {
  padding: 2px 6px;
  border-radius: 5px;
  background: #edf1ea;
  color: var(--muted);
}

.statusPill.live {
  background: rgba(143, 61, 40, 0.12);
  color: var(--warn);
}

.matchTeam {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #edf1ea;
  border-radius: 6px;
  background: #fbfcfa;
}

.matchTeam.winner {
  border-color: rgba(13, 107, 95, 0.32);
  background: rgba(13, 107, 95, 0.06);
}

.matchTeamName {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.matchTeamName span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matchTeamName small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.matchTeamScore {
  min-width: 28px;
  text-align: right;
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.matchTeamStats {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.matchMiniDistribution {
  width: 100%;
  height: 30px;
  grid-column: 1 / -1;
}

.matchMiniDistribution svg {
  display: block;
  width: 100%;
  height: 100%;
}

.emptyMini {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.matchVenue {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matchHero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.backLink {
  align-self: start;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.panelLabel {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.matchHero h2 {
  font-size: 24px;
  line-height: 1.1;
}

.matchHero h2 a {
  color: inherit;
}

.detailScore {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 10px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.detailScore span {
  min-width: 34px;
  text-align: center;
  font-size: 30px;
  font-weight: 950;
}

.detailScore small {
  padding: 4px 7px;
  border-radius: 5px;
  background: #edf1ea;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.matchStatsPanel {
  margin-bottom: 14px;
}

.matchStatsHeader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 13px 14px 4px;
}

.matchStatsHeader h2 {
  text-align: center;
}

.matchStatsTeam {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.matchStatsTeam.away {
  justify-content: end;
  text-align: right;
}

.matchStatsTeam span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matchStatsTeam a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matchStatsTeam i {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(37, 45, 38, 0.14);
}

.matchStatRows {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
}

.matchStatRow {
  display: grid;
  grid-template-columns: minmax(58px, 90px) minmax(220px, 1fr) minmax(58px, 90px);
  gap: 12px;
  align-items: center;
}

.matchStatValue {
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.homeValue {
  text-align: right;
}

.awayValue {
  text-align: left;
}

.homeAdv .homeValue,
.awayAdv .awayValue {
  color: var(--ink);
}

.matchStatTrack {
  position: relative;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f3f5f1 0 49.5%, #cfd8d1 49.5% 50.5%, #f3f5f1 50.5% 100%);
}

.matchStatTrack span {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  min-width: 74px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
}

.matchStatFill {
  position: absolute;
  top: 50%;
  height: 9px;
  border-radius: 999px;
  opacity: 0.86;
  transform: translateY(-50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.homeStatFill {
  right: 50%;
}

.awayStatFill {
  left: 50%;
}

.comparisonPanel {
  margin-bottom: 14px;
}

.comparisonChart {
  min-height: 280px;
}

.teamHero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.teamHero h2 {
  font-size: 28px;
  line-height: 1.05;
}

.teamToneSwatch {
  width: 44px;
  height: 44px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(37, 45, 38, 0.14);
}

.teamKpis {
  margin-bottom: 14px;
}

.teamDistributionPanel {
  margin-bottom: 14px;
}

.teamDetailChart {
  min-height: 260px;
}

.teamMatchesPanel {
  margin-bottom: 14px;
}

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

.teamMatchGroup {
  min-width: 0;
}

.teamMatchGroup h3 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.teamFixtureList {
  display: grid;
  gap: 8px;
}

.teamFixtureCard {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: inherit;
  text-decoration: none;
}

.teamFixtureCard:hover {
  border-color: rgba(13, 107, 95, 0.45);
  box-shadow: 0 6px 14px rgba(24, 33, 27, 0.06);
}

.teamFixtureCard.played {
  border-color: rgba(143, 61, 40, 0.26);
  background: #fff8f4;
}

.teamFixtureCard.live {
  border-color: rgba(47, 111, 221, 0.42);
  background: #f6f9ff;
}

.teamFixtureMeta,
.teamFixtureSub {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.teamFixtureSub {
  display: grid;
  gap: 2px;
}

.teamFixtureTone {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.teamFixtureSub span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teamFixtureMain {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  align-items: baseline;
}

.teamFixtureMain strong {
  font-size: 20px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.teamFixtureMain span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compactEmpty {
  padding: 12px;
  font-size: 12px;
}

.strongBand {
  opacity: 0.42;
}

.stddevBand {
  stroke: #9a5738;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.74;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9));
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    display: grid;
    padding: 16px;
    overflow: hidden;
  }

  .topbarRight {
    display: grid;
    gap: 10px;
    min-width: 0;
  }

  .navLinks {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  main {
    padding: 14px 16px 32px;
    overflow-x: hidden;
  }

  main.bracketPage {
    width: max-content;
    min-width: 100%;
    overflow-x: visible;
  }

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

  .chart {
    min-height: 250px;
  }

  .tallChart {
    min-height: 500px;
  }

  .tableWrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 6px;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
  }

  tbody tr {
    display: grid;
    position: relative;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
    padding: 8px 10px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  tbody tr:hover {
    background: var(--surface);
  }

  th,
  td,
  th:first-child,
  td:first-child,
  th:nth-child(2),
  td:nth-child(2),
  th:nth-child(3),
  td:nth-child(3) {
    width: auto;
    padding: 0;
    border-bottom: 0;
    text-align: left;
    white-space: normal;
  }

  .rankCell {
    position: absolute;
    top: 8px;
    left: 10px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #edf1ea;
    text-align: center;
  }

  td.teamNameCell {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-left: 38px;
    font-size: 14px;
  }

  .distributionCell {
    grid-column: 1 / -1;
    margin-top: 5px;
  }

  .miniDistribution {
    width: 100%;
    min-width: 0;
    height: 44px;
  }

  .metricCell {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 4px;
    color: var(--ink);
    font-size: 12px;
  }

  .metricCell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }

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

  .matchHero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .teamHero {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .teamHero .backLink {
    grid-column: 1 / -1;
  }

  .teamHero h2 {
    font-size: 24px;
  }

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

  .teamFixtureMain span {
    max-width: 56%;
  }

  .detailScore {
    width: 100%;
    justify-content: start;
  }

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

  .matchStatsHeader h2 {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: left;
  }

  .matchStatsTeam {
    grid-row: 2;
    font-size: 12px;
  }

  .matchStatRow {
    grid-template-columns: 48px minmax(170px, 1fr) 48px;
    gap: 8px;
  }

  .matchStatValue {
    font-size: 14px;
  }

  .matchStatTrack span {
    min-width: 62px;
    padding-inline: 6px;
    font-size: 10px;
  }

}
