/* ── Design tokens ──────────────────────────────────────────────────── */
/* Palette (June 2026): Rich Basil primary, Solar Amber accent,
   Sprout Green supporting tint, Warm Ivory page background,
   Deep Forest Slate dark neutral. Cards stay white on the ivory page. */
:root {
    --brand: #1E4620;            /* Rich Basil */
    --brand-hover: #16351A;
    --brand-light: #EAF2EB;      /* Sprout Green */
    --cta-accent: #F2994A;       /* Solar Amber */
    --cta-accent-hover: #E0832F;
    --text-dark: #1A241B;        /* Deep Forest Slate */
    --text-body: #4C5A4E;
    --bg-light: #ffffff;         /* card / input surfaces */
    --bg-page: #FCFAF2;          /* Warm Ivory */
    --bg-offwhite: #EAF2EB;      /* Sprout Green tint for filled surfaces */
    --border: #DEE5DC;
    --success: #1E4620;          /* success reads in the brand green */
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;
}

/* ── Reset + base ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Navigation ─────────────────────────────────────────────────────── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    background-color: var(--bg-page);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--brand); }

/* ── Landing: Hero (clean, address-first) ───────────────────────────── */
.hero-simple {
    padding: 5.5rem 0 6rem;
    text-align: center;
}

.hero-simple h1 {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    max-width: 760px;
    margin: 0 auto 1rem;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-body);
    font-weight: 500;
    max-width: 560px;
    margin: 0 auto 2.25rem;
}

.hero-search {
    max-width: 580px;
    margin: 0 auto;
    text-align: left;
}

.hero-search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8C968B;
    pointer-events: none;
}

/* Selector carries the [type] so it outranks the later global
   input[type="text"] rule */
.hero-search input[type="text"] {
    width: 100%;
    padding: 1.1rem 1.25rem 1.1rem 3rem;
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--text-dark);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 30px -10px rgba(17, 24, 39, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hero-search input[type="text"]:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(30, 70, 32, 0.12);
}

.hero-subtext {
    display: block;
    margin-top: 1rem;
    color: #8C968B;
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-manual-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

.hero-manual-link:hover { text-decoration: underline; }

/* ── Landing: Steps ─────────────────────────────────────────────────── */
.steps-section {
    background-color: var(--bg-offwhite);
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: center;
}

.step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-number {
    width: 64px;
    height: 64px;
    background-color: var(--brand);
    color: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(30, 70, 32, 0.18);
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.step-card p {
    font-size: 1rem;
    color: var(--text-body);
    font-weight: 500;
}

/* ── Landing: Feature split ─────────────────────────────────────────── */
.feature-split {
    padding: 6rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-split-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.feature-split-content p {
    font-size: 1.15rem;
    color: var(--text-body);
    font-weight: 500;
    margin-bottom: 2rem;
}

.bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bullet-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.bullet-icon {
    color: var(--brand);
    font-size: 1.5rem;
}

.feature-visual {
    background-color: var(--bg-offwhite);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
}

.mock-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 350px;
    border: 1px solid var(--border);
}

.mock-line {
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.mock-line--short { width: 60%; }

.mock-line--brand {
    background: var(--brand);
    width: 40%;
    height: 20px;
    margin-bottom: 1.5rem;
}

.mock-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
}

.mock-footer-label { font-weight: 700; }
.mock-footer-value { font-weight: 800; color: var(--success); }

/* ── App: Page layout (view states: form → pre-prompt → estimate) ───── */
.app-main {
    min-height: calc(100vh - 280px);
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

.view { animation: fadeIn 0.35s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* View: form — centered, address-first */
.form-hero {
    text-align: center;
    max-width: 680px;
    margin: 2rem auto 2rem;
}

.form-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1px;
    margin-bottom: 0.75rem;
}

.form-hero p {
    font-size: 1.1rem;
    color: var(--text-body);
    font-weight: 500;
}

#viewForm .form-card {
    max-width: 640px;
    margin: 0 auto;
}

/* Details stay collapsed until an address is confirmed. overflow:hidden does
   the clipping for the max-height reveal; the tiny negative-margin/padding
   pair keeps input focus rings from being shaved off at the edges. */
.form-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 4px;
    margin: 0 -4px;
    transition: max-height 0.45s ease, opacity 0.3s ease;
}

.form-details.open {
    max-height: 1100px;
    opacity: 1;
}

/* Doubled class outranks the later .input-row 1fr-1fr default */
.input-row.details-meta-row {
    grid-template-columns: 0.7fr 1.3fr 1fr;
    margin-top: 0.5rem;
}

/* View: pre-prompt — full-screen focused step */
.view-preprompt {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 55vh;
}

.pre-prompt-card {
    width: 100%;
    max-width: 460px;
    text-align: center;
    padding: 2rem 1rem;
}

.pre-prompt-row {
    max-width: 340px;
    margin: 0 auto;
}

/* View: estimate — result panel + map grid */
.estimate-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
    align-items: start;
    padding-top: 1rem;
}

