:root {
  color-scheme: light;
  --ink: #0b1628;
  --muted: #617086;
  --line: #dfe6ef;
  --surface: #ffffff;
  --canvas: #f3f6fa;
  --accent: #5c43e6;
  --accent-dark: #4631c8;
  --success: #0f9f78;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.onboarding-shell { min-height: 100vh; padding: 24px clamp(18px, 4vw, 64px) 48px; }
.brand-row { max-width: 1180px; margin: 0 auto 28px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; color: white; background: var(--accent); border-radius: 13px; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 10px 25px rgba(92,67,230,.2); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 10px; }
.setup-layout { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.1fr); border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: 0 24px 70px rgba(20, 31, 52, .12); min-height: 650px; }
.intro-panel { padding: clamp(40px, 6vw, 76px); color: white; background: radial-gradient(circle at 85% 15%, rgba(117,93,255,.4), transparent 32%), linear-gradient(155deg, #101b32 0%, #0b1628 100%); }
.eyebrow, .step-label { margin: 0 0 10px; color: #a99dff; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.intro-panel h1 { margin: 0; max-width: 460px; font-size: clamp(34px, 4vw, 54px); line-height: 1.03; letter-spacing: -.045em; }
.intro-panel > p:not(.eyebrow) { max-width: 470px; color: #bdc8da; line-height: 1.65; }
.steps { margin: 54px 0 0; padding: 0; display: grid; gap: 22px; list-style: none; }
.steps li { display: flex; align-items: center; gap: 14px; color: #8694aa; transition: .2s ease; }
.steps li > span { width: 34px; height: 34px; border: 1px solid #46536a; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.steps strong, .steps small { display: block; }
.steps small { margin-top: 2px; }
.steps li.active, .steps li.done { color: white; }
.steps li.active > span { border-color: #8c79ff; background: var(--accent); }
.steps li.done > span { border-color: #38c9a0; background: #157a63; }
.form-card { position: relative; padding: clamp(34px, 6vw, 74px); display: flex; align-items: center; }
.view { width: 100%; }
.view[hidden], [hidden] { display: none !important; }
.view h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.035em; }
.form-copy { margin: 12px 0 28px; color: var(--muted); line-height: 1.55; }
label { display: grid; gap: 8px; margin: 16px 0; font-size: 13px; font-weight: 750; }
input, select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(92,67,230,.1); }
.field-help { display: block; color: var(--muted); line-height: 1.45; }
.primary-button, .secondary-button { width: 100%; min-height: 50px; border-radius: 13px; padding: 0 20px; font-weight: 800; cursor: pointer; }
.primary-button { margin-top: 24px; border: 0; color: white; background: var(--accent); box-shadow: 0 12px 22px rgba(92,67,230,.2); }
.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { opacity: .65; cursor: wait; }
.secondary-button { margin-top: 12px; border: 1px solid var(--line); color: var(--ink); background: white; }
.link-button { display: grid; place-items: center; text-decoration: none; }
.security-note { display: flex; gap: 10px; margin-top: 18px; padding: 13px; border-radius: 12px; color: #275a4d; background: #edf9f5; font-size: 12px; line-height: 1.45; }
.security-note p { margin: 0; }
.error-banner { position: absolute; top: 22px; left: clamp(34px,6vw,74px); right: clamp(34px,6vw,74px); border: 1px solid #f3b8be; border-radius: 12px; padding: 12px 14px; color: #982b38; background: #fff2f3; font-size: 13px; }
.error-banner strong, .error-banner span { display: block; }
.error-banner span { margin-top: 3px; }
.centered { text-align: center; }
.spinner { display: inline-block; width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.success-mark { width: 70px; height: 70px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--success); font-size: 34px; font-weight: 800; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 780px) {
  .onboarding-shell { padding: 16px 0 0; }
  .brand-row { margin: 0 18px 16px; }
  .setup-layout { display: block; min-height: calc(100vh - 76px); border-radius: 22px 22px 0 0; }
  .intro-panel { padding: 28px 22px; }
  .intro-panel h1 { font-size: 29px; }
  .intro-panel > p:not(.eyebrow) { display: none; }
  .steps { margin-top: 24px; grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .steps li { display: grid; justify-items: center; gap: 6px; text-align: center; }
  .steps li div small { display: none; }
  .steps li strong { font-size: 10px; }
  .form-card { min-height: 530px; padding: 34px 22px 48px; align-items: flex-start; }
  .error-banner { position: static; margin-bottom: 18px; }
  .view h2 { font-size: 29px; }
}
