/* File: web/assets/onboarding.css — layout for the signup wizard only.
 *
 * Kept out of style.css deliberately: that file is 140KB shared by the landing page and
 * the dashboard and is CDN-cached for 4h, so a cache-bust there re-downloads it for every
 * existing visitor to serve a page most of them will never open. Everything here reuses
 * style.css's variables (--panel, --border, --accent, …) so the two themes stay in step.
 *
 * No inline <style> or style="" anywhere in onboarding.html: /onboarding is served under
 * the same `style-src 'self'` CSP as /dashboard, which blocks both.
 */

.ob-head { margin: 34px 0 22px; }
.ob-head h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.ob-head p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 62ch; }

/* Step rail — also the completion readout, so a resumed signup shows at a glance which
   steps are already done rather than making the user re-walk them to find out. */
.ob-rail { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ob-step {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--panel);
  color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: var(--font); transition: border-color .15s, color .15s, background .15s;
}
.ob-step:hover:not(:disabled) { color: var(--text); }
.ob-step:disabled { cursor: default; }
.ob-step[aria-current="step"] { border-color: var(--accent); color: var(--text); background: var(--panel-2); }
.ob-step .ob-tick { font-size: 12px; opacity: .45; }
.ob-step.is-done .ob-tick { opacity: 1; color: var(--ok); }

/* style.css only defines `.hero .note`, so a bare .note inside a panel here would render
   as unstyled body copy. Scoped to the wizard rather than added to the shared sheet — see
   the cache note at the top of this file. */
#wizard .note { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
#wizard .note + .note { margin-top: -8px; }

.ob-req { color: var(--err); font-weight: 600; }
.ob-group-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }

/* A rejected field has to be findable in a twenty-field form, not just named in a message
   at the bottom of it. */
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--err); background: color-mix(in srgb, var(--err) 6%, transparent);
}

.ob-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ob-grid .ob-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .ob-grid { grid-template-columns: 1fr; } }

/* .field in style.css only styles `input`; the wizard also needs selects and textareas. */
.field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font-size: 14.5px; font-family: var(--font);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { min-height: 84px; resize: vertical; }
.field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--panel); box-shadow: 0 0 0 3px var(--glow); }
.field .ob-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--faint); }

/* Repeating blocks (one education entry, one job). */
.ob-entry { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 16px 2px; margin-bottom: 12px; background: var(--bg-soft); }
.ob-entry-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ob-entry-head strong { font-size: 13px; letter-spacing: -.01em; }
.ob-remove { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 12px; font-family: var(--font); padding: 4px 6px; }
.ob-remove:hover { color: var(--err); }

.ob-choice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--bg-soft); }
.ob-choice input { margin-top: 3px; }
.ob-choice span { font-size: 14px; }
.ob-choice small { display: block; color: var(--faint); font-size: 12px; margin-top: 3px; }
.ob-choice.is-off { opacity: .6; }

.ob-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.ob-actions .ob-spacer { flex: 1; }

.ob-file { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Phone verification (optional, unlocks the free grant — see initPhoneVerify()). */
.ob-phone-verify { display: flex; gap: 8px; align-items: center; margin: 8px 0 0; flex-wrap: wrap; }
.ob-phone-verify input { flex: 0 1 160px; }
.ob-phone-state { font-size: 13px; color: var(--muted); }
.ob-phone-state.good { color: var(--ok); font-weight: 600; }
.ob-phone-state.bad { color: var(--warn); }
