/* mauritius-buses.com — one stylesheet, no framework.
   Display face: Barlow Semi Condensed 600 (self-hosted, OFL). Body: the system sans of the phone.
   Line colours come from the data (inline style / --c), everything else is tokens below. */

@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/barlow-semicondensed-600.woff2) format("woff2");
}

:root {
  --ink: #231f20;
  --text: #2b2726;
  --muted: #6b645e;
  --paper: #ffffff;
  --panel: #edf1ef;
  --panel-2: #dde5e2;
  --rule: #dad4ca;
  --line: #bfb7ab;
  --red: #b7161f;
  --red-dark: #92121a;
  --sea: #1b5c97;
  --amber: #9a5200;
  --display: "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%236b645e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3efe9;
    --text: #e4dfd8;
    --muted: #a69e95;
    --paper: #1b1917;
    --panel: #262320;
    --panel-2: #332f2b;
    --rule: #3d3834;
    --line: #5a534d;
    --red: #d2262f;
    --red-dark: #b31e27;
    --sea: #86b8e8;
    --amber: #f0a448;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23a69e95' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  }
}

/* ---- base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 var(--body);
  color: var(--text);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--sea); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: 0;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
b, strong { font-weight: 600; }
small { font-size: .875em; }
.muted { color: var(--muted); }
.attention { color: var(--amber); font-weight: 600; }
.to, .via { font-weight: 600; color: var(--muted); font-size: .85em; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1em; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.8em; }
.prose h4 { margin-top: 1.4em; }
.prose ol, .prose ul { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose ul { list-style: square; }
.nobr { white-space: nowrap; }
.about .warning { color: var(--muted); }
.about .outro { margin-top: 2em; }
.figs { display: flex; gap: 12px; margin: 0 0 1.5em; }
.figs a { flex: 1 1 0; }
.figs img { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 6px; }

/* ---- header / nav ---------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-direction: column; gap: 2px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0 6px;
  text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1;
}
.brand svg { height: 40px; width: auto; flex: none; }
.brand small { display: block; font: 400 .8125rem/1 var(--body); color: var(--muted); margin-top: 5px; }
.site-nav { margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.site-nav::-webkit-scrollbar { display: none; }
@media (max-width: 859px) { .site-nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); } }
.site-nav ul { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; white-space: nowrap; }
.site-nav a {
  display: block; padding: 10px 0 11px;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: .9375rem;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .active a { color: var(--ink); border-bottom-color: var(--red); }
.site-nav li:last-child { padding-right: 16px; }

.site-footer { margin-top: 64px; border-top: 1px solid var(--rule); padding: 20px 0 28px; font-size: .875rem; color: var(--muted); }
.site-footer p { margin: 0; }
.footer-grid { display: grid; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.page-title { margin: 28px 0 16px; }

/* ---- forms ----------------------------------------------------------- */
.field { margin: 0 0 18px; }
.field > label, .field > .label {
  display: block; margin: 0 0 6px;
  font-family: var(--display); font-weight: 600; font-size: 1.125rem; line-height: 1.2; color: var(--ink);
}
select, input:not([type=checkbox]):not([type=radio]), textarea {
  width: 100%; min-height: 48px; margin: 0; padding: 10px 12px;
  font: inherit; color: var(--text); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 6px;
}
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background: var(--paper) var(--chevron) no-repeat right 12px center;
  text-overflow: ellipsis;
}
select:focus, input:focus, textarea:focus { border-color: var(--sea); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sea) 25%, transparent); }
textarea { resize: vertical; line-height: 1.45; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; color: var(--text); cursor: pointer; }
.use_village { margin: -8px 0 20px; }
.seg { display: flex; gap: 8px; }
.seg label {
  flex: 1 1 0; display: flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 8px 12px;
  border: 1.5px solid var(--line); border-radius: 6px; cursor: pointer; font-size: .9375rem;
}
.seg input { margin: 0; }
ul.error_list { list-style: none; margin: 6px 0 0; padding: 0; color: var(--red); font-size: .875rem; font-weight: 600; }
.form-actions { margin-top: 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--display); font-weight: 600; font-size: 1.125rem; line-height: 1.2;
  padding: 12px 22px; border-radius: 6px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; color: var(--ink); background: var(--panel-2);
}
.btn:hover { color: var(--ink); background: var(--rule); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-xl { width: 100%; font-size: 1.5rem; padding: 14px 28px; }
.btn-outline { background: transparent; border-color: var(--ink); }
.btn-outline:hover { background: var(--panel); }
.tool {
  display: inline-block; font: 500 .8125rem/1.2 var(--body);
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--text); text-decoration: none; cursor: pointer;
}
.tool:hover { border-color: var(--ink); color: var(--ink); }

