:root {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111827;
  background-color: #f3f4f6;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: clamp(1rem, 4vw, 1.75rem);
  left: 50%;
  transform: translate(-50%, 16px);
  max-width: min(360px, 90vw);
  padding: 0.85rem 1.1rem;
  border-radius: 0.75rem;
  background: rgba(17, 24, 39, 0.95);
  color: #f9fafb;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  z-index: 999;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast[data-intent='error'] {
  background: rgba(220, 38, 38, 0.95);
  color: #fef2f2;
}

.toast[data-intent='success'] {
  background: rgba(16, 185, 129, 0.95);
  color: #ecfdf5;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-page {
  padding: 2.25rem clamp(1rem, 3vw, 2.75rem) 3.25rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  background: #f3f4f6;
  max-width: 1800px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.content-page__intro {
  max-width: 60rem;
  display: grid;
  gap: 1rem;
  color: #1f2937;
}

.content-page__intro h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.content-page__note {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4c1d95;
}

.content-page__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .content-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.content-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 1rem;
}

.content-card header {
  display: grid;
  gap: 0.35rem;
}

.content-card header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.content-card__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: #4b5563;
}

.content-card__list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
  color: #1f2937;
}

.content-card__list li {
  line-height: 1.6;
}

.content-page__summary {
  max-width: 52rem;
  background: rgba(79, 70, 229, 0.08);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.2);
}

.content-page__summary h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.content-page__summary p {
  margin: 0;
  line-height: 1.6;
  color: #1f2937;
}

.app-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 1.5rem;
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  max-width: 1800px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.app-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.app-header p {
  margin: 0;
  max-width: 90ch;
  color: #4b5563;
  line-height: 1.6;
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  width: 100%;
  justify-content: flex-start;
  text-align: right;
}

.header-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
}

.toggle-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.toggle input[type='checkbox'] {
  appearance: none;
  width: 2.5rem;
  height: 1.4rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #e5e7eb;
  position: relative;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.toggle input[type='checkbox']::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0.3rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(0, -50%);
  transition: transform 160ms ease, background 160ms ease;
}

.toggle input[type='checkbox']:checked {
  background: #6366f1;
  border-color: #6366f1;
}

.toggle input[type='checkbox']:checked::after {
  transform: translate(1.1rem, -50%);
}

.toggle input[type='checkbox']:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.35);
  outline-offset: 2px;
}

.header-button {
  background: #111827;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.15);
}

.header-icon-button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: #111827;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  font-size: 1.25rem;
  text-decoration: none;
}

.header-icon-button i {
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.15);
}

.header-icon-button:focus-visible,
.header-menu__toggle:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.35);
  outline-offset: 2px;
}

.header-menu {
  position: relative;
}

.header-menu__toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: #e5e7eb;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.header-menu__toggle i {
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-menu__toggle svg {
  fill: currentColor;
}

.header-menu__toggle:hover {
  background: #d1d5db;
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.15);
}

.header-menu__toggle--presets {
  background: #111827;
  color: #ffffff;
}

.header-menu__toggle--presets:hover {
  background: #1f2937;
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.2);
}

.header-menu__toggle--share {
  background: #111827;
  color: #ffffff;
}

.header-menu__toggle--share:hover {
  background: #1f2937;
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.2);
}

.header-menu__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 1.5rem));
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 10;
}

.header-menu__section {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.header-menu__panel--share .header-menu__section,
.header-menu__panel--presets .header-menu__section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.header-menu__section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  font-weight: 700;
}

.header-menu__section .toggle-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.header-menu__actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header-menu__toggle-option {
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.header-menu__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #111827;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease;
  line-height: 1.4;
}

.header-menu__toggle-option input[type='checkbox'] {
  margin-left: auto;
  accent-color: #6366f1;
}

.header-menu__item:hover,
.header-menu__item:focus-visible {
  background: rgba(99, 102, 241, 0.1);
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .header-actions {
    flex-direction: row;
    align-items: flex-start;
  }

  .header-buttons {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 768px) {
  .app-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
  }

  .header-actions {
    width: auto;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
  }

  .header-buttons {
    align-items: flex-end;
  }

  .header-controls {
    flex-wrap: nowrap;
    width: auto;
    justify-content: flex-end;
  }
}

.layout {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem clamp(1rem, 3vw, 2.5rem) 2.25rem;
  max-width: 1960px;
  margin-left: auto;
  margin-right: auto;
  flex: 1;
  gap: 2.5rem;
}

