/* ===========================================================================
   Onboarding — the scripted questions
   =========================================================================== */

/* Progress for the whole set, above the card rather than inside it. */
.setupprog { display: flex; flex-direction: column; gap: 14px; width: 100% }
.setupprog__head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 2px }
.setupprog__head b { font-size: 12px; font-weight: var(--weight-strong); color: color-mix(in srgb, var(--on-ink) 90%, transparent); white-space: nowrap }
.setupprog__head span { font-size: 12px; font-weight: var(--weight-strong); color: color-mix(in srgb, var(--on-ink) 50%, transparent); white-space: nowrap }
.setupprog__rail {
  flex: 1; height: 3px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--on-ink) 14%, transparent); overflow: hidden;
}
.setupprog__rail > div {
  height: 100%; border-radius: var(--r-pill); background: var(--ob-accent);
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

/* The section cards slide so the one in play sits at the left edge; the fade
   on the right says there is more without drawing a scrollbar. */
.setupprog__strip {
  width: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 78%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 78%, transparent 100%);
}
.setupprog__track { display: flex; gap: 12px; transition: transform .55s cubic-bezier(.4, 0, .2, 1) }
/* Only the first time the checklist appears. After that the cards move between
   themselves and re-running this would slide the whole strip in on every
   answer. */
.setupprog--enter .setupprog__strip { animation: cdSlideIn .4s cubic-bezier(.22, .8, .28, 1) both }

.setupsec {
  flex: 0 0 196px; width: 196px; box-sizing: border-box;
  border-radius: 14px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 9px;
  border: 1px solid color-mix(in srgb, var(--on-ink) 12%, transparent);
  background: color-mix(in srgb, var(--on-ink) 4%, transparent); opacity: .32;
  transition: opacity .45s ease, background .45s ease, border-color .45s ease;
}
.setupsec[data-state="now"] {
  opacity: 1; border-color: color-mix(in srgb, var(--on-ink) 34%, transparent); background: color-mix(in srgb, var(--on-ink) 13%, transparent);
}
.setupsec[data-state="done"] { opacity: .55 }
.setupsec b { font-size: 12.5px; font-weight: var(--weight-strong); color: var(--on-ink); line-height: 1.3 }
.setupsec .ms { font-size: 16px; color: color-mix(in srgb, var(--on-ink) 40%, transparent) }
.setupsec[data-state="now"] .ms { color: color-mix(in srgb, var(--on-ink) 95%, transparent) }
.setupsec[data-state="done"] .ms { color: color-mix(in srgb, var(--on-ink) 70%, transparent) }
.setupsec__count { margin-left: auto; font-size: 11px; font-weight: var(--weight-strong); color: color-mix(in srgb, var(--on-ink) 45%, transparent) }
.setupsec[data-state="done"] .setupsec__count { color: color-mix(in srgb, var(--on-ink) 85%, transparent) }
.setupsec__track { height: 3px; border-radius: var(--r-pill); overflow: hidden; background: color-mix(in srgb, var(--on-ink) 13%, transparent) }
.setupsec__track > div {
  height: 100%; border-radius: var(--r-pill); background: var(--ob-accent);
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

/* The question itself is the heading — the card has no title above it. */
.setupq {
  font-size: 21px; font-weight: var(--weight-strong); letter-spacing: -.02em; line-height: 1.35;
  margin-bottom: 8px; font-family: var(--ob-head, var(--font-head)), 'Geist', var(--font-stack);
}
.setuphint { font-size: 12.5px; color: var(--muted); margin-bottom: 12px }

.setupchip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-size: 13px; font-weight: var(--weight-strong);
  padding: 10px 16px; border-radius: var(--r-btn); cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.setupchip:hover { border-color: var(--ink) }
.setupchip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink) }
.setupchip--sm { font-size: 12.5px; padding: 9px 15px }
.setupchip .ms { font-size: 17px; margin-left: -3px }

/* Send stays one line tall at the foot of the box as the answer grows. */
.setuptext { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px }
.setuptext .input { flex: 1; min-width: 0 }
/* One line to start, the height of the field it replaced; autosize() grows it
   with the answer up to the cap, then it scrolls inside (setupAnswerBox turns
   the scrollbar on). The gutter is kept so the scrollbar arriving cannot
   rewrap the text. */
.setuptext__box {
  display: block; height: 46px; padding: 12px 14px; line-height: 20px; resize: none;
  max-height: min(220px, 40dvh); overflow-y: hidden; scrollbar-gutter: stable;
}
/* Beside the box, Send would leave a phone's answer a column a few words
   wide; under it, the answer has the card's width and Send sits at its end. */
@media (max-width: 640px) {
  .setuptext { flex-wrap: wrap }
  .setuptext .input { flex-basis: 100% }
  .setupsend { margin-left: auto }
}
.setupsend {
  display: flex; align-items: center; gap: 6px; height: 46px;
  border: none; background: var(--ob-main, var(--ink)); color: var(--on-ink);
  font-family: inherit; font-size: 13.5px; font-weight: var(--weight-strong);
  padding: 0 22px; border-radius: 14px; cursor: pointer; flex: 0 0 auto;
}
.setupsend .ms { font-size: 17px }

.setupfoot {
  display: flex; align-items: center; gap: 16px;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid #EDEDED;
}
.setupback {
  display: flex; align-items: center; gap: 5px; background: none; border: none;
  font-family: inherit; font-size: 12.5px; font-weight: var(--weight-strong); color: var(--text); cursor: pointer;
}
.setupback .ms { font-size: 16px }
.setupback:disabled { color: #C4C4C4; cursor: default }
.setupconfirm {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: none; font-family: inherit;
  font-size: 13px; font-weight: var(--weight-strong); padding: 11px 22px;
  border-radius: var(--r-btn); background: var(--ink); color: var(--on-ink); cursor: pointer;
}
.setupconfirm .ms { font-size: 17px }
.setupconfirm:disabled { background: #E4E4E4; color: #9A9A9A; cursor: not-allowed }
