/* ============================================================
   undone — onboarding stylesheet
   Shared by /onboard/*.html — uses same brand tokens as index.html.
   ============================================================ */

:root {
  --navy: #072A6C;
  --navy-soft: #0A3A8C;
  --mint: #B5EBE9;
  --mint-soft: #E6F6F5;
  --teal: #5FB3C5;
  --paper: #FAF7F2;
  --paper-pure: #FFFFFF;
  --rule: #1A1F2E;
  --hairline: #E8E2D6;
  --muted: #6B7280;
  --grain: rgba(11, 22, 40, 0.035);
  --r-sheet: 28px;
  --r-card: 16px;
  --r-button: 24px;
  --r-field: 12px;
  --shell: min(720px, 100% - 48px);
  --shell-wide: min(1100px, 100% - 48px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--navy);
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 12% 18%, var(--grain) 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 62%, var(--grain) 0 1px, transparent 1.6px),
    radial-gradient(circle at 42% 88%, var(--grain) 0 1px, transparent 1.6px);
  background-size: 280px 280px, 360px 360px, 320px 320px;
  opacity: 0.85;
}
::selection { background: var(--navy); color: #fff; }
a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
header.onboard-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}
header.onboard-header.scrolled {
  border-color: var(--rule);
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
}
.onboard-nav {
  width: var(--shell-wide);
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-logo { display: block; height: 28px; width: auto; }
.exit-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  opacity: 0.7;
  transition: opacity 200ms ease;
}
.exit-link:hover { opacity: 1; }

/* ---------- Progress strip ---------- */
.progress {
  width: var(--shell);
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy);
  opacity: 0.6;
}
.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--hairline);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: var(--navy);
  border-radius: 999px;
  transition: width 320ms ease;
}

/* ---------- Sheet (page container) ---------- */
.sheet {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin: 32px auto 80px;
  padding: clamp(32px, 4vw, 64px) clamp(24px, 4vw, 56px);
  background: var(--paper-pure);
  border: 1px solid var(--rule);
  border-radius: var(--r-sheet);
}
.sheet.wide { width: var(--shell-wide); }

.sheet-head { margin-bottom: 28px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--mint-soft);
  border: 1px solid var(--mint);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
}
h1.title {
  font-family: "Barlow", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--navy);
  margin: 0 0 12px;
}
p.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--navy);
  opacity: 0.78;
  margin: 0;
  max-width: 52ch;
}
h2.section-title {
  font-family: "Barlow", sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin: 32px 0 6px;
}
p.section-sub {
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  opacity: 0.7;
  margin: 0 0 18px;
}

/* ---------- Choice cards ---------- */
.choice-grid {
  display: grid;
  gap: 14px;
}
.choice-grid.two { grid-template-columns: 1fr 1fr; }
.choice-grid.four { grid-template-columns: 1fr 1fr; }

.choice {
  display: block;
  background: var(--paper-pure);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-card);
  padding: 22px 22px 22px 76px;
  position: relative;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.choice:hover {
  transform: translateY(-2px);
  border-color: var(--navy);
  box-shadow: 0 6px 0 -2px var(--mint);
}
.choice.selected {
  border-color: var(--navy);
  background: var(--mint-soft);
}
.choice .icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  border: 1px solid var(--mint);
}
.choice .icon img { width: 26px; height: 26px; object-fit: contain; }
.choice .icon svg { width: 22px; height: 22px; color: var(--navy); }
.choice h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.choice p {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--navy);
  opacity: 0.72;
  line-height: 1.45;
}
.choice.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.choice .badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--navy);
  color: var(--mint);
  padding: 4px 10px;
  border-radius: 999px;
}
.choice .badge.phone {
  background: var(--mint);
  color: var(--navy);
}

/* ---------- Form ---------- */
.field { display: block; margin-bottom: 18px; }
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin-bottom: 6px;
}
.field > label .optional {
  font-weight: 500;
  opacity: 0.6;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="password"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  background: var(--paper-pure);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-field);
  padding: 12px 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px var(--mint-soft);
}
.field .helper {
  font-size: 13px;
  color: var(--navy);
  opacity: 0.65;
  margin-top: 6px;
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

/* OTP-style segmented input for magic code */
.code-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 360px;
  margin: 18px auto 8px;
}
.code-row input {
  width: 100%;
  aspect-ratio: 1;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--paper-pure);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-field);
  padding: 0;
}
.code-row input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px var(--mint-soft);
}

/* ---------- Buttons ---------- */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.btn {
  appearance: none;
  background: var(--navy);
  color: #fff;
  border: 2px solid var(--navy);
  padding: 13px 26px;
  border-radius: var(--r-button);
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 180ms ease;
  text-decoration: none;
}
.btn:hover { background: var(--navy-soft); }
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn .arrow { transition: transform 220ms ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--rule);
}
.btn-ghost:hover { background: var(--paper); }

.btn-google {
  background: #fff;
  color: var(--navy);
  border-color: var(--rule);
  width: 100%;
  justify-content: center;
}
.btn-google img { width: 18px; height: 18px; }
.btn-google:hover { background: var(--paper); }

