/*
 * Broker 2.0 Quiet Luxury visual contract — three explicitly approved pages.
 * Layout geometry and the original gallery/dialog owners remain untouched.
 */
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project {
  --bkg-quiet-surface:#FFFDF9;
  --bkg-quiet-page:#F8F5EF;
  --bkg-quiet-border:#D7D1C6;
  --bkg-quiet-text:#292B29;
  --bkg-quiet-muted:#625F58;
  --bkg-quiet-bronze:#825B37;
  --bkg-edge-shadow:inset -3px 0 0 rgba(169,140,105,.10),
    inset 0 1px 0 rgba(255,255,255,.75),
    0 3px 12px rgba(51,45,37,.040),
    0 12px 26px rgba(51,45,37,.025);
}

/* Section elevation is deliberately consistent; no new fixed heights. */
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
:is(.hpacc-summary,.bpm-section-nav,#broker-overview,#broker-units,#broker-finance,
    #broker-calculator,#broker-location,#broker-developer,#broker-project-guide,
    #broker-project-contact,#broker-phases,.bpm-sidebar .bpm-side-panel,
    .bfp-discovery-units) {
  background:var(--bkg-quiet-surface)!important;
  border:1px solid var(--bkg-quiet-border)!important;
  border-radius:16px!important;
  box-shadow:var(--bkg-edge-shadow)!important;
}
/* An open overview/unit section used to be transparent, unlike its siblings. */
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
:is(#broker-overview,#broker-units) {
  padding:20px 22px!important;
  min-width:0;
}
/* Keep featured developer card's approved beige treatment but give it the
   same gentle rim depth on all three pages (no white floating card). */
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
.bpm-developer-feature {
  background:#F1EADF!important;
  border-radius:13px!important;
  box-shadow:inset -5px 0 0 rgba(169,140,105,.19),
             0 4px 15px rgba(51,45,37,.045)!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project
.hpacc-gallery {
  border-radius:14px!important;
  overflow:hidden!important;
  box-shadow:0 4px 14px rgba(51,45,37,.055)!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project
.hpacc-wrap {background:var(--bkg-quiet-page)!important}

/* Buttons: a quiet, consistently sized click target, never giant CTA pills. */
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
:is(.bfp-button,.br-developer-projects-button,.bkg-phase-link,
    .bkg-more,.bci-more,.bci-clear) {
  min-height:44px!important;
  height:auto!important;
  padding:9px 16px!important;
  font-size:14px!important;
  line-height:1.6!important;
  border-radius:9px!important;
  box-shadow:none!important;
  width:auto;
  max-width:100%;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
:is(.hpacc-shortcut,.bpm-section-nav a) {
  min-height:44px!important;
  padding:8px 11px!important;
  font-size:13px!important;
  line-height:1.6!important;
  border-radius:9px!important;
  box-shadow:none!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
:is(.bkg-phase-button,.bkg-other-types summary) {
  min-height:48px!important;
  padding-block:8px!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
#broker-project-contact .ff-btn-submit {
  min-height:44px!important;
  height:auto!important;
  padding:10px 18px!important;
  font-size:14px!important;
  border-radius:9px!important;
  box-shadow:none!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
:is(.bfp-button,.hpacc-shortcut,.br-developer-projects-button,.ff-btn-submit,
    .bpm-section-nav a):focus-visible {
  outline:2px solid var(--bkg-quiet-bronze)!important;
  outline-offset:3px!important;
}

/* Photo lightbox: fit image only. Hide the legacy zoom control, disable
   zoom cursor/transform, retain previous/next/close and native dialog. */
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-zoom {
  display:none!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-media,
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-media img {
  cursor:default!important;
  transform:none!important;
  scale:1!important;
  touch-action:pan-y!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-media img {
  object-fit:contain!important;
  max-width:100%!important;
  max-height:100%!important;
}
/*
 * Portrait/landscape regression: the old modal allowed the media to grow to
 * the image's natural height (e.g. 1696px inside a 563px stage). Set a
 * definite media-box height, preserving a full-width native dialog and
 * showing the entire image at its natural aspect ratio, without scrolling.
 */
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] {
  width:min(1200px,calc(100vw - 32px))!important;
  max-width:calc(100vw - 32px)!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-stage {
  min-height:0!important;
  overflow:hidden!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-media {
  position:relative!important;
  inset:auto!important;
  height:min(64dvh,720px)!important;
  max-height:min(64dvh,720px)!important;
  min-height:0!important;
  width:100%!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  overflow:hidden!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-media img {
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:100%!important;
}
@media(max-width:767px){
  html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  :is(#broker-overview,#broker-units){padding:16px!important}
  html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  :is(.hpacc-summary,#broker-overview,#broker-units,#broker-finance,
      #broker-calculator,#broker-location,#broker-developer,#broker-project-contact){
    border-radius:13px!important;
  }
}

/*
 * Broker 2.0 typography and spacing v0.1.15.
 * A single measured rhythm for the three approved visual pages. Never
 * equalize section height or override project facts/Fluent Forms values.
 * Open-only hero gallery is deliberately left under its original owner.
 */
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot] {
  --bkg-space-xs:8px;
  --bkg-space-sm:12px;
  --bkg-space-md:16px;
  --bkg-space-lg:24px;
  --bkg-space-section:32px;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  .hpacc-titlegroup #bpm-title {
  font-size:30px!important;
  line-height:1.5!important;
  font-weight:700!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  :is(.bpm-main>.bpm-section h2,#broker-project-guide h2) {
  font-size:24px!important;
  line-height:1.5!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  :is(.bpm-overview-intro p,.bpm-developer-body,.bpm-developer-body p) {
  font-size:15px!important;
  line-height:1.75!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  .bpm-developer-feature h3 {
  font-size:23px!important;
  line-height:1.55!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  .bpm-developer-feature {
  gap:18px!important;
  justify-content:space-between!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  .bpm-developer-feature .br-developer-projects-button {
  margin-top:0!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  .bpm-main>.bpm-section,
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  .bpm-main>.bpm-contact-wrap {
  margin-bottom:var(--bkg-space-section)!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  .bpm-section-nav {
  margin-bottom:var(--bkg-space-section)!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  :is(#broker-overview,#broker-units,#broker-finance,#broker-calculator) {
  padding:24px!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
  :is(.hpacc-all>span,.hpacc-model,.hpacc-mobile-count span) {
  font-size:12px!important;
  line-height:1.65!important;
}

@media(max-width:1023px){
  html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot] {
    --bkg-space-section:28px;
  }
}
@media(max-width:767px){
  html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot] {
    --bkg-space-section:24px;
  }
  html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    .hpacc-titlegroup #bpm-title {
    font-size:23px!important;
    line-height:1.5!important;
  }
  html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    :is(.bpm-main>.bpm-section h2,#broker-project-guide h2) {
    font-size:21px!important;
    line-height:1.55!important;
  }
  html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    :is(#broker-overview,#broker-units,#broker-finance,#broker-calculator) {
    padding:16px!important;
  }
  html:root body:is(.postid-2905,.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    .bpm-developer-feature {
    gap:18px!important;
    justify-content:flex-start!important;
  }
}

/* Type inventory: one full-width compact row per real unit type, not 2+1. */
@media(max-width:600px){
  html:root body:is(.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    .bkg-type-grid {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:9px!important;
  }
  html:root body:is(.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    .bkg-type-card {
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    column-gap:9px!important;
    row-gap:0!important;
    align-items:center!important;
    justify-items:stretch!important;
    width:100%!important;
    min-width:0!important;
    min-height:82px!important;
    height:auto!important;
    padding:11px 12px!important;
    text-align:right!important;
  }
  html:root body:is(.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    .bkg-type-card .bkg-icon {
    grid-column:1!important;
    grid-row:1 / span 2!important;
    width:32px!important;
    height:32px!important;
  }
  html:root body:is(.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    .bkg-type-card>strong {
    grid-column:2!important;
    grid-row:1!important;
    font-size:16px!important;
    line-height:1.45!important;
  }
  html:root body:is(.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    .bkg-type-card>small {
    grid-column:2!important;
    grid-row:2!important;
    font-size:12px!important;
    line-height:1.5!important;
  }
  html:root body:is(.postid-2922,.postid-3532) #bpm-project#bpm-project[data-broker-pilot]
    .bkg-type-card>.bkg-type-action {
    grid-column:3!important;
    grid-row:1 / span 2!important;
    justify-self:end!important;
    width:auto!important;
    min-height:44px!important;
    margin-top:0!important;
    padding:0!important;
    border-top:0!important;
    font-size:12px!important;
    white-space:nowrap!important;
  }
}

/*
 * Broker 2.0 owner corrections v0.1.16:
 * Remove visual-only contact labels, RTL price/m² order and ALL photo zoom.
 * Keep real <label for> nodes, form names and placeholders available to AT.
 */
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
#bpm-project#bpm-project[data-broker-pilot] #broker-project-contact
.bfp-lead-fields > .ff-el-group:not(.bfp-source-group) > .ff-el-input--label {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  border:0!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
#bpm-project#bpm-project[data-broker-pilot] #broker-project-contact
.bfp-lead-fields > .ff-el-group:not(.bfp-source-group) {
  position:relative!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
#bpm-project#bpm-project[data-broker-pilot] .bkg-sqm-line strong {
  display:inline-flex!important;
  flex-direction:row!important;
  direction:rtl!important;
  unicode-bidi:isolate!important;
  align-items:baseline!important;
  justify-content:flex-start!important;
  gap:5px!important;
  white-space:nowrap!important;
  font-variant-numeric:tabular-nums;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
#bpm-project#bpm-project[data-broker-pilot] .bkg-sqm-line strong bdi {
  direction:ltr!important;
  unicode-bidi:isolate!important;
  order:0!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
#bpm-project#bpm-project[data-broker-pilot] .bkg-sqm-line strong .bkg-sqm-unit {
  direction:rtl!important;
  unicode-bidi:isolate!important;
  order:1!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532).postid-3532
#bpm-project#bpm-project[data-broker-pilot] .bdf-palm-caption {
  display:none!important;
}
/* No scale transform/animation on the hero slides themselves — including
   hovered/focused second and third tiles before opening the dialog. */
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
#bpm-project .hpacc-gallery :is(.hpacc-tile,.hpacc-all) img,
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
#bpm-project .hpacc-gallery :is(.hpacc-tile,.hpacc-all):hover img,
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
#bpm-project .hpacc-gallery :is(.hpacc-tile,.hpacc-all):focus-visible img {
  transform:none!important;
  scale:1!important;
  animation:none!important;
  transition:none!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-media,
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-media img {
  transition:none!important;
  animation:none!important;
  transform:none!important;
  scale:1!important;
  touch-action:none!important;
}
html:root body:is(.postid-2905,.postid-2922,.postid-3532)
.hpacc-dialog[data-bkg-gallery-mode="open-only"] .hpacc-media img {
  pointer-events:none!important;
}
