:root { --interior-gap: clamp(1.25rem, 3vw, 2.5rem); }
.mortgage-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr)); align-items: start; gap: var(--interior-gap); padding-bottom: var(--section); }
.mortgage-layout h2 { margin-bottom: .9rem; }
.mortgage-payment { display: flex; flex-wrap: wrap; gap: .35rem .65rem; align-items: baseline; margin-block: 1rem; }
.mortgage-payment strong { font-size: clamp(1.45rem, 4vw, 2.25rem); color: var(--forest); }
.mortgage-summary { margin: 0 0 1rem; }
.mortgage-summary div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .7rem; border-top: 1px solid var(--line); padding: .65rem 0; }
.mortgage-summary dd { margin: 0; font-weight: 650; }
.rental-calendar table { width: 100%; max-width: 36rem; border-collapse: separate; border-spacing: .18rem; table-layout: fixed; text-align: center; }
.rental-calendar caption { color: var(--forest); font-weight: 700; padding-block: .7rem; }
.rental-day { display: grid; place-items: center; min-height: 2.25rem; border: 1px solid var(--line); border-radius: .25rem; }
.rental-calendar .available { background: var(--forest); color: var(--white); }
.rental-calendar .blocked { background: var(--sand); color: var(--ink); text-decoration: line-through; }
.rental-calendar .unconfirmed { color: var(--muted); }
.rental-calendar-key, .rental-months { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: .5rem 0 .8rem; list-style: none; }
.rental-calendar-key li { padding: .2rem .5rem; border: 1px solid var(--line); border-radius: .25rem; }
.floorplan { margin-top: .75rem; }
.floorplan summary { cursor: pointer; min-height: var(--bp-touch); align-content: center; font-weight: 650; }
.floorplan [type="range"] { max-width: 18rem; }
.floorplan-viewport { max-height: 65vh; overflow: auto; border: 1px solid var(--line); background: var(--white); margin-top: .5rem; }
.floorplan-viewport img { display: block; width: var(--plan-zoom, 100%); max-width: none; height: auto; }

.interior-intro { padding-block: 1.15rem clamp(1.75rem, 5vw, 3.75rem); }
.interior-intro h1 { font-size: clamp(2.85rem, 2rem + 4vw, 6.65rem); margin: .3rem 0 .65rem; }
.intro-copy { max-width: 52rem; font-size: clamp(1rem, .95rem + .25vw, 1.2rem); color: var(--muted); }
.breadcrumbs { margin-bottom: clamp(1.3rem, 4vw, 2.65rem); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .6rem; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .875rem; }
.breadcrumbs li { display: flex; gap: .6rem; min-width: 0; }
.breadcrumbs li + li::before { content: '/' / ''; color: var(--bp-muted-text); }
.breadcrumbs a[aria-current] { font-weight: 700; text-decoration: none; }

