/* Impact map — used only on /map.html, with the site-wide styles.css */
.map-page { background: var(--cream); }
.map-hero {
  padding: 2.4rem 0 1.4rem;
  background: var(--navy);
  color: #fff;
}
.map-hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  color: #fff;
  margin: 0 0 0.5rem;
}
.map-hero .lede {
  max-width: 40rem;
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
  margin: 0 0 1.1rem;
}
.map-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.map-counts span {
  display: inline-block;
  background: var(--navy-soft);
  color: #fff;
  border: 1px solid rgba(42,157,143,0.45);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 650;
}
.map-counts span strong { color: var(--teal); font-weight: 700; }

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.85rem 0;
}
.map-toolbar .btn-group,
.map-toolbar .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.map-toolbar button {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}
.map-toolbar button:hover { border-color: var(--teal); color: var(--teal-dark); }
.map-toolbar button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.map-toolbar .legend {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.map-toolbar .legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: -1px;
}
.legend .abroad-visit { background: var(--teal); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--teal); }
.legend .abroad-ship { background: #fff; box-shadow: 0 0 0 2px var(--teal); }
.legend .us-visit { background: var(--navy); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--navy); }
.legend .us-ship { background: #fff; box-shadow: 0 0 0 2px var(--navy); }

.map-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 0;
  min-height: min(72vh, 820px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
#impact-map {
  min-height: min(72vh, 820px);
  background: #d9e2e4;
}
.map-panel {
  background: #fff;
  border-left: 1px solid var(--line);
  overflow: auto;
  max-height: min(72vh, 820px);
}
.map-panel .panel-inner { padding: 1.1rem 1.15rem 1.6rem; }
.map-panel .place-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 0 0 0.25rem;
}
.map-panel h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.55rem;
  color: var(--navy);
  margin: 0 0 0.35rem;
}
.map-panel .presence {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin: 0 0.3rem 0.8rem 0;
}
.presence.visit { background: var(--navy); color: #fff; }
.presence.shipment, .presence.help { background: var(--sand); color: var(--navy); }
.presence.uncertain { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.story-block { margin: 0 0 1.15rem; padding: 0 0 1.15rem; border-bottom: 1px solid var(--line); }
.story-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.story-block .year { font-weight: 700; color: var(--teal-dark); font-size: 0.88rem; margin: 0 0 0.3rem; }
.story-block p { margin: 0 0 0.6rem; color: var(--ink); }
.story-block .note {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--cream);
  border-left: 3px solid var(--teal);
  padding: 0.45rem 0.65rem;
  margin: 0 0 0.65rem;
}
.story-photo-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--navy-mid);
  margin: 0 0 0.65rem;
  position: relative;
  isolation: isolate;
}
.story-photo-wrap .story-photo,
.story-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 0;
  background: transparent;
  margin: 0;
}
.map-panel .links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.map-panel .links a {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
}
.map-panel .links a:hover { background: var(--teal-dark); color: #fff; }
.map-panel .links a.secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.map-panel .links a.secondary:hover { border-color: var(--teal); color: var(--teal-dark); }

.place-list { list-style: none; margin: 0; padding: 0; }
.place-list button {
  width: 100%;
  text-align: left;
  font: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
  cursor: pointer;
  color: var(--navy);
}
.place-list button:hover { color: var(--teal-dark); }
.place-list .pl-name { font-weight: 700; display: block; }
.place-list .pl-meta { font-size: 0.8rem; color: var(--muted); }

.sd-pin {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-sizing: border-box;
}
.sd-pin.abroad.visit { background: #2A9D8F; border: 2px solid #fff; box-shadow: 0 0 0 2px #2A9D8F, 0 2px 6px rgba(11,31,42,0.35); }
.sd-pin.abroad.shipment, .sd-pin.abroad.help { background: #fff; border: 3px solid #2A9D8F; box-shadow: 0 2px 6px rgba(11,31,42,0.35); }
.sd-pin.us.visit, .sd-pin.us.help { background: #0B1F2A; border: 2px solid #fff; box-shadow: 0 0 0 2px #0B1F2A, 0 2px 6px rgba(11,31,42,0.35); }
.sd-pin.us.shipment { background: #fff; border: 3px solid #0B1F2A; box-shadow: 0 2px 6px rgba(11,31,42,0.35); }
.sd-pin.uncertain::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px dashed rgba(11,31,42,0.35);
  border-radius: 50%;
}

.map-notes { padding: 2.2rem 0 3rem; }
.map-notes h2 { margin-top: 0; }
.map-notes h3 { font-size: 1.15rem; margin: 1.4rem 0 0.6rem; }
.unmapped { list-style: none; padding: 0; margin: 0; }
.unmapped li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0 0 0.6rem;
}
.unmapped strong { color: var(--navy); }
.unmapped .why { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0; }
.map-notes .fine { color: var(--muted); font-size: 0.92rem; }

@media (max-width: 800px) {
  .map-stage {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 0;
    margin-left: -1.1rem;
    margin-right: -1.1rem;
    border-left: 0;
    border-right: 0;
  }
  #impact-map { min-height: 62vh; }
  .map-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
  }
  .map-toolbar .legend { margin-left: 0; width: 100%; }
}

.leaflet-container { font-family: "Source Sans 3", system-ui, sans-serif; }
.leaflet-control-attribution { font-size: 10px; }

@media (max-width: 700px) {
  .map-hero { padding: 1.4rem 0 1rem; }
  .map-hero h1 { font-size: 1.85rem; }
  .map-hero .lede { font-size: 0.92rem; margin-bottom: 0.75rem; }
  .map-toolbar { padding: 0.6rem 0; }
  #impact-map { min-height: 58vh; }
}
