:root {
  color-scheme: light;
  --ink: #10253d;
  --muted: #5a6b7c;
  --paper: #f5f7f8;
  --panel: rgba(255, 255, 255, 0.94);
  --border: rgba(16, 37, 61, 0.14);
  --network: #2577b9;
  --selected: #e3522c;
  --accent: #e72738;
  --shadow: 0 12px 34px rgba(16, 37, 61, 0.16);
}

* { box-sizing: border-box; }

html { min-width: 20rem; }
html, body { margin: 0; min-height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.loading-active { overflow: hidden; }

.site-loader {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 1rem;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 119, 185, .18), transparent 32rem),
    linear-gradient(145deg, #050b14 0%, #0a1625 52%, #07101c 100%);
  color: #fff;
  opacity: 1;
  visibility: visible;
  transition: opacity .55s ease, visibility .55s ease;
}

.site-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .22) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(37, 119, 185, .35) 0 1px, transparent 1.5px);
  background-position: 0 0, 37px 43px;
  background-size: 86px 86px, 113px 113px;
  opacity: .32;
}

.site-loader.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }

.loading-shell {
  position: relative;
  width: min(44rem, 100%);
  text-align: center;
}

.loading-kicker {
  margin: 0 0 .5rem;
  color: #ffcf3f;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .18em;
}

.loading-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 5vw, 3.25rem);
  letter-spacing: -.04em;
}

.loading-title-odia {
  margin: .35rem 0 0;
  color: #a9d8ff;
  font-size: clamp(1.05rem, 2.7vw, 1.5rem);
  font-weight: 750;
}

.bus-route-animation {
  position: relative;
  height: 10rem;
  margin: 1.5rem 0 .65rem;
  overflow: hidden;
}

.bus-route-animation::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2.15rem;
  left: 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(169, 216, 255, .28) 0 22px, transparent 22px 36px);
  box-shadow: 0 0 18px rgba(37, 119, 185, .38);
}

.route-stop {
  position: absolute;
  z-index: 1;
  bottom: 1.72rem;
  width: .95rem;
  height: .95rem;
  border: 3px solid #07101c;
  border-radius: 50%;
  background: #ffcf3f;
  box-shadow: 0 0 0 3px rgba(255, 207, 63, .2), 0 0 18px rgba(255, 207, 63, .55);
}
.route-stop-start { left: 4%; }
.route-stop-end { right: 4%; }

.animated-bus {
  position: absolute;
  z-index: 2;
  bottom: 1.5rem;
  left: -8rem;
  width: 7.5rem;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .4));
  animation: bus-travel 2.7s linear infinite;
}