.notice { padding: 14px 16px; border-radius: 8px; background: var(--panel); border-left: 4px solid var(--amber); margin: 0 0 18px; }
.notice-danger { border-left-color: var(--red); }

/* ---- home / airport / contact: form panel + photo -------------------- */
.hero { display: grid; gap: 24px; margin-top: 24px; }
.panel { background: var(--panel); border-radius: 10px; padding: 20px 16px 22px; }
.panel h1, .panel h2 { font-size: 1.75rem; margin-bottom: 18px; }
.hero figure { display: none; margin: 0; }
.hero figure img { width: 100%; height: auto; border-radius: 10px; }
.hero figcaption { font-size: .875rem; color: var(--muted); margin-top: 8px; }
.intro { margin-top: 40px; }
.aside-map { float: right; margin: 0 0 12px 16px; width: 140px; }
.photo-row { display: grid; gap: 20px; margin: 32px 0; align-items: start; }
.photo-row img { width: 100%; border-radius: 10px; }
.photo-row figure { margin: 0; }
.photo-row figcaption { font-size: .875rem; color: var(--muted); margin-top: 8px; }

/* ---- tables ---------------------------------------------------------- */
table.lines { width: 100%; border-collapse: collapse; font-size: .9375rem; margin: 8px 0 24px; }
table.lines th {
  text-align: left; font-family: var(--display); font-weight: 600; font-size: 1.0625rem;
  padding: 8px 10px; border-bottom: 2px solid var(--ink); color: var(--ink);
}
table.lines td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.lines .days { white-space: nowrap; color: var(--muted); }
table.lines a.route-name { color: var(--text); text-decoration: none; }
table.lines a.route-name:hover { color: var(--sea); text-decoration: underline; }
.chip {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 7px 8px 6px; border-radius: 4px; min-width: 2.6em; text-align: center; white-space: nowrap;
  text-decoration: none; border: 1px solid rgba(0,0,0,.12);
}
a.chip:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.chip-lg { font-size: 1.375rem; padding: 9px 12px 8px; }

/* ---- line page ------------------------------------------------------- */
.line-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 20px; align-items: start; margin-top: 24px; }
.line-head > * { grid-column: 1; }
.line-head .line-chip { margin: 0 0 10px; }
.line-head h1 { margin: 0 0 14px; }
.line-head .map { grid-column: 2; grid-row: 1 / span 2; width: 110px; height: auto; }
.line-head .facts { grid-column: 1 / -1; margin-top: 4px; }
.facts { margin: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 6px 14px; align-items: baseline; }
.facts dt { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; color: var(--ink); }
.facts dd { margin: 0; }
.timetable { margin-top: 32px; }
.timetable img { width: 100%; max-width: 595px; height: auto; border: 1px solid var(--rule); border-radius: 4px; }
.timetable h3 { margin: 24px 0 8px; font-family: var(--display); font-weight: 600; }
.timetable ul { margin: 8px 0 16px; padding-left: 20px; color: var(--muted); font-size: .9375rem; }
.table-scroll { overflow-x: auto; max-width: 100%; }
table.timetable-table { border-collapse: collapse; font-size: .9375rem; margin: 8px 0 16px; min-width: 280px; }
table.timetable-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 10px; border-bottom: 2px solid var(--line); }
table.timetable-table td { padding: 6px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }

/* ---- routes ---------------------------------------------------------- */
.routes { margin-top: 24px; }
.routes .alt-heading { margin: 44px 0 4px; font-size: 1.75rem; }
.route { padding: 20px 0 8px; border-top: 1px solid var(--rule); }
.route:first-child { border-top: 0; padding-top: 4px; }
.route-title { font-size: 1.625rem; margin: 0 0 14px; }
.route-title small { display: block; font: 400 .9375rem/1.4 var(--body); color: var(--muted); margin-top: 4px; }
.route-title .to { font-size: .7em; }
.timebar { display: flex; height: 30px; border-radius: 5px; overflow: hidden; background: var(--panel-2); margin: 0 0 14px; }
.tb {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; min-width: 0;
}
.tb-walk { color: var(--text); background: repeating-linear-gradient(135deg, var(--panel-2) 0 4px, var(--paper) 4px 8px); }
.tb-change { background: var(--panel-2); }
.route-grid { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 16px; }
.route-facts { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 4px 12px; align-content: start; font-size: .9375rem; }
.route-facts dt { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; color: var(--ink); }
.route-facts dd { margin: 0; }
.route-facts .wide { grid-column: 1 / -1; }
.route-map { grid-column: 1 / -1; grid-row: 3; width: 160px; height: auto; margin-top: 4px; }

