:root {
  --blue: #00a6fb; --blue-ink: #0086cf; --tint: #d6f0ff; --tint-2: #d2ecff;
  --canvas: #fbfdff; --ink: #1d2b3a; --soft: #5b6a7d; --faint: #8b97a8;
  --line: #e9eef5; --card: #fff; --wait-bg: #fff7e6; --wait-line: #f0c674; --wait-ink: #9a6a00;
  --ok: #2a9d4a; --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink);
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif; }
#app { min-height: 100vh; }

.btn { border: none; border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }
/* In-flight state (walkthrough feedback 2026-08-01): a busy control must not
   read as a clickable button — it becomes a green activity chip with a
   spinner. Scoped to :disabled so a stale .btn-busy on a re-enabled button
   harmlessly renders as a normal button again. */
.btn.btn-busy:disabled { background: #f6fcf8; color: #2f7d52; border: 1px solid #b9dfc6; cursor: default; }
.btn.btn-busy:disabled::before { content: ''; display: inline-block; width: 11px; height: 11px;
  border: 2px solid #b9dfc6; border-top-color: #2f7d52; border-radius: 50%;
  margin-right: 8px; vertical-align: -2px; animation: btn-busy-spin .8s linear infinite; }
@keyframes btn-busy-spin { to { transform: rotate(360deg); } }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-ink); }
.btn-ghost { background: #fff; color: var(--blue-ink); border: 1px solid var(--tint-2); }

/* ===== Task 25: sim-mode banner (persistent, every screen incl. the picker) =====
   Slim, high-contrast, deliberately NOT the primary-button blue (design system:
   chrome must never compete visually with the screen's real action) — a dark
   hazard-stripe amber reads as "dev/system mode", distinct from both --blue
   (primary actions) and --wait-ink/--wait-bg (the funds/DDPI wait-card amber,
   a much lighter tint). role="status" is set inline by app.js (shell()). */
.sim-banner { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 7px 16px; background: #2a2113; color: #ffd166;
  font-size: 12.5px; font-weight: 700; letter-spacing: .03em;
  border-bottom: 2px solid #ffd166; }
.sim-banner-label::before { content: "⚠ "; }
.sim-banner-actions { display: flex; align-items: center; gap: 10px; }
.sim-banner .sim-next, .sim-banner .sim-variant-link {
  background: transparent; color: #ffd166; border: 1px solid rgba(255,209,102,.55);
  border-radius: 7px; padding: 4px 11px; font-size: 12px; font-weight: 700;
  cursor: pointer; text-transform: none; letter-spacing: normal; }
.sim-banner .sim-next:hover, .sim-banner .sim-variant-link:hover { background: rgba(255,209,102,.12); }
.sim-banner .sim-next:disabled, .sim-banner .sim-variant-link:disabled { opacity: .5; cursor: default; }

/* ===== Two-pane app shell: blue guidance rail | outlined action panel ===== */
.shell { display: flex; min-height: 100vh; align-items: stretch; }

/* Left guidance rail */
.rail { width: 40%; max-width: 420px; position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(165deg, #0093e6, var(--blue) 60%, #37bdff);
  display: flex; flex-direction: column; justify-content: center; padding: 40px 34px; }
.rail .ring { position: absolute; border: 2px solid rgba(255, 255, 255, .18); border-radius: 50%; }
.rail .r1 { width: 200px; height: 200px; bottom: -56px; left: -50px; }
.rail .r2 { width: 110px; height: 110px; top: 40px; left: 48px; }
.rail-inner { position: relative; max-width: 340px; }
.rail .mark { width: 54px; height: 54px; border-radius: 17px;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .42);
  display: flex; align-items: center; justify-content: center; font-size: 29px; margin-bottom: 16px; }
.rail h1 { font-size: 24px; letter-spacing: -.025em; margin: 0 0 12px; font-weight: 800; line-height: 1.18; }
.rail .rail-lede { color: #dcf1ff; font-size: 13.5px; line-height: 1.6; margin: 0; }
.rail .rail-sub { color: #bfe6ff; font-size: 13px; line-height: 1.55; margin: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 14px; }
.rail .rail-sub b { color: #fff; }

/* Holographic value-prop tagline (Fade B: symmetric palette, seamless wrap) */
.rail .rail-tagline { font-size: 21px; font-weight: 800; line-height: 1.32; margin: 18px 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: saturate(1.25) brightness(1.12); text-shadow: 0 0 18px rgba(150, 200, 255, .25);
  background-image: linear-gradient(100deg,
    #5ef0ff 0%, #7aa8ff 16%, #c98bff 30%, #ff8fe0 42%, #c98bff 56%, #7aa8ff 72%, #5ef0ff 100%);
  background-size: 200% 100%;
  animation: holo 7s linear infinite; }
@keyframes holo { from { background-position: 0 0; } to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .rail .rail-tagline { animation: none; } }

/* Right action panel — the 2px blue outline hugs the whole pane (option A) */
.panel { flex: 1; background: #fff; border: 2px solid var(--blue);
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px clamp(48px, 7vw, 120px); min-width: 0; }
.panel-inner { width: 100%; max-width: 760px; margin: 0 auto; }
.panel-inner .panel-h { font-size: 28px; font-weight: 600; letter-spacing: -.02em;
  color: var(--ink); margin: 0 0 32px; text-align: center; }

/* Numbered step line (now inside the panel) — scaled up to fill the pane */
.panel-inner .steps { display: flex; margin: 0 0 36px; position: relative; }
.panel-inner .steps::before { content: ""; position: absolute; top: 22px; left: 11%; right: 11%;
  height: 2px; background: #cfe3f7; z-index: 0; }
.panel-inner .st { flex: 1; text-align: center; position: relative; }
.panel-inner .st i { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-style: normal;
  font-size: 18px; font-weight: 700; border: 4px solid #fff; position: relative; z-index: 1;
  box-shadow: 0 3px 9px rgba(0, 166, 251, .32); }
.panel-inner .st b { display: block; font-size: 16px; margin-top: 12px; font-weight: 700; }
.panel-inner .st small { color: var(--faint); font-size: 12.5px; }

/* "What you'll need" card */
.needs { background: #f4faff; border: 1px solid #dcecfb; border-radius: 16px; padding: 22px 26px; margin: 0 0 28px; }
.needs-h { font-size: 16px; font-weight: 700; color: #1f3550; margin-bottom: 14px; }
.needs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.needs li { font-size: 16px; color: #36495e; padding-left: 20px; position: relative; }
.needs li::before { content: ""; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.needs-more { color: #9aa8bb; font-size: 13.5px; margin: 14px 0 0; }
#start { width: 100%; padding: 19px; font-size: 18px; font-weight: 700;
  border-radius: 14px; box-shadow: 0 8px 22px rgba(0, 166, 251, .34); }

/* Narrow screens: rail stacks on top as a header band */
@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .rail { width: auto; max-width: none; padding: 28px 24px; }
  .rail-inner { max-width: none; }
  .panel { padding: 20px 16px 40px; }
}

/* Intake + option rows */
.intake h2 { font-size: 22px; font-weight: 700; margin: 0 0 18px; }

/* "What's Zerodha?" explainer */
.explainer p { color: #36495e; font-size: 16px; line-height: 1.7; margin: 0 0 14px; }
.explainer p b { color: var(--ink); font-weight: 700; }
.explainer #proceed { margin-top: 14px; padding: 15px 26px; font-size: 16px; font-weight: 700;
  border-radius: 13px; box-shadow: 0 8px 20px rgba(0, 166, 251, .34); }
.opt-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 9px; background: #fff; cursor: pointer; }
.opt-row:hover { border-color: var(--blue); }
.opt-row b { font-size: 14px; } .opt-row span { display: block; color: var(--faint); font-size: 12px; margin-top: 1px; }
.opt-row .arr { color: var(--blue); font-size: 16px; }

/* Phase cards */
/* Whole-journey dashed progress bar (2px, one dash per step) — lab.js's
   admin surface only; the wizard uses the stage rail below (2026-08-02). */
.progress { display: flex; gap: 6px; align-items: center; margin: 0 0 22px; }
.progress span { flex: 1; height: 2px; border-radius: 2px; background: #dbe3ec; }
.progress span.done { background: #34c759; }
.progress span.cur { background: var(--blue); box-shadow: 0 0 0 3px rgba(0, 166, 251, .16); }

/* ===== Wizard stage rail (design locked 2026-08-02, visual companion
   V1-B3b): four labeled stages; the current one inflates into a named band
   with a sweeping blue fill, the rest are thin segments with floating
   names. Each column is at least as wide as its own header (min-width:
   max-content) so a short stage never truncates its name; flex hands the
   remaining width out by step count. ===== */
.prog { margin: 0 0 22px; }
.prog-rail { display: flex; gap: 8px; align-items: flex-end; }
.prog-col { display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: max-content; }
.prog-seg { height: 5px; border-radius: 4px; background: #dbe3ec; width: 100%; }
.prog-seg.done { background: #34c759; }
.prog-lbl { font-size: 10.5px; font-weight: 700; white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; color: var(--faint); letter-spacing: .01em; }
.prog-lbl.done { color: #2a9d4a; }
/* The band's two text layers (.t base, .on white sweep) MUST lay out
   identically — same font, same padding, same centering — or the sweep
   clips against a differently-sized twin. Shared rule guarantees it. */
.prog-band { position: relative; width: 100%; height: 26px; border-radius: 7px;
  overflow: hidden; background: var(--tint); font-size: 11.5px; font-weight: 800; }
.prog-band > i { position: absolute; inset: 0 auto 0 0; background: var(--blue);
  width: var(--fill); }
.prog-band .t, .prog-band .on { height: 100%; display: flex; align-items: center;
  justify-content: center; gap: 6px; font-size: inherit; font-weight: inherit;
  white-space: nowrap; padding: 0 12px; }
.prog-band .t { position: relative; color: var(--blue-ink); }
.prog-band .on { position: absolute; inset: 0; color: #fff;
  clip-path: inset(0 calc(100% - var(--fill)) 0 0); }
.prog-band small { font-weight: 700; opacity: .85; font-size: inherit; }
.prog-count { display: flex; justify-content: flex-end; margin-top: 7px;
  font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
/* Narrow panels: four names would collide — non-current stages drop their
   floating names and become bare bars; the current band ALWAYS keeps its
   name (its column stays content-sized). Codex r2 #4 (2026-08-02): sized by
   a container query on .prog itself, not a viewport breakpoint — the
   two-pane shell means viewport width says little about the panel's actual
   content width (a 1024px viewport leaves the panel ~450px). */
.prog { container-type: inline-size; }
@container (max-width: 660px) {
  .prog-lbl { display: none; }
  .prog-col { min-width: 0; }
  .prog-col.cur { min-width: max-content; }
}

/* External-link action button (an <a> styled as a primary button).
   Centered, comfortably wider than its label but NEVER full width; the
   secondary attest button stacks below it. Trailing new-tab icon (Feather
   external-link) rides inside the label. */
.go-link { display: table; text-align: center; text-decoration: none;
  margin: 0 auto 10px; min-width: 340px; }
.go-link svg { vertical-align: -3px; margin-left: 7px; }
/* The ghost advance button stacked under a go-link matches its width and
   centering — the pair must read as one aligned control group. */
.step-panel .go-link + .btn-ghost, .step-panel #attest {
  display: table; margin: 0 auto; min-width: 340px; text-align: center; }
/* Inside an action ROW the 340px pairing rule must not apply (2026-08-02:
   it inflated the f8 Re-authorize / I've-authorized pair) — row controls are
   content-sized, anchors lose their underline, the primary hugs the right. */
.step-panel .fld-actions .btn, .step-panel .fld-actions #attest {
  display: inline-block; margin: 0; min-width: 110px; width: auto;
  text-align: center; text-decoration: none; }
.step-panel .fld-actions .btn-primary, .step-panel .fld-actions #attest { margin-left: auto; }
.step-panel .fld-actions { gap: 10px; }

/* Wait-card action row (2026-08-02): ghost Check-now left, primary Done
   right — the wait card sits outside .step-panel so it needs its own rule. */
.wait-card .fld-actions { display: flex; gap: 10px; max-width: 340px; margin-top: 4px; }
.wait-card .fld-actions .btn-primary { margin-left: auto; }

/* Loading state for async panel content (2026-08-02): same visual language
   as the busy chip — the plain grey "Loading…" line was invisible. */
.step-panel .busy-note { display: inline-block; font-size: 13.5px; font-weight: 600; color: #2f7d52;
  background: #f6fcf8; border: 1px solid #b9dfc6; border-radius: 10px; padding: 9px 14px; margin: 4px 0 8px; }
.step-panel .busy-note::before { content: ''; display: inline-block; width: 11px; height: 11px;
  border: 2px solid #b9dfc6; border-top-color: #2f7d52; border-radius: 50%;
  margin-right: 8px; vertical-align: -2px; animation: btn-busy-spin .8s linear infinite; }

/* Active step panel */
.step-panel { padding: 4px 2px 10px; }
.step-panel .crumb { display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink);
  background: #eef8ff; border-radius: 20px; padding: 5px 12px; margin: 0 0 16px; }
.step-panel h3 { margin: 0 0 12px; font-size: 21px; letter-spacing: -.01em; }
.step-panel .why { color: var(--soft); line-height: 1.6; margin: 0 0 16px; }
.step-panel .need { background: #f7faff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; color: var(--soft); font-size: 12px; margin-bottom: 12px; }
/* Journey-complete celebration screen (2026-08-11): centered, no actions. */
.done-panel { text-align: center; padding-top: 28px; padding-bottom: 24px; }
.done-panel .done-glyph { font-size: 46px; line-height: 1; margin-bottom: 14px; }
.done-panel h3 { font-size: 24px; }
.done-panel .why { max-width: 520px; margin-left: auto; margin-right: auto; }
.step-panel .last { font-size: 12px; margin-top: 10px; }
.step-panel .last.bad { color: #c0392b; }
/* Success notices (walkthrough feedback 2026-08-02): a user-facing
   confirmation, not a system log line — comfortable type on a soft green
   card with a leading check, matching the pill-ok/busy-chip palette. */
.step-panel .last.ok { display: inline-block; font-size: 13.5px; font-weight: 600; color: #2f7d52;
  background: #f6fcf8; border: 1px solid #b9dfc6; border-radius: 10px; padding: 9px 14px;
  /* Vertically balanced (2026-08-02): the preceding .why already leaves
     16px below itself, so the card adds NO top margin of its own (stacked
     margins made the top gap ~2x the bottom) and exactly 16px below —
     equal space on both sides. */
  margin: 0 0 16px; }
.step-panel .last.ok::before { content: '✓'; margin-right: 8px; font-weight: 800; }
.step-panel .fld { display: block; width: 100%; border: 1px solid #dbe1ea; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; background: #fbfcfe; transition: border-color .15s, box-shadow .15s; }
.step-panel .fld:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,166,251,.12); background: #fff; }
.step-panel .fld::placeholder { color: #a7b1c0; }
/* Credential/code fields shouldn't stretch the full wide panel — constrain + left-align for a designed feel. */
.step-panel .fld-narrow { max-width: 340px; }
/* Action row under a narrow field column: any ghost (Back) hugs the left
   edge, the PRIMARY always hugs the field's right edge (same 340px
   envelope) — with or without a ghost beside it. */
.step-panel .fld-actions { display: flex; max-width: 340px; margin-top: 4px; }
.step-panel .fld-actions .btn-primary { margin-left: auto; }
.step-panel .fld-label { display: block; font-size: 11px; font-weight: 700; color: var(--soft); margin: 0 0 5px; letter-spacing: .06em; text-transform: uppercase; }
.step-panel .fld-label:not(:first-child) { margin-top: 4px; }
.disclosure { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 9px; }
.disclosure summary { cursor: pointer; color: var(--faint); font-size: 12px; }
.disclosure .body { color: var(--faint); font-size: 12px; margin-top: 7px; line-height: 1.5; }

/* QR block */
.qr-block { display: flex; gap: 16px; align-items: flex-start; margin: 6px 0 12px; }
.qr-block canvas, .qr-block svg { width: 150px; height: 150px; border: 6px solid #fff; box-shadow: 0 0 0 1px var(--line); border-radius: 6px; }
.qr-block ol { margin: 0; padding-left: 18px; color: var(--soft); font-size: 13px; line-height: 1.8; }

/* Wait card */
.wait-card { background: var(--wait-bg); border: 1px solid var(--wait-line); border-radius: var(--radius); padding: 14px 16px; }
.wait-card h3 { color: var(--wait-ink); margin: 0 0 6px; font-size: 16px; }
.wait-card .why { color: #6b5a30; font-size: 13px; line-height: 1.5; }
.wait-card .meta { color: #9a7b3a; font-size: 12px; margin: 8px 0; }
.wait-card.overrun { background: #fff; }

/* Prereq-blocked step: a gate the user clears by confirming each item. */
.blocked { background: #fff8f6; border: 1px solid #f3d6cd; border-radius: var(--radius); padding: 14px 16px; margin: 4px 0 12px; }
.blocked-h { font-size: 13px; font-weight: 700; color: #b0432a; margin-bottom: 12px; }
.pr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pr { display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.pr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pr-text b { font-size: 13.5px; color: var(--ink); }
.pr-text span { font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.pr-have { flex: none; padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }

/* Look-ahead teaser under the prereq checklist — clearly NOT the current action. */
.next-up { margin: 14px 0 4px; font-size: 12.5px; color: var(--faint); font-weight: 600;
  padding-left: 18px; position: relative; }
.next-up::before { content: "→"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }

/* Confirmed prereq: row stays put, button → green chip (no disappearing). */
.pr.done { border-color: #cfe9d6; background: #f6fcf8; }
.pr-ok { flex: none; font-size: 12.5px; font-weight: 700; color: var(--ok); white-space: nowrap; padding: 7px 4px; }

/* Password field with show/hide eye (defaults hidden). */
.step-panel .pw-wrap { position: relative; margin-bottom: 12px; }
.step-panel .pw-wrap .pw-input { margin-bottom: 0; padding-right: 40px; width: 100%; }
.step-panel .pw-eye { position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: none; background: transparent; cursor: pointer; padding: 0; border-radius: 8px;
  color: #9aa7b8; transition: color .15s, background .15s; }
.step-panel .pw-eye:hover { color: var(--soft); background: #eef4fb; }
.step-panel .pw-eye.on { color: var(--blue-ink); }
.step-panel .pw-eye:focus { outline: none; }
.step-panel .pw-eye:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.step-panel .pw-eye svg { display: block; }

/* "Can't scan? Copy the key" — manual-entry fallback under the QR. */
.step-panel .key-fallback { margin: 4px 0 14px; }
.step-panel .key-toggle { border: none; background: transparent; color: var(--blue-ink);
  font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 0; }
.step-panel .key-toggle:hover { text-decoration: underline; }
.step-panel .key-box { display: flex; align-items: center; gap: 8px; margin-top: 8px; max-width: 340px; }
.step-panel .key-box .secret { flex: 1; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px; letter-spacing: .04em; word-break: break-all; color: var(--ink);
  background: #f4f7fb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.step-panel .key-box .key-copy { flex: none; padding: 7px 12px; font-size: 12px; }

/* Step-complete transition (success badge + "what's next & why" bridge). */
.step-panel .tr-success { margin-bottom: 6px; }
.step-panel .tr-success h3 { margin: 0; }

/* ===== Trading window (create-dev-account/create-app/f8-authorize/trading-window screens) ===== */
/* Consent terms — rendered via textContent only (never innerHTML); portal-derived
   values (IP, whitelist, TTL, cost/cap sentence) are untrusted text. */
.terms { white-space: pre-wrap; word-break: break-word; background: #f7faff;
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px;
  line-height: 1.6; color: var(--ink); margin: 0 0 14px; max-height: 320px; overflow-y: auto; }
.tw-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px;
  color: var(--soft); line-height: 1.5; margin: 0 0 14px; cursor: pointer; }
.tw-check input { margin-top: 2px; flex: none; }
.tw-stages { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tw-stage { font-size: 13px; color: var(--faint); padding-left: 22px; position: relative; }
.tw-stage::before { content: "○"; position: absolute; left: 0; }
.tw-stage-done { color: var(--ok); }
.tw-stage-done::before { content: "●"; color: var(--ok); }
.tw-stage-cur { color: var(--blue-ink); font-weight: 600; }
.tw-stage-cur::before { content: "◐"; color: var(--blue); }
.tw-summary { background: #f7faff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 13px; color: var(--ink); margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.tw-summary b { color: var(--soft); font-weight: 600; margin-right: 6px; }

/* ===== Provisioning Lab (lab.html/lab.js) ===== */
.wrap { max-width: 780px; margin: 0 auto; padding: 40px 24px 60px; }
.wrap h1 { font-size: 26px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.02em; }
.wrap .sub { color: var(--soft); font-size: 14px; line-height: 1.6; margin: 0 0 28px; }
/* Path A primary flow reuses .step-panel / .fld / .need / .why / .crumb from the
   app onboarding design. Sub-step separators + the alt-paths disclosure below. */
.step-panel .step-sub { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.step-panel .disclosure { margin-top: 14px; }
.step-panel .pr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 520px;
  background: #f7faff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; margin-top: 12px; }
.step-panel .pr-row .pr-text b { font-size: 13.5px; color: var(--ink); }
.step-panel .pr-row .pr-text span { display: block; font-size: 12px; color: var(--soft); margin-top: 2px; }
/* Pre-provisioned server IP display + copy control on the whitelist screen. */
.step-panel .ip-box { margin: 14px 0 4px; }
.step-panel .ip-row { display: flex; align-items: center; gap: 8px; }
.step-panel .ip-value { font-size: 17px; font-weight: 600; letter-spacing: .02em;
  background: var(--tint-1, #f2f7fd); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 16px; user-select: all; }
.step-panel .ip-copy { display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 12px; font-size: 12px; }

/* App-store badges (2026-08-02): the horizontal branded download buttons for
   Google Authenticator on the QR sub-step — self-contained inline SVG icons
   (no external artwork; the wizard loads no third-party assets). */
.step-panel .store-badges { display: flex; gap: 10px; margin: 6px 0 12px; }
.step-panel .store-badge { display: inline-flex; align-items: center; gap: 9px;
  background: #000; color: #fff; border: 1px solid #a6a6a6; border-radius: 8px;
  padding: 6px 14px; text-decoration: none; }
.step-panel .store-badge:hover { background: #1a1a1a; }
.step-panel .store-badge .sb-small { display: block; font-size: 9px; letter-spacing: .04em; opacity: .85; line-height: 1.2; }
.step-panel .store-badge .sb-big { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }

/* Bordered status pill for completed rows — replaces the emoji outcome badge. */
.step-panel .pill { display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 12px;
  border-radius: 999px; border: 1px solid; white-space: nowrap; }
.step-panel .pill-ok { color: #2f7d52; border-color: #b9dfc6; background: #f6fcf8; }
.step-panel .pill-skip { color: var(--soft); border-color: var(--line); background: #f7f9fc; }

/* ===== Task 21: view cursor — review cards + Back/Next nav row ===== */
/* A completed/skipped step viewed via Back. Reuses .step-panel's spacing;
   its .pr-row fields (Verified rows) already come from the Path A/lab
   styling above — no separate rule needed for those. */
.review-card { padding-bottom: 4px; }
.review-card .pr-row:first-of-type { margin-top: 16px; }

/* Back/Next (review) or Back-only (active). Sits below the step panel with
   a light rule separating it from the action content above, so it reads as
   navigation chrome, not another step control. Design update 2026-08-01
   (walkthrough feedback): the row spans the same 520px envelope as the
   Verified .pr-rows; Back is ghost on the left, Next is PRIMARY and hugs
   the right edge (margin-left:auto keeps it there with or without Back). */
.nav-row { display: flex; gap: 10px; justify-content: flex-start; max-width: 520px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.nav-row .btn { min-width: 110px; text-align: center; }
/* Save & exit anchors the right side; Next (when present) sits outermost. */
.nav-row #navExit { margin-left: auto; }
/* No Back, no Next (active screen, first step / mid-sub-machine) — the row
   still exists in the DOM (mutate()'s setNavRowLocked always finds it) but
   collapses to nothing rather than showing a bare rule under the panel. */
.nav-row-empty { margin: 0; padding: 0; border: none; }
@media (max-width: 480px) {
  .nav-row { flex-direction: column; }
  .nav-row .btn { width: 100%; }
}

/* Collapsed alternative paths (B/C) — greyed, non-interactive for now. */
.alt-paths { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 14px; }
.alt-paths > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--soft);
  list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.alt-paths > summary::-webkit-details-marker { display: none; }
.alt-paths > summary::before { content: "▸"; color: var(--faint); transition: transform .15s; }
.alt-paths[open] > summary::before { transform: rotate(90deg); }
.alt-paths-note { color: var(--faint); font-size: 12.5px; line-height: 1.5; margin: 10px 0 14px; }
.alt-path { opacity: .55; background: #f7f9fb; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; margin-bottom: 9px; }
.alt-path-h { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.alt-path-why { font-size: 12.5px; color: var(--soft); line-height: 1.5; margin: 4px 0 0; }
.lab-badge { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--soft); }
.lab-badge-pending { color: var(--faint); font-weight: 400; }
.lab-email, .lab-key { display: block; font-size: 12.5px; color: var(--faint); margin-top: 4px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.lab-guidance { color: var(--soft); font-size: 12.5px; line-height: 1.5; margin: 8px 0; }
.lab-manual { background: #fff8f6; border: 1px solid #f3d6cd; border-radius: 10px; padding: 14px 16px; margin-top: 12px; }
.lab-manual .fld { margin-bottom: 10px; }
#winner { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
#winner h2 { margin: 0 0 12px; font-size: 18px; }
.lab-winner-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lab-radio { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.lab-error { background: #fff1f0; border: 1px solid #f3b4ac; color: #9b1c0e; border-radius: 10px;
  padding: 10px 14px; font-size: 13px; line-height: 1.5; margin: 0 0 16px; }