.layout__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}


.stations {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.station-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .station-row {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 2rem;
  }
}

@media (min-width: 1400px) {
  .station-row {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }
}

.station-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.07);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  position: relative;
}

.station-header {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.station-header__titles {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.station-type {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6366f1;
}

.station-card--run .station-type {
  color: #2563eb;
}

.station-standards {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: transparent;
  color: #1d4ed8;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  border: none;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}

.station-standards:hover {
  background: rgba(59, 130, 246, 0.12);
}

.station-standards:focus-visible {
  outline: none;
  background: rgba(59, 130, 246, 0.18);
}

.station-standards[aria-expanded='true'] {
  background: rgba(59, 130, 246, 0.22);
}

.station-standards__icon {
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.station-standards__tooltip {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 260px;
  max-width: 320px;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 20;
  visibility: hidden;
}

.station-standards[aria-expanded='true'] .station-standards__tooltip {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.station-standards__title {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.station-standards__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.station-standards__list li {
  display: grid;
  grid-template-columns: 5ch 1fr;
  gap: 0.5rem;
  font-size: 0.8rem;
  align-items: center;
}

.station-standards__division {
  font-weight: 700;
  color: #cbd5f5;
}

.station-standards__detail {
  color: #e2e8f0;
}

body.dark-mode .station-standards {
  background: transparent;
  color: #cbd5f5;
}

body.dark-mode .station-standards:hover,
body.dark-mode .station-standards:focus-visible,
body.dark-mode .station-standards[aria-expanded='true'] {
  background: rgba(96, 165, 250, 0.35);
}

body.dark-mode .station-standards__tooltip {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.45);
}

body.dark-mode .station-standards__division {
  color: #93c5fd;
}

body.dark-mode .station-standards__detail {
  color: #dbeafe;
}

.station-card--run {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), #ffffff);
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
}

.station-card--run .time-display {
  color: #1d4ed8;
}

.station-card--locked {
  opacity: 0.85;
}

.station-card--locked::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(15, 23, 42, 0.08);
  pointer-events: none;
}

.station-card--locked .stepper button,
.station-card--locked .time-display,
.station-card--locked .time-edit-input {
  cursor: not-allowed;
}

.station-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.station-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.station-type {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6366f1;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stepper > button[data-delta] {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(79, 70, 229, 0.25);
  background: #eef2ff;
  color: #312e81;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}

.stepper > button[data-delta]:not(:disabled):hover {
  transform: translateY(-1px);
  background: #312e81;
  color: #ffffff;
}

.stepper > button[data-delta]:disabled {
  background: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.6);
  color: rgba(17, 24, 39, 0.45);
}

.time-display {
  flex: 1;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  min-width: 6rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.5rem;
  border-radius: 0.75rem;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  width: 100%;
}

.time-display-wrapper {
  flex: 1;
  min-width: 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.time-display:hover,
.time-display:focus-visible {
  background: rgba(79, 70, 229, 0.12);
  outline: none;
}

.time-display:disabled {
  cursor: not-allowed;
  color: rgba(17, 24, 39, 0.45);
}

.time-display--hidden {
  display: none;
}

.time-display-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.01em;
}

.time-edit-input {
  flex: 1;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  height: 3rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.75rem;
  border: 2px solid rgba(79, 70, 229, 0.3);
  transition: border-color 160ms ease, box-shadow 160ms ease;
  width: min(10rem, 100%);
  max-width: 10rem;
}

.time-edit-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.time-edit-input--error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.summary {
  position: relative;
  margin-top: 2.5rem;
  background: #111827;
  color: #f9fafb;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 25px 40px rgba(15, 23, 42, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1100px) {
  .layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .layout__inner {
    flex: 1 1 auto;
    max-width: 1800px;
  }

  .summary {
    flex: 0 0 420px;
    position: sticky;
    top: 2rem;
    margin-top: 0;
    margin-left: 2rem;
  }
}

@media (min-width: 1500px) {
  .layout__inner {
    max-width: 1900px;
  }

  .summary {
    margin-left: 2.5rem;
  }
}

.summary h2 {
  margin: 0;
  font-size: 1.35rem;
}

.summary-time {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.summary-details {
  display: grid;
  gap: 0.75rem;
}

.summary-details .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.95rem;
  color: rgba(249, 250, 251, 0.85);
}

.summary-details .label {
  font-weight: 600;
}

.summary-details .value {
  font-variant-numeric: tabular-nums;
}

.summary-splits {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  margin-inline: -1rem;
  border-radius: 1rem;
  background: rgba(17, 24, 39, 0.55);
}

.summary-splits h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(249, 250, 251, 0.7);
}

.summary-splits-list {
  display: grid;
  gap: 0.6rem;
}

.summary-splits-list .split-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  color: rgba(249, 250, 251, 0.9);
  font-variant-numeric: tabular-nums;
}

.summary-splits-list .split-row .label {
  font-weight: 600;
}

.summary-pace {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  margin-inline: -1rem;
  border-radius: 1rem;
  background: rgba(17, 24, 39, 0.5);
}

.summary-pace h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(249, 250, 251, 0.7);
}


.pace-zones {
  display: grid;
  gap: 0.75rem;
}

.pace-zone {
  border-radius: 0.85rem;
  padding: 0.85rem 0.95rem;
  background: rgba(30, 64, 175, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.22);
  display: grid;
  gap: 0.5rem;
}

.pace-zone--active {
  background: rgba(129, 140, 248, 0.25);
  border-color: rgba(165, 180, 252, 0.9);
  box-shadow: 0 14px 26px rgba(79, 70, 229, 0.35);
}

.pace-zone--collapsed {
  padding: 0.65rem 0.85rem;
}

.pace-zone--collapsed summary {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: rgba(249, 250, 251, 0.85);
  font-weight: 600;
}

.pace-zone--collapsed summary .pace-zone__badge {
  margin-left: auto;
}

.pace-zone--collapsed summary::-webkit-details-marker {
  display: none;
}

.pace-zone__body {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
  color: rgba(249, 250, 251, 0.85);
  font-size: 0.85rem;
}

.pace-zone--empty {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.15);
  color: rgba(226, 232, 240, 0.85);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 3.25rem;
}