.estimate-panel { padding: 1.75rem 2rem; }

/* Subject property recap on the result */
.subject-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg-offwhite);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.subject-summary-main { min-width: 0; }

.subject-address {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
}

.subject-meta {
    display: block;
    font-size: 0.78rem;
    color: var(--text-body);
    font-weight: 500;
    margin-top: 0.15rem;
}

.subject-edit-btn {
    flex-shrink: 0;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.95rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand);
    cursor: pointer;
    transition: all 0.15s;
}

.subject-edit-btn:hover {
    border-color: var(--brand);
    background: #F2F7F2;
}

#mapPanel {
    display: none;
    height: 500px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    position: sticky;
    top: 2rem;
    align-self: start;
}

#mapPanel #mapContainer {
    height: 100%;
}

.price-hero {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.price-hero-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.price-hero h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--success);
    line-height: 1;
}

.price-range-subtext {
    font-size: 0.85rem;
    color: var(--text-body);
    margin-top: 0.4rem;
}

/* ── App: Form card ─────────────────────────────────────────────────── */
/* No overflow:hidden here — the autocomplete dropdown must be able to
   extend past the card while the details section is still collapsed */
.form-card {
    background-color: var(--bg-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    padding: 1.75rem 2rem 2rem;
}

/* ── App: Inputs ────────────────────────────────────────────────────── */
.input-group { margin-bottom: 1.25rem; }

input[type="text"].input-lg {
    padding: 0.95rem 1.1rem;
    font-size: 1.05rem;
    border-width: 2px;
    border-radius: 10px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 0.4rem;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: all 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(30, 70, 32, 0.1);
}

.field-hint {
    font-size: 0.75rem;
    color: #8C968B;
    margin-top: 0.3rem;
    font-weight: 500;
}

.field-error {
    font-size: 0.78rem;
    color: #DC2626;
    margin-top: 0.25rem;
}

/* ── App: Address autocomplete dropdown ─────────────────────────────── */
.autocomplete-wrap {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.autocomplete-item {
    padding: 0.55rem 0.8rem;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: #EAF2EB;
}

.manual-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}
.manual-link:hover { text-decoration: underline; }

.province-row {
    margin-bottom: 0.75rem;
}

input[readonly] {
    background-color: var(--bg-offwhite);
    cursor: default;
    color: var(--text-body);
}

input.input-invalid,
select.input-invalid {
    border-color: #DC2626;
}
input.input-invalid:focus,
select.input-invalid:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.checkbox-group-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 0.75rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
    cursor: pointer;
}

.checkbox-item label {
    margin-bottom: 0;
    font-size: 0.9rem;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    background-color: var(--brand);
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-pill);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.submit-btn:hover { background-color: var(--brand-hover); }

