/* =============================================================================
 * Blueprint app — onboarding (#welcome) + Getting-started checklist
 *
 * Calm, focused setup screens: paper + navy, blue only on the one primary
 * action per screen (and the mic). Selection state is navy, not blue.
 * ============================================================================= */

/* ─── Confirm: single-action variant (no Edit) ───────────────────────────── */

.confirm-actions.single { grid-template-columns: 1fr; }

.section-note { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; }

/* ─── Getting started checklist ──────────────────────────────────────────── */

.setup { padding: 14px 14px 6px; }
.setup-head { display: flex; align-items: center; gap: 10px; }
.setup-head h2 { font-size: var(--fs-lg); font-weight: 600; }
.setup-count { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); }
.setup-head .icon-btn { margin: -10px -8px -10px auto; }
.setup-head .icon-btn svg, .setup-done .icon-btn svg { width: 18px; height: 18px; }
.bar {
  height: 6px;
  margin: 10px 0 6px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--go);
  transition: width 500ms var(--ease);
}
.step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 0;
  text-align: left;
}
.step-row + .step-row { border-top: 1px solid var(--line); }
.step-dot {
  width: 24px; height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  color: transparent;
}
.step-dot svg { width: 14px; height: 14px; stroke-width: 3; }
.step-label { display: block; font-weight: 600; }
.step-row.done .step-dot { background: var(--go); border-color: var(--go); color: var(--ink-inv); }
.step-row.done .step-label { color: var(--ink-3); font-weight: 500; }
.setup-done {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px 12px 14px;
  border-color: var(--go);
  background: var(--go-50);
  animation: enter var(--t-med) var(--ease);
}
.setup-done b { display: block; }
.setup-done span { font-size: var(--fs-sm); color: var(--ink-2); }
.setup-badge svg { width: 28px; height: 28px; color: var(--go); }

/* ─── Onboarding shell ───────────────────────────────────────────────────── */

.onboarding .tabbar { display: none; }
.onboarding .view { padding-bottom: 0; }
.onboarding .view > * + * { margin-top: 0; }

.ob { min-height: 100%; display: flex; flex-direction: column; }
.ob-body { flex: 1; padding: 8px 0; }

.ob-progress { flex: 1; display: flex; gap: 6px; padding: 0 6px; }
.ob-progress i {
  flex: 1;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--line);
  transition: background var(--t-med);
}
.ob-progress i.on { background: var(--navy); }
.ob-skip, .ob-skip-space { width: 52px; flex: none; }
.ob-skip { min-height: var(--tap); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }

.ob-kicker {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wood-ink);
}
.ob-title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 15ch;
}
.ob-sub { margin-top: 10px; color: var(--ink-2); max-width: 36ch; }
.ob-label { margin: 24px 0 10px; font-weight: 600; font-size: var(--fs-sm); }
.ob-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.ob-note svg { width: 16px; height: 16px; flex: none; }

/* Pinned action bar: the one primary action lives in the thumb zone */
.ob-actions {
  position: sticky;
  bottom: 0;
  margin: 16px calc(-1 * var(--s-4)) 0;
  padding: 20px var(--s-4) calc(env(safe-area-inset-bottom) + 16px);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--paper) 0%, transparent), var(--paper) 26%);
}
@media (min-width: 640px) { .ob-actions { padding-bottom: 28px; } }

.btn-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  border-radius: var(--r-pill);
  background: var(--blue);
  color: var(--ink-inv);
  font-size: var(--fs-lg);
  font-weight: 600;
  box-shadow: 0 10px 22px -10px rgba(30, 91, 255, 0.8);
  transition: background var(--t-fast), transform var(--t-fast) var(--ease);
}
.btn-lg:active { transform: scale(0.98); }
.btn-lg:disabled {
  background: var(--paper-2);
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
  cursor: not-allowed;
}
.btn-lg:focus-visible { border-radius: var(--r-pill); }
.btn-link {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin-top: 6px;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--link);
}
.btn-link:disabled { color: var(--ink-3); }
.ob-fine { margin-top: 10px; text-align: center; font-size: var(--fs-xs); color: var(--ink-3); }

.spin {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Shared icon look for onboarding lists */
.ob-promises svg, .ob-success svg, .company-facts svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Hello ──────────────────────────────────────────────────────────────── */

.ob-hero { display: flex; align-items: center; gap: 16px; margin: 12px 0 28px; }
.ob-hero img { border-radius: 18px; box-shadow: var(--shadow-2); }
.ob-hero-wave { display: flex; align-items: center; gap: 5px; height: 40px; }
.ob-hero-wave i {
  width: 4px;
  height: 6px;
  border-radius: 4px;
  background: var(--navy);
  opacity: 0.3;
  animation: bar 1.6s ease-in-out infinite;
}
.ob-hero-wave i:nth-child(odd) { animation-delay: -0.4s; }
.ob-hero-wave i:nth-child(3n)  { animation-delay: -0.9s; }

.ob-promises { list-style: none; margin-top: 24px; display: grid; }
.ob-promises li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.ob-promises li + li { border-top: 1px solid var(--line); }
.ob-promises svg { width: 22px; height: 22px; flex: none; color: var(--navy); stroke-width: 1.8; }
.ob-promises b { display: block; color: var(--ink); font-size: var(--fs-md); }

/* ─── Role choice cards ──────────────────────────────────────────────────── */

.choices { display: grid; gap: 10px; margin-top: 24px; }
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-1);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.choice-icon {
  width: 48px; height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--paper-2);
  color: var(--navy);
  transition: background var(--t-fast), color var(--t-fast);
}
.choice-icon svg { width: 24px; height: 24px; }
.choice-main { flex: 1; min-width: 0; }
.choice-main b { display: block; font-size: var(--fs-md); }
.choice-main span { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-2); }
.choice-check, .tile-check {
  width: 24px; height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  color: transparent;
}
.choice-check svg, .tile-check svg { width: 14px; height: 14px; stroke-width: 3; }
.choice[aria-checked="true"] { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy), var(--shadow-2); }
.choice[aria-checked="true"] .choice-icon { background: var(--navy); color: var(--ink-inv); }
.choice[aria-checked="true"] .choice-check,
.tile[aria-pressed="true"] .tile-check { background: var(--navy); border-color: var(--navy); color: var(--ink-inv); }