.pace-zone__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  color: rgba(249, 250, 251, 0.9);
}

.pace-zone__label {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pace-zone__badge {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pace-zone__range,
.pace-zone__avg,
.pace-zone__diff,
.pace-zone__description {
  font-size: 0.85rem;
  color: rgba(249, 250, 251, 0.85);
  line-height: 1.5;
}

.pace-zone__diff strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.summary-options {
  display: grid;
  gap: 0.75rem;
  margin-inline: -1rem;
  padding: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(249, 250, 251, 0.16);
}

.summary-options label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: rgba(249, 250, 251, 0.85);
  line-height: 1.4;
  cursor: pointer;
}

.summary-options input[type='checkbox'] {
  margin-top: 0.2rem;
  accent-color: #6366f1;
}

.export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(99, 102, 241, 0.18);
  color: #ede9fe;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.export-button:hover {
  transform: translateY(-1px);
  background: rgba(99, 102, 241, 0.32);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
}

.export-button:focus-visible {
  outline: 3px solid rgba(129, 140, 248, 0.7);
  outline-offset: 2px;
}

.export-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.app-footer {
  padding: 1.5rem clamp(1rem, 3vw, 2.75rem) 2rem;
  background: #111827;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 0.9rem;
  max-width: 1800px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.app-footer p {
  margin: 0.5rem 0;
}

.app-footer a {
  color: inherit;
  text-decoration: underline;
}

.race-info {
  flex: 1;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 3vw, 2.75rem) 2.75rem;
  display: grid;
  gap: 2.5rem;
}

.race-info__intro {
  display: grid;
  gap: 0.75rem;
  color: #334155;
}

.race-info__intro h2 {
  margin: 0;
  font-size: 1.5rem;
}

.race-info__intro p {
  margin: 0;
  max-width: 70ch;
  line-height: 1.6;
}

.race-info__team-intro {
  display: grid;
  gap: 0.75rem;
  color: #334155;
}

.race-info__team-intro h2 {
  margin: 0;
  font-size: 1.4rem;
}

.race-info__team-intro p {
  margin: 0;
  max-width: 70ch;
  line-height: 1.6;
}

.race-info__team-list {
  display: grid;
  gap: 2rem;
}

.race-info__team-event {
  display: grid;
  gap: 0.75rem;
  color: #1f2937;
}

.race-info__team-event h3 {
  margin: 0;
  font-size: 1.25rem;
}

.race-info__team-description {
  margin: 0;
  max-width: 70ch;
  color: #475569;
  line-height: 1.6;
}

.race-info__table-wrapper {
  overflow-x: auto;
}

.race-info__table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.race-info__table thead {
  background: #111827;
  color: #f8fafc;
}