.catalog-filters {
    display: block;
    container-type: inline-size;
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid var(--line);
    border-radius: .3rem;
    background: var(--white);
}
.catalog-filter-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .55rem 1.5rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.catalog-filter-head h2 { font-size: clamp(1.95rem, 1.45rem + 1.25vw, 3rem); }
.catalog-tabs { display: flex; flex-wrap: wrap; gap: .15rem .3rem; }
.catalog-tabs a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: .7rem; font-weight: 650; text-decoration: none; border-bottom: 2px solid transparent; }
.catalog-tabs a[aria-current], .catalog-tabs a:hover { border-color: var(--forest); color: var(--forest); }
.catalog-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; align-items: end; padding-block: 1rem .65rem; }
.catalog-controls .field > span { font-size: .875rem; font-weight: 650; }
.catalog-controls button { justify-self: start; }
.catalog-budget { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.catalog-budget h3 { margin: 0 0 .55rem; font-size: 1rem; font-family: inherit; font-weight: 650; }
.catalog-budget ul { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.catalog-budget a[aria-current] { color: var(--white); background: var(--forest); border-color: var(--forest); }
.catalog-map { margin-block: 1rem; padding: .75rem 1rem; border: 1px solid var(--line); background: var(--white); }
.catalog-map summary { cursor: pointer; font-weight: 700; min-height: var(--bp-touch); align-content: center; }
.catalog-map-canvas { height: clamp(16rem, 52vw, 28rem); margin-top: .6rem; isolation: isolate; }
.catalog-map-marker { border-radius: 50%; background: var(--forest); border: 3px solid var(--white); box-shadow: 0 1px 5px #0007; }
.catalog-map-links { padding-inline-start: 1.4rem; }
.catalog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.catalog-results-v2 { padding-block: clamp(1.8rem, 5vw, 4.5rem) var(--section); }
.interior-intro + .catalog-results-v2 { padding-top: 0; }
.catalog-results-v2 .section-heading { padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.pagination-v2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1rem; padding-top: 1.65rem; color: var(--muted); }
.property-card { position: relative; min-width: 0; }
.favorite {
    position: absolute;
    inset: .65rem .65rem auto auto;
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--forest);
    background: var(--white);
    font-size: 1.6rem;
    line-height: 1;
}
.favorites-limit { margin-bottom: .8rem; color: var(--forest); }
.favorite[aria-pressed="true"], .favorite:hover { color: var(--white); background: var(--forest); border-color: var(--forest); }

.detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.2rem; }
.detail-quick { display: grid; justify-items: end; gap: .55rem; flex: none; }
.detail-price { color: var(--forest); font: 600 clamp(1.55rem, 1.35rem + 1vw, 2.55rem)/1.16 var(--serif); }
.detail-note { padding: .7rem 0; color: var(--muted); }
.detail-intro { padding-bottom: 1.6rem; }
.detail-gallery { max-inline-size: 69rem; margin-inline: auto; }
.gallery-stage { position: relative; }
.gallery-track {
    display: flex;
    position: relative;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    border-radius: .35rem;
    background: var(--forest-deep);
}
.gallery-track[data-enhanced] { scrollbar-width: none; }
.gallery-slide {
    flex: 0 0 100%;
    min-width: 0;
    height: clamp(17rem, 54vw, 36rem);
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.gallery-slide a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gallery-slide a:focus-visible { outline-offset: -4px; }
.gallery-slide picture { display: block; width: 100%; height: 100%; }
.gallery-slide img { width: 100%; height: 100%; object-fit: contain; }
.gallery-slide > picture { background: var(--surface); }
.gallery-arrows {
    position: absolute;
    z-index: 1;
    inset: 50% clamp(.55rem, 2vw, 1.2rem) auto;
    translate: 0 -50%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}
.gallery-arrow, .gallery-expand, .gallery-count {
    display: grid;
    place-items: center;
    color: var(--forest-deep);
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 2px 8px rgb(0 0 0 / .22);
}
.gallery-arrow {
    inline-size: var(--bp-touch);
    block-size: var(--bp-touch);
    border-radius: 50%;
    font: 1.8rem/1 var(--sans);
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
}
.gallery-arrow:active { background: var(--sand); }
.gallery-arrow:focus-visible, .gallery-slide a:focus-visible { outline: 2px solid var(--paper); box-shadow: inset 0 0 0 2px var(--forest-deep); }
.gallery-expand, .gallery-count {
    position: absolute;
    inset-inline-end: clamp(.55rem, 2vw, 1.2rem);
    border-radius: .3rem;
    font-size: .875rem;
}
.gallery-expand { inset-block-start: .7rem; inline-size: 2.4rem; block-size: 2.4rem; }
.gallery-count { inset-block-end: .7rem; padding: .35rem .65rem; font-variant-numeric: tabular-nums; pointer-events: none; }
.gallery-picker { display: flex; justify-content: safe center; overflow-x: auto; margin-top: .3rem; }
.gallery-markers { display: flex; align-items: center; }
.gallery-markers button {
    flex: none;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    touch-action: manipulation;
}
.gallery-markers button:focus-visible { outline-offset: -3px; }
.gallery-markers span { width: .55rem; height: .45rem; border: 1px solid var(--forest); border-radius: 100px; }
.gallery-markers [aria-current] span { scale: 1.7 1; background: var(--forest); }
@media (hover: hover) {
    .gallery-arrow:hover { background: var(--sand); }
}
@media (prefers-reduced-motion: no-preference) {
    .gallery-track[data-enhanced] { scroll-behavior: smooth; }
    .gallery-markers span {
        transition: scale var(--bp-motion-quick) var(--bp-motion-ease),
            background-color var(--bp-motion-quick) ease;
    }
    .advanced-filters[open] .catalog-controls {
        animation: bp-disclosure-arrival var(--bp-motion-panel) var(--bp-motion-ease);
    }
}
@media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view(inline)) and (animation-range: entry)) {
        .gallery-slide { view-timeline: --bp-slide-entry inline; }
        .gallery-slide picture {
            animation: bp-gallery-photo-arrival auto linear both;
            animation-timeline: --bp-slide-entry;
            animation-range: cover;
        }
    }
}
@keyframes bp-gallery-photo-arrival {
    from, to { scale: .97; }
    50% { scale: 1; }
}

