:root {
    --bg-main: #020517;
    --text-main: #ffffff;
    --text-muted: #7d829f;
    --text-faint: #6b7280;
    --line-soft: rgba(255, 255, 255, 0.1);
    --line-fainter: rgba(255, 255, 255, 0.08);
    --card-muted: #191c2d;
    --brand-blue: #2065ee;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Inter", "Instrument Sans", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(1300px 600px at 8% 100%, rgba(32, 101, 238, 0.22) 0%, rgba(2, 5, 23, 0) 55%),
        radial-gradient(900px 500px at 92% 0%, rgba(66, 123, 255, 0.16) 0%, rgba(2, 5, 23, 0) 52%),
        var(--bg-main);
}

a {
    color: inherit;
}

.onboarding-page {
    background-color: #020517;
    min-height: 100vh;
}

.onboarding-shell {
    width: 100%;
    max-width: 1920px;
    min-height: calc(100vh - 48px);
    border-radius: 24px;
    backdrop-filter: blur(3px);
    margin: 0 auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.brand-bar {
    margin-bottom: 40px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-logo {
    width: 40px;
    height: 40px;
}

.brand-name {
    font-family: "Instrument Sans", "Inter", sans-serif;
    font-weight: 600;
    font-size: 31px;
    line-height: 1;
    letter-spacing: 0.01em;
}

.onboarding-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    min-height: 0;
    flex: 1;
}

.intro-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.intro-title {
    margin: 0;
    font-family: "Instrument Sans", "Inter", sans-serif;
    font-size: clamp(2.2rem, 3.4vw, 56px);
    font-weight: 500;
    line-height: 1.3;
}

.intro-subtitle {
    margin: 10px 0 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.55);
    font-size: clamp(1rem, 1.35vw, 20px);
    line-height: 1.5;
}

.steps-wrap {
    margin-top: 40px;
    gap: 24px;
    width: fit-content;
    overflow: hidden;
}

.steps-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    gap: 4px;
}

/* RAIL */

.rail-item {
    display: flex;
    align-items: center;
    position: relative;
}

.rail-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background-color: #1B1E2E;
}

.rail-vertical-stroke {
    left: 4px;
    bottom: 0;
    position: absolute;
    width: 1px;
    height: 96px;
    background-color: #1B1E2E;
}

.rail-stroke {
    width: 40px;
    height: 1px;
    background-color: #1B1E2E;
}

.rail-dot.active {
    background-color: #2065EE;
}