.reset-btn {
    width: 100%;
    background-color: #ffffff;
    color: var(--brand);
    border: 2px solid var(--brand);
    padding: 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.reset-btn:hover { background-color: var(--brand-light); }

/* ── Feedback panel ─────────────────────────────────────────────────── */
.feedback-panel {
    margin: 1.25rem 0 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.feedback-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-body);
    margin: 0 0 0.65rem;
}
.feedback-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.feedback-dollar {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-body);
}
.feedback-input {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}
.feedback-input:focus { border-color: var(--brand); }
.feedback-email {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}
.feedback-btn {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}
.feedback-btn:hover { opacity: 0.85; }
.feedback-thanks {
    font-size: 0.85rem;
    color: var(--success);
    margin: 0.5rem 0 0;
    font-weight: 500;
}

/* Estimate-failure overlay — full-screen blurred backdrop + centered card */
.fail-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(26, 36, 27, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.fail-overlay.visible { opacity: 1; }

.fail-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-light, #fff);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 24px 60px rgba(26, 36, 27, 0.28);
    padding: 2.25rem 2rem 1.75rem;
    text-align: center;
    transform: translateY(8px);
    transition: transform 0.25s ease;
}
.fail-overlay.visible .fail-card { transform: translateY(0); }

.fail-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-offwhite, #EAF2EB);
    color: var(--brand, #1E4620);
}
.fail-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-dark, #1A241B);
    margin: 0 0 0.6rem;
    line-height: 1.25;
}
.fail-body {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.55;
    margin: 0 0 1.4rem;
}
.fail-capture { text-align: left; }
.fail-capture .field-error { text-align: center; }
.fail-retry {
    display: inline-block;
    margin-top: 1.4rem;
    background: none;
    border: none;
    padding: 0.35rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-body);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
}
.fail-retry:hover { color: var(--brand); }

/* ── App: Loader ────────────────────────────────────────────────────── */
.loader {
    display: none;
    padding: 2.5rem 0.5rem;
}

.loader-steps {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.loader-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.25s;
}

.loader-step.pending { color: #C8D1C7; }
.loader-step.active  { color: var(--text-dark); }
.loader-step.done    { color: var(--success); }

.step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2.5px solid #D8E0D6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 900;
    transition: border-color 0.25s, background 0.25s;
}

.active .step-dot {
    border-color: var(--brand);
    border-top-color: transparent;
    animation: spin 0.75s linear infinite;
}

.done .step-dot {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.done .step-dot::after { content: '✓'; }

.step-timer {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--brand);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 28px;
    text-align: right;
}

.loader-hint {
    margin-top: 1.25rem;
    font-size: 0.78rem;
    color: #8C968B;
    text-align: center;
    font-weight: 500;
}

.loader-narration {
    margin: 0.9rem 0 0;
    font-size: 0.82rem;
    color: var(--text-body);
    text-align: center;
    font-style: italic;
    min-height: 1.2em;          /* no layout jump between captions */
    opacity: 1;
    transition: opacity 0.25s ease;
}

/* ── App: Market snapshot (loader) ──────────────────────────────────── */
.market-snapshot {
    margin-top: 1.25rem;
    padding: 0.95rem 1.1rem;
    background: #F4F8F3;
    border: 1px solid #DCE7DB;
    border-radius: var(--radius-md);
    text-align: left;
}

/* Disclaimer pill so the market figures are never mistaken for the estimate */
.ms-eyebrow {
    display: inline-block;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-body);
    background: #E4EDE3;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}

.ms-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.7rem;
}

.ms-stats {
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.ms-stat { display: flex; flex-direction: column; }

/* Deliberately smaller/lighter than the estimate headline (which is large +
   brand-green) so these market averages read as context, not the answer */
.ms-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-body);
    font-variant-numeric: tabular-nums;
}

.ms-stat-label {
    font-size: 0.72rem;
    color: var(--text-body);
    font-weight: 500;
}

