:root {
  --ink: #17201b;
  --muted: #617065;
  --paper: #f3f0e6;
  --surface: #ffffff;
  --line: #d9ddd3;
  --green: #116b4f;
  --green-dark: #0d241b;
  --gold: #dca32d;
  --red: #bd3d33;
  --blue: #2f6f9a;
  --shadow: 0 14px 32px rgba(20, 32, 24, 0.12);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  min-height: 330px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(7, 22, 17, 0.94), rgba(7, 22, 17, 0.52)),
    url("/assets/stadium-banner.png") center / cover;
}

.nav {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
}

.nav div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 850;
}

.brand {
  font-size: 1.05rem;
}

.nav div a {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.18);
}

.nav div a.active {
  color: #17150d;
  background: var(--gold);
  border-color: var(--gold);
}

.page-hero {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 48px 0 54px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #ffe08c;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--green);
}

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

h1 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.page-hero p:not(.eyebrow) {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 720;
  line-height: 1.45;
}

main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.status-pill,
.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 900;
}

.status-pill {
  color: #f8f3df;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(0, 0, 0, 0.28);
}

.button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

select,
input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.group-card,
.fixture-group,
.table-section,
.leader-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.group-card h2,
.fixture-group h2 {
  margin: 0;
  padding: 14px 16px;
  color: #fff;
  background: var(--green-dark);
  font-size: 1.15rem;
}

.group-card:nth-child(3n + 2) h2,
.fixture-group:nth-child(3n + 2) h2 {
  background: var(--blue);
}

.group-card:nth-child(3n) h2,
.fixture-group:nth-child(3n) h2 {
  background: var(--red);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

td {
  font-weight: 780;
}

.country-cell,
.owner-teams,
.fixture-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.flag {
  width: 34px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 3px;
  object-fit: cover;
  background: #eee;
}

.team-name,
.owner-name {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.owner {
  color: var(--muted);
  font-weight: 760;
}

.odds {
  color: var(--green);
  font-weight: 950;
}

.fixtures-list {
  display: grid;
  gap: 18px;
}

.fixture-controls {
  align-items: center;
}

.icon-button {
  width: 42px;
  min-height: 42px;
  justify-content: center;
  padding: 0;
  font-size: 1.25rem;
}

.icon-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.fixture-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.feature-copy {
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(17, 107, 79, 0.11), rgba(220, 163, 45, 0.12)),
    #fff;
}

.feature-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.98;
}

.feature-copy p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 780;
  line-height: 1.5;
}

.feature-scoreboard {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  color: #fff;
  background: var(--green-dark);
}

