:root {
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eff6ff;
    --text: #1e293b;
    --muted: #64748b;
    --line: #dbe4ee;
    --brand: #003366;
    --brand-hover: #002244;
    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --selected: #fff8e1;
    --selected-line: #f59e0b;
    --focus: #2563eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible + .answer-card {
    outline: 3px solid rgba(22, 119, 255, 0.4);
    outline-offset: 3px;
}

.hidden {
    display: none !important;
}

.app-shell {
    width: 100%;
    min-height: 100vh;
    padding: 76px 16px 32px;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20;
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--brand);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.header-label {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.screen {
    width: 100%;
    max-width: 720px;
    margin: 20px auto 0;
    padding: 28px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.intro-screen {
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--accent);
}

.intro-screen::before {
    position: absolute;
    top: -90px;
    right: -100px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.12);
    content: "";
    pointer-events: none;
}

.eyebrow {
    margin: 0 0 12px;
    color: #d97706;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(1.8rem, 8vw, 3rem);
    line-height: 1.14;
    letter-spacing: -0.03em;
    color: var(--brand);
}

.lead {
    margin: 24px 0 10px;
    font-weight: 700;
}

.intro-copy {
    margin: 20px 0 0;
    color: var(--muted);
}

.benefit-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.benefit-list li {
    position: relative;
    padding-left: 28px;
}

.benefit-list li::before {
    position: absolute;
    top: 1px;
    left: 0;
    color: #10b981;
    content: "✓";
    font-weight: 900;
}

.time-note {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 24px;
    padding: 13px 14px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: var(--surface-soft);
    font-weight: 700;
}

.time-note > span:first-child {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--brand);
}

.reassurance {
    margin: 24px 0;
    padding-left: 16px;
    border-left: 5px solid var(--accent);
    border-radius: 0 8px 8px 0;
    background: #fffbeb;
    color: var(--muted);
    padding-top: 14px;
    padding-right: 14px;
    padding-bottom: 14px;
}

.reassurance p {
    margin: 0;
}

.reassurance p + p {
    margin-top: 8px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
    font-weight: 800;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-btn {
    width: 100%;
    padding: 0 20px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--text);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

.primary-btn:hover:not(:disabled) {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.primary-btn:active:not(:disabled),
.secondary-btn:active {
    transform: translateY(1px);
}

.primary-btn:disabled {
    border-color: #c9d2d0;
    background: #c9d2d0;
    color: #687875;
    cursor: not-allowed;
}

.secondary-btn {
    padding: 0 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
}

.secondary-btn:hover {
    border-color: var(--brand);
    background: #eff6ff;
    color: var(--brand);
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.question-counter {
    color: var(--brand);
    font-weight: 800;
}

.progress-percent {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.progress-track {
    height: 8px;
    margin: 10px 0 30px;
    overflow: hidden;
    border-radius: 999px;
    background: #e0e8e6;
}

.progress-track span {
    display: block;
    width: 12.5%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand) 0%, #2563eb 100%);
    transition: width 220ms ease;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

legend {
    width: 100%;
    padding: 0;
    font-size: clamp(1.35rem, 6vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--brand);
}

.question-hint {
    margin: 10px 0 20px;
    color: var(--muted);
}

.answer-list {
    display: grid;
    gap: 12px;
}

.answer-option {
    position: relative;
}

.answer-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.answer-card {
    display: grid;
    min-height: 64px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.answer-card:hover {
    border-color: #93c5fd;
    box-shadow: var(--shadow);
}

.answer-indicator {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    color: var(--brand);
    font-size: 0.86rem;
    font-weight: 900;
}

.answer-text {
    font-weight: 650;
}

.answer-option input:checked + .answer-card {
    border-color: var(--brand);
    background: var(--selected);
    box-shadow: 0 0 0 1px var(--brand), var(--shadow);
}

.answer-option input:checked + .answer-card .answer-indicator {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--accent);
}

.navigation {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    margin-top: 28px;
}

.navigation .primary-btn {
    width: 100%;
}

.result-screen {
    text-align: center;
}

.result-icon {
    display: grid;
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 16px;
    background: var(--brand);
    color: var(--accent);
    font-size: 2rem;
}

.result-icon::before {
    content: "↗";
}

.result-code {
    margin: 0 0 8px;
    color: #d97706;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.result-kicker {
    margin: 0 0 6px;
    color: var(--muted);
    font-weight: 700;
}

.result-description {
    max-width: 580px;
    margin: 18px auto 0;
    color: var(--muted);
}

.lead-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
    padding: 22px 18px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--accent);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: left;
}

.lead-submit-btn {
    width: 100%;
}

.lead-form-heading h2 {
    margin: 0;
    color: var(--brand);
    font-size: 1.35rem;
}

.lead-form-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    color: var(--text);
    font-weight: 700;
}

.form-field label > span:not(.optional-label) {
    color: #dc2626;
}

.optional-label {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 400;
}

.form-field input {
    width: 100%;
    min-height: 50px;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    outline: none;
}

.form-field input:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-field input[aria-invalid="true"] {
    border-color: #dc2626;
}

.field-error {
    min-height: 20px;
    margin: 0;
    color: #b91c1c;
    font-size: 0.86rem;
}

.save-status {
    min-height: 24px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.save-status.error {
    color: #8b5d00;
}

.save-status.success {
    color: #15803d;
}

.roadmap-section > h2 {
    margin: 28px 0 14px;
    color: var(--brand);
    font-size: 1.3rem;
    text-align: left;
}

.roadmap-list {
    display: grid;
    gap: 14px;
}

.roadmap-step {
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--accent);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.roadmap-step h3 {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 1.05rem;
}

.roadmap-step ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.video-section {
    margin-top: 30px;
    text-align: left;
}

.video-section h2 {
    margin: 0;
    color: var(--brand);
    font-size: 1.3rem;
}

.video-section > p {
    margin: 6px 0 16px;
    color: var(--muted);
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
    box-shadow: var(--shadow-lg);
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.restart-wrap {
    margin-top: 18px;
    text-align: center;
}

.restart-btn {
    width: 100%;
}

.toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 10;
    max-width: 520px;
    margin: 0 auto;
    padding: 13px 16px;
    border-radius: 12px;
    background: var(--text);
    color: #ffffff;
    box-shadow: var(--shadow);
    text-align: center;
}

@media (min-width: 640px) {
    .app-shell {
        padding: 76px 24px 48px;
    }

    .site-header {
        padding-right: max(24px, calc((100% - 960px) / 2));
        padding-left: max(24px, calc((100% - 960px) / 2));
    }

    .screen {
        margin-top: 32px;
        padding: 44px;
    }

    .lead-form {
        padding: 28px;
    }

    .intro-screen .primary-btn {
        width: auto;
        min-width: 260px;
    }

    .restart-btn {
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