.rail-line {
    width: 1px;
    min-height: 42px;
    background: rgba(255, 255, 255, 0.16);
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step-card-wrapper {
    display: flex;
    align-items: center;
}

.step-card-wrapper.is-complete .rail-dot,
.step-card-wrapper.is-active .rail-dot {
    background-color: #2065ee;
}

.step-card-wrapper.is-complete .rail-stroke,
.step-card-wrapper.is-active .rail-stroke,
.step-card-wrapper.is-complete .rail-vertical-stroke,
.step-card-wrapper.is-active .rail-vertical-stroke {
    background-color: #2065ee;
}

.step-card-wrapper.is-complete .step-card,
.step-card-wrapper.is-active .step-card {
    background: var(--brand-blue);
}

.step-card-wrapper.is-complete .step-card {
    background: #101a54;
}

.step-card-wrapper.is-active .step-card {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.step-card {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 18px;
    border: 1px solid rgba(34, 38, 49, 0.08);
    background: var(--card-muted);
    padding: 14px 24px;
}

.step-card.active {
    background: var(--brand-blue);
}

.step-card p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.step-index {
    font-weight: 500;
}

.step-text {
    font-weight: 400;
}

.form-panel-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 400px;
}

.form-panel {
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
}

.form-title {
    margin: 0;
    font-size: clamp(1.3rem, 1.6vw, 24px);
    font-weight: 600;
    line-height: 1.5;
}

.launchora-form {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.step-panel {
    display: none;
    flex-direction: column;
    gap: 32px;
}

.step-panel.active {
    display: flex;
}

.step-placeholder {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
}

.step-placeholder h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.step-placeholder p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.5;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.label-row label,
.platform-group legend {
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
}

.required {
    color: var(--danger);
}

.hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 20px;
}

input[type="text"],
input[type="url"],
input[type="email"],
textarea {
    width: 100%;
    border: 1px solid transparent;
    outline: none;
    border-radius: 16px;
    background: var(--line-soft);
    padding: 16px;
    color: var(--text-main);
    font: inherit;
    transition: border-color 180ms ease, background-color 180ms ease;
}

input[type="text"]::placeholder,
input[type="url"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: var(--text-faint);
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: rgba(32, 101, 238, 0.55);
    background: rgba(255, 255, 255, 0.12);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.platform-group legend {
    padding: 0;
    margin-bottom: 16px;
}

.field-tip {
    margin: 0;
    color: var(--text-faint);
    font-size: 16px;
    line-height: 1.4;
}

.extra-url-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.extra-url-label {
    margin: 0;
    color: #8e9dbb;
    font-size: 16px;
    line-height: 1.4;
}

.add-another-btn {
    border: 1px solid transparent;
    border-radius: 4px;
    background: #4379D81A;
    color: #7479D9;
    font-size: 16px;
    line-height: 1;
    padding: 8px 12px;
    cursor: pointer;
    width: fit-content;
}

.add-another-btn:hover {
    filter: brightness(1.12);
}

.quiz-group legend {
    padding: 0;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
}

.quiz-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 16px;
    padding: 12px 0;
    background: transparent;
    max-width: 406px;
}

.quiz-question {
    margin: 0;
    max-width: 220px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.4;
}

.quiz-toggle {
    display: inline-flex;
    gap: 4px;
    border-radius: 12px;
    background: #282a3a;
    padding: 4px;
}

.quiz-choice {
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    line-height: 15px;
    padding: 8px 12px;
    min-width: 50px;
    cursor: pointer;
}

.quiz-choice.is-selected {
    background: var(--brand-blue);
    box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.25);
}

.footer-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-button {
    outline: none;
    background-color: transparent;
    border: none;
    border-radius: 16px;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.back-button.is-hidden {
    display: none;
}

.extra-policy-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-intro {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upload-lead,
.upload-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.5;
}

.inline-doc-link {
    color: #2065ee;
    font-weight: 500;
    text-decoration: none;
}

.inline-doc-link:hover,
.inline-doc-link:focus-visible {
    text-decoration: underline;
}

.upload-area {
    border-radius: 24px;
    background: #0a0b18;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.06);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    border: 1px solid transparent;
    transition: border-color 200ms ease, background-color 200ms ease;
}

.upload-area.is-dragging {
    border-color: rgba(32, 101, 238, 0.8);
    background: #101427;
}

.upload-visual {
    padding: 12px;
    border-radius: 100%;
    border: 1px solid #2065EE;
    width: 60px;
    height: 60px;
}

.upload-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.24;
    font-weight: 600;
    text-align: center;
}

.upload-subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.24;
    color: rgba(255, 255, 255, 0.32);
    text-align: center;
}

.upload-file-btn {
    border: 1px solid transparent;
    border-radius: 16px;
    background: var(--brand-blue);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.upload-file-btn svg {
    width: 20px;
    height: 20px;
}

.upload-file-btn:focus-visible {
    outline: 2px solid #adc4ff;
    outline-offset: 2px;
}

.step4-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step4-lead,
.step4-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.5;
}

.step4-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 32px;
}

.step4-half {
    width: calc(50% - 16px);
}

.step4-full {
    width: 100%;
}

.product-interest-group legend {
    padding: 0;
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
}

.product-interest-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.product-interest-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
}

.product-interest-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-interest-check {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid #afb8c9;
    background: transparent;
    position: relative;
}