.feature-scoreboard span,
.feature-scoreboard small,
.match-tag,
.insight-label {
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.feature-scoreboard strong {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.9;
}

.feature-scoreboard small {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
}

.match-tag {
  color: var(--green);
}

.date-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(108px, 1fr);
  gap: 10px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.date-chip {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.date-chip span,
.date-chip em,
.stat-tile span,
.fixture-card-meta,
.fixture-team-block span,
.fixture-team-block em,
.fixture-insight small,
.probability-labels {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.date-chip strong {
  display: block;
  margin: 3px 0;
  font-size: 1.1rem;
}

.date-chip.active {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.date-chip.active span,
.date-chip.active em {
  color: rgba(255, 255, 255, 0.78);
}

.fixture-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.stat-tile strong {
  display: block;
  margin-top: 4px;
  color: var(--green-dark);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
}

.stat-tile-compact strong {
  font-size: clamp(0.92rem, 1.6vw, 1.18rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.fixture-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.fixture-card-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8f7ef;
}

.fixture-card-meta span:nth-child(2) {
  color: var(--ink);
}

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

.fixture-team-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fixture-team-block.away {
  flex-direction: row-reverse;
  text-align: right;
}

.fixture-team-block .flag {
  width: 48px;
  height: 34px;
}

.fixture-team-block div {
  min-width: 0;
}

.fixture-team-block strong {
  display: block;
  overflow-wrap: break-word;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.fixture-team-block span,
.fixture-team-block em {
  display: block;
}

.fixture-team-block em {
  color: var(--green);
  font-weight: 950;
}

.score-panel {
  display: grid;
  grid-template-columns: 62px 24px 62px;
  gap: 7px;
  align-items: center;
}

.score-panel-readonly {
  grid-template-rows: auto auto;
}

.score-panel-readonly strong {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f7ef;
  color: var(--green-dark);
  font-size: 1.15rem;
}

.score-panel-readonly small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.score-input {
  width: 62px;
  text-align: center;
  font-weight: 950;
}

.versus {
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 950;
}

.fixture-insight {
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.fixture-insight.has-broadcast {
  grid-template-columns: minmax(180px, 0.5fr) auto minmax(0, 1fr);
}

.fixture-insight strong,
.fixture-insight small {
  display: block;
}

.fixture-broadcast {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
}

.broadcast-badge {
  min-width: 48px;
  border-radius: 4px;
  padding: 5px 8px;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1;
}

.broadcast-badge.itv {
  color: #17150d;
  background: #f2c900;
}

.broadcast-badge.bbc {
  color: #fff;
  background: #c9272c;
}

.probability-track {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7e7df;
}

.probability-track span:first-child {
  background: var(--gold);
}

.probability-track span:last-child {
  background: var(--blue);
}

.probability-labels {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.fixture-insight.has-broadcast .probability-labels {
  grid-column: 3;
}

.fixture-details-toggle {
  width: 100%;
  min-height: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 8px 14px;
  color: var(--green-dark);
  background: #f8f7ef;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.fixture-details-toggle:hover,
.fixture-details-toggle:focus-visible {
  background: #eef2e9;
}

.fixture-details-chevron {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: transform 0.18s ease;
}

.fixture-card.details-open .fixture-details-chevron {
  transform: rotate(180deg);
}

.fixture-details-panel {
  border-top: 1px solid var(--line);
  background: #fff;
}

.fixture-details-panel[hidden] {
  display: none;
}

.match-details-content {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.match-details-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.match-details-summary > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8f7ef;
}

.match-details-summary span,
.match-details-summary strong,
.match-details-summary small {
  display: block;
}

.match-details-summary span,
.match-details-summary small,
.match-details-source {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
}

.match-details-summary strong {
  margin: 3px 0;
  overflow-wrap: anywhere;
  color: var(--green-dark);
  font-size: 1.05rem;
}

.match-scorers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.match-scorer-team {
  display: grid;
  gap: 6px;
  min-width: 0;
  border-left: 3px solid var(--green);
  padding: 8px 10px;
  background: rgba(17, 107, 79, 0.06);
}

.match-scorer-team > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-scorer-team .flag {
  width: 26px;
  height: 18px;
}

.match-scorer-team span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.match-scorer-team em {
  color: var(--green);
  font-style: normal;
  font-weight: 950;
}

.match-stats {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.match-stats-heading,
.match-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.7fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  text-align: center;
}

.match-stats-heading {
  color: #fff;
  background: var(--green-dark);
  font-size: 0.82rem;
}

.match-stats-heading strong:first-child,
.match-stat-row strong:first-child {
  text-align: left;
}

.match-stats-heading strong:last-child,
.match-stat-row strong:last-child {
  text-align: right;
}

.match-stat-row {
  border-top: 1px solid var(--line);
}

.match-stat-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.match-stat-row.primary {
  background: rgba(220, 163, 45, 0.13);
}

.match-details-loading,
.match-details-empty {
  padding: 18px 16px;
  color: var(--muted);
  font-weight: 800;
}

.match-details-source {
  text-align: right;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 850;
}

.leader-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  margin-bottom: 18px;
}

.leader-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.leader-hero p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 760;
}

.leader-badge {
  min-width: 150px;
  border-radius: 8px;
  padding: 16px;
  color: #fff;
  background: var(--green-dark);
  text-align: center;
}

.leader-badge strong {
  display: block;
  font-size: 2rem;
}

.table-section {
  overflow-x: auto;
}

.leader-table {
  min-width: 820px;
}

.rank {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-weight: 950;
}

.owner-teams {
  flex-wrap: wrap;
  gap: 6px;
}

.team-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #e6f0ea;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.prize-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.prize-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.prize-card.active {
  border-color: rgba(17, 107, 79, 0.36);
}

.prize-card.waiting {
  background: #fbfaf4;
}

.prize-card-top,
.prize-leader,
.prize-contenders div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prize-card-top {
  justify-content: space-between;
}

.prize-amount,
.prize-state,
.prize-tbc {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 950;
}

.prize-amount {
  color: #151408;
  background: var(--gold);
}

.prize-state {
  color: var(--green-dark);
  background: #e6f0ea;
  font-size: 0.8rem;
}

.prize-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
}

.prize-leader {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(17, 107, 79, 0.09), rgba(220, 163, 45, 0.12));
}

.prize-leader .flag {
  width: 54px;
  height: 38px;
}

.prize-leader strong,
.prize-leader span,
.prize-metric strong,
.prize-metric span {
  display: block;
}

.prize-leader strong {
  font-size: clamp(1.4rem, 3vw, 2.35rem);
  line-height: 1;
}

.prize-leader span,
.prize-metric span,
.prize-contenders em {
  color: var(--muted);
  font-style: normal;
  font-weight: 780;
  line-height: 1.35;
}

.prize-tbc {
  min-width: 54px;
  justify-content: center;
  color: #fff;
  background: var(--green-dark);
}

.prize-metric {
  border-left: 4px solid var(--green);
  padding-left: 12px;
}

.prize-metric strong {
  color: var(--green-dark);
  font-size: 1.18rem;
}

.prize-contenders {
  display: grid;
  gap: 7px;
}

.prize-contenders div {
  border-radius: 8px;
  padding: 8px;
  background: #f8f7ef;
}

.prize-contenders span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  background: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 950;
}

.prize-contenders .flag {
  width: 30px;
  height: 21px;
}

.prize-contenders strong {
  min-width: 100px;
}

.prize-table {
  min-width: 760px;
}

.table-summary {
  margin-bottom: 18px;
}

.source-link {
  color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.squad-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.squad-board,
.squad-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.squad-board-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #f8f7ef;
}

.squad-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.squad-title .flag {
  width: 50px;
  height: 35px;
}

.squad-title h2,
.squad-side h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
}

.formation-badge {
  min-width: 92px;
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  background: var(--green-dark);
  text-align: center;
  font-weight: 950;
}

.builder-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.builder-controls select {
  min-width: 136px;
  background: #fff;
}

.builder-controls .button {
  min-height: 42px;
}

.squad-pitch {
  position: relative;
  min-height: 720px;
  aspect-ratio: 4 / 5;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 9%, rgba(0, 0, 0, 0.03) 9% 18%),
    linear-gradient(180deg, #2fba63, #16864d);
}

.squad-pitch::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  pointer-events: none;
}

.pitch-line {
  position: absolute;
  pointer-events: none;
}

.pitch-halfway {
  top: 50%;
  left: 14px;
  right: 14px;
  height: 2px;
  background: rgba(255, 255, 255, 0.28);
}

.pitch-centre {
  top: calc(50% - 74px);
  left: calc(50% - 74px);
  width: 148px;
  height: 148px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.pitch-box {
  left: 25%;
  width: 50%;
  height: 16%;
  border: 2px solid rgba(255, 255, 255, 0.28);
}

.pitch-box.top {
  top: 14px;
  border-top: 0;
}

.pitch-box.bottom {
  bottom: 14px;
  border-bottom: 0;
}

.pitch-rows {
  position: absolute;
  inset: 28px 16px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  z-index: 1;
}

.pitch-row {
  display: grid;
  grid-template-columns: repeat(var(--players), minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  justify-items: center;
}

.pitch-players {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.player-card {
  width: min(92px, 100%);
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.58);
}

.pitch-player {
  position: absolute;
  width: clamp(74px, 11vw, 98px);
  padding: 3px 4px;
  cursor: grab;
  transform: translate(-50%, -50%);
  transition: filter 0.16s ease, transform 0.16s ease;
}

.pitch-player:hover {
  filter: brightness(1.08);
  transform: translate(-50%, -52%);
}

.pitch-player:active {
  cursor: grabbing;
}

.player-card.is-dragging,
.bench-player.is-dragging {
  opacity: 0.42;
}

.pitch-player.is-click-selected {
  z-index: 5;
  filter: brightness(1.08);
}

.pitch-player.is-click-selected .player-photo,
.bench-player.is-click-selected .player-photo {
  border-color: var(--gold);
  box-shadow:
    0 0 0 4px rgba(220, 163, 45, 0.32),
    0 10px 20px rgba(0, 0, 0, 0.28);
}

.player-photo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.16)),
    var(--green-dark);
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  font-size: 0.82rem;
  font-weight: 950;
}