/* ─── Connect ────────────────────────────────────────────────────────────── */

.field { display: grid; gap: 6px; margin-top: 24px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field input {
  height: 52px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--navy); box-shadow: var(--focus-ring); }
.help {
  margin-top: 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.help summary {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
  list-style: none;
}
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: '+'; margin-left: auto; font-size: 1.125rem; color: var(--ink-3); }
.help[open] summary::after { content: '\2013'; }
.help ol { padding: 0 14px 14px 34px; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); }

.ob-success {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--go-50);
  border: 1.5px solid var(--go);
  animation: enter var(--t-med) var(--ease);
}
.ob-success svg { width: 26px; height: 26px; flex: none; color: var(--go); stroke-width: 1.8; }
.ob-success b { display: block; }
.ob-success span { font-size: var(--fs-sm); color: var(--ink-2); }

/* ─── Join ───────────────────────────────────────────────────────────────── */

.company { margin-top: 24px; padding: 16px; }
.company-head { display: flex; gap: 12px; align-items: center; }
.company-mark {
  width: 48px; height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--navy);
  color: var(--ink-inv);
  font-family: var(--font-display);
  font-weight: 600;
}
.company-head b { display: block; font-size: var(--fs-lg); }
.company-head div span { font-size: var(--fs-sm); color: var(--ink-2); }
.company-facts { list-style: none; margin-top: 14px; display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.company-facts li { display: flex; align-items: center; gap: 10px; }
.company-facts svg {
  width: 20px; height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: var(--go-50);
  color: var(--go);
  stroke-width: 3;
}

/* ─── Focus: tell Cory (plain-language setup) + tiles ────────────────────── */

.tell {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--line-2);
  background: var(--surface-2);
  transition: border-color var(--t-med), background var(--t-med);
}
.tell.listening { border-style: solid; border-color: var(--blue); background: var(--surface); }
.tell.done { border-style: solid; border-color: var(--line); background: var(--surface); }
.tell-mic {
  position: relative;
  width: 48px; height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: var(--ink-inv);
  box-shadow: 0 6px 14px -6px rgba(30, 91, 255, 0.8);
}
.tell-mic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tell-mic::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  opacity: 0;
}
.tell.listening .tell-mic::after { animation: ring 1.4s var(--ease) infinite; }
.tell-mic:disabled { cursor: default; }
.tell-mic:focus-visible { border-radius: 50%; }
.tell-main { min-width: 0; font-size: var(--fs-sm); }
.tell-main b { display: block; font-size: var(--fs-md); }
.tell-main q { display: block; margin-top: 2px; color: var(--ink-2); quotes: '\201C' '\201D'; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 12px 12px;
  text-align: left;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1.5px solid var(--line);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.tile-icon { margin-bottom: 8px; color: var(--navy); }
.tile-icon svg { width: 22px; height: 22px; }
.tile b { font-size: var(--fs-md); padding-right: 24px; }
.tile > span:not(.tile-icon):not(.tile-check) { font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.35; }
.tile-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; }
.tile[aria-pressed="true"] { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.tile.just { animation: picked 1.4s var(--ease); }
@keyframes picked { 0% { background: var(--blue-50); } 100% { background: var(--surface); } }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
}
.seg button {
  min-height: 40px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
}
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg button:focus-visible { border-radius: var(--r-pill); }

/* ─── Mic + first question ───────────────────────────────────────────────── */

.mic-hero {
  width: 88px; height: 88px;
  margin: 16px 0 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--navy);
}
.mic-hero svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mic-hero.on { background: var(--blue); color: var(--ink-inv); box-shadow: var(--shadow-orb); animation: enter var(--t-med) var(--ease); }
.say {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px 18px 18px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
}
.say span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Focus step: secondary options behind a summary that shows the current value */
.ob-more {
  margin-top: 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
}
.ob-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--tap);
  padding: 0 14px;
  list-style: none;
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.ob-more summary::-webkit-details-marker { display: none; }
.ob-more summary b { color: var(--ink); }
.ob-more-change { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--link); }
.ob-more-change svg { width: 16px; height: 16px; transition: transform var(--t-med) var(--ease); }
.ob-more[open] .ob-more-change svg { transform: rotate(180deg); }
.ob-more .seg { margin: 0 10px 10px; }
.ob-more summary:focus-visible { border-radius: var(--r-md); }