.btn-full { width: 100%; justify-content: center; }

.text-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  position: relative;
}
.text-link::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%;
  bottom: -2px;
  height: 1.5px;
  background: currentColor;
  transition: left 220ms ease, right 220ms ease;
}
.text-link:hover::after { left: 0; right: 0; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--navy);
  opacity: 0.55;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* ---------- Accordion ---------- */
.accordion {
  margin: 14px 0 8px;
  border: 1.5px dashed var(--mint);
  border-radius: var(--r-card);
  background: var(--mint-soft);
  padding: 0;
  overflow: hidden;
}
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  margin-left: auto;
  font-size: 20px;
  line-height: 1;
  transition: transform 200ms ease;
}
.accordion[open] summary::after { transform: rotate(45deg); }
.accordion .accordion-body {
  padding: 0 18px 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--navy);
}
.accordion ol {
  margin: 0;
  padding-left: 20px;
}
.accordion ol li { margin: 6px 0; }

/* ---------- Done page ---------- */
.done-card {
  text-align: center;
  padding: clamp(40px, 5vw, 72px) clamp(28px, 4vw, 56px);
}
.done-card .checkmark {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 999px;
  background: var(--mint);
  display: grid;
  place-items: center;
}
.done-card .checkmark svg {
  width: 36px;
  height: 36px;
  color: var(--navy);
}
.done-card h1 {
  font-size: clamp(32px, 4vw, 44px);
  margin-bottom: 14px;
}
.done-card p {
  max-width: 48ch;
  margin: 0 auto 24px;
}
.qr-placeholder {
  width: 180px;
  height: 180px;
  margin: 28px auto 12px;
  border: 1.5px dashed var(--rule);
  border-radius: var(--r-card);
  display: grid;
  place-items: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.5;
  background:
    linear-gradient(45deg, transparent 48%, var(--hairline) 48% 52%, transparent 52%),
    var(--paper);
}

/* ---------- Reassurance bar (no-password copy) ---------- */
.reassure {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 8px 0 4px;
  padding: 12px 16px;
  border: 1.5px dashed var(--mint);
  border-radius: var(--r-card);
  background: var(--mint-soft);
  font-size: 14px;
  line-height: 1.5;
  color: var(--navy);
}
.reassure .lock {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--mint);
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.reassure .lock svg { width: 13px; height: 13px; color: var(--navy); }
.reassure strong { font-weight: 700; }

/* ---------- Mobile-banner ---------- */
.mobile-banner {
  display: none;
  background: var(--navy);
  color: #fff;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.mobile-banner-inner {
  width: var(--shell-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mobile-banner svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--mint); }
.mobile-banner strong { font-weight: 700; color: var(--mint); }
.mobile-banner .close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.8;
  padding: 4px 8px;
}
.mobile-banner .close:hover { opacity: 1; }
.mobile-banner.show { display: block; }

/* ---------- Questionnaire ---------- */
.q-block {
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 18px 20px;
  margin-bottom: 14px;
  background: var(--paper-pure);
}
.q-block > .q-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  display: block;
}
.q-block > .q-sub {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy);
  opacity: 0.65;
  margin: 0 0 12px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  background: var(--paper-pure);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.chip:hover { background: var(--paper); }
.chip input { display: none; }
.chip.selected,
.chip:has(input:checked) {
  background: var(--mint-soft);
  border-color: var(--navy);
}

/* 0-10 slider variant */
.scale {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.scale label {
  flex: 1;
  min-width: 36px;
  text-align: center;
  padding: 10px 0;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  background: var(--paper-pure);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.scale label:has(input:checked) {
  background: var(--navy);
  color: var(--mint);
  border-color: var(--navy);
}
.scale input { display: none; }
.scale-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.6;
  margin-top: 4px;
}

/* ---------- Send link cards ---------- */
.send-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.send-card {
  border: 1.5px solid var(--rule);
  border-radius: var(--r-card);
  padding: 22px;
  background: var(--paper-pure);
}
.send-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}
.send-card p {
  margin: 0 0 14px;
  font-size: 14px;
  opacity: 0.72;
}
.send-card .inline-row {
  display: flex;
  gap: 8px;
}
.send-card .inline-row input {
  flex: 1;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 14px;
  border: 1.5px solid var(--rule);
  border-radius: var(--r-field);
  background: var(--paper-pure);
}
.send-card .inline-row input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px var(--mint-soft);
}

/* ---------- Footer ---------- */
footer.onboard-foot {
  border-top: 1px solid var(--hairline);
  padding: 24px 0;
  background: var(--paper);
}
.foot-inner {
  width: var(--shell-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.7;
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .choice-grid.two,
  .choice-grid.four { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .sheet { padding: 28px 22px; margin: 16px auto 48px; }
  .btn-row { flex-direction: column-reverse; align-items: stretch; }
  .btn, .btn-ghost { width: 100%; justify-content: center; }
  .code-row { max-width: 100%; gap: 6px; }
  .code-row input { font-size: 22px; }
}
