#voice-onboarding {
  --vo-ink: #171411;
  --vo-muted: #746d65;
  --vo-stone: #f2eee8;
  --vo-paper: rgba(255, 255, 255, 0.78);
  --vo-line: rgba(23, 20, 17, 0.09);
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--vo-ink);
  background:
    radial-gradient(circle at 15% 12%, rgba(255,255,255,.95) 0 10%, transparent 33%),
    radial-gradient(circle at 85% 78%, rgba(124,113,99,.12), transparent 34%),
    linear-gradient(135deg, #fbfaf8, var(--vo-stone) 52%, #fdfcf9);
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

#voice-onboarding[hidden] { display: none; }

.vo-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.vo-topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(to bottom, rgba(250,248,244,.9), rgba(250,248,244,.48), transparent);
  backdrop-filter: blur(14px);
}

.vo-top-action,
.vo-account {
  border: 0;
  background: rgba(255,255,255,.62);
  color: var(--vo-ink);
  border: 1px solid var(--vo-line);
  border-radius: 999px;
  padding: 10px 14px;
  font: 600 13px/1 'Instrument Sans', sans-serif;
}

.vo-top-action { cursor: pointer; }
.vo-top-spacer { width: 80px; }
.vo-account { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vo-stage {
  width: min(100% - 40px, 760px);
  margin: 0 auto;
  /* Center in the space under the topbar so every screen fits one viewport;
     scrolling only kicks in when a screen genuinely cannot fit. */
  align-self: center;
  padding: 14px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: vo-enter .3s ease both;
}

.vo-stage.vo-wide { width: min(100% - 40px, 920px); }

@keyframes vo-enter {
  from { opacity: 0; transform: translateY(7px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.vo-mark {
  width: 150px;
  height: 150px;
  margin: 0 0 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: rgba(255,255,255,.68);
  border: 1px solid var(--vo-line);
  box-shadow: 0 28px 70px rgba(28,24,20,.11);
}

.vo-mark::before,
.vo-mark::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  border: 1px solid rgba(23,20,17,.07);
}
.vo-mark::before { inset: -16px; }
.vo-mark::after { inset: -32px; opacity: .6; }

.vo-mark-core {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--vo-ink);
}

.vo-mark-core i,
.vo-live-wave i {
  display: block;
  width: 4px;
  border-radius: 99px;
  background: white;
  animation: vo-wave 1s ease-in-out infinite alternate;
}
.vo-mark-core i:nth-child(1) { height: 20px; animation-delay: -.5s; }
.vo-mark-core i:nth-child(2) { height: 38px; animation-delay: -.2s; }
.vo-mark-core i:nth-child(3) { height: 28px; animation-delay: -.7s; }
.vo-mark-core i:nth-child(4) { height: 44px; animation-delay: -.35s; }
.vo-mark-core i:nth-child(5) { height: 18px; animation-delay: -.6s; }
@keyframes vo-wave { to { transform: scaleY(.45); opacity: .64; } }

.vo-eyebrow {
  margin: 0 0 15px;
  color: var(--vo-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
}

.vo-title {
  margin: 0;
  max-width: 700px;
  color: var(--vo-ink);
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(38px, 5.2vw, 56px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.035em;
}

.vo-subtitle {
  max-width: 600px;
  margin: 16px auto 0;
  color: var(--vo-muted);
  font-size: 16.5px;
  line-height: 1.55;
}

.vo-actions {
  width: min(100%, 520px);
  display: grid;
  gap: 10px;
  /* Auto inline margins keep it centered even inside the left-aligned
     .vo-form on the review screen, not just as a flex child of .vo-stage. */
  margin: 24px auto 0;
}

.vo-primary,
.vo-secondary {
  min-height: 56px;
  border-radius: 999px;
  font: 600 15px/1 'Instrument Sans', sans-serif;
  cursor: pointer;
}

.vo-primary {
  color: white;
  border: 0;
  background: var(--vo-ink);
  box-shadow: 0 14px 30px rgba(23,20,17,.18);
}
.vo-primary:disabled { opacity: .42; cursor: not-allowed; }
.vo-secondary { color: var(--vo-ink); border: 0; background: transparent; }

.vo-trust {
  margin-top: 16px;
  color: var(--vo-muted);
  font-size: 12px;
}

.vo-conversation {
  width: 100%;
  min-height: 590px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--vo-line);
  border-radius: 32px;
  background: rgba(255,255,255,.64);
  box-shadow: 0 24px 70px rgba(28,24,20,.09);
  backdrop-filter: blur(22px);
}

.vo-live-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--vo-line);
}
.vo-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #d09d27; }
.vo-live-dot.connected { background: #35a46a; }
.vo-live-status { color: var(--vo-muted); font-size: 13px; }
.vo-live-time { margin-left: auto; color: var(--vo-muted); font-size: 12px; }

.vo-transcript {
  padding: 28px;
  overflow: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.vo-transcript-empty { margin: auto; max-width: 360px; color: var(--vo-muted); text-align: center; line-height: 1.55; }
.vo-line { display: grid; grid-template-columns: 64px 1fr; gap: 10px; }
.vo-speaker { color: var(--vo-muted); font-size: 12px; font-weight: 700; padding-top: 3px; }
.vo-line.marcus .vo-speaker { color: #0f766e; }
.vo-words { font-size: 16px; line-height: 1.55; white-space: pre-wrap; }

.vo-live-footer {
  padding: 20px;
  border-top: 1px solid var(--vo-line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

/* Voice-mode call surface: orb + live subtitle, no chat log. */
.vo-voice-shell { min-height: 560px; }
.vo-voice-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 28px 24px;
}
.vo-orb {
  --vo-mic: 0;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--vo-line);
  box-shadow:
    0 24px 60px rgba(28,24,20,.1),
    0 0 0 calc(16px * var(--vo-mic)) rgba(63,122,78,.13);
  transition: box-shadow .1s linear, border-color .2s ease;
}
.vo-orb::before,
.vo-orb::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  border: 1px solid rgba(23,20,17,.07);
}
.vo-orb::before { inset: -18px; }
.vo-orb::after { inset: -36px; opacity: .6; }
.vo-orb .vo-mark-core { width: 92px; height: 92px; }
.vo-orb .vo-mark-core i {
  animation-play-state: paused;
  transform: scaleY(.35);
  opacity: .55;
  transition: transform .25s ease, opacity .25s ease;
}
.vo-orb.speaking .vo-mark-core i {
  animation-play-state: running;
  transform: none;
  opacity: 1;
}
.vo-orb.user-speaking { border-color: rgba(63,122,78,.55); }

.vo-caption {
  min-height: 104px;
  width: min(100%, 640px);
  text-align: center;
}
.vo-caption-speaker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--vo-muted);
}
.vo-caption-text {
  margin: 10px 0 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--vo-ink);
}