.player-photo.has-image {
  background-color: #dfe6dc;
}

.player-card strong {
  display: -webkit-box;
  width: 100%;
  min-height: 2.1em;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.squad-side {
  padding: 16px;
}

.squad-side-header {
  margin-bottom: 14px;
}

.squad-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 820;
  line-height: 1.4;
}

.squad-side-header p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.45;
}

.bench-panel {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8f7ef;
}

.bench-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.bench-heading h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
}

.bench-heading > span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #fff;
  background: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.roster-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 780;
}

.roster-note.error {
  color: var(--red);
}

.bench-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.bench-player {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fff;
  cursor: grab;
}

.bench-player:active {
  cursor: grabbing;
}

.bench-player.is-click-selected {
  border-color: var(--gold);
  background: #fff8df;
  box-shadow: 0 0 0 3px rgba(220, 163, 45, 0.22);
}

.bench-player strong,
.bench-player span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bench-player strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.bench-player span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
}

.bench-photo {
  width: 42px;
  height: 42px;
  font-size: 0.68rem;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
}

.squad-list-rows {
  display: grid;
  gap: 10px;
}

.squad-list-rows.compact {
  gap: 8px;
}

.squad-list-row {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.squad-list-row h3 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.squad-list-row div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.squad-list-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px;
  background: #f8f7ef;
  font-size: 0.85rem;
  font-weight: 880;
}

