/* The place pages: county hubs, city hubs, region pages and the directory (scripts/seo/locations.py
   PLACE_LOOK, area_map; the SEO page sweep, 2026-11-14). After pages.css, on those pages only.
   The Post a bid page's patterns: navy tiles with paper icons, a night plate with Florida's 67
   counties where one lights up in signal yellow, the shared reveal (motion.js). Everything shows
   without JS, and nothing moves with reduced motion. */

/* ---- the hero map: the county's neighbours outlined under it; the county lights up ---- */
.loc-map__near {
  fill: none;
  stroke: rgb(207 224 245/42%);
  stroke-width: 1px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* ---- Next door: a night plate, all 67 counties, this one lit and a pin ringing on its lamp ---- */
.place-where {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: center;
  column-gap: var(--sp-4);
  row-gap: var(--sp-3);
  margin-top: var(--sp-5);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: radial-gradient(120% 140% at 0% 50%, var(--night-hi), transparent 70%), var(--night);
  box-shadow: 0 1px 2px rgb(10 22 40/18%), 0 10px 24px -14px rgb(10 22 40/55%);
  color: var(--on-night);
}
.place-where__map {
  display: block;
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  overflow: visible;
}
.loc-body .place-where > h3.dir-group {
  grid-area: 1 / 2;
  margin: 0;
  color: var(--paper);
}
.place-where > .az,
.place-where > p {
  grid-column: 1 / -1;
  margin: 0;
}
.prose .place-where > p {
  color: var(--on-night);
}
@media (min-width: 40rem) {
  .place-where {
    grid-template-columns: 10rem minmax(0, 1fr);
    align-content: center;
    padding: var(--sp-4) var(--sp-5) var(--sp-4) var(--sp-4);
  }
  .place-where__map {
    grid-row: 1 / span 3;
  }
  .loc-body .place-where > h3.dir-group {
    align-self: end;
  }
  .place-where > .az,
  .place-where > p {
    grid-column: 2;
    align-self: start;
  }
}
.place-where__map path {
  fill: rgb(207 224 245/7%);
  stroke: rgb(207 224 245/30%);
  stroke-width: 2;
  stroke-linejoin: round;
}
.place-where__map .is-near {
  fill: rgb(207 224 245/16%);
  stroke: rgb(207 224 245/70%);
}
.place-where__map .is-here {
  fill: var(--hivis);
  stroke: var(--hivis);
}
.place-where__map .is-outline {
  fill: none;
  stroke: var(--paper);
  stroke-width: 4;
}
.place-where__dot {
  fill: var(--paper);
  stroke: var(--night);
  stroke-width: 6;
}
.place-where__ring {
  fill: none;
  stroke: var(--hivis);
  stroke-width: 5;
  opacity: 0.55;
  transform-box: fill-box;
  transform-origin: center;
}

/* ---- who posts bids: a group a row, its icon on a navy tile, the names in two columns ---- */
.place-group {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: center;
  column-gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.place-group__tile {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-md);
  background: var(--night);
  box-shadow: 0 1px 2px rgb(10 22 40/18%), 0 6px 16px -6px rgb(10 22 40/45%);
  color: var(--paper);
}
.place-group__tile svg {
  width: 1.25rem;
  height: 1.25rem;
}
.loc-body .place-group > h3.dir-group {
  margin: 0;
}
.page .place-group > .dir-list {
  grid-column: 1 / -1;
  margin-top: var(--sp-3);
}
@media (min-width: 48rem) {
  .page .place-group > .dir-list {
    columns: 2;
    column-gap: var(--sp-5);
  }
  .page .place-group > .dir-list li {
    break-inside: avoid;
  }
}

/* ---- a county's facts: a card each, the first sentence shown, the rest behind "Read more" ---- */
.prose .place-fact {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--sh-1);
}
.prose h2 + .place-fact {
  margin-top: var(--sp-3);
}
.prose .place-fact > :first-child,
.loc-body .place-fact > h3.dir-group {
  margin-top: 0;
}
.prose .place-fact > h3.dir-group + p {
  margin-top: var(--sp-2);
}
.prose .place-fact p {
  max-width: 68ch;
}
.place-fact__more > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 2.75rem;
  margin-top: var(--sp-1);
  color: var(--asphalt);
  font: 500 0.9375rem/1.25 var(--sign);
  list-style: none;
  cursor: pointer;
}
.place-fact__more > summary::-webkit-details-marker {
  display: none;
}
.place-fact__more > summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.25rem;
  border-right: 1.75px solid currentColor;
  border-bottom: 1.75px solid currentColor;
  rotate: 45deg;
}
.place-fact__more[open] > summary::after {
  margin-top: 0.25rem;
  rotate: 225deg;
}
.place-fact__more[open] > summary {
  margin-bottom: calc(var(--sp-2) * -1);
}
@media (hover: hover) {
  .place-fact__more > summary:hover {
    text-decoration: underline;
    text-decoration-color: var(--rule-2);
    text-underline-offset: 0.2em;
  }
}
.prose .place-fact .go-link {
  margin-top: var(--sp-2);
}

/* ---- the directory's hero map: every county over the chart, grouped by area; the county under
   the pointer lights up and its area with it ---- */
.place-map a {
  cursor: pointer;
}
.place-map path {
  fill: rgb(255 208 0/0%);
  stroke: none;
}
.place-map a:hover path {
  fill: rgb(255 208 0/14%);
}
.place-map a path:hover {
  fill: rgb(255 208 0/60%);
  stroke: var(--hivis);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}
.place-map figcaption {
  margin-top: var(--sp-1);
  color: var(--on-night-2);
  font: 500 0.75rem/1.4 var(--sign);
  text-align: center;
}

/* ---- motion: the county lights up as the hero settles; on the plate it lights when the plate
   reaches the screen, then the pin rings twice and rests. The buyer groups rise in turn
   (pages.css [data-reveal-step]). Ease-out only. ---- */
@media (prefers-reduced-motion: no-preference) {
  .loc-map__county {
    animation: place-light 1.1s var(--ease-out) 0.35s backwards;
  }
  .loc-map__near {
    animation: settle 0.8s var(--ease-out) 0.2s backwards;
  }
  @keyframes place-light {
    from {
      fill-opacity: 0;
      stroke-opacity: 0.2;
    }
  }
  .place-where .is-here {
    transition:
      fill 0.9s var(--ease-out) 0.45s,
      stroke 0.9s var(--ease-out) 0.45s;
  }
  .place-where__pin {
    transition: opacity 0.4s var(--ease-out) 0.9s;
  }
  .place-where.will-reveal:not(.is-in) .is-here {
    fill: rgb(207 224 245/7%);
    stroke: rgb(207 224 245/30%);
  }
  .place-where.will-reveal:not(.is-in) .place-where__pin {
    opacity: 0;
  }
  .place-where.is-in .place-where__ring {
    animation: ping 1.6s var(--ease-out) 1.2s 2 both;
  }
  .place-map path {
    transition: fill 0.25s var(--ease-out);
  }
  .place-fact__more > summary::after {
    transition:
      rotate var(--d-ui) var(--ease-out),
      margin var(--d-ui) var(--ease-out);
  }
  .place-fact__more[open] > :not(summary) {
    animation: settle 0.3s var(--ease-out) backwards;
  }
}
