* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f5eb;
  color: #22352c;
  font:
    16px/1.5 var(--site-font);
}
main {
  max-width: 1140px;
  margin: auto;
  padding: 28px clamp(14px, 4vw, 52px) 36px;
}
header {
  border-bottom: 1px solid #a9af98;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  font-size: 13px;
}
header .back {
  color: inherit;
  text-decoration: none;
  font:
    600 20px var(--site-font);
}
h1 {
  font:
    normal clamp(38px, 5vw, 67px)/1.06 var(--site-font);
  letter-spacing: -0.04em;
  margin: 27px 0 6px;
}
p {
  margin: 5px 0 16px;
}
.toolbar,
.timeline,
.ends,
.sources {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.toolbar {
  margin: 20px 0 10px;
  flex-wrap: wrap;
}
.switch {
  display: flex;
  background: #e6e8da;
  border-radius: 6px;
  padding: 3px;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.switch button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 8px 14px;
  font-size: 14px;
}
.switch button[aria-pressed="true"] {
  background: #243f34;
  color: white;
}
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #c26d32;
  outline-offset: 3px;
}
.viewport {
  border: 1px solid #9ba38d;
  border-radius: 5px;
  overflow: hidden;
  background: #d9dec9;
  position: relative;
}
svg {
  width: 100%;
  height: clamp(300px, 44vh, 475px);
  display: block;
}
.north {
  position: absolute;
  right: 12px;
  top: 12px;
  background: #fffbeeeb;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.timeline {
  margin-top: 16px;
}
.timeline button {
  background: #fffdf3;
  border: 1px solid #9da58f;
  border-radius: 5px;
  padding: 6px 12px;
  font-variant-numeric: tabular-nums;
}
.timeline input {
  width: 100%;
  accent-color: #3d5e49;
  cursor: ew-resize;
  height: 32px;
}
.readout {
  font-size: 13px;
  color: #465448;
  font-variant-numeric: tabular-nums;
}
.note {
  font-size: 14px;
  margin: 12px 0 20px;
}
.sources {
  border-top: 1px solid #b8bdab;
  padding-top: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.sources a {
  color: #304f3c;
  text-underline-offset: 3px;
}
summary {
  cursor: pointer;
}
.registration {
  font-size: 14px;
  margin-top: 15px;
}
.registration p {
  max-width: 75ch;
  margin: 8px 0;
}
.markLabel {
  font:
    11px var(--site-font);
  fill: #253326;
  paint-order: stroke;
  stroke: #eceddd;
  stroke-width: 3px;
  stroke-linejoin: round;
}
.routeLabel {
  font:
    italic 8px var(--site-font);
  fill: #475b49;
  paint-order: stroke;
  stroke: #e0e3cf;
  stroke-width: 2px;
}
@media (max-width: 600px) {
  main {
    padding-top: 16px;
  }
  .readout {
    font-size: 12px;
  }
  .toolbar {
    gap: 6px;
    display: grid;
  }
  .readout {
    min-height: 20px;
  }
  .switch {
    width: max-content;
  }
  .switch button {
    padding: 7px 9px;
  }
  .timeline {
    gap: 6px;
  }
  .sources {
    justify-content: start;
  }
}

.timeline {
  display: block;
}
.timeline input {
  margin: 0;
}
.timeline button[aria-pressed="true"] {
  background: #243f34;
  color: white;
}

.ends {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 4px;
}
.ends button {
  padding: 7px 0;
}
@media (max-width: 400px) {
  .ends button {
    font-size: 13px;
  }
  .ends {
    gap: 2px;
  }
}

@media (max-width: 640px) {
  .ends {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.transport {
  display: flex;
  align-items: center;
  gap: 12px;
}
.transport input {
  flex: 1;
  min-width: 0;
}
.transport #playback {
  min-width: 5rem;
  background: #243f34;
  color: white;
}

.note {
  border-left: 3px solid #82957a;
  padding: 6px 12px;
  max-width: 78ch;
}
.note strong {
  margin-right: 0.4em;
  font-variant-numeric: tabular-nums;
}
.note a {
  color: #304f3c;
  white-space: nowrap;
  text-underline-offset: 3px;
}

.speed-control {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}
.speed-control select {
  font: inherit;
  color: inherit;
  background: #fffdf3;
  border: 1px solid #9da58f;
  border-radius: 5px;
  padding: 0.4rem;
}
.speed-control select:focus-visible {
  outline: 3px solid #c26d32;
  outline-offset: 3px;
}
