/* Shared page headers: the main wrapper owns the width and outside spacing. */
html body :is(.jx-page,.archived-qual-page,.relay-calc-page,.wap-page,.meet-page).site-page {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  transform: none !important;
  gap: 18px;
}
html body :is(.jx-page,.archived-qual-page,.relay-calc-page,.wap-page,.meet-page) > .page-hero {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 22px 24px 24px;
  border-radius: 22px;
  gap: 20px;
}
html body :is(.jx-page,.archived-qual-page,.relay-calc-page,.wap-page,.meet-page) .page-hero__content {
  gap: 12px;
}
html body :is(.jx-page,.archived-qual-page,.relay-calc-page,.wap-page,.meet-page) .page-hero__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
html body :is(.wap-page,.relay-calc-page) .page-hero :is(.wap-mode-switch,.relay-mode-switch) {
  margin: 8px 0 0;
  justify-self: start;
  align-self: start;
  max-width: 100%;
}
html body :is(.wap-page,.relay-calc-page) .page-hero :is(.wap-mode-switch,.relay-mode-switch) > button,
html body :is(.jx-page,.archived-qual-page,.meet-page) .page-hero__back-link {
  box-sizing: border-box;
  min-height: 40px;
  padding: 9px 15px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}
@media (max-width:820px) {
  html body main.page:has(> :is(.jx-page,.archived-qual-page,.relay-calc-page,.wap-page,.meet-page)) {
    padding-inline: 16px;
  }
  html body :is(.jx-page,.archived-qual-page,.relay-calc-page,.wap-page,.meet-page) > .page-hero {
    padding: 16px;
    border-radius: 18px;
    gap: 14px;
  }
  html body :is(.jx-page,.archived-qual-page,.relay-calc-page,.wap-page,.meet-page) .page-hero__content {
    width: 100%;
    flex: 0 1 auto;
  }
  html body :is(.jx-page,.archived-qual-page,.relay-calc-page,.wap-page,.meet-page) .page-hero__title {
    font-size: 29px;
    letter-spacing: 0;
  }
  html body :is(.wap-page,.relay-calc-page) .page-hero :is(.wap-mode-switch,.relay-mode-switch) {
    width: 100%;
  }
  html body :is(.wap-page,.relay-calc-page) .page-hero :is(.wap-mode-switch,.relay-mode-switch) > button,
  html body :is(.jx-page,.archived-qual-page,.meet-page) .page-hero__back-link {
    min-height: 44px;
    padding: 8px 4px;
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
  }
}

/* Loading, login, error and empty states share one quiet notice container. */
html[data-theme] body .home-page #dtsc-home-private-root > .home-empty,
html[data-theme] body .swimmer-page #dtsc-swimmer-private-root > .home-empty,
html[data-theme] body .results-page #dtsc-results-private-root .home-empty,
html[data-theme] body .page :is(.home-empty,.home-meet-empty,.meet-empty,.achievement-empty,.award-empty,.meet-plan-empty,.meet-personal-empty,.meet-event-overview-empty,.meet-event-overview-event__empty,.meet-overview-board__session-qualified-empty,.stroke-score-history__empty,.stroke-scoreboard__empty,.progression-chart__empty,.no-swims,.results-empty-state,.relay-exclude-empty,.relay-manual-time-empty,.private-load-error,.private-section-loading,.profile-private-loading,.results-private-loading,.meet-plan-loading,.wap-empty,.wap-error,.relay-load-status,.relay-form-error),
html[data-theme] body :is(.wap-login-panel,.relay-login-panel) > p {
  box-sizing: border-box;
  min-height: 72px;
  padding: 22px 18px;
  margin: 0;
  border: 1px dashed #b9cadf !important;
  border-radius: 16px;
  background: #f5f8fd !important;
  box-shadow: none !important;
  color: #586c89 !important;
  font: italic 400 14px/1.6 var(--font-ui);
}
html[data-theme] body .page .profile-private-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
html[data-theme] body .profile-private-message button { font-style: normal; }
html body :is(.wap-login-panel,.relay-login-panel) { padding: 30px; }
html[data-theme='dark'] body .home-page #dtsc-home-private-root > .home-empty,
html[data-theme='dark'] body .swimmer-page #dtsc-swimmer-private-root > .home-empty,
html[data-theme='dark'] body .results-page #dtsc-results-private-root .home-empty,
html[data-theme='dark'] body .meet-page .private-section-shell--message > .meet-empty,
html[data-theme='dark'] body .page :is(.home-empty,.home-meet-empty,.meet-empty,.achievement-empty,.award-empty,.meet-plan-empty,.meet-personal-empty,.meet-event-overview-empty,.meet-event-overview-event__empty,.meet-overview-board__session-qualified-empty,.stroke-score-history__empty,.stroke-scoreboard__empty,.progression-chart__empty,.no-swims,.results-empty-state,.relay-exclude-empty,.relay-manual-time-empty,.private-load-error,.private-section-loading,.profile-private-loading,.results-private-loading,.meet-plan-loading,.wap-empty,.wap-error,.relay-load-status,.relay-form-error),
html[data-theme='dark'] body :is(.wap-login-panel,.relay-login-panel) > p {
  background: #202f45 !important;
  border-color: #4a6482 !important;
  color: #afc0d7 !important;
}
html body .swimmer-page .swimmer-star-toggle[hidden] { display: none !important; }

html[data-theme='dark'] body .home-page .home-tool-tab:is(:hover,:focus-visible) {
  background: #304b6d !important;
  border-color: #6d91bc !important;
  box-shadow: 0 8px 18px #0003;
  color: #edf4ff;
}
@media (max-width:820px) {
  html body :is(.wap-login-panel,.relay-login-panel) { padding: 18px; }
  html body .home-page .controls-bar .home-filter-options { grid-column: 1; grid-row: 2; }
  html body .home-page .controls-bar .qualified-filter { font-size: 14px; }
  html body .home-page .controls-bar .count { grid-column: 2; grid-row: 2; align-self: center; white-space: nowrap; font-size: 12px; }
  html body .home-page .controls-bar { gap: 12px 8px; }
  html body .home-page .home-meets-mobile-title { margin: 0 0 12px; }
  html body .home-page .achievement-section-head { margin-bottom: 16px; }
}

/* JX uses the same heading and distance typography as meet QT tables. */
html body .jx-page .jx-table-card__title {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
}
html body .jx-page :is(.jx-table-header th,.jx-stroke-row th,.jx-distance-cell) {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
}
html[data-theme] body .jx-page .jx-table-header th:first-child { background: #111 !important; color: #fff !important; }
@media (max-width:820px) {
  html body .jx-page .jx-table-card__title { font-size: 15px; line-height: 1.2; }
  html body .jx-page :is(.jx-table-header th,.jx-stroke-row th,.jx-distance-cell) { font-size: 16px; line-height: 1.25; }
}