.vo-live-wave { height: 42px; display: flex; align-items: center; gap: 4px; }
.vo-live-wave i { width: 3px; height: 26px; background: var(--vo-ink); }
.vo-live-wave i:nth-child(2n) { height: 38px; }
.vo-live-wave.paused i { animation-play-state: paused; transform: scaleY(.2); opacity: .3; }

.vo-end {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  color: white;
  background: #b93c32;
  font: 600 14px/1 'Instrument Sans', sans-serif;
  cursor: pointer;
}

.vo-form {
  width: min(100%, 650px);
  margin-top: 32px;
  text-align: left;
}
.vo-label { display: block; margin: 0 0 9px; color: var(--vo-muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.vo-textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--vo-line);
  border-radius: 24px;
  padding: 20px;
  color: var(--vo-ink);
  background: var(--vo-paper);
  font: 400 16px/1.55 'Instrument Sans', sans-serif;
  outline: none;
}
.vo-textarea:focus { border-color: rgba(23,20,17,.28); box-shadow: 0 0 0 4px rgba(23,20,17,.04); }

/* Single-line sibling of .vo-textarea — same skin, no min-height or resize. */
.vo-input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--vo-line);
  border-radius: 24px;
  padding: 16px 20px;
  color: var(--vo-ink);
  background: var(--vo-paper);
  font: 400 16px/1.55 'Instrument Sans', sans-serif;
  outline: none;
}
.vo-input:focus { border-color: rgba(23,20,17,.28); box-shadow: 0 0 0 4px rgba(23,20,17,.04); }

