/* Rams/Braun transit overhaul
   A reversible visual layer: product behavior remains in styles.css and app.js. */

:root,
[data-theme="light"] {
  --bg: #f3f1ec;
  --bg-card: #faf9f6;
  --bg-elev: #faf9f6;
  --bg-elev-2: #f3f1ec;
  --bg-elev-3: #e8e6e0;
  --input-bg: #faf9f6;
  --border: #c9c7c0;
  --text: #1b1b19;
  --text-dim: #5f605c;
  --accent: #bd4619;
  --accent-2: #d85a28;
  --ontime: #1b1b19;
  --late: #d85a28;
  --early: #777873;
  --shadow: none;
  --radius: 4px;
  --radius-sm: 2px;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #191a18;
  --bg-card: #222320;
  --bg-elev: #222320;
  --bg-elev-2: #191a18;
  --bg-elev-3: #2b2c29;
  --input-bg: #222320;
  --border: #444540;
  --text: #f0efea;
  --text-dim: #a9aaa5;
  --accent: #ee7540;
  --accent-2: #ee7540;
  --ontime: #f0efea;
  --late: #ee7540;
  --early: #a9aaa5;
  --shadow: none;
}

[data-theme="dark"] .map-loading-screen {
  --loading-rule: #71726c;
}

html,
body,
button,
input {
  font-family: var(--font-sans);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.lucide {
  width: 17px;
  height: 17px;
  flex: none;
  stroke-width: 1.75;
}

/* Live map loading instrument */
.map-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  color: var(--text);
  background: var(--bg);
  --loading-rule: var(--border);
  font-family: Arial, sans-serif;
}

.map-loading-screen[hidden] {
  display: none;
}

.map-loading-screen__panel {
  width: min(640px, 100%);
  padding: 28px 0 24px;
  border-top: 2px solid var(--text);
  border-bottom: 1px solid var(--loading-rule);
}

.map-loading-screen__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.map-loading-screen__signal {
  width: 10px;
  height: 10px;
  background: var(--accent);
  animation: map-loading-signal 1.1s steps(2, end) infinite;
}

.map-loading-screen h2 {
  margin: 40px 0 8px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.map-loading-screen p {
  min-height: 22px;
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

.map-loading-screen__progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-loading-screen__progress-head strong {
  color: var(--text);
  font-weight: 500;
}

.map-loading-screen__meter {
  position: relative;
  height: 8px;
  margin: 8px 0 20px;
  overflow: hidden;
  background: var(--bg-elev-3);
  border: 1px solid var(--loading-rule);
}

.map-loading-screen__meter span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--accent);
}

.map-loading-screen__meter[data-progress="1"] span {
  width: 50%;
}

.map-loading-screen__meter[data-progress="2"] span {
  width: 100%;
}

.map-loading-screen__channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.map-loading-screen__channel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--loading-rule);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
}

