/* ==========================================================================
   100 Duboce Ave — listing microsite
   Premium editorial real-estate design system
   ========================================================================== */

:root {
  /* Palette — anchored on agent brand color #1f3a5f */
  --navy: #1f3a5f;
  --navy-deep: #16293f;
  --navy-soft: #2e4d78;
  --ink: #1c2530;
  --ink-soft: #4c5866;
  --ink-faint: #7d8794;
  --paper: #f7f4ee;
  --paper-2: #efeadf;
  --paper-3: #e6dfd0;
  --card: #fffdf9;
  --line: #ddd5c6;
  --brass: #a97e3f;

  /* Category hues (muted, editorial) */
  --c-food: #b06a2e;
  --c-parks: #4c7a51;
  --c-transit: #33628f;
  --c-groceries: #a5484f;
  --c-schools: #746043;

  /* Type */
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Motion tokens */
  --ease: cubic-bezier(.22, .8, .3, 1);
  --dur: .28s;
  --dur-slow: .6s;

  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(28, 37, 48, .06), 0 4px 14px rgba(28, 37, 48, .06);
  --shadow-md: 0 2px 6px rgba(28, 37, 48, .08), 0 14px 34px rgba(28, 37, 48, .12);
  --shadow-lg: 0 6px 18px rgba(22, 41, 63, .18), 0 30px 70px rgba(22, 41, 63, .22);
  --maxw: 1160px;
}

* { box-sizing: border-box; }
/* Robust hide: data-driven hydration toggles [hidden] on grid/flex children,
   whose explicit display would otherwise override the UA [hidden] rule. */
[hidden] { display: none !important; }
/* Photoless listings: a solid accent-gradient hero keeps the white hero text
   legible instead of a blank white panel. */
.hero.no-photo { background: linear-gradient(135deg, var(--navy, #1f3a5f), var(--navy-deep, #16293f)); }
.hero.no-photo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 120% at 80% 0%, rgba(255,255,255,.10), transparent 60%); }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); }
button { font-family: inherit; }

::selection { background: rgba(31, 58, 95, .18); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 560;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
  letter-spacing: -.01em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Kicker / eyebrow */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 14px;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--brass);
}

.section-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; }
.section-sub { color: var(--ink-soft); max-width: 62ch; margin: 6px 0 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 620;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:focus-visible { outline: 3px solid rgba(31, 58, 95, .4); outline-offset: 2px; }

.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-soft); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost { background: transparent; color: var(--navy); border-color: rgba(31, 58, 95, .35); }
.btn-ghost:hover { border-color: var(--navy); background: rgba(31, 58, 95, .06); transform: translateY(-2px); }

.btn-light { background: rgba(255, 255, 255, .92); color: var(--navy); box-shadow: var(--shadow-sm); }
.btn-light:hover { background: #fff; color: var(--navy-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline-light { background: rgba(22, 41, 63, .25); color: #fff; border-color: rgba(255, 255, 255, .55); backdrop-filter: blur(6px); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .16); border-color: #fff; transform: translateY(-2px); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(247, 244, 238, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(221, 213, 198, .7);
  transition: transform .38s var(--ease);
}
.site-nav.nav-hidden { transform: translateY(-100%); }
.site-nav .nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-brand {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
  display: flex;
  align-items: baseline;
  gap: 7px;
  transition: opacity var(--dur) var(--ease);
}
.nav-brand:hover { opacity: .75; }
.nav-brand .brand-no { color: var(--navy); }
.nav-brand small {
  font-family: var(--body);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 560;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 8px;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 4px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }
.nav-links a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { padding: 9px 17px; font-size: 13.5px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease);
}
.nav-toggle:hover { background: var(--paper-2); }
.nav-toggle svg { width: 20px; height: 20px; }

.nav-menu { display: none; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-links, .nav-actions { display: none; }
  .site-nav.open .nav-menu { display: flex; }
  .nav-menu {
    flex-direction: column;
    gap: 6px;
    padding: 10px 20px 18px;
    border-top: 1px solid var(--line);
  }
  .nav-menu a:not(.btn) { padding: 11px 6px; font-size: 16px; color: var(--ink); text-decoration: none; font-weight: 560; border-bottom: 1px solid rgba(221,213,198,.5); }
  .nav-menu .btn { margin-top: 8px; }
}

/* ==========================================================================
   Hero (Home)
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy-deep);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroSettle 2.4s var(--ease) forwards;
}
@keyframes heroSettle { to { transform: scale(1); } }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(14, 24, 37, .94) 0%, rgba(14, 24, 37, .62) 30%, rgba(14, 24, 37, .18) 60%, rgba(14, 24, 37, .3) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 120px 20px 54px;
  color: #fff;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(22, 41, 63, .55);
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 7px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  margin-bottom: 20px;
}
.hero-status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #7fc98f;
  box-shadow: 0 0 0 3px rgba(127, 201, 143, .25);
}
.hero h1 {
  color: #fff;
  font-size: clamp(42px, 8vw, 86px);
  font-weight: 480;
  letter-spacing: -.015em;
  margin: 0 0 6px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.hero h1 .unit { font-style: italic; font-weight: 400; color: #e8d9bd; }
.hero-locale {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255, 255, 255, .88);
  margin: 0 0 30px;
  font-weight: 480;
  letter-spacing: .01em;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, .3);
  padding-top: 20px;
  margin-bottom: 28px;
}
.hero-stat { padding: 0 34px 0 0; margin-right: 34px; border-right: 1px solid rgba(255, 255, 255, .22); }
.hero-stat:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.hero-stat b {
  display: block;
  font-family: var(--display);
  font-size: clamp(21px, 3vw, 30px);
  font-weight: 550;
  letter-spacing: -.01em;
}
.hero-stat span {
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 640px) {
  .hero { min-height: 86vh; }
  .hero-inner { padding-bottom: 40px; }
  .hero-stat { padding-right: 18px; margin-right: 18px; }
  .hero-ctas .btn { flex: 1 1 auto; }
  /* Mobile: the text block sits over a much deeper scrim so the address and
     white stat numerals never fight the bright facade. */
  .hero::after {
    background:
      linear-gradient(to top, rgba(14, 24, 37, .96) 0%, rgba(14, 24, 37, .86) 36%, rgba(14, 24, 37, .38) 64%, rgba(14, 24, 37, .3) 100%);
  }
  .hero-media img { object-position: 62% 22%; }
}

