/* Rox Score identity system — flat, dense and deliberately angular. */
:root {
  --bg: #000000;
  --bg-soft: #070707;
  --panel: #0b0b0b;
  --panel-2: #111111;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 214, 10, 0.72);
  --text: #f7f7f4;
  --muted: #a3a3a0;
  --muted-2: #777774;
  --accent: #ffd60a;
  --accent-2: #ffd60a;
  --accent-soft: rgba(255, 214, 10, 0.09);
  --accent-glow: transparent;
  --radius-xl: 0;
  --radius-lg: 0;
  --radius-md: 0;
  --shadow: none;
}

html {
  background: #000;
}

body {
  background: #000 !important;
}

body::before,
body::after {
  display: none !important;
}

body *,
body *::before,
body *::after {
  border-radius: 0 !important;
  background-image: none !important;
}

.shell {
  max-width: 1320px;
  padding: 16px 20px 40px;
}

.topbar {
  min-height: 58px;
  margin: 0 0 14px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #070707;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.brand {
  gap: 10px;
}

.brand-logo {
  width: 24px;
  height: 24px;
  box-shadow: none;
}

.nav {
  align-self: stretch;
  gap: 0;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  transform: none !important;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.active,
.nav a[aria-current="page"] {
  color: var(--text) !important;
  border-color: var(--accent) !important;
  background: #0e0e0e !important;
  outline: none;
}

.panel,
.footer-item,
.cookie-banner,
.geo-options,
.wave-search-results {
  border-color: var(--line);
  background: var(--panel) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.button,
.icon-button,
.toggle-group,
.toggle-button,
.field input,
.field select,
.race-search input,
.race-athlete-search input,
.filters-reset,
.mobile-filters-toggle,
.athlete-back-link,
.athlete-toolbar-button {
  box-shadow: none !important;
}

.button,
.toggle-button,
.filters-reset,
.mobile-filters-toggle,
.athlete-back-link,
.athlete-toolbar-button {
  border-color: var(--line);
  background: #101010;
}

.button:hover,
.button:focus-visible,
.toggle-button:hover,
.toggle-button:focus-visible,
.athlete-back-link:hover,
.athlete-toolbar-button:hover {
  color: var(--text);
  border-color: var(--accent);
  background: #171707 !important;
  transform: none !important;
}

.button.primary,
.toggle-button.active,
.race-tier-switch button.active,
.method-page .button.primary {
  color: #050505 !important;
  border-color: var(--accent) !important;
  background: var(--accent) !important;
}

.field input,
.field select,
.race-search input,
.race-athlete-search input,
.geo-combobox input {
  color: var(--text);
  border-color: var(--line);
  background: #101010 !important;
}

.field input:focus,
.field select:focus,
.race-search input:focus,
.race-athlete-search input:focus,
.geo-combobox input:focus {
  border-color: var(--accent);
  background: #111111 !important;
  box-shadow: 0 0 0 1px var(--accent) !important;
}

.select-shell::before,
.select-shell::after,
.geo-combobox-toggle::before,
.geo-combobox-toggle::after {
  border-color: var(--muted);
}

.geo-combobox-toggle::before,
.select-shell::before {
  top: 50%;
  transform: translateY(-7px) rotate(225deg);
}

.geo-combobox-toggle::after,
.select-shell::after {
  top: 50%;
  transform: translateY(1px) rotate(45deg);
}

.geo-combobox-toggle.has-value::before,
.geo-combobox-toggle.has-value::after {
  top: 50%;
  left: 50%;
  width: 11px;
  height: 0;
  border: 0;
  border-top: 1.5px solid currentColor;
}

.geo-combobox-toggle.has-value::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.geo-combobox-toggle.has-value::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.section-heading {
  min-height: 48px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
}

.section-heading p {
  color: var(--muted);
  font-size: 0.88rem;
}

.panel-head,
.race-results-head {
  background: #0e0e0e !important;
}

.metric-pill {
  color: var(--accent);
  border-color: rgba(255, 214, 10, 0.42);
  background: #141300 !important;
}

table {
  background: #080808;
}

th {
  background: #050505 !important;
}

th,
td {
  border-color: var(--line);
}

tbody tr {
  box-shadow: none;
}

tbody tr:hover,
tbody tr:focus-within {
  background: #101010 !important;
}

tbody tr.selected,
tbody tr.is-expanded {
  background: #151400 !important;
  box-shadow: inset 3px 0 0 var(--accent);
}

.site-footer {
  background: #050505 !important;
}

.footer-item[open] summary {
  background: #111100 !important;
}

.mobile-tabbar {
  border-top-color: var(--line);
  background: #050505 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.mobile-tabbar-link.active,
.mobile-tabbar-link[aria-current="page"] {
  background: #161500 !important;
}

/* Ranking */
.rankings-page .main-column {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
}

.rankings-page .ranking-section-heading {
  padding-inline: 2px;
}

.rankings-page .ranking-heading-copy {
  display: grid;
  gap: 3px;
}

.rankings-page .ranking-last-updated {
  display: block;
  margin: 0;
  color: var(--muted-2);
  font-size: 0.68rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.rankings-page .controls-panel {
  overflow: visible;
  border: 0 !important;
  background: transparent !important;
}

.rankings-page .controls-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 0 0 8px;
}

.rankings-page .field-search {
  grid-column: 1;
}

.rankings-page .field-search > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rankings-page .controls-secondary,
.rankings-page .controls-secondary.open {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(260px, 1.35fr) minmax(180px, 0.85fr);
  gap: 7px;
  padding: 0;
  border: 0;
}

.rankings-page .field input,
.rankings-page .field select,
.rankings-page .field-ladder .toggle-group {
  min-height: 38px;
  height: 38px;
}

.rankings-page .field-ladder .toggle-group {
  padding: 2px;
}

.rankings-page .geo-combobox-toggle {
  width: 38px;
  height: 38px;
}

.rankings-page .field .ranking-filter-display {
  display: none;
}

.search-clear-button {
  display: none;
}

.rankings-page .controls-secondary .field > span {
  margin: 0 0 4px 1px;
  font-size: 0.61rem;
}

.rankings-page .field-ladder .toggle-button {
  min-height: 32px;
  height: 32px;
}

.rankings-page .toggle-button:focus-visible {
  outline-width: 1px;
  outline-offset: -2px;
}

.rankings-page .rankings-layout.athlete-rankings-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

.rankings-page .rankings-main {
  width: 100%;
}

.rankings-page .table-panel {
  height: auto;
}

.rankings-page .table-wrap {
  height: auto;
  max-height: none;
  overflow: visible;
}

.rankings-page .table-panel th,
.rankings-page .table-panel td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.rankings-page .rank-pill,
.rankings-page .rank-pill-geo {
  background: #151515 !important;
}

.rankings-page .ranking-athlete > .athlete-name {
  pointer-events: none;
}

.ranking-athlete-detail-row,
.ranking-athlete-detail-row:hover,
.ranking-athlete-detail-row:focus-within {
  cursor: default;
  background: #050505 !important;
  box-shadow: inset 3px 0 0 var(--accent);
}

.ranking-athlete-detail-row > td {
  padding: 0 !important;
}

.ranking-athlete-detail {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 214, 10, 0.34);
  border-bottom: 1px solid var(--line);
  background: #080808;
}

.ranking-athlete-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ranking-athlete-detail-head strong {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ranking-athlete-profile-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--accent);
  color: #050505;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
}

.ranking-athlete-races {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.ranking-athlete-race {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 76px;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}

.ranking-athlete-race-name {
  min-width: 0;
}

.ranking-athlete-race-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  white-space: nowrap;
}

.ranking-athlete-race-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-race-flag {
  width: 22px;
  height: 14px;
  flex: 0 0 22px;
  object-fit: cover;
}

.ranking-athlete-race-name > strong,
.ranking-athlete-race-name > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-athlete-race-name strong {
  font-size: 0.8rem;
}

.ranking-athlete-race-name small,
.ranking-athlete-race-time {
  color: var(--muted);
  font-size: 0.68rem;
}

.ranking-athlete-race-time small,
.ranking-athlete-race-time strong,
.ranking-athlete-race-points small,
.ranking-athlete-race-points strong {
  display: block;
}

.ranking-athlete-race-time small,
.ranking-athlete-race-points small {
  margin-bottom: 2px;
  color: var(--muted-2);
  font-size: 0.52rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ranking-athlete-race-time,
.ranking-athlete-race-points {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ranking-athlete-race-points {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 850;
}

.ranking-athlete-detail-status,
.ranking-athlete-detail-empty {
  padding: 14px 0 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

/* Keep first-load space useful without relying on decorative gradients. */
.rankings-page #rankingsTableBody.rankings-loading {
  min-height: 420px;
  background: #080808 !important;
}

/* Races */
.races-shell,
.wave-shell {
  max-width: 1280px;
}

.races-main,
.wave-main {
  gap: 12px;
}

.races-browser {
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 10px;
}

.race-catalog {
  top: 10px;
  padding: 12px;
}

.race-event-card,
.wave-event-card,
.race-guide-grid article,
.coverage-card {
  background: #0f0f0f !important;
  box-shadow: none !important;
}

.race-event-card.active,
.wave-event-card.is-selected {
  border-color: var(--accent);
  background: #171600 !important;
  box-shadow: inset 3px 0 0 var(--accent) !important;
}

.race-tier-switch,
.race-sex-switch {
  background: #090909 !important;
}

.race-tier-switch button {
  background: transparent !important;
}

.race-tier-switch button.active {
  background: var(--accent) !important;
}

.race-result-detail,
.race-calculation,
.race-formula {
  background: #0d0d0d !important;
}

.race-results-pending .race-results-loading {
  min-height: 420px;
  background: #080808 !important;
}

/* Start list */
.wave-events,
.wave-controls,
.wave-ranking {
  background: #0a0a0a !important;
}

.wave-events {
  padding: 14px;
}

.wave-event-list {
  gap: 7px;
}

.wave-event-card {
  min-height: 82px;
  padding: 12px;
}

.coverage-track {
  height: 6px;
  background: #242424 !important;
}

.coverage-track i {
  background: var(--accent) !important;
}

.wave-table th,
.wave-table td {
  background-color: transparent;
}

/* How it works */
.method-shell {
  max-width: 1200px;
}

.method-main {
  gap: 12px;
}

.method-hero {
  min-height: 410px;
  gap: 32px;
  padding: 34px;
  background: #0b0b0b !important;
}

.method-hero::after {
  display: none;
}

.method-hero h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
}

.formula-card,
.method-section,
.method-toc,
.method-cta,
.principle-card,
.tier-card,
.why-square,
.method-faq details,
.limits-grid > div {
  background: #0c0c0c !important;
  box-shadow: none !important;
}

.formula-card {
  padding: 28px;
}

.method-facts,
.sof-scale,
.race-stack,
.worked-example,
.completeness-list {
  background: var(--line) !important;
}

.method-fact,
.sof-scale > div,
.race-stack > div,
.worked-example > div,
.completeness-list > div {
  background: #0d0d0d !important;
}

.method-section {
  padding: 30px;
}

.why-square-chart span,
.completeness-list i::after,
.completeness-list i span {
  background: var(--accent) !important;
}

.method-callout,
.method-note,
.projection-formula {
  background: #141300 !important;
}

/* Athlete profile */
.athlete-shell {
  max-width: 1120px;
}

.athlete-page-main,
.athlete-profile-layout,
.athlete-ssr-preview {
  gap: 6px;
}

.athlete-profile-page,
.athlete-page-score,
.athlete-mini-card,
.athlete-profile-card,
.athlete-race-card,
.athlete-race-calculation,
.athlete-score-detail {
  background: #0b0b0b !important;
  box-shadow: none !important;
}

.athlete-page-content {
  padding: 12px;
}

.athlete-page-score-grid {
  gap: 1px;
  background: var(--line);
}

.athlete-page-score {
  min-height: 76px;
  padding: 10px 12px;
}

.athlete-page-score-primary {
  background: #111100 !important;
}

.athlete-page-stat-grid,
.athlete-page-best-grid {
  gap: 4px;
}

.athlete-mini-card,
.athlete-profile-card {
  min-height: 50px;
  padding: 8px 9px;
}

.athlete-race-card.is-selected {
  border-color: rgba(255, 214, 10, 0.35);
  background: #0f0f08 !important;
}

.athlete-race-badge {
  display: none !important;
}

.athlete-race-toggle:hover,
.athlete-race-toggle:focus-visible,
.athlete-race-toggle[aria-expanded="true"] {
  background: #121212 !important;
}

.athlete-race-calculation-grid > div {
  background: #090909 !important;
}

/* Legal and error pages */
.legal-hero,
.legal-section,
.legal-summary,
.legal-updated,
.legal-callout,
.error-page .empty-state {
  background: #0b0b0b !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  .races-browser {
    grid-template-columns: 1fr;
  }

  .race-catalog {
    position: static;
    min-height: 0;
    max-height: none;
  }

  .method-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 14px;
  }

  body:is(.rankings-page, .races-page, .wave-page, .method-page, .athlete-page, .legal-page, .error-page) .shell {
    padding: 0 7px calc(76px + env(safe-area-inset-bottom));
  }

  body:is(.rankings-page, .races-page, .wave-page, .method-page, .athlete-page, .legal-page, .error-page) .topbar {
    min-height: 48px;
    margin: 0 -7px 6px;
    padding: 0 10px;
    border-width: 0 0 1px;
  }

  .brand {
    font-size: 0.78rem;
  }

  .brand-logo {
    width: 21px;
    height: 21px;
  }

  .mobile-tabbar {
    min-height: calc(56px + env(safe-area-inset-bottom));
    padding: 3px 7px env(safe-area-inset-bottom);
  }

  .mobile-tabbar-link {
    gap: 2px;
    min-height: 46px;
    font-size: 9px;
  }

  .mobile-tabbar-link svg {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .rankings-page .main-column {
    max-width: none;
  }

  .rankings-page .section-heading {
    min-height: 43px;
    padding: 4px 1px 5px;
  }

  .rankings-page .section-heading h2 {
    font-size: 17px;
  }

  .rankings-page .ranking-last-updated {
    font-size: 0.61rem;
  }

  .rankings-page .controls-panel {
    top: 48px;
    background: #000 !important;
  }

  .rankings-page .controls-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 0 0 6px;
  }

  .rankings-page .field .search-input-shell input {
    height: 36px;
    min-height: 36px;
    padding-right: 34px;
  }

  .rankings-page #rankingsSearch::-webkit-search-cancel-button {
    appearance: none;
    -webkit-appearance: none;
  }

  .rankings-page .search-clear-button:not([hidden]) {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: grid;
    width: 34px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
  }

  .rankings-page .search-clear-button::before,
  .rankings-page .search-clear-button::after {
    position: absolute;
    width: 12px;
    height: 1.5px;
    border-radius: 999px;
    background: currentColor;
    content: "";
  }

  .rankings-page .search-clear-button::before {
    transform: rotate(45deg);
  }

  .rankings-page .search-clear-button::after {
    transform: rotate(-45deg);
  }

  .rankings-page .search-clear-button:active {
    color: var(--text);
  }

  .rankings-page .controls-secondary,
  .rankings-page .controls-secondary.open {
    position: relative;
    inset: auto;
    z-index: 75;
    display: grid;
    grid-template-columns: minmax(105px, 1.02fr) minmax(0, 1.28fr) minmax(78px, 0.8fr);
    gap: 5px;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  .rankings-page .controls-secondary .field,
  .rankings-page .controls-secondary .field:nth-child(3) {
    grid-column: auto;
    min-width: 0;
  }

  .rankings-page .field-age-group {
    z-index: 2;
  }

  .rankings-page .controls-secondary .field > span,
  .rankings-page .controls-secondary .field-ladder > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .rankings-page .controls-secondary .field input,
  .rankings-page .controls-secondary .field select,
  .rankings-page .controls-secondary .toggle-group,
  .rankings-page .geo-combobox-toggle {
    min-height: 36px;
    height: 36px;
  }

  .rankings-page .controls-secondary .field input,
  .rankings-page .controls-secondary .field select {
    padding-right: 28px;
    padding-left: 9px;
  }

  .rankings-page .field-ladder .toggle-button {
    min-width: 0;
    min-height: 32px;
    height: 32px;
    padding: 0 5px;
    font-size: 0.67rem;
  }

  .rankings-page .controls-secondary .field select {
    font-size: 0.72rem;
  }

  .rankings-page #rankingsGeo,
  .rankings-page #rankingsAgeGroup {
    font-size: 16px;
  }

  .rankings-page .controls-secondary .field .ranking-filter-display {
    position: absolute;
    inset: 0 28px 0 9px;
    z-index: 1;
    display: flex;
    align-items: center;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.67rem;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
  }

  .rankings-page .ranking-filter-display.has-value {
    color: var(--text);
  }

  .rankings-page .geo-combobox.open:not(.age-group-combobox) > .ranking-filter-display {
    display: none;
  }

  .rankings-page .geo-combobox:not(.open) > #rankingsGeo,
  .rankings-page .age-group-combobox > #rankingsAgeGroup {
    color: transparent !important;
    caret-color: transparent;
  }

  .rankings-page .geo-combobox:not(.open) > #rankingsGeo::placeholder {
    color: transparent;
  }

  .rankings-page .controls-secondary .geo-combobox {
    position: relative;
  }

  .rankings-page .controls-secondary .geo-options {
    position: absolute;
    top: calc(100% + 5px);
    right: auto;
    left: 50%;
    z-index: 120;
    width: min(320px, calc(100vw - 14px));
    max-height: min(260px, 46vh);
    margin: 0;
    transform: translateX(-50%);
  }

  .rankings-page .field-age-group .geo-options {
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 14px));
    transform: none;
  }

  .rankings-page .table-panel .panel-head,
  .rankings-page .country-table-panel .panel-head {
    min-height: 40px;
    padding: 6px 8px;
  }

  .rankings-page .table-panel tbody .ranking-row,
  .rankings-page .country-table-panel tbody .ranking-row {
    min-height: 47px;
  }

  .ranking-athlete-detail-row,
  .ranking-athlete-detail-row > td {
    display: block !important;
    width: 100% !important;
  }

  .ranking-athlete-detail-row > td {
    padding: 0 !important;
  }

  .ranking-athlete-detail {
    padding: 9px 8px 10px;
  }

  .ranking-athlete-detail-head {
    margin-bottom: 6px;
  }

  .ranking-athlete-profile-link {
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .ranking-athlete-race {
    grid-template-columns: minmax(0, 1fr) 62px 58px;
    gap: 7px;
    min-height: 39px;
  }

  .ranking-athlete-race-name strong,
  .ranking-athlete-race-points {
    font-size: 0.7rem;
  }

  .ranking-athlete-race-name span,
  .ranking-athlete-race-time {
    font-size: 0.58rem;
  }

  .ranking-athlete-race-title,
  .athlete-race-event-name {
    gap: 4px;
  }

  .ranking-race-flag,
  .athlete-race-flag {
    width: 18px;
    height: 12px;
    flex-basis: 18px;
  }

  .athlete-race-event-name {
    gap: 2px;
  }

  .athlete-race-flag {
    width: 16px;
    height: 11px;
    flex-basis: 16px;
  }

  .race-catalog,
  .race-results,
  .wave-events,
  .wave-controls,
  .wave-ranking {
    border-right: 0;
    border-left: 0;
  }

  .wave-events {
    padding: 8px;
  }

  .wave-event-card {
    min-height: 66px;
    padding: 9px;
  }

  .method-hero {
    gap: 20px;
    padding: 22px 16px;
  }

  .method-hero h1 {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .formula-card,
  .method-section,
  .method-cta {
    padding: 18px 14px;
  }

  .athlete-page-main {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .athlete-page-toolbar {
    min-height: 36px;
    padding: 2px 0;
    background: #000 !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .athlete-back-link,
  .athlete-toolbar-button {
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .athlete-share-button {
    width: 36px;
  }

  .athlete-page-content {
    padding: 8px;
  }

  .athlete-page-identity {
    padding: 0 0 2px;
  }

  .athlete-page-name-row {
    gap: 7px;
  }

  .athlete-page-name-copy h1 {
    font-size: 1.35rem;
  }

  .athlete-page-name-copy > p:last-child {
    margin-top: 3px;
    font-size: 0.65rem;
  }

  .athlete-page-eyebrow {
    margin-bottom: 2px;
    font-size: 0.58rem;
  }

  .athlete-page-flag,
  .athlete-page-name-row > .flag {
    width: 25px;
    height: 16px;
    flex-basis: 25px;
  }

  .athlete-page-score {
    min-height: 58px;
    padding: 6px 7px;
  }

  .athlete-page-score-primary strong {
    margin-top: 2px;
    font-size: 1.45rem;
  }

  .athlete-page-score strong {
    margin-top: 3px;
    font-size: 0.88rem;
  }

  .athlete-page-score small,
  .athlete-score-trigger-label {
    margin-top: 2px;
    font-size: 0.6rem;
  }

  .athlete-page-stat-grid,
  .athlete-page-best-grid {
    gap: 2px;
  }

  .athlete-page-best-grid {
    grid-template-columns: 1.3fr 0.85fr 0.85fr;
  }

  .athlete-mini-card,
  .athlete-profile-card {
    min-height: 39px;
    padding: 5px 6px;
  }

  .athlete-page-score > span,
  .athlete-mini-card > span,
  .athlete-profile-card > span {
    font-size: 0.6rem;
  }

  .athlete-mini-card strong,
  .athlete-profile-card strong {
    margin-top: 3px;
    font-size: 0.78rem;
  }

  .athlete-page-best-grid .athlete-profile-card:first-child strong {
    font-size: 0.72rem;
  }

  .athlete-results-head {
    min-height: 23px;
    margin-bottom: 3px;
  }

  .athlete-results-head h2 {
    font-size: 0.76rem;
  }

  .athlete-race-list {
    gap: 2px;
  }

  .athlete-race-toggle {
    grid-template-columns: minmax(0, 1fr) 62px 54px;
    align-items: center;
    gap: 6px;
    min-height: 43px;
    padding: 5px 7px;
  }

  .athlete-race-title strong {
    font-size: 0.76rem;
  }

  .athlete-race-title small,
  .athlete-race-score small {
    margin-top: 2px;
    font-size: 0.58rem;
  }

  .athlete-race-score {
    min-width: 0;
  }

  .athlete-race-score strong {
    font-size: 0.76rem;
  }

  .athlete-race-toggle-footer {
    grid-column: auto;
    justify-content: flex-end;
    padding: 0;
    border: 0;
    font-size: 0.62rem;
  }

  .athlete-race-toggle-footer > span:first-child {
    color: var(--text);
  }

  .athlete-race-detail-label {
    font-size: 0;
  }

  .athlete-race-detail-label b {
    font-size: 0.8rem;
  }
}

@media (max-width: 390px) {
  .ranking-athlete-race {
    grid-template-columns: minmax(0, 1fr) 56px 52px;
  }

  .athlete-page-content {
    padding: 7px 6px;
  }
}
