:root {
    --ink: #171714;
    --ink2:#24231f;
    --stone: #f1eee7;
    --paper: #fbfaf7;
    --sand: #d8c7aa;
    --bronze: #aa7a44;
    --bronze2:#c79a62;
    --muted: #77736a;
    --line: #ded9cf;
    --white: #fff;
    --shadow: 0 22px 60px rgba(32,27,20,.12);
    --radius: 22px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'DM Sans',sans-serif
}

a {
    text-decoration: none;
    color: inherit
}

img {
    display: block;
    max-width: 100%
}

.shell {
    width: min(1220px,calc(100% - 40px));
    margin: auto
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251,250,247,.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(222,217,207,.8)
}

.header-inner {
    height: 86px;
    display: flex;
    align-items: center;
    gap: 28px
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-family: 'Playfair Display',serif;
    letter-spacing: -.5px
}

.brand b {
    font-weight: 700
}

.brand small {
    display: block;
    font: 600 8px/1.2 'DM Sans';
    letter-spacing: 2.4px;
    color: var(--bronze);
    margin-top: 2px
}

.brand-mark {
    width: 34px;
    height: 38px;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 3px;
    align-items: end
}

.brand-mark i {
    display: block;
    background: var(--ink);
    border-radius: 2px 2px 0 0
}

.brand-mark i:nth-child(1) {
    height: 19px
}

.brand-mark i:nth-child(2) {
    height: 31px;
    background: var(--bronze)
}

.brand-mark i:nth-child(3) {
    height: 24px
}

.main-nav {
    margin-left: auto;
    display: flex;
    gap: 26px;
    align-items: center
}

.main-nav a {
    font-size: 14px;
    font-weight: 600
}

.main-nav a:hover {
    color: var(--bronze)
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px
}

.link-btn {
    font-size: 14px;
    font-weight: 600
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 15px 23px;
    font: 700 14px 'DM Sans';
    cursor: pointer;
    transition: .2s
}

.btn:hover {
    transform: translateY(-1px)
}

.btn-gold {
    background: var(--ink);
    color: #fff
}

.btn-gold:hover {
    background: var(--bronze)
}

.btn-outline {
    border: 1px solid var(--line);
    background: transparent
}

.btn-sm {
    padding: 11px 17px
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 25px
}

.hero {
    position: relative;
    min-height: 690px;
    background: var(--ink);
    overflow: hidden;
    color: #fff
}

.hero:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,rgba(20,19,16,.94) 0%,rgba(20,19,16,.72) 46%,rgba(20,19,16,.15) 78%),url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=2200&q=86') center/cover
}

.hero:after {
    content: "";
    position: absolute;
    right: -120px;
    top: -180px;
    width: 480px;
    height: 480px;
    border: 1px solid rgba(199,154,98,.2);
    border-radius: 50%
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 92px 0 70px
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--bronze2)
}

.hero h1 {
    font: 600 clamp(48px,6vw,84px)/.98 'Playfair Display',serif;
    letter-spacing: -2px;
    max-width: 780px;
    margin: 16px 0 20px
}

.hero h1 em {
    font-style: italic;
    color: #e7d8bd
}

.hero-copy {
    font-size: 18px;
    line-height: 1.7;
    color: #d8d5cc;
    max-width: 650px
}

.search-panel {
    margin-top: 44px;
    background: #fff;
    color: var(--ink);
    border-radius: 18px;
    padding: 12px;
    display: grid;
    grid-template-columns: 130px 1.2fr 1fr 1fr 1fr auto;
    gap: 8px;
    box-shadow: 0 25px 70px rgba(0,0,0,.28)
}

.field {
    border-right: 1px solid var(--line);
    padding: 8px 12px
}

.field:last-of-type {
    border: 0
}

.field label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 5px
}

.field select,.field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font: 600 14px 'DM Sans';
    color: var(--ink)
}

.search-panel .btn {
    border-radius: 13px;
    padding-inline: 22px
}

.hero-stats {
    display: flex;
    gap: 38px;
    margin-top: 42px
}

.hero-stats strong {
    font: 600 26px 'Playfair Display';
    display: block
}

.hero-stats span {
    font-size: 11px;
    color: #aaa69b;
    text-transform: uppercase;
    letter-spacing: 1.1px
}

.section {
    padding: 86px 0
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: end;
    margin-bottom: 34px
}

.section-head h2,.editorial h2,.detail-main h1 {
    font: 600 clamp(34px,4vw,54px)/1.05 'Playfair Display';
    letter-spacing: -1px;
    margin: 10px 0
}

.section-head p {
    max-width: 530px;
    color: var(--muted);
    line-height: 1.7
}

.text-link {
    font-weight: 700;
    color: var(--bronze)
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 24px
}

.property-card {
    background: #fff;
    border: 1px solid #e5e0d6;
    border-radius: var(--radius);
    overflow: hidden;
    transition: .25s;
    box-shadow: 0 8px 25px rgba(30,26,20,.04)
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow)
}

.card-media {
    height: 245px;
    position: relative;
    overflow: hidden
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .4s
}

.property-card:hover .card-media img {
    transform: scale(1.035)
}

.card-badges {
    position: absolute;
    left: 16px;
    top: 16px;
    display: flex;
    gap: 7px
}

.card-badges span {
    background: var(--ink);
    color: #fff;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .9px;
    font-weight: 700
}

.card-badges .ghost-badge {
    background: rgba(255,255,255,.9);
    color: var(--ink)
}

.heart {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.92);
    font-size: 21px
}

.card-body {
    padding: 21px
}

.card-price {
    font-size: 20px;
    font-weight: 800
}

.card-price small {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500
}

.card-body h3 {
    font: 600 21px/1.25 'Playfair Display';
    margin: 9px 0
}

.location {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.card-specs {
    display: flex;
    gap: 16px;
    padding: 15px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 12px
}

.card-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 15px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--muted)
}

.card-foot a {
    color: var(--bronze);
    font-weight: 800
}

.dark-section {
    background: var(--ink);
    color: #fff
}

.dark-section .section-head p {
    color: #aaa69b
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px
}

.category-tile {
    min-height: 220px;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    position: relative;
    overflow: hidden;
    background: #282721
}

.category-tile:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,.08)),var(--bg) center/cover
}

.category-tile>* {
    position: relative;
    z-index: 2
}

.category-tile h3 {
    font: 600 26px 'Playfair Display';
    margin: 0 0 4px
}

.category-tile span {
    font-size: 12px;
    color: #d0cbc0
}

.editorial {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center
}

.editorial-image {
    border-radius: 30px;
    overflow: hidden;
    height: 560px
}

.editorial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.editorial p {
    color: var(--muted);
    line-height: 1.85
}

.bullet-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 28px 0
}

.bullet-list div {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-weight: 600
}

.cta {
    background: #c9b08c;
    padding: 56px 0
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px
}

.cta h2 {
    font: 600 42px 'Playfair Display';
    margin: 0 0 8px
}

.listing-hero {
    padding: 58px 0 30px;
    background: linear-gradient(135deg,#efe9de,#faf8f3)
}

.listing-hero h1 {
    font: 600 52px 'Playfair Display';
    margin: 10px 0
}

.filter-bar {
    background: #fff;
    border: 1px solid var(--line);
    padding: 14px;
    border-radius: 18px;
    display: grid;
    grid-template-columns: 1.4fr repeat(5,1fr) auto;
    gap: 8px;
    position: sticky;
    top: 98px;
    z-index: 20;
    margin: 24px 0 32px;
    box-shadow: 0 10px 30px rgba(35,30,23,.07)
}

.filter-bar input,.filter-bar select {
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 12px;
    background: #fff;
    width: 100%
}

.results-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted)
}

.detail-wrap {
    padding: 34px 0 85px
}

.detail-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 270px 270px;
    gap: 10px;
    border-radius: 24px;
    overflow: hidden
}

.detail-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.detail-gallery .main-img {
    grid-row: 1/3
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 365px;
    gap: 45px;
    margin-top: 42px
}

.crumbs {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 18px
}

.detail-main h1 {
    font-size: 46px
}

.detail-price {
    font-size: 30px;
    font-weight: 800;
    margin: 16px 0
}

.detail-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0
}

.detail-specs span {
    border: 1px solid var(--line);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600
}

.content-block {
    border-top: 1px solid var(--line);
    padding: 30px 0
}

.content-block h2 {
    font: 600 28px 'Playfair Display';
    margin: 0 0 15px
}

.content-block p {
    white-space: pre-line;
    line-height: 1.85;
    color: #57534c
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px
}

.chip {
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--stone);
    font-size: 12px
}

.agent-card {
    position: sticky;
    top: 116px;
    background: var(--ink);
    color: #fff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow)
}

.agent-card .eyebrow {
    color: var(--bronze2)
}

.agent-card h3 {
    font: 600 29px 'Playfair Display';
    margin: 10px 0
}

.agent-card p {
    color: #aaa69b;
    line-height: 1.6
}

.agent-card .btn {
    width: 100%;
    margin-top: 12px;
    background: var(--bronze2);
    color: var(--ink)
}

.agent-card .safe-note {
    font-size: 10px;
    text-align: center;
    margin-top: 12px;
    color: #918d84
}

.agent-revealed {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #3c3a34;
    display: none
}

.agent-revealed.show {
    display: block
}

.agent-line {
    padding: 8px 0;
    color: #ddd8ce
}

.agent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px
}

.agent-actions a {
    background: #fff;
    color: var(--ink);
    padding: 11px;
    border-radius: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 700
}

.qr-wrap {
    background: #fff;
    border-radius: 14px;
    margin-top: 13px;
    padding: 12px;
    text-align: center;
    color: #333
}

.lead-modal {
    position: fixed;
    inset: 0;
    background: rgba(10,10,9,.76);
    z-index: 100;
    display: none;
    place-items: center;
    padding: 20px
}

.lead-modal.open {
    display: grid
}

.modal-card {
    background: #fff;
    width: min(480px,100%);
    border-radius: 24px;
    padding: 32px;
    position: relative
}