.legs { grid-column: 1 / -1; grid-row: 2; list-style: none; margin: 18px 0 0; padding: 0; }
.leg { position: relative; padding: 0 0 0 36px; }
.leg::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 8px; background: var(--c, var(--line)); }
.leg:first-child::before { top: 14px; }
.leg:last-child::before { bottom: auto; height: calc(100% - 20px); }
.leg-change::before, .leg-walk::before { left: 10px; width: 4px; background: var(--rule); }
.leg-walk::before { width: 0; background: none; border-left: 4px dotted var(--muted); }
.stop { position: relative; font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.2; color: var(--ink); padding: 2px 0 6px; }
.stop::before {
  content: ""; position: absolute; left: -31px; top: .3em; width: 14px; height: 14px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--ink);
}
.stop-end { padding-top: 10px; }
.leg-body { padding: 2px 0 20px; }
.leg-change .leg-body, .leg-walk .leg-body { padding-bottom: 16px; font-size: .9375rem; color: var(--muted); }
.leg-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ride { color: var(--muted); font-size: .9375rem; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.substages { display: none; list-style: none; margin: 10px 0 0; padding: 0; font-size: .875rem; color: var(--muted); }
.substages li { position: relative; padding: 3px 0; }
.substages li::before { content: ""; position: absolute; left: -27px; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--paper); }

.sponsor { display: flex; gap: 16px; align-items: flex-start; background: var(--panel); border-radius: 10px; padding: 16px; margin: 12px 0 0; }
.sponsor a { flex: none; }
.sponsor img { width: 79px; height: 60px; max-width: none; }
.sponsor p { margin: 0; font-size: .9375rem; }
.route-end { margin: 28px 0 0; }
.route-end p { font-size: .9375rem; }

.hero-msg { text-align: center; padding: 64px 0 24px; }
.hero-msg h1 { font-size: 2.25rem; }

/* ---- wider screens --------------------------------------------------- */
@media (min-width: 720px) {
  h1 { font-size: 2.5rem; }
  .wrap { padding: 0 24px; }
  .site-nav { margin: 0; padding: 0; }
  .panel { padding: 28px 28px 30px; }
  .btn-xl { width: auto; }
  .form-actions { text-align: right; }
  .aside-map { width: 195px; }
  .line-head .map { width: 195px; grid-row: 1 / span 3; }
  .line-head .facts { grid-column: 1; }
  .route-facts { grid-column: 1; }
  .route-map { grid-column: 2; grid-row: 1 / span 2; width: 195px; margin-top: 0; }
  .legs { grid-column: 1; }
  .photo-row { grid-template-columns: 457px minmax(0,1fr); }
  .tb { font-size: 1rem; }
  .timebar { height: 34px; }
}
@media (min-width: 860px) {
  .site-header .wrap { flex-direction: row; align-items: stretch; justify-content: space-between; }
  .brand { padding: 16px 0; }
  .site-nav { display: flex; align-items: stretch; }
  .site-nav ul { align-items: stretch; }
  .site-nav li { display: flex; }
  .site-nav a { display: flex; align-items: center; padding: 0; }
  .site-nav li:last-child { padding-right: 0; }
  .hero { grid-template-columns: minmax(0,1fr) 420px; align-items: start; }
  .hero figure { display: block; }
  .hero-wide { grid-template-columns: minmax(0,1fr) 457px; }
}

