/* Compact default sheets use the original sortable table and profile buttons.
   Open table tools restore the source column groups and its full controls. */
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] {
  --sheet-bg:var(--panel);
  --sheet-header:var(--soft);
  --sheet-title:var(--ink);
  --sheet-number:var(--ink);
  --sheet-muted:var(--muted);
  --sheet-rule:var(--line);
  --sheet-head-rule:var(--control-edge);
  --sheet-accent:var(--selection-ink);
  --sheet-focus:var(--column);
  --sheet-rank:45px;
  --sheet-team:clamp(210px,35%,390px);
  --sheet-pad:12px;
  --sheet-type:var(--site-type);
  --sheet-row:50px;
  --sheet-value:17px;
  --sheet-club:15px;
  --sheet-badge:22px;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) {
  display:table !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  table-layout:fixed !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
  font-family:var(--sheet-type) !important;
  font-variant-numeric:tabular-nums;
  color:var(--sheet-number);
  background:var(--sheet-bg);
  box-shadow:none;
  border:0;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) > thead {
  display:table-header-group !important;
  position:static !important;
  top:auto !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) > tbody {
  display:table-row-group !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) {
  display:table-row !important;
  background:var(--sheet-bg) !important;
  box-shadow:none !important;
  outline:0;
  border:0;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) > colgroup,
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) > thead > tr:not(:last-child),
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) .bar,
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) .club-name small:not(.tournament-team-context,.club-league-name),
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) .club-column::before,
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) td::before {
  display:none !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > :is(td,th) {
  display:table-cell !important;
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  box-sizing:border-box !important;
  position:static !important;
  padding:0 var(--sheet-pad) !important;
  text-align:center !important;
  vertical-align:middle !important;
  border:0 !important;
  border-bottom:1px solid var(--sheet-rule) !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:var(--sort-cell-bg,transparent) !important;
  color:var(--sheet-number) !important;
  white-space:nowrap !important;
  letter-spacing:normal !important;
  text-transform:none !important;
  font:400 var(--sheet-value)/1.25 var(--sheet-type) !important;
  font-variant-numeric:tabular-nums !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > td {
  height:var(--sheet-row) !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > :is(th,td):first-child {
  width:var(--sheet-rank) !important;
  text-align:center !important;
  padding-inline:3px !important;
  font-size:13px !important;
  color:var(--sheet-muted) !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > :is(th,td):nth-child(2) {
  width:var(--sheet-team) !important;
  text-align:left !important;
  white-space:normal !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]):not(.outcome-table,[data-european-projection="outcomes"],[data-forecast-mode="outcomes"] .projections) tr:not(.desktop-column-groups,.tournament-group-heading) > :is(th,td):nth-child(n+6):not(.change-detail,.venue-games-column) {
  display:none !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance[data-columns="points"] tr:not(.desktop-column-groups,.tournament-group-heading) > :is(td,th):nth-child(n+3):nth-child(-n+5) {
  display:none !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance[data-columns="points"] tr:not(.desktop-column-groups,.tournament-group-heading) > :is(td,th):nth-child(n+6):nth-child(-n+8) {
  display:table-cell !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > th {
  height:44px !important;
  position:sticky !important;
  top:var(--studio-table-sticky-top,0px) !important;
  z-index:3 !important;
  background:var(--sort-head-bg,var(--sheet-header)) !important;
  border-bottom:1px solid var(--sheet-head-rule) !important;
  color:var(--sheet-title) !important;
  font:600 13px/1.25 var(--sheet-type) !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > th > button {
  display:inline-flex !important;
  position:relative !important;
  align-items:center !important;
  justify-content:center !important;
  gap:2px !important;
  width:100% !important;
  height:auto !important;
  min-height:42px !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  font:inherit !important;
  color:inherit !important;
  text-align:inherit !important;
  white-space:normal !important;
  border:0 !important;
  border-radius:0 !important;
  background:none !important;
  box-shadow:none !important;
  text-transform:none !important;
  letter-spacing:normal !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > th:first-child > button {
  justify-content:center !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > th:nth-child(2) > button {
  justify-content:flex-start !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > th:is([aria-sort="descending"],[aria-sort="ascending"]) > button {
  color:var(--sheet-accent) !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > th[aria-sort="descending"] > button::after {
  content:"▾" !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > th[aria-sort="ascending"] > button::after {
  content:"▴" !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > th:is([aria-sort="descending"],[aria-sort="ascending"]) > button::after {
  display:inline !important;
  position:static !important;
  font:600 11px/1 var(--sheet-type) !important;
  color:inherit !important;
  margin:0;
  width:auto !important;
  height:auto !important;
  border:0 !important;
  transform:none !important;
  background:none !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > td .club {
  width:100% !important;
  min-width:0 !important;
  height:auto !important;
  min-height:42px !important;
  max-width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:9px !important;
  margin:0 !important;
  padding:2px 0 !important;
  background:none !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  text-align:left !important;
  color:var(--sheet-number) !important;
  font:550 var(--sheet-club)/1.2 var(--sheet-type) !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > td .club .club-name {
  min-width:0 !important;
  color:inherit !important;
  font:inherit !important;
  text-align:left !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:anywhere !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > td .club .club-badge,
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > td .club .club-badge img {
  display:inline-grid !important;
  place-items:center !important;
  box-sizing:border-box !important;
  flex:0 0 var(--sheet-badge) !important;
  width:var(--sheet-badge) !important;
  height:var(--sheet-badge) !important;
  min-width:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  object-fit:contain !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > td .club .club-badge:has(img) {
  overflow:visible !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > td .score {
  font:inherit !important;
  font-variant-numeric:tabular-nums !important;
  color:inherit !important;
  display:inline !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > td.main-metric {
  font-weight:690 !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) button:focus-visible {
  outline:2px solid var(--sheet-accent) !important;
  outline-offset:-2px;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]):not(.outcome-table,[data-european-projection="outcomes"],[data-forecast-mode="outcomes"] .projections) tr:not(.desktop-column-groups,.tournament-group-heading) > th:nth-child(n+3):nth-child(-n+5) > button {
  font-size:0 !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]):not(.outcome-table,[data-european-projection="outcomes"],[data-forecast-mode="outcomes"] .projections) tr:not(.desktop-column-groups,.tournament-group-heading) > th:nth-child(n+3):nth-child(-n+5) > button > * {
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  clip-path:inset(50%) !important;
  overflow:hidden !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]):not(.outcome-table,[data-european-projection="outcomes"],[data-forecast-mode="outcomes"] .projections) tr:not(.desktop-column-groups,.tournament-group-heading) > th:nth-child(n+3):nth-child(-n+5) > button::before {
  display:inline !important;
  font:600 13px/1.18 var(--sheet-type) !important;
  color:inherit !important;
  position:static !important;
  width:auto !important;
  height:auto !important;
  margin:0;
  border:0 !important;
  background:none !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]):is(#strength-table,#global-table) tr > th:nth-child(3) > button::before {
  content:var(--strength-rating-label,"Index Rating") !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]):is(#strength-table,#global-table) tr > th:nth-child(4) > button::before {
  content:"Attack" !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]):is(#strength-table,#global-table) tr > th:nth-child(5) > button::before {
  content:"Defence" !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance tr > th:nth-child(3) > button::before {
  content:var(--performance-third-heading,"Rating / 10") !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance tr > th:nth-child(4) > button::before {
  content:var(--performance-fourth-heading,"Attack") !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance tr > th:nth-child(5) > button::before {
  content:var(--performance-fifth-heading,"Defence") !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).projections:not(.outcome-table,[data-european-projection="outcomes"],[data-forecast-mode="outcomes"] .projections) tr > th:nth-child(3) > button::before {
  content:var(--forecast-label,"Projected Points") !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).projections:not(.outcome-table,[data-european-projection="outcomes"],[data-forecast-mode="outcomes"] .projections) tr > th:nth-child(4) > button::before {
  content:"Low" !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).projections:not(.outcome-table,[data-european-projection="outcomes"],[data-forecast-mode="outcomes"] .projections) tr > th:nth-child(5) > button::before {
  content:"High" !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance[data-columns="points"] tr > th:nth-child(6) > button {
  font-size:0 !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance[data-columns="points"] tr > th:nth-child(6) > button::before {
  content:"Expected pts" !important;
  font:600 13px/1.18 var(--sheet-type) !important;
  color:inherit !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance[data-columns="points"] tr > th:nth-child(7) > button {
  font-size:0 !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance[data-columns="points"] tr > th:nth-child(7) > button::before {
  content:"Points" !important;
  font:600 13px/1.18 var(--sheet-type) !important;
  color:inherit !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance[data-columns="points"] tr > th:nth-child(8) > button {
  font-size:0 !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).performance[data-columns="points"] tr > th:nth-child(8) > button::before {
  content:"Pts gap" !important;
  font:600 13px/1.18 var(--sheet-type) !important;
  color:inherit !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"][data-forecast-mode="outcomes"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).projections.combined-projections tr:not(.tournament-group-heading) > :nth-child(4),
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"][data-forecast-mode="outcomes"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).projections.combined-projections tr:not(.tournament-group-heading) > :nth-child(5),
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"][data-forecast-mode="outcomes"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).projections tr > .outcome-column-hidden,
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"][data-forecast-mode="outcomes"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]).projections tr > .desktop-projection-hidden {
  display:none !important;
}

@media (max-width:760px) {
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] {
  --sheet-rank:25px;
  --sheet-team:36%;
  --sheet-pad:5px;
  --sheet-row:46px;
  --sheet-value:16px;
  --sheet-club:14px;
  --sheet-badge:18px;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.league-ranking,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > td .club {
  gap:5px !important;
}

html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] :is(#strength-table,#global-table,table.snapshot-table.performance,table.snapshot-table.projections):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > :is(th,td):first-child {
  font-size:11px !important;
}

}
@media (max-width:360px) {
html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools="closed"] {
  --sheet-rank:20px;
  --sheet-team:41%;
  --sheet-pad:3px;
  --sheet-value:15px;
}

}

@media (max-width:760px) {
  html[data-theme][data-table-navigation] body[data-palette] #main #global[data-studio-analysis][data-tools="closed"] {
    --sheet-rank:28px;
  }
}

/* Sort emphasis follows the selected metric in each native table. */
html[data-theme] #main :is(#ratings,#global) :is(td,th).main-metric {
  --sort-cell-bg:var(--selection-column);
  --sort-head-bg:var(--selection-fill);
  background-color:var(--sort-cell-bg);
}
html[data-theme] #main :is(#ratings,#global) th.main-metric {background-color:var(--sort-head-bg)}
html[data-theme] #main :is(#ratings,#global) .main-metric button {color:inherit}
html[data-theme][data-table-navigation] body[data-palette] #main #global[data-studio-analysis][data-tools=closed] #global-table[data-columns=changes]:not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > :is(th,td).change-detail {
  display:table-cell!important;
}
html[data-theme][data-table-navigation] body[data-palette] #main #global[data-studio-analysis][data-tools=closed] #global-table[data-columns=changes]:not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > :is(th,td).rating-detail {
  display:none!important;
}
@media(max-width:600px) {
  #main table.projections {--forecast-label:"Proj. Pts"}
  html[data-theme] #main .studio-leagues th[aria-sort] button {color:var(--selection-ink)}
}

#global[data-global-measure=performance] {--strength-rating-label:"Rating / 10"}
html[data-theme][data-table-navigation] body[data-palette] #main #global[data-studio-analysis][data-tools=closed] #global-table[data-columns=ratings]:not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > .change-detail {display:none!important}
@media(max-width:600px) {
  html[data-theme][data-table-navigation] body[data-palette] #main #ratings[data-studio-analysis][data-tools=closed] table.projections:not(.outcome-table) th:nth-child(3) button::before {white-space:nowrap!important}
  html[data-theme][data-table-navigation] body[data-palette] #main #ratings[data-studio-analysis][data-tools=closed] table.projections:not(.outcome-table) th:nth-child(3)[aria-sort]:not([aria-sort=none]) button::after {
    position:absolute!important;left:50%;bottom:0;transform:translateX(-50%);line-height:8px!important;
  }
}

#ratings table.performance[data-columns=changes] {--performance-fourth-heading:"Position Change"}

@media(max-width:760px) {
  html[data-theme][data-table-navigation] body[data-palette] #main #global[data-studio-analysis][data-tools=closed],
  html[data-theme][data-table-navigation] body[data-palette] #main #ratings[data-studio-view=performance][data-tools=closed] {
    --sheet-team:41%;
  }
}
@media(max-width:360px) {
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools=closed] {
    --sheet-badge:16px;
  }
}

@media(max-width:760px) {
  #main :is(#global,#ratings) table .club-name .identity-long-word {white-space:normal;overflow-wrap:anywhere}
}

@media(max-width:760px) {
  /* Reserve the header width for its label. The sort marker sits below it. */
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools=closed]
    :is(#global-table,table.league-ranking,table.performance) thead th:nth-child(n+3) {
    --sheet-pad:2px;
  }
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools=closed]
    :is(#global-table,table.league-ranking,table.performance) thead th:nth-child(n+3) button::before {
    word-break:normal!important;overflow-wrap:normal!important;
  }
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools=closed]
    :is(#global-table,table.league-ranking,table.performance) thead th:is([aria-sort=ascending],[aria-sort=descending]):nth-child(n+3) button::after {
    position:absolute!important;inset:auto auto 0 50%!important;transform:translateX(-50%);line-height:8px!important;
  }
}

@media(max-width:370px) {
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global)[data-studio-analysis][data-tools=closed]
    :is(#global-table,table.performance):not([hidden]) tr:not(.desktop-column-groups,.tournament-group-heading) > th:nth-child(n+3) > button::before {
    font-size:12px!important;
  }
}

#main :is(#global-table,table.snapshot-table.performance) .club-name > .club-league-name {
  display:block;
  margin-top:2px;
  color:var(--muted);
  font:400 .75rem/1.2 var(--font-ui);
  overflow-wrap:normal;
}

/* Sticky cells and raised club badges used to compete in the same stacking
   context. Keep all body descendants below the entire, opaque header band. */
@layer table-interaction {
  #main :is(#global,#ratings) .table-scroll {isolation:isolate}
  #main :is(#global,#ratings) table tbody {position:relative;z-index:0}
  #main :is(#global,#ratings)[data-tools=closed] .table-scroll table thead {
    position:sticky!important;
    top:var(--studio-table-sticky-top,0px)!important;
    z-index:2!important;
    background:var(--sheet-header,var(--panel))!important;
  }
  #main :is(#global,#ratings)[data-tools=closed] .table-scroll table thead :is(th,td) {
    position:static!important;
  }
  :is(main,dialog,body) table tbody tr[data-row-selected] > :is(td,th) {
    background-color:color-mix(in srgb,var(--selection-ink,#168e83) 29%,var(--panel,#fff))!important;
  }
  :is(main,dialog,body) table tbody tr[data-row-selected] > :first-child {
    box-shadow:inset 3px 0 var(--selection-ink,#168e83)!important;
  }
}

@media(max-width:760px) {
  #main #global[data-global-measure=strength] {--strength-rating-label:"Index"}
  #main #ratings table.performance[data-columns=changes] {--performance-fourth-heading:"Pos. chg."}
  #main :is(#global,#ratings) table.projections {--forecast-label:"Proj. pts"}
  @layer table-interaction {
    #main :is(#global,#ratings)[data-tools=closed] {--sheet-team:34%!important}
    #main :is(#global,#ratings) .table-scroll :is(th,td) {box-sizing:border-box}
    #main :is(#global,#ratings) .table-scroll td {padding-inline:3px!important}
    #main :is(#global,#ratings) .table-scroll th button::before {
      max-width:100%;white-space:normal!important;overflow-wrap:anywhere!important;
    }
    #global-table th.change-detail button,
    #strength-table th.change-detail button {font-size:0!important}
    #global-table th.change-detail button::before,
    #strength-table th.change-detail button[data-sort=season]::before {
      content:"Pos. chg."!important;font:600 13px/1.2 var(--sheet-type)!important;
    }
    #strength-table th.change-detail button[data-sort=recent]::before {
      content:"Rating chg."!important;font:600 13px/1.2 var(--sheet-type)!important;
    }
  }
}