.ms-bars { margin-bottom: 0.6rem; }

.ms-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.ms-bar-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-body);
    min-width: 92px;
}

.ms-bar-track {
    flex: 1;
    height: 7px;
    background: #DCE7DB;
    border-radius: 4px;
    overflow: hidden;
}

.ms-bar-fill {
    height: 100%;
    background: var(--brand);
    border-radius: 4px;
}

.ms-bar-value {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
    min-width: 48px;
    text-align: right;
}

.ms-bar-caption {
    display: block;
    font-size: 0.68rem;
    color: #8C968B;
    margin-top: 0.15rem;
}

.ms-note {
    font-size: 0.76rem;
    color: var(--text-body);
    margin: 0 0 0.5rem;
}

.ms-src {
    font-size: 0.68rem;
    color: #8C968B;
    margin: 0;
}

.ms-src a {
    color: #8C968B;
    text-decoration: underline;
}

.ms-src a:hover { color: var(--brand); }

/* ── App: Pre-estimate question (full-screen interstitial) ──────────── */
.pre-prompt-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.6rem;
}

.pre-prompt-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin: 0 0 0.5rem;
}

.pre-prompt-sub {
    font-size: 0.95rem;
    color: var(--text-body);
    margin: 0 0 1.5rem;
}

.pre-prompt-skip {
    display: block;
    margin: 1.25rem auto 0;
    padding: 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-body);
    text-decoration: underline;
    cursor: pointer;
}

.pre-prompt-skip:hover { color: var(--brand); }

/* ── App: Result tabs ───────────────────────────────────────────────── */
.result-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    background: var(--bg-offwhite);
    padding: 0.25rem;
    border-radius: var(--radius-md);
}

.result-tab {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-body);
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-md) - 3px);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.result-tab.active {
    background: #fff;
    color: var(--brand);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
}

.planned-compare {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-body);
    background: #FDF3E7;
    border: 1px solid #F6CDA4;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    margin: 0 0 1.25rem;
}

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

/* ── App: Confidence meter ──────────────────────────────────────────── */
#confidenceMeter { margin-bottom: 1.5rem; }

.confidence-block {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid;
}