/* ==========================================================================
   Sections (shared rhythm)
   ========================================================================== */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--paper-2); }
.section-head { margin-bottom: 40px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }

/* ==========================================================================
   Spec strip — editorial key facts (no boxes, big serif numerals on a rule)
   ========================================================================== */
.spec-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 26px 0 24px;
}
.spec {
  flex: 1 1 auto;
  min-width: 130px;
  padding: 0 34px 0 0;
  margin-right: 34px;
  border-right: 1px solid var(--line);
  transition: transform var(--dur) var(--ease);
}
.spec:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.spec:hover { transform: translateY(-2px); }
.spec b {
  display: block;
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 520;
  letter-spacing: -.01em;
  color: var(--navy);
  margin-bottom: 3px;
}
.spec span {
  font-size: 11px;
  font-weight: 640;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (max-width: 640px) {
  .spec-strip { padding: 20px 0 18px; gap: 18px 0; }
  .spec { flex: 1 1 40%; min-width: 40%; padding-right: 16px; margin-right: 16px; }
  .spec:nth-child(2n) { border-right: none; margin-right: 0; padding-right: 0; }
}

/* ==========================================================================
   Description (editorial)
   ========================================================================== */
.desc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.desc-copy { font-size: clamp(17px, 2vw, 19px); line-height: 1.75; color: var(--ink); }
.desc-copy p { margin: 0 0 1.2em; }
.desc-copy p:last-child { margin-bottom: 0; }
.desc-copy p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 3.1em;
  line-height: .82;
  float: left;
  padding: 8px 10px 0 0;
  color: var(--navy);
  font-weight: 550;
}
.desc-figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 0;
}
.desc-figure img { width: 100%; height: 100%; min-height: 340px; object-fit: cover; transition: transform 1.1s var(--ease); }
.desc-figure:hover img { transform: scale(1.035); }
.desc-figure figcaption {
  position: absolute;
  left: 14px; bottom: 14px;
  background: rgba(22, 41, 63, .78);
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
@media (max-width: 860px) { .desc-layout { grid-template-columns: 1fr; gap: 30px; } }

/* ==========================================================================
   Highlights
   ========================================================================== */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.hl-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(31, 58, 95, .3); }
.hl-card .hl-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(31, 58, 95, .08);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.hl-card .hl-icon svg { width: 22px; height: 22px; }
.hl-card h3 { font-size: 19px; margin-bottom: 6px; }
.hl-card p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

/* ==========================================================================
   Top picks rail
   ========================================================================== */
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.rail-nav { display: flex; gap: 8px; }
.rail-nav button {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(31, 58, 95, .3);
  background: var(--card);
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.rail-nav button:hover { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-2px); }
.rail-nav button:active { transform: scale(.94); }
.rail-nav button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.rail-nav svg { width: 17px; height: 17px; }

.picks-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 22px;
  margin: 0 -4px;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-3) transparent;
}
.pick-card {
  flex: 0 0 272px;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pick-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.pick-card:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.pick-card .pick-img { position: relative; height: 168px; overflow: hidden; background: var(--paper-3); }
.pick-card .pick-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pick-card:hover .pick-img img { transform: scale(1.06); }
.pick-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pick-body h3 { font-size: 17.5px; }
.pick-body p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; flex: 1; }
.pick-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-faint); font-weight: 560; }
.pick-rating { display: flex; align-items: center; font-size: 13px; margin: -1px 0 1px; }
.pick-rating .r-star { color: var(--brass); font-weight: 660; letter-spacing: .01em; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 680;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
}
.pick-img .chip { position: absolute; top: 12px; left: 12px; backdrop-filter: blur(4px); }
.chip.cat-food_coffee { background: rgba(176, 106, 46, .92); }
.chip.cat-parks { background: rgba(76, 122, 81, .92); }
.chip.cat-transit { background: rgba(51, 98, 143, .92); }
.chip.cat-groceries { background: rgba(165, 72, 79, .92); }
.chip.cat-schools { background: rgba(116, 96, 67, .92); }

/* ==========================================================================
   Buyer tools
   ========================================================================== */
.tools-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 900px) { .tools-grid { grid-template-columns: minmax(0, 1fr); } }
.tool-panel { min-width: 0; }
.tool-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.tool-panel.tool-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.tool-panel.tool-dark h3 { color: #fff; }
.tool-panel h3 { font-size: 23px; margin-bottom: 4px; }
.tool-panel .tool-sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 24px; }
.tool-dark .tool-sub { color: rgba(255, 255, 255, .75); }

.calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
@media (max-width: 480px) { .calc-fields { grid-template-columns: 1fr; } }
.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 660;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 7px;
}
.field .input-wrap { position: relative; }
.field .input-wrap .affix {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--ink-faint); pointer-events: none;
}
.field .affix.pre { left: 13px; }
.field .affix.post { right: 13px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input.has-pre { padding-left: 28px; }
.field input.has-post { padding-right: 34px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #c4b99f; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31, 58, 95, .14);
}
.calc-result {
  margin-top: auto;
  border-top: 1px dashed var(--line);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 26px;
}
.calc-result .big {
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 560;
  color: var(--navy);
  letter-spacing: -.01em;
}
.calc-result .big small { font-size: .4em; color: var(--ink-faint); font-family: var(--body); font-weight: 560; letter-spacing: 0; }
.calc-breakdown { font-size: 13px; color: var(--ink-soft); }
.calc-note { font-size: 12px; color: var(--ink-faint); margin-top: 14px; }
.calc-note b { color: var(--ink-soft); }

.commute-form { display: flex; gap: 10px; margin-top: 6px; }
.commute-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-family: var(--body);
  font-size: 15px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.commute-form input::placeholder { color: rgba(255, 255, 255, .55); }
.commute-form input:hover { border-color: rgba(255, 255, 255, .6); }
.commute-form input:focus { outline: none; border-color: #fff; background: rgba(255, 255, 255, .16); }
.commute-result {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  animation: commuteIn .35s var(--ease) both;
}
.commute-result.is-example { border-color: rgba(232, 217, 189, .5); }
@keyframes commuteIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.commute-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy);
  background: #e8d9bd;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.commute-dest {
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}
.commute-answer { font-size: 13.5px; line-height: 1.55; color: rgba(255, 255, 255, .88); }
.commute-answer strong { color: #fff; font-weight: 680; }
.commute-loading { display: flex; gap: 6px; padding: 6px 0 2px; }
.commute-loading span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  animation: commuteDot 1s infinite ease-in-out;
}
.commute-loading span:nth-child(2) { animation-delay: .16s; }
.commute-loading span:nth-child(3) { animation-delay: .32s; }
@keyframes commuteDot { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .commute-result { animation: none; }
  .commute-loading span { animation: none; }
}
.commute-hint { font-size: 12.5px; color: rgba(255, 255, 255, .65); margin-top: 16px; }
.commute-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.commute-chips button {
  border: 1px solid rgba(255, 255, 255, .4);
  background: transparent;
  color: #fff;
  font-size: 12.5px;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.commute-chips button:hover { background: rgba(255, 255, 255, .16); border-color: #fff; transform: translateY(-1px); }
.commute-chips button:active { transform: scale(.96); }
.commute-chips button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ==========================================================================
   Explore this listing — mobile-only quick-nav (snippet + link per page).
   Hidden on desktop (>880px) where the top nav links are already visible.
   ========================================================================== */
.explore-nav { display: none; }
@media (max-width: 880px) { .explore-nav { display: block; } }
.explore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .explore-grid { grid-template-columns: 1fr; } }
.explore-card {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 90px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.explore-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.explore-card:active { transform: scale(.99); }
/* Left media: a real photo/snippet (with the icon as a graceful fallback). */
.explore-media {
  position: relative;
  flex: none;
  width: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 58, 95, .08);
  overflow: hidden;
}
.explore-ic { color: var(--navy); display: flex; }
.explore-ic svg { width: 26px; height: 26px; }
.explore-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.explore-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 14px 14px; }
.explore-tx b { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--ink); }
.explore-tx span { font-size: 12.5px; color: var(--ink-soft); line-height: 1.35; }
.explore-arrow { flex: none; width: 18px; height: 18px; align-self: center; margin: 0 14px 0 4px; color: var(--ink-faint); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  position: relative;
  background: var(--navy-deep);
  color: #fff;
  overflow: hidden;
}
.cta-band .cta-media { position: absolute; inset: 0; }
.cta-band .cta-media img { width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.cta-band .cta-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(22, 41, 63, .95) 20%, rgba(22, 41, 63, .55)); }
.cta-inner { position: relative; z-index: 2; padding: 92px 20px; max-width: var(--maxw); margin: 0 auto; }
.cta-inner h2 { color: #fff; font-size: clamp(30px, 4.5vw, 48px); max-width: 16ch; margin-bottom: 14px; }
.cta-inner p { color: rgba(255, 255, 255, .82); max-width: 52ch; margin: 0 0 30px; }
.cta-inner .hero-ctas { margin: 0; }

/* ==========================================================================
   Neighborhood — page header
   ========================================================================== */
.page-head { padding: 66px 0 34px; }
.page-head h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 500; }
.count-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.count-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 580;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
}
.count-pill i { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* Controls */
.explorer-controls {
  position: sticky;
  top: 66px;
  z-index: 500;
  background: rgba(247, 244, 238, .93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block: 1px solid rgba(221, 213, 198, .8);
  padding: 14px 0;
}
.controls-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; scrollbar-width: none; flex: 1 1 340px; padding: 2px; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cat-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); transition: background var(--dur) var(--ease); }
.cat-chip:hover { border-color: var(--navy); color: var(--navy); transform: translateY(-1px); }
.cat-chip:active { transform: scale(.97); }
.cat-chip:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.cat-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cat-chip[aria-pressed="true"] i { background: #fff !important; }
.cat-chip .n { font-size: 11px; opacity: .65; font-weight: 640; }

.search-wrap { position: relative; flex: 1 1 200px; max-width: 300px; }
.search-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-faint); pointer-events: none; }
.search-wrap input {
  width: 100%;
  padding: 10px 13px 10px 38px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.search-wrap input:hover { border-color: #c4b99f; }
.search-wrap input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31, 58, 95, .12); }

.sort-toggle {
  display: inline-flex;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  padding: 3px;
  gap: 2px;
}
.sort-toggle button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 620;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sort-toggle button:hover { color: var(--navy); }
.sort-toggle button:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
.sort-toggle button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* Featured rail (neighborhood) */
.featured-rail-section { padding: 34px 0 4px; }

/* Map + directory layout */
.explorer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 26px;
  align-items: start;
  padding: 26px 0 80px;
}
.map-panel { position: sticky; top: 146px; }
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background: var(--paper-3);
  position: relative;
  z-index: 0; /* isolate Leaflet's control z-indexes from the page drawer/scrim */
}
#nbhd-map { height: min(64vh, 620px); width: 100%; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 4px 0; font-size: 12px; color: var(--ink-soft); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; }
.match-count { font-size: 13px; color: var(--ink-faint); margin: 10px 4px 0; }

@media (max-width: 980px) {
  .explorer-layout { grid-template-columns: 1fr; }
  .map-panel { position: relative; top: 0; }
  #nbhd-map { height: 52vh; }
}

