/* Match every ancestor, including wrappers introduced by the theme or blocks. */
html:has(:is(#mah-home,#mah-home-detail,#mah-talk)) {
    overflow-x: clip;
}
body:has(:is(#mah-home,#mah-home-detail,#mah-talk)) {
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}
body :is(div,main,article,section):has(:is(#mah-home,#mah-home-detail,#mah-talk)) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}
body:has(:is(#mah-home,#mah-home-detail,#mah-talk)) .site-content > .ast-container {
    display: block !important;
}
body #mah-home#mah-home#mah-home,
body #mah-home-detail#mah-home-detail,
body #mah-talk#mah-talk {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}
body #mah-home#mah-home#mah-home .m-hero {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

@media (max-width: 782px) {
    body #mah-home#mah-home#mah-home {
        --mah-nav-height: 68px;
    }
    body #mah-home#mah-home#mah-home .m-nav-inner {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        margin-inline: auto !important;
        gap: 12px !important;
    }
    body #mah-home#mah-home#mah-home .m-brand { min-width: 0; gap: 8px !important; }
    body #mah-home#mah-home#mah-home .m-wordmark { font-size: clamp(20px, 5.9vw, 29px) !important; }
    body #mah-home#mah-home#mah-home .m-symbol { width: 28px !important; flex-shrink: 0; }
    body #mah-home#mah-home#mah-home .m-menu {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
    }
    body #mah-home#mah-home#mah-home .m-nav nav {
        display: none !important;
        position: absolute !important;
        inset-inline: 0 !important;
        top: 68px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 20px 24px !important;
        max-height: calc(100svh - 114px);
        overflow-y: auto;
        flex-direction: column !important;
        background: #071e29 !important;
    }
    body #mah-home#mah-home#mah-home .m-nav.menu-open nav { display: flex !important; }
    body #mah-home#mah-home#mah-home .m-nav nav > a { display: flex !important; min-height: 44px; }
    body #mah-home#mah-home#mah-home .m-hero {
        height: calc(100svh - 68px) !important;
        min-height: 500px !important;
        max-height: none !important;
    }
    body.admin-bar #mah-home#mah-home#mah-home .m-hero {
        height: calc(100svh - 114px) !important;
    }
    body #mah-home#mah-home#mah-home .m-slide img {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    body #mah-home#mah-home#mah-home .m-hero-copy {
        left: 22px !important;
        right: 22px !important;
        bottom: 125px !important;
        width: auto !important;
        max-width: none !important;
    }
    body #mah-home#mah-home#mah-home .m-hero h1 {
        font-size: clamp(37px, 8.8vw, 68px) !important;
        line-height: 1.08 !important;
        letter-spacing: -.045em !important;
        overflow-wrap: normal;
    }
    body #mah-home#mah-home#mah-home .m-hero-actions { margin-top: 24px !important; }
    body #mah-home#mah-home#mah-home .m-hero-actions a { min-height: 44px; }
    body #mah-home#mah-home#mah-home .m-hero-bottom {
        left: 22px !important;
        right: 22px !important;
        bottom: max(20px, env(safe-area-inset-bottom)) !important;
        flex-wrap: wrap;
        gap: 12px;
    }
    body #mah-home#mah-home#mah-home .mah-wrap {
        width: calc(100% - 40px) !important;
        max-width: none !important;
        margin-inline: auto !important;
    }
    body #mah-home#mah-home#mah-home #mah-services .v8-service-slide {
        grid-template-columns: minmax(0,1fr) !important;
    }
    body #mah-home#mah-home#mah-home .v8-service-image {
        width: calc(100% + 40px) !important;
        max-width: none !important;
        margin-inline: -20px !important;
        height: 65svh !important;
        min-height: 300px;
        max-height: 560px;
    }
    body #mah-home#mah-home#mah-home #mah-featured-properties .pv-grid {
        display: grid !important;
        grid-template-columns: minmax(0,1fr) !important;
        gap: 32px !important;
        width: 100% !important;
        margin-inline: 0 !important;
    }
    body #mah-home#mah-home#mah-home #mah-featured-properties .pv-media { aspect-ratio: 4/5 !important; }
    body #mah-home#mah-home#mah-home #mah-featured-properties .pv-card { border-inline: 0 !important; }
    body #mah-home#mah-home#mah-home .mah-report-layout,
    body #mah-home#mah-home#mah-home .v7-questions {
        grid-template-columns: minmax(0,1fr) !important;
    }
    body #mah-home#mah-home#mah-home .mah-report-stage {
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
    }
    body #mah-home#mah-home#mah-home .m-slide-controls,
    body #mah-home#mah-home#mah-home .v7-place-controls,
    body #mah-home#mah-home#mah-home .v8-review-controls,
    body #mah-home#mah-home#mah-home .v7-qa-controls { display: flex !important; }

    body #mah-home-detail#mah-home-detail .mp-wrap,
    body #mah-talk#mah-talk .mt-wrap {
        width: calc(100% - 40px) !important;
        max-width: none !important;
        margin-inline: auto !important;
    }
    body #mah-home-detail#mah-home-detail .mp-gallery-frame {
        width: 100% !important;
        max-width: none !important;
        margin-inline: 0 !important;
        height: 70svh !important;
        min-height: 320px;
    }
    body #mah-home-detail#mah-home-detail .mp-slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    body #mah-home-detail#mah-home-detail .mp-heading,
    body #mah-home-detail#mah-home-detail .mp-story,
    body #mah-talk#mah-talk .mt-story { grid-template-columns: minmax(0,1fr) !important; }
    body #mah-home-detail#mah-home-detail .mp-heading h1 { font-size: clamp(37px, 10vw, 64px) !important; }
    body #mah-home-detail#mah-home-detail .mp-gallery-bar { flex-wrap: wrap !important; gap: 16px; }
    body #mah-talk#mah-talk input,
    body #mah-talk#mah-talk textarea,
    body #mah-talk#mah-talk select { max-width: 100% !important; font-size: 16px !important; }
    body #mah-cookie-settings {
        font-size: 9px !important;
        padding: 7px 10px !important;
        min-height: 36px !important;
        inset-inline-end: 10px !important;
        inset-block-end: max(8px,env(safe-area-inset-bottom)) !important;
    }
}