/* ---- the lines table on phones: chip | route, operator + days below --- */
@media (max-width: 639px) {
  table.lines thead { display: none; }
  table.lines, table.lines tbody { display: block; }
  table.lines tr {
    display: grid; grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "chip route route" "chip meta days";
    column-gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); align-items: start;
  }
  table.lines td { display: block; padding: 0; border: 0; }
  table.lines td.c { grid-area: chip; padding-top: 2px; }
  table.lines td.r { grid-area: route; }
  table.lines td.o { grid-area: meta; font-size: .8125rem; color: var(--muted); }
  table.lines td.days { grid-area: days; font-size: .8125rem; }
  table.lines td.days:empty { display: none; }
  table.airport tr { grid-template-columns: auto minmax(0,1fr); grid-template-areas: none; }
  table.airport td.o, table.airport td.r, table.airport td.dep { grid-area: auto; grid-column: 2; }
  table.airport td.r { grid-row: 1; }
  table.airport td.c { grid-area: auto; grid-column: 1; grid-row: 1 / span 5; }
  table.airport td.o, table.airport td.dep { font-size: .8125rem; color: var(--muted); }
  table.airport td.dep::before { content: attr(data-th) ": "; }
}
@media (min-width: 640px) {
  table.lines td.c { width: 1%; }
  table.airport .dep { white-space: nowrap; }
}
@media print {
  .site-nav, .tools, .sponsor, .site-footer, .btn { display: none !important; }
}

/* ---- stop picker (typeahead over the village-grouped stop list) ------------------- */
.ac { position: relative; }
.ac-input {
  padding-right: 40px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='7.5' cy='7.5' r='5.25' fill='none' stroke='%236b645e' stroke-width='2'/%3E%3Cpath d='M11.5 11.5l4.5 4.5' stroke='%236b645e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: max(16px, 1rem); /* no iOS zoom on focus */
}
.ac-input::placeholder { color: var(--muted); opacity: 1; }
.ac-input:disabled { opacity: .5; }
.ac-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  max-height: min(360px, 55vh); overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 6px 0; list-style: none;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px;
  box-shadow: 0 12px 28px rgba(35, 31, 32, .16);
}
.ac-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 14px; cursor: pointer; line-height: 1.3; }
.ac-list .ac-village { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--rule); font-family: var(--display); font-weight: 600; font-size: 1.0625rem; color: var(--ink); }
.ac-list li:first-child.ac-village { margin-top: 0; border-top: 0; }
.ac-list .ac-in { padding-left: 30px; position: relative; }
.ac-list .ac-in::before { content: ""; position: absolute; left: 16px; top: 0; bottom: 0; width: 2px; background: var(--rule); }
.ac-list .ac-in::after { content: ""; position: absolute; left: 13px; top: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); box-sizing: border-box; }
.ac-meta { flex: none; font: 400 .8125rem var(--body); color: var(--muted); }
.ac-list mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ac-list .ac-active { background: color-mix(in srgb, var(--sea) 12%, var(--paper)); }
.ac-list .ac-active.ac-in::after { border-color: var(--sea); }
.ac-empty, .ac-more { cursor: default !important; color: var(--muted); font-size: .875rem; }
.ac-note { font-size: .875rem; color: var(--muted); margin-top: 6px; min-height: 0; }
.ac-note:empty { display: none; }
@media (hover: hover) { .ac-list li[data-i]:hover { background: color-mix(in srgb, var(--sea) 8%, var(--paper)); } }

/* ---- about page ------------------------------------------------------------------ */
.page-band { margin: 32px 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.eyebrow { margin: 0 0 8px; font: 600 .8125rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.page-band h1 { margin-bottom: 12px; }
.lede { max-width: 60ch; margin: 0; font-size: 1.125rem; line-height: 1.55; color: var(--text); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
@media (max-width: 479px) { .about .nobr { white-space: normal; overflow-wrap: anywhere; } }
.about h3 { margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 1.5rem; }
.about > h3:first-of-type, .about > .callout + p + h3 { margin-top: 1.4em; }
.about h4 { font-size: 1.1875rem; }
.about h3, .about h4 { scroll-margin-top: 16px; }
.callout { margin: 0 0 1.4em; padding: 12px 16px; border-left: 4px solid var(--amber); background: var(--panel); border-radius: 0 6px 6px 0; color: var(--text); }
.callout i { font-style: normal; }
.about-side { display: grid; gap: 16px; align-content: start; }
.side-card { padding: 18px 20px; background: var(--panel); border-radius: 10px; }
.side-card h2 { font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0; color: var(--text); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--red); }
.toc .toc-3 { margin-top: 6px; font-weight: 600; }
.toc .toc-3:first-child { margin-top: 0; }
.toc .toc-4 a { padding-left: 14px; border-left: 2px solid var(--rule); color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 0 0 18px; }
.stats div { margin: 0; }
.stats dt { font: 600 1.5rem/1 var(--display); color: var(--ink); }
.stats dd { margin: 4px 0 0; font-size: .8125rem; color: var(--muted); }
.btn-block { display: flex; width: 100%; justify-content: center; }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; }
  .about-side { position: sticky; top: 24px; }
  .about { max-width: 68ch; }
}