.modal-card h2 {
    font: 600 34px 'Playfair Display';
    margin: 4px 0 8px
}

.modal-card p {
    color: var(--muted);
    font-size: 13px
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 16px;
    background: none;
    border: 0;
    font-size: 26px
}

.form-stack {
    display: grid;
    gap: 12px;
    margin-top: 22px
}

.form-stack input,.form-stack select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: 14px 'DM Sans'
}

.form-stack .btn {
    border-radius: 12px
}

.form-msg {
    font-size: 12px;
    margin-top: 8px
}

.auth-wrap {
    min-height: calc(100vh - 86px);
    display: grid;
    grid-template-columns: 1.1fr .9fr
}

.auth-visual {
    background: linear-gradient(0deg,rgba(20,19,16,.72),rgba(20,19,16,.24)),url('https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=1400&q=85') center/cover;
    color: #fff;
    padding: 70px;
    display: flex;
    flex-direction: column;
    justify-content: end
}

.auth-visual h1 {
    font: 600 55px 'Playfair Display';
    max-width: 620px
}

.auth-panel {
    padding: 70px;
    display: flex;
    align-items: center
}

.auth-box {
    width: min(460px,100%)
}

.auth-box h2 {
    font: 600 42px 'Playfair Display';
    margin: 8px 0
}

.auth-box .form-stack label {
    font-size: 12px;
    font-weight: 700
}

.alert {
    padding: 12px 15px;
    border-radius: 10px;
    background: #f5eee3;
    color: #6c4f2f;
    margin: 12px 0;
    font-size: 13px
}

.dashboard {
    background: #f4f1eb;
    min-height: 100vh;
    padding: 42px 0
}

.dash-head {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px;
    margin: 26px 0
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    padding: 22px;
    border-radius: 18px
}

.stat-card span {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 1px
}

.stat-card strong {
    display: block;
    font: 600 32px 'Playfair Display';
    margin-top: 8px
}

.data-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px;
    margin-top: 18px;
    overflow: auto
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

.data-table th,.data-table td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    white-space: nowrap
}

.site-footer {
    background: #131311;
    color: #fff;
    padding: 65px 0 22px
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3,1fr);
    gap: 45px
}

.brand-footer {
    margin-bottom: 16px
}

.brand-footer .brand-mark i {
    background: #fff
}

.brand-footer .brand-mark i:nth-child(2) {
    background: var(--bronze2)
}

.site-footer p {
    color: #8e8b83;
    line-height: 1.7;
    max-width: 400px
}

.site-footer h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: var(--bronze2)
}

.site-footer div>a:not(.brand) {
    display: block;
    color: #b3afa6;
    padding: 6px 0;
    font-size: 13px
}

.footer-bottom {
    border-top: 1px solid #2b2925;
    margin-top: 40px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    color: #6f6c65;
    font-size: 11px
}

.legal {
    padding: 70px 0;
    max-width: 900px
}

.legal h1 {
    font: 600 52px 'Playfair Display'
}

.legal h2 {
    font: 600 27px 'Playfair Display';
    margin-top: 32px
}

.legal p,.legal li {
    line-height: 1.8;
    color: #5c5851
}

.empty {
    padding: 70px 20px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 20px;
    color: var(--muted)
}

@media(max-width:1050px) {
    .main-nav {
        display: none
    }

    .nav-toggle {
        display: block;
        margin-left: auto
    }

    .main-nav.open {
        display: flex;
        position: absolute;
        top: 86px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 22px 30px;
        flex-direction: column;
        align-items: flex-start;
        box-shadow: 0 20px 30px rgba(0,0,0,.08)
    }

    .search-panel {
        grid-template-columns: repeat(3,1fr)
    }

    .property-grid {
        grid-template-columns: repeat(2,1fr)
    }

    .category-grid {
        grid-template-columns: repeat(2,1fr)
    }

    .filter-bar {
        grid-template-columns: repeat(3,1fr)
    }

    .detail-layout {
        grid-template-columns: 1fr
    }

    .agent-card {
        position: relative;
        top: auto
    }

    .stat-grid {
        grid-template-columns: repeat(2,1fr)
    }

    .auth-wrap {
        grid-template-columns: 1fr
    }

    .auth-visual {
        min-height: 420px
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr
    }

}

@media(max-width:700px) {
    .shell {
        width: min(100% - 24px,1220px)
    }

    .header-inner {
        height: 72px
    }

    .header-actions .link-btn {
        display: none
    }

    .hero {
        min-height: 720px
    }

    .hero-inner {
        padding-top: 65px
    }

    .hero h1 {
        font-size: 48px
    }

    .search-panel {
        grid-template-columns: 1fr 1fr
    }

    .search-panel .btn {
        grid-column: 1/-1
    }

    .hero-stats {
        gap: 20px;
        flex-wrap: wrap
    }

    .section {
        padding: 60px 0
    }

    .section-head {
        display: block
    }

    .property-grid,.category-grid {
        grid-template-columns: 1fr
    }

    .editorial {
        grid-template-columns: 1fr;
        gap: 35px
    }

    .editorial-image {
        height: 390px
    }

    .cta-inner {
        display: block
    }

    .cta .btn {
        margin-top: 20px
    }

    .filter-bar {
        position: static;
        grid-template-columns: 1fr 1fr
    }

    .filter-bar input:first-child {
        grid-column: 1/-1
    }

    .detail-gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 280px 120px
    }

    .detail-gallery .main-img {
        grid-row: auto;
        grid-column: 1/3
    }

    .detail-main h1 {
        font-size: 36px
    }

    .auth-panel,.auth-visual {
        padding: 35px 24px
    }

    .auth-visual h1 {
        font-size: 42px
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr
    }

    .footer-grid>div:first-child {
        grid-column: 1/-1
    }

    .footer-bottom {
        display: block
    }

    .footer-bottom span {
        display: block;
        margin: 5px 0
    }

}

/* Static HTML frontend additions */.gallery-slider {
    position: relative;
    background: #151513;
    border-radius: 26px;
    overflow: hidden
}

.slider-stage {
    height: min(620px,62vw);
    min-height: 360px;
    position: relative
}

.slider-stage>img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(18,18,16,.65);
    color: #fff;
    font-size: 25px;
    z-index: 2;
    cursor: pointer
}

.slider-arrow.prev {
    left: 18px
}

.slider-arrow.next {
    right: 18px
}

.slide-counter {
    position: absolute;
    right: 18px;
    bottom: 18px;
    background: rgba(20,20,18,.72);
    color: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px
}

.slider-thumbs {
    display: flex;
    gap: 10px;
    padding: 12px;
    overflow-x: auto;
    background: #1c1b18
}

.slider-thumb {
    width: 108px;
    height: 76px;
    flex: 0 0 auto;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: none;
    cursor: pointer;
    opacity: .65
}

.slider-thumb.active {
    border-color: var(--bronze2);
    opacity: 1
}

.slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.map-frame {
    width: 100%;
    height: 390px;
    border: 0;
    border-radius: 20px;
    margin-top: 18px;
    background: #eee
}

.loading-card {
    min-height: 300px;
    display: grid;
    place-items: center
}

.public-page {
    min-height: 60vh
}

.property-grid>.empty {
    grid-column: 1/-1
}

@media(max-width:700px) {
    .slider-stage {
        height: 360px;
        min-height: 0
    }

    .slider-thumb {
        width: 82px;
        height: 58px
    }

    .map-frame {
        height: 300px
    }

}

/* EstateQuarry signature homepage cards */.quarry-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 34px 28px;
    counter-reset: quarry
}

.quarry-card {
    position: relative;
    min-width: 0
}

.quarry-card:nth-child(even) {
    margin-top: 54px
}

.quarry-card-link {
    display: grid;
    grid-template-columns: minmax(0,1.14fr) minmax(260px,.86fr);
    min-height: 390px;
    background: var(--ink);
    color: #fff;
    position: relative;
    overflow: visible;
    box-shadow: 0 24px 55px rgba(28,24,18,.13);
    isolation: isolate
}

.quarry-card-link:before {
    content: "";
    position: absolute;
    right: -8px;
    top: -8px;
    width: 76px;
    height: 76px;
    background: var(--paper);
    clip-path: polygon(100% 0,100% 100%,0 0);
    z-index: 6;
    pointer-events: none
}

.quarry-card-link:after {
    content: "";
    position: absolute;
    right: 4px;
    top: 4px;
    width: 59px;
    height: 1px;
    background: var(--bronze2);
    transform: rotate(45deg);
    transform-origin: right center;
    z-index: 7
}

.quarry-media {
    position: relative;
    min-height: 390px;
    overflow: hidden
}

.quarry-media:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,rgba(18,17,14,.05) 45%,rgba(18,17,14,.65) 100%)
}

.quarry-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: transform .65s cubic-bezier(.2,.7,.2,1)
}

.quarry-card:hover .quarry-media img {
    transform: scale(1.055)
}

.quarry-index {
    position: absolute;
    left: 18px;
    top: 20px;
    z-index: 3;
    font: 500 11px/1 'DM Sans';
    letter-spacing: 2px;
    color: #fff;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding-top: 35px
}

.quarry-index:before {
    content: "";
    position: absolute;
    top: 0;
    left: 5px;
    width: 1px;
    height: 27px;
    background: var(--bronze2)
}

.quarry-purpose {
    position: absolute;
    z-index: 3;
    right: 18px;
    top: 20px;
    background: rgba(20,19,16,.72);
    backdrop-filter: blur(8px);
    padding: 9px 12px;
    font-size: 9px;
    letter-spacing: 1.8px;
    font-weight: 800
}

.quarry-price {
    position: absolute;
    left: 22px;
    bottom: 21px;
    z-index: 3;
    background: #f0e6d5;
    color: #191816;
    padding: 12px 16px 11px;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 8px 8px 0 rgba(170,122,68,.72)
}

.quarry-price small {
    font-size: 10px;
    font-weight: 600;
    color: #6e665c
}