/* Astra also constrains the nested main inside the custom homepage. */
body #mah-home#mah-home#mah-home > main,
body #mah-home-detail#mah-home-detail > main,
body #mah-talk#mah-talk > main {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* The theme applies its content width to footer elements as well. */
body #mah-home#mah-home#mah-home > .mah-footer {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 54px 0 0 !important;
    background: #082331 !important;
    color: #fff !important;
    border-top: 1px solid #ffffff26 !important;
}
body #mah-home#mah-home#mah-home .mah-footer > .mah-wrap {
    box-sizing: border-box;
    width: calc(100% - 12vw) !important;
    max-width: none !important;
    margin-inline: auto !important;
    padding: 0 0 32px !important;
    display: grid !important;
    grid-template-columns: 1fr auto auto;
    align-items: center !important;
    gap: 32px !important;
}
body #mah-home#mah-home#mah-home .mah-footer .mah-brand {
    color: #fff !important;
    font: 400 clamp(30px,3vw,45px)/1.1 Georgia,'Times New Roman',serif !important;
    letter-spacing: -.045em !important;
}
body #mah-home#mah-home#mah-home .mah-footer .mah-brand-tag { font-size: 8px !important; letter-spacing: .22em !important; }
body #mah-home#mah-home#mah-home .mah-footer .m-footer-contact {
    font-size: 12px !important;
    padding-block: 12px !important;
    border-color: #ffffff55 !important;
}
body #mah-home#mah-home#mah-home .mah-footer .mah-socials { gap: 24px !important; }
body #mah-home#mah-home#mah-home .mah-footer .mah-socials a { font-size: 12px !important; }
body #mah-home#mah-home#mah-home .mah-footer .mah-socials svg { width: 16px !important; height: 16px !important; }
body .mah-footer .mah-footer-bottom {
    width: 88% !important;
    max-width: none !important;
    margin-inline: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0 20px !important;
    border-top: 1px solid #ffffff24;
    font: 10px/1.5 Arial,sans-serif;
    color: #b7c7cf;
}
body #mah-cookie-settings.mah-cookie-integrated {
    position: static !important;
    inset: auto !important;
    display: inline-flex;
    align-items: center;
    width: auto !important;
    min-height: 44px !important;
    padding: 10px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: inherit !important;
    font: 11px/1.5 Arial,sans-serif !important;
    letter-spacing: .02em !important;
    text-transform: none !important;
}
body #mah-cookie-settings.mah-cookie-integrated:hover { color: #fff !important; text-decoration: underline; }
body #mah-cookie-panel {
    border: 1px solid #ffffff30 !important;
    padding: 26px !important;
    box-shadow: 0 16px 60px #0004 !important;
}
body #mah-cookie-panel h2 { font: 400 26px/1.15 Georgia,serif !important; letter-spacing: -.025em !important; }
body #mah-cookie-panel p { font: 12px/1.7 Arial,sans-serif !important; color: #c4d1d7 !important; }
body #mah-cookie-panel button {
    font: 11px/1.5 Arial,sans-serif !important;
    letter-spacing: .02em !important;
    text-transform: none !important;
    border-radius: 0 !important;
}
body:has(#mah-home) #colophon { display: none !important; }
body #mah-home#mah-home#mah-home .mah-close {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    min-height: 520px !important;
}
body #mah-home#mah-home#mah-home .mah-arrow-removed { display: none !important; }
@media(max-width:782px) {
    body #mah-home#mah-home#mah-home .mah-footer > .mah-wrap {
        width: calc(100% - 44px) !important;
        grid-template-columns: minmax(0,1fr) !important;
        align-items: start !important;
        gap: 18px !important;
    }
    body #mah-home#mah-home#mah-home .mah-footer .m-footer-contact { justify-self: start; }
    body .mah-footer .mah-footer-bottom { width: calc(100% - 44px) !important; }
    body #mah-home#mah-home#mah-home .mah-close { min-height: 470px !important; padding-block: 65px !important; }
    body #mah-home#mah-home#mah-home .mah-close h2 { font-size: clamp(38px,10vw,62px) !important; line-height: 1.08 !important; }
}

