.timetable {
  button,
  input,
  select {
    font: inherit;
    color: inherit;
  }
  button,
  select {
    cursor: pointer;
  }
  button {
    background: white;
    border: 0;
  }
  button:focus-visible,
  select:focus-visible,
  input:focus-visible {
    outline: 2px solid #134f72;
    outline-offset: -2px;
  }
  h1,
  h2,
  h3,
  b,
  strong,
  select {
    font-family: SourceSans3, system-ui, sans-serif;
    font-weight: 600;
  }
  .eyeline {
    font-size: 0.87rem;
    color: #615b55;
  }
  .mainhead {
    margin: 34px 0 20px;
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
  }
  h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1.04;
    margin: 0;
  }
  .controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 22.5rem)) max-content;
    align-items: end;
    gap: 16px;
    background: #f6f5f2;
    padding: 16px 20px;
    margin-bottom: 26px;
  }
  .control {
    display: grid;
    min-width: 0;
    gap: 5px;
    font:
      600 0.92rem SourceSans3,
      system-ui,
      sans-serif;
  }
  #station, #destination {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    height: 2.75rem;
    min-width: 0;
    margin: 0;
  }
  select,
  input {
    font:
      600 1rem SourceSans3,
      system-ui,
      sans-serif;
    border: 1px solid #8a8680;
    background: white;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 0;
    width: 100%;
  }
  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 42px;
  }
  .board,
  .detail {
    min-width: 0;
  }
  h2 {
    font-size: 1.7rem;
    line-height: 1.15;
    margin: 0 0 5px;
  }
  h3 {
    margin: 0;
    font-size: 1.35rem;
  }
  .meta {
    color: #615b55;
    font-size: 0.88rem;
    margin: 0;
  }
  .rows {
    margin: 16px 0;
  }
  .departure {
    display: grid;
    grid-template-columns: 4.15rem 2rem 1fr 1rem;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
    width: 100%;
    padding: 11px 8px;
    border-top: 1px solid #dfdcd7;
  }
  .departure[aria-pressed="true"] {
    background: #fff3e9;
    box-shadow: inset 3px 0 #ff681f;
  }
  .time {
    font:
      600 1.4rem SourceSans3,
      system-ui,
      sans-serif;
    font-variant-numeric: tabular-nums;
  }
  .num {
    width: 1.8rem;
    height: 1.8rem;
    display: inline-grid;
    place-items: center;
    background: #201e1d;
    color: white;
    font:
      600 1.05rem SourceSans3,
      system-ui,
      sans-serif;
  }
  .direction {
    font:
      600 1.1rem SourceSans3,
      system-ui,
      sans-serif;
  }
  .direction small {
    display: block;
    color: #615b55;
    font:
      normal 0.82rem system-ui,
      sans-serif;
  }
  .arrow {
    color: #68625c;
  }
  .detail {
    border-left: 1px solid #d0cbc6;
    padding-left: 32px;
  }
  .detailhead {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
  }
  .trip {
    padding: 0;
    list-style: none;
    margin: 20px 0;
  }
  .trip li {
    display: grid;
    grid-template-columns: 3.1rem 14px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 32px;
    font-size: 0.94rem;
  }
  .trip time {
    font-variant-numeric: tabular-nums;
    color: #514e49;
  }
  .rail {
    align-self: stretch;
    position: relative;
    display: grid;
    place-items: center;
  }
  .rail:after {
    content: "";
    position: absolute;
    background: #c1bdb7;
    width: 2px;
    height: 100%;
  }
  .rail:before {
    content: "";
    width: 6px;
    height: 6px;
    background: #514e49;
    z-index: 1;
  }
  .trip li:first-child .rail:after,
  .trip li:last-child .rail:after {
    height: 50%;
  }
  .trip li:first-child .rail:after {
    bottom: 0;
  }
  .trip li:last-child .rail:after {
    top: 0;
  }
  .trip li:first-child .rail:before,
  .trip .ride-end .rail:before {
    width: 9px;
    height: 9px;
    background: #ff681f;
  }
  .selected-trip .ride-stop .rail::after {
    background: #ff681f;
  }
  @media (prefers-reduced-motion: no-preference) {
    .selected-trip .ride-stop .rail::after {
      transform-origin: top;
      animation: mark-course var(--step) linear backwards;
      animation-delay: calc(var(--arrival) - var(--step) / 2);
    }
    .selected-trip li:first-child .rail::after,
    .selected-trip .ride-end .rail::after {
      animation-duration: calc(var(--step) / 2);
    }
    .selected-trip li:first-child .rail::after {
      animation-delay: 0ms;
    }
    .selected-trip .ride-stop .rail::before {
      animation: stop-pulse 120ms ease-out var(--arrival);
    }
  }
  .trip .ride-end .rail::after {
    height: 50%;
    top: 0;
  }
  .ride-end:not(:last-child) .rail {
    background: linear-gradient(#c1bdb7, #c1bdb7) center bottom / 2px 50% no-repeat;
  }
  .trip .onward-stop, .trip .onward-stop time {
    color: #615d59;
  }
  .onward-stop .rail::before {
    background: #827e79;
  }
  .selected-trip .alight-icon { color: #ff681f; }
  .alight-icon {
    display: inline-block;
    width: 1.5rem;
    height: 1.3rem;
    margin-inline-start: .35em;
    vertical-align: -.25em;
  }
  @media (prefers-reduced-motion: no-preference) {
    .selected-trip .alight-icon {
      animation: alight-wait 0s var(--arrival) backwards;
    }
    .selected-trip .alight-passenger {
      animation: alight-step 260ms ease-out var(--arrival);
    }
  }
  .back {
    display: none;
  }
  .more {
    padding: 10px 0;
    text-decoration: underline;
    min-height: 44px;
  }
.schedule-updated {
  width: fit-content;
  max-width: 100%;
  margin: .75rem 0 0 auto;
  color: #595653;
  font: 400 .8125rem/1.4 SourceSans3, system-ui, sans-serif;
  text-align: right;
}

.schedule-updated::before {
  content: "";
  display: inline-block;
  width: .45em;
  height: .45em;
  margin-right: .4em;
  vertical-align: .12em;
  background: #004225;
}
  .empty {
    padding-block: 12px;
  }
  @media (max-width: 700px) {
    .mainhead {
      margin: 23px 0 14px;
      gap: 5px 12px;
    }
    .controls {
      padding: 12px;
      gap: 8px;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      margin-bottom: 20px;
    }
    .grid {
      display: block;
    }
    .detail {
      display: none;
      border: 0;
      padding: 0;
    }
    &.open .board,
    &.open .controls {
      display: none;
    }
    &.open .detail {
      display: block;
    }
    .back {
      display: block;
      min-height: 44px;
      padding: 0;
      text-decoration: underline;
      margin-bottom: 8px;
    }
    .departure {
      gap: 6px;
      grid-template-columns: 3.8rem 1.9rem 1fr 0.75rem;
    }
    .rows {
      margin-top: 12px;
    }
  }
  .departure[aria-pressed="true"] {
    position: relative;
    box-shadow: none;
  }
  .departure[aria-pressed="true"]::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #ff681f;
    transform-origin: top;
  }
  @media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
    .departure.changed[aria-pressed="true"]::before {
      animation: mark-course 120ms ease-out;
    }
    .detailhead.changed {
      animation: reveal-course 160ms ease-out;
    }
  }
  @media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
    &.open #route {
      animation: open-course 180ms ease-out;
    }
  }
}
@keyframes mark-course {
  from {
    transform: scaleY(0);
  }
}
@keyframes reveal-course {
  from {
    opacity: 0.35;
  }
}
@keyframes open-course {
  from {
    transform: translateX(8px);
  }
}

@keyframes stop-pulse {
  30% {
    transform: scale(1.3);
    background-color: #ff681f;
  }
}

@keyframes alight-step {
  from { transform: translate(-2px, -1px); }
}

@keyframes alight-wait {
  from { color: var(--ink); }
}
.timetable .stop-picker { position: relative; }
.timetable .stop-picker > label { font: inherit; }
.timetable .stop-options {
  position: absolute;
  z-index: 4;
  top: 100%;
  inset-inline: 0;
  max-height: min(30rem, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  padding: 0;
  margin: 0;
  background: white;
  border: 1px solid #8a8680;
}
.timetable .stop-options li { padding: .38rem .625rem; cursor: pointer; }
.timetable .stop-options li:hover,
.timetable .stop-options li[aria-selected="true"] { background: #fff3e9; }