/* ---- homepage: destination board, planner, network map, trips, airport, guide ---------- */
:root { --op-ntc: #1b5c97; --op-ubs: #b7161f; --op-ind: #2e8b57; --op-oth: #e08a00; --led: #ff9f1c; --board: #121314; }
@media (prefers-color-scheme: dark) { :root { --op-ntc: #86b8e8; --op-ubs: #e0454c; --op-ind: #5cbc7a; --op-oth: #f0a448; --board: #0a0b0b; } }
.home-hero { display: grid; gap: 32px; margin-top: 28px; }
.home-title { font-size: clamp(2.1rem, 5.2vw, 3.1rem); line-height: 1.02; letter-spacing: -.01em; max-width: 15ch; text-wrap: balance; margin: 0 0 12px; }
.home-sub { color: var(--muted); max-width: 52ch; margin: 0 0 22px; font-size: 1.0625rem; line-height: 1.5; }
/* no overflow:hidden here: it would clip the stop picker's dropdown */
.planner { border-radius: 12px; background: var(--panel); }
.board { position: relative; background: var(--board); padding: 16px 18px 18px; border-radius: 12px 12px 0 0; }
.board::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--op-ntc) 0 25%, var(--op-ind) 25% 50%, var(--op-oth) 50% 75%, var(--op-ubs) 75%); }
.board-text {
  display: block; font: 600 clamp(1.45rem, 3.8vw, 2rem)/1.1 var(--display); letter-spacing: .07em; text-transform: uppercase;
  color: var(--led); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .8;
  -webkit-mask-image: radial-gradient(circle, #000 0 52%, transparent 60%); -webkit-mask-size: 3px 3px;
  mask-image: radial-gradient(circle, #000 0 52%, transparent 60%); mask-size: 3px 3px;
}
.board.lit .board-text { opacity: 1; }
.board-sub { display: block; margin-top: 4px; font: 600 .9375rem/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--led); opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-sub:empty { display: none; }
@media (prefers-reduced-motion: no-preference) { .board-text { transition: opacity .25s; } }
.planner-body { padding: 20px 18px 22px; }
.planner-body .form-actions { margin-top: 20px; }
.swap-row { display: flex; justify-content: flex-end; margin: -10px 0 -12px; position: relative; z-index: 2; }
.swap { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.swap:hover { border-color: var(--ink); }
.network { margin: 0; }
.network img { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.legend { list-style: none; margin: 14px auto 0; padding: 0; max-width: 420px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .875rem; color: var(--text); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li::before { content: ""; width: 18px; height: 4px; border-radius: 2px; background: var(--c); }
.legend span { color: var(--muted); }
.legend .op-ntc { --c: var(--op-ntc); } .legend .op-ubs { --c: var(--op-ubs); } .legend .op-ind { --c: var(--op-ind); } .legend .op-oth { --c: var(--op-oth); }
.home-trips { margin-top: 52px; }
.home-trips h2, .home-airport h2, .home-guide h2 { font-size: 1.75rem; margin-bottom: 14px; }
.trip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 36px; border-top: 1px solid var(--rule); }
.trip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--rule); color: var(--text); text-decoration: none; }
.trip-ends { font: 600 1.25rem/1.2 var(--display); color: var(--ink); min-width: 0; }
@media (max-width: 359px) { .trip-ends { font-size: 1.0625rem; } }
.trip:hover .trip-ends { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.trip-lines { display: flex; align-items: center; }
.trip-sep { width: 10px; height: 2px; background: var(--line); }
.trip-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.home-airport { margin-top: 52px; padding: 22px 20px 18px; background: var(--panel); border-radius: 12px; }
.home-airport p { max-width: 64ch; }
.airport-lines { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 12px; }
.airport-lines li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; align-items: center; }
.al-to { font: 600 1.1875rem/1.2 var(--display); color: var(--ink); }
.al-times { grid-column: 2; color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.home-guide { margin-top: 56px; display: grid; gap: 28px; }
.guide-text { max-width: 68ch; }
.guide-text h2 { margin-top: 0; }
.guide-photo { margin: 0; }
.guide-photo img { width: 100%; height: auto; border-radius: 10px; }
.guide-photo figcaption { font-size: .875rem; color: var(--muted); margin-top: 8px; }
@media (min-width: 700px) {
  .trip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .airport-lines li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .al-times { grid-column: auto; }
}
@media (min-width: 900px) {
  .home-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 52px; align-items: start; }
  .network { padding-top: 8px; }
  .home-guide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 52px; align-items: start; }
  .guide-photo { position: sticky; top: 24px; }
}

/* airport page: the fixed side of the trip */
.fixed-stop { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border-radius: 6px; border: 1.5px dashed var(--line); color: var(--ink); font-weight: 600; }
.fixed-stop svg { flex: none; color: var(--muted); }
.legend .op-metro { --c: var(--ink); flex-basis: 100%; }
.legend .op-metro::before { height: 5px; box-shadow: 0 0 0 2px var(--paper); }

/* line pages: stop sequence per direction; stop pages */
.line-stops { margin-top: 28px; }
.stop-seqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 28px; }
.stop-seq h3 { margin: 8px 0 6px; font-family: var(--display); font-weight: 600; font-size: 1.0625rem; }
.stop-seq ol { margin: 0; padding-left: 22px; }
.stop-seq li { padding: 2px 0; }
.stop-seq li .muted, .near-stops .muted { font-size: .875rem; }
.near-stops { columns: 2 220px; padding-left: 18px; }
table.stop-lines td { vertical-align: middle; }
.stop-link { color: inherit; text-decoration: none; } .stop-link:hover { text-decoration: underline; }

