:root {
    --brand-900: #16324A;   /* deep navy - headlines */
    --brand-700: #1F4E6B;
    --brand-600: #0E7C5A;   /* primary green - trust, motion */
    --brand-500: #D8801E;   /* warm amber - CTAs, energy */
    --brand-100: #F2F7F5;   /* light surface */
    --success: #16A34A;
    --danger: #DC2626;
    --text: #16324A;
    --muted: #5B7280;
    --radius: 16px;
    --shadow: 0 10px 25px rgba(22, 50, 74, .10);
    --maxw: 1100px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.6;
}

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

#quiz-root {
    width: 100%;
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 3.5rem 3rem;
}

@media (max-width: 880px) {
    .container { padding: 2rem 1.25rem; }
}

/* ---------- Header ---------- */
.site-header {
    border-bottom: 1px solid #E7EEEC;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header .header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 14px 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 880px) {
    .site-header .header-inner { padding: 12px 1.25rem; }
}

.site-header .logo img { height: 36px; }

.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
    color: var(--brand-900);
    font-weight: 600;
    font-size: 15px;
}
.main-nav a.active { color: var(--brand-600); }
.main-nav a:hover { text-decoration: none; color: var(--brand-600); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

@media (max-width: 700px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid #E7EEEC;
        gap: 16px;
    }
    .main-nav.open { display: flex; }
    .nav-toggle { display: block; }
}

/* ---------- Hero / Intro ---------- */
.hero {
    text-align: center;
    padding: 1.25rem 1rem 0.75rem;
    max-width: 600px;
    margin: 0 auto;
}

.advisor-intro-badge {
    position: relative;
    display: inline-block;
    margin-bottom: 6px;
}

.hero-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(22, 50, 74, 0.18);
    position: relative;
    z-index: 2;
}

.advisor-pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 3px solid var(--brand-500);
    animation: advisor-pulse 2.2s ease-out infinite;
    z-index: 1;
}

@keyframes advisor-pulse {
    0%   { transform: scale(1); opacity: 0.7; }
    70%  { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

.advisor-name-tag {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-500);
    margin: 0 0 4px;
}

.cta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cta-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(22, 50, 74, 0.18);
}

.hero .eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--brand-600);
    text-transform: uppercase;
    margin: 0 0 10px;
}

.hero h1 {
    font-size: clamp(24px, 3.6vw, 32px);
    line-height: 1.25;
    margin: 0 0 12px;
    color: var(--brand-900);
}

.hero p.lead {
    font-size: 16px;
    color: var(--muted);
    margin: 0 0 12px;
}

.hero p.hero-steps {
    font-size: 14px;
    color: var(--brand-700);
    background: var(--brand-100);
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    margin: 0 0 22px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 16px 34px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 17px;
    background: var(--brand-500);
    color: #fff;
    box-shadow: var(--shadow);
    border: none;
    cursor: pointer;
}
.btn:hover { background: #C2710F; text-decoration: none; }

.btn.outline {
    background: transparent;
    border: 2px solid var(--brand-600);
    color: var(--brand-600);
    box-shadow: none;
}
.btn.outline:hover { background: var(--brand-100); }

.btn.full { display: block; width: 100%; text-align: center; }
.btn.secondary { background: var(--brand-700); }
.btn.secondary:hover { background: #16324A; }

/* ---------- Quiz ---------- */
.quiz-wrap {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1.25rem 4rem;
}

.progress-track {
    height: 5px;
    background: #E7EEEC;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-fill {
    height: 100%;
    background: var(--brand-600);
    transition: width .3s ease;
}
.progress-label {
    font-size: 12px;
    color: var(--muted);
    text-align: right;
    margin-bottom: 1.5rem;
}

.question-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-900);
    margin: 0 0 4px;
    line-height: 1.4;
}
.question-sub {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 1.25rem;
}

.option-list { display: flex; flex-direction: column; gap: 10px; }

.option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1.5px solid #E7EEEC;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    color: var(--text);
    width: 100%;
    transition: border-color .15s, background .15s;
}
.option-btn:hover { border-color: var(--brand-600); background: var(--brand-100); }
.option-btn .icon { font-size: 20px; flex-shrink: 0; color: var(--brand-600); }