.gallery-dialog { max-width: min(76rem, calc(100% - 1.5rem)); width: fit-content; padding: 0; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: .3rem; }
.gallery-dialog::backdrop { background: #0c221fdc; }
/* Keep native dialog dismissal and focus restoration independent from the animation. */
@media (prefers-reduced-motion: no-preference) {
    @supports (overlay: auto) and (transition-behavior: allow-discrete) {
        .gallery-dialog {
            opacity: 0;
            scale: .98;
            transition: opacity, scale, display, overlay;
            transition-duration: var(--bp-motion-panel);
            transition-timing-function: var(--bp-motion-ease);
            transition-behavior: allow-discrete;
        }
        .gallery-dialog[open] { opacity: 1; scale: 1; }
        .gallery-dialog:not([open]),
        .gallery-dialog:not([open])::backdrop { pointer-events: none; }
        .gallery-dialog::backdrop {
            background-color: transparent;
            transition: background-color, display, overlay;
            transition-duration: var(--bp-motion-panel);
            transition-behavior: allow-discrete;
        }
        .gallery-dialog[open]::backdrop { background-color: #0c221fdc; }
        @starting-style {
            .gallery-dialog[open] { opacity: 0; scale: .98; }
            .gallery-dialog[open]::backdrop { background-color: transparent; }
        }
    }
    @supports not ((overlay: auto) and (transition-behavior: allow-discrete)) {
        .gallery-dialog[open] { animation: bp-gallery-arrival var(--bp-motion-panel) var(--bp-motion-ease); }
    }
}
@keyframes bp-gallery-arrival {
    from { opacity: 0; scale: .98; }
}
.gallery-dialog-inner { display: grid; gap: .65rem; padding: .7rem; }
.gallery-dialog form { justify-self: end; }
.gallery-dialog img { touch-action: pan-y pinch-zoom; width: auto; height: auto; max-height: 71dvh; max-width: 100%; margin-inline: auto; }
.gallery-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .4rem .75rem; }

.detail-layout, .story-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 27rem); align-items: start; gap: var(--interior-gap); padding-block: clamp(1.8rem, 5vw, 4.3rem) var(--section); }
.detail-content > * + * { margin-top: 1.9rem; }
.detail-section, .property-amenities { padding-block: 1.15rem 0; border-top: 1px solid var(--line); }
.detail-section h2, .property-amenities h2 { font-size: clamp(2rem, 1.65rem + 1.1vw, 3.2rem); margin: .32rem 0 .65rem; }
.detail-section p + p { margin-top: .75rem; }
.detail-contact {
    padding: clamp(1.25rem, 2.1vw, 1.75rem) clamp(1.15rem, 1.9vw, 1.6rem);
    border-top: 2px solid var(--bp-gold);
    box-shadow: 0 .2rem .9rem #183b3210;
}
.detail-contact .eyebrow { color: var(--bp-ocean); margin-bottom: .85rem; }
.detail-contact h2 { max-width: 18rem; font-size: 1.9rem; line-height: 1.22; }
.detail-contact-copy { margin-top: .75rem; color: var(--muted); font-size: .82rem; }
.detail-contact-reference {
    display: flex;
    justify-content: space-between;
    gap: .6rem;
    margin: 1.3rem 0;
    padding-block: .85rem;
    border-block: 1px solid var(--line);
    font-size: .82rem;
}
.detail-contact-links { display: grid; gap: .55rem; margin-bottom: .65rem; }
.detail-contact-links .button { width: 100%; min-height: 2.85rem; padding-inline: .6rem; font-size: .84rem; text-align: center; }
.detail-contact-channel { justify-self: center; display: inline-flex; align-items: center; gap: .55rem; min-height: 2.25rem; font-size: .82rem; }
.detail-contact-divider { border-top: 1px solid var(--line); margin: 1.15rem 0 .85rem; padding-top: 1.15rem; font-size: .84rem; }
.listing-contact-form { display: grid; gap: .85rem; scroll-margin-top: 1rem; }
.listing-contact-intro h3 { max-width: 16rem; color: var(--forest); font-size: 1.55rem; line-height: 1.2; margin: 0 0 .7rem; }
.listing-contact-intro p { color: var(--muted); font-size: .84rem; }
.listing-contact-form-ref { margin-top: .65rem; }
.listing-contact-form .contact-fields { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
.listing-contact-form .field { gap: .35rem; }
.listing-contact-form .field label { font-size: .82rem; font-weight: 550; }
.listing-contact-form :is(.field input, .field select, .field textarea) {
    min-height: 2.65rem;
    border-color: var(--line);
    border-radius: .25rem;
    background: var(--white);
    font-size: 1rem;
}
.listing-contact-form .field textarea { min-height: 4.25rem; resize: vertical; }
.listing-contact-form .contact-privacy { margin: 0; font-size: .82rem; }
.listing-contact-form .contact-ack { padding-block: .15rem .55rem; }
.detail-contact .listing-contact-form .button { width: 100%; margin-top: 0; }
.listing-contact-form .form-feedback:empty { display: none; }
.property-amenities-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); padding: 0; margin: 0; list-style: none; gap: .5rem; }
.property-amenities-list > li { display: flex; align-items: start; gap: .65rem; background: var(--surface); padding: .72rem; overflow-wrap: anywhere; }
.property-amenities-list > li > span { padding-top: .22rem; color: var(--forest); }
.property-amenities-list ul { margin: 0; padding: 0; list-style: none; color: var(--muted); }
.property-map { margin-block: .75rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--bp-radius); background: var(--surface); }
.property-map iframe { display: block; width: 100%; height: clamp(15rem, 35vw, 23rem); border: 0; }

