:root {
    --accent: #00e5a3;
    --error: #ff2244;
    --text-primary: #001c2a;
    --text-inverse: #ededed;
    --text-secondary: #5c5c5c;
    --background-primary: #002c44;
    --background-secondary: #ede9e4;
    --line: rgba(0, 28, 42, 0.14);
    --inverse-muted: rgba(237, 237, 237, 0.72);
    --inverse-line: rgba(255, 255, 255, 0.2);
    --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-form: "Inter", system-ui, sans-serif;
    --heading-2: 38px;
    --heading-3: 26px;
    --eyebrow: 16px;
    --supporting: 20px;
    --body-size: 16px;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 1199px) {
    :root {
        --heading-2: 30px;
        --heading-3: 19px;
        --eyebrow: 13px;
        --supporting: 16px;
        --body-size: 14px;
    }
}

@media (max-width: 809px) {
    :root {
        --heading-2: 24px;
        --heading-3: 16px;
        --eyebrow: 12px;
        --supporting: 14px;
        --body-size: 14px;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: env(safe-area-inset-top, 0px);
    background: #fafafa;
}

body {
    min-width: 0;
    margin: 0;
    background: #fafafa;
    color: var(--text-primary);
    font: 400 var(--body-size) / 1.5 var(--font-body);
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(40px + env(safe-area-inset-bottom, 0px));
}

main {
    width: 100%;
    margin: 0;
    padding: 0;
}

.quiz-screen {
    display: grid;
    grid-template-columns: minmax(0, 45%) minmax(0, 55%);
    width: 100%;
    min-height: min(680px, calc(100vh - 112px));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--background-secondary);
}

.assessment-sidebar,
.assessment-content,
.results-wrapper,
.form-wrapper {
    min-width: 0;
    padding: clamp(24px, 4.5vw, 56px);
}

.assessment-sidebar,
.results-wrapper {
    background: var(--background-primary);
    color: var(--text-inverse);
}

.assessment-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.sidebar-intro,
.assessment-sidebar .stepper {
    width: 100%;
    margin: 0;
}

.sidebar-eyebrow,
.results-label,
.cta-label,
.gap-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: var(--eyebrow);
    font-weight: 500;
    letter-spacing: 0.06em;
    line-height: 24px;
    text-transform: uppercase;
}

.sidebar-eyebrow::before,
.results-label::before,
.cta-label::before,
.gap-label::before {
    display: block;
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
}

.assessment-sidebar .sidebar-eyebrow,
.results-wrapper .results-label {
    color: var(--inverse-muted);
}

.sidebar-intro h1 {
    margin: 0 0 16px;
    color: var(--text-inverse);
    font-size: var(--heading-2);
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-intro h1 span {
    color: var(--accent);
}

.sidebar-intro p {
    margin: 0 0 24px;
    color: var(--inverse-muted);
    font-size: var(--supporting);
    line-height: 1.5;
}

.stepper-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 28px 0 0;
    padding: 0;
    border-top: 1px solid var(--inverse-line);
}

.stepper-step {
    display: flex;
    min-height: 0;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--inverse-line);
}

.step-indicator {
    display: grid;
    flex: none;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    background: transparent;
    color: var(--accent);
    font: 600 13px var(--font-body);
}

.stepper-step.active .step-indicator {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--text-primary);
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    display: block;
    margin: 0;
    color: var(--text-inverse);
    font-size: 14px;
    font-weight: 600;
}

.step-description {
    margin: 0;
    color: var(--inverse-muted);
    font-size: 14px;
    line-height: 1.5;
}

.stepper-step.dim {
    opacity: 0.45;
}

.assessment-content {
    display: flex;
    background: var(--background-secondary);
}

.question-column {
    width: 100%;
    margin: 0;
}

.progress-track {
    display: flex;
    gap: 6px;
    margin: 0 0 10px;
}

.progress-dot {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: rgba(0, 28, 42, 0.12);
    transition: background 0.2s;
}

.progress-dot.done,
.progress-dot.current {
    background: var(--accent);
}

.quiz-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
    color: var(--text-secondary);
}

