/* The routes' pages (#510): /routes and /routes/<slug>. A route's page borrows the terminal pages' layout and parts
   (terminal.css), with its day from each terminal side by side, and its sailings' stops in order. */

.route-marks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}

.route-marks:empty {
  display: none;
}

.route-title {
  margin-bottom: var(--space-6);
}

.route-map-link {
  margin: 0;
  padding: var(--space-2) var(--space-4) var(--space-3);
}

.route-map-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.route-note {
  margin-bottom: var(--space-5);
  border-color: var(--kelp);
}

.route-note-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-1-display);
}

.route-note .caption {
  margin: var(--space-1) 0 0;
}

.route-today h2 {
  margin-top: 0;
}

/* The way you're going, on a phone: one terminal's day at a time. */
.route-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.route-switch .pill {
  background: var(--paper);
  color: var(--sound);
  font: inherit;
  font-family: var(--display);
  font-weight: 700;
  cursor: pointer;
}

.route-switch .pill[aria-pressed="true"] {
  background: var(--sound);
  color: var(--paper);
}

.route-sides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: var(--space-5);
  align-items: start;
}

.route-side h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--step-2);
}

.route-side h3 a {
  color: var(--evergreen-ink);
}

.route-earlier summary {
  min-height: 36px;
  color: var(--sound);
  font-weight: 600;
  cursor: pointer;
}

/* A sailing's stops in order, as the app's stop line draws them: a dot for each, the water between. */
.route-stops {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}

.route-stops li {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}

.route-stops li::before {
  content: "";
  align-self: center;
  width: 0.6em;
  height: 0.6em;
  border: 2px solid var(--sound);
  border-radius: 50%;
}

.route-stop-name {
  font-weight: 600;
}

.route-stop-time {
  color: var(--ink-2);
}

.route-later-title {
  margin: var(--space-4) 0 var(--space-1);
  color: var(--ink-2);
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-later {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: 0 var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-later li {
  padding-block: var(--space-1);
  border-top: 1px solid color-mix(in srgb, var(--ink-2) 30%, transparent);
}

.route-last {
  margin: var(--space-3) 0 0;
}

/* Under the day (#547): the small map, the boats on the route and WSF's news. */
.route-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: var(--space-5);
  align-items: start;
  margin-top: var(--space-5);
}

.route-body > * {
  min-width: 0;
}

/* ── /routes ───────────────────────────────────────────────────────────── */

.route-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-5);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.route-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.route-card h3 {
  margin: 0;
  font-size: var(--step-1-display);
}

.route-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.route-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.route-card h3 a:hover {
  text-decoration: underline;
}