.confidence-high   { background: #EAF2EB; border-color: #AECDB1; }
.confidence-medium { background: #FDF3E7; border-color: #F6C293; }
.confidence-low    { background: #FBEDE6; border-color: #EBA984; }

.confidence-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.trend-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.trend-hot      { background: #fef2f2; color: #dc2626; }
.trend-balanced { background: #EAF2EB; color: #1E4620; }
.trend-soft     { background: #eff6ff; color: #1d4ed8; }
.trend-unknown  { background: var(--bg-offwhite); color: #6b7280; }

.confidence-dots { display: flex; gap: 4px; }

.cm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid;
    flex-shrink: 0;
}

.confidence-high   .cm-dot { border-color: #AECDB1; }
.confidence-medium .cm-dot { border-color: #F6C293; }
.confidence-low    .cm-dot { border-color: #EBA984; }

.confidence-high   .cm-dot.filled { background: #1E4620; border-color: #1E4620; }
.confidence-medium .cm-dot.filled { background: #F2994A; border-color: #F2994A; }
.confidence-low    .cm-dot.filled { background: #D9683A; border-color: #D9683A; }

.confidence-label {
    font-size: 0.8rem;
    font-weight: 700;
}

.confidence-high   .confidence-label { color: #1E4620; }
.confidence-medium .confidence-label { color: #A05E1C; }
.confidence-low    .confidence-label { color: #AC4517; }

.confidence-sub {
    font-size: 0.77rem;
    color: var(--text-body);
    margin: 0;
}

.confidence-reason {
    font-size: 0.77rem;
    color: var(--text-body);
    margin: 0.25rem 0 0;
    font-style: italic;
}

/* ── App: Comparable listings ───────────────────────────────────────── */
.comps-list {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.comps-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.5rem;
}

.comp-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.82rem;
    padding: 0.25rem 0;
}

.comp-address {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comp-source {
    font-size: 0.72rem;
    color: var(--text-body);
}

.comp-price {
    font-weight: 700;
    white-space: nowrap;
}

.mapboxgl-popup-content {
    font-family: inherit;
    border-radius: var(--radius-md);
    padding: 0.6rem 0.8rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.comp-popup {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.8rem;
}

.comp-popup strong {
    font-size: 0.9rem;
}

.comp-popup span {
    color: var(--text-body);
    font-size: 0.72rem;
}

/* ── App: Amenity grid ──────────────────────────────────────────────── */
.amenity-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.amenity-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.75rem;
}

.amenity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.amenity-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background: var(--bg-light);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all 0.18s;
    width: 100%;
}

.amenity-card:hover {
    border-color: #A9C3AB;
    background: #F2F7F2;
}

.amenity-card.active {
    border-color: var(--success);
    background: #EAF2EB;
}

.amenity-card-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #8C968B;
    transition: color 0.18s;
}

.amenity-card.active .amenity-card-icon { color: var(--success); }

.amenity-card-text {
    flex: 1;
    min-width: 0;
}

.amenity-card-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.amenity-card-range {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-body);
    margin-top: 0.1rem;
}

.amenity-card.active .amenity-card-range { color: var(--success); }

.amenity-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #C8D1C7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: transparent;
    flex-shrink: 0;
    transition: all 0.18s;
}

.amenity-card.active .amenity-check {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}


/* ── App: Amenity breakdown ─────────────────────────────────────────── */
.amenity-breakdown {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-offwhite);
}

.amenity-breakdown-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.5rem;
}

.amenity-breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0.2rem 0;
}

.amenity-breakdown-row span:last-child { color: var(--success); }

/* ── App: Map ───────────────────────────────────────────────────────── */
#mapContainer {
    height: 100%;
    border-radius: 0;
    border: none;
    margin-bottom: 0;
    overflow: hidden;
}

.mapboxgl-popup-content {
    border-radius: 8px !important;
    padding: 10px 12px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    min-width: 180px;
}

.mapboxgl-popup-close-button { font-size: 1rem; color: #8C968B; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
}

.footer-disclaimer {
    font-size: 0.78rem;
    color: var(--text-body);
    line-height: 1.6;
    max-width: 640px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: #8C968B;
}

.footer-links a {
    color: var(--text-body);
    text-decoration: none;
}

.footer-links a:hover { color: var(--brand); }

/* ── Legal page ──────────────────────────────────────────────────────── */
.legal-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.legal-wrapper h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.legal-wrapper .legal-updated {
    font-size: 0.82rem;
    color: #8C968B;
    margin-bottom: 3rem;
    display: block;
}

.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

.legal-section h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
}

.legal-section p {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.legal-section ul {
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.legal-section ul li {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 0.3rem;
}

/* ── Estimate result panel ──────────────────────────────────────────── */
#estimateResult .reset-btn { margin-top: 0.25rem; }

/* ── Media queries ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .nav-links { display: none; }

    /* Landing */
    .hero-simple    { padding: 3.5rem 0 4rem; }
    .hero-simple h1 { font-size: 2.25rem; }
    .steps-grid     { grid-template-columns: 1fr; gap: 2rem; }
    .feature-split  { grid-template-columns: 1fr; padding: 4rem 0; }

    /* App */
    .form-hero        { margin-top: 1rem; }
    .form-hero h1     { font-size: 2.1rem; }
    .form-card        { padding: 1.5rem 1.25rem 1.75rem; }
    .input-row.details-meta-row { grid-template-columns: 0.7fr 1.3fr; }
    .estimate-grid    { grid-template-columns: 1fr; gap: 2rem; padding-top: 0; }
    #mapPanel         { position: static; height: 380px; }
}
