/* ============================================================
   Onboarding flow — /register (replaces the old single-form page).

   A multi-step wizard: account creation → welcome → optional
   one-question-per-screen profile → done. The accent + background
   interpolate from the landing navy/blue toward the dashboard
   gray/teal as the user advances; onboarding.js sets the per-step
   CSS variables (--ob-ac, --ob-ac2, --ob-fg, --ob-mut, --ob-bg-top,
   --ob-bg-bot, --ob-aurora) on #onboarding-root each render.

   Recreated from the Claude Design handoff (Onboarding Flow.dc.html
   + Screen.dc.html). No bundler — plain CSS, loaded via <link>.
   ============================================================ */

#onboarding-root {
    /* Fallbacks — JS overrides these per step. */
    --ob-ac: #4A9EFF;
    --ob-ac2: #6BB3FF;
    --ob-fg: #ffffff;
    --ob-mut: #9bb3cc;
    --ob-bg-top: #041830;
    --ob-bg-bot: #020e1f;
    --ob-aurora: 0.55;

    position: relative;
    flex: 1 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    color: var(--ob-fg);
    font-family: 'Inter', system-ui, sans-serif;
    background: linear-gradient(165deg, var(--ob-bg-top), var(--ob-bg-bot));
    transition: background 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- Aurora ambient blobs ---- */
.ob-aurora {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: var(--ob-aurora);
    transition: opacity 800ms ease;
}
.ob-aurora-a {
    top: -120px;
    right: -80px;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, var(--ob-ac) 0%, transparent 70%);
    filter: blur(110px);
    animation: obAuroraDrift 18s ease-in-out infinite;
}
.ob-aurora-b {
    bottom: -140px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(223, 129, 35, 0.4) 0%, transparent 70%);
    filter: blur(120px);
    animation: obAuroraDrift 24s ease-in-out infinite reverse;
}
@keyframes obAuroraDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(30px, -24px) scale(1.12); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ---- Stage / card ---- */
.ob-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 96px 24px 64px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ---- Progress rail ---- */
.ob-rail {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    overflow-x: auto;
    padding: 4px 0 2px;
    scrollbar-width: none;
}
.ob-rail::-webkit-scrollbar { display: none; }
.ob-rail-step {
    display: flex;
    align-items: center;
    flex: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.ob-rail-step[disabled] { cursor: default; }
.ob-rail-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
}
.ob-rail-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex: none;
    transition: all .2s ease;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ob-rail-dot.is-done {
    color: #fff;
    background: color-mix(in srgb, var(--ob-ac) 25%, transparent);
}
.ob-rail-dot.is-active {
    color: #fff;
    background: var(--ob-ac);
    border-color: var(--ob-ac);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ob-ac) 18%, transparent);
}
.ob-rail-label {
    font-size: 10.5px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 68px;
    color: #6b7280;
}
.ob-rail-label.is-active { font-weight: 700; color: var(--ob-fg); }
.ob-rail-line {
    width: 28px;
    height: 2px;
    margin: 0 2px 22px;
    background: rgba(255, 255, 255, 0.08);
}
.ob-rail-line.is-done { background: color-mix(in srgb, var(--ob-ac) 50%, transparent); }

/* ---- Card surface ---- */
.ob-card {
    position: relative;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 36px 40px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    animation: obFadeUp .35s ease;
}
@keyframes obFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ob-eyebrow {
    font-size: 11px;
    letter-spacing: .16em;
    font-weight: 600;
    color: var(--ob-ac2);
    text-transform: uppercase;
}
.ob-title {
    font-size: 30px;
    font-weight: 700;
    margin: 10px 0 6px;
    letter-spacing: -0.02em;
    text-wrap: pretty;
    line-height: 1.15;
}
.ob-lede {
    font-size: 14px;
    line-height: 1.55;
    color: var(--ob-mut);
    margin: 0 0 22px;
}

/* ---- Form fields ---- */
.ob-fields { display: flex; flex-direction: column; gap: 14px; }
.ob-field { display: flex; flex-direction: column; }
.ob-row { display: flex; gap: 12px; }
.ob-row > .ob-field { flex: 1; min-width: 140px; }
.ob-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ob-mut);
    margin-bottom: 6px;
}
.ob-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid color-mix(in srgb, var(--ob-ac) 30%, transparent);
    color: var(--ob-fg);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ob-input::placeholder { color: var(--ob-mut); opacity: .8; }
.ob-input:focus {
    border-color: var(--ob-ac);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ob-ac) 20%, transparent);
}
.ob-hint { font-size: 11px; color: var(--ob-mut); margin-top: 5px; }
.ob-error {
    font-size: 12.5px;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    padding: 10px 13px;
    margin-bottom: 4px;
    display: none;
}
.ob-error.show { display: block; }