.product-interest-option input:checked+.product-interest-check {
    border-color: #d4def6;
    background: linear-gradient(180deg, rgba(32, 101, 238, 0.35), rgba(32, 101, 238, 0.1));
}

.product-interest-option input:checked+.product-interest-check::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 4px;
    background: #d9e5ff;
}

.product-interest-option input:checked+.product-interest-check+span {
    color: var(--text-main);
}

.back-button svg {
    width: 24px;
    height: 24px;
}

.platform-options {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.platform-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
}

.platform-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.platform-check {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid #afb8c9;
    background: transparent;
    position: relative;
}

.platform-option input:checked+.platform-check {
    border-color: #d4def6;
    background: linear-gradient(180deg, rgba(32, 101, 238, 0.35), rgba(32, 101, 238, 0.1));
}

.platform-option input:checked+.platform-check::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 4px;
    background: #d9e5ff;
}

.platform-option input:checked+.platform-check+span {
    color: var(--text-main);
}

.form-footer {
    border-top: 1px solid var(--line-soft);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.step-progress {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    color: rgba(255, 255, 255, 0.6);
}

.form-status {
    margin: 0;
    min-height: 20px;
    color: #ffb4b4;
    font-size: 13px;
    line-height: 20px;
    flex: 1;
}

.form-status.is-success {
    color: #9ff3b0;
}

.next-button {
    border: 1px solid transparent;
    border-radius: 16px;
    background: var(--brand-blue);
    color: var(--text-main);
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 16px 16px 16px 20px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 160ms ease, filter 160ms ease;
}

.next-button svg {
    width: 24px;
    height: 24px;
}

.next-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.next-button:active {
    transform: translateY(0);
}

.next-button:focus-visible {
    outline: 2px solid #adc4ff;
    outline-offset: 2px;
}

.back-button:focus-visible,
.add-another-btn:focus-visible,
.quiz-choice:focus-visible {
    outline: 2px solid #adc4ff;
    outline-offset: 2px;
}

.support-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.5;
}

.support-text a {
    color: #5c74ff;
    text-decoration: underline;
}

.support-text a:hover,
.support-text a:focus-visible {
    text-decoration: underline;
}

@media (max-width: 1250px) {
    .onboarding-shell {
        padding: 28px;
    }

    .onboarding-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .steps-wrap {
        width: 100%;
    }

    .form-panel {
        max-width: 900px;
    }
}

@media (max-width: 760px) {

    .form-panel-wrap {
        min-width: 0;
    }

    .onboarding-shell {
        min-height: calc(100vh - 24px);
        border-radius: 20px;
        padding: 18px;
    }

    .brand-name {
        font-size: 24px;
    }

    .brand-logo {
        width: 34px;
        height: 34px;
    }

    .intro-title {
        font-size: 34px;
    }

    .intro-subtitle,
    .support-text {
        font-size: 14px;
    }

    .steps-wrap {
        gap: 14px;
    }

    .steps-list {
        gap: 14px;
    }

    .step-card {
        width: 100%;
        flex-wrap: wrap;
        gap: 4px 10px;
        padding: 10px 16px;
    }

    .form-panel {
        border-radius: 24px;
        padding: 22px;
    }

    .launchora-form {
        margin-top: 24px;
        gap: 24px;
    }

    .platform-options {
        gap: 16px;
    }

    .quiz-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .upload-area {
        padding: 28px 16px;
    }

    .step4-half {
        width: 100%;
    }

    .step4-grid {
        gap: 24px;
    }

    .upload-title {
        font-size: 18px;
    }

    .quiz-question {
        max-width: none;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .form-status {
        order: 3;
    }

    .footer-actions {
        width: 100%;
    }

    .back-button {
        width: 52px;
        height: 52px;
        flex-shrink: 0;
    }

    .next-button {
        justify-content: center;
        width: calc(100% - 60px);
    }
}
