/* Hallmark · shape: app screen (home-page section: the coast's towns on a map above the town list) · genre: editorial · theme: locked (Costa Estates --cse-* tokens printed by the plugin) · job: browse homes by town · idea: "the coast read as towns, each opening onto its homes, cheapest first" · vibe: "calm coastal paper, teal signal, serif heads"
 * paper: --cse-surface-alt box on the white --cse-surface band · accent: --cse-primary · display: Fraunces · body: Instrument Sans · hero: none (section, not a page) · nav: the site's own · footer: the site's own · imagery: the listings' own photos from the feed · signature: the town pins and the town list moving together
 * surface: absolute white band (the site's --cse-surface token), beige box · axes: beige box/Fraunces/teal · posture: boxed section · contrast: pass · fold: n/a · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, a map can be a gimmick; it earns its place by answering "what is for sale where" with real counts and prices per town, and it never invents house positions the feed does not give */
/* Hallmark · waive 7b · --cse-surface is #ffffff on the live site's token sheet · the section sits between two existing white bands of the same homepage and must match them */
/* Hallmark · waive 39b · map pins are drawn 18 to 26px on a phone and 22 to 42px on a desktop so their area can show how many homes a town has; each carries a hit area via ::before of 44px, capped at the distance to the next pin · the pins are data marks on the coast map, not buttons in a form */
/* Hallmark · dismissed F25 · on a phone the list shows the six busiest towns and a "Show all" button; nothing is lost */
/* Hallmark · dismissed 28a · the first image on the page is far above this section, so lazy loading is right */

/*
 * Costa Estates: the home-page map ([costa_estates_home_map]).
 * Approved design: PropertyManagement/docs/mockups/costa-home-map (critic 8.1/10, 2026-12-04).
 * Site colours, type and radii come from the plugin's --cse-* tokens; the
 * map's own paint lives below as --ct-map-*, read by home-map.js when it
 * builds the map style.
 */

.ct-map {
  --ct-map-land: #fbf9f4;
  --ct-map-water: #cddfdc;
  --ct-map-park: #e8ede3;
  --ct-map-wood: #e1e8dc;
  --ct-map-built: #f1ece2;
  --ct-map-building: #e9e2d5;
  --ct-map-road: #ffffff;
  --ct-map-road-casing: #e3dccf;
  --ct-map-major: #f6eedd;
  --ct-shadow-pin: 0 1px 2px color-mix(in srgb, var(--cse-slate) 18%, transparent), 0 4px 12px -4px color-mix(in srgb, var(--cse-slate) 30%, transparent);
  /* Never a share of the screen: phone browsers resize the screen while you scroll. */
  --ct-map-h: 400px;
  --ct-box-radius: 16px;
  --ct-dur: 160ms;
}

/* =================================================================== band */

/* A white band like the "about" band above it, carrying a beige box. The
   white ground comes from the home page's .ct-h::before; the about band's
   bottom padding is the gap above, so this one pads only below. */
body.home .entry-content > .ct-map {
  --ct-h-band: clamp(48px, 7vw, 96px);
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: 0 0 var(--ct-h-band);
  font-family: var(--cse-font);
  font-size: max(1rem, 16px);
  line-height: 1.65;
  color: var(--cse-text);
}
.ct-map *, .ct-map *::before, .ct-map *::after { box-sizing: border-box; }
.ct-map [hidden] { display: none !important; }
/* Low weight (:where), so a button's own class sets its size and weight; the
   pins are inside the map library's box, whose font must not reach them. */
:where(.ct-map) button, :where(.ct-map) select { font: inherit; }
.ct-map .ct-pin { font-family: var(--cse-font); }
.ct-map img { max-width: 100%; display: block; }
.ct-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The "Find your town" band after the map turns white (it was beige), and
   needs no second top margin: the map band's bottom padding is the gap. */
body.home .entry-content > .ct-map ~ .wp-block-group.ct-h-regions::before { background: var(--cse-surface); }
body.home .entry-content > .ct-map + .wp-block-group.ct-h-regions { padding-top: 0; }

/* =================================================================== MAP */

.ct-map__box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 20px 16px 16px;
  border-radius: var(--ct-box-radius);
  background: var(--cse-surface-alt);
}

.ct-map__head { order: 1; }
.ct-map__filters { order: 2; }
.ct-map__stage { order: 3; }
.ct-map__panel { order: 4; }
.ct-map__note { order: 5; }
.ct-map__head .ct-h-title { margin-bottom: 12px; }
.ct-map__lead { max-width: 34rem; margin: 0 !important; }

