/* ============================================
   Social Security Calculator Styles
   MOBILE-FIRST CSS with CONTAINER QUERIES
   Responds to container width, not viewport
   Works as embeddable widget in any size container
   ============================================ */

:root {
    --primary: #1A2332;
    --primary-light: #4A6690;
    --accent: #C9A961;
    --accent-hover: #b8963e;
    --warning: #e74c3c;
    --bg: #F1EEE6;
    --card-bg: #ffffff;
    --text: #1A2332;
    --text-light: #595E65;
    --border: #CBCAC6;
}

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

/* ============================================
   BASE STYLES (Mobile: < 600px)
   ============================================ */

/* When used standalone */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Widget wrapper - floating card style */
.ss-widget {
    font-family: inherit;
    color: var(--text);
    line-height: 1.6;
    padding: 20px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(26, 35, 50, 0.1), 0 2px 8px rgba(26, 35, 50, 0.04);
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    container-type: inline-size;
    container-name: widget;
}

.ss-widget header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    color: white;
}

.ss-widget header h1 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.ss-widget header p {
    opacity: 0.9;
    font-size: 0.85rem;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.card h2 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.card h3 {
    font-size: 1rem;
    color: var(--primary);
    margin: 20px 0 12px 0;
}

.card h3:first-of-type {
    margin-top: 0;
}

/* Form - stacked on mobile */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group .hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

input,
select {
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    /* 16px prevents iOS zoom on focus */
    /* 14px padding + 16px font = 44px+ touch target */
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(74, 102, 144, 0.15);
}

input::placeholder {
    color: #b0bec5;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    background: var(--bg);
    border-radius: 10px;
    cursor: pointer;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
}

.toggle-label {
    font-size: 0.85rem;
    color: var(--text);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.input-mode {
    display: none;
}

.input-mode.active {
    display: block;
}

/* Submit button - prominent CTA */
.calc-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 16px 32px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(26, 35, 50, 0.2);
    margin-top: 8px;
}

.calc-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 35, 50, 0.3);
    background: var(--accent-hover);
}

.calc-submit:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(26, 35, 50, 0.2);
}

.calc-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.calc-submit svg {
    transition: transform 0.2s;
}

.calc-submit:hover svg {
    transform: translateX(3px);
}

/* Form/Results visibility toggle */
#ssCalcForm {
    display: block;
}

#ssCalcForm.hidden {
    display: none;
}

.results {
    display: none;
}

.results.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-light);
    border: none;
    padding: 12px 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
    margin-left: -4px;
    width: auto;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.back-btn:hover {
    color: var(--primary);
    background: transparent;
}

.back-btn:active {
    opacity: 0.7;
}

.back-btn svg {
    transition: transform 0.2s;
}

.back-btn:hover svg {
    transform: translateX(-2px);
}

.results h2 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.results-intro {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.result-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.estimate-note {
    background: linear-gradient(135deg, #f0ece3, var(--bg));
    border-left: 4px solid var(--primary-light);
    padding: 14px 16px;
    border-radius: 0 10px 10px 0;
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: var(--text);
    line-height: 1.6;
}

/* Tabs */
.tabs {
    margin-bottom: 16px;
}

/* Segmented control — both options look like buttons */
.tab-nav {
    display: inline-flex;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    gap: 3px;
    margin-bottom: 16px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 9px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    text-align: center;
    min-height: 40px;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(26, 35, 50, 0.07);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(26, 35, 50, 0.25);
}

.tab-content,
.spouse-tab-content {
    display: none;
}

.tab-content.active,
.spouse-tab-content.active {
    display: block;
}

/* Benefits Table */
.benefits-table {
    width: 100%;
    border-collapse: collapse;
}

.benefits-table th,
.benefits-table td {
    padding: 12px 6px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.benefits-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.65rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.benefits-table td {
    font-size: 0.85rem;
}

.benefits-table .amount {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.benefits-table tr.highlight {
    background: rgba(201, 169, 97, 0.1);
}

.benefits-table tr.highlight td {
    font-weight: 600;
}

.benefits-table tbody tr {
    transition: background 0.15s;
}

.benefits-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.015);
}

.benefits-table .adjustment {
    font-size: 0.8rem;
}

.benefits-table .adjustment.positive {
    color: var(--accent);
}

.benefits-table .adjustment.negative {
    color: var(--warning);
}

.info-box {
    background: var(--bg);
    border-radius: 8px;
    padding: 14px;
    margin: 16px 0;
    font-size: 0.85rem;
    line-height: 1.7;
}

.info-box p {
    margin: 0;
}

/* Key Stats - always 3-col grid */
.key-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--bg);
    padding: 14px 8px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
    line-height: 1.3;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

/* Spousal Section */
.spousal-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.spousal-section h3 {
    margin-top: 0;
}

.spousal-callout {
    background: rgba(201, 169, 97, 0.08);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text);
}