.race-info__table th,
.race-info__table td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  font-size: 0.95rem;
}

.race-info__table th {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.race-info__table tbody tr:nth-child(even) {
  background: rgba(241, 245, 249, 0.8);
}

.race-info__table tbody tr:hover {
  background: rgba(224, 231, 255, 0.7);
}

.race-info__table tbody th {
  font-weight: 600;
  color: #1e3a8a;
}

.race-info__note {
  font-size: 0.9rem;
  color: #475569;
  margin: 0;
}

body.dark-mode .race-info__intro {
  color: #cbd5f5;
}

body.dark-mode .race-info__intro p {
  color: #e2e8f0;
}

body.dark-mode .race-info__team-intro {
  color: #cbd5f5;
}

body.dark-mode .race-info__team-intro p {
  color: #e2e8f0;
}

body.dark-mode .race-info__team-event {
  color: #e2e8f0;
}

body.dark-mode .race-info__team-description {
  color: #cbd5f5;
}

body.dark-mode .race-info__table {
  background: #1f2937;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.45);
}

body.dark-mode .race-info__table thead {
  background: #0f172a;
}

body.dark-mode .race-info__table tbody tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.8);
}

body.dark-mode .race-info__table tbody tr:hover {
  background: rgba(59, 130, 246, 0.22);
}

body.dark-mode .race-info__table tbody th {
  color: #93c5fd;
}

body.dark-mode .race-info__table td {
  color: #e2e8f0;
}

body.dark-mode .race-info__note {
  color: #94a3b8;
}

body.dark-mode {
  background-color: #0f172a;
  color: #e2e8f0;
}

body.dark-mode .app-header {
  background: #1e293b;
  border-bottom-color: #334155;
}

body.dark-mode .app-header p {
  color: #cbd5f5;
}

body.dark-mode .toggle {
  color: #e2e8f0;
}

body.dark-mode .toggle input[type='checkbox'] {
  background: #1f2937;
  border-color: #475569;
}

body.dark-mode .toggle input[type='checkbox']::after {
  background: #e2e8f0;
}

body.dark-mode .toggle input[type='checkbox']:focus-visible {
  outline-color: rgba(129, 140, 248, 0.5);
}

body.dark-mode .header-button {
  background: #6366f1;
  color: #eef2ff;
}

body.dark-mode .header-button:hover {
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.35);
}

body.dark-mode .header-icon-button {
  background: #6366f1;
  color: #eef2ff;
}

body.dark-mode .header-icon-button:hover {
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.35);
}

body.dark-mode #dark-mode-button .fi-rr-moon:before {
  content: "\f1f7";
}

body.dark-mode .header-menu__toggle {
  background: #334155;
  color: #e2e8f0;
}

body.dark-mode .header-menu__toggle:hover {
  background: #475569;
  box-shadow: 0 10px 20px rgba(8, 47, 73, 0.35);
}

body.dark-mode .header-menu__toggle--presets {
  background: #6366f1;
  color: #eef2ff;
}

body.dark-mode .header-menu__toggle--presets:hover {
  background: #4f46e5;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.45);
}

body.dark-mode .header-menu__toggle--share {
  background: #6366f1;
  color: #eef2ff;
}

body.dark-mode .header-menu__toggle--share:hover {
  background: #4f46e5;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.45);
}

body.dark-mode .content-page {
  background: #0f172a;
}

body.dark-mode .content-page__intro,
body.dark-mode .content-card__list li,
body.dark-mode .content-page__summary p {
  color: #e2e8f0;
}

body.dark-mode .content-page__note {
  color: #c4b5fd;
}

body.dark-mode .content-card {
  background: #1e293b;
  box-shadow: 0 20px 45px rgba(8, 47, 73, 0.4);
}

body.dark-mode .content-card__subtitle {
  color: #94a3b8;
}

body.dark-mode .content-page__summary {
  background: rgba(79, 70, 229, 0.18);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}

body.dark-mode .header-menu__panel {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 20px 40px rgba(8, 47, 73, 0.4);
}

body.dark-mode .header-menu__item {
  color: #e2e8f0;
}

body.dark-mode .header-menu__item:hover,
body.dark-mode .header-menu__item:focus-visible {
  background: rgba(99, 102, 241, 0.2);
}

body.dark-mode .layout {
  background: transparent;
}

body.dark-mode .station-card {
  background: #1f2937;
  border-color: #334155;
  box-shadow: 0 15px 35px rgba(8, 47, 73, 0.4);
}