/* ---------------------------------------------------------------- filters */
.ct-map__filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}
.ct-field { display: grid; gap: 4px; min-width: 0; }
.ct-field__label { font-size: 14px; font-weight: 500; color: var(--cse-ink); }
.ct-select {
  appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--cse-field-border);
  border-radius: var(--cse-radius);
  background:
    var(--cse-surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2312201f' stroke-width='1.6'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: var(--cse-ink);
  font-size: 15px;
  cursor: pointer;
  transition: border-color var(--ct-dur) var(--cse-ease), box-shadow var(--ct-dur) var(--cse-ease);
}
.ct-select:hover { border-color: var(--cse-ink); }
.ct-select:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: 1px; transition: none; }
.ct-select:disabled { opacity: .55; cursor: not-allowed; }
.ct-select.is-set { border-color: var(--cse-primary); box-shadow: inset 0 0 0 1px var(--cse-primary); }

/* ------------------------------------------------------------------ panel */
.ct-map__panel { display: grid; align-content: start; gap: 8px; min-height: 0; }

.ct-map__count {
  margin: 0 !important;
  font-size: 14px;
  color: var(--cse-muted);
  font-variant-numeric: tabular-nums;
}

.ct-map__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--cse-line); }
.ct-map__list > li { border-bottom: 1px solid var(--cse-line); }

/* A town row: name and price on the left, the count on the right. */
.ct-town {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  min-height: 56px;
  padding: 8px 12px;
  margin-inline: -12px;
  border-radius: var(--cse-radius);
  color: inherit;
  text-decoration: none;
  transition: background-color var(--ct-dur) var(--cse-ease);
}
.ct-town.is-hot { background: var(--cse-surface); }
.ct-town:active { background: var(--cse-panel-tint); }
.ct-town:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: -2px; transition: none; }
.ct-town__name { display: block; color: var(--cse-ink); font-size: 16px; font-weight: 600; line-height: 1.3; }
.ct-town__from { display: block; font-size: 14px; line-height: 1.4; color: var(--cse-muted); font-variant-numeric: tabular-nums; }
.ct-town__n { color: var(--cse-ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ct-town.is-none .ct-town__name, .ct-town.is-none .ct-town__n { color: var(--cse-muted); font-weight: 500; }

/* Show more / Show fewer under the town list, side by side. */
.ct-map__list-more { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.ct-map__more {
  justify-self: start;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--cse-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.ct-map__more:hover { color: var(--cse-primary-hover); }
.ct-map__more:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: 2px; border-radius: 2px; }

/* Town view: back, name, homes, the way through to the full search. */
.ct-map__back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  margin-left: -8px;
  padding: 0 12px 0 4px;
  border: 0;
  border-radius: var(--cse-radius);
  background: none;
  color: var(--cse-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--ct-dur) var(--cse-ease);
}
.ct-map__back svg { width: 18px; height: 18px; }
.ct-map__back:hover { background: var(--cse-surface); }
.ct-map__back:active { background: var(--cse-panel-tint); }
.ct-map__back:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: 0; transition: none; }

.ct-map__town-head { display: grid; gap: 2px; }
.ct-map__town-name { scroll-margin-top: 16px; font-size: clamp(26px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -0.01em; }

.ct-home {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  column-gap: 16px;
  align-items: center;
  padding: 8px 12px;
  margin-inline: -12px;
  border-radius: var(--cse-radius);
  color: inherit;
  text-decoration: none;
  transition: background-color var(--ct-dur) var(--cse-ease);
}

.ct-home:active { background: var(--cse-panel-tint); }
.ct-home:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: -2px; transition: none; }
/* A home with no photo keeps the row's rhythm. */
.ct-home__img--none { display: block; }
.ct-home__img {
  width: 104px;
  aspect-ratio: 4 / 3;
  border-radius: var(--cse-radius);
  object-fit: cover;
  background: var(--cse-line);
}
.ct-home__body { display: grid; gap: 1px; min-width: 0; }
.ct-home__price { color: var(--cse-ink); font-size: 17px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.ct-home__was { margin-left: 8px; color: var(--cse-muted); font-size: 14px; font-weight: 400; text-decoration: line-through; }
.ct-home__type { overflow: hidden; color: var(--cse-ink); font-size: 15px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.ct-home__specs { color: var(--cse-muted); font-size: 14px; line-height: 1.4; font-variant-numeric: tabular-nums; }

/* The one primary action in the section. */
.ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--cse-radius);
  background: var(--cse-primary);
  color: var(--cse-surface);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ct-dur) var(--cse-ease), transform var(--ct-dur) var(--cse-ease);
}
.ct-btn:hover { background: var(--cse-primary-hover); }
.ct-btn:active { transform: translateY(1px); }
.ct-btn:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: 3px; transition: none; }
.ct-btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.ct-map__cta { margin-top: 8px; width: 100%; }