.spousal-rec {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    color: var(--text-light);
}

.spousal-rec.own {
    color: var(--primary);
}

.spousal-rec.spousal {
    color: var(--accent);
}

.spousal-disclaimer {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 12px;
    line-height: 1.6;
}

.disclaimer {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 14px;
    border-radius: 0 8px 8px 0;
    font-size: 0.8rem;
    margin-top: 20px;
}

.ssa-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 0.8rem;
    margin-top: 12px;
    padding: 8px 0;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   WIDER CONTAINER STYLES (>= 500px container width)
   Uses container query - responds to widget size, not viewport
   ============================================ */
@container widget (min-width: 500px) {
    .ss-widget {
        padding: 20px;
    }

    .ss-widget header {
        margin-bottom: 30px;
        padding: 20px;
    }

    .ss-widget header h1 {
        font-size: 1.8rem;
    }

    .ss-widget header p {
        font-size: 0.95rem;
    }

    .card {
        padding: 24px;
        margin-bottom: 20px;
    }

    .card h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .card h3 {
        font-size: 1.05rem;
        margin: 24px 0 12px 0;
    }

    /* Form grid on tablet+ */
    .form-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .calc-submit {
        width: auto;
        padding: 16px 40px;
        font-size: 1.1rem;
        margin: 8px auto 0;
    }

    .results h2 {
        font-size: 1.2rem;
    }

    .results-intro {
        margin-bottom: 20px;
        font-size: 0.95rem;
    }

    .tabs {
        margin-bottom: 20px;
    }

    .tab-nav {
        margin-bottom: 16px;
    }

    .tab-btn {
        padding: 9px 24px;
        font-size: 0.9rem;
    }

    .benefits-table th,
    .benefits-table td {
        padding: 14px 12px;
    }

    .benefits-table th {
        font-size: 0.75rem;
    }

    .benefits-table td {
        font-size: 1rem;
    }

    .benefits-table .amount {
        font-size: 1.1rem;
    }

    .benefits-table .adjustment {
        font-size: 0.85rem;
    }

    .info-box {
        padding: 16px;
        margin: 20px 0;
        font-size: 0.9rem;
    }

    .key-stats {
        gap: 12px;
        margin-bottom: 24px;
    }

    .stat-item {
        padding: 20px 14px;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .spousal-section {
        margin-top: 30px;
        padding-top: 24px;
    }

    .spousal-note {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .disclaimer {
        padding: 16px;
        font-size: 0.85rem;
        margin-top: 24px;
    }
}

/* ============================================
   FALLBACK for browsers without container query support
   Uses viewport-based media query instead
   ============================================ */
@supports not (container-type: inline-size) {
    @media (min-width: 600px) {
        .ss-widget {
            padding: 20px;
        }

        .ss-widget header {
            margin-bottom: 30px;
            padding: 20px;
        }

        .ss-widget header h1 {
            font-size: 1.8rem;
        }

        .ss-widget header p {
            font-size: 0.95rem;
        }

        .card {
            padding: 24px;
            margin-bottom: 20px;
        }

        .card h2 {
            font-size: 1.2rem;
            margin-bottom: 20px;
        }

        .card h3 {
            font-size: 1.05rem;
            margin: 24px 0 12px 0;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        .calc-submit {
            width: auto;
            padding: 16px 40px;
            font-size: 1.1rem;
            margin: 8px auto 0;
        }

        .results h2 {
            font-size: 1.2rem;
        }

        .results-intro {
            margin-bottom: 20px;
            font-size: 0.95rem;
        }

        .tabs {
            margin-bottom: 20px;
        }

        .tab-nav {
            margin-bottom: 16px;
        }

        .tab-btn {
            padding: 9px 28px;
            font-size: 0.95rem;
        }

        .benefits-table th,
        .benefits-table td {
            padding: 14px 12px;
        }

        .benefits-table th {
            font-size: 0.75rem;
        }

        .benefits-table td {
            font-size: 1rem;
        }

        .benefits-table .amount {
            font-size: 1.1rem;
        }

        .benefits-table .adjustment {
            font-size: 0.85rem;
        }

        .info-box {
            padding: 16px;
            margin: 20px 0;
            font-size: 0.9rem;
        }

        .key-stats {
            gap: 12px;
            margin-bottom: 24px;
        }

        .stat-item {
            padding: 20px 14px;
        }

        .stat-label {
            font-size: 0.72rem;
        }

        .stat-value {
            font-size: 1.4rem;
        }

        .spousal-section {
            margin-top: 30px;
            padding-top: 24px;
        }

        .spousal-note {
            font-size: 0.9rem;
            margin-bottom: 16px;
        }

        .disclaimer {
            padding: 16px;
            font-size: 0.85rem;
            margin-top: 24px;
        }
    }
}

/* ============================================
   LANDING PAGE STYLES
   Site-level styles OUTSIDE the .ss-widget scope
   ============================================ */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 60px;
}

/* --- SITE HEADER --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.site-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.site-header__logo {
    width: 140px;
    height: auto;
    display: block;
}

.site-header__nav {
    display: none;
}

.site-header__nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.site-header__nav a:hover {
    background: var(--bg);
    color: var(--primary);
}

.site-header__cta {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.site-header__cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.site-header__cta:active {
    transform: scale(0.98);
}

.site-header__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.site-header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.site-header__nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 8px 16px;
}

.site-header__nav.is-open a {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.site-header__nav.is-open a:last-child {
    border-bottom: none;
}

/* --- HERO --- */
.hero {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    text-align: center;
    padding: 36px 16px 80px;
}

.hero__inner {
    max-width: 640px;
    margin: 0 auto;
}

.hero__title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

.hero__title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin: 16px auto;
    border-radius: 2px;
}

.hero__subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 24px;
}

