:root {
  color-scheme: light dark;
  --bg: #f6f8fa;
  --surface: #fff;
  --ink: #142a43;
  --muted: #4c637a;
  --line: #d7e1ea;
  --blue: #1766b5;
  --error: #b33d35;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.6 system-ui,
    -apple-system,
    sans-serif;
}
header {
  padding: 20px max(24px, calc((100vw - 1000px) / 2));
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
header a {
  font-weight: 700;
}
main {
  max-width: 1000px;
  margin: auto;
  padding: 32px 24px 64px;
}
a {
  color: var(--blue);
}
h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 24px 0;
}
h2 {
  line-height: 1.3;
  font-size: 23px;
}
p {
  max-width: 72ch;
}
article,
.panel {
  background: var(--surface);
  padding: 24px;
  border-radius: 20px;
  margin: 20px 0;
}
button,
.button {
  font: inherit;
  cursor: pointer;
  min-height: 48px;
  padding: 10px 20px;
  background: var(--blue);
  color: white;
  border: 1px solid var(--blue);
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.metric strong {
  display: block;
  font-size: 32px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.metric span {
  color: var(--muted);
}
.map {
  height: 360px;
  width: 100%;
  border-radius: 16px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.muted {
  color: var(--muted);
}
.error {
  color: var(--error);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #102033;
    --surface: #193149;
    --ink: #f3f7fb;
    --muted: #b4c7d9;
    --line: #34516d;
    --blue: #a8d6ff;
    --error: #ffb3aa;
  }
  button,
  .button {
    color: #142a43;
  }
}
@media (max-width: 500px) {
  main {
    padding: 24px 16px;
  }
  article,
  .panel {
    padding: 20px;
  }
  .map {
    height: 280px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}

.workout-detail {
  margin: 24px 0 36px;
}
.workout-detail > h2 {
  font-size: 28px;
  margin: 0;
}
.workout-detail .workout-detail {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.metric strong {
  overflow-wrap: anywhere;
}
.metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
}
.workout-detail article {
  overflow-wrap: anywhere;
}

.metric small {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.metric strong {
  white-space: nowrap;
}
@media (max-width: 500px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }
  .metric strong {
    font-size: 24px;
  }
  .metric small {
    font-size: 13px;
  }
}