.progress-text {
    display: block;
    margin: 0 0 10px;
    color: inherit;
    font-size: var(--body-size);
}

.question-category {
    max-width: 58%;
    margin: 0;
    color: inherit;
    font-size: var(--body-size);
    font-weight: 400;
    text-align: right;
}

.wizard {
    position: relative;
}

.q-block {
    display: none;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.q-block.active {
    display: block;
}

.q-block h3.q-frame {
    margin: 0 0 22px;
    color: var(--text-primary);
    font-size: var(--heading-3);
    font-weight: 500;
    line-height: 1.3;
}

.options {
    display: grid;
    height: auto;
    gap: 10px;
    overflow: visible;
}

.opt {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    overflow: visible;
    padding: 14px 18px 14px 52px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    font: 400 16px / 1.4 var(--font-body);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.opt::before {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: #fff;
    content: "";
    transform: translateY(-50%);
}

.opt:hover {
    border-color: var(--accent);
    transform: translateX(3px);
}

.opt.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.opt.selected::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 4px #fff;
}

.back-btn {
    flex: 0 0 auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    font: 500 var(--body-size) / 1.5 var(--font-body);
    text-align: left;
    cursor: pointer;
}

.back-btn:hover:not(:disabled) {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 4px;
}

#result {
    width: 100%;
    min-height: min(680px, calc(100vh - 112px));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
}

#result.hidden {
    display: none;
}

.cta-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    min-height: min(680px, calc(100vh - 114px));
}

.results-label {
    margin-bottom: 22px;
}

.results-headline {
    margin: 22px 0 0;
    color: var(--text-inverse);
    font-size: var(--heading-2);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.81px;
}

.maturity-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    color: var(--inverse-muted);
    font-size: var(--body-size);
}

.maturity-meta span:last-child {
    color: var(--accent);
    font-weight: 600;
}

.heat-bar {
    display: flex;
    height: 4px;
    gap: 6px;
    margin: 0 0 26px;
    overflow: hidden;
}

.heat-level {
    position: relative;
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--inverse-line);
}

.heat-level.done-heat,
.heat-level.active-heat {
    background: var(--accent);
}

.weak-step-note {
    margin: 0 0 16px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.gap-box {
    margin: 26px 0;
    padding: 18px 20px;
    border: 0;
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, 0.06);
}

.gap-label {
    margin-bottom: 8px;
    color: var(--inverse-muted);
    font-size: 12px;
}

.gap-title {
    display: block;
    margin: 0;
    color: var(--text-inverse);
    font-size: var(--heading-3);
    font-weight: 500;
    line-height: 1.3;
}

.gap-text {
    margin: 6px 0 0;
    color: var(--inverse-muted);
    font-size: var(--body-size);
    line-height: 1.5;
}

.gap-ties {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--inverse-line);
}

.gap-tie {
    margin: 0 0 8px;
}

.gap-tie:last-child {
    margin-bottom: 0;
}

.gap-tie strong {
    color: var(--text-inverse);
}

.gap-cost {
    margin: 0 0 24px;
    color: var(--text-inverse);
}

.gap-cost::before {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--error);
    content: "";
    vertical-align: 0.08em;
}

.gap-cost strong {
    color: var(--text-inverse);
}

.form-wrapper {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.cta-section {
    width: 100%;
}

.cta-label {
    margin-bottom: 16px;
}

.cta-headline {
    margin: 0 0 16px;
    color: var(--text-primary);
    font-size: var(--heading-2);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.81px;
}

.cta-description {
    margin: 0 0 24px;
    color: var(--text-primary);
    font-size: var(--supporting);
    line-height: 1.5;
}

.cta-form,
.form-group {
    display: flex;
    flex-direction: column;
}

.cta-form {
    margin: 0;
}

.form-group {
    text-align: left;
}

.form-group label {
    margin: 0 0 8px;
    color: var(--text-secondary);
    font: 500 12px / 1.2 var(--font-form);
}

.form-group input {
    width: 100%;
    min-height: 48px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    font: 400 16px var(--font-body);
}

.form-group input::placeholder {
    color: #8a969a;
}

.form-group input:focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 1px var(--accent);
}