.quarry-info {
    position: relative;
    padding: 38px 30px 28px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: linear-gradient(145deg,#191916,#25231e)
}

.quarry-info:before {
    content: "";
    position: absolute;
    left: 0;
    top: 31px;
    bottom: 31px;
    width: 1px;
    background: linear-gradient(transparent,var(--bronze),transparent);
    opacity: .7
}

.quarry-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #b7b1a5;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 1.4px;
    font-weight: 700
}

.quarry-kicker i {
    width: 18px;
    height: 1px;
    background: var(--bronze2)
}

.quarry-info h3 {
    font: 600 clamp(22px,2vw,31px)/1.08 'Playfair Display',serif;
    letter-spacing: -.45px;
    margin: 25px 0 13px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.quarry-place {
    color: #aaa398;
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
    align-items: flex-start
}

.quarry-pin {
    color: var(--bronze2);
    font-size: 7px;
    margin-top: 4px;
    transform: rotate(45deg)
}

.quarry-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 19px;
    display: grid;
    grid-template-columns: auto auto 1fr 42px;
    gap: 16px;
    align-items: end
}

.quarry-spec {
    display: flex;
    flex-direction: column;
    gap: 3px
}

.quarry-spec strong {
    font: 600 18px 'Playfair Display',serif;
    color: #f4efe7
}

.quarry-spec small {
    font-size: 8px;
    letter-spacing: 1.2px;
    color: #7f7a71;
    font-weight: 700
}

.quarry-size {
    padding-left: 15px;
    border-left: 1px solid rgba(255,255,255,.11)
}

.quarry-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(199,154,98,.55);
    display: grid;
    place-items: center;
    color: var(--bronze2);
    font-size: 19px;
    transition: .25s
}

.quarry-card:hover .quarry-arrow {
    background: var(--bronze2);
    color: #181714;
    transform: translate(3px,-3px)
}

@media(max-width:1180px) {
    .quarry-card-link {
        grid-template-columns: 1fr;
        min-height: 0
    }

    .quarry-media {
        min-height: 310px
    }

    .quarry-info {
        min-height: 270px
    }

    .quarry-card:nth-child(even) {
        margin-top: 34px
    }

}

@media(max-width:760px) {
    .quarry-grid {
        grid-template-columns: 1fr;
        gap: 24px
    }

    .quarry-card:nth-child(even) {
        margin-top: 0
    }

    .quarry-card-link {
        grid-template-columns: minmax(0,1fr) 42%;
        min-height: 310px
    }

    .quarry-media {
        min-height: 310px
    }

    .quarry-info {
        min-height: 310px;
        padding: 28px 20px 22px
    }

    .quarry-info h3 {
        font-size: 23px;
        margin: 19px 0 10px;
        -webkit-line-clamp: 3
    }

    .quarry-bottom {
        grid-template-columns: auto auto 1fr;
        gap: 10px
    }

    .quarry-size {
        display: none
    }

    .quarry-arrow {
        grid-column: 3;
        grid-row: 1;
        width: 38px;
        height: 38px;
        justify-self: end
    }

    .quarry-price {
        font-size: 14px;
        left: 15px;
        bottom: 15px;
        padding: 10px 12px
    }

    .quarry-purpose {
        right: 12px;
        top: 12px
    }

    .quarry-index {
        left: 12px;
        top: 15px
    }

    .quarry-card-link:before,.quarry-card-link:after {
        display: none
    }

}

@media(max-width:520px) {
    .quarry-card-link {
        grid-template-columns: 1fr;
        min-height: 0
    }

    .quarry-media {
        min-height: 270px
    }

    .quarry-info {
        min-height: 245px
    }

    .quarry-info h3 {
        -webkit-line-clamp: 2
    }

    .quarry-bottom {
        grid-template-columns: auto auto 1fr
    }

    .quarry-place {
        margin-bottom: 17px
    }

}

/* ===== EstateQuarry v2.3 — clear wrapped inner-page system ===== */:root {
    --panel: #ffffff;
    --panel-soft: #f7f4ee;
    --panel-border: #e3ddd2;
    --panel-shadow: 0 18px 48px rgba(31,27,21,.07)
}

.public-page,.detail-wrap,.dashboard {
    background: linear-gradient(180deg,#f7f4ee 0,#fbfaf7 240px)
}

/* Listing page: make filters/results read as separate areas */.listing-hero {
    padding: 64px 0 76px;
    border-bottom: 1px solid var(--panel-border)
}

.listing-hero p {
    max-width: 720px;
    margin: 0;
    color: #6f6a61;
    line-height: 1.75;
    font-size: 16px
}

.public-page>.shell {
    position: relative
}

.filter-bar {
    top: 100px;
    margin: -30px 0 0;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid var(--panel-border);
    box-shadow: var(--panel-shadow);
    background: rgba(255,255,255,.97);
    gap: 10px
}

.filter-bar input,.filter-bar select {
    min-height: 48px;
    border-radius: 13px;
    background: #fbfaf7;
    border-color: #ddd6ca;
    padding: 0 14px;
    color: var(--ink);
    outline: none
}

.filter-bar input:focus,.filter-bar select:focus {
    border-color: var(--bronze);
    box-shadow: 0 0 0 3px rgba(170,122,68,.10)
}

.filter-bar .btn {
    border-radius: 13px;
    min-height: 48px
}

.results-meta {
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 16px 18px;
    margin: 20px 0 26px;
    box-shadow: 0 8px 24px rgba(31,27,21,.035)
}

.results-meta strong {
    color: var(--ink);
    font-size: 14px
}

.results-meta a {
    font-weight: 700;
    color: var(--bronze)
}

.quarry-grid {
    padding: 4px 0 20px
}

/* Property details: every information group gets a clear boundary */.detail-wrap {
    padding: 38px 0 92px
}

.crumbs {
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    padding: 11px 16px;
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 6px 18px rgba(31,27,21,.035)
}

.gallery-slider {
    border: 8px solid #fff;
    box-shadow: var(--panel-shadow);
    border-radius: 28px
}

.detail-layout {
    align-items: start;
    gap: 28px;
    margin-top: 28px
}

.detail-main {
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 26px;
    padding: 34px 36px;
    box-shadow: var(--panel-shadow);
    min-width: 0
}

.detail-main h1 {
    font-size: clamp(34px,4vw,50px);
    max-width: 880px;
    margin-bottom: 14px
}

.detail-price {
    display: inline-block;
    background: #f1e8d9;
    border: 1px solid #e4d5bd;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 12px 0 10px
}

.detail-main>.location {
    white-space: normal;
    overflow: visible;
    line-height: 1.6;
    margin: 4px 0 20px;
    font-size: 14px
}

.detail-specs {
    background: var(--panel-soft);
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    padding: 12px;
    margin: 20px 0 6px;
    gap: 9px
}

.detail-specs span {
    background: #fff;
    border-color: #e5dfd5;
    padding: 11px 14px
}

.content-block {
    border-top: 0;
    margin-top: 20px;
    padding: 25px 0 0
}

.content-block+ .content-block {
    border-top: 1px solid var(--panel-border);
    margin-top: 26px;
    padding-top: 26px
}

.content-block h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 17px
}

.content-block h2:before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--bronze);
    flex: 0 0 auto
}

.content-block p {
    max-width: 920px;
    margin: 0;
    overflow-wrap: anywhere
}

.chips {
    gap: 10px
}

.chip {
    background: #f4f0e8;
    border: 1px solid #e6dfd2;
    padding: 10px 13px
}

.map-frame {
    height: 410px;
    border: 1px solid var(--panel-border);
    box-shadow: 0 8px 24px rgba(31,27,21,.05)
}

.agent-card {
    border: 1px solid #35332e;
    box-shadow: 0 20px 50px rgba(20,18,14,.18);
    overflow: hidden
}

.agent-card:before {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    background: var(--bronze2);
    margin-bottom: 22px
}

/* Text/info pages: central readable sheet rather than loose text */main>.legal {
    max-width: 960px;
    margin: 58px auto 72px!important;
    padding: 54px 64px!important;
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    box-shadow: var(--panel-shadow)
}

.legal h1 {
    font-size: clamp(38px,5vw,58px);
    line-height: 1.05;
    margin: 14px 0 26px;
    max-width: 760px
}

.legal>p:first-of-type {
    font-size: 17px;
    line-height: 1.9;
    color: #514d46;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--panel-border)
}

.legal h2 {
    margin: 32px 0 10px;
    padding-top: 2px
}

.legal p {
    max-width: 780px;
    margin-top: 0
}

/* Authentication: make forms visually contained */.auth-wrap {
    background: #f4f1eb;
    min-height: 760px
}

.auth-visual {
    position: relative
}

.auth-visual:after {
    content: "";
    position: absolute;
    inset: 28px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 22px;
    pointer-events: none
}

.auth-panel {
    padding: 62px clamp(28px,6vw,82px)
}

.auth-box {
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 26px;
    padding: 34px 36px;
    box-shadow: var(--panel-shadow);
    width: min(520px,100%)
}

.auth-box .form-stack {
    gap: 16px
}

.auth-box .form-stack input,.auth-box .form-stack select {
    min-height: 50px;
    background: #fbfaf7
}

/* Agent dashboard: clearer hierarchy and wrapped data */.dashboard {
    padding: 48px 0 78px
}

.dashboard>.shell {
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 30px;
    padding: 30px;
    box-shadow: var(--panel-shadow)
}

.dash-head {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--panel-border)
}

.stat-grid {
    gap: 14px;
    margin: 24px 0
}