.story-layout { display: block; }
.guide-layout { display: grid; grid-template-columns: minmax(12rem, 19rem) minmax(0, 1fr); }
.story-content { max-width: 52rem; }
.story-content section { border-top: 1px solid var(--line); padding-block: 1.15rem 1.3rem; scroll-margin-top: 1rem; }
.story-content h2, .guide-outline h2 { font-size: clamp(2rem, 1.65rem + 1.1vw, 3.2rem); margin-bottom: .7rem; }
.story-content section p + p { margin-top: .65rem; }
.guide-outline { position: sticky; top: 1rem; padding: 1.25rem; background: var(--white); border: 1px solid var(--line); }
.guide-outline ol { margin-block: 0; padding-inline-start: 1.35rem; }
.guide-outline a { display: inline-block; padding-block: .3rem; }
.guide-directory { padding-bottom: var(--section); }
.guide-directory h2 { font-size: clamp(1.9rem, 1.35rem + 1.3vw, 2.75rem); }
.faq-v2 details { border-bottom: 1px solid var(--line); padding: .65rem 0; }
.faq-v2 summary { cursor: pointer; font-weight: 650; padding-block: .25rem; }
.faq-v2 details p { margin-top: .45rem; }
.about-story { color: var(--white); background: var(--forest-deep); text-align: center; }
.about-story img { width: min(14rem, 100%); height: auto; margin-inline: auto; padding: .4rem; background: var(--paper); border-radius: .2rem; }
.about-story blockquote { max-width: 43rem; margin: 1rem auto 0; font: italic 500 clamp(1.8rem, 1.15rem + 2vw, 3.35rem)/1.12 var(--serif); }
.contact-office address { font-style: normal; }
.contact-office address + p { margin-top: .8rem; }
.privacy-content { padding-top: 0; }
.privacy-actions { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; margin-top: .75rem; }
.privacy-actions p { flex-basis: 100%; }
.error-page > * + * { margin-top: .8rem; }

