/* The US map on /listings as the city filter (templates/_us_map.html with map_filter,
   static/listings-map.js). Matches the home page's Architectural Paper Plate (Direction 2)
   and eliminates vertical redundancy so listings start immediately below the map. */
.pg:not(.landing) .pg-head.pg-head--map { padding-top: 20px; padding-bottom: 12px; }
.pg:not(.landing) .pg-head.pg-head--after { padding-top: 0; padding-bottom: 8px; }
.pg .pg-head--map .pg-h { max-width: none; margin-bottom: 0; }
.pg .pg-head--map .lmap { margin-top: 16px; }
.lmap .usmap { margin: 0; --ink: #242323; --bg: #FFFFFF; }
.lmap .usmap__stage { max-width: 100%; }

/* Crisp, collision-free label scale on mobile; roomy on desktop */
.lmap .usmap__lab b { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.03em; }
.lmap .usmap__lab span { font-size: 0.75rem; }

/* Architectural Paper Plate */
.lmap {
  background: #FFFFFF;
  border: 1px solid #E2DFD7;
  border-radius: 6px;
  padding: 14px 12px 12px;
  background-image: radial-gradient(rgba(36, 35, 35, 0.065) 1px, transparent 1px);
  background-size: 24px 24px;
}
.lmap__legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-bottom: 12px; font-size: 0.75rem; color: #52514E;
}
.lmap .usmap-leg { display: inline-flex; align-items: center; gap: 6px; }
.lmap .usmap-leg__ap {
  width: 9px; height: 9px; border-radius: 50%; background: #1D4D38;
  box-shadow: 0 0 0 3px rgba(29, 77, 56, 0.16);
}
.lmap .usmap-leg__tr {
  width: 9px; height: 9px; border-radius: 50%; background: #FFFFFF;
  border: 1.5px solid #242323;
}
.lmap .usmap__land { fill: #EAE6DC; stroke: #B8B2A5; stroke-width: 1.1; }
.lmap .usmap__dot { border: 1.5px solid #242323; background: #FFFFFF; }
.lmap .usmap__pin--quiet .usmap__dot { border-color: #B8B2A5; }
.lmap .usmap__pin[data-city="nyc"] .usmap__dot,
.lmap .usmap__pin[data-city="sf"] .usmap__dot,
.lmap .usmap__pin[data-city="la"] .usmap__dot,
.lmap .usmap__pin[data-city="chicago"] .usmap__dot,
.lmap .usmap__pin[data-city="dallas"] .usmap__dot {
  background: #1D4D38;
  border-color: #1D4D38;
  box-shadow: 0 0 0 4px rgba(29, 77, 56, 0.16);
}
.lmap .usmap__pin:hover .usmap__dot { background: var(--line-3); }
.lmap .usmap__pin.is-on .usmap__dot,
.lmap .usmap__pin.is-on:hover .usmap__dot {
  background: #242323;
  border-color: #242323;
  outline: 1.5px solid #242323;
  outline-offset: 3px;
  box-shadow: none;
}
.lmap .usmap__pin[data-city="nyc"] .usmap__lab span,
.lmap .usmap__pin[data-city="sf"] .usmap__lab span,
.lmap .usmap__pin[data-city="la"] .usmap__lab span,
.lmap .usmap__pin[data-city="chicago"] .usmap__lab span,
.lmap .usmap__pin[data-city="dallas"] .usmap__lab span {
  color: #242323;
  font-weight: 500;
}
.lmap .usmap__pin:hover .usmap__lab span { color: var(--ink); }
.lmap .usmap__pin a:focus-visible .usmap__dot { outline: 2px solid var(--ink); outline-offset: 6px; }
.lmap .usmap__pin.is-on a:focus-visible .usmap__dot { outline-offset: 6px; }
.lmap .usmap__pin.is-on .usmap__lab span { font-weight: 600; }

/* Compact reading line under the map */
.lmap .usmap__read {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid #ECEAE4;
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.4em; row-gap: 2px;
  min-height: 36px; font-size: 0.875rem;
}
.lmap .usmap__read > span[data-k="name"] { font-weight: 600; color: #242323; }
.lmap .usmap__read [data-k="more"] { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; column-gap: 0.4em; }
.lmap .usmap__read [data-k="more"] > .usmap__sep { display: none; }
.usmap__reset {
  display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; padding: 0 4px;
  color: var(--ink); font-size: 0.875rem; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 0.22em;
}
.usmap__reset:hover { text-decoration-color: var(--ink); }
.usmap__reset:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lmap .usmap__read [data-k="link"] { display: inline-flex; align-items: center; min-height: 44px; }
.lmap [hidden] { display: none !important; }

/* Tight, zero-bloat filter strip under the map */
.pg-head--after .pg-filters { margin-top: 6px; padding-top: 6px; border-top: 0; }
.pg-head--after .pg-filters:first-of-type { margin-top: 4px; padding-top: 0; }
.pg-head--after .pg-filters .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 14px; }
.pg-head--after .pg-filters .chips::-webkit-scrollbar { display: none; }
.pg-head--after .pg-filters .chip { flex: 0 0 auto; white-space: nowrap; }
.pg-results__bar { margin-bottom: 4px; }
.pg-results__bar a { color: #242323; text-decoration: underline; text-underline-offset: 0.2em; }

@media (min-width: 900px) {
  .pg:not(.landing) .pg-head.pg-head--map { padding-top: 28px; padding-bottom: 16px; }
  .pg .pg-head--map .lmap { margin-top: 20px; }
  .lmap { padding: 24px 32px 20px; }
  .lmap__legend { justify-content: flex-end; margin-bottom: 8px; font-size: 0.8125rem; }
  .lmap .usmap { --k: 1.25; display: block; }
  .lmap .usmap__stage { max-width: 920px; margin: 0 auto; }
  .lmap .usmap__lab b { font-size: 0.8125rem; }
  .lmap .usmap__lab span { font-size: 0.9375rem; }
  .lmap .usmap__read {
    margin-top: 16px; padding-top: 14px; max-width: none; font-size: 0.9375rem;
  }
  .lmap .usmap__read [data-k="more"] { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 0.45em; }
  .lmap .usmap__read [data-k="more"] > .usmap__sep { display: inline; }
  .lmap .usmap__reset { margin-left: 12px; padding: 0 4px; }
  .pg-head--after .pg-filters .chips { flex-wrap: wrap; overflow-x: visible; }
}