/* Stack service panels in a shared grid cell to reserve the taller panel. */
body #mah-home#mah-home#mah-home #mah-services.mah-service-stable .v8-service-stage {
    display: grid !important;
    overflow-anchor: none;
}
body #mah-home#mah-home#mah-home #mah-services.mah-service-stable .v8-service-slide {
    display: grid !important;
    grid-area: 1 / 1 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    animation: none !important;
}
body #mah-home#mah-home#mah-home #mah-services.mah-service-stable:has(#mh14-service-0:checked) .v8-service-slide[data-mh14-index="0"],
body #mah-home#mah-home#mah-home #mah-services.mah-service-stable:has(#mh14-service-1:checked) .v8-service-slide[data-mh14-index="1"] {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* One pagination row per carousel, including the mobile layout. */
body #mah-home#mah-home#mah-home .v8-review-controls,
body #mah-home#mah-home#mah-home .v7-qa-controls {
    display: none !important;
}
body #mah-home#mah-home#mah-home :is(.m-slide-controls,.v7-place-controls) label {
    display: grid !important;
    place-items: center !important;
    width: 32px !important;
    height: 36px !important;
    min-width: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
body #mah-home#mah-home#mah-home :is(.m-slide-controls,.v7-place-controls) label::before,
body #mah-home#mah-home#mah-home :is(.m-slide-controls,.v7-place-controls) label::after {
    content: none !important;
    display: none !important;
}
body #mah-home#mah-home#mah-home :is(.m-slide-controls,.v7-place-controls) label span {
    display: block !important;
    width: 7px !important;
    height: 7px !important;
    border: 1px solid currentColor !important;
    border-radius: 50% !important;
}
body #mah-home#mah-home#mah-home #mah-reviews .v8-review-controls,
body #mah-home#mah-home#mah-home #mah-questions .v7-qa-controls {
    display: none !important;
}
body #mah-home#mah-home#mah-home .pv-video-controls,
body #mah-home#mah-home#mah-home .pv-play,
body #mah-home#mah-home#mah-home .pv-sound {
    display: none !important;
}
body #mah-home#mah-home#mah-home .pv-media.is-playing:not([data-mode="photos"]) .pv-video {
    opacity: 1 !important;
    pointer-events: none !important;
}
body #mah-home#mah-home#mah-home .pv-video::-webkit-media-controls,
body #mah-home#mah-home#mah-home .pv-video::-webkit-media-controls-start-playback-button {
    display: none !important;
}
body #mah-home#mah-home#mah-home .mah-video-only .pv-mode,
body #mah-home#mah-home#mah-home .mah-video-only .pv-gallery-controls,
body #mah-home#mah-home#mah-home .mah-video-only .mah-video-toggle {
    display: none !important;
}

