/* Minimal flow styles — replace with your own design per domain */

:root {
    --ink: #111114;
    --muted: #71717a;
    --line: #e8e8eb;
    --row: #f4f4f5;
    --white: #ffffff;
    --r: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--white);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--ink);
    color: #fff;
    padding: 10px 16px;
    text-decoration: none;
}
.skip-link:focus { left: 0; }

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 15px 24px;
    display: flex;
    align-items: center;
}
.site-header__logo { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.logo-text { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }

.topbar {
    height: 3px;
    background: var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar__fill {
    height: 100%;
    width: 0%;
    background: var(--ink);
    border-radius: 0 2px 2px 0;
    transition: width 0.55s ease;
}

.page {
    flex: 1 0 auto;
    display: flex;
    justify-content: center;
    padding: clamp(40px, 7vh, 68px) 24px 56px;
}
.flow {
    width: 100%;
    max-width: 520px;
}

.step { display: none; }
.step.is-active { display: block; animation: fade 0.34s ease both; }
@keyframes fade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c81e27;
    background: #fdeaec;
    padding: 6px 12px;
    border-radius: 999px;
}
.title {
    margin-top: 18px;
    font-size: clamp(1.55rem, 4.2vw, 2.05rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.14;
    max-width: 19ch;
    outline: none;
}
.q-label {
    margin-top: 30px;
    margin-bottom: 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
}
.q-heading {
    font-size: clamp(1.4rem, 3.9vw, 1.78rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.18;
    max-width: 20ch;
    outline: none;
}
.q-heading + .options { margin-top: 24px; }

.step-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    padding: 4px 2px 4px 0;
}
.step-back:hover { color: var(--ink); }
.step-back svg { width: 16px; height: 16px; }

.options { display: flex; flex-direction: column; gap: 10px; }
.option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    font-family: inherit;
    color: var(--ink);
    background: var(--row);
    border: 1.5px solid transparent;
    border-radius: var(--r);
    padding: 16px 18px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}
.option:hover { background: #ededee; }
.option[aria-checked="true"] {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.option__label { font-size: 1rem; font-weight: 500; }
.option__radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--muted);
    flex-shrink: 0;
    transition: border-color 0.18s ease;
}
.option[aria-checked="true"] .option__radio {
    border-color: #fff;
    background: #fff;
    box-shadow: inset 0 0 0 3px var(--ink);
}

.field-stack { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.field {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
.field.is-invalid { border-color: #c81e27; }
.field-error {
    font-size: 0.82rem;
    color: #c81e27;
    margin-top: 4px;
    min-height: 1em;
}
.field-error.show { display: block; }

.tcpa {
    margin-top: 18px;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
}
.tcpa a { color: var(--ink); }

.btn-next {
    display: block;
    width: 100%;
    margin-top: 30px;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--ink);
    border: none;
    border-radius: var(--r);
    cursor: pointer;
    transition: opacity 0.18s ease, background 0.18s ease;
    text-align: center;
}
.btn-next:hover { background: #333; }
.btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.btn-next:focus-visible { outline: 3px solid rgba(0,0,0,0.2); outline-offset: 2px; }

.site-footer {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 20px 24px;
}
.site-footer__inner { max-width: 1080px; margin: 0 auto; }
.site-footer__legal { font-size: 0.82rem; color: var(--muted); text-align: center; }

.thank-you {
    max-width: 520px;
    margin: 80px auto;
    text-align: center;
    padding: 40px;
}
.thank-you h1 { font-size: 2rem; margin-bottom: 12px; }
.thank-you p { color: var(--muted); margin-bottom: 24px; }
.thank-you a { color: var(--ink); font-weight: 600; }

.error {
    max-width: 520px;
    margin: 80px auto;
    text-align: center;
    padding: 40px;
}
.error h1 { font-size: 1.5rem; margin-bottom: 12px; color: #c81e27; }
.error p { color: var(--muted); margin-bottom: 24px; }
/* ============================================================================
 * flow.additions.css — NEW styles for the HELOC 18-screen funnel.
 * APPEND to flow.css (do not replace it). Only genuinely new UI lives here:
 * per-screen sub-heading, "Popular" badge, sliders, address group,
 * progressive-reveal groups, the searching interstitial, and consent footers.
 * Reuses existing tokens/classes (--ink, --muted, .field, .btn-next, .tcpa …).
 * ==========================================================================*/

/* ── Per-screen sub-heading (H1 + sub) ─────────────────────────────────── */
.step-sub {
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.4;
    max-width: 34ch;
}
.q-heading + .step-sub { margin-top: 10px; }
.step-sub + .options,
.step-sub + .slider,
.step-sub + .address-group,
.step-sub + .field-stack { margin-top: 22px; }

/* ── Option layout tweaks + "Popular" badge ────────────────────────────── */
.option__radio { margin-left: auto; }   /* push the radio to the right edge */
.option__badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #c81e27;
    background: #fdeaec;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.option[aria-checked="true"] .option__badge {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

/* ── Sliders ───────────────────────────────────────────────────────────── */
.slider { margin-top: 24px; }
.slider__value {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-align: center;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}
.slider__input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ink) 50%, #ededee 50%);
    outline: none;
    cursor: pointer;
    margin: 6px 0;
}
.slider__input:focus-visible { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15); }
/* WebKit thumb */
.slider__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--ink);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin-top: -1px;
}
/* Firefox thumb + track */
.slider__input::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--ink);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}
.slider__input::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: transparent;
}
.slider__ends {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ── Address group ─────────────────────────────────────────────────────── */
.address-group { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.address-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Contact: name row + progressive reveal ────────────────────────────── */
.name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.reveal-group { display: none; }
.reveal-group.is-shown { display: block; animation: fade 0.3s ease both; }
.reveal-group[data-reveal="phone"] { margin-top: 14px; }
.consent-paragraph { margin-top: 18px; }
.contact-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}
.contact-actions .step-back { margin-bottom: 0; flex-shrink: 0; }
.contact-actions .btn-next { margin-top: 0; flex: 1 1 auto; }

/* ── Searching interstitial ────────────────────────────────────────────── */
.searching { text-align: center; padding: 24px 0 12px; }
.searching .q-heading { margin: 22px auto 0; max-width: 22ch; }
.searching .step-sub { margin: 10px auto 0; }
.searching__status {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--muted);
}
.searching__status:first-of-type { margin-top: 20px; font-weight: 600; color: var(--ink); }
.spinner {
    width: 46px;
    height: 46px;
    margin: 8px auto 0;
    border: 4px solid var(--row);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 2.4s; }
}

