body.section-theme-habitat {
    --habitat-ink: #24352d;
    --habitat-green: #2f6b50;
    --habitat-sage: #9eb8a4;
    --habitat-sand: #e9ddc7;
    --habitat-paper: #fbfaf6;
    color: var(--habitat-ink);
    background: linear-gradient(180deg, #f1eee6 0, #fbfaf6 36rem, #eef2ed 100%);
}
.section-theme-habitat .horizon-header { background: linear-gradient(110deg, #17352a, #254c3c 62%, #496657); }
.section-theme-habitat .horizon-brand__mark { color:#fff; background:#c08b52; box-shadow:none; }
.section-theme-habitat .horizon-nav a.is-active::after { background:#e9c99f; }
.section-theme-habitat .horizon-footer { background:#17352a; }

.habitat-identity {
    min-height: 410px;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(260px,.55fr);
    align-items: center;
    gap: 50px;
    padding: clamp(36px,6vw,78px);
    border: 1px solid #d7d0c2;
    background:
        linear-gradient(110deg, rgba(251,250,246,.98), rgba(251,250,246,.76)),
        linear-gradient(45deg, #dfe8df, #f3eadc);
    box-shadow: 0 32px 90px rgba(49,68,54,.14);
}
.habitat-identity .section-identity__eyebrow { color:var(--habitat-green); }
.habitat-identity h1 { margin:0; color:#20382c; font-family: Georgia, serif; font-size:clamp(48px,7vw,86px); font-weight:500; line-height:.94; letter-spacing:-.055em; }
.habitat-identity p { max-width:630px; margin:22px 0 0; color:#56655d; font-size:19px; }
.habitat-identity__window { aspect-ratio:1/1; display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:18px; border:14px solid #315d48; background:#315d48; box-shadow:18px 22px 0 #d9c5a5; }
.habitat-identity__window span { background:linear-gradient(155deg,#b8d6df,#edf6f5 55%,#9eb8a4 56%,#6d8e75); }
.section-theme-habitat .section-menu { border-color:#d5d6cb; background:rgba(251,250,246,.92); }
.section-theme-habitat .section-menu a.active { color:#fff; background:var(--habitat-green); }
.section-theme-habitat .listing-filter,
.section-theme-habitat .form-card,
.section-theme-habitat .contact-card { border:1px solid #d8d6cc; background:rgba(251,250,246,.95); box-shadow:0 18px 50px rgba(42,67,52,.08); }
.section-theme-habitat button,
.section-theme-habitat .button { background:var(--habitat-green); }
.section-theme-habitat .button-secondary { color:#fbfdfc; background:#6b756f; }
.section-theme-habitat .filters a { border-color:#d4d1c7; color:#375344; background:#fbfaf6; }
.section-theme-habitat .filters a.active,
.section-theme-habitat .filters a:hover { border-color:var(--habitat-green); color:#fff; background:var(--habitat-green); }
.section-theme-habitat .grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
.section-theme-habitat .listing-card { overflow:hidden; margin:0; padding:0 22px 22px; border:1px solid #dad7ce; border-radius:4px 4px 22px 22px; background:#fff; box-shadow:0 22px 54px rgba(54,73,61,.1); transition:transform 180ms ease,box-shadow 180ms ease; }
.section-theme-habitat .listing-card:hover { transform:translateY(-5px); box-shadow:0 30px 68px rgba(54,73,61,.16); }
.section-theme-habitat .listing-card > a:first-child { display:block; margin:0 -22px 18px; }
.section-theme-habitat .listing-card__image { width:100%; height:245px; object-fit:cover; }
.section-theme-habitat .listing-card h2 { font-family:Georgia,serif; font-size:25px; font-weight:600; line-height:1.08; }
.section-theme-habitat .listing-card h2 a { color:#20382c; }
.section-theme-habitat .listing-card p:last-child strong { color:#9a5f2f; font-size:24px; }
.section-theme-habitat .promoted-card { border-color:#c08b52; box-shadow:0 0 0 2px rgba(192,139,82,.12),0 28px 64px rgba(54,73,61,.14); }
.section-theme-habitat .listing-page { border:0; border-radius:28px; background:#fff; box-shadow:0 28px 76px rgba(54,73,61,.13); }
.section-theme-habitat .listing-page h1 { color:#20382c; font-family:Georgia,serif; font-weight:500; }
.section-theme-habitat .listing-gallery { display:grid; grid-template-columns:2fr 1fr; gap:12px; }
.section-theme-habitat .listing-gallery img { width:100%; height:250px; object-fit:cover; border-radius:14px; }
.section-theme-habitat .listing-gallery img:first-child { grid-row:span 2; height:512px; }
.section-theme-habitat dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.section-theme-habitat dt,.section-theme-habitat dd { margin:0; padding:13px 15px; background:#f3f5f1; }
.section-theme-habitat dt { color:#69776f; font-size:12px; text-transform:uppercase; }
.section-theme-habitat dd { color:#20382c; font-weight:800; }
@media(max-width:1000px){.section-theme-habitat .grid{grid-template-columns:repeat(2,1fr)}.habitat-identity{grid-template-columns:1fr}.habitat-identity__window{display:none}}
@media(max-width:650px){.section-theme-habitat .grid{grid-template-columns:1fr}.habitat-identity{min-height:0;padding:38px 24px;border-radius:20px}.habitat-identity h1{font-size:44px}.section-theme-habitat .listing-gallery{grid-template-columns:1fr}.section-theme-habitat .listing-gallery img,.section-theme-habitat .listing-gallery img:first-child{height:260px;grid-row:auto}.section-theme-habitat dl{grid-template-columns:1fr 1fr}}

/* Compact section identity keeps property navigation close to the header. */
.section-theme-habitat .section-identity--compact {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin-block-end: 20px;
    padding: 20px 28px;
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(49, 68, 54, .1);
}

.section-theme-habitat .section-identity--compact h1 {
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1;
    letter-spacing: -.035em;
}

.section-theme-habitat .section-identity--compact p {
    max-width: 760px;
    margin-block-start: 6px;
    font-size: clamp(14px, 1.6vw, 17px);
}

.section-theme-habitat .section-identity--compact .habitat-identity__window {
    width: 74px;
    aspect-ratio: 1;
    gap: 4px;
    padding: 6px;
    border-width: 6px;
    box-shadow: 7px 8px 0 #d9c5a5;
}

@media (max-width: 650px) {
    .section-theme-habitat .section-identity--compact {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-block-end: 16px;
        padding: 17px 18px;
        border-radius: 15px;
    }

    .section-theme-habitat .section-identity--compact h1 {
        font-size: 32px;
    }

    .section-theme-habitat .section-identity--compact .habitat-identity__window {
        display: none;
    }
}

.section-theme-habitat .grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
    gap: clamp(16px, 1.7vw, 28px);
}

/* Form field names use the darkest habitat ink on light panels. */
.section-theme-habitat label,
.section-theme-habitat legend,
.section-theme-habitat .form-label {
    color: #20382c;
}

/* Permanent property directory uses the same static card geometry as Cars. */
.section-theme-habitat .section-directory-panel {
    border-color: #d3d6cc;
    color: #294638;
    background: rgba(251, 250, 246, .96);
    box-shadow: 0 20px 54px rgba(42, 67, 52, .09);
}

.section-theme-habitat .section-directory-panel .master-category-directory__section {
    border-color: #d7d6cc;
    color: #294638;
    background: linear-gradient(145deg, #ffffff, #f5f2e9);
    box-shadow: 0 16px 38px rgba(42, 67, 52, .1);
}

.section-theme-habitat .section-directory-panel .master-category-directory__section::before {
    background: var(--habitat-green);
}

.section-theme-habitat .section-directory-panel .master-category-directory__section:nth-child(2)::before {
    background: #c08b52;
}

.section-theme-habitat .section-directory-panel .master-category-directory__section:nth-child(3)::before {
    background: var(--habitat-sage);
}

.section-theme-habitat .section-directory-panel .master-category-directory__section h2,
.section-theme-habitat .section-directory-panel .master-category-directory__section h2 a {
    color: #20382c;
}

/* Second-level property tabs reuse the shared Ads tab component. */
.section-theme-habitat .board-section-tabs {
    --board-tabs-border: #d3d6cc;
    --board-tabs-border-strong: #bfc6bc;
    --board-tabs-surface: rgba(251, 250, 246, .96);
    --board-tab-surface: #f3f1e9;
    --board-tab-color: #20382c;
    --board-tab-hover-surface: #496657;
    --board-tab-hover-color: #fff;
    --board-tab-active-surface: var(--habitat-green);
    --board-tab-active-color: #fff;
    --board-tab-accent-1: var(--habitat-green);
    --board-tab-accent-2: #c08b52;
    --board-tab-accent-3: var(--habitat-sage);
}

/* Real-estate categories are selectable checkbox tags inside the shared search block. */
.section-theme-habitat .category-checkbox-tag {
    border-color: #d4d1c7;
    color: #375344;
    background: #fbfaf6;
}

.section-theme-habitat .category-checkbox-tag:hover,
.section-theme-habitat .category-checkbox-tag:has(input:checked) {
    border-color: var(--habitat-green);
    color: #fff;
    background: var(--habitat-green);
}