/* Directory */
.dir-group { margin-bottom: 34px; }
.dir-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dir-group-head i { width: 10px; height: 10px; border-radius: 50%; }
.dir-group-head h3 { font-size: 20px; }
.dir-group-head .n { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }
.dir-note { font-size: 12px; color: var(--ink-faint); margin: -6px 0 12px; }
.dir-rows { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow-sm); }
.dir-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 14px;
  align-items: center;
  text-align: left;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(221, 213, 198, .55);
  cursor: pointer;
  font-family: var(--body);
  transition: background var(--dur) var(--ease);
}
.dir-row:last-child { border-bottom: none; }
.dir-row:hover { background: rgba(31, 58, 95, .05); }
.dir-row:active { background: rgba(31, 58, 95, .09); }
.dir-row:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.dir-row .r-name { font-size: 15px; font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-row .r-sub { grid-column: 1; font-size: 12.5px; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 3px 10px; }
.dir-row .r-dist { grid-row: span 2; font-size: 13px; font-weight: 620; color: var(--navy); white-space: nowrap; }
.dir-row .r-star { color: var(--brass); font-weight: 640; }
.dir-more {
  width: 100%;
  padding: 12px;
  border: none;
  background: var(--paper-2);
  color: var(--navy);
  font-weight: 620;
  font-size: 13.5px;
  cursor: pointer;
  font-family: var(--body);
  transition: background var(--dur) var(--ease);
}
.dir-more:hover { background: var(--paper-3); }
.dir-more:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-faint);
}
.empty-state b { display: block; font-family: var(--display); font-size: 20px; color: var(--ink-soft); margin-bottom: 6px; }

/* Marker dots */
.poi-dot {
  display: block;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.home-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50% 50% 50% 4px;
  background: var(--navy);
  border: 3px solid #fff;
  /* Larger + a soft navy halo so the property reads instantly as distinct from
     the category pins around it. */
  box-shadow: 0 6px 18px rgba(22, 41, 63, .55), 0 0 0 5px rgba(31, 58, 95, .16);
  transform: rotate(-8deg);
}
.home-pin svg { width: 24px; height: 24px; transform: rotate(8deg); }

/* Chat<->map synergy: home->place distance badge, on-demand result pins,
   and the "Clear results" control. */
