/* Page layouts for overview, leagues and teams. */
#app { display: grid; gap: 12px; min-width: 0; }
#app > * { min-width: 0; max-width: 100%; }
.context { margin: 0; max-width: 100%; font-size: 12px; line-height: 1.45; color: var(--muted); overflow-wrap: break-word; }
.context a { color: var(--navy); font-weight: 400; text-decoration: none; }
.context a:hover { color: #111; text-decoration: underline; }
.context .league-logo { width: 14px; height: 14px; vertical-align: -2px; }
.context .country-flag {
  width: 16px;
  height: 11px;
  vertical-align: -1px;
  background: none;
  box-shadow: 0 0 0 1px rgba(16, 47, 85, .18);
}

.view-controls { display: grid; gap: 16px; margin: 2px 0 4px; }
.view-controls .season-switch,
.view-controls .venue-switch { margin: 0; }
.filterbar {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.odds-sep { color: var(--muted); font-weight: 700; }
.filterbar .odds-to { gap: 6px; }
.filterbar .odds-range,
.filterbar .match-min {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filterbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.filterbar input,
.filterbar select,
.search-label input {
  height: 32px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b5cbd4;
  border-radius: 2px;
}
.filterbar input[type=number] { width: 84px; }
.filterbar input[type=date] { width: 132px; }
.filterbar button {
  height: 32px;
  padding: 0 14px;
  color: #1a1a1a;
  background: var(--blue);
  border: 1px solid #e6b800;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
#reset {
  color: var(--ink);
  background: #fff;
  border: 1px solid #b5cbd4;
  font-weight: 700;
}
.filterbar button:hover { background: #ffe14a; }
#reset:hover { background: var(--hover); }
#filterError { margin: 0; font-size: 12px; color: var(--red); }

.search-label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 700;
}
.search-label input { width: min(260px, 100%); }
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  border-top: 1px solid var(--grid);
  background: #f7fafb;
}
.leader-block .pager {
  margin-top: 8px;
  border: 1px solid var(--grid);
}
.pager-gap {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  user-select: none;
}
.page-btn {
  min-width: 28px;
  height: 26px;
  padding: 0 6px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b5cbd4;
  border-radius: 2px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.page-btn:hover { background: var(--hover); }
.page-btn.active {
  color: #fff;
  background: #2f2f2f;
  border-color: #2f2f2f;
}

.season-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 0;
  border: 0;
  overflow: visible;
}
.season-btn {
  height: 32px;
  padding: 0 14px;
  color: #1a1a1a;
  background: #c7cdcf;
  border: 1px solid #c7cdcf;
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.season-btn:hover { background: #b7bec0; }
.season-btn.active { color: #fff; background: #2f2f2f; border-color: #2f2f2f; }
.titlebar .title-lead { flex: 1 1 auto; }
.titlebar .breadcrumb { min-width: 0; }
.season-select { flex: 0 0 auto; }
.season-select select {
  -webkit-appearance: none;
  appearance: none;
  height: 34px;
  padding: 0 30px 0 12px;
  color: #333;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23666' stroke-width='1.6' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid #d0d0d0;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.season-select select:hover { border-color: #b5b5b5; }
.season-select select:focus { outline: 2px solid #f5c400; outline-offset: 1px; }
.stage-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2px 18px;
  width: 100%;
  margin: 2px 0 10px;
  padding: 0 2px;
  border-bottom: 0;
}
.stage-btn {
  height: 28px;
  margin: 0;
  padding: 0 0 3px;
  color: #5c6568;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
}
.stage-btn + .stage-btn { margin-left: 0; }
.stage-btn:hover { color: #1a1a1a; background: transparent; }
.stage-btn.active {
  color: #1a1a1a;
  background: transparent;
  border-bottom-color: #f5c400;
  box-shadow: none;
}
.sheet-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0;
  width: 100%;
  margin: 0 0 8px;
  border-bottom: 1px solid #d0d0d0;
}
.sheet-btn {
  height: 32px;
  margin: 0 0 -1px;
  padding: 0 14px;
  color: #4e5759;
  background: #e8e8e8;
  border: 1px solid #d0d0d0;
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.sheet-btn + .sheet-btn { margin-left: -1px; }
.sheet-btn:hover { color: #1a1a1a; background: #f4f4f4; }
.sheet-btn.active {
  color: #1a1a1a;
  background: #fff;
  border-bottom-color: #fff;
  box-shadow: inset 0 3px 0 #f5c400;
}
.sheet-empty {
  margin: 0;
  padding: 16px 12px;
  color: #5c6568;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-top: 0;
  font-size: 13px;
}
.leader-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#app.landing { gap: 20px; }
#app.landing .leader-grid { gap: 28px; }
#app.landing .ad-leader { margin: 22px 0; }
.standings-head.sheet-ad { display: block; padding: 0 0 8px; }
.standings-head.sheet-ad .ad-slot,
#app.landing .standings-head.sheet-ad .ad-slot { margin: 0; }
#app.landing .leader-grid + .leader-grid { margin-top: 20px; }
.leader-grid .module { min-width: 0; }
.leader-block { display: grid; gap: 0; min-width: 0; }
.titlebar.league-title { min-height: 48px; }
.titlebar.league-title h1,
.titlebar.hero-title h1 {
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.titlebar.hero-title h1 {
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.titlebar.hero-title h1,
.titlebar.hero-title + .context { padding-left: 0; }
.titlebar.league-title .country-flag { width: 28px; height: 19px; }
.titlebar.team-title .title-lead { justify-content: flex-start; }
.titlebar.team-title h1,
.titlebar.team-title + .context { text-align: left; }
.table-heading {
  margin: 0 0 6px;
  padding: 0 2px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--navy);
  background: none;
  border: 0;
}
.card-heading {
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.02em;
}
.leader-grid .table-scroll { min-width: 0; overflow-x: auto; }
.leader-grid .data-table { width: 100%; table-layout: fixed; }
.leader-grid .data-table th,
.leader-grid .data-table td { overflow: hidden; }
.leader-grid .data-table th:nth-child(1),
.leader-grid .data-table td:nth-child(1) { width: 32%; }
.leader-grid .data-table th:nth-child(3),
.leader-grid .data-table td:nth-child(3) { width: 3em; }
.leader-grid .data-table th:nth-child(4),
.leader-grid .data-table td:nth-child(4) {
  width: 6.8em;
  padding-left: 6px;
  padding-right: 6px;
}
.leader-grid .poss-table th:nth-child(4),
.leader-grid .poss-table td:nth-child(4),
.leader-grid .sot-table th:nth-child(4),
.leader-grid .sot-table td:nth-child(4) { width: 8.6em; }
#app.landing .leader-grid .data-table th:nth-child(1),
#app.landing .leader-grid .data-table td:nth-child(1) {
  width: 2.4em;
  padding-right: 4px;
}
#app.landing .leader-grid .data-table th:nth-child(2),
#app.landing .leader-grid .data-table td:nth-child(2) { width: 34%; }
#app.landing .leader-grid .data-table th:nth-child(3),
#app.landing .leader-grid .data-table td:nth-child(3) {
  width: auto;
  text-align: left;
}
.leader-grid .team-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  font-weight: 700;
}
.leader-grid .league-chip .country-flag { flex-shrink: 0; }
.leader-grid .team-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leader-grid .league-chip { max-width: 100%; min-width: 0; }
.leader-grid .league-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leader-grid .positive,
.leader-grid .negative { min-width: 0; padding: 0; background: none; }
.view-all {
  display: inline-block;
  width: fit-content;
  justify-self: end;
  margin: 6px 2px 0;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  text-align: right;
  color: var(--navy);
  background: none;
  border: 0;
  text-decoration: none;
}
.view-all:hover { background: none; text-decoration: underline; }
.team-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  color: var(--navy);
  font-weight: 400;
  text-decoration: none;
}
.team-link:hover { color: #111; text-decoration: underline; }
.team-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}
.team-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .02em;
}
.team-logo[hidden],
.team-logo-fallback[hidden] { display: none !important; }
#app:not(.landing) .leader-grid tbody tr:first-child td { background: #fff6d0; }
.team-heading { display: flex; align-items: center; gap: 10px; }
.team-heading .team-logo,
.team-heading .team-logo-fallback { width: 28px; height: 28px; font-size: 11px; }
.leader-grid .data-table td { height: 28px; }
.section-label {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
}

.data-scroll {
  scrollbar-width: thin;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}
.data-scroll::-webkit-scrollbar { height: 8px; }
.data-scroll::-webkit-scrollbar-thumb { background: #8aa0b4; }
.data-table { font-size: 12px; font-variant-numeric: tabular-nums; }
.data-table td, .data-table th { padding: 4px 8px; height: 28px; white-space: nowrap; }
.data-table th { height: 32px; }
.table-panel .data-table { min-width: 880px; }
.data-table td:first-child, .data-table th:first-child { text-align: left; }
.data-table td:nth-child(n+3) { text-align: right; }
.data-table.match-table th:nth-child(3),
.data-table.match-table td:nth-child(3) { text-align: left; }
.table-panel .data-table th,
.table-panel .data-table td { text-align: center; }
.table-panel .data-table th:nth-child(2),
.table-panel .data-table td:nth-child(2) { text-align: left; }
.table-panel .data-table.has-league th:nth-child(3),
.table-panel .data-table.has-league td:nth-child(3) { text-align: left; }
.data-table a { color: var(--navy); font-weight: 400; text-decoration: none; }
.data-table a:hover { color: #111; text-decoration: underline; }
.data-table tbody tr { cursor: default; }
#app:not(.landing) .leader-grid .data-table tbody tr:first-child td { background: #fff6d0; font-weight: 700; }
.sort-btn {
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  white-space: nowrap;
  cursor: pointer;
}
.standings-panel {
  border: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}
.standings-panel .table-scroll {
  border: 1px solid #e3e3e3;
  background: #fff;
  overflow-x: auto;
}
.standings-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 0;
  padding: 2px 0 4px 9px;
  background: transparent;
  color: var(--ink);
}
.standings-head .table-heading {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--navy);
}
.standings-head p {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.table-panel .standings-table {
  width: 752px;
  min-width: 752px;
  table-layout: fixed;
}
.table-panel .standings-table th:nth-child(1),
.table-panel .standings-table td:nth-child(1) {
  width: 28px;
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
}
.standings-table th:nth-child(2),
.standings-table td:nth-child(2) { width: 148px; }
.standings-table th:nth-child(n+3),
.standings-table td:nth-child(n+3) {
  width: 78px;
  padding-left: 4px;
  padding-right: 4px;
}
.standings-table th:nth-child(3),
.standings-table td:nth-child(3),
.standings-table th:nth-child(4),
.standings-table td:nth-child(4),
.standings-table th:nth-child(5),
.standings-table td:nth-child(5),
.standings-table th:nth-child(6),
.standings-table td:nth-child(6) {
  width: 36px;
  padding-left: 2px;
  padding-right: 2px;
}
.standings-table .team-link { display: flex; min-width: 0; max-width: 100%; }
#app.landing .standings-table a.team-link[href^="#/team/"] { font-weight: 700; }
.standings-table .team-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.standings-table .pts-cell { font-weight: 700; color: var(--navy); }
.standings-table tbody tr:first-child td { background: #fff6d0; }
.table-panel .timing-table {
  width: 772px;
  min-width: 772px;
}
.timing-table th:nth-child(3),
.timing-table td:nth-child(3) {
  width: 36px;
  padding-left: 2px;
  padding-right: 2px;
}
.timing-table th:nth-child(n+4),
.timing-table td:nth-child(n+4) {
  width: 70px;
  padding-left: 2px;
  padding-right: 2px;
}
.table-panel .band-table {
  width: 596px;
  min-width: 596px;
}
.band-table th:nth-child(n+4),
.band-table td:nth-child(n+4) {
  width: 48px;
  padding-left: 2px;
  padding-right: 2px;
}
.table-panel .offense-table { width: 492px; min-width: 492px; }
.table-panel .defense-table { width: 514px; min-width: 514px; }
.table-panel .corners-table,
.table-panel .fouls-table { width: 396px; min-width: 396px; }
.table-panel .xg-table { width: 632px; min-width: 632px; }
.table-panel .possession-table { width: 314px; min-width: 314px; }
.table-panel .shots-table { width: 556px; min-width: 556px; }
.table-panel .ou-table { width: 1084px; min-width: 1084px; }
.offense-table th:nth-child(3),
.offense-table td:nth-child(3),
.defense-table th:nth-child(3),
.defense-table td:nth-child(3),
.corners-table th:nth-child(3),
.corners-table td:nth-child(3),
.xg-table th:nth-child(3),
.xg-table td:nth-child(3),
.fouls-table th:nth-child(3),
.fouls-table td:nth-child(3),
.possession-table th:nth-child(3),
.possession-table td:nth-child(3) {
  width: 36px;
  padding-left: 2px;
  padding-right: 2px;
}
.offense-table th:nth-child(n+4),
.offense-table td:nth-child(n+4) {
  width: 70px;
  padding-left: 2px;
  padding-right: 2px;
}
.defense-table th:nth-child(4),
.defense-table td:nth-child(4),
.defense-table th:nth-child(5),
.defense-table td:nth-child(5),
.defense-table th:nth-child(7),
.defense-table td:nth-child(7) {
  width: 70px;
  padding-left: 2px;
  padding-right: 2px;
}
.defense-table th:nth-child(6),
.defense-table td:nth-child(6) { width: 92px; }
.corners-table th:nth-child(n+4),
.corners-table td:nth-child(n+4),
.fouls-table th:nth-child(n+4),
.fouls-table td:nth-child(n+4),
.possession-table th:nth-child(n+4),
.possession-table td:nth-child(n+4) {
  width: 92px;
  padding-left: 4px;
  padding-right: 4px;
}
.xg-table th:nth-child(n+4),
.xg-table td:nth-child(n+4) {
  width: 70px;
  padding-left: 2px;
  padding-right: 2px;
}
.data-table .na { color: #8b9496; font-weight: 400; }
.shots-table th:nth-child(3),
.shots-table td:nth-child(3) {
  width: 84px;
  padding-left: 2px;
  padding-right: 2px;
}
.shots-table th:nth-child(4),
.shots-table td:nth-child(4) {
  width: 108px;
  padding-left: 2px;
  padding-right: 2px;
}
.shots-table th:nth-child(5),
.shots-table td:nth-child(5) {
  width: 88px;
  padding-left: 2px;
  padding-right: 2px;
}
.shots-table th:nth-child(6),
.shots-table td:nth-child(6) {
  width: 100px;
  padding-left: 2px;
  padding-right: 2px;
}
.ou-table th:nth-child(3),
.ou-table td:nth-child(3) {
  width: 36px;
  padding-left: 2px;
  padding-right: 2px;
}
.ou-table th:nth-child(n+4),
.ou-table td:nth-child(n+4) {
  width: 70px;
  padding-left: 2px;
  padding-right: 2px;
}
.table-panel .perf-table {
  width: 670px;
  min-width: 670px;
}
.perf-table th:nth-child(n+7),
.perf-table td:nth-child(n+7) {
  width: 70px;
  padding-left: 2px;
  padding-right: 2px;
}
.ou-table th:nth-child(n+12),
.ou-table td:nth-child(n+12) {
  width: 78px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: #fff;
  border: 1px solid #b7c5d1;
}
.directory-grid > a {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 1px 8px;
  padding: 8px 10px;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--grid);
  border-bottom: 1px solid var(--grid);
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  text-decoration: none;
}
.directory-grid > a .country-flag,
.directory-grid > a .league-logo { grid-row: 1 / span 2; align-self: center; }
.directory-grid > a .league-logo { width: 20px; height: 20px; }
.directory-grid > a .country-flag {
  width: 18px;
  height: 12px;
  background: none;
  box-shadow: 0 0 0 1px rgba(16, 47, 85, .18);
}
.directory-grid > a strong { color: var(--navy); font-size: 12px; font-weight: 400; }
.directory-grid > a span { grid-column: 2; font-size: 11px; color: var(--muted); }
.directory-grid > a:nth-child(even) { background: #f7fafb; }
.directory-grid > a:hover { background: var(--hover); }

.league-summary {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 12px;
  background: #fff6d0;
  border: 1px solid #b7c5d1;
  border-radius: 0;
  color: var(--ink);
  font-size: 12px;
  box-shadow: none;
}
.league-summary span { color: var(--muted); }
.league-summary a { color: var(--navy); font-weight: 400; text-decoration: none; }
.league-summary a:hover { text-decoration: underline; }

.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  background: #fff;
  border: 1px solid #b7c5d1;
  box-shadow: none;
}
.kpis > div {
  padding: 10px 8px;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--grid);
  border-radius: 0;
  box-shadow: none;
  text-align: center;
}
.kpis > div:last-child { border-right: 0; }
.kpis > div.positive { background: #f3faf4; }
.kpis > div.negative { background: #fff5f5; }
.kpis strong {
  display: block;
  margin: 0;
  color: var(--navy);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.kpis > div > span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpis strong .positive,
.kpis strong .negative { display: inline; min-width: 0; padding: 0; background: none; border-radius: 0; }
.kpis strong .positive { color: var(--green); }
.kpis strong .negative { color: var(--red); }

.breadcrumb { margin: 0; font-size: 12px; color: var(--muted); }
.breadcrumb a { color: var(--navy); font-weight: 700; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.spaced { margin-top: 2px; }
.module svg { display: block; width: 100%; height: auto; padding: 8px 10px 4px; background: #fff; }
.team-metrics { margin-top: 12px; }
.team-block { margin-top: 12px; }
.module .fit-table { width: 100%; min-width: 0; }
.team-metrics .fit-table { table-layout: fixed; }
.team-metrics .fit-table th:first-child,
.team-metrics .fit-table td:first-child { width: 65%; }
.module .fit-table th:first-child,
.module .fit-table td:first-child { text-align: left; }
.module .fit-table th:nth-child(n+2),
.module .fit-table td:nth-child(n+2) { text-align: center; }
.module .pts-cell { font-weight: 700; color: var(--navy); }
.module .score-sheet { padding: 0 12px 12px; }
.module svg text { font: 11px Arial, "Helvetica Neue", sans-serif; fill: #34566a; }
.crest-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  background: #f7fafb;
}
.crest-mosaic a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--grid);
}
.crest-mosaic .team-logo,
.crest-mosaic .team-logo-fallback { width: 36px; height: 36px; font-size: 12px; background: transparent; }

.metric-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.metric-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #b7c5d1;
  border-radius: 0;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
}
.metric-kicker {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.metric-crest {
  grid-row: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
}
.metric-tile .team-logo,
.metric-tile .team-logo-fallback {
  width: 28px;
  height: 28px;
  background: transparent;
  box-shadow: none;
}
.metric-copy { display: grid; gap: 2px; min-width: 0; }
.metric-tile strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.metric-league { font-size: 11px; color: var(--muted); }
.metric-tile em {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-style: normal;
  justify-self: end;
  font-weight: 800;
}
.metric-tile em small { font-size: 11px; font-weight: 700; color: var(--muted); }
.metric-tile:hover { background: var(--hover); }

.rank-poster {
  padding: 0 0 10px;
  background: #fff;
  border: 1px solid #b7c5d1;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}
.rank-poster-head {
  margin: 0 0 8px;
  padding: 8px 12px;
  background: var(--navy);
  color: #fff;
}
.rank-poster-head h2 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.15;
}
.rank-poster-head p { margin: 3px 0 0; font-size: 11px; color: #e6e6e6; }
.rank-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
}
.rank-bars { display: grid; gap: 2px; padding: 0 8px; }
.rank-row {
  display: grid;
  grid-template-columns: 24px minmax(120px, 190px) minmax(80px, 1fr) 58px;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 2px 4px;
  color: var(--ink);
  text-decoration: none;
}
.rank-row:hover { background: var(--hover); }
.rank-no { font-size: 12px; font-weight: 700; text-align: right; color: var(--navy); }
.rank-team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rank-team strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rank-team .league-logo { width: 16px; height: 16px; object-fit: contain; }
.league-poster .rank-team .country-flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  background: none;
  box-shadow: 0 0 0 1px rgba(16, 47, 85, .18);
  border-radius: 1px;
}
.rank-track {
  height: 14px;
  overflow: hidden;
  background: #e7eef3;
  border: 1px solid #d5e0e6;
}
.rank-track i {
  display: block;
  min-width: 8px;
  height: 100%;
  background: var(--blue);
}
.rank-value {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.rank-note { margin: 8px 12px 0; font-size: 11px; line-height: 1.4; color: var(--muted); }
.league-poster { background: #fff; }
.league-poster .rank-kicker { color: var(--blue); }
.league-poster .rank-poster-head p { color: #e6e6e6; }
.league-poster .rank-track { background: #e7eef3; }
.league-poster .rank-track i { background: var(--blue); }
.league-poster .rank-row:hover { background: var(--hover); }
.score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #c8c8c8;
}
.score-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 44px;
  padding: 3px 2px 2px;
  background: #fff;
  border-right: 1px solid #c8c8c8;
  border-bottom: 1px solid #c8c8c8;
  text-align: center;
}
.score-cell:nth-child(5n) { border-right: 0; }
.score-cell:nth-child(n+21) { border-bottom: 0; }
.score-cell b {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  color: #222;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.score-cell span {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  color: #4e5759;
  font-variant-numeric: tabular-nums;
}
.score-sheet {
  background: transparent;
  border: 0;
}
.score-sheet .rank-note { margin: 8px 0 0; }
.league-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.league-chip .country-flag { width: 14px; height: 10px; }
.league-chip:hover { text-decoration: underline; }
.standings-table .team-league { margin-top: 1px; line-height: 1.2; }
.standings-table .team-league .league-chip,
.standings-table .team-league span { color: #5c6568; font-size: 10px; font-weight: 400; max-width: 100%; }
.standings-table .team-league .league-chip span,
.brier-table .team-link span { overflow: hidden; text-overflow: ellipsis; }
.table-panel .brier-table { width: 360px; min-width: 360px; }
.brier-table th:nth-child(3),
.brier-table td:nth-child(3) { width: 52px; }
.brier-table th:nth-child(4),
.brier-table td:nth-child(4) { width: 72px; padding-left: 4px; padding-right: 4px; }
.club-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #f7fafb;
  border: 1px solid #b7c5d1;
  border-left: 4px solid var(--navy);
  color: var(--ink);
}
.club-banner h1 { margin: 0; font-size: 18px; color: var(--navy); }
.club-banner p { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; color: var(--muted); }
.club-banner .team-logo,
.club-banner .team-logo-fallback { width: 36px; height: 36px; font-size: 12px; }
.record-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.record-pills span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 8px;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.record-pills b { font-size: 12px; font-weight: 800; }

.form-heat {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px 12px;
  background: #fff;
}
.form-heat i { display: block; width: 16px; height: 16px; border: 1px solid rgba(16, 47, 85, .15); }

@media (max-width: 1100px) {
  .leader-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis > div:nth-child(3) { border-right: 0; }
  .directory-grid { grid-template-columns: 1fr 1fr; }
  .metric-tiles { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .page-content { gap: 8px; min-width: 0; }
  .season-select select { height: 32px; padding: 0 26px 0 10px; font-size: 13px; }
  .stage-switch {
    flex-wrap: nowrap;
    align-items: flex-end;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .stage-switch::-webkit-scrollbar { display: none; height: 0; }
  .stage-btn { flex: 0 0 auto; height: 28px; }
  .sheet-switch {
    flex-wrap: nowrap;
    align-items: flex-end;
    height: 33px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .sheet-switch::-webkit-scrollbar { display: none; height: 0; }
  .sheet-btn { flex: 0 0 auto; height: 32px; }
  .filterbar {
    gap: 8px 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
  }
  .filterbar .odds-range,
  .filterbar .match-min { flex: 1 0 100%; gap: 6px; }
  .filterbar label { display: flex; width: auto; white-space: nowrap; }
  .filterbar input[type=number] { width: 64px; min-width: 0; }
  .view-controls { padding: 0; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis > div:nth-child(odd) { border-right: 1px solid var(--grid); }
  .kpis > div:nth-child(3) { border-right: 1px solid var(--grid); }
  .directory-grid { grid-template-columns: 1fr; }
  .data-table { font-size: 11px; }
  .table-panel { overflow: visible; }
  .table-panel .table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
  }
  .standings-panel { border: 0; }
  .table-panel .data-table {
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
  }
  .table-panel .data-table:not(.has-league) th:nth-child(n+3),
  .table-panel .data-table:not(.has-league) td:nth-child(n+3),
  .table-panel .data-table.has-league th:nth-child(n+4),
  .table-panel .data-table.has-league td:nth-child(n+4) {
    padding-left: 5px;
    padding-right: 5px;
  }
  .table-panel .data-table th:nth-child(1),
  .table-panel .data-table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    background: #fff;
  }
  .table-panel .data-table th:nth-child(2),
  .table-panel .data-table td:nth-child(2) {
    position: sticky;
    left: 28px;
    z-index: 3;
    width: 132px;
    min-width: 132px;
    max-width: 132px;
    background: #fff;
  }
  .table-panel .team-link { display: flex; min-width: 0; max-width: 100%; }
  .table-panel .team-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .table-panel .data-table thead th:nth-child(1),
  .table-panel .data-table thead th:nth-child(2) {
    background: #eff2f2;
    z-index: 4;
  }
  .table-panel .data-table tbody tr:nth-child(even) td:nth-child(1),
  .table-panel .data-table tbody tr:nth-child(even) td:nth-child(2) { background: var(--row); }
  .table-panel .data-table tbody tr:hover td:nth-child(1),
  .table-panel .data-table tbody tr:hover td:nth-child(2) { background: var(--hover); }
  .table-panel .standings-table { width: 752px; min-width: 752px; }
  .table-panel .perf-table { width: 670px; min-width: 670px; }
  .table-panel .brier-table {
    width: 100%;
    min-width: 0;
  }
  .table-panel .brier-table th:nth-child(2),
  .table-panel .brier-table td:nth-child(2) {
    width: auto;
    min-width: 0;
    max-width: none;
  }
  .table-panel .brier-table th:nth-child(3),
  .table-panel .brier-table td:nth-child(3) {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
  }
  .table-panel .brier-table th:nth-child(4),
  .table-panel .brier-table td:nth-child(4) {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    padding-left: 2px;
    padding-right: 2px;
  }
  .table-panel .timing-table { width: 772px; min-width: 772px; }
  .table-panel .band-table { width: 596px; min-width: 596px; }
  .table-panel .offense-table { width: 492px; min-width: 492px; }
  .table-panel .defense-table { width: 514px; min-width: 514px; }
  .table-panel .corners-table,
  .table-panel .fouls-table { width: 396px; min-width: 396px; }
  .table-panel .xg-table { width: 632px; min-width: 632px; }
  .table-panel .possession-table { width: 314px; min-width: 314px; }
.table-panel .shots-table { width: 556px; min-width: 556px; }
.table-panel .ou-table { width: 1084px; min-width: 1084px; }
  .table-panel .standings-table tbody tr:first-child td:nth-child(1),
  .table-panel .standings-table tbody tr:first-child td:nth-child(2) { background: #fff6d0; }
  .metric-tiles { grid-template-columns: 1fr; }
  .rank-poster { padding-bottom: 10px; overflow-x: auto; }
  .score-grid { gap: 0; padding: 0; }
  .score-cell { min-height: 40px; padding: 3px 1px 2px; }
  .score-cell b { font-size: 12px; }
  .score-cell span { font-size: 11px; }
  .rank-poster-head h2 { font-size: 14px; overflow-wrap: anywhere; }
  .rank-row { grid-template-columns: 20px minmax(0, 1fr) minmax(48px, 1fr) 44px; gap: 6px; }
  .rank-track { height: 12px; }
  .club-banner { flex-direction: column; align-items: flex-start; }
  .ad-box { width: 100%; }
  .module,
  .table-panel { max-width: 100%; }
  .titlebar { margin: 0; }
  .titlebar.league-title h1 { font-size: 18px; }
  .titlebar.hero-title h1 { font-size: 26px; line-height: 1.05; letter-spacing: -.03em; }
  .titlebar.hero-title { margin-left: 0; margin-right: 0; }
  .titlebar.hero-title h1,
  .titlebar.hero-title + .context { padding-left: 0; }
  .titlebar.league-title .country-flag { width: 22px; height: 15px; }
}

.legal-page { padding: 16px 18px 8px; }
.legal-page h2 { margin: 18px 0 8px; font-size: 15px; font-weight: 700; }
.legal-page p,
.legal-page li { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--ink); }
.legal-page ul { margin: 0 0 10px; padding-left: 18px; }
.legal-page li { margin-bottom: 4px; }
.legal-page a { color: var(--navy); font-weight: 700; text-decoration: none; }
.legal-page a:hover { text-decoration: underline; }
.legal-updated { color: var(--muted); font-size: 12px; }
.legal-updated strong { color: var(--navy); }

/* TRIAL: hide club/league crests. Delete this block to restore logos. */
.team-logo,
.team-logo-fallback,
.league-logo,
.metric-crest { display: none !important; }
