/* HomeLynx V8.2.23 — Open Home media fit + structural-facts sweep.
   Competitor-inspired information architecture, not a visual clone:
   rear-mounted vertical cited-media rail, property-local map inline with media,
   deep-green finance tab, and a neutral modern HomeLynx detail layer.
   No changes to media rights/provenance, Worth math, map identity, or drawer law. */

.hlx-open-home-layered{
  --ohm-ink:#111311;
  --ohm-muted:#6f736f;
  --ohm-line:rgba(17,19,17,.10);
  --ohm-soft:#f4f5f4;
  --ohm-paper:#fff;
  --ohm-finance:#0b6f62;
  --ohm-finance-dark:#07584e;
  margin:0 -16px!important;
  padding:0 0 28px!important;
  color:var(--ohm-ink)!important;
  background:#fff!important;
}

/* Rear media plane: photos and the existing HomeLynx property map share one
   vertical scroll rail. Photos remain inert evidence; map remains local only. */
.hlx-ohm-rear-stream{
  position:relative;
  z-index:1;
  height:clamp(360px,54svh,620px);
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:y proximity;
  scrollbar-width:none;
  background:#fff;
  border-radius:0;
  touch-action:pan-y;
}
.hlx-ohm-rear-stream::-webkit-scrollbar{display:none}
.hlx-ohm-rear-photo,.hlx-ohm-rear-map,.hlx-ohm-rear-empty{margin:0;position:relative;scroll-snap-align:start}
/* V8.2.22 MEDIA FIT LAW: every observed photo owns its intrinsic aspect ratio.
   No fixed/min-height photo frame, no cover crop, and no synthetic letterbox
   slab between consecutive images. Legal safety comes from ending the media
   viewport before the finance stack begins — no UI overlays source pixels. */