body.dark-mode .station-card--run {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(30, 64, 175, 0.4));
  border-color: rgba(129, 140, 248, 0.65);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.35);
}

body.dark-mode .station-type {
  color: #a5b4fc;
}

body.dark-mode .station-card--run .station-type {
  color: #e0e7ff;
}

body.dark-mode .station-card--run .time-display {
  color: #c7d2fe;
}

body.dark-mode .stepper > button[data-delta] {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .stepper > button[data-delta]:not(:disabled):hover {
  background: #6366f1;
}

body.dark-mode .stepper > button[data-delta]:disabled {
  background: #374151;
  border-color: #4b5563;
  color: rgba(226, 232, 240, 0.4);
}

body.dark-mode .time-display:hover,
body.dark-mode .time-display:focus-visible {
  background: rgba(129, 140, 248, 0.25);
}

body.dark-mode .time-display:disabled {
  color: rgba(203, 213, 225, 0.45);
}

body.dark-mode .time-display-subtitle {
  color: #94a3b8;
}

body.dark-mode .time-edit-input {
  background: #0f172a;
  border-color: #475569;
  color: #f8fafc;
}

body.dark-mode .time-edit-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25);
}

body.dark-mode .time-edit-input--error {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
}

body.dark-mode .summary {
  background: #0b1120;
  color: #e2e8f0;
  box-shadow: 0 25px 45px rgba(8, 47, 73, 0.45);
}





body.dark-mode 

body.dark-mode .summary-details .row {
  color: rgba(226, 232, 240, 0.85);
}

body.dark-mode .summary-splits {
  background: rgba(15, 23, 42, 0.72);
}

body.dark-mode .summary-splits h3 {
  color: rgba(203, 213, 225, 0.8);
}

body.dark-mode .summary-splits-list .split-row {
  color: rgba(226, 232, 240, 0.9);
}

body.dark-mode .summary-options {
  border-top-color: rgba(148, 163, 184, 0.35);
}

body.dark-mode .summary-options label {
  color: rgba(226, 232, 240, 0.85);
}

body.dark-mode .summary-options input[type='checkbox'] {
  accent-color: #a78bfa;
}

.time-explorer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  gap: 2.5rem;
}

.time-explorer__hero {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  text-align: center;
  padding: 2.5rem min(3.5rem, 6vw);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #1e40af, #9333ea);
  box-shadow: 0 24px 50px rgba(30, 58, 138, 0.4);
  color: #f8fafc;
}

.time-explorer__display {
  font-size: clamp(3rem, 7vw, 4.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
  min-width: 8ch;
}

.time-explorer__controls {
  width: min(600px, 100%);
  display: grid;
  gap: 1rem;
}

.time-explorer__reference {
  display: grid;
  gap: 0.5rem;
  text-align: center;
  justify-items: center;
}

.time-explorer__select {
  appearance: none;
  width: 100%;
  max-width: 280px;
  padding: 0.4rem 0.65rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(67, 56, 202, 0.3);
  background: #ffffff;
  color: #111827;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  box-shadow: 0 15px 30px rgba(79, 70, 229, 0.18);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.time-explorer__select:focus-visible {
  outline: none;
  border-color: rgba(67, 56, 202, 0.75);
  box-shadow: 0 0 0 4px rgba(165, 180, 252, 0.35);
}

.time-explorer__select option {
  color: #111827;
}

.time-explorer__reference-note {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

body.dark-mode .time-explorer__select {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(129, 140, 248, 0.5);
  color: #f8fafc;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.5);
}

body.dark-mode .time-explorer__reference-note {
  color: rgba(148, 163, 184, 0.75);
}

.time-explorer__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.8);
}

.time-explorer__controls input[type='range'] {
  width: 100%;
  accent-color: #facc15;
}

.time-explorer__scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(241, 245, 249, 0.85);
  font-variant-numeric: tabular-nums;
}

.time-explorer__hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: rgba(241, 245, 249, 0.75);
  text-align: center;
  font-style: italic;
}

.time-explorer__insights {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.time-explorer__insight-card {
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 1.15rem;
  padding: 1.75rem;
  display: grid;
  gap: 0.85rem;
  color: #0f172a;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.time-explorer__insight-card h2 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4c1d95;
}

.time-explorer__category,
.time-explorer__division {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111827;
}

.time-explorer__category-detail,
.time-explorer__division-detail {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
}

.time-explorer__meta {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(79, 70, 229, 0.75);
}

.time-explorer__examples {
  display: grid;
  gap: 1.25rem;
}

.time-explorer__examples h2 {
  margin: 0;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4338ca;
}

.time-explorer__tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0;
}