.ob-pw-wrap { position: relative; }
.ob-pw-wrap .ob-input { padding-right: 44px; }
.ob-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ob-mut);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.ob-pw-toggle svg { width: 18px; height: 18px; }

/* ---- Section label ---- */
.ob-section-label {
    margin: 22px 0 4px;
    font-size: 11px;
    letter-spacing: .14em;
    font-weight: 600;
    color: var(--ob-mut);
    text-transform: uppercase;
}

/* ---- Legal callouts ---- */
.ob-callouts { display: flex; flex-direction: column; gap: 8px; }
.ob-callout {
    padding: 11px 13px;
    border-radius: 9px;
}
.ob-callout-risk {
    background: rgba(223, 129, 35, 0.08);
    border: 1px solid rgba(252, 196, 25, 0.28);
    border-left: 3px solid #DF8123;
}
.ob-callout-info {
    background: color-mix(in srgb, var(--ob-ac) 7%, transparent);
    border: 1px solid color-mix(in srgb, var(--ob-ac) 22%, transparent);
    border-left: 3px solid var(--ob-ac);
}
.ob-callout-head { font-size: 12.5px; font-weight: 700; margin-bottom: 3px; }
.ob-callout-risk .ob-callout-head { color: #FFBC3A; }
.ob-callout-info .ob-callout-head { color: var(--ob-ac2); }
.ob-callout-body { font-size: 12px; line-height: 1.5; color: var(--ob-mut); }

/* ---- Consent gates ---- */
.ob-consents { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.ob-consent {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
}
.ob-checkbox {
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: all .15s ease;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 12px;
    line-height: 1;
}
.ob-checkbox.is-checked { background: var(--ob-ac); border-color: var(--ob-ac); }
.ob-consent-text { font-size: 12.5px; line-height: 1.5; color: var(--ob-fg); }
.ob-consent-text.muted { color: var(--ob-mut); }
.ob-consent-text a { color: var(--ob-ac2); text-decoration: underline; }

/* ---- Chip options ---- */
.ob-chips { display: flex; flex-direction: column; gap: 10px; }
.ob-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ob-fg);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    transition: all .15s ease;
    width: 100%;
    box-sizing: border-box;
}
.ob-chip:hover { border-color: color-mix(in srgb, var(--ob-ac) 55%, transparent); }
.ob-chip.is-selected {
    border-color: var(--ob-ac);
    background: color-mix(in srgb, var(--ob-ac) 14%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ob-ac) 16%, transparent);
}
.ob-chip-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: transparent;
    transition: all .15s ease;
}
.ob-chip.is-selected .ob-chip-dot {
    border-color: var(--ob-ac);
    background: var(--ob-ac);
    color: #fff;
}
.ob-chips-hint { margin: -2px 0 12px; font-size: 12.5px; color: var(--ob-mut); }
.ob-followup { margin-top: -2px; }

/* ---- Buttons ---- */
.ob-btn {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.ob-btn:disabled { cursor: not-allowed; }
.ob-btn-primary {
    padding: 13px 26px;
    border: none;
    background: linear-gradient(135deg, color-mix(in srgb, var(--ob-ac) 85%, transparent), var(--ob-ac));
    color: #fff;
    font-size: 13px;
    letter-spacing: .02em;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--ob-ac) 35%, transparent);
    flex: none;
}
.ob-btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.ob-btn-primary:active:not(:disabled) { transform: scale(.98); }
.ob-btn-submit {
    width: 100%;
    margin-top: 22px;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}
.ob-btn-submit.is-enabled {
    background: linear-gradient(135deg, color-mix(in srgb, var(--ob-ac) 85%, transparent), var(--ob-ac));
    color: #fff;
    box-shadow: 0 6px 22px color-mix(in srgb, var(--ob-ac) 40%, transparent);
}
.ob-btn-submit.is-disabled {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.35);
    box-shadow: none;
}
.ob-btn-ghost {
    padding: 11px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: var(--ob-mut);
    font-size: 13px;
    font-weight: 600;
}
.ob-btn-skip {
    padding: 11px 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: transparent;
    color: var(--ob-mut);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.ob-btn-skip-link {
    padding: 11px 8px;
    border: none;
    background: transparent;
    color: var(--ob-mut);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-family: 'Inter', sans-serif;
}

.ob-nav-row { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.ob-nav-spacer { flex: 1; }

.ob-signin-row { text-align: center; font-size: 12.5px; color: var(--ob-mut); margin-top: 14px; }
.ob-signin-row a { color: var(--ob-ac2); text-decoration: none; font-weight: 600; }

/* ---- Centered states (welcome / done-off) ---- */
.ob-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.ob-badge-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 20px;
}
.ob-badge-circle.green {
    background: rgba(81, 207, 102, 0.12);
    border: 1px solid rgba(81, 207, 102, 0.4);
    color: #51cf66;
}
.ob-badge-circle.accent {
    background: color-mix(in srgb, var(--ob-ac) 14%, transparent);
    border: 1px solid var(--ob-ac);
    color: var(--ob-ac2);
}
.ob-pending-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 9999px;
    background: rgba(252, 196, 25, 0.1);
    border: 1px solid rgba(252, 196, 25, 0.3);
    font-size: 12px;
    font-weight: 600;
    color: #fcc419;
    margin-bottom: 26px;
}
.ob-pending-pill span { font-size: 9px; }
.ob-cta-stack { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 300px; }
.ob-fineprint { font-size: 11.5px; color: var(--ob-mut); margin-top: 18px; opacity: .8; }