.map-loading-screen__channel strong {
  overflow: hidden;
  color: var(--text);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-loading-screen__channel[data-ready] {
  border-color: var(--accent);
}

.map-loading-screen__channel[data-ready] strong {
  color: var(--accent);
}

@keyframes map-loading-signal {
  50% { opacity: 0.35; }
}

/* Entry console */
.front-page {
  background: var(--bg);
  transition: opacity 120ms linear, visibility 120ms linear;
}

.front-card {
  width: min(560px, 100%);
  padding: 32px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.front-logo {
  width: 36px;
  height: 36px;
  margin-bottom: 24px;
  color: var(--bg-card);
  background: var(--text);
  border-radius: 3px;
  font-size: 0;
}

.front-logo .lucide {
  width: 19px;
  height: 19px;
}

.front-card h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
}

.front-subtitle {
  max-width: 38ch;
  margin: 8px 0 28px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

.stop-search-form label,
.arrival-meta,
.arrival-clock,
.prediction-card__label,
.meta,
.list__title,
.sidebar__footer {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.stop-search-form label {
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.stop-search-row {
  gap: 8px;
}

.stop-search-row input {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.stop-search-row input:focus,
.search input:focus {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
  outline-offset: -1px;
  box-shadow: none;
}

.stop-search-row button,
.open-map-btn {
  min-height: 44px;
  padding: 0 20px;
  color: var(--bg-card);
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.open-map-btn {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.stop-search-row button:hover,
.open-map-btn:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.front-error,
.arrival-warning {
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 12px;
}

.arrival-results {
  gap: 0;
  margin-top: 16px;
}

.arrival-card {
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.arrival-card:hover,
.arrival-suggestion:hover {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-color: var(--border);
  transform: none;
}

.arrival-route,
.vehicle-item__route,
.detail .route-badge {
  color: var(--bg-card);
  background: var(--text);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.arrival-route {
  min-height: 36px;
}

.arrival-destination {
  font-weight: 500;
}

.arrival-time {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.arrival-suggestions {
  gap: 0;
}

.arrival-suggestion {
  padding: 10px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

/* Continuous instrument panel */
.sidebar {
  background: var(--bg-elev);
  border-color: var(--border);
}

.sidebar__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 36px;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.brand {
  min-width: 0;
  gap: 10px;
}

.brand .front-logo {
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 3px;
}

.brand__name {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand__tag {
  margin-top: 2px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.icon-btn {
  width: 36px;
  height: 36px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color 100ms linear, background 100ms linear, border-color 100ms linear;
}

.icon-btn:hover {
  color: var(--bg-card);
  background: var(--text);
  border-color: var(--text);
  transform: none;
}

.search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.search input {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  transition: border-color 100ms linear;
}

.search__results {
  left: 16px;
  right: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.search__result {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  border-color: var(--border);
  font-size: 12px;
}

.search__result:hover {
  background: var(--bg-elev-3);
}

.search__result .muted {
  margin-top: 2px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: color 100ms linear;
}

.star-btn .lucide {
  width: 15px;
  height: 15px;
}

.star-btn--active .lucide {
  fill: currentColor;
}

.fav-section__header,
.nearest-panel__header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.star-btn:hover,
.star-btn--active,
.star-btn--active:hover {
  color: var(--accent);
  transform: none;
}

.fav-section {
  padding: 0;
}

.fav-section__header,
.nearest-panel__header {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.nearest-panel {
  margin: 0;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  animation: none;
}

.nearest-panel__item {
  min-height: 44px;
  border-bottom: 1px solid var(--border);
}

.nearest-panel__distance {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.filters {
  flex: none;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.chip {
  min-height: 32px;
  padding: 6px 10px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 100ms linear, background 100ms linear, border-color 100ms linear;
}

.chip:hover {
  color: var(--text);
  border-color: var(--text);
}

.chip--active {
  color: var(--bg-card);
  background: var(--text);
  border-color: var(--text);
  font-weight: 500;
}

.detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(72dvh, 720px);
  overflow: hidden;
  margin: 0;
  padding: 16px;
  background: var(--bg-elev-2);
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  animation: none;
}

.detail > #detailContent {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.detail__close {
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
}

.detail h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.detail .route-badge {
  min-width: 44px;
  padding: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 16px;
  text-align: center;
}

.detail .meta {
  margin: 6px 0 12px;
  color: var(--text-dim);
  font-size: 9px;
  line-height: 1.55;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.prediction-card {
  margin: 12px 0;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prediction-card--stale {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-color: var(--accent);
}

.prediction-card__label {
  color: var(--text-dim);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.detail-stale-notice {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.prediction-card__eta {
  margin-top: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.prediction-card__side,
.stop__range,
.stop__eta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.stop {
  min-height: 50px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.stop__eta {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.stop__name {
  font-size: 12px;
}

.stop--next {
  margin: 0;
  padding: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

/* Keep the selected-bus summary visible while the complete stop sequence
   remains accessible on short screens and long routes. */
.detail .stops {
  min-height: 0;
  max-height: min(42dvh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.list {
  padding: 0 16px 16px;
}

.list__title {
  margin: 0;
  padding: 14px 0 10px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.debug-panel {
  margin: 10px 0 0;
  padding: 10px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 10px;
}

.list__items {
  gap: 0;
}

.vehicle-item {
  min-height: 56px;
  padding: 10px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  transition: background 100ms linear;
}

.vehicle-item:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-color: var(--border);
  transform: none;
}

.vehicle-item--serving-stop,
.arrival-list-item--clickable {
  border-color: var(--accent);
  box-shadow: none;
}

.vehicle-item--serving-stop .vehicle-item__route,
.arrival-list-item--clickable .vehicle-item__route {
  color: #fff;
  background: var(--accent);
}

.vehicle-item--scheduled {
  border-color: var(--border);
  opacity: 0.7;
}

.vehicle-item--scheduled .vehicle-item__route {
  color: var(--bg-card);
  background: var(--text-dim);
}

.vehicle-item__route {
  padding: 7px 4px;
  font-size: 12px;
}

.vehicle-item__dest {
  font-size: 12px;
  font-weight: 500;
}

.vehicle-item__sub {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.vehicle-item__status,
.status-scheduled {
  padding: 3px 5px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-late {
  color: var(--accent);
  border-color: var(--accent);
}

.stop-live-map-note,
.stop-live-map-note--muted {
  padding: 10px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sidebar__footer {
  min-height: 40px;
  padding: 8px 16px;
  background: var(--bg-elev);
  border-color: var(--border);
  color: var(--text-dim);
  font-size: 9px;
}

.status {
  width: 7px;
  height: 7px;
}

.status--ok {
  background: var(--text);
  box-shadow: none;
}

.status--connecting {
  background: var(--accent);
  animation: pulse 1.2s steps(2, end) infinite;
}

/* Map instrument controls */
#mapContainer {
  background: var(--bg);
}

.legend {
  top: 12px;
  right: 12px;
  min-width: 152px;
  padding: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  gap: 4px;
}

.legend__row {
  min-height: 22px;
  gap: 7px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dot {
  width: 7px;
  height: 7px;
}

.dot--ontime {
  background: var(--text);
}

.dot--late {
  background: var(--accent);
}

.dot--early {
  background: var(--text-dim);
}

.dot--stop {
  background: transparent;
  border: 1px solid var(--text);
  border-radius: 1px;
}

.legend__btn {
  min-height: 34px;
  padding: 7px 8px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
}

.legend__btn:hover {
  color: var(--bg-card);
  background: var(--text);
  border-color: var(--text);
}

#trafficToggle::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--text-dim);
  border-radius: 50%;
}

#trafficToggle[aria-pressed="true"]::before {
  background: var(--accent);
}

.toast {
  padding: 9px 12px;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 10px;
}

.mapboxgl-ctrl-group {
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.mapboxgl-ctrl-group:not(:empty) {
  box-shadow: none;
}

.mapboxgl-ctrl-group button {
  width: 36px;
  height: 36px;
  background-color: var(--bg-elev);
  border-color: var(--border);
}

.mapboxgl-ctrl-group button:hover {
  background-color: var(--bg-elev-3);
}

.mapboxgl-ctrl-icon {
  filter: grayscale(1) contrast(1.2);
}

.stop-marker {
  width: 10px;
  height: 10px;
  background: var(--bg-card);
  border: 2px solid var(--text);
  border-radius: 1px;
}

.stop-marker:hover {
  background: var(--accent);
}

.selected-stop-marker {
  width: auto;
  min-width: 46px;
  max-width: 88px;
  height: 26px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  background: var(--accent);
  border: 1px solid #1b1b19;
  border-radius: 2px;
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
}

.selected-stop-marker::after {
  background: var(--bg-card);
  border-color: var(--text);
  box-shadow: none;
}

.mapboxgl-popup-content {
  padding: 10px 12px;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  font-family: var(--font-sans);
}

.mapboxgl-popup-close-button {
  color: var(--text);
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
  border-top-color: var(--bg-elev);
}

button:focus-visible,
input:focus-visible,
.mapboxgl-ctrl button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .map-loading-screen {
    place-items: center stretch;
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .map-loading-screen__panel {
    width: 100%;
    padding-top: 22px;
  }

  .map-loading-screen h2 {
    margin-top: 30px;
    font-size: 24px;
  }

  .map-loading-screen__channels {
    gap: 6px;
  }

  .map-loading-screen__channel {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 58px;
    padding: 9px 11px;
  }

  .sidebar {
    border-top-color: var(--border);
  }

  .sidebar__header {
    grid-template-columns: minmax(0, 1fr) 36px 36px;
    padding: 10px 12px;
  }

  .brand .front-logo {
    width: 32px;
    height: 32px;
    border-radius: 3px;
  }

  .search {
    padding: 7px 12px;
  }

  .search input {
    min-height: 38px;
  }

  #app:not(.app--panel-expanded) .search {
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }

  .app--panel-expanded .search,
  .filters,
  .detail,
  .list,
  .sidebar__footer {
    border-color: var(--border);
  }

  .filters {
    padding: 8px 12px;
  }

  .detail {
    margin: 0;
    padding: 14px 12px;
    max-height: none;
    overflow: hidden;
  }

  .app--panel-expanded .detail .stops {
    max-height: min(34dvh, 360px);
  }

  .list {
    padding: 0 12px 12px;
  }

  .legend {
    top: 10px;
    right: 10px;
    min-width: 0;
    padding: 6px;
  }

  .legend__btn {
    min-height: 36px;
  }

  .sidebar__footer {
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .front-card {
    padding: 24px 0;
    border-radius: 0;
  }

  .front-card h1 {
    font-size: 24px;
  }

  .arrival-card {
    padding: 10px 0;
  }

  .prediction-card {
    padding: 10px;
  }

  .prediction-card__eta {
    font-size: 22px;
  }

  .vehicle-item {
    padding: 9px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-loading-screen__signal {
    animation: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Acceptance refinements */
@media (min-width: 861px) {
  .front-page {
    place-items: center start;
    padding-left: clamp(48px, 10vw, 152px);
  }

  .front-card {
    width: min(520px, calc(100vw - 96px));
  }

  .front-logo {
    margin-bottom: 16px;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
  }

  .front-card h1 {
    font-size: 21px;
  }

  .front-subtitle {
    max-width: none;
    margin-bottom: 24px;
  }

  .open-map-btn {
    width: auto;
    min-width: 168px;
    margin-left: auto;
    display: block;
  }
}

.stop-search-form label,
.stop-search-row button,
.open-map-btn,
.chip,
.legend__btn {
  font-size: 11px;
}

[data-theme="dark"] .mapboxgl-ctrl-icon {
  filter: invert(1) grayscale(1) contrast(1.1);
}