.stat-card {
    background: #faf8f4;
    border-color: var(--panel-border);
    border-radius: 16px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.data-card {
    padding: 0;
    border-radius: 20px;
    overflow: hidden
}

.data-card h2 {
    padding: 22px 24px;
    margin: 0!important;
    background: #faf8f4;
    border-bottom: 1px solid var(--panel-border)
}

.data-table {
    min-width: 820px
}

.data-table th {
    background: #f3efe7;
    color: #615b51;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .9px
}

.data-table th,.data-table td {
    padding: 14px 16px
}

/* Footer separation from page content */.site-footer {
    margin-top: 0
}

.public-page+.site-footer,.detail-wrap+.site-footer {
    border-top: 1px solid #24221e
}

/* Prevent awkward overflow/wrapping throughout */h1,h2,h3,p,a,span,strong {
    overflow-wrap: break-word
}

.shell {
    min-width: 0
}

.quarry-card,.quarry-info,.detail-main,.auth-box {
    min-width: 0
}

@media(max-width:1050px) {
    .filter-bar {
        position: relative;
        top: auto;
        margin: -28px 0 0;
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .filter-bar .btn {
        grid-column: 1/-1
    }

    .detail-main {
        padding: 30px
    }

    .detail-layout {
        gap: 22px
    }

    .dashboard>.shell {
        padding: 24px
    }

}

@media(max-width:760px) {
    .listing-hero {
        padding: 42px 0 58px
    }

    .listing-hero h1 {
        font-size: 40px
    }

    .filter-bar {
        grid-template-columns: 1fr;
        padding: 13px;
        border-radius: 18px
    }

    .filter-bar .btn {
        grid-column: auto
    }

    .results-meta {
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
        margin: 16px 0 22px
    }

    .detail-wrap {
        padding-top: 20px
    }

    .crumbs {
        border-radius: 14px;
        display: flex;
        flex-wrap: wrap
    }

    .gallery-slider {
        border-width: 4px;
        border-radius: 20px
    }

    .slider-stage {
        min-height: 270px;
        height: 64vw
    }

    .detail-main {
        padding: 24px 20px;
        border-radius: 20px
    }

    .detail-main h1 {
        font-size: 34px
    }

    .detail-price {
        font-size: 24px
    }

    .detail-specs {
        padding: 9px
    }

    .detail-specs span {
        flex: 1 1 calc(50% - 10px);
        text-align: center
    }

    .content-block h2 {
        font-size: 25px
    }

    .map-frame {
        height: 310px
    }

    main>.legal {
        margin: 28px 20px 50px!important;
        padding: 30px 24px!important;
        border-radius: 20px
    }

    .legal h1 {
        font-size: 38px
    }

    .auth-panel {
        padding: 28px 20px
    }

    .auth-box {
        padding: 28px 22px;
        border-radius: 20px
    }

    .auth-visual {
        padding: 42px 28px;
        min-height: 330px
    }

    .auth-visual h1 {
        font-size: 40px
    }

    .dashboard {
        padding: 24px 0 50px
    }

    .dashboard>.shell {
        width: min(100% - 24px,1220px);
        padding: 18px;
        border-radius: 20px
    }

    .dash-head {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr
    }

    .stat-card {
        min-height: 105px;
        padding: 16px
    }

    .stat-card strong {
        font-size: 25px
    }

}

@media(max-width:480px) {
    .stat-grid {
        grid-template-columns: 1fr
    }

    .detail-specs span {
        flex-basis: 100%
    }

}

/* =========================================================   CATEGORY-AWARE PROPERTY FILTERS   ========================================================= */[hidden]  {
    display: none !important;
}

.filter-bar  {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(145px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.filter-field  {
    min-width: 0;
}

.filter-field label  {
    display: block;
    margin: 0 0 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.filter-field input,.filter-field select  {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    padding: 0 14px;
    font: 600 13px 'DM Sans', sans-serif;
    outline: none;
}

.filter-field input:focus,.filter-field select:focus  {
    border-color: var(--bronze);
    box-shadow: 0 0 0 3px rgba(170, 122, 68, 0.10);
}

.filter-size-group  {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 12px;
}

.filter-submit  {
    min-height: 48px;
    white-space: nowrap;
}

.quarry-card.is-commercial .quarry-bottom  {
    grid-template-columns: minmax(150px, 1.25fr) minmax(120px, 1fr) auto;
}

.quarry-card.is-commercial .quarry-spec strong  {
    font-size: 17px;
}

.quarry-card.is-commercial .commercial-size strong  {
    font-size: 22px;
}

@media (max-width: 1180px)  {
    .filter-bar  {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filter-search  {
        grid-column: span 2;
    }

    .filter-size-group  {
        grid-column: span 2;
    }

}

@media (max-width: 720px)  {
    .filter-bar  {
        grid-template-columns: 1fr 1fr;
    }

    .filter-search,    .filter-size-group,    .filter-submit  {
        grid-column: 1 / -1;
    }

}

@media (max-width: 520px)  {
    .filter-bar  {
        grid-template-columns: 1fr;
    }

    .filter-search,    .filter-size-group,    .filter-submit  {
        grid-column: auto;
    }

    .filter-size-group  {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   ESTATEQUARRY AGENT + ADMIN PORTALS
   ========================================================= */

.portal-page {
  min-height: 78vh;
  padding: 38px 0 70px;
  background:
    radial-gradient(circle at top right, rgba(170, 122, 68, 0.08), transparent 32%),
    linear-gradient(180deg, #f7f4ee 0%, #efebe3 100%);
}

.portal-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.portal-sidebar {
  position: sticky;
  top: 98px;
  min-height: calc(100vh - 126px);
  display: flex;
  flex-direction: column;
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(193, 142, 82, 0.06), transparent 28%),
    #1d1b18;
  color: #fff;
  box-shadow: var(--panel-shadow);
}

.portal-user {
  padding: 28px 24px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-user strong,
.portal-user span {
  display: block;
}

.portal-user strong {
  margin-top: 14px;
  font: 600 22px 'Playfair Display', serif;
}

.portal-user > span {
  margin: 5px 0 13px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.profile-avatar,
.admin-avatar {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(193, 142, 82, 0.85);
  border-radius: 50%;
  background: #f3eadc;
  color: #382b1d;
  font: 700 26px 'Playfair Display', serif;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar.large {
  width: 122px;
  height: 122px;
  font-size: 42px;
}

.admin-avatar {
  border-radius: 20px;
  background: linear-gradient(145deg, #d8b07a, #8d5d2f);
  color: #151310;
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
}

.portal-nav {
  flex: 0 0 auto;
  padding: 12px;
}

.portal-nav-item {
  width: 100%;
  margin: 3px 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  padding: 12px 13px;
  text-align: left;
  font: 600 13px 'DM Sans', sans-serif;
  cursor: pointer;
  transition: 0.2s ease;
}

.portal-nav-item:hover,
.portal-nav-item.active {
  background: rgba(193, 142, 82, 0.14);
  color: #f6dfbe;
}

.portal-nav-item.active {
  box-shadow: inset 3px 0 0 #c18e52;
}

.portal-help {
  margin: auto 12px 12px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.portal-help small {
  color: #d3a46d;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.portal-help p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.6;
}

.portal-content {
  min-width: 0;
}

.portal-panel {
  display: none;
}

.portal-panel.active {
  display: block;
}

.portal-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.portal-heading h1 {
  margin: 7px 0 8px;
  font: 600 clamp(36px, 4vw, 52px) 'Playfair Display', serif;
  letter-spacing: -1.5px;
}

.portal-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.status-strip,
.subscription-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel-border);
  box-shadow: var(--panel-shadow);
}

.status-strip > div,
.subscription-summary > div {
  min-height: 96px;
  padding: 20px;
  background: #fff;
}

.status-strip span,
.subscription-summary span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.status-strip strong,
.subscription-summary strong {
  font-size: 16px;
}

.status-badge {
  display: inline-flex !important;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.status-approved {
  background: #e8f4ea;
  color: #2a6638;
}

.status-pending {
  background: #f7eedf;
  color: #8b5a21;
}

.status-rejected {
  background: #f8e5e3;
  color: #8c3530;
}

.portal-stats,
.admin-stat-grid {
  margin: 0 0 24px;
}

.admin-stat-grid {
  grid-template-columns: repeat(3, 1fr);
}

.stat-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.portal-grid {
  display: grid;
  gap: 22px;
  margin-bottom: 22px;
}

.portal-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-grid.profile-grid {
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 2fr);
}

.data-card {
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: #fff;
  padding: 24px;
  box-shadow: var(--panel-shadow);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.card-head h2 {
  margin: 4px 0 0;
  font: 600 27px 'Playfair Display', serif;
}

.mini-label {
  color: #9a6b36;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.text-action {
  border: 0;
  background: transparent;
  color: #8f6334;
  font: 700 12px 'DM Sans', sans-serif;
  cursor: pointer;
}

.history-row {
  margin-bottom: 16px;
}

.history-row > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 12px;
}

.history-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece7df;
}

.history-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b6035, #d2a26b);
}

.checklist {
  display: grid;
  gap: 9px;
}

.check-item {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #ece6dc;
  border-radius: 12px;
  padding: 11px 12px;
  color: #7e7164;
  font-size: 12px;
}

.check-item span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #f4efe7;
}

.check-item.done {
  border-color: #dbe9dc;
  background: #fbfefb;
  color: #2a6638;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.wide-table {
  min-width: 920px;
}

.data-table td,
.data-table th {
  vertical-align: top;
}

.data-table small {
  color: var(--muted);
  line-height: 1.5;
}

.lead-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.lead-range-tabs button {
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: #fff;
  padding: 9px 14px;
  color: #655c52;
  font: 700 11px 'DM Sans', sans-serif;
  cursor: pointer;
}

.lead-range-tabs button.active {
  border-color: #9b6a38;
  background: #2a2621;
  color: #f5dfc1;
}

.compact-select,
.lead-status-select,
.admin-plan-months {
  min-height: 36px;
  border: 1px solid #ddd5c8;
  border-radius: 9px;
  background: #fff;
  padding: 0 10px;
  color: var(--ink);
  font: 600 11px 'DM Sans', sans-serif;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.plan-card {
  position: relative;
  min-height: 205px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: #fff;
  padding: 22px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(31, 27, 21, 0.05);
  transition: 0.2s ease;
}

.plan-card:hover,
.plan-card.selected {
  transform: translateY(-3px);
  border-color: #a97742;
  box-shadow: 0 20px 40px rgba(31, 27, 21, 0.09);
}

.plan-card.selected {
  outline: 2px solid rgba(169, 119, 66, 0.18);
}

.plan-card strong,
.plan-card span,
.plan-card b,
.plan-card small {
  display: block;
}

.plan-card > strong {
  margin: 28px 0 8px;
  font: 600 26px 'Playfair Display', serif;
}

.plan-card > span:not(.plan-save) {
  color: var(--muted);
  font-size: 12px;
}

.plan-card > b {
  margin: 12px 0 5px;
  font-size: 22px;
}

.plan-card > small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.plan-save {
  position: absolute;
  top: 16px;
  right: 16px;
  width: fit-content;
  border-radius: 999px;
  background: #eadbc6;
  padding: 6px 8px;
  color: #74491f;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-save.subtle {
  background: #efebe4;
  color: #786e62;
}

.subscription-summary {
  grid-template-columns: repeat(3, 1fr);
}

.payment-layout {
  align-items: start;
}

.coupon-entry {
  display: flex;
  gap: 8px;
}

.coupon-entry input {
  flex: 1;
}

.quote-breakdown {
  margin-top: 18px;
  border-top: 1px solid #eee7dc;
  padding-top: 12px;
}

.quote-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 12px;
}

.quote-line strong {
  color: var(--ink);
}

.quote-line.saving strong {
  color: #2f6c3e;
}

.quote-line.total {
  margin-top: 7px;
  border-top: 1px solid #e7dfd3;
  padding-top: 14px;
  color: var(--ink);
  font-size: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field,
.form-stack label {
  display: grid;
  gap: 7px;
  color: #5f554b;
  font-size: 11px;
  font-weight: 700;
}

.form-stack input,
.form-stack select,
.form-field input,
.form-field select,
.document-upload-form input,
.document-upload-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ddd5c8;
  border-radius: 11px;
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  font: 500 13px 'DM Sans', sans-serif;
}

.form-note {
  color: var(--muted);
  line-height: 1.6;
}

.profile-upload-block {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.profile-upload-block form {
  display: grid;
  gap: 12px;
}

.profile-upload-block input[type="file"] {
  max-width: 100%;
  font-size: 11px;
}

.verification-notice {
  margin-bottom: 22px;
}

.verification-notice > div {
  display: flex;
  gap: 13px;
  align-items: center;
  border: 1px solid #dfd5c6;
  border-radius: 15px;
  background: #fffaf3;
  padding: 14px 16px;
}

.verification-notice p {
  margin: 0;
  color: #665b50;
  font-size: 12px;
  line-height: 1.6;
}

.document-upload-form {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
  border: 1px solid #ebe4da;
  border-radius: 16px;
  background: #faf8f4;
  padding: 16px;
}

.document-upload-form label {
  display: grid;
  gap: 7px;
  color: #5f554b;
  font-size: 10px;
  font-weight: 700;
}

.portal-alert {
  margin-bottom: 16px;
  border: 1px solid #cfe3d3;
  border-radius: 13px;
  background: #eef8f0;
  padding: 12px 14px;
  color: #275f34;
  font-size: 12px;
}

.portal-alert.error {
  border-color: #edd0cd;
  background: #fbefee;
  color: #85342f;
}

.stack-list {
  display: grid;
  gap: 9px;
}

.stack-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid #eee8df;
  padding: 10px 0;
}

.stack-item:last-child {
  border-bottom: 0;
}

.stack-item strong,
.stack-item span {
  display: block;
}

.stack-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.empty-copy {
  color: var(--muted);
  font-size: 12px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.mini-action {
  border: 1px solid #d8cbbb;
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
  color: #6c4c2d;
  font: 700 10px 'DM Sans', sans-serif;
  cursor: pointer;
}

.mini-action:hover {
  border-color: #a97843;
}

.mini-action.danger {
  border-color: #e1c4c0;
  color: #943d36;
}

.subscription-admin-actions {
  display: flex;
  min-width: 220px;
  flex-wrap: wrap;
  gap: 6px;
}

.coupon-admin-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
}

.pricing-rules {
  display: grid;
  gap: 10px;
}

.pricing-rules > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eee8df;
  padding: 10px 0;
  font-size: 12px;
}

.pricing-rules p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #e8e0d5;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.notification-item h3 {
  margin: 3px 0 5px;
  font-size: 15px;
}

.notification-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.notification-item > div:last-child {
  min-width: 165px;
  text-align: right;
}

.notification-item > div:last-child strong,
.notification-item > div:last-child small {
  display: block;
}

.notification-item > div:last-child small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.auth-points {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.registration-box {
  max-width: 720px;
}

.verification-explainer {
  border: 1px solid #e4d8c8;
  border-radius: 13px;
  background: #faf5ed;
  padding: 13px 14px;
}

.verification-explainer strong {
  display: block;
  margin-bottom: 5px;
  color: #6e4c2a;
  font-size: 12px;
}

.verification-explainer p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .portal-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .document-upload-form {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .portal-shell {
    display: block;
  }

  .portal-sidebar {
    position: static;
    margin-bottom: 20px;
  }

  .portal-user {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    align-items: center;
  }

  .portal-user .profile-avatar,
  .portal-user .admin-avatar {
    grid-row: span 3;
  }

  .portal-user strong {
    margin-top: 0;
  }

  .portal-nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
  }

  .portal-nav-item {
    width: auto;
    white-space: nowrap;
  }

  .portal-nav-item.active {
    box-shadow: inset 0 -3px 0 #c18e52;
  }

  .portal-help {
    display: none;
  }

  .portal-grid.two,
  .portal-grid.profile-grid,
  .coupon-admin-grid {
    grid-template-columns: 1fr;
  }

  .status-strip,
  .subscription-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .portal-page {
    padding-top: 20px;
  }

  .portal-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-heading h1 {
    font-size: 36px;
  }

  .status-strip,
  .subscription-summary,
  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .plan-grid,
  .form-row,
  .document-upload-form {
    grid-template-columns: 1fr;
  }

  .data-card {
    padding: 18px;
    border-radius: 17px;
  }

  .card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .coupon-entry {
    align-items: stretch;
    flex-direction: column;
  }
}


/* =========================================================
   v2.10 — CUSTOM PORTAL UPLOAD CONTROLS
   ========================================================= */

.native-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-upload-form {
  width: 100%;
  display: grid;
  gap: 12px;
}

.upload-zone {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 14px;
  border: 1px dashed rgba(157, 108, 57, 0.54);
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(201, 158, 102, 0.10), transparent 52%),
    #fbf8f2;
  padding: 17px;
  color: #463a2e;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.upload-zone:hover,
.upload-zone.is-dragover {
  border-color: #9d6c39;
  background:
    linear-gradient(135deg, rgba(201, 158, 102, 0.17), transparent 56%),
    #fffaf3;
  box-shadow: inset 0 0 0 1px rgba(157, 108, 57, 0.08);
}

.upload-zone.is-dragover {
  transform: translateY(-1px);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: #a8753f;
  background:
    linear-gradient(135deg, rgba(201, 158, 102, 0.12), transparent 55%),
    #fffdf9;
}

.upload-zone-profile {
  grid-template-columns: 54px minmax(0, 1fr);
}

.upload-zone-document {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 116px;
}

.upload-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(163, 116, 65, 0.28);
  border-radius: 15px;
  background: linear-gradient(145deg, #ead4b7, #c59257);
  color: #2b231b;
  box-shadow: 0 9px 20px rgba(72, 49, 28, 0.12);
}

.upload-arrow {
  transform: translateY(-1px);
  font-size: 25px;
  font-weight: 300;
}

.upload-paper {
  font-size: 22px;
  line-height: 1;
}

.upload-copy {
  min-width: 0;
}

.upload-copy strong,
.upload-copy span,
.upload-copy small {
  display: block;
}

.upload-copy strong {
  margin-bottom: 4px;
  color: #342a20;
  font-size: 13px;
}

.upload-copy span {
  color: #7c6e60;
  font-size: 11px;
}

.upload-copy small {
  margin-top: 5px;
  color: #a18e7a;
  font-size: 9px;
  line-height: 1.45;
}

.upload-file-state {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(34, 29, 24, 0.055);
  padding: 9px 11px;
  color: #7f7265;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-zone-document .upload-file-state {
  grid-column: auto;
  max-width: 220px;
  background: #2c2823;
  color: #f2dcc0;
  text-align: center;
}

.upload-zone.has-file .upload-file-state {
  background: #2c2823;
  color: #f2dcc0;
}

.upload-submit {
  min-height: 44px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.upload-submit:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: saturate(0.45);
}

.document-upload-form.custom-document-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  align-items: stretch;
  margin-bottom: 22px;
  border: 1px solid #e2d7c8;
  border-radius: 19px;
  background:
    linear-gradient(140deg, rgba(191, 145, 88, 0.055), transparent 45%),
    #faf8f4;
  padding: 18px;
}

.document-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.document-submit-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.secure-upload-note {
  display: flex;
  max-width: 540px;
  gap: 8px;
  align-items: flex-start;
  color: #7b6d5e;
}

.secure-upload-note > span {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9f2e9;
  color: #357043;
  font-size: 10px;
  font-weight: 800;
}

.secure-upload-note small {
  font-size: 10px;
  line-height: 1.55;
}

.profile-upload-block {
  width: 100%;
  align-items: start;
}

.profile-upload-block .profile-avatar.large {
  box-shadow:
    0 0 0 5px #fff,
    0 0 0 6px #e6d6c1,
    0 15px 34px rgba(50, 37, 25, 0.12);
}

@media (max-width: 900px) {
  .portal-sidebar {
    min-height: 0;
  }

  .upload-zone-document {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .upload-zone-document .upload-file-state {
    grid-column: 1 / -1;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .document-fields {
    grid-template-columns: 1fr;
  }

  .document-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .document-submit-row .btn {
    width: 100%;
  }

  .upload-zone-profile,
  .upload-zone-document {
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 14px;
  }

  .upload-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
}


/* =========================================================
   v2.11 — AUTO PROFILE UPLOAD + DOCUMENT CONFIRMATION
   ========================================================= */

.profile-auto-note {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  color: #756859;
}

.profile-auto-note > span {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eee3d4;
  color: #80582f;
  font-size: 10px;
  font-weight: 800;
}

.profile-auto-note small {
  font-size: 10px;
  line-height: 1.5;
}

.upload-zone.is-uploading {
  pointer-events: none;
  border-style: solid;
  border-color: #b57b3f;
}

.upload-zone.upload-success {
  border-style: solid;
  border-color: #7f9d79;
}

.upload-spinner {
  width: 18px !important;
  height: 18px !important;
  border: 2px solid rgba(128, 88, 47, 0.20) !important;
  border-top-color: #80582f !important;
  background: transparent !important;
  animation: eqSpin .75s linear infinite;
}

@keyframes eqSpin {
  to { transform: rotate(360deg); }
}

body.modal-open {
  overflow: hidden;
}

.eq-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 24px;
}

.eq-modal.open {
  display: grid;
}

.eq-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 15, 13, 0.72);
  backdrop-filter: blur(5px);
}

.eq-modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border: 1px solid rgba(195, 151, 96, 0.38);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(197, 146, 87, 0.10), transparent 40%),
    #fffdf9;
  padding: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.eq-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #e4dbcf;
  border-radius: 50%;
  background: #fff;
  color: #6e6255;
  font-size: 22px;
  cursor: pointer;
}

.eq-modal-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid #d9e8d5;
  border-radius: 20px;
  background: #eef7eb;
  color: #427042;
  font-size: 27px;
  font-weight: 800;
}

.eq-modal-card h2 {
  margin: 7px 0 8px;
  font: 600 32px 'Playfair Display', serif;
  letter-spacing: -0.7px;
}

.eq-modal-card > p {
  margin: 0 0 19px;
  color: #75695d;
  font-size: 12px;
  line-height: 1.7;
}

.eq-modal-document {
  display: grid;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #e9e0d5;
  border-radius: 15px;
  background: #faf7f2;
}

.eq-modal-document > div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 13px;
  border-bottom: 1px solid #e9e0d5;
}

