/* The eight-step signup.
 *
 * Mobile-first, because this is the one flow where that is not a slogan:
 * step 5 is photographing an identity document, and a phone camera is the
 * instrument most people will use (BRAND_UX_SPEC §9.1).
 *
 * Only tokens from tokens.css. Components come from exchange.css.
 */

.ob-wrap {
  max-width: 44rem;
  padding-top: var(--s-10);
  padding-bottom: var(--s-16);
  display: flex; flex-direction: column; gap: var(--s-6);
}

/* ── Progress ───────────────────────────────────────────────────────── */

.ob-progress { display: flex; flex-direction: column; gap: var(--s-3); }

.ob-dots {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: var(--s-1);
}
.ob-dot {
  flex: 1; height: 3px; border-radius: 2px;
  background: var(--line-strong);
}
.ob-dot.is-done    { background: var(--signal); }
/* The current step is distinguished by more than colour: it is taller as
   well, so the position survives greyscale and colour blindness. */
.ob-dot.is-current { background: var(--signal); height: 5px; margin-top: -1px; }

.ob-progress__text { margin: 0; font-size: 14px; color: var(--ink-2); }

/* ── The card ───────────────────────────────────────────────────────── */

.ob-card {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--surface-raised); padding: var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-5);
}

.ob-h { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.015em; }
.ob-lead { margin: 0; color: var(--ink-2); text-wrap: pretty; }

.ob-fields { display: flex; flex-direction: column; gap: var(--s-4); }

/* Two columns at md and above, one below. A given-name field at half
   width on a 390px screen is a field nobody can read what they typed in. */
.ob-pair { display: grid; gap: var(--s-4); }
@media (min-width: 600px) { .ob-pair { grid-template-columns: 1fr 1fr; } }

.ob-field { display: flex; flex-direction: column; gap: var(--s-1); }
.ob-field__label { font-size: 14px; color: var(--ink-2); font-weight: 500; }

/* "Why we ask", beside the question rather than in a help page. These are
   legally required questions about identity and money, and the person
   answering is entitled to the reason without going looking. */
.ob-why {
  margin: 0; font-size: 13px; color: var(--ink-3);
  border-left: 2px solid var(--line-input); padding-left: var(--s-3);
}
.ob-help { margin: 0; font-size: 13px; color: var(--ink-3); }
.ob-error { margin: 0; font-size: 13px; color: var(--neg); }

/* ── Choices ────────────────────────────────────────────────────────── */

/* Selectable cards. The border is --line-input because this is a control
   a person operates, and WCAG 1.4.11 wants 3:1 for one. */
.ob-choices { display: flex; flex-direction: column; gap: var(--s-3); }
.ob-choice {
  display: flex; gap: var(--s-4); align-items: flex-start;
  padding: var(--s-4); cursor: pointer;
  border: 1px solid var(--line-input); border-radius: var(--r-lg);
}
.ob-choice:hover { border-color: var(--ink-3); }
.ob-choice:has(input:checked) { border-color: var(--signal); border-width: 2px; padding: calc(var(--s-4) - 1px); }
.ob-choice__text { display: flex; flex-direction: column; gap: 2px; }
.ob-choice__title { font-weight: 600; }
.ob-choice__body { font-size: 14px; color: var(--ink-2); text-wrap: pretty; }

/* ── Actions ────────────────────────────────────────────────────────── */

/* The primary action comes first in the source so it is first in the tab
   order, and sits in the thumb's reach on a phone. */
.ob-actions {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  padding-top: var(--s-2);
}
.ob-actions--split { justify-content: space-between; }

.ob-later { margin: 0; font-size: 14px; color: var(--ink-3); text-align: center; }

.ob-flash {
  margin: 0; padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md); font-size: 14px;
  border: 1.5px solid var(--warn); background: var(--warn-wash); color: var(--ink);
}
.ob-flash--error { border-color: var(--neg); background: color-mix(in oklch, var(--neg) 10%, transparent); }

/* ── Documents ──────────────────────────────────────────────────────── */

.ob-docs { display: flex; flex-direction: column; gap: var(--s-3); }
.ob-doc {
  display: flex; gap: var(--s-4); align-items: center;
  border: 1px dashed var(--line-input); border-radius: var(--r-lg);
  padding: var(--s-4);
}
.ob-doc__thumb {
  width: 56px; height: 40px; flex: none;
  border-radius: var(--r-sm); background: var(--surface-sunken);
  display: grid; place-items: center;
  font-family: var(--f-num); font-size: 11px; color: var(--ink-3);
}
.ob-doc__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ob-doc__title { font-weight: 500; }
.ob-doc__state { font-size: 13px; color: var(--ink-3); }

/* ── The second factor ──────────────────────────────────────────────── */

.ob-qr {
  display: grid; place-items: center; padding: var(--s-4);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.ob-qr img { display: block; max-width: 180px; height: auto; }
.ob-secret {
  font-family: var(--f-num); font-size: 14px; letter-spacing: 0.08em;
  word-break: break-all; color: var(--ink-2);
}

/* A code field is read back digit by digit, so it is wide and spaced. */
.x-input--code {
  font-family: var(--f-num); font-size: 20px;
  letter-spacing: 0.3em; text-align: center; max-width: 12rem;
}