.path-dist-badge {
  display: inline-block; white-space: nowrap; transform: translate(-50%, -50%);
  background: var(--navy, #1f3a5f); color: #fff; font-family: var(--body);
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3); border: 1.5px solid #fff;
}
.result-pin { display: block; width: 30px; height: 30px; color: var(--brass, #a97e3f); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .4)); }
.result-pin svg { width: 30px; height: 30px; }
.map-clear-btn {
  background: #fff; color: var(--ink, #1c2530); border: 1px solid var(--line, #ddd5c6);
  border-radius: 9px; padding: 7px 12px; font: 600 12.5px var(--body); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.map-clear-btn:hover { background: var(--paper-2, #efeadf); }

/* Explore-by-area cards */
.areas-section { padding: clamp(30px, 5vw, 56px) 0; }
.areas-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px; margin-top: 26px;
}
.area-card {
  border: 1px solid var(--line, #ddd5c6); border-radius: var(--radius, 14px);
  overflow: hidden; background: var(--card, #fffdf9); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform var(--dur, .28s) var(--ease), box-shadow var(--dur, .28s) var(--ease);
}
.area-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.area-map { height: 150px; width: 100%; background: var(--paper-2, #efeadf); pointer-events: none; }
.area-map .leaflet-control-container { display: none; }
.area-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.area-body h3 { font-family: var(--display); font-size: 20px; margin: 0; color: var(--ink); }
.area-body p { font-size: 14px; line-height: 1.55; color: var(--ink-soft, #4c5866); margin: 0; flex: 1; }
.area-link {
  align-self: flex-start; margin-top: 4px; display: inline-flex; align-items: center; gap: 6px;
  font: 600 14px var(--body); color: var(--navy, #1f3a5f);
}
.area-link svg { width: 16px; height: 16px; transition: transform var(--dur, .28s) var(--ease); }
.area-card:hover .area-link svg { transform: translateX(4px); }

/* Back link (area detail page) */
.back-link {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px;
  font: 600 14px var(--body); color: var(--ink-soft, #4c5866); text-decoration: none;
  transition: color var(--dur, .28s) var(--ease), transform var(--dur, .28s) var(--ease);
}
.back-link:hover { color: var(--navy, #1f3a5f); transform: translateX(-3px); }
.back-link svg { width: 17px; height: 17px; }
#area-detail-map { height: min(60vh, 560px); width: 100%; }

/* ==========================================================================
   Detail drawer
   ========================================================================== */
.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 38, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
  z-index: 950;
}
.drawer-scrim.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(430px, 100vw);
  background: var(--card);
  z-index: 960;
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform .38s var(--ease);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.show { transform: none; }
.drawer-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(22, 41, 63, .55);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.drawer-close:hover { background: var(--navy); transform: rotate(90deg); }
.drawer-hero { height: 230px; background: var(--paper-3); position: relative; flex: none; }
.drawer-hero img { width: 100%; height: 100%; object-fit: cover; }
.drawer-hero.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--paper-2), var(--paper-3));
}
.drawer-hero.no-img svg { width: 54px; height: 54px; color: var(--ink-faint); opacity: .6; }
.drawer-hero .chip { position: absolute; left: 16px; bottom: 16px; }
.drawer-body { padding: 24px 26px 30px; display: flex; flex-direction: column; gap: 16px; }
.drawer-body h2 { font-size: 26px; line-height: 1.15; }
.drawer-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-soft); }
.drawer-meta .r-star { color: var(--brass); font-weight: 650; }
.drawer-desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; margin: 0; }
.drawer-addr { font-size: 13.5px; color: var(--ink-faint); display: flex; gap: 8px; align-items: flex-start; }
.drawer-addr svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }
.drawer-links { display: flex; flex-wrap: wrap; gap: 9px; }
.drawer-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
  color: var(--navy);
  border: 1.5px solid rgba(31, 58, 95, .3);
  padding: 9px 15px;
  border-radius: 999px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.drawer-links a:hover { background: rgba(31, 58, 95, .07); border-color: var(--navy); transform: translateY(-1px); }
.drawer-links a:active { transform: scale(.97); }
.drawer-links svg { width: 14px; height: 14px; }
.drawer-ai { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 18px; }
.drawer-ai .btn { width: 100%; }
.drawer-note { font-size: 12px; color: var(--ink-faint); margin: 0; }

@media (max-width: 640px) {
  /* Compact floating card (not a full-screen sheet): sized to its content and
     inset from the edges so the map stays visible around it. */
  .drawer {
    top: auto;
    left: 12px; right: 12px; bottom: 12px;
    width: auto;
    height: auto;
    max-height: 72vh;
    border-radius: 18px;
    transform: translateY(130%);
    box-shadow: 0 18px 50px rgba(16, 24, 40, .45);
  }
  .drawer.show { transform: none; }
  .drawer-hero { height: 148px; border-radius: 18px 18px 0 0; overflow: hidden; }
  .drawer-body { padding: 15px 17px 19px; gap: 11px; }
  .drawer-body h2 { font-size: 20px; }
  .drawer-close { width: 36px; height: 36px; top: 10px; right: 10px; font-size: 18px; }
  .drawer-links a { padding: 8px 13px; font-size: 12.5px; }
  /* Keep the map/list visible around the floating card rather than dimming the
     whole screen; tapping outside still closes it. */
  .drawer-scrim { background: transparent; }
}

/* City context */
.context-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 30px 32px;
  box-shadow: var(--shadow-sm);
}
.context-block h2 { font-size: 24px; margin-bottom: 10px; }
.context-block p { margin: 0; color: var(--ink-soft); line-height: 1.7; }

/* Ask-AI inline band */
.ask-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 34px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 38px;
  box-shadow: var(--shadow-md);
}
.ask-band h2 { color: #fff; font-size: clamp(22px, 3vw, 30px); }
.ask-band > div { flex: 1 1 320px; }
.ask-band p { color: rgba(255, 255, 255, .78); margin: 6px 0 0; font-size: 14.5px; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery-grid .g-item {
  position: relative;
  border: none;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--paper-3);
  aspect-ratio: 4 / 3;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.gallery-grid .g-item:first-child { grid-column: span 2; aspect-ratio: 16 / 8.5; }
.gallery-grid .g-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-grid .g-item:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.gallery-grid .g-item:hover img { transform: scale(1.045); }
.g-item .g-label {
  position: absolute;
  left: 14px; bottom: 14px;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(22, 41, 63, .72);
  color: #fff;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.g-item:hover .g-label, .g-item:focus-visible .g-label { opacity: 1; transform: none; }
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid .g-item, .gallery-grid .g-item:first-child { grid-column: span 1; aspect-ratio: 4 / 3; }
  .g-item .g-label { opacity: 1; transform: none; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(12, 18, 26, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.lightbox.show { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: min(92vw, 1400px);
  max-height: 84vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  user-select: none;
  -webkit-user-drag: none;
}
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn:active { transform: translateY(-50%) scale(.92); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-btn svg { width: 20px; height: 20px; }
.lb-prev { left: max(14px, 3vw); }
.lb-next { right: max(14px, 3vw); }
.lb-close { position: absolute; top: 20px; right: 20px; transform: none; width: 44px; height: 44px; }
.lb-close:active { transform: scale(.92); }
.lb-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
  letter-spacing: .12em;
}
@media (max-width: 640px) {
  .lb-prev, .lb-next { display: none; } /* swipe instead */
}

/* ==========================================================================
   Room Restyle — AI furniture-swap CTA on gallery photos
   ========================================================================== */
.restyle-btn {
  position: absolute;
  right: 12px; bottom: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #2e4d78 0%, #1f3a5f 55%, #16293f 100%);
  color: #fff;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .005em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(22, 41, 63, .4), inset 0 0 0 1px rgba(255, 255, 255, .16);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), filter var(--dur) var(--ease);
  animation: restyle-cta-glow 3.4s var(--ease) infinite;
}
.restyle-btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 10px 30px rgba(22, 41, 63, .52), inset 0 0 0 1px rgba(255, 255, 255, .28); }
.restyle-btn:active { transform: translateY(0) scale(.98); }
.restyle-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.restyle-btn:disabled { opacity: .65; cursor: default; transform: none; animation: none; }
.restyle-btn .restyle-spark {
  width: 17px; height: 17px; flex: none;
  color: #ffd79e; /* warm gold spark reads as "AI magic" */
  filter: drop-shadow(0 0 4px rgba(255, 197, 122, .55));
  animation: restyle-twinkle 2.6s var(--ease) infinite;
}
.restyle-btn-label { white-space: nowrap; }
.restyle-btn-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase;
  background: var(--brass); color: #fff;
  padding: 2px 6px; border-radius: 6px; line-height: 1.4;
  box-shadow: 0 1px 4px rgba(169, 126, 63, .5);
}
@keyframes restyle-twinkle {
  0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50% { opacity: .65; transform: scale(.82) rotate(-8deg); }
}
@keyframes restyle-cta-glow {
  0%, 100% { box-shadow: 0 6px 20px rgba(22, 41, 63, .4), inset 0 0 0 1px rgba(255, 255, 255, .16); }
  50% { box-shadow: 0 6px 22px rgba(22, 41, 63, .4), 0 0 0 4px rgba(169, 126, 63, .22), inset 0 0 0 1px rgba(255, 255, 255, .16); }
}

/* Reset / remove control shown once a restyle is applied. */
.restyle-reset {
  position: absolute;
  left: 12px; bottom: 12px;
  z-index: 6;
  display: none;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(16, 26, 40, .74);
  color: #fff;
  font-family: var(--body);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(5px);
  box-shadow: var(--shadow-sm);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.restyle-reset:hover { background: rgba(16, 26, 40, .92); transform: translateY(-1px); }
.restyle-reset:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.restyle-reset svg { width: 13px; height: 13px; flex: none; }
.g-item.has-restyle .restyle-reset { display: inline-flex; }
/* Once restyled, the card is a comparison slider — hide the photo-number pill
   and shrink the CTA into a compact "Change photo" control. */
.g-item.has-restyle .g-label { display: none; }
.g-item.has-restyle .restyle-btn {
  animation: none;
  padding: 8px 13px;
  font-size: 12px;
  background: rgba(22, 41, 63, .82);
  backdrop-filter: blur(5px);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  .restyle-btn { padding: 9px 12px; font-size: 12px; gap: 6px; right: 10px; bottom: 10px; }
  .restyle-btn-badge { display: none; }
  .restyle-reset { left: 10px; bottom: 10px; }
}

.restyle-overlay {
  position: absolute; inset: 0;
  z-index: 6;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; text-align: center;
  padding: 18px;
  background: rgba(16, 26, 40, .84);
  color: #fff;
  backdrop-filter: blur(3px);
  cursor: default;
}
.restyle-overlay p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.restyle-overlay p span { color: rgba(255, 255, 255, .72); font-size: 12px; }
.restyle-overlay.is-error p { color: #ffd9d2; }
.restyle-spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  animation: restyle-spin .8s linear infinite;
}
@keyframes restyle-spin { to { transform: rotate(360deg); } }
.restyle-dismiss {
  border: 1px solid rgba(255, 255, 255, .5);
  background: transparent; color: #fff;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.restyle-dismiss:hover { background: rgba(255, 255, 255, .15); }

/* Before/after comparison slider (Listed vs. your furniture). Both images
   always fill the same box with object-fit: cover, so the two halves stay
   pixel-aligned in the 4:3 card and the 3:2 lightbox alike. */
.cmp-slider {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  user-select: none;
  -webkit-user-select: none;
}
.cmp-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  transform: none !important; /* defeat the .gallery-grid img hover-zoom */
}
.cmp-img-top { clip-path: inset(0 calc(100% - var(--cmp-pos, 50%)) 0 0); }
.cmp-card { position: absolute; inset: 0; }
.cmp-lightbox {
  position: relative;
  width: min(92vw, 1200px);
  aspect-ratio: 3 / 2;
  max-height: 84vh;
  border-radius: 6px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
.cmp-tag {
  position: absolute; top: 10px;
  z-index: 3;
  font-family: var(--body);
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #fff;
  padding: 4px 9px;
  border-radius: 6px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.cmp-tag-a { left: 10px; background: rgba(22, 41, 63, .82); }
.cmp-tag-b { right: 10px; background: rgba(169, 126, 63, .9); }
.cmp-divider {
  position: absolute; top: 0; bottom: 0;
  left: var(--cmp-pos, 50%);
  width: 2px;
  background: #fff;
  transform: translateX(-1px);
  z-index: 4;
  cursor: ew-resize;
  touch-action: none;
}
.cmp-divider::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 44px; transform: translateX(-50%);
}
.cmp-handle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--navy);
  box-shadow: 0 2px 10px rgba(16, 24, 44, .4);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  transition: transform var(--dur) var(--ease);
}
.cmp-slider.cmp-dragging .cmp-handle { transform: translate(-50%, -50%) scale(1.08); }
.cmp-divider:focus-visible { outline: none; }
.cmp-divider:focus-visible .cmp-handle { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 30px;
  align-items: start;
}
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

.agent-card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 96px;
}
.agent-card .agent-photo { height: 190px; background: var(--navy-deep); display: none; }
.agent-card .agent-photo.has-img { display: block; }
.agent-card .agent-photo img { width: 100%; height: 100%; object-fit: cover; }
.agent-card-body { padding: 28px 30px 30px; }
.agent-card h2 { color: #fff; font-size: 24px; margin-bottom: 2px; }
.agent-card .agent-role {
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 640;
  color: #e8d9bd;
  margin: 0 0 18px;
}
.agent-lines { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.agent-lines a, .agent-lines span {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .9);
  text-decoration: none;
  font-size: 14.5px;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.agent-lines a:hover { color: #fff; transform: translateX(3px); }
.agent-lines svg { width: 17px; height: 17px; flex: none; color: #e8d9bd; }
.agent-note { font-size: 12.5px; color: rgba(255, 255, 255, .62); line-height: 1.55; margin: 0; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 16px; }

.lead-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.lead-panel h2 { font-size: 27px; margin-bottom: 6px; }
.lead-panel > p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 26px; }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lead-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .lead-grid { grid-template-columns: 1fr; } .lead-panel { padding: 26px 22px; } }
.lead-panel .btn { margin-top: 22px; width: 100%; }
.conjure-form-status { margin-top: 14px; font-size: 14px; font-weight: 560; }
.conjure-form-status.success { color: #2e6b3f; }
.conjure-form-status.error { color: #a5484f; }
.lead-privacy { font-size: 12px; color: var(--ink-faint); margin-top: 14px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .78);
  padding: 60px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }
.footer-brand { font-family: var(--display); font-size: 24px; color: #fff; margin-bottom: 8px; }
.footer-grid p { font-size: 13.5px; line-height: 1.65; margin: 0; }
.footer-grid h4 { color: #fff; font-family: var(--body); font-size: 12px; letter-spacing: .15em; text-transform: uppercase; font-weight: 660; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: rgba(255, 255, 255, .78); text-decoration: none; font-size: 14px; transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.footer-links a:hover { color: #fff; transform: translateX(3px); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  padding-top: 26px;
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
}
.eho { display: flex; align-items: center; gap: 10px; }
.eho svg { width: 30px; height: 30px; flex: none; color: rgba(255, 255, 255, .75); }

/* ==========================================================================
   Misc
   ========================================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 2000;
}
.skip-link:focus { left: 8px; }

/* Leaflet tweaks to match theme */
.leaflet-container { font-family: var(--body); background: #e9e4d8; }
.leaflet-tooltip {
  font-family: var(--body);
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.leaflet-control-zoom a { color: var(--navy) !important; }

/* Optional-field tag on calculator labels */
.field label .opt {
  font-style: normal;
  font-weight: 560;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--ink-faint);
  opacity: .8;
  margin-left: 4px;
}

/* Distance select + rating filter (neighborhood explorer) */
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 15px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 34px 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.select-wrap select:hover { border-color: var(--navy); color: var(--navy); }
.select-wrap select:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31, 58, 95, .12); }

.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.rating-chip span { color: var(--brass); }
.rating-chip:hover { border-color: var(--navy); color: var(--navy); transform: translateY(-1px); }
.rating-chip:active { transform: scale(.97); }
.rating-chip:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.rating-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.rating-chip[aria-pressed="true"] span { color: #e8d9bd; }

/* ==========================================================================
   AI concierge — theme overrides for the vetted widget (visual only)
   ========================================================================== */
.cc-panel {
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(22, 41, 63, .32) !important;
}
.cc-panel .cc-head {
  flex: none;
  padding: 15px 16px;
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .01em;
}
.cc-panel .cc-head > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}
.cc-panel .cc-head button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cc-panel .cc-head button:hover { background: rgba(255, 255, 255, .34); }
.cc-panel .cc-head button:active { transform: scale(.92); }
.cc-panel .cc-head button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cc-panel .cc-log { background: #faf7f1; }
/* AI bubbles: warm paper with dark ink, clearly distinct from the navy header
   (accent background is set inline by the widget, hence the !important). */
.cc-panel .cc-msg.cc-ai {
  background: #efe9dc !important;
  color: var(--ink);
  border: 1px solid rgba(221, 213, 198, .8);
}
.cc-panel .cc-ai a { color: var(--navy); }
.cc-panel .cc-ai strong { color: var(--navy-deep); }
/* Place chips inside AI replies: the widget styles them white-on-translucent
   for a dark bubble, but our bubble is light warm paper — so recolor them to
   readable navy-on-tint (otherwise they render as unreadable white text). */
.cc-panel .cc-ai .cc-place {
  background: rgba(31, 58, 95, .1);
  color: var(--navy);
  text-decoration-color: rgba(31, 58, 95, .45);
}
.cc-panel .cc-ai .cc-place:hover { background: rgba(31, 58, 95, .18); }
.cc-panel .cc-msg.cc-user { background: var(--navy); color: #fff; }
.cc-panel .cc-form input { font-family: var(--body); }
.cc-panel .cc-form input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31, 58, 95, .12); }
.cc-panel .cc-form button { transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.cc-panel .cc-form button:hover:not(:disabled) { opacity: .88; }
.cc-panel .cc-form button:active:not(:disabled) { transform: scale(.96); }
.cc-panel .cc-chip { transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.cc-panel .cc-chip:hover { background: rgba(31, 58, 95, .07); transform: translateY(-1px); }
.cc-bubble:focus-visible { outline: 3px solid rgba(31, 58, 95, .5); outline-offset: 3px; }
/* One continuous warm-paper body: the log, the suggestion chips, the input row,
   and the disclaimer all share the same background so there is no hard colored
   seam between the message area and the suggestions/input below it. */
.cc-panel .cc-chips,
.cc-panel .cc-form,
.cc-panel .cc-disclaimer { background: #faf7f1; }
.cc-panel .cc-form { border-top: 1px solid rgba(221, 213, 198, .7); }
/* Typing indicator styled to match the AI bubbles (light paper, navy dots). */
.cc-panel .cc-typing { background: #efe9dc; border: 1px solid rgba(221, 213, 198, .8); }
.cc-panel .cc-typing .cc-dot { background: var(--navy); }
/* iOS zooms the page when a text field with font-size < 16px gains focus. Use
   16px on mobile inputs so focusing the chat (or any field) never zooms. */
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; }
  .cc-panel .cc-form input { font-size: 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-media img { transform: none; animation: none; }
}

/* ==========================================================================
   Map marker system — category glyph pins + per-category cluster bubbles
   (ported from the proven Barcelona map project)
   ========================================================================== */
.pin-wrap { background: none; border: none; }
.bcn-pin {
  width: 36px; height: 46px;
  transition: transform .14s ease, filter .14s ease;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35));
}
.bcn-pin svg { width: 100%; height: 100%; }
.bcn-pin.is-active {
  transform: scale(1.32) translateY(-2px);
  z-index: 1000 !important;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .5));
}
.leaflet-marker-icon.pin-wrap:hover .bcn-pin { transform: scale(1.1); }
.leaflet-marker-icon.pin-wrap:hover .bcn-pin.is-active { transform: scale(1.32) translateY(-2px); }

/* Per-category cluster bubbles: each category clusters separately and renders
   its own colour (--cc) with a white glyph + a count chip. */
.marker-cluster-cat { background: transparent; }
.marker-cluster-cat .cc-inner {
  display: grid; place-items: center; gap: 0;
  border-radius: 50%;
  color: #fff;
  font-family: var(--body);
  background: radial-gradient(circle at 50% 38%,
      color-mix(in srgb, var(--cc) 78%, #fff 22%),
      var(--cc) 72%);
  border: 2.5px solid #fff;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--cc) 30%, transparent),
    0 3px 9px rgba(0, 0, 0, .34);
  transition: transform .14s ease, box-shadow .14s ease;
}
.marker-cluster-cat:hover .cc-inner {
  transform: scale(1.08);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--cc) 40%, transparent),
    0 5px 12px rgba(0, 0, 0, .4);
}
.marker-cluster-cat .cc-glyph {
  width: 15px; height: 15px; margin-bottom: -1px; opacity: .95;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4));
}
.marker-cluster-cat .cc-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.05rem; height: 1.05rem; padding: 0 .28rem; box-sizing: border-box;
  background: rgba(20, 28, 38, .92); color: #fff; border-radius: 999px;
  font-weight: 800; font-size: .72rem; line-height: 1; letter-spacing: .01em;
}

/* Area-polygon name label — shown on hover only, sticky to the cursor. */
.leaflet-tooltip.hood-label {
  background: rgba(22, 41, 63, .94);
  border: none;
  color: #fff;
  font-family: var(--body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .015em;
  padding: 3px 11px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
  white-space: nowrap;
  pointer-events: none;
}
.leaflet-tooltip.hood-label::before { display: none !important; border: none !important; }

/* Collapsible on-map category key */
.mapkey {
  background: rgba(255, 253, 249, .97);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(22, 41, 63, .22);
  padding: 8px 11px;
  max-width: 200px;
  backdrop-filter: blur(6px);
}
.mapkey-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; background: none; border: none; padding: 0; margin: 0;
  cursor: pointer; min-height: 24px;
  font-family: var(--body); font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}
.mapkey-head svg { transition: transform .2s ease; flex: none; }
.mapkey.collapsed .mapkey-head svg { transform: rotate(-90deg); }
.mapkey.collapsed ul { display: none; }
.mapkey ul { list-style: none; margin: 7px 0 0; padding: 0; display: grid; gap: 4px; }
.mapkey li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink); font-weight: 600; line-height: 1.35; }
.mapkey-swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.mapkey-swatch.mapkey-home { background: var(--navy); border-radius: 3px; }

/* ==========================================================================
   Thumbnail list rows (directory + map rail)
   ========================================================================== */
.dir-row.has-thumb {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 3px 14px;
}
.dir-row.has-thumb .r-thumb { grid-row: span 2; }
.dir-row.has-thumb .r-sub { grid-column: 2; }
.dir-row.has-thumb .r-dist { grid-row: span 2; }
.r-thumb {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  display: block;
}
.r-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.r-thumb-glyph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.r-thumb-glyph svg { width: 22px; height: 22px; }

/* Prominent "Open full map" action over the inline neighborhood map */
.map-expand {
  position: absolute;
  right: 12px; top: 12px;
  z-index: 800;
  padding: 9px 16px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(22, 41, 63, .35);
}

/* ==========================================================================
   Full-page map explorer (map.html)
   ========================================================================== */
.map-page { overflow: hidden; }
.map-shell {
  display: flex;
  height: calc(100vh - 66px);
  height: calc(100dvh - 66px);
  min-height: 420px;
}
.map-page .site-nav.nav-hidden { transform: none; } /* app shell: nav never hides */
.map-rail {
  width: 340px;
  flex: none;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.mrail-head { padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.mrail-head h1 { font-size: 24px; font-weight: 550; line-height: 1.15; }
.mrail-head .kicker { margin-bottom: 8px; }
.rail-meta { margin: 6px 0 0; font-size: 13.5px; font-weight: 620; color: var(--navy); }
.rail-section { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.rail-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rail-section-head h2 { font-size: 17px; }
.rail-section .count-pill { padding: 5px 11px; font-size: 12px; }
.rail-section .count-pill b { font-weight: 700; }
.rail-note { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.5; }
.rail-search-wrap { max-width: none; margin-bottom: 12px; }
.rail-filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 0; }
.rail-filters .cat-chip { padding: 7px 12px; font-size: 12.5px; }
/* Multi-select toggles: ON keeps the light chip with its colour swatch (so the
   category colours stay readable), OFF fades to a dashed ghost. */
.rail-filters .cat-chip[aria-pressed="true"] { background: var(--card); border-color: var(--line); color: var(--ink); }
.rail-filters .cat-chip[aria-pressed="true"]:hover { border-color: var(--navy); }
.rail-filters .cat-chip[aria-pressed="false"] { opacity: .55; border-style: dashed; background: var(--paper-2); color: var(--ink-faint); }
.rail-filters .cat-chip[aria-pressed="false"] i { background: var(--ink-faint) !important; }
.rail-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rail-list-section { padding-bottom: 8px; }
.rail-rows { box-shadow: none; }
.rail-rows .dir-row { padding: 11px 12px; }
.rail-rows .dir-row .r-name { font-size: 14px; }
.rail-legend-section .map-legend { padding-top: 0; }
/* z-index:0 isolates Leaflet's control stack so the on-map legend/zoom can
   never paint over the rail sheet or drawer. */
.map-stage { position: relative; flex: 1; height: 100%; min-width: 0; z-index: 0; }
#map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; background: #e9e4d8; }

/* The map page drawer slides over the map only — no page scrim, and it sits
   below the sticky nav so the nav stays usable. */
.map-page .drawer-scrim { display: none !important; }
.map-page .drawer { top: 66px; }

/* Docked concierge host (the widget fills it inline on the map page) */
#rail-concierge { min-height: 0; }

/* Mobile: rail collapses into a slide-down sheet behind a toggle. */
.rail-toggle {
  display: none;
  position: absolute;
  top: 12px; right: 12px;
  z-index: 900;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 620;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.rail-toggle svg { width: 17px; height: 17px; }
@media (max-width: 800px) {
  .map-shell { position: relative; }
  .rail-toggle { display: inline-flex; }
  .map-rail {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 850;
    transform: translateY(-102%);
    transition: transform .32s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .map-rail.open { transform: none; }
  .map-page .drawer { top: auto; }
}

/* ==========================================================================
   Sticky explorer controls vs auto-hiding nav (neighborhood page)
   The controls stick at top:66px while the nav is visible; when the nav
   auto-hides, they re-anchor to the viewport top instead of floating.
   ========================================================================== */
.explorer-controls { background: var(--paper); transition: top .38s var(--ease); }
body.nav-is-hidden .explorer-controls { top: 0; }

/* ==========================================================================
   Drawer AI live-info sections (structured, source-backed)
   ========================================================================== */
.drawer-live { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 18px; }
.drawer-live .btn { width: 100%; }
.drawer-live-out { display: grid; gap: 10px; }
.drawer-live-out:not(:empty) { margin-top: 14px; }
.ai-sec {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.ai-sec h4 {
  font-family: var(--body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 5px;
}
.ai-sec p, .ai-sec li { font-size: 13.5px; color: var(--ink); line-height: 1.55; margin: 0; }
.ai-sec ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.ai-sec.ai-sec-hi { background: #f6f1e6; border-color: #e3d7bd; }
.ai-sources a { display: block; color: var(--navy); font-size: 12.5px; word-break: break-word; margin: 3px 0; }
.ai-stamp { font-size: 11.5px; color: var(--ink-faint); text-align: right; margin: 0; }
.ai-loading { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 13px; padding: 6px 0; }
.ai-spinner {
  width: 16px; height: 16px; flex: none;
  border: 2.5px solid var(--paper-3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: aiSpin .7s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-error {
  background: #f7ece8;
  border: 1px solid #e4c4b6;
  color: #8a3a26;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}
