/* ============================================================
   Elvantra — guided onboarding
   Structure only; every colour comes from site.css tokens, so the
   flow inherits light/dark themes with zero extra rules.
   Duolingo-shaped: segmented progress, one question per screen,
   large tap targets, feedback you can feel.
   Moniepoint/OPay-shaped: calm surfaces, confident single primary
   action parked in the thumb zone, no clutter.
   ============================================================ */

.onboard-body { min-height: 100dvh; display: flex; flex-direction: column; }
.onboard-body footer { margin-top: auto; }

/* ---- Segmented progress ---- */
.lessonbar {
  display: flex;
  gap: 6px;
  max-width: 640px;
  width: calc(100% - 40px);
  margin: 8px auto 0;
}
.lessonbar .seg {
  height: 10px;
  flex: 1;
  border-radius: 999px;
  background: var(--line);
  transition: background-color .35s ease, transform .35s ease;
}
.lessonbar .seg.done { background: var(--gold); }
.lessonbar .seg.bump { transform: scaleY(1.7); }   /* fill-then-settle */

/* ---- Screen scaffold ---- */
.lesson {
  flex: 1;
  width: calc(100% - 40px);
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 0 40px;
}
.stepcount {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.screen { animation: screen-in .28s ease both; }
.screen[hidden] { display: none; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen h1 { font-size: 30px; margin: 0 0 8px; line-height: 1.15; }
.screen .sub { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 22px; }
.screen .fine { font-size: 13px; color: var(--muted); line-height: 1.55; }
.screen .fine.center { text-align: center; }
.screen .fine a { text-decoration: underline; font-weight: 600; color: var(--gold-text); }

.flabel { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.screen input[type="email"],
.screen input[type="text"] {
  width: 100%;
  padding: 16px;
  font-size: 17px;             /* 16px+ stops iOS from zooming on focus */
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}
.screen input:focus-visible { outline: none; border-color: var(--gold); }

/* ---- Big tap-target choices (intent) ---- */
.choices { display: grid; gap: 12px; }
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px;
  min-height: 76px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .1s ease;
}
.choice:hover { border-color: var(--gold); }
.choice:active { transform: scale(.985); }
.choice[aria-checked="true"] {
  border-color: var(--gold);
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.choice .glyph { font-size: 30px; line-height: 1; }
.choice .ctext { display: grid; gap: 2px; }
.choice .ctext b { font-size: 17px; }
.choice .ctext small { color: var(--muted); font-size: 13.5px; }

/* ---- Chip groups (details) ---- */
.chipset { border: none; padding: 0; margin: 0 0 24px; }
.chipset legend { font-size: 15px; font-weight: 700; padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 12px 18px;
  min-height: 46px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.chip:hover { border-color: var(--gold); }
.chip[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--gold-ink);
}

/* ---- OTP boxes ---- */
.otp { display: flex; gap: 10px; margin: 6px 0 16px; }
.otp input {
  width: 52px;
  height: 62px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}
.otp input:focus-visible { outline: none; border-color: var(--gold); }
.otp input.filled { border-color: var(--gold); }
.otp.shake, .screen.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.devhint {
  font-size: 13px;
  color: var(--ok);
  background: var(--cream);
  border: 1px dashed var(--gold);
  border-radius: 10px;
  padding: 8px 12px;
}

/* ---- Feedback + actions ---- */
.inlineerr {
  min-height: 20px;
  margin: 6px 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--err);
}
.inlineerr:empty { display: none; }

.actions { margin-top: 26px; }
.actions.row2 { display: flex; gap: 12px; }
.actions.row2 .btn.big { flex: 1; }
.actions.stack { display: grid; gap: 12px; justify-items: stretch; }

.btn.big {
  width: 100%;
  padding: 17px 24px;
  font-size: 17px;
  min-height: 56px;             /* thumb-zone primary, Moniepoint-style */
}
.actions.row2 .btn.big { width: auto; }

.linkish {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: var(--gold-text);
  text-decoration: underline;
  cursor: pointer;
}

/* ---- Done screen ---- */
.screen-done { text-align: center; }
.screen-done .actions { justify-items: stretch; }
.trophy {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 12px;
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes pop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---- Small screens: boxes fit 375px without overflow ---- */
@media (max-width: 420px) {
  .screen h1 { font-size: 25px; }
  .otp { gap: 7px; }
  .otp input { width: 46px; height: 56px; font-size: 23px; }
  .actions.row2 { flex-direction: column-reverse; }
  .actions.row2 .btn { width: 100%; }
}

/* ---- Reduced motion: keep the feedback, drop the movement ---- */
@media (prefers-reduced-motion: reduce) {
  .screen, .trophy { animation: none; }
  .otp.shake, .screen.shake { animation: none; border-color: var(--err); }
  .lessonbar .seg { transition: none; }
}