.form-group input.invalid,
.form-group input.invalid:focus {
    border-color: var(--error);
    background: rgba(255, 34, 68, 0.04);
    box-shadow: 0 0 0 1px var(--error);
}

.cta-button {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: var(--text-primary);
    font: 600 14px / 1.2 var(--font-form);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.cta-button:hover:not(:disabled) {
    background: var(--text-inverse);
}

.cta-button:active {
    background: var(--background-secondary);
}

.cta-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.cta-button.loading {
    color: transparent;
    cursor: wait;
}

.cta-button.loading::after {
    position: absolute;
    inset: 0;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid #fff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: form-spinner 0.7s linear infinite;
    content: "";
}

.cta-button.success {
    pointer-events: none;
}

.cta-button.error {
    background: rgba(255, 34, 68, 0.15);
    color: #ff2244;
}

@keyframes form-spinner {
    to {
        transform: rotate(360deg);
    }
}

.arrow {
    font-size: 18px;
    font-weight: 700;
}

.cta-footer {
    margin: 14px 0 0;
    color: var(--text-secondary);
    font-size: var(--body-size);
    line-height: 1.5;
    text-align: center;
}

.submit-error {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 34, 68, 0.15);
    color: #ff2244;
    font-size: 14px;
    font-weight: 600;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

.results-wrapper :focus-visible {
    outline-color: var(--accent);
}

@media (max-width: 809px) {
    .wrap {
        padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(28px + env(safe-area-inset-bottom, 0px));
    }

    .quiz-screen,
    .cta-container {
        grid-template-columns: minmax(0, 1fr);
    }

    .quiz-screen {
        min-height: 0;
    }

    .assessment-sidebar,
    .results-wrapper,
    .form-wrapper {
        padding: 32px 24px;
    }

    .assessment-sidebar .stepper {
        display: none;
    }

    .assessment-sidebar .sidebar-intro h1 {
        font-size: var(--heading-2);
    }

    .assessment-sidebar .sidebar-intro p {
        margin-bottom: 0;
    }

    .assessment-content {
        padding: 28px 24px 32px;
    }

    #result,
    .cta-container {
        min-height: 0;
    }
}

@media (max-width: 520px) {
    .wrap {
        padding-right: 12px;
        padding-left: 12px;
    }

    .assessment-sidebar,
    .results-wrapper,
    .form-wrapper {
        padding: 28px 20px;
    }

    .assessment-content {
        padding: 24px 18px 28px;
    }

    .quiz-progress-meta {
        align-items: center;
        margin-bottom: 24px;
    }

    .progress-text,
    .question-category {
        font-size: 12px;
    }

    .opt {
        min-height: 52px;
        padding: 14px 14px 14px 48px;
        font-size: 14px;
    }

    .opt::before {
        left: 14px;
    }

}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

[hidden] {
    display: none !important;
}

.request-success {
    padding: 4px 0;
}

.request-success .success-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 0 20px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-primary);
}

.success-icon .material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-size: 28px;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    font-feature-settings: "liga";
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
}

.request-success .success-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: var(--eyebrow);
    font-weight: 500;
    letter-spacing: 0.06em;
    line-height: 24px;
    text-transform: uppercase;
}

.request-success .success-eyebrow::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
}

.request-success h2 {
    margin: 0 0 16px;
    color: var(--text-primary);
    font-size: var(--heading-2);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.81px;
}

.request-success h2:focus {
    outline: 0;
}

.request-success h2 em {
    font-style: normal;
    background: linear-gradient(transparent 64%, var(--accent) 64%);
}

.request-success .success-copy {
    margin: 0 0 24px;
    color: var(--text-primary);
    font-size: var(--supporting);
    line-height: 1.5;
}

.next-steps {
    margin: 0 0 24px;
    padding: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.next-steps li {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.next-steps strong,
.next-steps span {
    display: block;
}

.next-steps strong {
    color: var(--text-primary);
    font-weight: 600;
}

.next-steps span {
    color: var(--text-secondary);
}