/* Use the existing top tab bars for these two reading sections. */
body #mah-home#mah-home#mah-home #mah-services > .mah-reading-dots,
body #mah-home#mah-home#mah-home #mah-search-process > .mah-reading-dots {
    display: none !important;
}

/* Cinematic property templates use a separate root from the older detail pages. */
html:has(#mah-property) { overflow-x: clip; }
body:has(#mah-property) { margin-inline: 0 !important; padding-inline: 0 !important; }
body :is(div,main,article,section):has(#mah-property) {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}
body #mah-property#mah-property,
body #mah-property#mah-property > main,
body #mah-property#mah-property > header,
body #mah-property#mah-property > footer,
body #mah-property#mah-property .mp-hero {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}
body:has(#mah-property) .site-content > .ast-container { display: block !important; }
body #mah-property#mah-property .mp-wrap {
    width: calc(100% - 12vw) !important;
    max-width: none !important;
    margin-inline: auto !important;
}
@media(max-width:782px) {
    body #mah-property#mah-property .mp-wrap { width: calc(100% - 40px) !important; }
    body #mah-property#mah-property .mp-hero h1 { font-size: clamp(38px,10vw,68px) !important; }
}
body #mah-property#mah-property .mah-arrow-removed,
body #mah-property#mah-property .mp-arrow {
    display: none !important;
}

/* Give destination links a visible button boundary after removing arrow glyphs. */
body #mah-home#mah-home#mah-home :is(
    .m-hero-actions a, .v8-service-copy > a, .mah-report-copy > a,
    .v7-place-copy > a, .mah-close .mah-btn, .pv-enquire
),
body #mah-property#mah-property :is(.mp-btn, .mp-hero-actions > a),
body #mah-home-detail#mah-home-detail .mp-btn,
body #mah-talk#mah-talk :is(.mt-btn, .mt-story a[href^="mailto:"]) {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    max-width: 100% !important;
    min-height: 46px !important;
    padding: 13px 21px !important;
    border: 1px solid currentColor !important;
    border-radius: 0 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    letter-spacing: .09em !important;
    line-height: 1.5 !important;
    transition: background-color .2s ease, box-shadow .2s ease !important;
}
body #mah-home#mah-home#mah-home :is(.v8-service-copy > a, .mah-report-copy > a, .pv-enquire) {
    background: #f0f4f5 !important;
    color: #082331 !important;
}
body #mah-home#mah-home#mah-home :is(.m-hero-actions a, .v7-place-copy > a, .mah-close .mah-btn) {
    background: #08233152 !important;
    color: #fff !important;
    border-color: #ffffffb0 !important;
}
body #mah-home#mah-home#mah-home :is(.v8-service-copy > a, .mah-report-copy > a, .pv-enquire):hover {
    background: #dae5e9 !important;
}
body #mah-home#mah-home#mah-home :is(.m-hero-actions a, .v7-place-copy > a, .mah-close .mah-btn):hover {
    background: #082331ad !important;
}
body #mah-home#mah-home#mah-home :is(.m-hero-actions a, .v8-service-copy > a, .mah-report-copy > a, .v7-place-copy > a, .mah-close .mah-btn, .pv-enquire):focus-visible,
body #mah-property#mah-property .mp-btn:focus-visible {
    outline: 2px solid #7193a3 !important;
    outline-offset: 4px !important;
}
body #mah-home#mah-home#mah-home .mah-close-photo img { object-position: center 62% !important; }
body #mah-home#mah-home#mah-home .v8-service-slide[data-mh14-index="1"] .v8-service-image img { object-position: center 65% !important; }

/* Let the service names wrap cleanly on narrow screens. */
@media(max-width:600px) {
    body #mah-home#mah-home#mah-home .v8-service-tabs {
        display: grid !important;
        grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
        gap: 16px !important;
    }
    body #mah-home#mah-home#mah-home .v8-service-tabs label {
        white-space: normal !important;
        min-width: 0;
        line-height: 1.6;
    }
}