.hlx-ohm-rear-photo{display:block;overflow:hidden;padding:0;box-sizing:border-box;background:#fff}
.hlx-ohm-rear-photo img{display:block;width:100%;height:auto;max-width:100%;min-height:0;object-fit:contain;object-position:center;background:#fff;filter:none;clip-path:none;mask:none;user-select:none;-webkit-user-drag:none;pointer-events:none}
.hlx-ohm-rear-photo figcaption{position:absolute;right:12px;top:12px;bottom:auto;padding:6px 9px;border-radius:999px;background:rgba(0,0,0,.48);backdrop-filter:blur(12px);color:#fff;font:700 10px/1 'IBM Plex Sans',sans-serif;letter-spacing:.02em}
.hlx-ohm-rear-empty{height:260px;display:grid;place-items:center;background:#ededeb;color:#838683;font:500 13px/1.2 'IBM Plex Sans',sans-serif}
.hlx-ohm-rear-stream.is-photo-empty{height:auto;max-height:none;overflow:visible;background:#ededeb}

.hlx-ohm-rear-map{min-height:250px;background:#e7e9e7;overflow:hidden}
.hlx-ohm-rear-map .hlx-ohm-property-map{height:260px!important;border:0!important;border-radius:0!important;background:#e7e9e7!important}
.hlx-ohm-rear-map>figcaption{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;background:#fff;color:#171917;border-top:1px solid rgba(17,19,17,.08)}
.hlx-ohm-rear-map>figcaption strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 12px/1.2 'IBM Plex Sans',sans-serif}
.hlx-ohm-rear-map>figcaption span{flex:0 0 auto;font:500 10px/1.2 'IBM Plex Sans',sans-serif;color:#737773}
.hlx-ohm-rear-map .hlx-ohm-map-loading,.hlx-ohm-rear-map .hlx-ohm-map-unavailable{background:#e7e9e7!important;color:#737773!important}

/* Front stack: saturated finance tab sits above the white slider/detail layer. */
.hlx-ohm-front-stack{position:relative;z-index:4;margin-top:0}
.hlx-ohm-finance-stack{
  position:relative;
  z-index:3;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin:0 4px -13px;
  min-height:78px;
  padding:13px 16px 22px;
  border-radius:24px 24px 10px 10px;
  background:linear-gradient(135deg,var(--ohm-finance),var(--ohm-finance-dark));
  color:#fff;
  box-shadow:0 16px 36px rgba(5,59,52,.22);
}
.hlx-ohm-finance-copy{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:baseline;column-gap:10px;row-gap:3px}
.hlx-ohm-finance-copy>span{font:700 9px/1 'IBM Plex Mono',monospace;letter-spacing:.15em;color:rgba(255,255,255,.72)}
.hlx-ohm-finance-copy>strong{font:700 23px/.95 'IBM Plex Sans',sans-serif;letter-spacing:-.045em;color:#fff;white-space:nowrap}
.hlx-ohm-finance-copy>small{grid-column:1/-1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 9.5px/1.25 'IBM Plex Sans',sans-serif;color:rgba(255,255,255,.72)}
.hlx-ohm-finance-stack>button{appearance:none;border:1px solid rgba(255,255,255,.28);border-radius:999px;padding:9px 12px;background:rgba(255,255,255,.12);color:#fff;font:750 11px/1 'IBM Plex Sans',sans-serif;backdrop-filter:blur(12px)}
.hlx-ohm-finance-stack>button:active{transform:scale(.98);background:rgba(255,255,255,.18)}

.hlx-ohm-detail-layer{
  position:relative;
  z-index:4;
  padding:13px 18px 30px;
  border-radius:28px 28px 0 0;
  background:#fff;
  box-shadow:0 -12px 38px rgba(17,19,17,.10);
}
.hlx-ohm-detail-grabber{height:18px;display:grid;place-items:start center;margin:-2px 0 2px}
.hlx-ohm-detail-grabber i{display:block;width:42px;height:4px;border-radius:99px;background:#c9ccc9}

/* Open Home header / buttons — neutral, high-contrast HomeLynx styling. */
.hlx-open-home-layered .hlx-v8-card-head{margin:0 0 14px!important;padding:0 2px 10px!important;background:#fff!important;box-shadow:none!important}
.hlx-open-home-layered .hlx-v8-card-head .hlx-v8-back{background:#f1f2f1!important;color:#111311!important;border:1px solid rgba(17,19,17,.08)!important;box-shadow:none!important}
.hlx-open-home-layered .hlx-v8-card-head .hlx-v8-eyebrow{color:#696e69!important}
.hlx-open-home-layered .hlx-v8-card-head h1{color:#111311!important;font-weight:650!important}
.hlx-open-home-layered .hlx-v8-card-head p{color:#747874!important}

/* Market/Worth pair: retire the old pale mint treatment. */
.hlx-open-home-layered .hlx-v8-value-pair{gap:9px!important;margin-bottom:12px!important}
.hlx-open-home-layered .hlx-v8-value-card{min-height:126px!important;border-radius:20px!important;box-shadow:none!important}
.hlx-open-home-layered .hlx-v8-value-card.is-ask{background:#131513!important;border-color:#131513!important;color:#fff!important}
.hlx-open-home-layered .hlx-v8-value-card.is-ask .hlx-v8-value-label,.hlx-open-home-layered .hlx-v8-value-card.is-ask>small{color:rgba(255,255,255,.67)!important}
.hlx-open-home-layered .hlx-v8-value-card.is-worth{background:#fff!important;background-image:none!important;border:1px solid rgba(17,19,17,.13)!important;color:#111311!important}
.hlx-open-home-layered .hlx-v8-value-card.is-worth::after{display:none!important}
.hlx-open-home-layered .hlx-v8-worth-lockup b{color:#111311!important}
.hlx-open-home-layered .hlx-v8-worth-mark{background:#0b6f62!important}
.hlx-open-home-layered .hlx-v8-worth-spread{color:#686d68!important}

.hlx-open-home-layered .hlx-v8-card-facts{border-color:rgba(17,19,17,.10)!important}
.hlx-open-home-layered .hlx-v8-card-facts span{border-color:rgba(17,19,17,.10)!important;color:#606560!important}
.hlx-open-home-layered .hlx-v8-card-facts b{color:#111311!important}
.hlx-open-home-layered .hlx-v8-card-dom{color:#4f544f!important}


/* V8.2.20: Year Built is a primary Open Home fact. It is hidden only while the
   authoritative County/listing lookup is unresolved, then hydrates in-place. */
.hlx-open-home-layered .hlx-v8-card-facts [data-hlx-primary-year][hidden]{display:none!important}
.hlx-open-home-layered .hlx-v8-card-facts [data-hlx-primary-year]{min-width:74px}

/* Quick read and facts are neutral glass/white, not mint blocks. */
.hlx-open-home-layered .hlx-v8-quick{background:#f4f5f4!important;background-image:none!important;border-color:rgba(17,19,17,.08)!important}
.hlx-open-home-layered .hlx-v8-quick-chip{background:#fff!important;border:1px solid rgba(17,19,17,.06)!important;box-shadow:none!important}
.hlx-open-home-layered .hlx-v8-quick-icon{background:#eceeec!important;color:#111311!important}
.hlx-open-home-layered .hlx-v8-quick-icon .hlx-v8-mini-icon{stroke:#111311!important}
.hlx-open-home-layered .hlx-v8-quick-copy strong{color:#111311!important}
.hlx-open-home-layered .hlx-v8-quick-copy small{color:#6c716c!important}

.hlx-open-home-layered .hlx-ohm-jump{background:rgba(255,255,255,.96)!important;border-color:rgba(17,19,17,.09)!important}
.hlx-open-home-layered .hlx-ohm-jump button{background:#fff!important;color:#555a55!important;border-color:rgba(17,19,17,.11)!important}
.hlx-open-home-layered .hlx-ohm-jump button.is-active{background:#111311!important;color:#fff!important;border-color:#111311!important}

.hlx-open-home-layered .hlx-ohm-fact,.hlx-open-home-layered .hlx-ohm-empty{background:#f4f5f4!important;border-color:rgba(17,19,17,.05)!important}
.hlx-open-home-layered .hlx-ohm-fact strong,.hlx-open-home-layered .hlx-ohm-section>header h2{color:#111311!important}
.hlx-open-home-layered .hlx-ohm-segmented{background:#eceeec!important}
.hlx-open-home-layered .hlx-ohm-calc,.hlx-open-home-layered .hlx-ohm-risk-grid>div{background:#fff!important;border-color:rgba(17,19,17,.11)!important}
.hlx-open-home-layered .hlx-ohm-calc input[type=range]{accent-color:#111311!important}

/* The legacy pale monthly block is intentionally retired in layered Open Home. */
.hlx-open-home-layered .hlx-ohm-monthly{display:none!important}

/* Dedicated Place card is retired; Place jumps to the inline map in the rear rail. */
.hlx-open-home-layered .hlx-ohm-map-card{background:#fff!important;border-color:rgba(17,19,17,.10)!important;box-shadow:none!important}

@media(max-width:640px){
  .hlx-open-home-layered{margin:0 -18px!important}
  .hlx-ohm-rear-stream{height:clamp(350px,52svh,520px)}
  .hlx-ohm-rear-photo{min-height:0;padding-bottom:0}
  .hlx-ohm-rear-map .hlx-ohm-property-map{height:230px!important}
  .hlx-ohm-front-stack{margin-top:0}
  .hlx-ohm-finance-stack{margin-inline:2px;min-height:72px;padding:12px 16px 20px;border-radius:22px 22px 9px 9px}
  .hlx-ohm-finance-copy>strong{font-size:21px}
  .hlx-ohm-detail-layer{padding:12px 18px 34px;border-radius:26px 26px 0 0}
  .hlx-open-home-layered .hlx-v8-card-head{position:relative!important;top:auto!important;z-index:auto!important}
}

@media(min-width:641px){
  .hlx-open-home-layered{margin-inline:-18px!important}
  .hlx-ohm-rear-stream{height:min(60vh,680px);border-radius:20px 20px 0 0}
  .hlx-ohm-rear-photo{min-height:0;padding-bottom:0}
  .hlx-ohm-finance-stack{margin-inline:18px}
  .hlx-ohm-detail-layer{padding-inline:24px}
}

/* Open Home actions use the modern neutral/emerald system, never the legacy pastel fill. */
.hlx-open-home-layered .hlx-v8-card-action.is-primary{background:#111311!important;color:#fff!important;border-color:#111311!important}
.hlx-open-home-layered .hlx-v8-card-action.is-secondary{background:#fff!important;color:#111311!important;border-color:#cfd2cf!important}

/* V8.2.23 — HOA is not an Open Home OS field. Five structural facts remain;
   parcel owns the final row so the grid never leaves a fake empty sixth slot. */
.hlx-open-home-layered .hlx-ohm-fact[data-hlx-ohm-fact="parcel"]{grid-column:1/-1}