/* ---------- Result Card ---------- */
.result-card {
    background: var(--brand-100);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}
.result-card .result-label {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 4px;
}
.result-card h2 {
    font-size: 22px;
    margin: 0 0 1rem;
    color: var(--brand-900);
}
.result-reason {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 10px;
    padding-left: 14px;
    border-left: 3px solid var(--brand-600);
}

/* ---------- Lead Capture ---------- */
.lead-form {
    background: #fff;
    border: 1.5px solid #E7EEEC;
    border-radius: var(--radius);
    padding: 1.5rem;
}
.lead-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-900);
    margin-bottom: 6px;
}
.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #E7EEEC;
    font-size: 15px;
    margin-bottom: 14px;
}
.lead-form input:focus { outline: none; border-color: var(--brand-600); }

/* ---------- Cards (general use: how-it-works, video grid, dealer cards) ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}
.card {
    background: #fff;
    border: 1.5px solid #E7EEEC;
    border-radius: var(--radius);
    padding: 1.5rem;
}
.card h3 { font-size: 16px; margin: 0 0 8px; color: var(--brand-900); }
.card p { font-size: 14px; color: var(--muted); margin: 0; }
.card .icon { font-size: 26px; color: var(--brand-600); margin-bottom: 10px; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--brand-900);
    color: #C9D6DD;
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}
.site-footer .footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 3rem;
}
@media (max-width: 880px) {
    .site-footer .footer-inner { padding: 0 1.25rem; }
}
.site-footer a { color: #fff; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-bottom: 2rem;
}
.footer-cols h4 {
    color: #fff;
    font-size: 14px;
    margin: 0 0 10px;
}
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 8px; font-size: 14px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 1.25rem;
    font-size: 13px;
    color: #8FA3AC;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.affiliate-disclosure {
    font-size: 12px;
    color: #8FA3AC;
    max-width: 700px;
}

/* ---------- Free-text alternative under quiz options ---------- */
.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0 12px;
    font-size: 12px;
    color: var(--muted);
}
.or-divider::before, .or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E7EEEC;
}
.or-divider span { padding: 0 10px; white-space: nowrap; }

.freetext-row {
    display: flex;
    gap: 8px;
}
.freetext-row input[type="text"] {
    flex: 1;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #E7EEEC;
    font-size: 15px;
}
.freetext-row input:focus { outline: none; border-color: var(--brand-600); }

#advisor-wrap {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Live AI Advisor (kitchen-table chat) ---------- */
.advisor-messages {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding: 4px 2px 1rem;
    margin-bottom: 1rem;
}
.advisor-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}
.advisor-row-user {
    justify-content: flex-end;
}
.advisor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 1.5px solid #E7EEEC;
}
.advisor-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
}
.advisor-bubble-agent {
    background: var(--brand-100);
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.advisor-bubble-user {
    background: var(--brand-600);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.advisor-typing { opacity: .6; font-style: italic; }

.advisor-input-row {
    display: flex;
    gap: 8px;
}
.advisor-input-row input[type="text"] {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px solid #E7EEEC;
    font-size: 15px;
}
.advisor-input-row input:focus { outline: none; border-color: var(--brand-600); }
.advisor-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 8px;
}

/* ---------- Illustration banner band (warm surround, not full-site) ---------- */
.illustration-band {
    width: 100%;
    background: linear-gradient(180deg, #FAF6ED 0%, #F5EDDD 100%);
    padding: 2.5rem 0;
    margin: 0;
}
.illustration-band .banner-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 3rem;
}
@media (max-width: 880px) {
    .illustration-band .banner-inner { padding: 0 1.25rem; }
}
.illustration-band img {
    width: 100%;
    max-width: 850px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(120, 90, 40, 0.15);
}
.illustration-band .caption {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    font-style: italic;
    margin: 14px 0 0;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.section-title {
    font-size: 24px;
    color: var(--brand-900);
    text-align: center;
    margin: 0 0 8px;
}
.section-sub {
    text-align: center;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto 2rem;
}