.eq-modal-document > div:last-child {
  border-bottom: 0;
}

.eq-modal-document span {
  color: #968675;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.eq-modal-document strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #3d332a;
  font-size: 11px;
}

.eq-modal-note {
  margin-bottom: 20px;
  border-left: 3px solid #b37a3f;
  border-radius: 0 10px 10px 0;
  background: #f7efe4;
  padding: 11px 13px;
}

.eq-modal-note strong,
.eq-modal-note span {
  display: block;
}

.eq-modal-note strong {
  margin-bottom: 3px;
  color: #63431f;
  font-size: 11px;
}

.eq-modal-note span {
  color: #81705d;
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .eq-modal {
    padding: 14px;
  }

  .eq-modal-card {
    border-radius: 19px;
    padding: 23px 19px 19px;
  }

  .eq-modal-card h2 {
    font-size: 27px;
  }

  .eq-modal-document > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}


/* =========================================================
   v2.13 — DOCUMENT RESULT MODAL STATES
   ========================================================= */

.eq-modal.is-existing .eq-modal-icon {
  border-color: #ead7b8;
  background: #fbf1df;
  color: #8a5d25;
}

.eq-modal.is-existing .eq-modal-note {
  border-left-color: #9d6c39;
  background: #f8f1e7;
}

.eq-modal.is-existing .eq-modal-document strong:last-child {
  color: #80582f;
}

