.desktop-match-comparison { display: none; }

@media (min-width: 761px) {
  /* Use the same identity columns across tables. The remaining space belongs to the measures. */
  html[data-table-navigation] #main :is(#ratings,#global) table[data-desktop-columns] {
    --desktop-rank: 44px;
    --desktop-team: clamp(164px, calc(var(--desktop-table-width) * .26), 246px);
    table-layout: fixed;
    width: 100%;
  }
  .desktop-colgroup col { width: calc((var(--desktop-table-width) - var(--desktop-rank) - var(--desktop-team)) * var(--fraction)); }
  .desktop-colgroup col.desktop-rank { width: var(--desktop-rank); }
  .desktop-colgroup col.desktop-team { width: var(--desktop-team); }

  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global) table[data-desktop-columns] :is(th,td) {
    width: auto !important;
    min-width: 0 !important;
  }
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global) table[data-desktop-columns] tr:not(.desktop-column-groups,.tournament-group-heading) > :nth-child(n+3) {
    padding-inline: clamp(4px, .65vw, 12px);
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global) table[data-desktop-columns] thead tr:last-child th:nth-child(n+3) button {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
  }
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global) table[data-desktop-columns] .desktop-column-groups > * {
    display: table-cell;
    padding: 7px 8px 5px;
    height: auto;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    color: var(--muted);
    font: 600 12px/1.25 var(--font-ui);
    text-align: center !important;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
  }
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global) table .desktop-column-groups th { border-left: 1px solid var(--line); }
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global) table [data-desktop-label]::before { content: attr(data-desktop-label); }
  [data-desktop-label] > .full-column-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  html[data-theme][data-table-navigation] body[data-palette] #main #ratings .desktop-projection-hidden { display: none !important; }
  html[data-theme][data-table-navigation] body[data-palette] #main #strength-table .bar { margin-inline: auto; }
  html[data-theme][data-table-navigation] body[data-palette] #main :is(#ratings,#global) table .club-name {
    white-space: normal; overflow-wrap: anywhere;
  }

  /* Keep date, period, and search on one row when space permits. */
  html[data-theme][data-table-navigation] body[data-palette] #main #ratings .table-settings:has(> .period-controls) {
    display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-start; gap: 8px 14px;
  }
  html[data-theme][data-table-navigation] body[data-palette] #main #ratings .table-settings > .period-controls {
    display: flex; align-items: center; order: 1; width: auto; margin: 0; padding: 0; gap: 4px;
  }
  html[data-theme][data-table-navigation] body[data-palette] #main #ratings .table-settings:has(> .period-controls) > .navigation-utilities { order: 2; }
  html[data-theme][data-table-navigation] body[data-palette] #main #ratings .table-settings:has(> .period-controls) > .search {
    order: 3; flex: 1 1 145px; max-width: 230px; margin-left: auto;
  }

  html[data-theme] body[data-palette] #main #predict .match-forecast {
    display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; column-gap: 14px;
  }
  html[data-theme] body[data-palette] #main #predict .comparison-head { display: contents; }
  #predict .comparison-head .club:first-child { grid-area: 1 / 1; }
  #predict .comparison-head .club:last-child { grid-area: 1 / 3; }
  html[data-theme] body[data-palette] #main #predict .prediction-score { grid-area: 1 / 2; }
  #predict .match-forecast > :is(.probabilities,.probability-bar,.fixture-clean-sheets) { grid-column: 1 / -1; }
  #predict #matchup:has(.desktop-match-comparison) .fixture-clean-sheets,
  #predict #matchup .match-strength-row { display: none; }
  html[data-theme] body[data-palette] #main #predict .desktop-match-comparison {
    display: table; width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse;
  }
  html[data-theme] body[data-palette] #main #predict .desktop-match-comparison :is(th,td) {
    width: 33.33%; min-width: 0; height: auto; padding: 10px 12px; text-align: center;
    white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
  }
  html[data-theme] body[data-palette] #main #predict .desktop-match-comparison :is(th,td):first-child { text-align: left; }
  html[data-theme] body[data-palette] #main #predict .desktop-match-comparison tbody th { color: var(--ink); font-weight: 500; }
}