.vo-reflection {
  width: min(100%, 650px);
  box-sizing: border-box;
  margin-top: 28px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255,255,255,.56);
  border: 1px solid var(--vo-line);
  text-align: left;
}
.vo-reflection p { margin: 8px 0 0; font-size: 16px; line-height: 1.55; }
.vo-error { min-height: 20px; margin-top: 12px; color: #a9322a; font-size: 13px; text-align: left; }

.vo-page-icon {
  width: 92px;
  height: 92px;
  margin-top: 0;
  margin-bottom: 24px;
  border-radius: 30px;
  border: 1px solid var(--vo-line);
  background: rgba(255,255,255,.72);
  box-shadow: 0 18px 44px rgba(28,24,20,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vo-ink);
}
.vo-page-icon svg { width: 44px; height: 44px; }

.vo-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 26px;
}
.vo-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(28,24,20,.18);
  transition: width .25s ease, background .25s ease;
}
.vo-dot.active { width: 24px; background: var(--vo-ink); }

.vo-steps {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: vo-step;
  width: min(100%, 560px);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vo-steps li {
  counter-increment: vo-step;
  position: relative;
  padding-left: 40px;
  color: var(--vo-muted);
  font-size: 15px;
  line-height: 1.5;
}
.vo-steps li strong { color: var(--vo-ink); font-weight: 600; }
.vo-steps li::before {
  content: counter(vo-step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--vo-line);
  background: rgba(255,255,255,.7);
  color: var(--vo-ink);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vo-handoff {
  margin-top: 34px;
  width: min(100%, 650px);
  padding: 30px;
  box-sizing: border-box;
  border: 1px solid var(--vo-line);
  border-radius: 28px;
  background: rgba(255,255,255,.66);
  box-shadow: 0 22px 60px rgba(28,24,20,.08);
}
.vo-handoff strong { display: block; font-family: 'Instrument Serif', Georgia, serif; font-size: 30px; font-weight: 400; }
.vo-handoff p { color: var(--vo-muted); line-height: 1.55; }

/* Web paywall — mirrors the native PaywallView composition. */
.vo-paywall-features {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  width: min(100%, 480px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.vo-paywall-features li { display: flex; align-items: center; gap: 13px; }
.vo-feature-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--vo-line);
  background: rgba(255,255,255,.72);
  color: var(--vo-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vo-feature-icon svg { width: 20px; height: 20px; }
.vo-feature-text { display: flex; flex-direction: column; gap: 1px; }
.vo-feature-text strong { color: var(--vo-ink); font-size: 14.5px; font-weight: 600; }
.vo-feature-text span { color: var(--vo-muted); font-size: 13px; line-height: 1.4; }

.vo-risk {
  margin: 18px 0 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--vo-line);
  background: rgba(255,255,255,.66);
  color: var(--vo-ink);
  font-size: 12.5px;
  display: inline-flex;
}
.vo-risk strong { font-weight: 700; }

.vo-plan-cards {
  width: min(100%, 480px);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vo-plan-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-radius: 18px;
  border: 1.5px solid var(--vo-line);
  background: rgba(255,255,255,.6);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.vo-plan-card.selected {
  border-color: var(--vo-ink);
  background: #fff;
  box-shadow: 0 12px 30px rgba(23,20,17,.08);
}
.vo-plan-badge {
  position: absolute;
  top: -9px;
  right: 16px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--vo-ink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.vo-plan-check {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(23,20,17,.28);
  background: transparent;
}
.vo-plan-card.selected .vo-plan-check {
  border-color: var(--vo-ink);
  background:
    radial-gradient(circle at center, var(--vo-ink) 0 42%, transparent 46%);
}
.vo-plan-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vo-plan-name { color: var(--vo-ink); font-size: 15px; font-weight: 600; }
.vo-plan-sub { color: var(--vo-muted); font-size: 12.5px; }
.vo-plan-price {
  margin-left: auto;
  color: var(--vo-ink);
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}
.vo-plan-price em { font-style: normal; color: var(--vo-muted); font-size: 12px; font-weight: 500; }

@media (max-width: 640px) {
  .vo-topbar { height: 62px; padding: 0 16px; }
  .vo-account { max-width: 145px; }
  .vo-stage { width: min(100% - 28px, 760px); padding: 10px 0 28px; }
  .vo-mark { width: 124px; height: 124px; }
  .vo-mark::before { inset: -12px; }
  .vo-mark::after { inset: -24px; }
  .vo-mark-core { width: 70px; height: 70px; }
  .vo-title { font-size: 36px; }
  .vo-subtitle { font-size: 15px; margin-top: 12px; }
  .vo-steps li { font-size: 14px; padding-left: 36px; }
  .vo-steps li::before { width: 24px; height: 24px; font-size: 12px; }
  .vo-page-icon { width: 78px; height: 78px; margin-bottom: 18px; }
  .vo-page-icon svg { width: 38px; height: 38px; }
  .vo-handoff { padding: 22px; margin-top: 24px; }
  .vo-handoff strong { font-size: 26px; }
  .vo-paywall-features { gap: 9px; margin-top: 14px; }
  .vo-feature-icon { width: 34px; height: 34px; border-radius: 10px; }
  .vo-plan-card { padding: 12px 14px; }
  .vo-plan-price { font-size: 15px; }
  .vo-conversation { min-height: calc(100dvh - 116px); border-radius: 24px; }
  .vo-transcript { padding: 22px 18px; }
  .vo-line { grid-template-columns: 52px 1fr; }
}

/* Short viewports (small laptops, landscape phones): compress vertical
   rhythm further so no onboarding screen needs a scroll. */
@media (max-height: 780px) {
  .vo-stage { padding: 8px 0 24px; }
  .vo-mark { width: 108px; height: 108px; margin-bottom: 14px; }
  .vo-mark::before { inset: -10px; }
  .vo-mark::after { inset: -20px; }
  .vo-mark-core { width: 62px; height: 62px; }
  .vo-title { font-size: clamp(32px, 4.4vw, 44px); }
  .vo-subtitle { margin-top: 10px; font-size: 15px; }
  .vo-steps { margin-top: 12px; gap: 8px; }
  .vo-steps li { font-size: 14px; }
  .vo-actions { margin-top: 16px; }
  .vo-primary, .vo-secondary { min-height: 50px; }
  .vo-trust { margin-top: 10px; }
  .vo-page-icon { width: 70px; height: 70px; margin-bottom: 14px; }
  .vo-page-icon svg { width: 34px; height: 34px; }
  .vo-dots { margin-top: 16px; }
  .vo-conversation { min-height: 440px; }
  .vo-paywall-features { gap: 7px; margin-top: 12px; }
  .vo-feature-icon { width: 32px; height: 32px; border-radius: 10px; }
  .vo-feature-text strong { font-size: 13.5px; }
  .vo-feature-text span { font-size: 12px; }
  .vo-risk { margin-top: 12px; }
  .vo-plan-cards { margin-top: 12px; gap: 8px; }
  .vo-plan-card { padding: 11px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #voice-onboarding *, #voice-onboarding *::before, #voice-onboarding *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Thinking mark — the rose traced during the recap wait. Inherits the stage's
   ink colour, so it reads as drawn on the same paper rather than applied on
   top of it. */
.vo-thinking-mark {
  width: min(46vmin, 260px);
  aspect-ratio: 1;
  margin: 0 auto 10px;
  color: var(--vo-ink);
  display: grid;
  place-items: center;
}
.vo-thinking-mark .tc-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
