.map-intro{padding:2rem 0 1.25rem;background:var(--paper)}.map-heading{display:flex;justify-content:space-between;align-items:center;gap:2rem}.map-heading h1{font-size:2rem;line-height:1.2;max-width:44rem}.map-heading p{margin-top:.75rem}.directory-shortcut{flex:none;border:1px solid var(--green);border-radius:.5rem;padding:.75rem 1rem;text-decoration:none;font-size:.875rem}.directory-shortcut span,.directory-shortcut strong{display:block}.directory-shortcut strong{color:var(--green)}.directory-shortcut:hover{background:var(--mint)}.map-filter-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:1.25rem}.map-filter-row select{font:inherit;font-size:.875rem;background:var(--forest);color:white;border:0;border-radius:2rem;padding:.65rem 2.25rem .65rem 1rem;min-width:13rem}.map-filter-row p{font-size:.875rem;color:#526259}.interactive-map{position:relative;height:72svh;min-height:32rem;max-height:58rem;overflow:hidden;background:#e6eadf}.map-surface{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:grab}.map-surface.is-dragging{cursor:grabbing}.map-stage{position:absolute;left:0;top:0;transform-origin:0 0}.town-map-image{width:100%;height:100%;max-width:none;pointer-events:none;user-select:none}.map-pin{position:absolute;width:2.5rem;height:2.5rem;padding:.4rem;background:var(--category);border:3px solid white;border-radius:50%;display:grid;place-items:center;transform:translate(-50%,-50%) scale(var(--pin-scale,1));box-shadow:0 .15rem .5rem #20312960;z-index:2;transition:box-shadow .15s}.map-pin img{width:1.35rem;height:1.35rem;pointer-events:none}.map-pin:hover{box-shadow:0 0 0 3px #20312980;z-index:4}.map-pin[aria-pressed=true]{box-shadow:0 0 0 3px #203129,0 .3rem 1rem #20312970;z-index:5}.map-pin:focus-visible{outline:3px solid #203129;outline-offset:4px;z-index:6}.map-navigation{position:absolute;right:1.25rem;top:1.25rem;display:flex;align-items:center;border-radius:.5rem;background:#fff;box-shadow:0 .2rem 1rem #20312925;overflow:hidden;z-index:9}.map-navigation button{background:white;width:2.75rem;height:2.75rem;font-size:1.5rem;border-right:1px solid #20312920}.map-navigation button:hover{background:var(--mint)}.map-navigation button:disabled{opacity:.4;cursor:default}.map-navigation output{padding:0 .75rem;font-size:.75rem;min-width:4rem;text-align:center}.map-hint{position:absolute;left:1.25rem;top:1.25rem;padding:.5rem .75rem;background:#fffffff0;border-radius:.4rem;font-size:.75rem;pointer-events:none}.map-project-card{position:absolute;right:1.25rem;top:5rem;width:20rem;max-height:calc(100% - 6.25rem);overflow:auto;box-shadow:0 .6rem 2rem #20312935;background:white;border-radius:.75rem;z-index:10;animation:map-card-in .25s ease}.map-card-photo{height:10rem;width:100%;object-fit:cover}.map-card-content{padding:1rem}.map-project-card .card-labels{gap:.5rem;flex-wrap:wrap;margin-bottom:.75rem}.map-project-card .directory-category{font-size:.8125rem;padding:.15rem .6rem}.map-project-card h2{font-size:1.2rem;line-height:1.3}.map-project-card p{font-size:.875rem;line-height:1.5;margin:.5rem 0 1rem}.map-project-card .status{background:var(--paper)}.map-project-card .button{font-size:.875rem;min-height:2.75rem;padding:.5rem 1rem}.map-card-close{position:absolute;top:.5rem;right:.5rem;background:white;color:var(--forest);box-shadow:0 1px 5px #20312930;width:2.5rem;height:2.5rem;border-radius:50%;font-size:1.5rem;z-index:1}.map-key-section{display:flex;justify-content:space-between;align-items:flex-start;gap:2rem;padding-top:1.5rem;padding-bottom:2.5rem}.map-demo-note{color:#526259;font-size:.8125rem;max-width:22rem}.map-key{border:1px solid #20312920;border-radius:.5rem;padding:1rem 1.25rem;max-width:38rem}.map-key h2{font:700 .75rem/1.4 Inter,sans-serif;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.75rem}.map-key p{font-size:.75rem;color:#526259;margin-top:.75rem}#map-legend{display:flex;flex-wrap:wrap;gap:.75rem 1.25rem}#map-legend span{display:inline-flex;align-items:center;gap:.4rem;font-size:.8125rem}#map-legend img{width:1rem;height:1rem}#map-legend i{width:1.6rem;height:1.6rem;background:var(--category);border-radius:50%;display:grid;place-items:center}.map-nojs{position:absolute;bottom:1rem;left:1rem;background:white;padding:1rem}.map-nojs a{font-weight:700}@keyframes map-card-in{from{opacity:0;transform:translateY(.5rem)}to{opacity:1;transform:none}}
@media(max-width:800px){.map-heading{display:block}.map-heading h1{font-size:1.6rem}.directory-shortcut{border:0;padding:0;margin-top:.75rem;display:inline-block}.directory-shortcut span{display:inline;margin-right:.3rem}.directory-shortcut strong{display:inline}.map-heading p{display:none}.map-intro{padding:1.25rem 0 1rem}.map-filter-row{margin-top:1rem;flex-wrap:wrap;gap:.5rem}.map-filter-row select{min-width:12rem}.map-filter-row p{font-size:.75rem}.interactive-map{height:72svh;min-height:32rem;max-height:45rem}.map-hint{display:none}.map-navigation{top:.75rem;right:.75rem}.map-project-card{left:.75rem;right:.75rem;bottom:.75rem;top:auto;width:auto;max-height:45%;border-radius:.75rem}.map-card-photo{width:5.5rem;height:6rem;border-radius:.35rem;margin:1rem 0 1rem 1rem;float:left}.map-card-content{margin-left:6.5rem;padding:1rem 2.5rem 1rem .75rem}.map-card-content p{display:none}.map-project-card h2{font-size:1rem;margin-bottom:.5rem}.map-project-card .card-labels{margin-bottom:.4rem}.map-project-card .directory-category{font-size:.7rem}.map-project-card .button{font-size:.8125rem;padding:.4rem .75rem;min-height:2.25rem}.map-card-close{width:2rem;height:2rem;font-size:1.25rem}.map-key-section{flex-direction:column;gap:1rem}.map-key{width:100%;max-width:none}.map-demo-note{max-width:none}}
@media(prefers-reduced-motion:reduce){.map-project-card{animation:none}}
.map-project-card .status{background:white}.map-fallback{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
@media(max-width:800px){.interactive-map{height:calc(100svh - 18rem + 200px);min-height:26rem;max-height:calc(45rem + 200px)}}
/* Full-width, left-aligned legend, with the demonstration note below. */
.map-key-section{display:block}.map-key{max-width:none;width:100%;display:flex;align-items:center;gap:1.25rem;flex-wrap:wrap}.map-key h2{margin:0;flex:none}#map-legend{flex:1;flex-wrap:nowrap;justify-content:space-between;gap:1rem}#map-legend>span{white-space:nowrap}.map-key>p{flex-basis:100%;margin:0}.map-demo-note{max-width:none;margin-top:.75rem}
@media(max-width:800px){.map-key{display:block;overflow:hidden}.map-key h2{margin-bottom:.75rem}#map-legend{overflow-x:auto;padding-bottom:.75rem;justify-content:flex-start}.map-key>p{margin-top:.5rem}}

/* Shared category icons and colours for filters, pins and legend. */
#map-category-filters{display:flex;flex-wrap:wrap;overflow:visible;gap:.75rem;margin-top:1rem;padding:.3rem .3rem .5rem}
.map-active-filter{display:inline-grid;place-items:center;width:1.25rem;height:1.25rem;border-radius:50%;background:#d1f3d6;color:var(--forest);font-size:.75rem}
/* Teardrop pins: size, white ring and shadow match the design prototype. */
.map-pin{width:44px;height:55px;border:0;padding:0;background:transparent;border-radius:0;box-shadow:none;transform:translate(-50%,-100%) scale(var(--pin-scale,1));transform-origin:50% 100%;isolation:isolate;overflow:visible;transition:transform .18s cubic-bezier(.22,1,.36,1)}
.map-pin::after{content:none}
.map-pin-face{position:relative;width:100%;height:100%;display:block;background:none;border:0;border-radius:0;box-shadow:none;filter:drop-shadow(0 2px 2px #102019d9) drop-shadow(0 6px 7px #102019b3);animation:map-pin-float 3s ease-in-out infinite;animation-delay:var(--float-delay,0s)}
.map-pin-shape{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.map-pin-shape path{fill:var(--category);fill-opacity:1;stroke:#fff;stroke-width:6px;stroke-linejoin:round;stroke-linecap:round;transition:fill .2s,fill-opacity .2s}
.map-pin img{position:absolute;top:14px;left:50%;transform:translateX(-50%);width:16px;height:16px;object-fit:contain;pointer-events:none}
.map-pin:hover{box-shadow:none;z-index:4;transform:translate(-50%,-100%) scale(calc(var(--pin-scale,1)*1.22))}.map-pin:hover .map-pin-face{filter:drop-shadow(0 2px 2px #102019d9) drop-shadow(0 6px 7px #102019b3);animation-play-state:paused}.map-pin:hover .map-pin-shape path{fill:var(--category);fill-opacity:1}
.map-pin[aria-pressed=true]{box-shadow:none}.map-pin[aria-pressed=true] .map-pin-face{animation:none;filter:drop-shadow(0 0 2px #d1f3d6) drop-shadow(0 2px 2px #102019d9) drop-shadow(0 6px 7px #102019b3)}.map-pin[aria-pressed=true] .map-pin-shape path{fill:var(--category);fill-opacity:1}
.map-pin:focus-visible{outline:none}.map-pin:focus-visible .map-pin-face{animation-play-state:paused;filter:drop-shadow(0 2px 2px #102019d9) drop-shadow(0 6px 7px #102019b3) drop-shadow(0 0 3px #fff)}
@keyframes map-pin-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@media(prefers-reduced-motion:reduce){.map-pin-face{animation:none}.map-pin-shape path{transition:none}}
.map-key{display:block;padding:1.25rem}.map-key h2{margin-bottom:1.25rem}#map-legend{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1.25rem .9rem;overflow:visible;padding:0}#map-legend>span{white-space:normal;line-height:1.35;gap:.6rem;min-width:0}#map-legend i{background:var(--category);width:2.5rem;height:2.5rem;flex:none}#map-legend img{width:1.75rem;height:1.75rem;object-fit:contain}.map-key>p{margin-top:1.25rem}
@media(max-width:1200px){#map-legend{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:900px){#map-legend{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:540px){#map-legend{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.map-key{padding:1rem}.map-filter-row{flex-wrap:nowrap}.map-filter-row p{font-size:.75rem;text-align:right}.map-filter-row .filter-toggle{font-size:.8125rem}#map-category-filters .category-filter{flex:initial}.map-pin{width:36px;height:45px}.map-pin img{top:11px;width:13px;height:13px}}

/* On wide monitors, reveal more map vertically as its width increases. */
@media(min-width:801px){.interactive-map{height:78svh;max-height:62rem}}
@media(min-width:90rem){.interactive-map{height:clamp(32rem, calc(78svh + 25vw - 22.5rem), 82rem);max-height:none}}

/* Touch-friendly pin hit targets without changing visual size. */
.map-pin::before{content:"";position:absolute;left:50%;bottom:0;width:52px;height:52px;transform:translate(-50%,0);border-radius:50%}
@media(max-width:540px){.map-pin::before{width:44px;height:44px}}
.town-map-image{aspect-ratio:10000 / 5625;object-fit:fill}
.map-stage{width:10000px;height:5625px;aspect-ratio:10000 / 5625}
.map-stage.is-detailed .town-map-image{opacity:0}
#map-tiles{position:absolute;inset:0;z-index:1;pointer-events:none}
.map-tile{position:absolute;width:2000px;height:1875px;max-width:none;display:block;pointer-events:none;opacity:0}
.map-tile.ready{opacity:1}

/* Pointer alternative to dragging (WCAG 2.5.7), same control chrome as zoom. */
.map-navigation--pan{top:4.5rem}
.map-project-card{top:8rem;max-height:calc(100% - 9.25rem)}
@media(max-width:800px){
  .map-navigation--pan{top:3.75rem}
  .map-project-card{top:auto;max-height:45%}
}

/* Page can still scroll over the map; two-finger / modifier gestures take over. */
.map-surface{touch-action:pan-y}
.map-surface.is-dragging,
.map-surface.is-gesturing{touch-action:none;cursor:grabbing}
.map-hint--touch{display:none}
@media(max-width:800px){
  .map-hint--desktop{display:none}
  .map-hint--touch{display:block;left:.75rem;top:auto;bottom:.75rem;z-index:9}
}
.map-scroll-guard{
  position:absolute;
  inset:0;
  z-index:8;
  display:grid;
  place-items:center;
  background:rgba(32,49,41,.42);
  color:#fff;
  pointer-events:none;
  opacity:0;
  visibility:hidden;
  transition:opacity .2s ease,visibility .2s ease
}
.map-scroll-guard.is-visible{opacity:1;visibility:visible}
.map-scroll-guard p{
  display:none;
  margin:0;
  padding:.85rem 1.25rem;
  max-width:18rem;
  text-align:center;
  background:rgba(3,19,49,.78);
  border-radius:.5rem;
  font:700 1rem/1.35 Poppins,Arial,sans-serif
}
.map-scroll-guard[data-mode=wheel] [data-guard=wheel],
.map-scroll-guard[data-mode=wheel-mac] [data-guard=wheel-mac],
.map-scroll-guard[data-mode=touch] [data-guard=touch]{display:block}
@media(prefers-reduced-motion:reduce){
  .map-scroll-guard{transition:none}
}

/* Map page only: header scrolls away so it does not cover the map. */
html:has(body.map-page){scroll-padding-top:0}
body.map-page .site-header{position:relative}
body.map-page.mobile-menu-open .site-header{position:fixed}

/* Map drag issue fix */
#map-surface{user-select:none;-webkit-user-select:none}
#map-surface img{-webkit-user-drag:none}
