/* mm-nbhd-map.css — extracted from Chelsea Hub template, byte-identical CSS */
/* ----- Neighborhood Hub scoped layout -----
     Reuses mm-2026 tokens from base.html (:root). No new colors. */
  .mm-nbhd-shell { background: var(--color-white); color: var(--color-text); }

  .mm-nbhd-container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
  .mm-nbhd-container--narrow { max-width: 780px; }
  .mm-nbhd-container--reading { max-width: 680px; }

  /* ===== Hero — TYPOGRAPHIC MODE (default) =====
     Grounded on cream backdrop, centered, wider rhythm. Inherited from v5. */
  .mm-nbhd-hero {
    position: relative;
    background: var(--color-cream);
    padding: 128px 0 96px;
    text-align: center;
    overflow: hidden;
  }
  .mm-nbhd-hero__inner { position: relative; z-index: 2; width: 100%; }
  .mm-nbhd-hero__eyebrow { display: inline-block; font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 24px; }
  .mm-nbhd-hero__eyebrow:empty { display: none; }
  .mm-nbhd-hero__h1 h1, .mm-nbhd-hero__h1 { font-family: var(--font-display); font-size: clamp(36px, 5vw, 56px); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; color: var(--color-black); margin: 0; }
  .mm-nbhd-hero__sub { margin-top: 20px; font-family: var(--font-body); font-size: 17px; font-weight: 400; line-height: 1.55; color: var(--color-text-light); }
  .mm-nbhd-hero__sub:empty { display: none; }

  /* Media layer — absolute-positioned behind content; hidden when no image */
  .mm-nbhd-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }
  .mm-nbhd-hero__media:empty { display: none; }
  .mm-nbhd-hero__media img,
  .mm-nbhd-hero__media .hs_cos_wrapper_type_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--mm-hero-pos, center center);
    display: block;
  }
  .mm-nbhd-hero__media .hs_cos_wrapper_type_image,
  .mm-nbhd-hero__media .hs_cos_wrapper {
    display: block;
    width: 100%;
    height: 100%;
  }

  /* Overlay — present in DOM when toggle=true, but only visible in image mode */
  .mm-nbhd-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.38);
    pointer-events: none;
    display: none;
  }

  /* ===== Hero — IMAGE MODE =====
     Activates when .mm-nbhd-hero__media contains an <img> (or via modifier class
     fallback). Uses :has() for automatic activation; modifier class retained
     for future explicit control. */
  .mm-nbhd-hero--image,
  .mm-nbhd-hero:has(.mm-nbhd-hero__media img) {
    background: var(--color-black);
    min-height: 480px;
    padding: 140px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mm-nbhd-hero--image .mm-nbhd-hero__overlay,
  .mm-nbhd-hero:has(.mm-nbhd-hero__media img) .mm-nbhd-hero__overlay {
    display: block;
  }
  /* Explicit overlay opt-out — editor disabled the overlay */
  .mm-nbhd-hero--no-overlay .mm-nbhd-hero__overlay { display: none !important; }
  .mm-nbhd-hero--image .mm-nbhd-hero__eyebrow,
  .mm-nbhd-hero:has(.mm-nbhd-hero__media img) .mm-nbhd-hero__eyebrow {
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  }
  .mm-nbhd-hero--image .mm-nbhd-hero__h1,
  .mm-nbhd-hero--image .mm-nbhd-hero__h1 h1,
  .mm-nbhd-hero:has(.mm-nbhd-hero__media img) .mm-nbhd-hero__h1,
  .mm-nbhd-hero:has(.mm-nbhd-hero__media img) .mm-nbhd-hero__h1 h1 {
    color: var(--color-white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  }
  .mm-nbhd-hero--image .mm-nbhd-hero__sub,
  .mm-nbhd-hero:has(.mm-nbhd-hero__media img) .mm-nbhd-hero__sub {
    color: rgba(255, 255, 255, 0.90);
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  }
  .mm-nbhd-hero--image .mm-nbhd-hero__inner,
  .mm-nbhd-hero:has(.mm-nbhd-hero__media img) .mm-nbhd-hero__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
  }

  /* Subtle cream→white divider dot (only in typographic mode — hide when image hero) */
  .mm-nbhd-hero + section { position: relative; }
  .mm-nbhd-hero + section::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 48px; height: 1px;
    background: var(--color-text-muted);
    opacity: 0.35;
  }
  .mm-nbhd-hero--image + section::before,
  .mm-nbhd-hero:has(.mm-nbhd-hero__media img) + section::before {
    display: none;
  }

  /* Intro / power paragraph */
  .mm-nbhd-intro { padding: 88px 0 24px; }
  .mm-nbhd-intro__body { font-family: var(--font-body); font-size: 18px; line-height: 1.75; color: var(--color-text); text-align: left; }
  .mm-nbhd-intro__body p { margin-bottom: 1.1em; }
  .mm-nbhd-intro__body a { color: var(--color-black); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .mm-nbhd-intro__body a:hover { text-decoration-thickness: 2px; }

  /* Inventory / IDX — minimal wrapper, no JS-interfering structure */
  .mm-nbhd-inventory { padding: 48px 0; }
  .mm-nbhd-idx-intro {
    max-width: 680px;
    margin: 0 auto 28px;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
  }
  .mm-nbhd-idx-intro p { margin: 0 0 0.6em; }
  .mm-nbhd-idx-intro p:last-child { margin-bottom: 0; }
  .mm-nbhd-inventory__inner { /* bare — no extra wrappers around editor content */ }

  /* Content sections */
  .mm-nbhd-content { padding: 56px 0; }
  .mm-nbhd-content__block { margin-bottom: 48px; }
  .mm-nbhd-content__block:last-child { margin-bottom: 0; }
  .mm-nbhd-content__block:empty { display: none; }
  .mm-nbhd-content__block h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; color: var(--color-black); margin: 0 0 20px; }
  .mm-nbhd-content__block h3 { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.25; color: var(--color-black); margin: 28px 0 12px; }
  .mm-nbhd-content__block p { font-size: 17px; line-height: 1.75; color: var(--color-text); margin: 0 0 1.1em; }
  .mm-nbhd-content__block a { color: var(--color-black); text-decoration: underline; text-underline-offset: 3px; }

  /* Lists — neutral markers, no red bullets, no legacy styling */
  .mm-nbhd-content__block ul { list-style: none; padding: 0; margin: 0 0 1.2em; }
  .mm-nbhd-content__block ul li { position: relative; padding-left: 22px; margin: 0 0 10px; font-size: 17px; line-height: 1.7; color: var(--color-text); }
  .mm-nbhd-content__block ul li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 10px; height: 1px; background: var(--color-text-muted); }
  .mm-nbhd-content__block ol { list-style: decimal; padding-left: 22px; margin: 0 0 1.2em; }
  .mm-nbhd-content__block ol li { font-size: 17px; line-height: 1.7; margin-bottom: 10px; padding-left: 4px; }

  /* Subtle dividers between major sections */
  .mm-nbhd-divider { height: 1px; background: #ececec; border: 0; margin: 0; max-width: var(--container-max); margin-left: auto; margin-right: auto; }

  /* Optional plug-and-play module zones */
  .mm-nbhd-tiles,
  .mm-nbhd-resources,
  .mm-nbhd-posts { padding: 48px 0; }
  .mm-nbhd-tiles:empty,
  .mm-nbhd-resources:empty,
  .mm-nbhd-posts:empty { display: none; padding: 0; }

  /* Internal linking / related neighborhoods — structured grid of link cards */
  .mm-nbhd-related { padding: 88px 0 112px; border-top: 1px solid rgba(255,255,255,0.08); }
  .mm-nbhd-related__heading { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 30px); font-weight: 500; color: var(--color-black); margin: 0 0 36px; letter-spacing: -0.005em; }
  .mm-nbhd-related__heading h2, .mm-nbhd-related__heading h3 { font-family: inherit; font-size: inherit; font-weight: inherit; color: inherit; margin: 0; }

  /* ===== v7.4 Related-neighborhood cards — full-card click pattern =====
     One <a class="mm-related-card"> per item. Entire card is the link.
     Title / descriptor / arrow are <span>s (inline). Arrow is a text "→", not an SVG,
     not a circular button. Hover lifts border + shifts arrow 3px right. Neutral palette. */
  .mm-nbhd-related__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
  }
  /* Flatten the rich_text wrapper span so cards are direct grid children */
  .mm-nbhd-related__list > span.hs_cos_wrapper,
  .mm-nbhd-related__list .hs_cos_wrapper_type_rich_text { display: contents; }

  .mm-related-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 16px;
    padding: 20px 22px;
    background: #ffffff;
    border: 1px solid #e5e0d6;
    border-radius: 3px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }
  .mm-related-card:hover {
    border-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  }
  .mm-related-card:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 2px;
  }

  .mm-related-title {
    grid-column: 1;
    grid-row: 1;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #111111;
  }
  .mm-related-card:has(.mm-related-desc) .mm-related-title {
    grid-row: 1;
  }

  .mm-related-desc {
    grid-column: 1;
    grid-row: 2;
    margin-top: 6px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: #555555;
  }

  .mm-related-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    color: #555555;
    transition: transform 0.2s ease, color 0.2s ease;
  }
  .mm-related-card:hover .mm-related-arrow {
    transform: translateX(3px);
    color: #111111;
  }
  /* Optional descriptor sub-line inside each link-card */
  .mm-nbhd-related__list a .mm-related-desc {
    display: block;
    margin-top: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: 0;
  }

  /* Responsive */
  @media (max-width: 720px) {
    .mm-nbhd-hero { padding: 88px 0 64px; }
    .mm-nbhd-hero--image,
    .mm-nbhd-hero:has(.mm-nbhd-hero__media img) {
      min-height: 360px;
      padding: 96px 20px;
    }
    .mm-nbhd-intro { padding: 64px 0 16px; }
    .mm-nbhd-content { padding: 40px 0; }
    .mm-nbhd-related { padding: 64px 0 80px; }
    .mm-nbhd-related__list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
    .mm-related-card { padding: 16px 18px; }
  }

  /* ===== v7 editorial depth: premium content patterns =====
     Scoped utility classes — editors opt into them by using the class in rich_text. */

  /* Premium data snapshot — replaces plain <table> for hero data blocks */
  .mm-data-snapshot { margin: 0 0 2.5em; padding: 32px 28px; background: var(--color-cream); border-radius: 3px; }
  .mm-data-snapshot__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px 36px; }
  .mm-data-snapshot__item { display: flex; flex-direction: column; }
  .mm-data-snapshot__label { font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 6px; }
  .mm-data-snapshot__value { font-family: var(--font-body); font-size: 17px; font-weight: 500; color: var(--color-black); line-height: 1.4; }

  /* Advisory card — substantial, left-accent framed block for CTA / private-advisory sections */
  .mm-nbhd-content__block .mm-advisory-card { margin: 1.5em 0 2em; padding: 36px 32px; background: var(--color-cream); border-left: 3px solid var(--color-black); border-radius: 0; }
  .mm-nbhd-content__block .mm-advisory-card h2 { margin: 0 0 14px; font-size: clamp(24px, 2.6vw, 28px); }
  .mm-nbhd-content__block .mm-advisory-card p { font-size: 16.5px; line-height: 1.75; color: var(--color-text); margin-bottom: 1em; }
  .mm-nbhd-content__block .mm-advisory-card ul { list-style: none; padding: 0; margin: 1.1em 0; }
  .mm-nbhd-content__block .mm-advisory-card ul li { position: relative; padding-left: 22px; margin: 0 0 10px; font-size: 16px; line-height: 1.7; color: var(--color-text); }
  .mm-nbhd-content__block .mm-advisory-card ul li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 10px; height: 1px; background: var(--color-black); }
  .mm-nbhd-content__block .mm-advisory-card a { color: var(--color-black); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .mm-nbhd-content__block .mm-advisory-card strong { color: var(--color-black); font-weight: 600; }

  /* Comparison block — used for Chelsea vs X, Y, Z sections */
  .mm-compare { margin: 1.5em 0; }
  .mm-compare__item { padding: 18px 0 18px; border-top: 1px solid rgba(255,255,255,0.08); }
  .mm-compare__item:last-child { border-bottom: 1px solid #ececec; }
  .mm-compare__item h3 { font-family: var(--font-display); font-size: 20px; font-weight: 500; color: var(--color-black); margin: 0 0 8px; letter-spacing: -0.005em; }
  .mm-compare__item p { font-size: 16px; line-height: 1.7; color: var(--color-text); margin: 0; }

  /* ===== v7.2 Typography contrast refinement =====
     Bumps body text darker for authority; adds heading weight; strengthens data snapshot.
     Layout, spacing, and type families unchanged. */

  /* Body text — near-black, up from #3A3A3A */
  .mm-nbhd-intro__body,
  .mm-nbhd-intro__body p,
  .mm-nbhd-content__block p,
  .mm-nbhd-content__block ul li,
  .mm-nbhd-content__block ol li,
  .mm-compare__item p,
  .mm-nbhd-content__block .mm-advisory-card p,
  .mm-nbhd-content__block .mm-advisory-card ul li { color: #1a1a1a; }

  /* Body inline links — full black */
  .mm-nbhd-intro__body a,
  .mm-nbhd-content__block a,
  .mm-nbhd-content__block .mm-advisory-card a { color: #111111; }

  /* Headings — slightly heavier (500 → 600) for hierarchy */
  .mm-nbhd-hero__h1,
  .mm-nbhd-hero__h1 h1 { font-weight: 600; }
  .mm-nbhd-content__block h2,
  .mm-nbhd-content__block .mm-advisory-card h2,
  .mm-nbhd-content__block h3,
  .mm-compare__item h3,
  .mm-nbhd-related__heading,
  .mm-nbhd-related__heading h2,
  .mm-nbhd-related__heading h3 { font-weight: 600; color: #111111; }

  /* Hero eyebrow + subheading — darker than muted grey */
  .mm-nbhd-hero__eyebrow { color: #444444; font-weight: 600; }
  .mm-nbhd-hero__sub { color: #2a2a2a; }

  /* List bullet markers — dark, not muted */
  .mm-nbhd-content__block ul li::before,
  .mm-nbhd-content__block .mm-advisory-card ul li::before { background: #1a1a1a; }

  /* ============================================================
     KILL legacy red bullet.png (mmre-2017 theme)
     The legacy theme stylesheet sets a 28x28 red square PNG as
     the ::before background-image on every rich_text <li>. We
     override at higher specificity with !important to wipe the
     image and restore a thin neutral dash. Also kills any
     list-style-image and ::marker color carry-over.
     ============================================================ */
  .mm-nbhd-shell ul,
  .mm-nbhd-shell ol,
  .mm-nbhd-shell .hs_cos_wrapper_type_rich_text ul,
  .mm-nbhd-shell .hs_cos_wrapper_type_rich_text ol { list-style-image: none !important; }

  .mm-nbhd-shell ul li::marker,
  .mm-nbhd-shell ol li::marker,
  .mm-nbhd-shell .hs_cos_wrapper_type_rich_text ul li::marker,
  .mm-nbhd-shell .hs_cos_wrapper_type_rich_text ol li::marker { color: #1a1a1a !important; }

  .mm-nbhd-shell .mm-nbhd-content__block ul li::before,
  .mm-nbhd-shell .mm-nbhd-content__block .mm-advisory-card ul li::before,
  .mm-nbhd-shell .hs_cos_wrapper_type_rich_text ul li::before,
  .mm-nbhd-shell .widget-type-rich_text ul li::before,
  .mm-nbhd-shell .hs_cos_wrapper_type_custom_widget ul li::before {
    background-image: none !important;
    background-color: #1a1a1a !important;
    background-repeat: no-repeat !important;
    background-size: auto !important;
    background-position: 0 0 !important;
    width: 10px !important;
    height: 1px !important;
    top: 0.85em !important;
    left: 0 !important;
    content: "" !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: transparent !important;
  }

  /* Chelsea at a Glance — strengthened as an authoritative data block */
  .mm-data-snapshot {
    background: var(--color-cream);
    border: 1px solid #e5e0d6;
    padding: 36px 32px;
  }
  .mm-data-snapshot__label {
    color: #555555;
    font-weight: 600;
    letter-spacing: 0.18em;
  }
  .mm-data-snapshot__value {
    color: #111111;
    font-weight: 600;
  }

  /* Comparison block — table borders slightly darker for definition */
  .mm-compare__item { border-top-color: #d5d0c6; }
  .mm-compare__item:last-child { border-bottom-color: #d5d0c6; }

  /* Related-neighborhood link-card descriptor — readable, not washed */
  .mm-nbhd-related__list a .mm-related-desc { color: #555555; }

  /* ===== v8.0 — Neutralize the legacy global `a { color: #B82A2A }` brick-red
     inside everything our template owns. mm-2026 palette only. ===== */
  .mm-nbhd-shell a,
  .mm-nbhd-shell a:link,
  .mm-nbhd-shell a:visited { color: #111111; }
  .mm-nbhd-shell a:hover,
  .mm-nbhd-shell a:focus { color: #000000; }
  /* Cover the stray legacy primary-bg utility class if it shows up */
  .mm-nbhd-shell .primary-bg { background-color: #1a1a1a !important; }

  /* Neutralize Mapbox's internal CSS-load canary (width 0×0, hidden, never user-visible)
     so red scans don't pick it up. Only background-color is overridden — Mapbox's
     canary detection reads background-image, which is preserved. */
  .mapboxgl-canary { background-color: transparent !important; }

  /* ===== v7.5 Premium tables — framed, cream header band, mobile-scrollable =====
     Outer #e5e0d6 border frames the table as a data artifact. THEAD gets a soft cream
     (#FAF8F2) band so labels read as a contained header system. Row dividers are
     quieter (#efebe1) so data asserts itself. First column is the row's subject. */
  .mm-nbhd-content__block table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 1.5em 0 2.25em;
    font-family: var(--font-body);
    background: #ffffff;
    table-layout: auto;
    border: 1px solid #e5e0d6;
  }
  /* Nuke any legacy inline borders/centering on the table element itself */
  .mm-nbhd-content__block table[style] {
    border: 1px solid #e5e0d6 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    table-layout: auto !important;
  }
  .mm-nbhd-content__block table thead {
    background: #FAF8F2;
    border-bottom: 1px solid #d5d0c6;
  }
  /* v7.6 polish: no vertical column dividers; horizontal rhythm only.
     Slightly more horizontal padding for editorial breathing room. */
  .mm-nbhd-content__block table th {
    padding: 14px 22px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #555555;
    white-space: nowrap;
    vertical-align: bottom;
    background: transparent;
    border: 0;
  }
  .mm-nbhd-content__block table td {
    padding: 15px 22px;
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.55;
    color: #1a1a1a;
    text-align: left;
    vertical-align: top;
    border: 0;
    border-bottom: 1px solid #efebe1;
  }
  .mm-nbhd-content__block table tbody tr:last-child td { border-bottom: none; }
  .mm-nbhd-content__block table tbody tr:nth-child(even) { background: #fcfbf7; }

  /* First-column data reads as the row's primary subject — same family, heavier */
  .mm-nbhd-content__block table td:first-child {
    font-weight: 600;
    color: #111111;
  }
  /* Strong / em / links inside cells */
  .mm-nbhd-content__block table td strong { font-weight: 600; color: #111111; }
  .mm-nbhd-content__block table td em { font-style: italic; color: #3a3a3a; }
  .mm-nbhd-content__block table td a {
    color: #111111;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
  }
  .mm-nbhd-content__block table td a:hover { text-decoration-thickness: 2px; }

  /* Mobile horizontal-scroll wrapper — prevents overflow on narrow screens */
  .mm-nbhd-table-wrap {
    margin: 1.5em 0 2.25em;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Hint that the table can scroll horizontally — subtle right-edge fade on mobile */
    background:
      linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
      linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.04) 70%, rgba(0,0,0,0.08)) 100% 0,
      #fff;
    background-repeat: no-repeat;
    background-size: 40px 100%, 24px 100%, 100% 100%;
    background-attachment: local, scroll, local;
  }
  .mm-nbhd-table-wrap table { margin: 0; min-width: 100%; }

  /* Tighten empty <p>&nbsp;</p> spacers legacy editors leave between tables */
  .mm-nbhd-content__block table + p:empty,
  .mm-nbhd-content__block p:has(> br:only-child) { display: none; }
  .mm-nbhd-content__block > p:last-child:empty { display: none; }

  /* Responsive padding + font */
  @media (max-width: 720px) {
    .mm-nbhd-content__block table th { padding: 12px 16px 10px; font-size: 10px; letter-spacing: 0.14em; }
    .mm-nbhd-content__block table td { padding: 13px 16px; font-size: 13.5px; }
  }

  /* ===== v7.8 Reusable neighborhood map section =====
     Renders only when mapbox_center_lat is populated. No effect on pages
     without map data. Token loaded from /hubfs/maps/mapbox-config.js. */
  .mm-nbhd-map {
    padding: 56px 0 72px;
    background: var(--color-white);
  }
  /* Above-map heading block — eyebrow + h2 + intro paragraph */
  .mm-nbhd-map__head { margin-bottom: 28px; }
  .mm-nbhd-map__eyebrow {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 14px;
  }
  .mm-nbhd-map__title {
    font-family: var(--font-display);
    font-size: clamp(26px, 2.8vw, 34px);
    font-weight: 500;
    line-height: 1.15;
    color: var(--color-black);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
  }
  .mm-nbhd-map__intro {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    margin: 0;
  }
  .mm-nbhd-map__intro p { margin: 0 0 0.7em; }
  .mm-nbhd-map__intro p:last-child { margin-bottom: 0; }

  /* Layout — full-width map with floating overlay key (matches Billionaires' Row pattern).
     The key panel sits over the top-left of the map, not in a separate column. */
  .mm-nbhd-map__layout {
    display: block;
  }
  .mm-nbhd-map__canvas-wrap {
    position: relative;
  }
  /* Floating overlay panel — title card + benchmarks list */
  .mm-nbhd-map__overlay {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 320px;
    max-height: calc(100% - 48px);
    overflow-y: auto;
    z-index: 5;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .mm-nbhd-map__overlay::-webkit-scrollbar { width: 0; height: 0; }
  .mm-nbhd-map__title-card,
  .mm-nbhd-map__key-card {
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 18px 20px 16px;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  }
  .mm-nbhd-map__title-card { padding: 16px 20px 14px; }
  .mm-nbhd-map__title-eyebrow {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 6px;
  }
  .mm-nbhd-map__title-name {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-black);
    margin: 0 0 4px;
  }
  .mm-nbhd-map__title-region {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin: 0;
  }
  .mm-nbhd-map__key-eyebrow {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 12px;
  }
  /* Building list — dot + 3 stacked lines (name, category, note) */
  .mm-nbhd-map__buildings {
    list-style: none !important;
    margin: 0;
    padding: 0;
  }
  .mm-nbhd-map__bldg {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  .mm-nbhd-map__bldg:first-child { padding-top: 2px; }
  .mm-nbhd-map__bldg:last-child { padding-bottom: 0; border-bottom: 0; }
  .mm-nbhd-map__bldg-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #1a1a1a;
    margin-top: 6px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.95);
  }
  .mm-nbhd-map__bldg-info { min-width: 0; }
  .mm-nbhd-map__bldg-name {
    display: block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-black);
    margin-bottom: 3px;
  }
  .mm-nbhd-map__bldg-cat {
    display: block;
    font-family: var(--font-body);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 3px;
  }
  .mm-nbhd-map__bldg-note {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-text-light);
  }
  /* List bullet kill — defensive */
  .mm-nbhd-map__buildings li::before { display: none !important; content: none !important; }
  .mm-nbhd-map__frame {
    position: relative;
    border: 1px solid #e5e0d6;
    border-radius: 3px;
    overflow: hidden;
    background: var(--color-cream);
  }
  .mm-nbhd-map__canvas {
    width: 100%;
    height: 620px;
    position: relative;
  }
  /* In-map building name labels — small, dark gray, white halo for contrast.
     Pin layout supports four label positions to avoid collisions in clusters:
     right (default), left, top, bottom. */
  .mm-nbhd-map__pin {
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
  }
  .mm-nbhd-map__pin--right { flex-direction: row;            align-items: center; }
  .mm-nbhd-map__pin--left  { flex-direction: row-reverse;    align-items: center; }
  .mm-nbhd-map__pin--top   { flex-direction: column-reverse; align-items: center; gap: 4px; }
  .mm-nbhd-map__pin--bottom{ flex-direction: column;         align-items: center; gap: 4px; }
  .mm-nbhd-map__pin .mm-nbhd-map__dot { pointer-events: auto; cursor: pointer; }
  .mm-nbhd-map__pin-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    color: rgba(26, 26, 26, 0.92);
    white-space: nowrap;
    text-shadow:
      0 0 3px rgba(255,255,255,0.95),
      0 0 6px rgba(255,255,255,0.85),
      0 1px 1px rgba(255,255,255,0.6);
    letter-spacing: 0.005em;
    pointer-events: none;
  }
  /* Mobile: float the overlay panel inline above the map at narrow widths */
  @media (max-width: 720px) {
    .mm-nbhd-map__overlay {
      position: static;
      width: auto;
      margin-bottom: 18px;
    }
    .mm-nbhd-map__canvas { height: 460px; }
  }
  .mm-nbhd-map__fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 0 24px; text-align: center;
    font-family: var(--font-body);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: #555555;
    background: var(--color-cream);
    pointer-events: none;
    z-index: 1;
  }
  /* When Mapbox successfully initializes the container, it adds the .mapboxgl-map class.
     CSS-driven hide is bulletproof against any JS race with the `load` event. */
  .mm-nbhd-map__canvas.mapboxgl-map .mm-nbhd-map__fallback { display: none; }
  /* Marker styling — quiet, editorial */
  .mm-nbhd-map__marker {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-white);
    background: #1a1a1a;
    padding: 6px 10px 5px;
    border-radius: 2px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transform: translateY(-4px);
  }
  /* Building dot — neutral black/white, no colored pin */
  .mm-nbhd-map__dot {
    display: inline-block;
    width: 10px; height: 10px;
    background: #1a1a1a;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease;
    flex-shrink: 0;
  }
  .mm-nbhd-map__dot:hover { transform: scale(1.4); }
  /* Subzone label — secondary, subtle, no color, smaller than primary marker */
  .mm-nbhd-map__sublabel {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.72);
    background: rgba(255, 255, 255, 0.82);
    padding: 4px 8px 3px;
    border-radius: 1px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  }
  /* Popup styling — neutral */
  .mm-nbhd-map .mapboxgl-popup-content {
    font-family: var(--font-body);
    color: #111111;
    padding: 9px 13px 8px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    min-width: 0;
  }
  .mm-nbhd-map__popup-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #111111;
  }
  .mm-nbhd-map__popup-cat {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6a6a6a;
    margin-top: 3px;
  }
  .mm-nbhd-map .mapboxgl-popup-tip { display: none; }
  .mm-nbhd-map .mapboxgl-popup-close-button { display: none; }
  /* Mapbox UI — minimal chrome, neutral palette */
  .mm-nbhd-map .mapboxgl-ctrl-attrib {
    font-family: var(--font-body);
    font-size: 9px;
    background: rgba(255, 255, 255, 0.8);
  }
  .mm-nbhd-map .mapboxgl-ctrl button {
    background-color: rgba(255, 255, 255, 0.95);
  }
  .mm-nbhd-map .mapboxgl-ctrl-group { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }

  @media (max-width: 720px) {
    .mm-nbhd-map { padding: 40px 0 56px; }
    .mm-nbhd-map__canvas { height: 340px; }
  }

  /* ===== v7.7 — Hide the global mm-cta-banner fallback "people" icon =====
     The mm-cta-banner is a global section injected after </main> on every page.
     Its hard-coded SVG people icon is decorative and not on-brand for the
     mm-2026 advisory aesthetic. Page-scoped suppression: only affects pages
     using this Neighborhood Hub template. Other templates keep the icon
     unchanged. No replacement icon added. */
  .mm-cta-banner__icon { display: none !important; }

  /* IDX wrapper — preserves layout space, hides 404 content gracefully */
  .mm-nbhd-idx-wrap { position: relative; min-height: 360px; background: var(--color-cream); border-radius: 3px; overflow: hidden; }
  .mm-nbhd-idx-wrap iframe { display: block; width: 100%; min-height: 360px; border: 0; }
  .mm-nbhd-idx-wrap[data-state="offline"] iframe { visibility: hidden; }
  .mm-nbhd-idx-wrap[data-state="offline"]::before {
    content: "Live Chelsea inventory — reconnecting to listings service";
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 0 24px; text-align: center;
    font-family: var(--font-body); font-size: 13px; font-weight: 500;
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-text-muted);
  }
