:root {
  color-scheme: light;
  --brand: #b92638;
  --brand-soft: #f7e7ea;
  --ink: #171b20;
  --muted: #515d66;
  --line: #dde1e5;
  --surface: #fff;
  --canvas: #f3f5f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #2a609a;
  outline-offset: 2px;
}
a { color: #8c1b2c; text-underline-offset: 3px; }
[hidden] { display: none !important; }
.page { width: min(1440px, calc(100% - 56px)); margin-inline: auto; }
.topbar { background: #171b20; color: #fff; }
.topbar-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { color: #fff; text-decoration: none; font-size: 21px; font-weight: 720; letter-spacing: -.04em; }
.brand b { color: #f44b62; font-weight: 850; }
.topbar-label { color: #e0e4e7; font-size: 13px; }
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 18px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(34px, 5vw, 55px); line-height: 1; letter-spacing: -.06em; font-weight: 800; }
.intro p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; min-width: 0; }
.metric strong { display: block; font-size: 28px; line-height: 1.03; letter-spacing: -.055em; }
.metric span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.metric:first-child strong { color: var(--brand); }

.app-grid { display: grid; grid-template-columns: minmax(285px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
.directory, .map-card, .detail { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; min-width: 0; }
.directory { overflow: hidden; }
.directory-controls { padding: 13px 13px 8px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: #edf0f1; padding: 3px; border-radius: 9px; margin-bottom: 10px; }
.tabs button { border: 0; border-radius: 7px; padding: 8px 5px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #171b201c; }
.field { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
.field input, .field select { background: #fff; border: 1px solid #d4dbe0; border-radius: 7px; padding: 8px 9px; height: 38px; font-weight: 500; font-size: 14px; min-width: 0; width: 100%; }
.field input::placeholder { color: #66737b; }
.filter-row { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); gap: 8px; margin-top: 9px; }
.result-count { font-size: 12px; color: var(--muted); margin-top: 8px; }
.directory-list { height: 547px; overflow: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.list-item { border: 0; border-bottom: 1px solid #ecedef; background: #fff; padding: 11px 14px; text-align: left; width: 100%; display: block; }
.list-item:hover { background: #f6f7f8; }
.list-item[aria-pressed="true"] { background: #fcf0f2; box-shadow: inset 3px 0 var(--brand); }
.list-item strong, .list-item small { display: block; line-height: 1.35; overflow-wrap: anywhere; }
.list-item strong { font-size: 14px; }
.list-item small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.list-item .code { color: var(--brand); font-weight: 750; }
.list-item .review { color: #875019; font-weight: 680; }
.empty { padding: 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.map-card { overflow: hidden; }
.map-head { min-height: 55px; padding: 9px 13px; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.map-head h2 { font-size: 17px; line-height: 1.25; letter-spacing: -.025em; }
.map-actions { display: flex; gap: 7px; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 12px; min-height: 36px; border: 1px solid transparent; border-radius: 8px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 720; text-decoration: none; line-height: 1.15; }
.button:hover { filter: brightness(.96); }
.button.subtle { background: #fff; color: var(--ink); border-color: var(--line); }
.button.subtle[aria-pressed="true"] { background: var(--brand-soft); border-color: #eac7ce; color: #872135; }
#map { height: 515px; background: #e3e9eb; position: relative; z-index: 0; }
.map-foot { display: flex; gap: 13px; padding: 9px 13px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 9px; height: 9px; border: 2px solid var(--brand); border-radius: 50%; margin-right: 2px; }
.exact-dot { background: var(--brand); }
.review-dot { border-color: #996119; background: #fff; }
#map-status { color: #875019; }

.map-pin, .route-pin, .map-cluster { display: grid; place-items: center; border-radius: 100%; color: #fff; background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 1px #75152833, 0 1px 4px #14253866; font-weight: 760; font-size: 11px; }
.map-pin.review, .route-pin.review { background: #fff5e3; color: #663b11; border: 2px solid #9c641a; }
.map-pin.selected, .route-pin.selected { box-shadow: 0 0 0 3px #20262c; }
.map-cluster { background: #922035; font-size: 13px; border-color: #fbe1e9; }
.leaflet-tooltip.pin-label { border: 0; padding: 5px 7px; color: var(--ink); font-weight: 650; }
.leaflet-container a { color: #812032; }

.detail { margin-top: 12px; padding: 15px 17px; min-height: 133px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.detail-head h2 { font-size: 23px; line-height: 1.18; letter-spacing: -.045em; overflow-wrap: anywhere; }
.detail-meta { margin-top: 5px; color: var(--muted); font-size: 13px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.detail-address { margin-top: 13px; padding: 11px 12px; border-radius: 8px; background: #f2f4f5; font-size: 15px; font-weight: 680; }
.detail-address[data-exact="false"] { background: #fff2dd; color: #704313; }
.detail-address small { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 12px; }
.details-grid > div { min-width: 0; }
.details-grid h3 { font-size: 13px; margin-bottom: 4px; }
.details-grid p, .details-grid a { font-size: 13px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.details-grid a { color: #8c1b2c; }
.stop-list { margin: 13px 0 0; padding: 0; list-style: none; }
.stop-line {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px; align-items: center; width: 100%; border: 0; border-top: 1px solid var(--line);
  background: transparent; text-align: left; padding: 8px 3px;
}
.stop-line:hover { background: #f7f8f9; }
.stop-line .order { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: var(--brand-soft); color: #8a1e2f; font-weight: 750; font-size: 12px; }
.stop-line strong, .stop-line small { display: block; overflow-wrap: anywhere; line-height: 1.35; }
.stop-line strong { font-size: 13px; }
.stop-line small, .stop-line .chevron { font-size: 12px; color: var(--muted); }
.sources { margin: 26px 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.sources p + p { margin-top: 4px; }

@media (max-width: 900px) {
  .page { width: calc(100% - 32px); }
  .app-grid { grid-template-columns: minmax(224px, 275px) minmax(0, 1fr); gap: 10px; }
  #map { height: 460px; }
  .directory-list { height: 492px; }
  .detail-head { display: grid; gap: 9px; }
  .detail-actions { justify-content: flex-start; }
}

@media (max-width: 690px) {
  .page { width: calc(100% - 24px); }
  .intro { align-items: flex-start; flex-direction: column; gap: 10px; padding: 19px 0 14px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }
  .metric { padding: 9px 11px; }
  .metric strong { font-size: 24px; }
  .app-grid { grid-template-columns: minmax(0, 1fr); }
  .directory-list { height: 205px; }
  #map { height: 365px; }
  .map-head { padding: 8px; }
  .map-actions { gap: 4px; }
  .map-actions .button { padding-inline: 7px; font-size: 12px; }
  .map-head h2 { font-size: 14px; }
  .detail { padding: 12px; }
}