/* ── Consent footers (mounted beneath every step) ──────────────────────── */
.consent-footer {
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--muted);
}
.consent-footer a { color: var(--ink); text-decoration: underline; }

/* ── Fetching-quotes interstitial + buyer cards (Evolute wait-and-display) ── */
.fq-loading { text-align: center; padding: 2rem 1rem; }
.fq-spinner { width: 44px; height: 44px; margin: 0 auto 1.25rem; border: 4px solid rgba(0,0,0,.1); border-top-color: currentColor; border-radius: 50%; animation: fq-spin 900ms linear infinite; }
@keyframes fq-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fq-spinner { animation-duration: 2200ms; } }
.fq-msg { opacity: .75; margin-top: .25rem; }
.fq-bar { height: 8px; border-radius: 999px; background: rgba(0,0,0,.08); overflow: hidden; max-width: 340px; margin: 1.25rem auto 0; }
.fq-bar__fill { height: 100%; width: 8%; background: currentColor; border-radius: 999px; transition: width .6s ease; }
.fq-result { padding: 1.5rem 1rem; text-align: center; }
.fq-thanks { max-width: 480px; margin: 1rem auto; opacity: .85; }
.fq-home { display: inline-block; margin-top: 1.25rem; }
.buyers { display: grid; gap: 1rem; max-width: 560px; margin: 1.5rem auto 0; }
.buyer { border: 1px solid rgba(0,0,0,.12); border-radius: 14px; padding: 1.25rem; text-align: center; }
.buyer__logo { max-height: 48px; max-width: 180px; margin: 0 auto .5rem; display: block; object-fit: contain; }
.buyer__name { margin: .25rem 0; font-size: 1.15rem; }
.buyer__desc { opacity: .8; font-size: .95rem; margin: .5rem 0; }
.buyer__phone { display: inline-block; margin: .35rem .5rem; font-weight: 600; }
.buyer__cta { display: inline-block; margin-top: .5rem; }
