/* Sign up and onboarding (/signup, /onboarding). Split screen: form column left, live card preview right.
   Mockup: design/mockups/Onboarding.dc.html. Light only. */

body.ob { background: var(--surface); }
.ob-wrap { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; background: var(--surface); }

/* ---------- Left column ---------- */
.ob-left { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; padding: 32px 56px; }
.ob-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ob-logo { gap: 7px; min-height: 44px; }
.ob-wordmark { font-size: 24px; }
.ob-tagline { font-size: 12px; color: var(--text-3); }
.ob-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.ob-col { width: 100%; max-width: 440px; }

.ob-progress { margin-bottom: 36px; }
.ob-progress-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ob-step-label { font-size: 12px; color: var(--text-2); }
.ob-step-name { font-size: 12px; color: var(--text-3); }
.ob-dots { display: flex; min-height: 8px; }

.ob-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--text-3); }
.ob-foot-links { display: inline-flex; gap: 20px; }
.ob-foot a { color: var(--text-3); min-height: 44px; display: inline-flex; align-items: center; }
.ob-foot a:hover { color: var(--text); }

/* ---------- Step content ---------- */
.ob-step { display: flex; flex-direction: column; }
.ob-h1 { margin: 0; font-size: 40px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; color: var(--text); }
.ob-h1:focus, .ob-h1:focus-visible { outline: none; box-shadow: none; }
.ob-lede { margin: 12px 0 32px; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.ob-strong { color: var(--text); font-size: 14.5px; }
.ob-loading { gap: 14px; }
.ob-loading .skeleton-title { height: 40px; width: 70%; }
.ob-loading .skeleton-text { width: 90%; }

.ob-lg { height: 52px; }
.ob-step .field + .field { margin-top: 0; }
.ob-step .inp-addon .ic { color: var(--text-3); }
.ob-hint-bad { color: var(--danger); font-weight: 600; }

/* Staggered entrance, replayed on every step change (the shell re-adds .is-in). */
@keyframes obInR { from { opacity: 0; transform: translate3d(20px, 6px, 0); } to { opacity: 1; transform: none; } }
@keyframes obInL { from { opacity: 0; transform: translate3d(-20px, 6px, 0); } to { opacity: 1; transform: none; } }
@keyframes obPop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes obShake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes obBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes obPulse { 0% { box-shadow: 0 0 0 0 rgba(15, 138, 74, .45); } 100% { box-shadow: 0 0 0 7px rgba(15, 138, 74, 0); } }
@keyframes obFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.ob-stg.is-in > * { animation: obInR .72s var(--ease) both; }
.ob-stg.is-in.is-back > * { animation-name: obInL; }
.ob-stg.is-in > *:nth-child(2) { animation-delay: .05s; }
.ob-stg.is-in > *:nth-child(3) { animation-delay: .10s; }
.ob-stg.is-in > *:nth-child(4) { animation-delay: .15s; }
.ob-stg.is-in > *:nth-child(5) { animation-delay: .20s; }
.ob-stg.is-in > *:nth-child(6) { animation-delay: .25s; }
.ob-stg.is-in > *:nth-child(7) { animation-delay: .30s; }
.ob-stg.is-in > *:nth-child(n+8) { animation-delay: .35s; }
.ob-pop { animation: obPop .32s var(--ease) both; }

/* ---------- Back / Continue ---------- */
.ob-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; }
.ob-nav.no-back { justify-content: flex-end; }
.ob-back { padding: 0 14px 0 10px; }
.ob-back[hidden] { display: none; }
.ob-next { min-width: 168px; }
.ob-next[hidden] { display: none; }
.ob-next-spin { display: none; width: 16px; height: 16px; border-color: rgba(255, 255, 255, .3); border-top-color: #FFFFFF; }
.ob-next.is-busy .ob-next-spin { display: inline-block; }
.ob-next.is-busy:disabled { opacity: .85; cursor: progress; }
.ob-nav.is-inline { margin-top: 16px; }
.ob-nav.is-inline .ob-next { flex: 1; }

/* ---------- Step 1: welcome ---------- */
.ob-or { display: flex; align-items: center; gap: 14px; margin: 24px 0; font: 500 12px var(--font-mono); color: var(--text-3); }
.ob-or::before, .ob-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.ob-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ob-soon-btn { height: 48px; font-size: 15px; padding: 0 12px; }
.ob-soon-btn:disabled { opacity: 1; color: var(--text-2); background: var(--surface); }
.ob-soon-btn:disabled .ob-soon-logo { opacity: .55; filter: grayscale(.35); }
.ob-soon-logo { display: inline-flex; }
.ob-soon-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; min-height: 56px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--hover); cursor: not-allowed; }
.ob-soon-row-icon { display: inline-flex; color: var(--text-3); }
.ob-soon-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.ob-soon-row-title { font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.ob-soon-row-sub { font: 500 12px var(--font-mono); color: var(--text-3); }
.ob-switch { margin: 24px 0 0; font-size: 14px; color: var(--text-2); text-align: center; }
.ob-switch a { font-weight: 600; }
.ob-consent { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--surface-2); font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
.ob-consent a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Step 2: verify ---------- */
.ob-otp { position: relative; }
.ob-otp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ob-otp-grid.is-shake { animation: obShake .42s var(--ease); }
.ob-otp-box { position: relative; height: 64px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font: 600 24px var(--font-mono); color: var(--text);
  box-shadow: var(--shadow-xs); transition: border-color var(--t-hover), box-shadow var(--t-hover), transform var(--t-hover) var(--ease); }
.ob-otp-box.is-filled { border-color: var(--border-strong); }
.ob-otp-box.is-active { border-color: var(--accent); box-shadow: var(--ring-input); }
.ob-otp-digit { animation: obPop .32s var(--ease) both; }
.ob-otp-caret { width: 2px; height: 26px; border-radius: 2px; background: var(--accent); animation: obBlink 1s steps(1) infinite; }
.ob-otp-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: text; font-size: 16px; color: transparent; caret-color: transparent; }
.ob-otp:focus-within .ob-otp-grid { outline: none; }
.ob-otp-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; min-height: 44px; }
.ob-otp-status { display: inline-flex; align-items: center; }
.ob-timer { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px var(--font-mono); color: var(--text-3); }
.ob-timer[hidden], .ob-resend[hidden] { display: none; }
.ob-resend { font: 600 12.5px var(--font-mono); }
.ob-resend span { display: inline-flex; }
.ob-dev { font: 500 12px var(--font-mono); color: var(--text-3); }
.ob-dev-code { color: var(--text); font-weight: 600; letter-spacing: .08em; }
.ob-otp-tip { margin-top: 6px; }
.ob-lede .link-btn { min-height: 0; display: inline; padding: 0; font-size: inherit; }

