/* truvel. — mobile first, light and dark. Colours from the holding page. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --ink: #0f172a;
  --muted: #475569;
  --bg: #f8fafc;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: #dbeafe;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --good: #15803d;
  --good-soft: #dcfce7;
  --warn: #854d0e;
  --warn-soft: #fef3c7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  /* One colour per mode, used when an operator publishes no line colour.
     Always shown alongside text, never as the only signal. */
  --mode-walk: #64748b;
  --mode-bus: #dc2626;
  --mode-coach: #c2410c;
  --mode-rail: #7c3aed;
  --mode-tram: #047857;
  --mode-subway: #4338ca;
  --mode-ferry: #0e7490;
  --mode-cycle: #4d7c0f;
  --chip-ink: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 1px 3px rgb(15 23 42 / 8%);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --bg: #0b1220;
    --accent: #60a5fa;
    --accent-ink: #0b1220;
    --accent-soft: #172554;
    --surface: #111a2e;
    --surface-2: #16213a;
    --border: #1e293b;
    --border-strong: #334155;
    --good: #4ade80;
    --good-soft: #052e16;
    --warn: #fbbf24;
    --warn-soft: #3a2a06;
    --bad: #f87171;
    --bad-soft: #3b0d0d;
    --mode-walk: #94a3b8;
    --mode-bus: #f87171;
    --mode-coach: #fb923c;
    --mode-rail: #a78bfa;
    --mode-tram: #34d399;
    --mode-subway: #818cf8;
    --mode-ferry: #22d3ee;
    --mode-cycle: #a3e635;
    --chip-ink: #0b1220;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 1.6em 0 0.5em;
}
h1 { font-size: 1.75rem; letter-spacing: -0.025em; margin-top: 1.2em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p, ul, ol, dl, table { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: 8px;
  top: 8px;
  transform: translateY(-200%);
  padding: 8px 12px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip:focus { transform: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: 56px;
}
.wordmark {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.wordmark span { color: var(--accent); }

.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }

/* Sign in / Account: beside the wordmark on phones, after the menu on wider screens. */
.header-account {
  order: 2;
  margin-left: auto;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.header-account:hover,
.header-account[aria-current="page"] { background: var(--surface-2); }
.site-header .site-nav { order: 3; flex-basis: 100%; }
@media (min-width: 640px) {
  .site-header .site-nav { order: 1; flex-basis: auto; margin-left: auto; }
  .header-account { margin-left: 0; }
}

/* Main */

main { flex: 1; padding-bottom: 48px; }

.lead {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.hero { padding: 24px 0 8px; }
.hero h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  margin: 0.4em 0 0.4em;
  letter-spacing: -0.03em;
}

.dots {
  list-style: none;
  padding: 0;
  color: var(--muted);
}
.dots li { padding: 6px 0 6px 22px; position: relative; }
.dots li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.notice {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
}
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); }

/* Prose pages */

.prose { max-width: 40rem; }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: 0.35em; }
.prose dt { font-weight: 650; margin-top: 0.9em; }
.prose dd { margin: 0.2em 0 0; color: var(--muted); }

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
th { font-weight: 650; }

/* Buttons and fields */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-small { min-height: 40px; padding: 8px 12px; font-size: 0.9rem; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn .icon { width: 18px; height: 18px; }

/* Icons */

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
  fill: none;
  stroke: currentColor;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.6; cursor: progress; }
.icon-btn .icon { width: 22px; height: 22px; }

/* Planner form */