.ct-map__empty { display: grid; gap: 8px; justify-items: start; padding: 16px 0; }
.ct-map__empty p { margin: 0 !important; color: var(--cse-ink); }

/* -------------------------------------------------------------------- map */
.ct-map__stage {
  position: relative;
  height: 340px;
  overflow: hidden;
  border: 1px solid var(--cse-line);
  border-radius: var(--cse-radius-lg);
  background: var(--ct-map-land);
  isolation: isolate;
}
/* MapLibre sets position: relative on its container; keep it filling the stage. */
.ct-map__stage > .ct-map__canvas { position: absolute; inset: 0; }

/* Loading and error states sit under the canvas. */
.ct-map__state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--cse-muted);
  font-size: 15px;
}
.ct-map__state strong { color: var(--cse-ink); font-weight: 600; }
.ct-map__state--loading { background: linear-gradient(100deg, var(--ct-map-land) 30%, var(--cse-surface-alt) 50%, var(--ct-map-land) 70%) 0 0 / 300% 100%; animation: ct-shimmer 1.6s linear infinite; }
@keyframes ct-shimmer { to { background-position: -150% 0; } }
.is-ready .ct-map__state--loading { display: none; }
/* No map: a short notice, the list carries the section. */
.ct-map__stage.is-failed { height: auto; }
.is-failed .ct-map__canvas, .is-failed .ct-map__reset { display: none !important; }
.ct-map:has(.is-failed) .ct-map__credit { display: none; }
.ct-map__state--failed { position: static; padding: 20px; }
.ct-map__state--failed a { white-space: nowrap; color: var(--cse-primary); text-decoration: underline; text-underline-offset: 0.2em; }
.ct-map__state--failed a:hover { color: var(--cse-primary-hover); }
.ct-map__state--failed a:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: 2px; border-radius: 2px; }

/* Whole-coast button over the map. */
.ct-map__reset {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--cse-line);
  border-radius: 999px;
  background: var(--cse-surface);
  color: var(--cse-ink);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--ct-shadow-pin);
  cursor: pointer;
  transition: border-color var(--ct-dur) var(--cse-ease), opacity var(--ct-dur) var(--cse-ease);
}
.ct-map__reset svg { width: 18px; height: 18px; }
.ct-map__reset:hover { border-color: var(--cse-ink); }
.ct-map__reset:active { transform: translateY(1px); }
.ct-map__reset:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: 2px; transition: none; }

/* Towns outside the view: a chip on that edge, tap to see the whole coast. */
.ct-map__more-chip {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  max-width: calc(100% - 64px);
  padding: 0 8px 0 12px;
  border: 1px solid var(--cse-primary);
  border-radius: 999px;
  background: var(--cse-surface);
  color: var(--cse-primary);
  font-size: 13px;
  font-weight: 600;
  /* Two lines rather than a cut: the town it points to is the useful part. */
  padding-block: 6px;
  line-height: 1.25;
  text-align: start;
  box-shadow: var(--ct-shadow-pin);
  cursor: pointer;
  transition: background-color var(--ct-dur) var(--cse-ease);
}
.ct-map__more-chip svg { flex: none; width: 16px; height: 16px; }
.ct-map__more-chip[data-side="west"] { right: auto; left: 12px; flex-direction: row-reverse; padding: 6px 12px 6px 8px; }
.ct-map__more-chip[data-side="west"] svg { transform: scaleX(-1); }
.ct-map__more-chip:hover { background: var(--cse-panel-tint); }
.ct-map__more-chip:active { transform: translateY(1px); }
.ct-map__more-chip:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: 2px; transition: none; }
.is-failed .ct-map__more-chip { display: none !important; }
/* Room for the chip: the map's own credit button moves up. */
.ct-map__stage:has([data-ct-more]:not([hidden])) .maplibregl-ctrl-bottom-right { bottom: 52px; }