.animated-bus svg { display: block; width: 100%; overflow: visible; animation: bus-bob .28s ease-in-out infinite alternate; }
.bus-shadow { fill: rgba(0, 0, 0, .35); }
.bus-body { fill: url(#bus-body-gradient); stroke: #70e5a7; stroke-width: 2; }
.bus-accent { fill: #ffcf3f; }
.bus-bumper { fill: #eef7ff; }
.bus-window { fill: #bfe4ff; stroke: #eaf7ff; stroke-width: 1.5; }
.bus-door { fill: #8bc7ee; stroke: #eaf7ff; stroke-width: 1.5; }
.bus-light { fill: #fff3a3; }
.bus-name { fill: #07101c; font: 800 11px ui-sans-serif, system-ui, sans-serif; letter-spacing: 1px; }
.wheel { transform-box: fill-box; transform-origin: center; animation: wheel-turn .55s linear infinite; }
.wheel circle:first-child { fill: #07101c; stroke: #dcecff; stroke-width: 2; }
.wheel circle:nth-child(2) { fill: #dcecff; }
.wheel path { fill: none; stroke: #dcecff; stroke-width: 1.5; }

.loading-message { margin: 0; color: #dcecff; font-size: .9rem; font-weight: 650; }
.loading-message-odia { margin: .28rem 0 0; color: #8096aa; font-size: .78rem; }
.loading-dots::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: loading-dots 1.2s steps(4, end) infinite; }

.loading-progress {
  width: min(18rem, 72%);
  height: 3px;
  margin: 1rem auto 0;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
}
.loading-progress span { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2577b9, #ffcf3f, #e72738); animation: loading-progress 1.2s ease-in-out infinite; }

@keyframes bus-travel {
  0% { left: -8rem; }
  100% { left: calc(100% + 1rem); }
}

@keyframes bus-bob {
  from { transform: translateY(0) rotate(-.35deg); }
  to { transform: translateY(-2px) rotate(.35deg); }
}

@keyframes wheel-turn { to { transform: rotate(360deg); } }
@keyframes loading-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75%, 100% { content: "..."; } }
@keyframes loading-progress { 0% { transform: translateX(-110%); } 100% { transform: translateX(345%); } }

@media (prefers-reduced-motion: reduce) {
  .animated-bus { left: 50%; transform: translateX(-50%); animation: none; }
  .animated-bus svg,
  .wheel,
  .loading-dots::after,
  .loading-progress span { animation: none; }
  .loading-progress span { width: 100%; opacity: .65; }
  .route-animation-dot { animation: none; }
  .map-bus { transition: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.language-toolbar {
  position: sticky;
  z-index: 2100;
  top: 0;
  display: flex;
  justify-content: flex-end;
  min-height: 3rem;
  padding: .3rem max(clamp(1rem, 3vw, 3rem), env(safe-area-inset-right)) .3rem max(clamp(1rem, 3vw, 3rem), env(safe-area-inset-left));
  border-top: 4px solid #7743a5;
  background: #c90000;
  box-shadow: 0 2px 8px rgba(16, 37, 61, .18);
}

.language-toolbar label { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800; }
.language-toolbar select {
  width: auto;
  min-width: 7.5rem;
  min-height: 2.15rem;
  padding: 0 2rem 0 .65rem;
  border: 2px solid #ffe600;
  border-radius: 2px;
  background-color: #b90000;
  color: #fff;
  font-weight: 750;
}

.language-welcome {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(16, 37, 61, .7);
  backdrop-filter: blur(8px);
}

.language-card {
  width: min(31rem, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.4rem, 5vw, 2.5rem);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}
.language-card h1 { font-size: clamp(1.65rem, 5vw, 2.25rem); line-height: 1.2; }
.language-card h1 span { color: var(--network); font-size: .78em; }
.language-card > p:not(.eyebrow) { margin: .8rem 0 1.25rem; color: var(--muted); line-height: 1.55; }
.language-card fieldset { display: grid; gap: .6rem; margin: 0 0 1rem; padding: 0; border: 0; }
.language-card fieldset label { display: flex; align-items: center; gap: .75rem; padding: .8rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.language-card fieldset label:has(input:checked) { border-color: var(--network); background: rgba(37, 119, 185, .08); }
.language-card input { width: 1.15rem; min-height: 1.15rem; margin: 0; accent-color: var(--network); }
.language-card label span { display: grid; gap: .15rem; }
.language-card label strong { color: var(--ink); }
.language-card label small { color: var(--muted); }
.language-card button { margin-top: .2rem; }

.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.35rem clamp(1rem, 3vw, 3rem) 1.1rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.brand-block { min-width: 0; }

.eyebrow {
  margin: 0 0 .35rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
}

h1 { margin: 0; font-size: clamp(1.65rem, 3.2vw, 2.7rem); line-height: 1.04; letter-spacing: -.035em; }

.subtitle { margin: .45rem 0 0; color: var(--muted); font-size: .95rem; }

.site-nav { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .8rem; }
.site-nav a, .site-footer a { color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none; }
.site-nav a:hover, .site-footer a:hover { color: var(--network); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); }

.coverage { display: grid; min-width: 8rem; text-align: right; }
.coverage strong { color: var(--network); font-size: 2rem; line-height: 1; }
.coverage span { color: var(--muted); font-size: .78rem; }

.map-stage { position: relative; flex: 1; min-height: 68vh; min-height: 68dvh; }
#map { position: absolute; inset: 0; background: #d9e7ee; }

.route-panel {
  position: absolute;
  z-index: 800;
  top: 1rem;
  left: 1rem;
  width: min(20rem, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.route-panel label { display: block; margin-bottom: .38rem; font-size: .78rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }

[hidden] { display: none !important; }

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  margin-bottom: .85rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--border);
}

.mode-tabs button {
  min-height: 2.35rem;
  padding: .35rem .45rem;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
}

.mode-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }

input, select, button {
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid rgba(16, 37, 61, .22);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input, select { padding: 0 .75rem; }
button { cursor: pointer; background: var(--ink); color: #fff; font-weight: 700; }
button:hover { background: #183c62; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:disabled:hover { background: var(--ink); }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid rgba(37, 119, 185, .28); outline-offset: 2px; }

.panel-prompt { margin: 0 0 .7rem; color: var(--muted); font-size: .82rem; }

.station-fields { display: grid; gap: .55rem; }
.station-fields label { margin: 0; color: var(--muted); font-size: .7rem; letter-spacing: .04em; }
.station-fields input { display: block; margin-top: .28rem; }
.station-field-label { display: flex; align-items: center; gap: .4rem; }
.station-label-icon {
  display: inline-block;
  width: .72rem;
  height: .72rem;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(16, 37, 61, .22);
}
.station-label-icon.pickup { background: #1f8a5b; }
.station-label-icon.drop { background: #e3522c; }

.find-bus-button {
  margin-top: .7rem;
  border-color: #087344;
  background: #087f45;
}
.find-bus-button:hover { background: #066b3a; }
.find-bus-button:disabled:hover { background: #087f45; }

.point-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-top: .55rem; }
.point-actions button { min-height: 2.2rem; padding: .35rem; background: #fff; color: var(--ink); font-size: .7rem; }
.point-actions button[aria-pressed="true"] { border-color: var(--network); background: rgba(37, 119, 185, .1); color: #14598f; }

.trip-summary { margin-top: .75rem; padding: .65rem 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; line-height: 1.35; }
.trip-summary strong { color: var(--ink); }

.planner-results { display: grid; gap: .4rem; }
.planner-results h2 { margin: 0 0 .1rem; font-size: .82rem; }
.journey-option { padding: .55rem .65rem; text-align: left; background: #fff; color: var(--ink); font-size: .78rem; line-height: 1.35; }
.journey-option[aria-pressed="true"] { border-color: var(--selected); background: rgba(227, 82, 44, .08); }
.journey-option strong { display: block; color: var(--network); font-size: .88rem; }
.journey-option small { color: var(--muted); font-size: .7rem; }
.planner-empty { margin: 0; color: #9f2b23; font-size: .78rem; font-weight: 700; }
.secondary-button { margin-top: .65rem; background: #fff; color: var(--ink); }
.secondary-button:hover { background: #edf2f5; }

.route-detail { min-height: 6.35rem; margin: .9rem 0 .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.route-detail p { margin: .3rem 0; font-size: .85rem; line-height: 1.38; }
.route-detail .route-number { margin-top: 0; color: var(--network); font-size: 1.15rem; font-weight: 800; }
.route-detail .via { color: var(--muted); }
.route-detail .missing { color: #9f2b23; font-weight: 700; }
.route-detail a { color: var(--network); font-weight: 650; }

.route-animation-info {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  margin-top: .65rem;
  padding-top: .65rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.35;
}

.route-animation-dot {
  flex: 0 0 auto;
  width: .55rem;
  height: .55rem;
  margin-top: .22rem;
  border-radius: 50%;
  background: #15945a;
  box-shadow: 0 0 0 4px rgba(21, 148, 90, .14);
  animation: route-animation-pulse 1.4s ease-in-out infinite;
}

.route-bus-icon { background: transparent; border: 0; }
.map-bus {
  --bus-angle: 0deg;
  position: relative;
  display: block;
  width: 42px;
  height: 22px;
  border: 2px solid #086c3c;
  border-radius: 7px 9px 5px 5px;
  background: linear-gradient(180deg, #35c979 0 66%, #ffcf3f 66% 100%);
  box-shadow: 0 4px 10px rgba(16, 37, 61, .3);
  transform: rotate(var(--bus-angle));
  transition: transform .18s linear;
  transform-origin: center;
}
.map-bus::before,
.map-bus::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 8px;
  height: 8px;
  border: 2px solid #eef7ff;
  border-radius: 50%;
  background: #10253d;
}
.map-bus::before { left: 5px; }
.map-bus::after { right: 5px; }
.map-bus i {
  position: absolute;
  top: 3px;
  width: 12px;
  height: 7px;
  border-radius: 2px;
  background: #dff3ff;
}
.map-bus i:first-child { left: 5px; }
.map-bus i:nth-child(2) { left: 20px; }
.map-bus b { display: none; }

.bus-stop-label {
  border: 0 !important;
  border-radius: 999px !important;
  background: #087f45 !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(16, 37, 61, .25) !important;
  font-weight: 800;
}
.bus-stop-label::before { border-top-color: #087f45 !important; }

.route-stop-marker { filter: drop-shadow(0 1px 2px rgba(16, 37, 61, .28)); }
.route-stop-name {
  border: 1px solid rgba(16, 37, 61, .16) !important;
  border-radius: 5px !important;
  background: rgba(255, 255, 255, .94) !important;
  color: var(--ink) !important;
  box-shadow: 0 2px 7px rgba(16, 37, 61, .18) !important;
  font-size: .64rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}
.route-stop-terminal-name {
  border-color: rgba(8, 127, 69, .36) !important;
  color: #075d36 !important;
}
.route-stop-name::before { display: none; }

@keyframes route-animation-pulse {
  50% { opacity: .48; transform: scale(.82); }
}

.map-key {
  position: absolute;
  z-index: 700;
  right: 4.25rem;
  bottom: 1.6rem;
  display: flex;
  gap: .8rem;
  padding: .5rem .65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 16px rgba(16, 37, 61, .13);
  color: var(--ink);
  font-size: .72rem;
}

.map-key span { display: flex; align-items: center; gap: .35rem; }
.map-key b { font-weight: 500; }
.map-key .line { display: inline-block; width: 1.7rem; border-top: 3px solid var(--network); }
.map-key .line.selected { border-top-width: 5px; border-color: var(--selected); }

.leaflet-container.planning-start, .leaflet-container.planning-end { cursor: crosshair; }

.route-label {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--ink) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(16, 37, 61, .25) !important;
  font-weight: 800;
}
.route-label::before { display: none; }

.ad-zone {
  width: min(70rem, calc(100% - 2rem));
  min-height: 7.5rem;
  margin: 1.25rem auto 0;
  padding: .65rem;
  background: #fff;
  border: 1px solid var(--border);
  text-align: center;
}
.ad-zone > span { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }

.content-section {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.content-intro { max-width: 48rem; }
.content-section h2, .info-page h2 { margin: 0 0 .8rem; font-size: clamp(1.45rem, 2.4vw, 2rem); letter-spacing: -.025em; }
.content-section h3 { margin: 0 0 .55rem; font-size: 1rem; }
.content-section p, .info-page p, .info-page li { color: var(--muted); line-height: 1.65; }
.content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.5rem); margin-top: 2rem; }
.content-grid article { padding-top: 1rem; border-top: 2px solid var(--network); }

.info-shell { min-height: 100vh; display: flex; flex-direction: column; }
.info-header { align-items: flex-start; }
.info-page { width: min(52rem, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) 0; }
.info-page section + section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.info-page p { margin: .75rem 0 0; }
.info-page ul { margin: .8rem 0 0; padding-left: 1.25rem; }
.info-page li + li { margin-top: .45rem; }
.info-page a { color: var(--network); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .7rem clamp(1rem, 3vw, 3rem);
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: .7rem;
}
footer p { margin: 0; max-width: 52rem; }
.site-footer { margin-top: auto; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .8rem 1rem; }

@media (min-width: 75rem) {
  .route-panel { width: 22rem; padding: 1.15rem; }
  .map-stage { min-height: 72vh; min-height: 72dvh; }
}

@media (min-width: 40.0625rem) and (max-width: 64rem) {
  .masthead { gap: 1.25rem; }
  .route-panel { width: min(22rem, calc(100% - 2rem)); }
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid article:last-child { grid-column: 1 / -1; }
}

@media (max-width: 40rem) {
  .language-toolbar {
    min-height: 2.85rem;
    padding-right: max(.7rem, env(safe-area-inset-right));
    padding-left: max(.7rem, env(safe-area-inset-left));
  }
  .language-toolbar label { gap: .4rem; font-size: .88rem; }
  .language-toolbar select { min-width: 6.8rem; min-height: 2rem; font-size: 1rem; }

  .language-welcome {
    align-items: safe center;
    padding: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
  }
  .language-card { padding: 1.25rem; border-radius: 14px; }
  .language-card > p:not(.eyebrow) { margin-bottom: 1rem; font-size: .9rem; }
  .language-card fieldset label { min-height: 3.75rem; }

  .masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .75rem;
    padding: 1rem max(1rem, env(safe-area-inset-right)) .9rem max(1rem, env(safe-area-inset-left));
  }
  .masthead h1 { font-size: clamp(1.55rem, 8vw, 2rem); line-height: 1.08; }
  .eyebrow { font-size: .65rem; line-height: 1.35; }
  .subtitle { font-size: .82rem; line-height: 1.45; }
  .site-nav { width: calc(100vw - 2rem); gap: .5rem 1rem; margin-top: .7rem; }
  .site-nav a { min-height: 1.5rem; display: inline-flex; align-items: center; }
  .coverage { min-width: 4.5rem; padding-top: .15rem; text-align: right; }
  .coverage strong { font-size: 1.75rem; }
  .coverage span { max-width: 5.5rem; margin-left: auto; font-size: .68rem; line-height: 1.2; }

  .map-stage {
    display: grid;
    grid-template-rows: auto minmax(26rem, 62dvh);
    min-height: 0;
    background: #d9e7ee;
  }
  #map {
    position: relative;
    inset: auto;
    grid-row: 2;
    min-height: 26rem;
  }
  .route-panel {
    position: relative;
    z-index: 900;
    top: auto;
    left: auto;
    grid-row: 1;
    width: 100%;
    padding: .9rem max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 37, 61, .12);
    backdrop-filter: none;
  }
  .mode-tabs { gap: .45rem; margin-bottom: .75rem; padding-bottom: .75rem; }
  .mode-tabs button { min-height: 2.75rem; font-size: .8rem; }
  .panel-prompt { line-height: 1.4; }
  .station-fields { gap: .65rem; }
  .station-fields input,
  #route-select { min-height: 3rem; font-size: 1rem; }
  .point-actions { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .point-actions button { min-height: 2.75rem; padding: .45rem; font-size: .72rem; }
  .trip-summary { margin-top: .8rem; font-size: .82rem; }
  .journey-option { min-height: 3rem; padding: .65rem .7rem; }
  .journey-option small { font-size: .72rem; }
  .secondary-button,
  #fit-map { min-height: 2.85rem; }
  .route-detail { min-height: 0; margin-top: .75rem; }

  .map-key {
    right: auto;
    bottom: 1.6rem;
    left: .65rem;
    max-width: calc(100% - 4.75rem);
    flex-wrap: wrap;
    gap: .45rem .7rem;
    font-size: .68rem;
  }
  .map-key .line { width: 1.25rem; }
  .leaflet-control-attribution { max-width: calc(100vw - 5rem); white-space: normal; line-height: 1.25; }

  .content-section { width: min(100% - 2rem, 36rem); padding: 2.5rem 0; }
  .content-grid { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1.6rem; }
  .content-section p, .info-page p, .info-page li { line-height: 1.6; }
  .info-page { width: min(100% - 2rem, 36rem); padding: 2.5rem 0; }
  .info-page section + section { margin-top: 2rem; padding-top: 1.5rem; }

  footer {
    display: block;
    padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    font-size: .72rem;
    line-height: 1.5;
  }
  .site-footer nav { margin-top: .75rem; }
  footer p + p { margin-top: .35rem; }
}

@media (max-width: 23.75rem) {
  .masthead { grid-template-columns: 1fr; }
  .coverage { grid-row: 1; grid-column: 1; justify-self: end; }
  .brand-block { padding-right: 4.75rem; }
  .site-nav { padding-right: 0; }
  .language-card h1 { font-size: 1.5rem; }
}

@media (max-height: 31.25rem) and (max-width: 40rem) {
  .language-welcome { align-items: start; overflow-y: auto; }
  .language-card { max-height: none; }
}