/* ---- route results: destination board heading, options overview, option sections ----------------- */
.results { margin-top: 24px; }
.results-head { display: grid; gap: 14px; margin-bottom: 4px; }
.results-board { margin: 0; border-radius: 12px; overflow: hidden; font: inherit; color: inherit; }
.results-board .board-text { font-size: clamp(1.7rem, 5vw, 2.6rem); }
.results-board .board-sub { font-size: 1rem; white-space: normal; }
.results-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.results-actions .btn { padding: 8px 14px; font-size: 1rem; }
.results-head .notice { margin: 0; }
.options { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.option { display: grid; gap: 4px; height: 100%; padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 10px; color: var(--text); background: var(--paper); text-decoration: none; }
.option:hover { border-color: var(--ink); }
.options li:first-child .option { border-color: var(--ink); }
.option-label { font-size: .8125rem; color: var(--muted); }
.option-time { font: 600 1.4rem/1.1 var(--display); color: var(--ink); }
.option-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-sm { font-size: .8125rem; padding: 4px 6px 3px; min-width: 2.2em; }
.option-facts { font-size: .8125rem; color: var(--muted); }
.results .route { padding: 26px 0 10px; scroll-margin-top: 12px; }
.results-head + .route { border-top: 0; }
.route-head { display: grid; gap: 2px; margin-bottom: 12px; }
.route-label { margin: 0; font-weight: 600; color: var(--ink); }
.route-label .muted { font-weight: 400; margin-left: 6px; }
.route-time { margin: 0; font-size: clamp(1.9rem, 4.5vw, 2.5rem); }
.route-head .route-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; grid-column: auto; margin: 4px 0 0; font-size: .9375rem; }
.route-head .attention { margin: 6px 0 0; }
.results .route-grid { grid-template-columns: minmax(0, 1fr); gap: 4px 32px; }
.results .legs { grid-column: auto; grid-row: auto; margin: 10px 0 0; }
.results .route-grid .route-map { grid-column: auto; grid-row: auto; width: 100%; max-width: 300px; height: auto; margin: 6px 0 0; }
.leg-line .chip { text-decoration: none; }
.results .alt-heading { margin: 40px 0 0; font-size: 1.5rem; }
@media (min-width: 760px) {
  .results .route-grid { grid-template-columns: minmax(0, 1fr) 250px; align-items: start; }
  .results .route-grid .route-map { width: 250px; max-width: none; margin-top: 10px; position: sticky; top: 16px; }
}