/* ------------------------------------------------------------------- pins
   A pin is a round count sized by how many homes the town has, with the
   town's name in a small tag under it. */
.ct-pin {
  --size: 32px;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  padding: 0;
  border: 2px solid var(--cse-primary);
  border-radius: 999px;
  background: var(--cse-surface);
  color: var(--cse-primary);
  font-family: var(--cse-font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--ct-shadow-pin);
  cursor: pointer;
  transition: transform var(--ct-dur) var(--cse-ease), background-color var(--ct-dur) var(--cse-ease), border-color var(--ct-dur) var(--cse-ease), color var(--ct-dur) var(--cse-ease);
}
.ct-pin__name {
  position: absolute;
  top: calc(100% + 6px + var(--ring, 0px));
  left: 50%;
  padding: 2px 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--cse-surface) 92%, transparent);
  color: var(--cse-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--cse-slate) 16%, transparent);
  transform: translateX(calc(-50% + var(--tag-dx, 0px)));
  pointer-events: none;
}
.ct-pin[data-tag="t"] .ct-pin__name { top: auto; bottom: calc(100% + 6px + var(--ring, 0px)); }
.ct-pin[data-tag="r"] .ct-pin__name { top: 50%; left: calc(100% + 6px + var(--ring, 0px)); transform: translateY(-50%); }
.ct-pin[data-tag="l"] .ct-pin__name { top: 50%; left: auto; right: calc(100% + 6px + var(--ring, 0px)); transform: translateY(-50%); }
.ct-pin[data-tag="br"] .ct-pin__name { top: calc(88% + var(--ring, 0px)); left: calc(88% + var(--ring, 0px)); transform: none; }
.ct-pin[data-tag="bl"] .ct-pin__name { top: calc(88% + var(--ring, 0px)); left: auto; right: calc(88% + var(--ring, 0px)); transform: none; }
.ct-pin[data-tag="tr"] .ct-pin__name { top: auto; bottom: calc(88% + var(--ring, 0px)); left: calc(88% + var(--ring, 0px)); transform: none; }
.ct-pin[data-tag="tl"] .ct-pin__name { top: auto; bottom: calc(88% + var(--ring, 0px)); left: auto; right: calc(88% + var(--ring, 0px)); transform: none; }
.ct-pin[data-tag="b2"] .ct-pin__name { top: calc(100% + 28px + var(--ring, 0px)); }
/* The lower tag hangs from its disc on a thin line, so it cannot read as a neighbour's. */
.ct-pin[data-tag="b2"] .ct-pin__name::before { content: ""; position: absolute; bottom: 100%; left: calc(50% - var(--tag-dx, 0px)); width: 1px; height: 22px; background: var(--cse-primary); }
.ct-pin.no-label:not(:hover):not(:focus-visible):not(.is-hot):not(.is-on) .ct-pin__name { display: none; }
.ct-pin.has-tag { z-index: 2; }
.ct-pin.is-hot { z-index: 4; background: var(--cse-panel-tint); transform: scale(1.08); }
.ct-pin:active { transform: scale(1); }
.ct-pin:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: 3px; transition: none; }
.ct-pin.is-on { z-index: 5; background: var(--cse-primary); color: var(--cse-surface); }
.ct-pin.is-on .ct-pin__name { background: var(--cse-primary); color: var(--cse-surface); }
.ct-pin.is-none { border-width: 2px; border-color: var(--cse-surface); background: var(--cse-field-border); box-shadow: none; }
.ct-pin.is-none .ct-pin__n { display: none; }
/* Every pin, however small its circle, is a 44px target. */
.ct-pin::before { content: ""; position: absolute; inset: min(0px, calc((var(--size) - var(--hit, 44px)) / 2)); border-radius: 999px; }

/* Towns too close to show apart: a white count with a double ring (solid
   teal is kept for the chosen town), click to zoom in. */
.ct-pin--group {
  /* The outer ring is drawn 4px outside the disc: names keep clear of it. */
  --ring: 4px;
  border: 2px solid var(--cse-primary);
  background: var(--cse-surface);
  color: var(--cse-primary);
  box-shadow: 0 0 0 2px var(--cse-surface), 0 0 0 4px var(--cse-primary), var(--ct-shadow-pin);
}
.ct-pin--group.is-hot { background: var(--cse-panel-tint); }