/* =========================================================
   v2.14 — AGENT EMAIL VERIFICATION & PASSWORD RECOVERY
   ========================================================= */

.terms-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 11px !important;
  border: 1px solid #e1d7c9;
  border-radius: 13px;
  background: #faf7f1;
  padding: 13px 14px;
  color: #665a4d !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.6;
}

.terms-check input[type="checkbox"] {
  width: 18px !important;
  min-width: 18px;
  height: 18px !important;
  min-height: 18px !important;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #a8753f;
}

.terms-check .text-link {
  font-weight: 700;
}

.auth-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-inline-actions .text-link {
  font-size: 11px;
  font-weight: 700;
}

.auth-resend-box {
  margin-top: 18px;
  border: 1px solid #dfd4c5;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(189, 139, 80, .08), transparent 60%), #faf7f1;
  padding: 15px;
}

.auth-resend-box[hidden] {
  display: none !important;
}

.auth-resend-box strong {
  display: block;
  margin-bottom: 3px;
  color: #352b22;
  font-size: 12px;
}

.auth-resend-box p {
  margin: 0 0 11px;
  color: #7a6d60;
  font-size: 11px;
  line-height: 1.55;
}

.alert-success {
  border: 1px solid #cbdccb;
  background: #eef6ee;
  color: #32603a;
}

.alert-error {
  border: 1px solid #ead0ca;
  background: #fbefec;
  color: #8a4036;
}

.auth-security-box > p {
  color: #786d62;
  font-size: 12px;
  line-height: 1.72;
}

.security-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 24px 0 17px;
  border: 1px solid rgba(160, 110, 57, .28);
  border-radius: 16px;
  background: linear-gradient(145deg, #ead6b9, #c4935a);
  color: #2a221b;
  box-shadow: 0 12px 30px rgba(65, 44, 26, .12);
  font-size: 21px;
  font-weight: 700;
}

.security-state .security-icon {
  display: none;
}

.security-state.is-success .security-icon,
.security-state.is-error .security-icon {
  display: grid;
}

.security-spinner {
  width: 46px;
  height: 46px;
  margin: 24px 0 17px;
  border: 3px solid #eadfce;
  border-top-color: #a8753f;
  border-radius: 50%;
  animation: eq-security-spin .75s linear infinite;
}

.security-state.is-success .security-spinner,
.security-state.is-error .security-spinner {
  display: none;
}

.security-state.is-error .security-icon {
  background: #f4dfd9;
  color: #8a4036;
}

.security-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.auth-back-link {
  margin-top: 20px;
}

@keyframes eq-security-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .security-spinner { animation: none; }
}


/* =========================================================
   v2.15 — AI SMART PROPERTY SEARCH
   ========================================================= */
.search-action-stack {
  display: grid;
  gap: 8px;
  align-self: stretch;
}

