/* Explore Downtown Buildings: isolated component. Everything is scoped under .bm.
   Street map from OpenStreetMap data (static SVG, assets/maps/downtown-streets.svg), inlined by bldgmap.js.
   Depends only on the brand.css tokens (--blue, --cream, --ink, --ink-soft, --bronze, --brass, --sans, --serif, --rule, --ease).
   Remove by deleting this file, bldgmap.js, bldgmap-data.json, assets/maps/downtown-streets.svg and the one section on /buildings/. */

.bm{ --bm-ink:#131d24; --bm-brass:#c9a96b; --bm-cream:#e9e4d6; }

/* map window: fixed height, never driven by the picker */
.bm .bm-stage{ position:relative; overflow:hidden; margin:0; height:420px; background:var(--bm-ink); border:1px solid rgb(203 220 230 / 0.17); touch-action:manipulation; }
.bm .bm-svg{ position:absolute; left:0; top:0; width:100%; height:100%; display:block; user-select:none; -webkit-user-select:none; }

/* street map styling (v8: dark, one family with the Austin Areas map. Land #131d24, water the areas map's rgb(88 142 176 / 0.6) with its hairline,
   streets in blue-grey steps, casings deep blue so lines read on dark; no glows) */
.bm .m-land{ fill:#131d24; }
.bm .m-water{ fill:rgb(88 142 176 / 0.6); stroke:rgb(150 198 226 / 0.85); stroke-width:1.25px; }
.bm .m-def{ fill:none; }
.bm .bm-svg use{ fill:none; stroke-linejoin:round; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.bm .bm-svg use, .bm .bm-svg path{ vector-effect:non-scaling-stroke; }
.bm .m-minor-c, .bm .m-link-c{ stroke:rgb(19 29 36 / 0.9); stroke-width:var(--w-minor-c, 4px); }
.bm .m-mid-c{ stroke:rgb(19 29 36 / 0.9); stroke-width:var(--w-mid-c, 5.4px); }
.bm .m-major-c{ stroke:rgb(19 29 36 / 0.95); stroke-width:var(--w-major-c, 8px); }
.bm .m-minor-f, .bm .m-link-f{ stroke:#3b4c58; stroke-width:var(--w-minor-f, 2.4px); }
.bm .m-mid-f{ stroke:#586c7b; stroke-width:var(--w-mid-f, 3.6px); }
.bm .m-major-f{ stroke:#97a9b4; stroke-width:var(--w-major-f, 6px); }

/* leader lines and exact-point dots */
.bm .bm-over{ position:absolute; left:0; top:0; width:100%; height:100%; pointer-events:none; overflow:visible; }
.bm .bm-over line{ stroke:var(--bm-cream); stroke-width:1.5px; }
.bm .bm-over circle{ fill:var(--bm-ink); stroke:var(--bm-cream); stroke-width:1px; }

/* labels on the map */
.bm .bm-labels{ position:absolute; inset:0; pointer-events:none; }
.bm .bm-lbl{ position:absolute; left:0; top:0; margin:0; white-space:nowrap; pointer-events:none; transform-origin:0 0;
  font-family:var(--sans); font-weight:500; font-size:0.66rem; letter-spacing:0.16em; text-transform:uppercase; color:#fff;
  text-shadow:0 0 2px #131d24, 0 0 3px #131d24, 0 0 3px #131d24; }
.bm .bm-lbl.is-lake{ font-family:var(--serif); font-style:italic; font-weight:400; font-size:1.05rem; letter-spacing:0.06em; text-transform:none;
  color:rgb(255 255 255 / 0.85); text-shadow:none; }
.bm .bm-lbl[hidden]{ display:none; }


/* building names beside each pin: small spaced caps in ivory, thin leaders where a name has to stand off its pin */
.bm .bm-bl{ position:absolute; left:0; top:0; margin:0; white-space:nowrap; pointer-events:none; line-height:1.2;
  font-family:var(--sans); font-weight:500; font-size:0.6rem; letter-spacing:0.14em; text-transform:uppercase; color:var(--bm-cream);
  text-shadow:0 0 2px #131d24, 0 0 3px #131d24, 0 0 3px #131d24; }
.bm .bm-bl.is-two{ white-space:pre; line-height:1.15; }
.bm .bm-bl[hidden]{ display:none; }
.bm .bm-leads{ position:absolute; left:0; top:0; width:100%; height:100%; pointer-events:none; overflow:visible; }
.bm .bm-leads line{ stroke:var(--bm-cream); stroke-width:1px; opacity:0.55; }

/* markers: 11px white dot, 2px deep-blue stroke. Preview (hover or focus): brass halo at half strength. Selected: 13px brass dot with full halo and a name tag.
   The markers are visual only; hit testing is done on the stage (nearest marker within 22px, a 44px target) so touch targets meet 44px. */
.bm .bm-pins{ position:absolute; inset:0; pointer-events:none; }
.bm .bm-pin{ position:absolute; left:0; top:0; width:24px; height:24px; margin:-12px 0 0 -12px; display:block; border-radius:50%; }
.bm .bm-pin::before{ content:""; position:absolute; left:50%; top:50%; width:11px; height:11px; margin:-5.5px 0 0 -5.5px; border-radius:50%; box-sizing:border-box;
  background:#fff; border:2px solid var(--bm-ink); }
.bm .bm-pin::after{ content:""; position:absolute; left:50%; top:50%; width:25px; height:25px; margin:-12.5px 0 0 -12.5px; border-radius:50%; box-sizing:border-box;
  border:2px solid var(--bm-brass); opacity:0; }
.bm .bm-pin.is-preview::after{ opacity:0.6; }
.bm .bm-pin.is-selected{ z-index:3; }
.bm .bm-pin.is-selected::before{ width:13px; height:13px; margin:-6.5px 0 0 -6.5px; background:var(--bm-brass); }
.bm .bm-pin.is-selected::after{ opacity:1; }

/* name beside the shown marker, kept inside the map */
.bm .bm-tag{ position:absolute; z-index:4; left:0; top:0; margin:0; pointer-events:none; white-space:nowrap;
  font-family:var(--sans); font-weight:500; font-size:0.68rem; letter-spacing:0.12em; text-transform:uppercase; color:#fff;
  background:#17232b; border:1px solid rgb(201 169 107 / 0.75); padding:4px 8px; line-height:1.2; }
.bm .bm-tag.is-preview{ border-color:rgb(201 169 107 / 0.4); }
.bm .bm-tag[hidden]{ display:none; }

/* top block: map and caption on the left, info panel on the right (below the map on narrow screens) */
.bm .bm-top{ display:grid; grid-template-columns:minmax(0,1fr) 380px; column-gap:48px; align-items:start; min-height:520px; }
.bm .bm-top:not(.is-ready)::before{ content:""; display:block; height:420px; background:var(--bm-ink); border:1px solid rgb(203 220 230 / 0.17); box-sizing:border-box; }
.bm .bm-mapcol{ min-width:0; }
.bm .bm-cap{ margin:10px 0 0; font-size:var(--fs-meta); line-height:1.5; color:var(--ink-soft); min-height:3em; }
.bm .bm-cap span{ display:block; }
.bm .bm-cap a{ color:var(--ink-soft); text-decoration:underline; text-decoration-color:rgb(19 29 36 / 0.4); text-underline-offset:0.2em; }
.bm .bm-cap a:hover{ color:var(--ink); }

/* info panel: fixed footprint, content swaps in place */
.bm .bm-info{ box-sizing:border-box; display:flex; flex-direction:column; padding:2px 0 0 32px; border-left:1px solid rgb(19 29 36 / 0.16); min-height:420px; }
.bm .bm-info-eye{ margin:0 0 10px; font-size:var(--fs-label-sm); color:var(--bronze); }
.bm .bm-info-name{ margin:0; font-family:var(--serif); font-weight:300; font-size:2rem; line-height:1.12; color:var(--ink); }
.bm .bm-info-addr{ margin:10px 0 0; font-size:var(--fs-body-sm); line-height:1.45; color:var(--ink-soft); }
.bm .bm-info-hint{ margin:0; max-width:30ch; font-family:var(--serif); font-weight:300; font-size:1.3rem; line-height:1.4; color:var(--ink); }
.bm .bm-info-body{ margin-top:18px; display:block; }
.bm .bm-info-body.has-photo{ display:grid; grid-template-columns:minmax(0,1fr) 150px; column-gap:20px; align-items:start; }
.bm .bm-info-facts{ margin:0; }
.bm .bm-info-facts > div{ display:grid; grid-template-columns:7.2rem minmax(0,1fr); column-gap:12px; align-items:baseline; padding:10px 0; border-top:1px solid rgb(19 29 36 / 0.16); }
.bm .bm-info-facts > div:last-child{ border-bottom:1px solid rgb(19 29 36 / 0.16); }
.bm .bm-info-body.has-photo .bm-info-facts > div{ grid-template-columns:1fr; row-gap:2px; }
.bm .bm-info-facts dt{ margin:0; font-size:var(--fs-label-sm); color:var(--ink-soft); }
.bm .bm-info-facts dd{ margin:0; font-family:var(--serif); font-size:1.1rem; line-height:1.3; color:var(--ink); }
.bm .bm-info-fig{ display:contents; }
.bm .bm-info-img{ grid-column:2; grid-row:1; width:150px; height:200px; overflow:hidden; background:#1b2a33; }
.bm .bm-info-img img{ display:block; width:100%; height:100%; object-fit:cover; }
.bm .bm-credit{ grid-column:1 / -1; grid-row:2; margin:8px 0 0; font-size:0.75rem; line-height:1.45; color:var(--ink-soft); }
.bm .bm-credit a{ color:var(--ink-soft); text-decoration:underline; text-decoration-color:rgb(19 29 36 / 0.4); text-underline-offset:0.2em; }
.bm .bm-credit a:hover{ color:var(--ink); }
.bm .bm-go{ display:inline-flex; align-items:center; align-self:flex-start; min-height:44px; margin-top:auto; padding:0; font-size:var(--fs-meta); font-weight:500; letter-spacing:var(--track-ui); text-transform:uppercase;
  color:var(--ink); text-decoration:underline; text-decoration-color:var(--bronze); text-underline-offset:0.35em; text-decoration-thickness:1px; white-space:nowrap; }
.bm .bm-go:hover{ color:var(--bronze); }
.bm .bm-go span[aria-hidden]{ display:inline-block; margin-left:0.35em; text-decoration:none; }
.bm .bm-info a:focus-visible, .bm .bm-rowbtn:focus-visible, .bm .bm-rowgo:focus-visible{ outline:2px solid var(--ink); outline-offset:3px; }

/* directory, grouped by district */
.bm .bm-dir{ margin-top:28px; padding-top:24px; border-top:1px solid rgb(19 29 36 / 0.16); column-count:3; column-gap:48px; }
.bm .bm-grp{ break-inside:avoid; margin:0 0 18px; }
.bm .bm-grp-h{ margin:0; padding:0 0 8px; font-size:var(--fs-label-sm); font-weight:500; color:var(--bronze); }
.bm .bm-dir ul{ margin:0; padding:0; list-style:none; }
.bm .bm-dir li{ position:relative; display:flex; align-items:stretch; border-top:1px solid rgb(19 29 36 / 0.16); }
.bm .bm-dir li:last-child{ border-bottom:1px solid rgb(19 29 36 / 0.16); }
.bm .bm-dir li::before{ content:""; position:absolute; left:0; top:-1px; bottom:-1px; width:2px; background:var(--brass); opacity:0; }
.bm .bm-dir li.is-preview{ background:rgb(19 29 36 / 0.045); }
.bm .bm-dir li.is-selected{ background:rgb(19 29 36 / 0.07); }
.bm .bm-dir li.is-selected::before{ opacity:1; background:var(--bronze); }
/* no-script fallback: plain links */
.bm .bm-dir li > a:not(.bm-rowgo){ display:flex; align-items:center; justify-content:space-between; gap:12px; flex:1; min-height:46px; padding:6px 0 6px 12px; text-decoration:none; color:var(--ink); }
.bm .bm-dir li > a:not(.bm-rowgo) .bm-row-go{ display:none; }
.bm .bm-row-name{ font-family:var(--serif); font-size:1.15rem; line-height:1.2; color:var(--ink); min-width:0; }
.bm .bm-row-meta{ font-family:var(--sans); font-weight:500; font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-soft); white-space:nowrap; flex:none; }
.bm .bm-rowbtn{ -webkit-appearance:none; appearance:none; flex:1; min-width:0; min-height:46px; margin:0; padding:6px 0 6px 12px; border:0; border-radius:0; background:none; text-align:left; cursor:pointer;
  display:flex; align-items:center; justify-content:space-between; gap:12px; font:inherit; color:var(--ink); -webkit-tap-highlight-color:transparent; }
.bm .bm-rowgo{ flex:0 0 44px; display:flex; align-items:center; justify-content:center; min-height:44px; color:var(--bronze); text-decoration:none; font-size:1rem; }
.bm .bm-rowgo:hover{ color:var(--ink); }

@media (max-width:999px){
  .bm .bm-top{ display:block; min-height:0; }
  .bm .bm-info{ margin-top:22px; padding:20px 0 0; border-left:0; border-top:1px solid rgb(19 29 36 / 0.16); min-height:0; }
  .bm .bm-stage{ height:400px; }
  .bm .bm-dir{ column-count:2; }
}
@media (max-width:640px){
  .bm .bm-stage{ height:340px; }
  .bm{ --w-minor-c:3.6px; --w-minor-f:2.2px; --w-mid-c:5px; --w-mid-f:3.2px; --w-major-c:7.2px; --w-major-f:5px; }
  .bm .bm-top:not(.is-ready)::before{ height:340px; }
  .bm .bm-lbl{ font-size:0.6rem; letter-spacing:0.12em; }
  .bm .bm-bl{ font-size:0.56rem; letter-spacing:0.1em; }
  .bm .bm-lbl.is-lake{ font-size:0.95rem; }
  .bm .bm-tag{ font-size:0.62rem; padding:3px 7px; }
  .bm .bm-info-name{ font-size:1.65rem; }
  .bm .bm-dir{ column-count:1; margin-top:16px; padding-top:16px; }
  .bm .bm-rowbtn, .bm .bm-dir li > a:not(.bm-rowgo){ flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; min-height:56px; }
}
@media (max-width:999px) and (min-width:641px){ .bm .bm-top:not(.is-ready)::before{ height:400px; } }