.hero__trust {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
}

.hero__trust-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--accent);
}

/* --- SHARED SECTION STYLES --- */
.section__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

.section__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 20px;
}

.section__subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    line-height: 1.5;
    margin-top: -12px;
    margin-bottom: 24px;
}

/* --- WHY TRUST --- */
.why-trust {
    padding: 32px 16px;
    background: white;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature {
    text-align: center;
    padding: 24px 16px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    margin-bottom: 12px;
    color: white;
}

.feature__icon svg {
    width: 24px;
    height: 24px;
}

.feature__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.feature__desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* --- CALCULATOR SECTION --- */
.calculator-section {
    margin-top: -48px;
    padding: 0 0 24px;
    position: relative;
    z-index: 1;
    background: transparent;
}

.calculator-section .section__inner {
    max-width: 900px;
}

/* --- FAQ SECTION --- */
.faq-section {
    padding: 32px 16px;
    background: var(--bg);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
    border-top: 1px solid var(--border);
}

.faq-question {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    padding: 18px 40px 18px 0;
    cursor: pointer;
    list-style: none;
    position: relative;
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::marker {
    display: none;
    content: '';
}

.faq-question::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
    transform: translateY(-30%) rotate(-135deg);
}

.faq-answer {
    padding: 0 0 18px 0;
}

.faq-answer p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

.faq-answer ul {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 10px 0 0 0;
    padding-left: 1.4em;
}

.faq-answer ul li {
    margin-bottom: 6px;
}

.faq-answer ul + p {
    margin-top: 10px;
}

.faq-answer a {
    color: var(--primary-light);
    text-decoration: underline;
}

/* --- BOTTOM CTA --- */
.bottom-cta {
    padding: 32px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    text-align: center;
    color: white;
}

.bottom-cta__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.bottom-cta__desc {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.5;
}

.bottom-cta__btn {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: var(--primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 10px;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.bottom-cta__btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.bottom-cta__btn:active {
    transform: scale(0.98);
}

/* --- SITE FOOTER --- */
.site-footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.85);
    padding: 32px 16px;
    text-align: center;
}

.site-footer__inner {
    max-width: 800px;
    margin: 0 auto;
}

.site-footer__disclaimer {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    line-height: 1.7;
    text-align: left;
}

.site-footer__disclaimer strong {
    color: white;
}

.site-footer__disclaimer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.site-footer__links {
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.site-footer__links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 4px 0;
}

.site-footer__links a:hover {
    color: white;
    text-decoration: underline;
}

.site-footer__sep {
    margin: 0 10px;
    opacity: 0.5;
}

.site-footer__copy {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0;
}

/* ============================================
   LANDING PAGE RESPONSIVE
   Standard viewport media queries for page-level sections
   ============================================ */
@media (min-width: 768px) {
    html {
        scroll-padding-top: 80px;
    }

    .site-header__logo {
        width: 200px;
    }

    .site-header__nav {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .site-header__toggle {
        display: none;
    }

    .site-header__nav.is-open {
        position: static;
        flex-direction: row;
        box-shadow: none;
        border-bottom: none;
        padding: 0;
    }

    .site-header__nav.is-open a {
        padding: 8px 16px;
        border-bottom: none;
        border-radius: 6px;
        min-height: auto;
    }

    .hero {
        padding: 56px 24px 100px;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__title::after {
        width: 56px;
        margin: 20px auto;
    }

    .hero__subtitle {
        font-size: 1.1rem;
        margin-bottom: 28px;
    }

    .hero__trust {
        gap: 32px;
    }

    .hero__trust-item {
        font-size: 0.85rem;
    }

    .site-header__cta {
        font-size: 0.85rem;
        padding: 9px 20px;
    }

    .calculator-section {
        margin-top: -64px;
        padding: 0 0 40px;
    }

    .why-trust {
        padding: 40px 24px;
    }

    .features {
        flex-direction: row;
        gap: 16px;
    }

    .feature {
        flex: 1;
        padding: 28px 16px;
    }

    .bottom-cta {
        padding: 48px 24px;
    }

    .bottom-cta__title {
        font-size: 1.5rem;
    }

    .faq-section {
        padding: 40px 24px;
    }

    .section__title {
        font-size: 1.5rem;
    }

    .section__subtitle {
        font-size: 0.95rem;
    }

    .site-footer {
        padding: 40px 24px;
    }

    .hero__title-modifier {
        font-size: 0.48em;
    }

    .hero__answer {
        font-size: 0.95rem;
    }

    .resources {
        padding: 40px 24px;
    }

    .resources__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* ============================================
   HORIZONTAL STEPPER BAR + WIZARD FORM
   ============================================ */

/* --- Stepper bar (pill indicators) --- */
.stepper-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    scroll-behavior: smooth;
}

.stepper-bar::-webkit-scrollbar {
    height: 4px;
}

.stepper-bar::-webkit-scrollbar-track {
    background: transparent;
}

.stepper-bar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.stepper-bar::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.stepper-item {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: default;
    transition: all 0.2s;
    white-space: nowrap;
    background: none;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

/* Completed: gold pill, clickable */
.stepper-item.completed {
    background: var(--accent);
    color: white;
    cursor: pointer;
}

.stepper-item.completed:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(201, 169, 97, 0.3);
}

.stepper-item.completed:active {
    transform: scale(0.97);
}

/* Active: navy pill, bold, prominent */
.stepper-item.active {
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 14px;
    box-shadow: 0 2px 8px rgba(26, 35, 50, 0.2);
}

/* Upcoming: light bg, muted */
.stepper-item.upcoming {
    background: var(--bg);
    color: var(--text-light);
    border-color: var(--border);
    opacity: 0.5;
}

/* --- Step content (one visible at a time) --- */
.wizard-step {
    display: none;
    min-height: 120px;
}

.wizard-step.active {
    display: block;
    animation: wizardFadeIn 0.2s ease-out;
}

/* --- Animations --- */
@keyframes wizardFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wizardShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

.wizard-step.shake {
    animation: wizardShake 0.3s ease-out;
}

/* --- Inputs inside steps — capped to prevent overly wide fields --- */
.wizard-step input[type="number"],
.wizard-step input[type="text"] {
    width: 100%;
    max-width: 360px;
}

/* --- Selects size to their longest option, capped at container width --- */
.wizard-step select {
    width: fit-content;
    max-width: 100%;
}

/* Inputs inside prefix wrapper inherit width from wrapper */
.wizard-step .input-prefix input {
    max-width: none;
}

/* --- Dollar-prefix input wrapper --- */
.input-prefix {
    display: flex;
    align-items: stretch;
    max-width: 360px;
    width: 100%;
}

.input-prefix__symbol {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    user-select: none;
}

.input-prefix input {
    border-radius: 0 10px 10px 0;
    flex: 1;
    min-width: 0;
}

/* --- Labels and hints --- */
.wizard-label {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 14px;
    line-height: 1.3;
}

.wizard-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 8px;
    line-height: 1.5;
}

.wizard-hint a {
    color: var(--primary-light);
}

/* --- Choice buttons (earnings method) --- */
.wizard-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wizard-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 14px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.wizard-choice:hover {
    border-color: var(--accent);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 35, 50, 0.08);
}

.wizard-choice:active {
    transform: scale(0.97);
}

.wizard-choice__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 10px;
    margin-bottom: 10px;
}