/* ---- "What happens next" steps list (done-off) ---- */
.ob-next-steps {
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}
.ob-next-step {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 14px 16px;
    background: rgba(12, 19, 32, 0.6);
}
.ob-next-num {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ob-ac) 18%, transparent);
    color: var(--ob-ac2);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ob-next-title { font-size: 13.5px; font-weight: 600; }
.ob-next-sub { font-size: 12px; color: var(--ob-mut); }

/* ---- Community done (referral + pulse) ---- */
.ob-comm-card {
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-sizing: border-box;
}
.ob-comm-card + .ob-comm-card,
.ob-comm-row { margin-top: 12px; }
.ob-comm-row { display: flex; gap: 12px; }
.ob-comm-row > .ob-comm-card { flex: 1; min-width: 160px; margin-top: 0; }
.ob-comm-card-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}
.ob-comm-card-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ob-mut);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 12px;
}
.ob-reflink-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ob-reflink {
    flex: 1;
    min-width: 180px;
    font-family: ui-monospace, monospace;
    font-size: 12.5px;
    padding: 11px 13px;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ob-ac2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ob-copy-btn {
    padding: 11px 16px;
    border: none;
    border-radius: 9px;
    background: var(--ob-ac);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.ob-share-row { display: flex; gap: 8px; margin-top: 12px; }
.ob-share-btn {
    flex: 1;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--ob-fg);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    text-align: center;
}
.ob-comm-note { font-size: 11.5px; color: var(--ob-mut); margin-top: 12px; line-height: 1.5; }
.ob-comm-note strong { color: var(--ob-fg); }
.ob-points { display: flex; gap: 18px; }
.ob-points-value { font-size: 26px; font-weight: 700; }
.ob-points-value.pending { color: #fcc419; }
.ob-points-label { font-size: 11px; color: var(--ob-mut); }
.ob-milestone-track {
    height: 7px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 14px;
    overflow: hidden;
}
.ob-milestone-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ob-ac), var(--ob-ac2));
    border-radius: 9999px;
    transition: width .4s ease;
}
.ob-milestone-caption { font-size: 11px; color: var(--ob-mut); margin-top: 7px; }
.ob-milestone-caption a { color: var(--ob-ac2); text-decoration: none; }
.ob-pulse-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}
.ob-pulse-btn.ready {
    background: linear-gradient(135deg, #51cf66, #2fb84f);
    color: #06250f;
    box-shadow: 0 5px 16px rgba(81, 207, 102, 0.3);
}
.ob-pulse-btn.claimed {
    background: rgba(255, 255, 255, 0.07);
    color: var(--ob-mut);
    cursor: not-allowed;
}
.ob-handle-row { display: flex; align-items: center; gap: 9px; }
.ob-handle-name { font-size: 15px; font-weight: 700; color: var(--ob-ac2); }
.ob-reroll-btn {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    background: transparent;
    color: var(--ob-mut);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.ob-optin {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--ob-mut);
    font-size: 12.5px;
}
.ob-toggle-track {
    width: 40px;
    height: 23px;
    border-radius: 9999px;
    padding: 2px;
    box-sizing: border-box;
    transition: background .2s ease;
    background: rgba(255, 255, 255, 0.18);
    flex: none;
}
.ob-toggle-track.on { background: var(--ob-ac); }
.ob-toggle-knob {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}
.ob-toggle-track.on .ob-toggle-knob { transform: translateX(17px); }
.ob-comm-split { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- Footer disclaimer ---- */
.ob-footer {
    position: relative;
    z-index: 1;
    padding: 14px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 10.5px;
    line-height: 1.5;
    color: #5c636e;
    text-align: center;
}
.ob-footer a { color: #6b7280; }

/* ---- Responsive (mobile-first feel on narrow viewports) ---- */
@media (max-width: 560px) {
    .ob-stage { padding: 80px 14px 48px; gap: 16px; }
    .ob-card { padding: 24px 20px; border-radius: 14px; }
    .ob-title { font-size: 24px; }
    .ob-row { flex-wrap: wrap; }
    .ob-comm-row { flex-wrap: wrap; }
    .ob-rail-col { min-width: 58px; }
    .ob-rail-line { width: 18px; }
}