.tables-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  margin-bottom: 28px;
}

.live-table-card {
  box-shadow: none;
}

.live-table {
  table-layout: fixed;
}

.live-table th,
.live-table td {
  padding: 9px 8px;
}

.live-table th:first-child,
.live-table td:first-child {
  width: calc(100% - 280px);
}

.live-table td:not(:first-child),
.live-table th:not(:first-child) {
  text-align: center;
  width: 35px;
  white-space: nowrap;
}

.live-table .country-cell {
  gap: 8px;
}

.live-table .flag {
  width: 30px;
  height: 21px;
}

.live-table tr.qualified {
  background: rgba(17, 107, 79, 0.09);
}

.live-table tr.third-qualified {
  background: rgba(220, 163, 45, 0.13);
}

.live-table strong,
.knockout-team strong,
.third-item strong {
  display: block;
}

.live-table em,
.knockout-team span,
.knockout-team em,
.third-item span,
.third-item em {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 820;
}

.table-rank {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  background: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 950;
}

.knockout-section {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding-top: 8px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.section-heading p:not(.eyebrow) {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.45;
}

.third-race-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.third-race-card h3 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

.third-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.third-item {
  display: grid;
  grid-template-columns: 28px 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #f8f7ef;
}

.third-item .flag {
  width: 34px;
  height: 24px;
}

.third-item span:not(.table-rank),
.third-item em {
  grid-column: 3;
}

.third-item.in {
  border-color: rgba(17, 107, 79, 0.45);
  background: rgba(17, 107, 79, 0.08);
}

.third-item.out {
  opacity: 0.62;
}

.knockout-grid {
  display: block;
  overflow-x: auto;
  padding-bottom: 8px;
}

.bracket-board {
  min-width: 1120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f3;
  padding: 16px;
}

.bracket-stage {
  display: grid;
  grid-template-columns: repeat(9, minmax(104px, 1fr));
  gap: 10px;
  align-items: stretch;
  min-height: 760px;
}

.bracket-column {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.bracket-column h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.bracket-column-body {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
  min-height: 710px;
}

.bracket-column.side-center .bracket-column-body {
  justify-content: center;
  gap: 70px;
}

.knockout-card {
  position: relative;
  border: 1px solid #aab6c7;
  border-radius: 8px;
  background: #fff;
  overflow: visible;
}

.bracket-column.side-left:not(.side-center) .knockout-card::after,
.bracket-column.side-right:not(.side-center) .knockout-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 1px;
  background: #aab6c7;
}

.bracket-column.side-left .knockout-card::after {
  right: -11px;
}

.bracket-column.side-right .knockout-card::after {
  left: -11px;
}

.knockout-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.knockout-meta .match-tag {
  font-size: 0.66rem;
}

.knockout-teams {
  display: grid;
  gap: 5px;
  padding: 6px;
}

.knockout-team {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 42px;
  border: 1px solid #d5dce6;
  border-radius: 6px;
  padding: 6px;
  background: #fbfcfd;
}

.knockout-team.projected-winner {
  border-color: rgba(17, 107, 79, 0.5);
  background: rgba(17, 107, 79, 0.08);
}

.knockout-team.placeholder {
  color: var(--muted);
  background: #f3f5f7;
}

.knockout-team .flag {
  width: 24px;
  height: 17px;
}

.knockout-team .table-rank {
  width: 24px;
  height: 24px;
  font-size: 0.68rem;
}

.knockout-team strong {
  display: -webkit-box;
  min-height: 1rem;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.1;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.knockout-team span,
.knockout-team em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knockout-venue {
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding: 0 8px 7px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1220px) {
  .group-grid {
    grid-template-columns: repeat(3, minmax(360px, 1fr));
  }

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

@media (max-width: 1120px) {
  .group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tables-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  }

  .fixture-feature,
  .fixture-stats,
  .prize-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .squad-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 500px;
  }

  .nav,
  .page-hero,
  main {
    width: calc(100vw - 28px);
    max-width: none;
  }

  .page-hero p:not(.eyebrow),
  h1 {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .page-hero p:not(.eyebrow) {
    width: min(100%, 340px);
  }

  .nav,
  .fixture-feature,
  .leader-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    display: flex;
  }

  .nav div {
    justify-content: flex-start;
  }

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

  .section-heading,
  .third-race-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .third-list,
  .knockout-grid {
    grid-template-columns: 1fr;
  }

  .squad-board-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .formation-badge {
    min-width: 0;
  }

  .builder-controls {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    width: 100%;
  }

  .builder-controls select,
  .builder-controls .button {
    width: 100%;
    min-width: 0;
  }

  .squad-pitch {
    width: 100%;
    height: 560px;
    min-height: 0;
    aspect-ratio: auto;
  }

  .pitch-rows {
    inset: 24px 8px 18px;
    gap: 5px;
  }

  .pitch-row {
    gap: 4px;
  }

  .player-photo {
    width: 42px;
    height: 42px;
    font-size: 0.68rem;
  }

  .pitch-player {
    width: 70px;
  }

  .player-card strong {
    min-height: 2.2em;
    font-size: 0.66rem;
  }

  .bench-list {
    max-height: 420px;
  }

  .bench-photo {
    width: 42px;
    height: 42px;
  }

  .fixture-feature,
  .fixture-stats,
  .fixture-matchup,
  .fixture-insight,
  .fixture-insight.has-broadcast,
  .prize-grid {
    grid-template-columns: 1fr;
  }

  .fixture-feature {
    display: grid;
  }

  .feature-scoreboard {
    width: 100%;
  }

  .fixture-controls {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    width: 100%;
  }

  .fixture-controls select,
  .fixture-controls #resetScores {
    grid-column: 1 / -1;
    width: 100%;
  }

  .fixture-matchup {
    gap: 16px;
  }

  .fixture-team-block.away {
    flex-direction: row;
    text-align: left;
  }

  .score-panel {
    justify-content: center;
  }

  .probability-labels,
  .fixture-insight.has-broadcast .probability-labels {
    grid-column: 1;
  }

  .fixture-broadcast {
    justify-self: start;
  }

  .match-details-summary,
  .match-scorers {
    grid-template-columns: 1fr;
  }

  .match-stats-heading,
  .match-stat-row {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 0.8fr) minmax(0, 1fr);
    gap: 6px;
    padding-inline: 10px;
  }

  .score-input {
    width: 52px;
  }

  .live-table .extra-stat {
    display: none;
  }

  .flag {
    width: 30px;
    height: 21px;
  }
}