/* ---------- Step 3: handle ---------- */
.ob-handle-group { padding-right: 8px; }
.ob-handle-prefix { padding-right: 0; color: var(--text-3); }
.ob-handle-group .inp-bare { padding-left: 1px; }
.ob-handle-badge { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 8px; border-radius: var(--r-pill); flex: none;
  font: 600 12px var(--font-mono); animation: obPop .32s var(--ease) both; }
.ob-handle-badge[hidden] { display: none; }
.ob-handle-badge.is-ok { background: var(--success-bg); color: var(--success); }
.ob-handle-badge.is-taken { background: var(--danger-bg); color: var(--danger); }
.ob-handle-badge.is-checking { background: var(--surface-2); color: var(--text-2); }
.ob-spin { width: 12px; height: 12px; border-width: 2px; }
.ob-handle-hint { min-height: 22px; font: 500 12px var(--font-mono); color: var(--text-3); line-height: 1.5; }
.ob-handle-hint.is-ok { color: var(--success); }
.ob-handle-hint.is-bad { color: var(--danger); }
.ob-sugg { margin-top: 20px; }
.ob-sugg .label { margin-bottom: 10px; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-chip { min-height: 44px; font: 500 13px var(--font-mono); color: var(--text); background: var(--hover); }
.ob-chip:hover { background: var(--primary-soft); border-color: #D8D2FF; transform: translateY(-1px); }

/* ---------- Step 4: profile ---------- */
.ob-dz { position: relative; display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--r-card);
  border: 1.5px dashed var(--border-strong); background: var(--hover); cursor: pointer; transition: border-color var(--t-state), background-color var(--t-state); }
.ob-dz:hover { border-color: #B9B0F5; }
.ob-dz.is-over { border-color: var(--accent); background: var(--primary-soft); }
.ob-dz.is-busy { pointer-events: none; opacity: .7; }
.ob-dz:focus-within { border-color: var(--accent); box-shadow: var(--ring-input); }
.ob-av-cur { width: 72px; height: 72px; flex: none; border-radius: 50%; overflow: hidden; background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border); }
.ob-av-cur-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ob-dz-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ob-dz-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.ob-dz-ic { color: var(--accent); }
.ob-dz-sub { font-size: 12px; color: var(--text-3); line-height: 1.45; }
.ob-av-pickers { margin-top: 20px; }
.ob-av-pickers .label { margin-bottom: 10px; justify-content: flex-start; }
.ob-av-label2 { margin-top: 18px; }
.ob-av-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ob-av-opt { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: var(--surface-2); cursor: pointer;
  box-shadow: 0 0 0 1px rgba(20, 18, 37, .06); transition: transform var(--t-hover) var(--ease), box-shadow var(--t-state) var(--ease); }
.ob-av-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ob-av-opt:hover { transform: translateY(-2px); }
.ob-av-opt[aria-checked="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.ob-av-opt:focus-visible { border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary), var(--ring); }
.ob-form { display: grid; gap: 14px; margin-top: 24px; }
.ob-form .ob-two { gap: 12px; }
.ob-phone .ob-cc { display: inline-flex; flex: none; }
.ob-vsep { width: 1px; height: 24px; background: var(--border); flex: none; margin: 0 2px 0 4px; }
.ob-phone .inp-bare { padding-left: 10px; }

/* Optional gender: compact segmented control, nothing selected by default */
.ob-gender-field { margin-top: 20px; }
.ob-gender-field .label .text-3 { font-size: 11.5px; }
.ob-gender .seg-item { min-height: 40px; padding: 0 12px; font-size: 13px; }
.ob-gender:not(.has-value) .seg-ind { opacity: 0; }
.ob-gender .seg-item:focus-visible { box-shadow: var(--ring); }
.ob-av-portraits .ob-av-opt { will-change: transform; }

/* ---------- Step 5: theme (tiles sit directly on the page, no container) ---------- */
.ob-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
.ob-tile { appearance: none; background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
  display: flex; flex-direction: column; gap: 10px; min-width: 0; border-radius: var(--r-lg); }
.ob-tile:focus-visible { box-shadow: none; }
.ob-tile-face { position: relative; display: block; height: 104px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border);
  outline: 2px solid transparent; outline-offset: 3px; box-shadow: var(--shadow-xs);
  transition: outline-color var(--t-state) var(--ease), transform var(--t-state) var(--ease), box-shadow var(--t-state) var(--ease); }
.ob-tile:hover .ob-tile-face { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.ob-tile.is-on .ob-tile-face { outline-color: var(--primary); }
.ob-tile:focus-visible .ob-tile-face { box-shadow: var(--ring); }
.ob-tile-cover { position: relative; display: block; height: 34px; }
.ob-tile-av { position: relative; display: block; width: 24px; height: 24px; border-radius: 50%; margin: -12px auto 0; border: 2px solid; }
.ob-tile-l1 { display: block; width: 46%; height: 5px; border-radius: 3px; margin: 7px auto 0; }
.ob-tile-l2 { display: block; width: 30%; height: 4px; border-radius: 3px; margin: 5px auto 0; }
.ob-tile-btns { display: flex; gap: 5px; padding: 9px 14px 0; }
.ob-tile-btns span { flex: 1; height: 11px; border-radius: 5px; }
.ob-tile-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #FFFFFF;
  opacity: 0; transform: scale(.6); transition: opacity var(--t-state) var(--ease), transform var(--t-state) var(--ease); }
.ob-tile.is-on .ob-tile-check { opacity: 1; transform: scale(1); }
.ob-tile-meta { display: flex; flex-direction: column; gap: 1px; padding: 0 2px; min-width: 0; line-height: 1.35; }
.ob-tile-name { font-weight: 650; font-size: 13.5px; color: var(--text); }
.ob-tile-desc { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Right: live preview ---------- */
.ob-pv { flex: 1 1 480px; min-width: 0; margin: 16px; border-radius: var(--r-modal); position: relative; overflow: hidden;
  background-color: var(--surface-2); background-image: radial-gradient(rgba(20, 18, 37, .07) 1px, transparent 1px); background-size: 22px 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 88px 24px 40px;
  position: sticky; top: 16px; align-self: flex-start; height: calc(100vh - 32px); min-height: 700px; }
.ob-pv-top { position: absolute; top: 24px; left: 24px; right: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ob-pv-live { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-2); }
.ob-pv-live[hidden] { display: none; }
.ob-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: obPulse 1.6s var(--ease) infinite; }
.ob-pv-url { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; color: var(--text); max-width: 60%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ob-pv-url span { overflow: hidden; text-overflow: ellipsis; }
.ob-pv-stage { animation: obFloat 6s ease-in-out infinite; }
/* The card renders at its real 390x844 size and is scaled to fit the panel. */
.ob-pv-phone { width: 390px; height: 844px; transform: scale(.78); transform-origin: top center; margin-bottom: calc(844px * -.22); }
.ob-pv-note { margin: 28px 0 0; font-size: 12px; color: var(--text-3); text-align: center; }

@media (max-height: 940px) and (min-width: 901px) {
  .ob-pv-phone { transform: scale(.7); margin-bottom: calc(844px * -.3); }
}
@media (max-width: 1080px) { .ob-left { padding: 28px 32px; } }
@media (max-width: 1180px) and (min-width: 901px) {
  .ob-pv-phone { transform: scale(.64); margin-bottom: calc(844px * -.36); margin-left: -70px; margin-right: -70px; }
}

/* Below 900px the preview stacks under the form. */
@media (max-width: 900px) {
  .ob-left { flex-basis: 100%; padding: 20px 16px 32px; }
  .ob-center { padding: 32px 0; align-items: flex-start; }
  .ob-foot { display: none; }
  .ob-pv { flex-basis: 100%; position: relative; top: auto; height: auto; min-height: 0; margin: 0 16px 16px; padding: 72px 16px 32px; }
  .ob-pv-top { top: 18px; left: 16px; right: 16px; }
  .ob-pv-phone { transform: scale(.72); margin-bottom: calc(844px * -.28); margin-left: -55px; margin-right: -55px; }
}
@media (max-width: 520px) {
  .ob-h1 { font-size: 32px; }
  .ob-lede { margin-bottom: 24px; }
  .ob-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ob-otp-grid { gap: 8px; }
  .ob-otp-box { height: 56px; }
  .ob-two { grid-template-columns: minmax(0, 1fr); }
  .ob-gender .seg-item { padding: 0 9px; font-size: 12.5px; }
  .ob-progress { margin-bottom: 28px; }
  .ob-next { min-width: 0; flex: 1; }
  .ob-pv-phone { transform: scale(.68); margin-bottom: calc(844px * -.32); margin-left: -62px; margin-right: -62px; }
}

@media (prefers-reduced-motion: reduce) {
  .ob *, .ob *::before, .ob *::after { animation: none !important; transition: none !important; }
}

/* Short bio (profile step) */
.ob-bio { height: auto; min-height: 76px; padding: 12px 14px; line-height: 1.5; resize: vertical; font: 500 15px var(--font-ui); }
.ob-bio-count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ob-bio-count.is-near { color: var(--warning); }

/* Step 1: Email | Phone switch (compact, fit-content) */
.ob-via { margin-bottom: 18px; }
.ob-via .seg-item { min-height: 40px; }
.ob-via .seg-item span { display: inline-flex; }
.ob-via-panels > [hidden] { display: none; }