/* --------------------------------------------------- map library chrome */
.ct-map .maplibregl-ctrl-group { border-radius: var(--cse-radius-lg); box-shadow: var(--ct-shadow-pin); overflow: hidden; }
.ct-map .maplibregl-ctrl-group button { width: 40px; height: 40px; }
.ct-map .maplibregl-ctrl-group button:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: -2px; box-shadow: none; }
.ct-map .maplibregl-ctrl-attrib { font-family: var(--cse-font); font-size: 11px; }
/* The credits button in the site's colours, not the library's black disc. */
.ct-map .maplibregl-ctrl-attrib.maplibregl-compact { background: var(--cse-surface); box-shadow: var(--ct-shadow-pin); }
.ct-map .maplibregl-ctrl-attrib-button { background-color: var(--cse-surface); filter: opacity(.6); }
.ct-map .maplibregl-ctrl-attrib-button:focus-visible { outline: 2px solid var(--cse-primary); outline-offset: 2px; }
.ct-pin.is-cut { visibility: hidden; }
/* The browser may scroll the page from the map, vertically only: home-map.js
   (touchGate) decides per swipe whether the page or the map has the finger. */
.ct-map .maplibregl-canvas-container,
.ct-map .maplibregl-canvas-container .maplibregl-canvas { touch-action: pan-y !important; }
/* A finger held on the map: the map has it, in every direction. */
.ct-map__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--cse-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ct-dur) ease-out;
}
.ct-map__stage.is-held::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ct-map__stage::after { transition: none; } }
/* Hover only where there is a pointer that hovers: a tap must not leave a row or pin lit. */
@media (hover: hover) {
  .ct-town:hover, .ct-home:hover { background: var(--cse-surface); }
  .ct-pin:hover { z-index: 4; background: var(--cse-panel-tint); transform: scale(1.08); }
  .ct-pin--group:hover { background: var(--cse-panel-tint); }
}

.ct-map__note { margin: 0 !important; font-size: 13px; line-height: 1.5; color: var(--cse-muted); }

/* ----------------------------------------------------------- tablets+ */
@media (min-width: 600px) {
  .ct-map__box { padding: 28px; gap: 24px; }
  .ct-map__stage { height: min(var(--ct-map-h), 520px); }
}

/* Desktop: the list beside the map, both the same height. */
@media (min-width: 922px) {
  /* Heading and filters across the top, the map the full width of the box,
     the towns (or one town's homes) in three columns under it. */
  .ct-map__box {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 40px;
    row-gap: 24px;
    padding: clamp(28px, 3vw, 40px);
  }
  .ct-map__head { grid-column: 1; grid-row: 1; max-width: 40rem; }
  .ct-map__filters { grid-column: 2; grid-row: 1; align-self: end; width: 28rem; }
  .ct-map__stage { grid-column: 1 / -1; grid-row: 2; height: var(--ct-map-h); }
  .ct-map__panel { grid-column: 1 / -1; grid-row: 3; }
  .ct-map__note { grid-column: 1 / -1; grid-row: 4; }

  .ct-map__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; border-top: 0; }
  .ct-map__list > li { border-top: 1px solid var(--cse-line); border-bottom: 0; }
  .ct-map__town-head { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 16px; }
  .ct-map__cta { justify-self: start; width: auto; }
  /* One town's homes: two columns, photos big enough to judge a home by. */
  .ct-map__list--homes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-map__list--homes .ct-home { grid-template-columns: 160px minmax(0, 1fr); }
  .ct-map__list--homes .ct-home__img { width: 160px; }
  .ct-map__list--homes .ct-home__price { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-pin, .ct-town, .ct-home, .ct-btn, .ct-select, .ct-map__reset, .ct-map__back { transition: none; }
  .ct-pin:hover, .ct-pin.is-hot, .ct-pin:active { transform: none; }
  .ct-map__state--loading { animation: none; }
}

/* After the map box the next white band needs no second top margin. */

/* ------------------------------------------------------- inside the theme
   Astra styles every list, link and button in the page content (list
   padding, underlined links, a filled background on any button that is
   hovered or focused). These rules put the section's own look back, one
   step more specific, in every state. */
.ct-map .ct-map__list { margin: 0; padding: 0; }
.ct-map .ct-map__list > li { margin: 0; }
.ct-map a.ct-town, .ct-map a.ct-home, .ct-map a.ct-btn { text-decoration: none; }
.ct-map a.ct-btn, .ct-map a.ct-btn:hover, .ct-map a.ct-btn:focus { color: var(--cse-surface); }
.ct-map .ct-select { font-size: 15px; line-height: 1.2; box-shadow: none; }
.ct-map .ct-select.is-set { box-shadow: inset 0 0 0 1px var(--cse-primary); }
.home .ct-map .ct-map__head .ct-h-title { margin-bottom: 12px; }
.ct-map .ct-map__town-name { margin: 0; font-family: var(--cse-font-display); font-weight: 400; color: var(--cse-ink); text-transform: none; }

