:root {
  color-scheme: light;
  --forest: #17473d;
  --forest-deep: #10372f;
  --ink: #183d35;
  --muted: #64766f;
  --line: #d9e2dc;
  --paper: #f3f6f2;
  --white: #ffffff;
  --lime: #d7ed79;
  --coral: #c94e31;
  --coral-soft: #fff0e9;
  --teal-soft: #e4f2ee;
  --blue-soft: #e7f1f5;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button {
  font: inherit;
}

.topbar {
  min-height: 76px;
  padding: 12px max(22px, calc((100vw - 1040px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--white);
  background: var(--forest);
  border-bottom: 4px solid var(--lime);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 50%;
  color: var(--lime);
  font: 700 20px Georgia, serif;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  font-weight: 700;
}

.brand small {
  margin-top: 3px;
  color: #b9d0c6;
  font-size: 9px;
  font-weight: 700;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d5e1db;
  font-size: 12px;
}

.connection-light {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #9daa9f;
}

.connection.is-online .connection-light {
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(215, 237, 121, 0.17);
}

.connection.is-offline .connection-light {
  background: #f28a6e;
}

main {
  width: min(100% - 36px, 820px);
  margin: 0 auto;
  padding: 34px 0 56px;
}

.page-heading {
  margin-bottom: 25px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font: 400 34px/1.1 Georgia, "Times New Roman", serif;
}

.heading-period {
  color: var(--coral);
}

.weekday-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 17px;
}

.day-tab {
  min-width: 0;
  min-height: 58px;
  padding: 8px 5px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.day-tab:hover {
  border-color: var(--forest);
}

.day-tab[aria-selected="true"] {
  border-color: var(--forest);
  color: var(--white);
  background: var(--forest);
}

.day-name {
  font-size: 14px;
  font-weight: 800;
}

.day-date {
  min-height: 12px;
  color: var(--muted);
  font-size: 10px;
}

.day-tab[aria-selected="true"] .day-date {
  color: #c9d9d1;
}

.journey {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.journey-heading {
  padding: 21px 22px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.journey-title-group .eyebrow {
  margin-bottom: 5px;
}

h2 {
  margin-bottom: 0;
  font: 400 24px/1.2 Georgia, "Times New Roman", serif;
}

.refresh-button {
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--forest);
  border-radius: 4px;
  color: var(--forest);
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.refresh-button:hover:not(:disabled) {
  color: var(--white);
  background: var(--forest);
}

.refresh-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.refresh-icon {
  font-size: 19px;
  line-height: 1;
}

.refresh-button.is-spinning .refresh-icon {
  animation: turn 700ms ease-in-out infinite;
}

@keyframes turn {
  to { transform: rotate(360deg); }
}

.journey-summary {
  min-height: 76px;
  padding: 15px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f7faf7;
  border-bottom: 1px solid var(--line);
}

.route-name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.summary-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  max-width: 48%;
  padding: 6px 9px;
  border-radius: 3px;
  color: #50645d;
  background: #e8eeea;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.status-pill.is-good {
  color: var(--forest);
  background: var(--teal-soft);
}

.status-pill.is-alert {
  color: #8c301c;
  background: var(--coral-soft);
}

.legs {
  padding: 5px 22px 8px;
}

.leg {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.leg:last-child {
  border-bottom: 0;
}

.leg-top,
.leg-times,
.leg-stations {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.leg-top {
  align-items: center;
  margin-bottom: 10px;
}

.line-label {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 3px;
  color: var(--forest);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 800;
}

.leg-state {
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.leg-state.is-delayed,
.leg-state.is-cancelled {
  color: var(--coral);
}

.leg-state.is-on-time {
  color: var(--forest);
}

.leg-times {
  align-items: baseline;
  color: var(--forest-deep);
  font-variant-numeric: tabular-nums;
}

.leg-time {
  font-size: 24px;
  font-weight: 800;
}

.leg-time:last-child {
  text-align: right;
}

.time-arrow {
  display: none;
}

.leg-stations {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.leg-stations span:last-child {
  text-align: right;
}

.transfer {
  margin: 0 0 0 10px;
  padding: 0 0 0 17px;
  position: relative;
  color: var(--muted);
  font-size: 11px;
  line-height: 22px;
}

.transfer::before {
  width: 7px;
  height: 7px;
  position: absolute;
  top: 7px;
  left: -3px;
  border: 2px solid #8ea59a;
  border-radius: 50%;
  background: var(--white);
  content: "";
}

.holiday-note,
.empty-state {
  margin: 14px 0 0;
  padding: 11px 12px;
  border-left: 3px solid var(--lime);
  color: #4d6059;
  background: #f5f8e9;
  font-size: 12px;
  line-height: 1.5;
}

.empty-state {
  margin: 12px 0;
  border-left-color: #9eb4aa;
  background: var(--blue-soft);
}

.feedback {
  min-height: 0;
  padding: 0 22px;
  color: var(--forest);
  font-size: 11px;
}

.feedback:not(:empty) {
  padding-top: 10px;
}

.journey-footer {
  min-height: 44px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.footer-source {
  text-align: right;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #dc8d41;
  outline-offset: 3px;
}

@media (min-width: 700px) {
  main {
    padding-top: 45px;
  }

  .page-heading {
    margin-bottom: 30px;
  }

  h1 {
    font-size: 40px;
  }

  .leg {
    padding: 18px 0;
  }
}

@media (max-width: 480px) {
  .topbar {
    min-height: 68px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .connection {
    max-width: 132px;
    font-size: 10px;
  }

  main {
    width: min(100% - 24px, 820px);
    padding-top: 27px;
  }

  .weekday-tabs {
    gap: 5px;
  }

  .journey-heading {
    padding: 17px 15px 14px;
  }

  h2 {
    font-size: 21px;
  }

  .refresh-button {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .refresh-button span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .journey-summary {
    padding: 13px 15px;
  }

  .legs {
    padding-right: 15px;
    padding-left: 15px;
  }

  .feedback {
    padding-right: 15px;
    padding-left: 15px;
  }

  .journey-footer {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}