.tagline {
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0.9em 0 0.6em;
  color: var(--accent);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
input::placeholder { color: var(--muted); opacity: 0.8; }

.search {
  display: grid;
  gap: 14px;
  position: relative;
  margin-top: 16px;
}
.search.collapsed { display: none; }

.place-field { position: relative; }
.place-field > label,
.opt-field > label {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.place-row { display: flex; gap: 8px; }
.field-note {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--warn);
}

.listbox {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  max-height: min(60vh, 22rem);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgb(15 23 42 / 18%);
}
.option {
  display: flex;
  flex-direction: column;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.option:hover,
.option[aria-selected="true"] { background: var(--surface-2); }
.option-name { font-weight: 600; }
.option-detail { font-size: 0.85rem; color: var(--muted); }
.kind {
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kind-saved { color: var(--accent); }
.listbox-empty { padding: 10px; color: var(--muted); font-size: 0.9rem; }

.when-row { display: grid; gap: 8px; grid-template-columns: 1fr; }
.when-row:has(option[value="now"]:checked) input { display: none; }

.options summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--accent);
  padding: 4px 0;
}
.option-grid { display: grid; gap: 12px; margin-top: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.check .muted { display: block; }

.search-btn { width: 100%; min-height: 52px; font-size: 1.05rem; }

/* Travel by: one toggle per way of travelling. */
.travel { border: 0; padding: 0; margin: 0; min-width: 0; }
.travel legend { font-weight: 650; font-size: 0.9rem; padding: 0; margin-bottom: 6px; }
.travel p { margin: 6px 0 0; }
.travel-options { display: flex; flex-wrap: wrap; gap: 8px; }
.travel-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}
.travel-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.travel-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.travel-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (min-width: 560px) {
  .when-row { grid-template-columns: 11rem 1fr; }
  .option-grid { grid-template-columns: 1fr 1fr; }
  .check { grid-column: 1 / -1; }
  .travel { grid-column: 1 / -1; }
}

/* Summary of the search shown */

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.summary-route {
  font-size: 1.15rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.summary-route .arrow { color: var(--muted); font-weight: 500; }
.summary p { margin: 2px 0 0; }
.summary .change { flex: none; }

/* Results */

.results { margin-top: 12px; }
.status { min-height: 1.5em; margin: 8px 0; color: var(--muted); font-size: 0.95rem; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
.toolbar .count { margin: 0; color: var(--muted); font-size: 0.95rem; white-space: nowrap; }
.sort {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort label { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.sort select { width: auto; max-width: 13rem; min-height: 40px; padding: 6px 10px; font-size: 0.95rem; }

.journeys { list-style: none; padding: 0; margin: 0; }
.journey { margin: 0 0 12px; }

.journey-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.journey-top p { margin: 0; }
.journey-times {
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.journey-times .dash { color: var(--muted); font-weight: 500; }
.journey-duration { color: var(--muted); font-size: 0.95rem; }
.journey-fare { text-align: right; }
.fare-main { font-size: 1.15rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.journey-fare.muted .fare-main { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.fare-note { font-size: 0.8rem; color: var(--muted); max-width: 9rem; }

.legs-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 12px 0 8px;
}
.legs-strip li { display: inline-flex; align-items: center; }
.legs-strip li + li::before {
  content: "›";
  color: var(--muted);
  margin-right: 6px;
  font-weight: 400;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--chip-ink);
  background: var(--mode-bus);
}
.chip-rail { background: var(--mode-rail); }
.chip-tram { background: var(--mode-tram); }
.chip-subway { background: var(--mode-subway); }
.chip-coach { background: var(--mode-coach); }
.chip-ferry { background: var(--mode-ferry); }
.chip-walk {
  background: transparent;
  color: var(--muted);
  padding: 3px 0;
  font-weight: 500;
}

.live {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 4px 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--good);
}
.live.warn { color: var(--warn); }
.live.bad { color: var(--bad); }

.facts {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 4px;
  font-size: 0.925rem;
  color: var(--muted);
}
.fact { display: flex; gap: 8px; align-items: flex-start; }
.fact .icon { margin-top: 0.15em; }
.fact.good { color: var(--muted); }
.fact.warn { color: var(--warn); font-weight: 600; }
.fact.bad { color: var(--bad); font-weight: 650; }
.icon.leaf { color: var(--good); }

/* "Did you know?" under a journey: what it saves against driving. */
.carbon-saving {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 12px 0;
  background: var(--good-soft);
  border-color: transparent;
}
.carbon-saving > .icon { width: 28px; height: 28px; flex: none; }
.carbon-saving h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--good); }
.carbon-saving p { margin: 0; }

/* Walking and cycling the whole way, above the journeys. */
.other-ways {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 10px;
}
.other-way { position: relative; height: 100%; padding: 12px 14px; }
.other-way:hover { border-color: var(--border-strong); }
.other-way p { margin: 0; }
.other-way-mode { display: flex; align-items: center; gap: 6px; font-weight: 650; }
.other-way-mode .icon { color: var(--mode-walk); }
.other-way.cycle .other-way-mode .icon { color: var(--mode-cycle); }
.other-way-time { font-size: 1.2rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.other-way-facts { font-size: 0.875rem; color: var(--muted); }

.later { width: 100%; margin: 4px 0 8px; }
.attribution { font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; }

/* Board pages */

.board-heading { margin-bottom: 0.2em; }
.board-sub { margin: 0 0 12px; font-size: 0.95rem; }
.tabs {
  display: flex;
  gap: 4px;
  margin: 12px 0;
  border-bottom: 1px solid var(--border);
}
.tabs a {
  padding: 10px 14px;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.board-list { margin-bottom: 8px; }
.departure-item { border-top: 1px solid var(--border); }
.departure-item:last-child { border-bottom: 1px solid var(--border); }
.departure-item .departure { border-top: 0; }
summary.departure {
  cursor: pointer;
  list-style: none;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
}
summary.departure::-webkit-details-marker { display: none; }
summary.departure:hover { background: var(--surface-2); }
.departure-details[open] summary.departure { background: var(--surface-2); }
.dep-reason { font-size: 0.85rem; color: var(--warn); }
.calls { padding: 4px 4px 12px 5.2rem; font-size: 0.9rem; }
.call-list { list-style: none; padding: 0; margin: 4px 0 0; }
.call-list li { padding: 2px 0; }
.board-updated { margin-top: 8px; }
.punctuality-table { margin-top: 24px; }
.punctuality-table h2 { font-size: 1.15rem; }
.punctuality-table td,
.punctuality-table th { font-variant-numeric: tabular-nums; }

.boards-search { grid-template-columns: 1fr; }
.link-list { list-style: none; padding: 0; margin: 0 0 16px; }
.link-list a {
  display: flex;
  flex-direction: column;
  padding: 10px 4px;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
}
.link-list a:hover { background: var(--surface-2); }
.link-name { font-weight: 600; color: var(--accent); }
.link-detail { font-size: 0.875rem; color: var(--muted); }
.tl-board { text-decoration: none; color: inherit; }
.tl-board:hover strong { text-decoration: underline; }

/* Rail fares */

.fares-form .option-grid { margin-top: 0; }
.cheapest {
  list-style: none;
  padding: 0;
  margin: 12px 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 8px;
}
.cheapest .card { padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.cheapest-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.cheapest-price { font-size: 1.3rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.from { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.fare-group h3 { margin-top: 1.4em; }
.fare-list { list-style: none; padding: 0; margin: 0; }
.fare-row { border-top: 1px solid var(--border); padding: 10px 0; }
.fare-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.fare-name { font-weight: 650; }
.fare-price { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fare-meta { margin: 4px 0 0; font-size: 0.875rem; color: var(--muted); }
.raw { font-size: 0.8rem; letter-spacing: 0.01em; }
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--ink);
  vertical-align: 2px;
}
.fares-link { font-weight: 600; }

/* Opening a journey from its card */

.journey { position: relative; }
.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}
.journey:hover { border-color: var(--border-strong); }

/* Journey detail */

.detail { margin-top: 12px; }
.back-link {
  display: inline-block;
  margin: 4px 0 10px;
  font-weight: 600;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }
.detail-head { margin-bottom: 12px; }
.detail-times {
  margin: 0;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.map {
  height: 42vh;
  min-height: 240px;
  max-height: 440px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 16px;
}
.map-key {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 0;
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.map-key li { display: flex; align-items: center; gap: 6px; }
.key-line { width: 22px; height: 5px; border-radius: 3px; }
.key-line.walk { height: 0; border-top: 3px dotted; border-radius: 0; }
.key-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.key-pin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.key-pin.start, .map-pin.start { background: #16a34a; }
.key-pin.end, .map-pin.end { background: var(--ink); }
.map-pin {
  position: relative;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
  margin-bottom: 6px;
}
.map-pin.end { color: var(--surface); }
.map-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  margin-left: -5px;
  border: 5px solid transparent;
  border-bottom: 0;
}
.map-pin.start::after { border-top-color: #16a34a; }
.map-pin.end::after { border-top-color: var(--ink); }

.map-failed {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--muted);
  height: auto;
  min-height: 0;
}

.timeline { list-style: none; padding: 0; margin: 0 0 16px; }
.tl-item {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 10px;
  position: relative;
}
.tl-time {
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-top: 2px;
}
.tl-time s,
.tl-alight-time s { display: block; font-size: 0.8rem; }
.tl-body {
  border-left: 4px solid var(--border-strong);
  padding: 0 0 16px 14px;
  min-width: 0;
}
.tl-body p { margin: 0 0 6px; }
.tl-walk .tl-body { border-left-style: dotted; border-left-color: var(--mode-walk); }
.tl-ride .tl-body { border-left-color: var(--mode-bus); }
.tl-rail .tl-body { border-left-color: var(--mode-rail); }
.tl-tram .tl-body { border-left-color: var(--mode-tram); }
.tl-subway .tl-body { border-left-color: var(--mode-subway); }
.tl-coach .tl-body { border-left-color: var(--mode-coach); }
.tl-ferry .tl-body { border-left-color: var(--mode-ferry); }
.tl-cycle .tl-body { border-left-color: var(--mode-cycle); }
.tl-change .tl-body,
.tl-end .tl-body { border-left-color: transparent; }
.tl-title { font-weight: 600; }
.tl-title .chip { margin-right: 4px; }
.tl-note { color: var(--muted); font-size: 0.9rem; }
.tl-warn { color: var(--warn); font-weight: 600; font-size: 0.9rem; }
.tl-stop { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tl-platform { font-weight: 650; color: var(--accent); font-size: 0.9rem; }
.tl-reason { color: var(--warn); font-size: 0.9rem; }
.tl-fare,
.tl-punctuality {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.9rem;
}
.tl-fare .icon,
.tl-punctuality .icon { margin-top: 0.15em; }
.coverage { display: block; font-size: 0.8rem; margin-top: 2px; }
.tl-alight { color: var(--ink); margin-top: 6px; }
.tl-alight-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-change { margin: -4px 0 4px; }
.tl-change .tl-title { font-weight: 600; font-size: 0.925rem; color: var(--muted); }
.tl-change.warn .tl-title { color: var(--warn); }
.tl-change.bad .tl-title { color: var(--bad); }
.tl-end .tl-title { font-weight: 700; }

.tl-stops { margin: 4px 0 8px; font-size: 0.9rem; }
.tl-stops summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.tl-stops ol { list-style: none; padding: 6px 0 0; margin: 0; }
.tl-stops li { padding: 3px 0; }
.stop-time { display: inline-block; min-width: 3.2rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.bad { color: var(--bad); }

.tickets { margin: 4px 0 8px; min-height: 40px; padding: 8px 14px; }

.detail-disruptions { margin: 8px 0 16px; }
.detail-disruptions h2 { font-size: 1.15rem; margin: 0 0 6px; }
.disruptions { list-style: none; padding: 0; margin: 0; }
.disruption {
  border-left: 4px solid var(--warn);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 0.925rem;
}
.disruption.bad { border-left-color: var(--bad); }
.disruption p { margin: 0 0 6px; }
.disruption-title { font-weight: 650; }
.disruption-more summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.875rem; }
.disruption-more[open] summary { margin-bottom: 6px; }
.nearby-disruptions summary { cursor: pointer; color: var(--accent); font-weight: 600; margin: 8px 0; }

/* Reachability */

.reach-map { height: 55vh; max-height: 560px; margin-top: 8px; }
.legend { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 6px; }
.legend li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: none;
  border: 1px solid var(--border-strong);
}
.map-popup { display: grid; gap: 8px; padding: 4px 0 0; }
.map-popup .btn { min-height: 40px; padding: 8px 12px; font-size: 0.9rem; }

/* MapLibre's controls in Truvel's colours */
.maplibregl-ctrl-attrib { font-size: 11px; }
.maplibregl-popup-content {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgb(15 23 42 / 25%);
  font: inherit;
}
.maplibregl-popup-close-button { color: var(--muted); font-size: 18px; padding: 0 6px; }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--surface); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }
@media (prefers-color-scheme: dark) {
  .maplibregl-ctrl-attrib { background: rgb(11 18 32 / 80%) !important; color: var(--muted); }
  .maplibregl-ctrl-attrib a { color: var(--ink) !important; }
}

/* Skeleton cards while a search runs */

.skeleton .bar {
  height: 14px;
  margin: 10px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton .bar-wide { height: 24px; width: 55%; margin-top: 2px; }
.skeleton .bar-chips { height: 22px; width: 75%; }
.skeleton .bar-short { width: 40%; }
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

/* Departures (filling the wait) */

.nearby { margin: 4px 0 16px; }
.board-title { font-size: 1.05rem; margin: 0 0 2px; }
.board-card .muted.small { margin: 0 0 8px; }
.departures { list-style: none; padding: 0; margin: 0; }
.departure {
  display: grid;
  grid-template-columns: 4.6rem 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.dep-time { font-variant-numeric: tabular-nums; }
.dep-time s { font-size: 0.85em; }
.dep-main { display: flex; flex-direction: column; min-width: 0; }
.dep-dest { font-weight: 600; overflow-wrap: anywhere; }
.dep-meta { font-size: 0.85rem; color: var(--muted); }
.dep-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 650;
  white-space: nowrap;
}
.dep-status.good { color: var(--good); }
.dep-status.warn { color: var(--warn); }
.dep-status.bad { color: var(--bad); }
.dep-status.muted { color: var(--muted); font-weight: 500; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 14px 0 20px;
}
.site-footer p { margin: 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.lang-switch ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
}
.lang-switch a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }

/* "Use Truvel in Nederlands": the browser's language, offered once at the top. */
.lang-offer {
  margin: 0;
  padding: 8px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  text-align: center;
}

@media (min-width: 640px) {
  h1 { font-size: 2rem; }
}

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

/* Accounts and alerts */

.account-page section { margin-top: 28px; }
.account-form { display: grid; gap: 10px; margin: 16px 0; }
.account-form label { font-weight: 650; }
.account-form .muted { margin: 0; }
.account-form .notice { margin: 0; }
.form-field { display: grid; gap: 4px; }
.form-field > .muted { margin: 0; }
.form-field .field-note { margin: 0; }
.show-password { display: flex; gap: 8px; align-items: center; font-weight: 400 !important; font-size: 0.9rem; color: var(--muted); }
.show-password[hidden] { display: none; }
.show-password input { width: 18px; height: 18px; margin: 0; }
details.account-change { margin: 12px 0; }
details.account-change summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.account-signout { margin: 16px 0; }
.notice.warn form { margin: 8px 0 0; }
.notice.warn p { margin: 0; }
.alert-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.alert-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.alert-row p { margin: 0; }
.notify-card { margin-bottom: 12px; }
.notify-card h3 { margin: 0 0 6px; font-size: 1rem; }
.notify-card p:last-child { margin-bottom: 0; }
.notify-actions { display: flex; gap: 8px; flex-wrap: wrap; }
details.danger { margin-top: 20px; }
details.danger summary { cursor: pointer; color: var(--bad); font-weight: 600; }

.alert-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 4px;
}
.alert-control .alert-note { margin: 0; flex-basis: 100%; }
.alert-control .alert-note .icon { width: 16px; height: 16px; vertical-align: -3px; }
.alert-minutes { display: flex; flex-wrap: wrap; gap: 8px; }
.departure-details > .alert-control { margin: 0; padding: 12px 4px 4px 5.2rem; }

/* Alerts for a journey */

.journey-alerts { margin: 16px 0; padding: 0; }
.journey-alerts > summary {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 650;
}
.journey-alerts-body { padding: 0 16px 16px; display: grid; gap: 10px; }
.journey-alerts-body p { margin: 0; }
.check-list { display: grid; gap: 8px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.repeat-row { display: flex; gap: 10px; align-items: center; }
.repeat-row select { flex: 1; }
.journey-share { display: grid; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.share-out { display: flex; gap: 8px; }
.share-out input { flex: 1; min-width: 0; }
.watch-disruptions { margin: 16px 0; }

/* A shared journey */

.share-legs { list-style: none; padding: 0; display: grid; gap: 10px; }
.share-legs .card { padding: 12px 16px; }
.share-legs p { margin: 0; }

/* Account: which kinds of alert to send */
.alert-types { display: grid; gap: 12px; }
.alert-type-group { display: grid; gap: 12px; margin: 0; padding: 12px 16px 16px; border: 1px solid var(--border); }
.alert-type-group legend { padding: 0 6px; font-weight: 700; }
.alert-type-group .check-row strong { font-weight: 650; }
.alert-types > p { margin: 0; }
.alert-types .btn { justify-self: start; }

/* Home page: Home and Work, Near you, and shortcuts */

.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.shortcut:hover { background: var(--surface-2); }
.shortcut .icon { width: 22px; height: 22px; flex: none; color: var(--accent); }
.shortcut-add { border-style: dashed; }
.shortcut-plus { width: 22px; flex: none; text-align: center; color: var(--accent); font-size: 1.4rem; font-weight: 600; line-height: 1; }
.shortcut-text { display: flex; flex-direction: column; min-width: 0; }
.shortcut-name { font-weight: 650; }
.shortcut-detail {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shortcut-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; }
.link-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.saved-editor { display: grid; gap: 14px; margin-top: 16px; }
.saved-editor[hidden] { display: none; }
.saved-editor .board-title, .saved-editor p { margin: 0; }
.editor-actions { display: flex; gap: 8px; }

.home { display: grid; gap: 16px; margin-top: 16px; }
.home[hidden] { display: none; }
.home .board-title { margin-top: 0; }
.near-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.near-head p { margin: 0; }
.near [data-near-body] > p { margin: 4px 0 12px; }
.near-map { height: 280px; min-height: 0; margin: 8px 0 4px; }
.near .map-key { margin: 0 0 8px; }
.near-board { margin-top: 16px; }
.near-board-title { font-size: 1rem; margin: 0; }
.near-board-title a { color: var(--ink); }
.near-board > .muted.small { margin: 0 0 4px; }
.near-off { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 12px 0 0; }
.near-quiet { margin: 16px 0 0; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  text-decoration: none;
}
.tile:hover { background: var(--surface-2); }
.tile .icon { width: 26px; height: 26px; color: var(--accent); margin-bottom: 6px; }
.tile-name { font-weight: 650; }
.tile-detail { font-size: 0.85rem; color: var(--muted); }
.tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.why .dots { margin: 0; }

/* Disruptions near a place */

.disruptions-page .search { margin-bottom: 12px; }
.disruptions-page .status .link-btn { font-size: inherit; padding: 0; }

/* Saved places: Home, Work and favourites */

.saved-editor-form { display: grid; gap: 14px; }
.saved-editor-form .board-title, .saved-editor-form p { margin: 0; }
.saved-list { display: grid; gap: 14px; }
.saved-favourite {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.saved-remove { justify-self: start; color: var(--bad); }
.go-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.go-buttons[hidden] { display: none; }
.go-buttons .btn { display: inline-flex; align-items: center; gap: 8px; }
.go-buttons .icon { width: 18px; height: 18px; }

/* How it works */

.how-page { display: grid; gap: 16px; }
.how-page h1, .how-page .lead { margin: 0; }
.how-contents { display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 600; }
.how-section { display: grid; gap: 12px; }
.how-section p { margin: 0; }
.how-video {
  width: 100%;
  max-width: 260px;
  height: auto;
  justify-self: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.how-shots {
  list-style: none;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0 0 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.how-shots li { flex: 0 0 160px; scroll-snap-align: start; }
.how-shots figure { margin: 0; }
.how-shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.how-shots figcaption { margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.how-step {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

/* The usage report at /account/stats. */
.stats-range { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.stats-range a { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; text-decoration: none; color: var(--ink); }
.stats-range a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stats-totals { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stats-totals li { color: var(--muted); }
.stats-number { display: block; font-size: 1.8rem; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats-table td, .stats-table th { padding: 6px 8px; }
.stats-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table th[scope="row"] { font-weight: 500; white-space: nowrap; }
.stats-bar { display: block; width: 100%; height: 6px; margin: 4px 0 2px; border-radius: 3px; }
.stats-bar-track { fill: var(--surface-2); }
.stats-bar-fill { fill: var(--accent); }
.stats-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 24px; }
.stats-lists h2 { font-size: 1.05rem; margin: 0 0 4px; }
.stats-journeys { display: grid; gap: 8px; }
.stats-journeys summary { cursor: pointer; font-weight: 600; }
.stats-journeys summary .muted { font-weight: 400; }
.stats-journeys table { width: 100%; margin-top: 6px; }