.time-explorer__tab {
  background: transparent;
  border: none;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.time-explorer__tab:hover {
  color: #4338ca;
  background: rgba(67, 56, 202, 0.05);
}

.time-explorer__tab--active {
  color: #4338ca;
  border-bottom-color: #4338ca;
}

.time-explorer__tab-content {
  display: block;
  animation: fadeIn 0.3s ease;
}

.time-explorer__tab-content--hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.time-explorer__tab-summary {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.time-explorer__tab-total {
  font-size: 1.25rem;
  font-weight: 700;
  color: #4338ca;
  font-variant-numeric: tabular-nums;
}

.time-explorer__cards {
  display: grid;
  gap: 1rem;
}

.time-explorer__card {
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.time-explorer__card summary {
  color: #1e293b;
}

.time-explorer__card .pace-zone__badge {
  background: rgba(67, 56, 202, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #4338ca;
}

.time-explorer__card .pace-zone__body {
  color: #334155;
}

.time-explorer__card .pace-zone__label {
  color: #1e293b;
}

.time-explorer__split-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.time-explorer__split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: #1e293b;
}

.time-explorer__split-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.time-explorer__split-name {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.time-explorer__split-meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6366f1;
}

.time-explorer__split-time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

body.dark-mode .time-explorer__hero {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
}

body.dark-mode .time-explorer__label {
  color: rgba(226, 232, 240, 0.85);
}

body.dark-mode .time-explorer__controls input[type='range'] {
  accent-color: #facc15;
}

body.dark-mode .time-explorer__scale {
  color: rgba(226, 232, 240, 0.8);
}

body.dark-mode .time-explorer__hint {
  color: rgba(226, 232, 240, 0.7);
}

body.dark-mode .time-explorer__insight-card {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(99, 102, 241, 0.3);
  color: #e2e8f0;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.55);
}

body.dark-mode .time-explorer__insight-card h2 {
  color: rgba(165, 180, 252, 0.95);
}

body.dark-mode .time-explorer__category,
body.dark-mode .time-explorer__division {
  color: #f8fafc;
}

body.dark-mode .time-explorer__category-detail,
body.dark-mode .time-explorer__division-detail {
  color: rgba(226, 232, 240, 0.85);
}

body.dark-mode .time-explorer__meta {
  color: rgba(129, 140, 248, 0.65);
}

body.dark-mode .time-explorer__examples h2 {
  color: rgba(165, 180, 252, 0.85);
}

body.dark-mode .time-explorer__tabs {
  border-bottom-color: #334155;
}

body.dark-mode .time-explorer__tab {
  color: #94a3b8;
}

body.dark-mode .time-explorer__tab:hover {
  color: #a5b4fc;
  background: rgba(165, 180, 252, 0.1);
}

body.dark-mode .time-explorer__tab--active {
  color: #a5b4fc;
  border-bottom-color: #a5b4fc;
}

body.dark-mode .time-explorer__tab-summary {
  border-bottom-color: #334155;
}

body.dark-mode .time-explorer__tab-total {
  color: #a5b4fc;
}

body.dark-mode .time-explorer__card {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(129, 140, 248, 0.25);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.45);
}

body.dark-mode .time-explorer__card summary {
  color: rgba(226, 232, 240, 0.9);
}

body.dark-mode .time-explorer__card .pace-zone__badge {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.25);
  color: rgba(226, 232, 240, 0.85);
}

body.dark-mode .time-explorer__card .pace-zone__body {
  color: rgba(226, 232, 240, 0.8);
}

body.dark-mode .time-explorer__card .pace-zone__label {
  color: rgba(226, 232, 240, 0.85);
}

body.dark-mode .time-explorer__split {
  color: rgba(226, 232, 240, 0.85);
}

body.dark-mode .time-explorer__split-meta {
  color: rgba(165, 180, 252, 0.85);
}

body.dark-mode .time-explorer__split-time {
  color: #f8fafc;
}

@media (min-width: 768px) {
  .time-explorer {
    padding-inline: 3rem;
  }

  .time-explorer__hero {
    padding: 2.5rem 3rem;
  }
}

body.dark-mode .app-footer {
  background: #0b1120;
  color: rgba(226, 232, 240, 0.7);
}
