:root { --navy: #33477d; --teal: #0bb8c6; --yellow: #ffcf63; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; color: #111; background: #f4f6fa; font: 400 14px/1.4 "DM Sans", system-ui, sans-serif; }
button, select { font: inherit; }
button, select, a { touch-action: manipulation; }
.map-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: #fff; }
.school-picker { flex: 1 1 190px; display: grid; gap: 3px; color: var(--navy); font-size: 12px; font-weight: 700; min-width: 0; }
select { min-width: 0; width: 100%; max-width: 100%; min-height: 44px; padding: 8px; border: 1px solid #aab4cc; border-radius: 4px; color: var(--navy); background: #fff; }
button { min-height: 44px; padding: 10px 12px; border: 0; border-radius: 4px; background: var(--navy); color: #fff; cursor: pointer; }
button:hover { background: #26365f; }
button:disabled { opacity: .55; cursor: default; }
#drexel-view[aria-pressed="true"] { color: var(--navy); background: var(--yellow); }
#school-map { flex: 1; min-height: 160px; }
.map-message { margin: 0; padding: 6px 12px 10px; color: var(--navy); font-size: 12px; }
.map-key { display: flex; flex-wrap: wrap; gap: 5px 16px; padding: 10px 12px 4px; font-size: 11px; color: #35415b; }
.map-key span { display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 16px; height: 12px; border: 1px solid var(--navy); }
.neighborhood { background: #71cdd5; }
.citywide { background: #d5eef0; }
.connection { border: 0; height: 0; border-top: 2px dashed var(--navy); }
.school-pin { position: relative; }
.school-pin img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 2px #0005); }
.pin-count { position: absolute; top: 13%; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 25px; height: 25px; border: 2px solid #fff; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 700; font-size: 13px; }
.drexel-pin { display: grid; place-items: center; border: 3px solid #fff; border-radius: 24px; background: var(--navy); color: var(--yellow); font-weight: 700; box-shadow: 0 2px 5px #0005; }
.leaflet-popup-content-wrapper { border-radius: 8px; }
.leaflet-container .leaflet-popup-content { margin: 16px; }
.school-popup { width: 280px; max-width: 100%; }
.school-popup h2 { margin: 0; padding-right: 18px; color: var(--navy); font-size: 18px; line-height: 1.25; }
.school-popup .catchment { margin: 8px 0 14px; color: #4a566d; font-size: 13px; }
.person { display: flex; align-items: flex-start; gap: 12px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid #dce2ed; }
.person img { width: 88px; height: 116px; object-fit: cover; object-position: center top; border-radius: 5px; flex: none; background: #748fc8; }
.person figcaption { display: grid; gap: 6px; font: 400 14px/1.45 "DM Sans", system-ui, sans-serif; }
.person strong { color: var(--navy); font-size: 16px; }
@media (max-width: 480px) {
  .map-toolbar { gap: 6px; padding: 8px; }
  .school-picker { flex-basis: 100%; }
  .map-toolbar button { flex: 1; }
  .school-popup { width: 240px; }
  .person img { width: 80px; height: 106px; }
  .map-key { gap: 4px 12px; padding: 8px 10px 4px; }
  .map-message { padding-inline: 10px; }
}

.leaflet-container a.leaflet-popup-close-button { width: 44px; height: 44px; font-size: 22px; line-height: 38px; }

/* Keep each marker’s hit area while opening up the web of connections. */
.is-overview .school-pin img { transform: scale(.65); transform-origin: 50% 100%; }
.is-overview .pin-count { top: auto; bottom: 24%; width: 18px; height: 18px; border-width: 1px; font-size: 11px; }

::selection { background: var(--yellow); color: #111; }
button:focus-visible, select:focus-visible, a:focus-visible,
.leaflet-marker-icon:focus-visible, .leaflet-popup-content:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff;
}