/* ---- all lines: search, operator filter, rows ------------------------------------------------------ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lines-intro { color: var(--muted); max-width: 60ch; margin: -6px 0 18px; }
.lines-tools { display: grid; gap: 12px; padding: 16px; margin: 0 0 18px; background: var(--panel); border-radius: 12px; }
.lines-tools input { font-size: max(16px, 1rem); }
.lines-ops { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.op-filter { flex: none; }
.op-filter { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--text); font: inherit; font-size: .9375rem; cursor: pointer; }
.op-filter span { color: var(--muted); font-size: .8125rem; }
.op-filter::before { content: ""; width: 14px; height: 4px; border-radius: 2px; background: var(--c, var(--ink)); }
.op-filter[data-op=""]::before { display: none; }
.op-filter.op-ntc { --c: var(--op-ntc); } .op-filter.op-ubs { --c: var(--op-ubs); } .op-filter.op-ind { --c: var(--op-ind); } .op-filter.op-oth { --c: var(--op-oth); }
.op-filter[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.op-filter[aria-pressed="true"] span { color: inherit; opacity: .75; }
.lines-count { margin: 0; font-size: .875rem; color: var(--muted); }
.line-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.lr a { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--rule); color: var(--text); text-decoration: none; }
.lr a:hover .lr-route { text-decoration: underline; text-underline-offset: 3px; }
.lr-chip { justify-self: start; }
.lr-route { font: 600 1.125rem/1.25 var(--display); color: var(--ink); min-width: 0; }
.lr-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .875rem; color: var(--muted); }
.lr-op { display: inline-flex; align-items: center; gap: 6px; }
.lr-op::before { content: ""; width: 10px; height: 4px; border-radius: 2px; background: var(--c); }
.lr-op.op-ntc { --c: var(--op-ntc); } .lr-op.op-ubs { --c: var(--op-ubs); } .lr-op.op-ind { --c: var(--op-ind); } .lr-op.op-oth { --c: var(--op-oth); }
@media (min-width: 860px) {
  .lines-tools { position: sticky; top: 0; z-index: 5; }
  .lines-ops { flex-wrap: wrap; overflow: visible; }
  .lr a { grid-template-columns: 3.4em minmax(0, 1fr) minmax(0, 18em); }
  .lr-meta { grid-column: 3; justify-content: flex-end; text-align: right; }
}

/* ---- 404: NOT IN SERVICE ------------------------------------------------------------------------- */
.nis { max-width: 560px; margin: 48px auto 0; }
.nis-board { border-radius: 12px; overflow: hidden; margin-bottom: 26px; }
.nis-board .board-text { font-size: clamp(1.6rem, 6vw, 2.4rem); }
.nis h1 { font-size: 2rem; }
.nis-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* header between the phone layout and wide screens: keep logo and menu on one row without clipping */
@media (min-width: 860px) and (max-width: 1079px) {
  .brand { flex: none; white-space: nowrap; }
  .site-nav ul { gap: 12px; }
  .site-nav a { font-size: .875rem; }
}

/* ---- places by bus ------------------------------------------------------------------------------- */
.places-intro { color: var(--muted); max-width: 64ch; margin: -6px 0 18px; }
.hub-picker { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 12px 14px; margin: 0 0 8px; background: var(--panel); border-radius: 12px; scrollbar-width: none; }
.hub-label { flex: none; font-weight: 600; color: var(--ink); margin-right: 4px; }
.hub { flex: none; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--text); text-decoration: none; font-size: .9375rem; }
.hub[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hub-title { font-size: 1.75rem; margin: 26px 0 0; }
.places-page .kind { font-size: 1.25rem; margin: 22px 0 10px; }
.places-foot { margin-top: 26px; }
.places { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.place { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--paper); }
.place h3 { margin: 0; font-size: 1.25rem; }
.place-note { margin: 0; font-size: .9375rem; color: var(--text); flex: 1; }
.place-trip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--text); text-decoration: none; }
a.place-trip:hover .place-time { text-decoration: underline; text-underline-offset: 3px; }
.place-time { font: 600 1.375rem/1.1 var(--display); color: var(--ink); }
.place-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.place-facts { grid-column: 1 / -1; font-size: .8125rem; color: var(--muted); }
.trips-more { margin: 14px 0 0; }
.updates td { vertical-align: middle; }
.timetable p, .timetable li { overflow-wrap: anywhere; }

/* results: why the recommended option, when another one is shorter on paper */
.route-why { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--ink); background: var(--panel); border-radius: 0 8px 8px 0; font-size: .9375rem; max-width: 60ch; }