.wizard-choice__icon svg {
    width: 20px;
    height: 20px;
}

.wizard-choice__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.wizard-choice__desc {
    font-size: 0.72rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* --- Multi-field steps --- */
.wizard-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.wizard-field {
    display: flex;
    flex-direction: column;
}

.wizard-field label {
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.wizard-field input {
    max-width: none;
}

.wizard-field .input-prefix {
    max-width: none;
}

.wizard-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text);
    background: #fff;
    cursor: pointer;
}

/* --- Wizard navigation --- */
.wizard-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 20px;
}

/* .wizard-next inherits .calc-submit styles but needs width override */
.wizard-next {
    width: auto;
    padding: 14px 28px;
}

/* ============================================
   WIZARD RESPONSIVE (container query)
   ============================================ */
@container widget (min-width: 500px) {
    .stepper-item {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .stepper-item.active {
        font-size: 0.85rem;
        padding: 7px 16px;
    }

    .wizard-label {
        font-size: 1.15rem;
    }

    .wizard-fields {
        grid-template-columns: 1fr 1fr;
    }

    .wizard-field--full {
        grid-column: 1 / -1;
    }

    .wizard-choices {
        gap: 16px;
    }

    .wizard-choice {
        padding: 24px 18px;
    }

    .wizard-choice__title {
        font-size: 0.95rem;
    }
}

/* ============================================
   WIZARD RESPONSIVE (fallback)
   ============================================ */
@supports not (container-type: inline-size) {
    @media (min-width: 600px) {
        .stepper-item {
            font-size: 0.8rem;
            padding: 6px 14px;
        }

        .stepper-item.active {
            font-size: 0.85rem;
            padding: 7px 16px;
        }

        .wizard-label {
            font-size: 1.15rem;
        }

        .wizard-fields {
            grid-template-columns: 1fr 1fr;
        }

        .wizard-field--full {
            grid-column: 1 / -1;
        }

        .wizard-choices {
            gap: 16px;
        }

        .wizard-choice {
            padding: 24px 18px;
        }

        .wizard-choice__title {
            font-size: 0.95rem;
        }
    }
}

/* ============================================
   SEO / GEO SECTIONS
   Hero modifier, answer paragraph, Resources,
   and FAQ answer spacing
   ============================================ */

/* --- HERO TITLE MODIFIER (SEO long-tail keyword) --- */
.hero__title-modifier {
    display: block;
    font-size: 0.55em;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 8px;
    line-height: 1.4;
    letter-spacing: 0;
}

/* --- HERO ANSWER-FIRST PARAGRAPH (GEO) --- */
.hero__answer {
    font-size: 0.82rem;
    opacity: 0.7;
    line-height: 1.7;
    max-width: 560px;
    margin: 16px auto 0;
    text-align: center;
}

/* --- RESOURCES --- */
.resources {
    padding: 32px 16px;
    background: white;
}

.resources__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.resources__card {
    display: block;
    padding: 20px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.resources__card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 35, 50, 0.08);
}

.resources__card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.resources__card-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* --- FAQ ANSWER SPACING (multi-paragraph GEO answers) --- */
.faq-answer p+p {
    margin-top: 10px;
}

/* --- RESOURCES 3-COLUMN DESKTOP --- */
@media (min-width: 1024px) {
    .resources__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* ---------------------------------------------------------
   Birth date fields (month select + year input side by side)
   --------------------------------------------------------- */
.birth-date-fields {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.birth-date-fields .wizard-select {
    flex: 0 0 145px;
    width: 145px;
    /* Match base input appearance (overrides .wizard-select overrides) */
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
}

.birth-date-fields input[type="number"] {
    flex: 1;
    width: auto;
    min-width: 0;
}