@container (width < 41rem) {
    .catalog-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (width < 26rem) {
    .catalog-controls { grid-template-columns: minmax(0, 1fr); }
    .catalog-controls button { justify-self: stretch; }
}
@media (max-width: 55rem) {
    .detail-heading { flex-direction: column; align-items: start; }
    .detail-quick { justify-items: start; }
    .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 42rem) {
    .gallery-slide { height: clamp(13rem, 72vw, 25rem); }
    .guide-layout { grid-template-columns: 1fr; }
    .guide-outline { position: static; }
}

.detail-facts { display: flex; flex-wrap: wrap; gap: .65rem; }
.detail-facts div { min-width: 7rem; padding: .6rem 1rem; background: var(--surface); border: 1px solid var(--line); }
.detail-facts dt { color: var(--muted); font-size: .875rem; }
.detail-facts dd { font-weight: 700; font-size: 1.15rem; }

.advanced-filters { border-top: 1px solid var(--line); margin-top: .65rem; }
.advanced-filters summary { min-height: var(--bp-touch); align-content: center; cursor: pointer; font-weight: 650; }
.catalog-submit { margin: .6rem 0; }
.active-filters { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0 0 .9rem; }
.active-filters a { display: inline-flex; align-items: center; gap: .65rem; min-height: 2.75rem; padding: .2rem .6rem; background: var(--surface); border: 1px solid var(--line); color: var(--forest); }
.catalog-suggestion { margin-bottom: .8rem; }
.detail-quick .catalog-actions { justify-content: end; }
.detail-favorite[aria-pressed="true"] { background: var(--forest); color: var(--bp-white-on-dark); }
.detail-favorite .favorite-symbol { font-size: 1.25em; line-height: 1; }
.mobile-listing-contact { display: none; }
@media (max-width: 55rem) {
    .detail-quick .catalog-actions { justify-content: start; }
}
@media (max-width: 42rem) {
    html:has(body[data-listing-id]) { scroll-padding-block-end: calc(4.5rem + env(safe-area-inset-bottom)); }
    body[data-listing-id] { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
    .mobile-listing-contact {
        position: fixed;
        inset: auto 0 0;
        z-index: var(--bp-layer-disclosure);
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        gap: .45rem;
        background: var(--paper);
        border-top: 1px solid var(--line);
        padding: .55rem max(.75rem, env(safe-area-inset-right)) calc(.55rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
    }
    .mobile-listing-contact .button { padding-inline: .4rem; }
    .measurement-panel { inset-block-end: calc(4.5rem + env(safe-area-inset-bottom)); }
}

@media (width > 58rem) and (prefers-reduced-motion: no-preference) {
    .interior-intro :is(h1, .intro-copy, .detail-quick) {
        animation: bp-content-arrival 360ms var(--bp-motion-ease) backwards;
    }
    .interior-intro :is(.intro-copy, .detail-quick) { animation-delay: 55ms; }
}
