/* A shared sliding selection; the original buttons keep their fonts and handlers. */
html body .dtsc-binary-toggle.dtsc-binary-toggle {
  --toggle-index: 0;
  --toggle-count: 2;
  --toggle-nudge: 0%;
  --toggle-ink: #0b2a5b;
  --toggle-active-ink: #0b2a5b;
  --toggle-fill: #e8f1ff;
  --toggle-edge: #0b2a5b;
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-template-columns: repeat(var(--toggle-count), minmax(0, 1fr));
  gap: 0;
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  padding: 3px;
  border: 1px solid #d6deed;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  touch-action: manipulation;
}
html body .dtsc-binary-toggle::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 3px auto 3px 3px;
  box-sizing: border-box;
  width: calc((100% - 6px) / var(--toggle-count));
  border: 1px solid var(--toggle-edge);
  border-radius: inherit;
  background: var(--toggle-fill);
  box-shadow: 0 1px 3px rgba(11, 42, 91, .12);
  transform: translateX(calc(var(--toggle-index) * 100% + var(--toggle-nudge)));
  transition: transform 280ms cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
/* Reach the new option, rebound slightly inward, then settle inside the rail. */
@supports (transition-timing-function: linear(0, 1)) {
  html body .dtsc-binary-toggle[data-toggle-committed]::before {
    transition: transform 420ms linear(0, .18 8%, .45 18%, .71 30%, .9 43%, .98 54%, 1 62%, .995 69%, .985 79%, .992 89%, 1);
  }
}
/* Override legacy active/hover fills, including dark-theme !important rules. */
html[data-theme] body .dtsc-binary-toggle.dtsc-binary-toggle > button,
html[data-theme] body .swimmer-page .meets-shell-card .profile-mobile-section-toggle.dtsc-binary-toggle > button {
  position: relative;
  margin: 0;
  width: 100%;
  min-width: 0;
  min-height: 32px;
  border: 1px solid transparent !important;
  border-radius: 999px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--toggle-ink) !important;
  transform: none !important;
  transition: color 180ms ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
html[data-theme] body .dtsc-binary-toggle.dtsc-binary-toggle > button[aria-pressed='true'],
html[data-theme] body .swimmer-page .meets-shell-card .profile-mobile-section-toggle.dtsc-binary-toggle > button[aria-pressed='true'] {
  color: var(--toggle-active-ink) !important;
}
html body .dtsc-binary-toggle > button:focus-visible {
  outline: 2px solid #4489da;
  outline-offset: 1px;
}
html body .dtsc-binary-toggle > button:disabled { opacity: .5; cursor: not-allowed; }
html body .swimmer-page .profile-mobile-section-toggle.dtsc-binary-toggle {
  width: 100%;
  grid-template-columns: repeat(var(--toggle-count), minmax(0, 1fr));
  gap: 0;
  padding: 3px;
  border-width: 1px;
  border-style: solid;
  border-color: #d6deed;
}
html[data-theme] body .swimmer-page .meets-shell-card .profile-mobile-section-toggle.dtsc-binary-toggle > button {
  min-height: 44px;
}
@media (max-width: 820px) {
  html[data-theme] body .profile-mobile-section-toggle.dtsc-binary-toggle > button {
    padding-inline: 4px;
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  html[data-theme] body .profile-mobile-section-toggle.dtsc-binary-toggle > button { font-size: 11px; }
}
/* Match the meet picker beneath each profile course toggle. */
html body .meets-sidebar-controls > .dtsc-binary-toggle.dtsc-binary-toggle,
html body .meets-mobile-course-toggle > .dtsc-binary-toggle.dtsc-binary-toggle,
html body .records-control-stack .dtsc-binary-toggle.dtsc-binary-toggle {
  width: 100%;
  justify-self: stretch;
}
.records-control-stack > .records-control {
  justify-self: stretch;
  justify-items: stretch;
  min-width: 0;
}
@media (max-width: 820px) {
  .records-controls--combined { grid-template-columns: minmax(0, 1fr); }
  .records-control-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 310px;
    justify-self: center;
  }
}
@media (max-width: 420px) {
  .records-control-stack { max-width: 294px; column-gap: 8px; }
  html[data-theme] body .records-control-stack .dtsc-binary-toggle > button { padding-inline: 6px; }
}
html[data-theme='dark'] body .dtsc-binary-toggle.dtsc-binary-toggle {
  --toggle-ink: #dceaff;
  --toggle-active-ink: #fff;
  --toggle-fill: #315988;
  --toggle-edge: #78a9e7;
  border-color: #4a6381;
  background: #243750;
}
@media (pointer: coarse) {
  html[data-theme] body .dtsc-binary-toggle.dtsc-binary-toggle > button { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html body .dtsc-binary-toggle.dtsc-binary-toggle::before,
  html[data-theme] body .dtsc-binary-toggle.dtsc-binary-toggle > button,
  html[data-theme] body .swimmer-page .meets-shell-card .profile-mobile-section-toggle.dtsc-binary-toggle > button { transition: none; }
}
@media (forced-colors: active) {
  html body .dtsc-binary-toggle::before { background: Highlight; border-color: Highlight; }
  html[data-theme] body .dtsc-binary-toggle.dtsc-binary-toggle > button,
  html[data-theme] body .swimmer-page .meets-shell-card .profile-mobile-section-toggle.dtsc-binary-toggle > button { color: ButtonText !important; }
  html[data-theme] body .dtsc-binary-toggle.dtsc-binary-toggle > button[aria-pressed='true'],
  html[data-theme] body .swimmer-page .meets-shell-card .profile-mobile-section-toggle.dtsc-binary-toggle > button[aria-pressed='true'] { color: HighlightText !important; }
}