.ct-map .ct-map__more,
.ct-map .ct-map__more:hover,
.ct-map .ct-map__more:focus,
.ct-map .ct-map__more:active { border: 0; border-radius: 2px; background: none; box-shadow: none; }
.ct-map .ct-map__more, .ct-map .ct-map__more:focus { color: var(--cse-primary); }
.ct-map .ct-map__more:hover { color: var(--cse-primary-hover); }

.ct-map .ct-map__back,
.ct-map .ct-map__back:focus { border: 0; background: none; box-shadow: none; color: var(--cse-primary); }
.ct-map .ct-map__back:hover { background: var(--cse-surface); color: var(--cse-primary); }
.ct-map .ct-map__back:active { background: var(--cse-panel-tint); }

.ct-map .ct-map__reset,
.ct-map .ct-map__reset:focus { border: 1px solid var(--cse-line); background: var(--cse-surface); color: var(--cse-ink); box-shadow: var(--ct-shadow-pin); }
.ct-map .ct-map__reset:hover { border-color: var(--cse-ink); background: var(--cse-surface); color: var(--cse-ink); }

.ct-map .ct-map__more-chip,
.ct-map .ct-map__more-chip:focus { border: 1px solid var(--cse-primary); background: var(--cse-surface); color: var(--cse-primary); box-shadow: var(--ct-shadow-pin); }
.ct-map .ct-map__more-chip:hover { border-color: var(--cse-primary); background: var(--cse-panel-tint); color: var(--cse-primary); }

.ct-map .ct-pin,
.ct-map .ct-pin:focus { padding: 0; border: 2px solid var(--cse-primary); border-radius: 999px; background: var(--cse-surface); color: var(--cse-primary); box-shadow: var(--ct-shadow-pin); }
.ct-map .ct-pin:hover,
.ct-map .ct-pin.is-hot { border-color: var(--cse-primary); background: var(--cse-panel-tint); color: var(--cse-primary); }
.ct-map .ct-pin.is-on,
.ct-map .ct-pin.is-on:hover,
.ct-map .ct-pin.is-on:focus { border-color: var(--cse-primary); background: var(--cse-primary); color: var(--cse-surface); }
.ct-map .ct-pin.is-none,
.ct-map .ct-pin.is-none:hover,
.ct-map .ct-pin.is-none:focus { border-color: var(--cse-surface); background: var(--cse-field-border); box-shadow: none; }
.ct-map .ct-pin--group,
.ct-map .ct-pin--group:focus { box-shadow: 0 0 0 2px var(--cse-surface), 0 0 0 4px var(--cse-primary), var(--ct-shadow-pin); }
.ct-map .ct-pin--group:hover,
.ct-map .ct-pin--group.is-hot { background: var(--cse-panel-tint); box-shadow: 0 0 0 2px var(--cse-surface), 0 0 0 4px var(--cse-primary), var(--ct-shadow-pin); }

/* The map's own zoom and credits buttons, as the library draws them. */
.ct-map .maplibregl-ctrl button,
.ct-map .maplibregl-ctrl button:focus { border: 0; border-radius: 0; background-color: transparent; box-shadow: none; color: var(--cse-ink); }
.ct-map .maplibregl-ctrl button:not(:disabled):hover { background-color: color-mix(in srgb, var(--cse-ink) 5%, transparent); }
.ct-map .maplibregl-ctrl-attrib-button,
.ct-map .maplibregl-ctrl-attrib-button:hover,
.ct-map .maplibregl-ctrl-attrib-button:focus { border-radius: 999px; background-color: var(--cse-surface); }

/* A narrow phone: one filter per row, so "Any bedrooms" and the longer
   languages' labels and price bands are never cut. */
@media (max-width: 479px) {
  .ct-map .ct-map__filters { grid-template-columns: minmax(0, 1fr); }
}

/* The lead keeps clear of the filters beside it, in the longer languages too. */
.ct-map .ct-map__lead { max-width: 32rem; }
/* A home's type and place may take two lines, so the place is never cut. */
.ct-map .ct-home__type { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
