.map { color-scheme: light; }
.map :focus-visible { outline-color: #75572c; }
.map > .street-map {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}
.map > .map-drawing { z-index: 1; }
.map > :is(.map-label, .map-north, .map-neighbourhood) { z-index: 2; }
.map[data-map-state="live"] .street-map {
  z-index: 3;
  pointer-events: auto;
}
.map[data-map-state="live"] > :is(.map-drawing, .map-label, .map-north, .map-neighbourhood, .map-fallback-caption) {
  visibility: hidden;
  pointer-events: none;
}
.map[data-map-state="live"] .map-drawing {
  visibility: visible;
  opacity: 0;
}
.map .map-fallback-caption {
  z-index: 2;
  border-radius: 3px;
  box-shadow: 0 1px 4px #152e2725;
  font-size: 12px;
}
.map-fallback-caption a { text-underline-offset: 2px; }
.street-map-controls {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 2px;
  border: 1px solid #d1d9cc;
  border-radius: 5px;
  padding: 3px;
  background: #fffdf5;
  box-shadow: 0 1px 7px #152e2727;
}
.street-map-controls button {
  min-height: 36px;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #192638;
  font-size: 13px;
  font-weight: 650;
}
.street-map-controls button:hover { border-color: #a3ada1; }
.street-map-controls button[aria-pressed="true"] { background: var(--navy); color: #fffdf5; }
.street-pin {
  --pin-color: #29473a;
  position: relative;
  z-index: 1;
  display: flex;
  width: 40px;
  min-height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  border: 0;
  padding: 1px 0 0;
  background: transparent;
  color: var(--pin-color);
}
.street-pin-celestz { --pin-color: #286d68; }
.street-pin-causewayz { --pin-color: #90523b; }
.street-pin[aria-pressed="true"] { z-index: 2; }
.street-pin-art {
  width: 31px;
  height: 39px;
  flex: none;
  filter: drop-shadow(2px 2px 0 #1d443a35);
}
.street-pin-point {
  width: 13px;
  height: 13px;
  margin-bottom: -6px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--pin-color);
  box-shadow: 0 0 0 1px var(--pin-color);
}
.street-pin[aria-pressed="true"] .street-pin-point {
  box-shadow: 0 0 0 2px var(--pin-color), 0 0 0 5px #fffdf5eb;
}
.street-pin-label {
  position: absolute;
  bottom: -12px;
  left: 32px;
  min-width: max-content;
  padding: 3px 6px;
  border: 1px solid #dde4d9;
  border-radius: 3px;
  background: #fffdf8;
  color: #223c33;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
  box-shadow: 0 1px 4px #152e2728;
  pointer-events: none;
}
.street-pin-origin .street-pin-label { left: auto; right: 31px; }
.street-pin-origin .street-pin-label, .street-pin[aria-pressed="true"] .street-pin-label {
  border-color: var(--pin-color);
  background: var(--pin-color);
  color: white;
}
.street-pin-causewayz .street-pin-label { bottom: -20px; }
.street-map .maplibregl-ctrl-group button { min-width: 34px; min-height: 34px; }
.street-map .maplibregl-ctrl-attrib a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 570px) {
  .street-map-controls { top: 8px; left: 8px; }
  .street-map-controls button { padding-inline: 7px; font-size: 12px; }
  .street-pin-art { width: 24px; height: 32px; }
  .street-pin-label { left: 26px; font-size: 10px; }
  .street-pin-origin .street-pin-label { right: 26px; }
  .street-pin-causewayz .street-pin-label { left: 19px; bottom: -24px; }
}
.map-card-mode {
  color: var(--card-color);
  border: 1px solid color-mix(in srgb, var(--card-color) 37%, transparent);
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
}
.map-card-travel {
  margin-top: 10px;
  color: var(--card-color);
  font-size: 17px;
  font-weight: 740;
}
.map-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}
.street-pin-dropoff { --pin-color: #286d68; }
.street-pin-dropoff .street-pin-point { width: 10px; height: 10px; }
.street-pin-dropoff .street-pin-label { left: auto; right: 31px; bottom: -22px; }
.street-pin-dropoff:not(.is-relevant) .street-pin-label { display: none; }
.street-map .street-route-popup .maplibregl-popup-content {
  padding: 11px 24px 11px 13px;
  color: #192638;
  font: 14px/1.5 var(--sans);
}
.street-route-popup .popup-title { font-size: 15px; font-weight: 720; }
.street-route-popup .popup-travel { margin-top: 3px; color: #244569; }
.street-route-popup .popup-directions {
  display: inline-block;
  margin-top: 5px;
  color: #735125;
  font-weight: 650;
  text-underline-offset: 3px;
}
@media (max-width: 570px) {
  .map-card-mode { justify-self: start; }
  .street-pin-dropoff .street-pin-label { right: 26px; }
}
.route-sources { display: flex; flex-wrap: wrap; gap: 0 12px; }
.route-sources a { text-underline-offset: 3px; }
.map-bridge-link { font-weight: 750; }
.bridge-panel {
  scroll-margin-top: 90px;
  display: grid;
  grid-template-columns: minmax(225px, 0.62fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 52px);
  margin-top: 28px;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  background: var(--surface);
}
.bridge-panel .eyebrow { color: var(--gold); }
.bridge-panel h3 {
  margin-block: 8px 13px;
  color: var(--ink);
  font-size: clamp(26px, 3.5vw, 43px);
  font-weight: 680;
  letter-spacing: -.045em;
}
.bridge-panel-copy > p:last-child { margin-top: 12px; color: var(--muted); }
.bridge-metric { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 15px; color: var(--gold); }
.bridge-metric strong { font-size: 25px; }
.bridge-panel-figure img { max-height: 405px; object-fit: contain; background: #ebeae1; }
.bridge-panel-figure a { display: block; }
.bridge-panel-figure figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; }
@media (max-width: 690px) {
  .bridge-panel { grid-template-columns: 1fr; align-items: start; }
}
.bridge-legend { display: flex; flex-wrap: wrap; gap: 3px 13px; }
.bridge-legend span { display: inline-flex; gap: 5px; align-items: center; }
.bridge-legend span::before {
  content: "";
  display: inline-block;
  width: 19px;
  border-top: 3px dotted var(--legend-color);
}
.legend-approved { --legend-color: #7ecaaa; }
.legend-ciq { --legend-color: #e99db0; }

.nearby-places {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px clamp(12px, 2vw, 20px);
}

.nearby-places h3 {
  color: var(--ink);
  font: 600 clamp(22px, 2.4vw, 30px)/1.12 var(--serif);
}

.nearby-places p {
  margin-block: 5px 12px;
  color: var(--muted);
  font-size: 13px;
}

.nearby-places ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.nearby-places li { border-top: 1px solid var(--line); }

.nearby-places li a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 6px 2px;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}

.nearby-places li a:hover {
  background: var(--surface-raised);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nearby-estimate {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nearby-estimate strong { color: var(--gold); }
.nearby-estimate small { color: var(--muted); }
.nearby-places .nearby-source { margin: 10px 0 0; text-wrap: pretty; }
.nearby-source a { color: var(--gold); text-underline-offset: 3px; }

@media (min-width: 821px) and (min-height: 750px) {
  .location-grid:has(.nearby-places:not([hidden])) > .map {
    position: sticky;
    top: 92px;
  }
}

@media (max-width: 390px) {
  .nearby-estimate { display: grid; gap: 1px; text-align: end; }
}