.ai-search-button {
  border: 1px solid rgba(191,145,88,.48);
  background: #27231f;
  color: #f5dfc3;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

.ai-search-button:hover {
  border-color: #c79a63;
  background: #332c25;
  color: #fff3e3;
}

.ai-search-button span { margin-right: 5px; }

.smart-search-callout {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
  margin: -22px 0 22px;
  padding: 16px 18px;
  border: 1px solid #dac9b3;
  border-radius: 18px;
  background: linear-gradient(120deg,#fffaf2,#f3e8d8);
  box-shadow: 0 14px 34px rgba(62,45,29,.07);
}

.ai-orbit-mini {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #28231e;
  color: #e3ba85;
  font-size: 18px;
}

.smart-search-callout strong,
.smart-search-callout span { display: block; }
.smart-search-callout strong { color:#332a22; font-size:13px; margin-bottom:3px; }
.smart-search-callout span { color:#776a5d; font-size:11px; line-height:1.5; }

body.ai-modal-open { overflow: hidden; }

.ai-search-modal[hidden] { display: none !important; }
.ai-search-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.ai-search-backdrop {
  position:absolute;
  inset:0;
  background: rgba(16,14,12,.76);
  backdrop-filter: blur(7px);
}
.ai-search-dialog {
  position:relative;
  z-index:1;
  width:min(760px,100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow:auto;
  border:1px solid rgba(201,160,108,.38);
  border-radius:28px;
  background:
    radial-gradient(circle at 95% 0%,rgba(194,145,87,.18),transparent 31%),
    #fbf7f0;
  padding:34px;
  box-shadow:0 35px 90px rgba(0,0,0,.38);
}
.ai-search-close {
  position:absolute;
  right:18px;
  top:18px;
  width:40px;
  height:40px;
  border:1px solid #ddcfbd;
  border-radius:50%;
  background:#fffaf3;
  color:#493a2b;
  cursor:pointer;
  font-size:24px;
}
.ai-orbit-mark {
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  margin-bottom:18px;
  border:1px solid #c99a62;
  border-radius:18px 18px 5px 18px;
  background:#25211d;
  color:#e5bb87;
  box-shadow:8px 8px 0 #e3c197;
  font-size:21px;
}
.ai-search-dialog h2 {
  max-width:580px;
  margin:8px 0 8px;
  color:#2c251f;
  font:600 clamp(27px,4vw,40px)/1.08 'Playfair Display',serif;
}
.ai-search-intro { max-width:650px; color:#75695d; font-size:12px; line-height:1.7; }
.ai-conversation {
  max-height:310px;
  overflow-y:auto;
  display:grid;
  gap:10px;
  margin:22px 0 14px;
  padding:16px;
  border:1px solid #e6d9ca;
  border-radius:18px;
  background:#f5eee5;
}
.ai-bubble { max-width:86%; padding:12px 14px; border-radius:15px; font-size:12px; line-height:1.55; }
.ai-bubble p { margin:2px 0 0; }
.ai-bubble strong { font-size:10px; letter-spacing:.06em; text-transform:uppercase; }
.ai-bubble-assistant { justify-self:start; background:#fff; color:#514438; border:1px solid #e2d4c3; border-bottom-left-radius:5px; }
.ai-bubble-user { justify-self:end; background:#29241f; color:#f7e9d7; border-bottom-right-radius:5px; }
.ai-requirement-chips { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0 14px; }
.ai-requirement-chips span {
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:6px 10px;
  border:1px solid #d9c5aa;
  border-radius:999px;
  background:#fffaf3;
  color:#624b33;
  font-size:10px;
  font-weight:700;
}
.ai-prompt-form textarea {
  width:100%;
  min-height:92px;
  resize:vertical;
  border:1px solid #d8c7b2;
  border-radius:16px;
  background:#fff;
  padding:14px 15px;
  color:#322920;
  font:500 13px/1.55 'DM Sans',sans-serif;
  outline:none;
}
.ai-prompt-form textarea:focus { border-color:#ad7941; box-shadow:0 0 0 3px rgba(173,121,65,.11); }
.ai-prompt-actions { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:10px; }
.ai-prompt-actions > span { color:#948476; font-size:10px; }

.ai-results-hero {
  padding:70px 0 38px;
  background:
    radial-gradient(circle at 82% 20%,rgba(196,147,90,.18),transparent 25%),
    #211e1a;
  color:#fff;
}
.ai-results-hero-inner { display:flex; justify-content:space-between; align-items:end; gap:28px; }
.ai-results-hero h1 { max-width:760px; margin:10px 0 13px; font:600 clamp(34px,5vw,62px)/1.03 'Playfair Display',serif; }
.ai-original-prompt { max-width:780px; margin:0; color:#d5c3ae; font:500 14px/1.65 'DM Sans',sans-serif; }
.ai-results-section { padding-top:28px; }
.ai-search-summary-card {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:22px;
  margin-bottom:18px;
  padding:16px 18px;
  border:1px solid #dfd1c1;
  border-radius:18px;
  background:#faf6ef;
}
.ai-summary-label { display:block; margin-bottom:6px; color:#90785e; font-size:9px; font-weight:800; letter-spacing:.12em; }
.ai-result-chips { margin:0; }
.ai-search-summary-card > strong { white-space:nowrap; color:#483725; font-size:12px; }
.ai-search-notice {
  margin:0 0 20px;
  padding:14px 16px;
  border:1px solid #e1cdaF;
  border-radius:14px;
  background:#fff8ec;
  color:#6e563b;
  font-size:11px;
  line-height:1.6;
}
.ai-search-notice strong { color:#493723; }
.ai-card-match {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:13px;
  padding-top:10px;
  border-top:1px solid rgba(224,192,151,.22);
  color:#cbb89f;
  font-size:9px;
}
.ai-match-score { white-space:nowrap; text-transform:uppercase; letter-spacing:.04em; }
.ai-match-score b { color:#e5bd89; }
.ai-match-reason { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:right; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }

@media (max-width: 820px) {
  .smart-search-callout { grid-template-columns:auto minmax(0,1fr); }
  .smart-search-callout .btn { grid-column:1/-1; width:100%; }
  .ai-results-hero-inner { align-items:flex-start; flex-direction:column; }
  .ai-search-summary-card { align-items:flex-start; flex-direction:column; }
  .ai-search-summary-card > strong { white-space:normal; }
}
@media (max-width: 560px) {
  .ai-search-modal { padding:10px; }
  .ai-search-dialog { max-height:calc(100vh - 20px); border-radius:20px; padding:24px 17px 18px; }
  .ai-search-close { right:12px; top:12px; }
  .ai-prompt-actions { align-items:stretch; flex-direction:column; }
  .ai-prompt-actions .btn { width:100%; }
  .ai-bubble { max-width:94%; }
  .ai-results-hero { padding-top:48px; }
}


/* =========================================================
   v2.16 — ESTATEQUARRY SMART AI RIGHT-SIDE MODULE
   ========================================================= */

body.eq-ai-open {
  overflow: hidden;
}

.eq-ai-launcher {
  position: fixed;
  right: 0;
  top: 43%;
  z-index: 9200;
  width: 252px;
  min-height: 86px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(206, 160, 102, 0.42);
  border-right: 0;
  border-radius: 22px 0 0 22px;
  background:
    radial-gradient(circle at 14% 28%, rgba(208, 161, 100, 0.18), transparent 25%),
    linear-gradient(145deg, #24201c, #151310 72%);
  padding: 13px 11px 13px 14px;
  color: #fff;
  box-shadow: -18px 20px 50px rgba(18, 14, 10, 0.22);
  cursor: pointer;
  text-align: left;
  transform: translateX(172px);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.eq-ai-launcher:hover,
.eq-ai-launcher:focus-visible {
  transform: translateX(0);
  border-color: rgba(224, 183, 127, 0.7);
  box-shadow: -22px 24px 66px rgba(18, 14, 10, 0.3);
  outline: none;
}

.eq-ai-launcher-core {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.eq-ai-core-ring,
.eq-ai-brand-orbit {
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(226, 184, 128, 0.66);
  border-radius: 50%;
  animation: eqAiOrbit 5s linear infinite;
}

.eq-ai-core-ring::before,
.eq-ai-brand-orbit::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e4b77d;
  box-shadow: 0 0 15px rgba(228, 183, 125, 0.62);
}

.eq-ai-core-star {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #d8ab72, #9d6b38);
  color: #1b1713;
  font-size: 15px;
  box-shadow: 0 0 0 5px rgba(207, 157, 94, 0.08);
}

.eq-ai-launcher-copy {
  min-width: 0;
  display: block;
}

.eq-ai-launcher-copy small,
.eq-ai-launcher-copy strong,
.eq-ai-launcher-copy span {
  display: block;
}

.eq-ai-launcher-copy small {
  margin-bottom: 3px;
  color: #bca487;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.eq-ai-launcher-copy strong {
  color: #f8ead8;
  font: 600 15px/1.15 'Playfair Display', serif;
}

.eq-ai-launcher-copy span {
  margin-top: 4px;
  color: #9f9183;
  font-size: 8px;
}

.eq-ai-launcher-arrow {
  color: #d9ad75;
  font-size: 18px;
  transition: transform 0.25s ease;
}

.eq-ai-launcher:hover .eq-ai-launcher-arrow {
  transform: translateX(-3px);
}

.eq-ai-drawer[hidden] {
  display: none !important;
}

.eq-ai-drawer {
  position: fixed;
  inset: 0;
  z-index: 10020;
}

.eq-ai-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 11, 9, 0.28);
  opacity: 0;
  backdrop-filter: blur(0);
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}

.eq-ai-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(620px, 94vw);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-left: 1px solid rgba(211, 166, 109, 0.38);
  background:
    radial-gradient(circle at 93% 6%, rgba(193, 142, 82, 0.16), transparent 24%),
    linear-gradient(180deg, #211e1a 0 158px, #f4eee5 158px 100%);
  box-shadow: -34px 0 90px rgba(18, 14, 10, 0.28);
  transform: translateX(105%);
  transition: transform 0.36s cubic-bezier(.2,.8,.2,1);
}

.eq-ai-drawer.is-open .eq-ai-drawer-backdrop {
  opacity: 1;
  backdrop-filter: blur(3px);
}

.eq-ai-drawer.is-open .eq-ai-panel {
  transform: translateX(0);
}

.eq-ai-panel-grid {
  position: absolute;
  inset: 0 0 auto;
  height: 158px;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(224, 188, 144, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 188, 144, 0.16) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 94%);
}

.eq-ai-panel-head {
  position: relative;
  z-index: 2;
  min-height: 92px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 13px;
  padding: 19px 22px 13px;
  color: #fff;
}

.eq-ai-brandmark {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px 14px 4px 14px;
  background: rgba(255, 255, 255, 0.035);
  color: #e1b47c;
  font-size: 15px;
}

.eq-ai-brand-orbit {
  inset: 4px;
}

.eq-ai-head-copy small,
.eq-ai-head-copy strong {
  display: block;
}

.eq-ai-head-copy small {
  margin-bottom: 4px;
  color: #b9a58d;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eq-ai-head-copy strong {
  color: #fff3e2;
  font: 600 20px/1.15 'Playfair Display', serif;
}

.eq-ai-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(222, 187, 144, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: #d9c4aa;
  font: 300 24px/1 'DM Sans', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.eq-ai-close:hover {
  border-color: rgba(223, 180, 126, 0.62);
  background: rgba(209, 160, 100, 0.12);
  color: #fff;
}

.eq-ai-statusbar {
  position: relative;
  z-index: 2;
  height: 42px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 22px 12px;
  border-top: 1px solid rgba(229, 196, 154, 0.14);
  border-bottom: 1px solid rgba(229, 196, 154, 0.14);
  color: #b8aa9b;
  font-size: 9px;
}

.eq-ai-statusbar small {
  color: #dfb681;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.eq-ai-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d7ad78;
  box-shadow: 0 0 0 4px rgba(215, 173, 120, 0.09), 0 0 14px rgba(215, 173, 120, 0.42);
}

.eq-ai-drawer[data-state="analysing"] .eq-ai-live-dot {
  animation: eqAiPulse 0.8s ease-in-out infinite alternate;
}

.eq-ai-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 22px 28px;
  scrollbar-width: thin;
  scrollbar-color: #b7966e transparent;
}

.eq-ai-intro-panel {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.eq-ai-intro-panel h2 {
  max-width: 410px;
  margin: 5px 0 7px;
  color: #30281f;
  font: 600 clamp(26px, 3vw, 38px)/1.03 'Playfair Display', serif;
}

.eq-ai-intro-panel p {
  max-width: 430px;
  margin: 0;
  color: #786a5c;
  font-size: 11px;
  line-height: 1.65;
}

.eq-ai-intro-visual {
  position: relative;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8c4aa;
  border-radius: 24px 24px 7px 24px;
  background:
    linear-gradient(rgba(162, 122, 75, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(162, 122, 75, 0.08) 1px, transparent 1px),
    #ede3d6;
  background-size: 15px 15px;
}

.eq-ai-intro-visual b {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #27221d;
  color: #e7bc84;
  font: 800 12px/1 'DM Sans', sans-serif;
  letter-spacing: 0.08em;
  box-shadow: 0 0 0 7px rgba(41, 35, 29, 0.06);
}

.eq-ai-intro-visual i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a97844;
}

.eq-ai-intro-visual i:nth-of-type(1) { left: 12px; top: 21px; }
.eq-ai-intro-visual i:nth-of-type(2) { right: 13px; top: 15px; }
.eq-ai-intro-visual i:nth-of-type(3) { left: 17px; bottom: 13px; }
.eq-ai-intro-visual i:nth-of-type(4) { right: 14px; bottom: 20px; }

.eq-ai-scan-line {
  position: absolute;
  z-index: 3;
  left: 7px;
  right: 7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #a77845, transparent);
  animation: eqAiScan 2.8s ease-in-out infinite;
}

.eq-ai-command-card,
.eq-ai-analysis-card,
.eq-ai-next-card,
.eq-ai-ready-card {
  border: 1px solid #ddd0c0;
  border-radius: 19px;
  background: rgba(255, 252, 247, 0.82);
  box-shadow: 0 10px 30px rgba(64, 46, 29, 0.045);
}

.eq-ai-command-card,
.eq-ai-analysis-card {
  padding: 17px;
}

.eq-ai-analysis-card {
  margin-top: 14px;
}

.eq-ai-section-label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 13px;
}

.eq-ai-section-label > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  border: 1px solid #d9c4a9;
  border-radius: 8px 8px 3px 8px;
  color: #8d6339;
  font-size: 8px;
  font-weight: 800;
}

.eq-ai-section-label small,
.eq-ai-section-label strong {
  display: block;
}

.eq-ai-section-label small {
  color: #9b8874;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.eq-ai-section-label strong {
  margin-top: 2px;
  color: #3d3126;
  font-size: 11px;
}

.eq-ai-prompt-form textarea {
  width: 100%;
  min-height: 142px;
  resize: vertical;
  border: 1px solid #d3c2ad;
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(190, 150, 99, 0.035), transparent 45%),
    #fff;
  padding: 15px 16px;
  color: #352c23;
  font: 500 13px/1.65 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.eq-ai-prompt-form textarea:focus {
  border-color: #a87540;
  box-shadow: 0 0 0 3px rgba(168, 117, 64, 0.09);
}

.eq-ai-input-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.eq-ai-input-foot > span {
  color: #9a8b7c;
  font-size: 8px;
  line-height: 1.45;
}

.eq-ai-primary {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #2d261f;
  border-radius: 11px 11px 4px 11px;
  background: linear-gradient(145deg, #29231e, #171411);
  padding: 10px 14px;
  color: #f1dcc0;
  font: 700 9px/1 'DM Sans', sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 5px 5px 0 #d7b182;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.eq-ai-primary:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 #d7b182;
}

.eq-ai-primary:disabled {
  cursor: wait;
  opacity: 0.58;
}

.eq-ai-btn-icon {
  color: #dfb47e;
}

.eq-ai-empty-analysis {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px dashed #d8c7b2;
  border-radius: 13px;
  padding: 15px;
  background: #f8f2ea;
}

.eq-ai-empty-analysis p {
  margin: 0;
  color: #8c7a69;
  font-size: 10px;
  line-height: 1.55;
}

.eq-ai-data-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex: 0 0 37px;
  border-radius: 50%;
  background: #2b261f;
  color: #dcb17a;
  font-size: 18px;
}

.eq-ai-requirement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.eq-ai-requirement-item {
  position: relative;
  min-width: 0;
  border: 1px solid #e0d3c3;
  border-radius: 12px;
  background: #faf5ee;
  padding: 10px 31px 10px 11px;
}

.eq-ai-requirement-item span,
.eq-ai-requirement-item strong {
  display: block;
  min-width: 0;
}

.eq-ai-requirement-item span {
  margin-bottom: 3px;
  color: #99836c;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.eq-ai-requirement-item strong {
  overflow: hidden;
  color: #493a2c;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.eq-ai-requirement-item i {
  position: absolute;
  right: 9px;
  top: 50%;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8efe5;
  color: #4c714d;
  font: 800 8px/1 'DM Sans', sans-serif;
  transform: translateY(-50%);
}

.eq-ai-next-card {
  margin-top: 14px;
  padding: 15px 16px;
  border-color: #cfae87;
  background:
    linear-gradient(100deg, rgba(202, 158, 105, 0.11), transparent 52%),
    #fff9f0;
}

.eq-ai-next-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eq-ai-next-label span {
  color: #8a6035;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.eq-ai-next-label i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, #d4b185, transparent);
}

.eq-ai-next-card p {
  margin: 8px 0 0;
  color: #4e3e2e;
  font: 600 15px/1.45 'Playfair Display', serif;
}

.eq-ai-ready-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 15px;
  border-color: #ced9c8;
  background: #f3f7f0;
}

.eq-ai-ready-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #304d34;
  color: #f0f5ec;
  font-weight: 800;
}

.eq-ai-ready-card small,
.eq-ai-ready-card strong,
.eq-ai-ready-card p {
  display: block;
}

.eq-ai-ready-card small {
  color: #6d856d;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.eq-ai-ready-card strong {
  margin-top: 2px;
  color: #344635;
  font-size: 11px;
}

.eq-ai-ready-card p {
  margin: 4px 0 0;
  color: #788378;
  font-size: 8px;
  line-height: 1.45;
}

.eq-ai-panel-footer {
  min-height: 43px;
  display: flex;
  align-items: center;
  border-top: 1px solid #ded2c3;
  background: #ebe2d7;
  padding: 10px 22px;
  color: #796959;
  font-size: 8px;
}

.eq-ai-panel-footer b {
  margin-right: 5px;
  color: #9d6e3d;
}

@keyframes eqAiOrbit {
  to { transform: rotate(360deg); }
}

@keyframes eqAiPulse {
  from { transform: scale(0.82); opacity: 0.55; }
  to { transform: scale(1.15); opacity: 1; }
}

@keyframes eqAiScan {
  0%, 100% { top: 13px; opacity: 0.25; }
  50% { top: 74px; opacity: 0.95; }
}

@media (prefers-reduced-motion: reduce) {
  .eq-ai-core-ring,
  .eq-ai-brand-orbit,
  .eq-ai-scan-line,
  .eq-ai-live-dot {
    animation: none !important;
  }
  .eq-ai-panel,
  .eq-ai-drawer-backdrop,
  .eq-ai-launcher {
    transition: none !important;
  }
}

@media (max-width: 760px) {
  .eq-ai-launcher {
    top: auto;
    right: 14px;
    bottom: 18px;
    width: auto;
    min-height: 58px;
    grid-template-columns: 40px minmax(0, 1fr);
    border-right: 1px solid rgba(206, 160, 102, 0.42);
    border-radius: 18px;
    padding: 9px 13px 9px 10px;
    transform: none;
  }

  .eq-ai-launcher-core {
    width: 38px;
    height: 38px;
  }

  .eq-ai-core-star {
    width: 27px;
    height: 27px;
  }

  .eq-ai-launcher-copy small,
  .eq-ai-launcher-copy span,
  .eq-ai-launcher-arrow {
    display: none;
  }

  .eq-ai-launcher-copy strong {
    font-size: 13px;
  }

  .eq-ai-panel {
    width: min(100%, 560px);
  }

  .eq-ai-intro-panel {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 14px;
  }

  .eq-ai-intro-visual {
    width: 68px;
    height: 68px;
    border-radius: 19px 19px 6px 19px;
  }

  .eq-ai-intro-panel h2 {
    font-size: 26px;
  }
}

@media (max-width: 520px) {
  .eq-ai-panel {
    width: 100%;
  }

  .eq-ai-panel-head {
    grid-template-columns: 42px minmax(0, 1fr) 38px;
    padding: 14px 14px 9px;
  }

  .eq-ai-brandmark {
    width: 40px;
    height: 40px;
  }

  .eq-ai-head-copy strong {
    font-size: 17px;
  }

  .eq-ai-statusbar {
    margin: 0 14px 10px;
  }

  .eq-ai-scroll {
    padding: 18px 14px 22px;
  }

  .eq-ai-intro-panel {
    grid-template-columns: 1fr;
  }

  .eq-ai-intro-visual {
    display: none;
  }

  .eq-ai-intro-panel h2 {
    font-size: 29px;
  }

  .eq-ai-command-card,
  .eq-ai-analysis-card {
    padding: 14px;
    border-radius: 16px;
  }

  .eq-ai-input-foot {
    grid-template-columns: 1fr;
  }

  .eq-ai-primary {
    width: 100%;
  }

  .eq-ai-requirement-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   v2.19 — SMART AI LAUNCHER AUTO-PEEK
   Mirrors the desktop hover movement without opening the drawer.
   ========================================================= */
.eq-ai-launcher.eq-ai-auto-peek {
  transform: translateX(0);
  border-color: rgba(224, 183, 127, 0.7);
  box-shadow: -22px 24px 66px rgba(18, 14, 10, 0.3);
}

.eq-ai-launcher.eq-ai-auto-peek .eq-ai-launcher-arrow {
  transform: translateX(-3px);
}

@media (max-width: 760px) {
  /* The mobile launcher is already fully visible, so do not force a slide. */
  .eq-ai-launcher.eq-ai-auto-peek {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eq-ai-launcher.eq-ai-auto-peek {
    transform: translateX(0);
  }
}


/* =========================================================
   v2.20 — SMART AI CLARIFICATION + STRICT LOCATION UX
   ========================================================= */
.eq-ai-next-form {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.eq-ai-next-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(170, 122, 68, .34);
  background: rgba(255,255,255,.96);
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  font: 600 15px 'DM Sans';
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.eq-ai-next-form input:focus {
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(170, 122, 68, .12);
}

.eq-ai-next-submit {
  white-space: nowrap;
  min-height: 50px;
}

.eq-ai-ready-card {
  align-items: center;
}

.eq-ai-ready-copy {
  min-width: 0;
  flex: 1 1 260px;
}

.eq-ai-find-button {
  margin-left: auto;
  flex: 0 0 auto;
  min-height: 50px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .eq-ai-next-form {
    grid-template-columns: 1fr;
  }

  .eq-ai-next-submit,
  .eq-ai-find-button {
    width: 100%;
  }

  .eq-ai-ready-card {
    align-items: stretch;
    flex-direction: column;
  }

  .eq-ai-find-button {
    margin-left: 0;
  }
}
