/* ============================================================================
   The onboarding form: styles.

   One neutral theme. To use your own colours, change the values in :root only.
   --brand is your main colour: the Continue and Submit buttons, the active
   step and the selected options. Keep it dark enough for white text on it.
   ========================================================================= */

:root {
  --brand: #1F2937;        /* your main colour */
  --brand-hover: #374151;
  --brand-text: #FFFFFF;   /* text on the main colour */

  --bg: #F6F7F9;           /* the page */
  --panel: #FFFFFF;        /* the card */
  --panel2: #F1F3F6;       /* the grey box and the step dots */
  --ink: #111827;          /* main text */
  --ink-2: #374151;
  --mute: #4B5563;
  --mute2: #6B7280;
  --line: #E5E7EB;
  --error: #B42318;
  --tint: rgba(31, 41, 55, .06);
  --line-strong: rgba(31, 41, 55, .32);
  --shadow: 0 4px 6px rgba(17, 24, 39, .06);
  --shadow-h: 0 10px 28px rgba(17, 24, 39, .12);

  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: Sora, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.012em; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 40px 24px 72px; }

/* ---------- header ------------------------------------------------------- */
.masthead { display: flex; justify-content: center; margin-bottom: 32px; min-height: 1.4em; }
.wordmark {
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- progress rail ------------------------------------------------ */
.rail { display: flex; align-items: flex-start; justify-content: center; margin-bottom: 36px; }
.rail-step {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex: 0 0 auto; width: 100px; background: none; border: 0; padding: 0;
  font: inherit; cursor: default;
}
.rail-step[data-clickable="1"] { cursor: pointer; }
.rail-dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 700;
  background: var(--panel2); color: var(--mute2); border: 1.5px solid var(--line);
}
.rail-label {
  font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mute2); text-align: center; line-height: 1.3;
}
.rail-step[data-state="active"] .rail-dot { background: var(--brand); border-color: var(--brand); color: var(--brand-text); }
.rail-step[data-state="active"] .rail-label { color: var(--ink); font-weight: 700; }
.rail-step[data-state="done"] .rail-dot { background: var(--tint); border-color: var(--line-strong); color: var(--brand); }
.rail-step[data-state="done"] .rail-label { color: var(--mute); }
.rail-line { flex: 1 1 auto; height: 1.5px; background: var(--line); margin-top: 17px; min-width: 14px; }
.rail-line[data-state="done"] { background: var(--line-strong); }

/* ---------- the card ----------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 44px 44px 38px;
}
.eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 10px;
}
h1 { font-size: 2rem; line-height: 1.15; font-weight: 800; margin: 0 0 14px; color: var(--ink); }
.blurb { color: var(--ink-2); margin: 0 0 12px; font-size: 1rem; }

/* The grey box at the top of page 1: time, saving, what to have ready. */
.note {
  background: var(--panel2);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 22px 0 34px;
  color: var(--ink-2);
  font-size: .92rem;
  line-height: 1.55;
}
.note p { margin: 0 0 8px; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note ul { margin: 0 0 8px; padding-left: 1.2em; }
.note strong { color: var(--ink); }

.banner {
  display: none;
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid var(--error);
  color: var(--error);
  font-size: .9rem;
  font-weight: 600;
}
.banner[data-show="1"] { display: block; }

/* ---------- one question: label, help, control, error -------------------- */
.field { margin-bottom: 32px; }
.field:last-of-type { margin-bottom: 8px; }
.field-label { display: block; font-weight: 700; font-size: 1rem; line-height: 1.45; color: var(--ink); margin-bottom: 5px; }
.req { color: var(--error); margin-left: 3px; }
.opt { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute2); margin-left: 8px; font-weight: 500; }
.field-help { color: var(--mute); font-size: .88rem; line-height: 1.55; margin: 0 0 11px; }
.prefilled-note { margin: 7px 0 0; }
.field-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 12px; }
.field-links a { font-size: .82rem; font-weight: 600; color: var(--brand); text-decoration: none; border-bottom: 1px solid var(--line-strong); }

input[type="text"], input[type="email"], input[type="url"], textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
}
textarea { resize: vertical; min-height: 92px; }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--tint); }
input::placeholder, textarea::placeholder { color: var(--mute2); }
.field[data-invalid="1"] input, .field[data-invalid="1"] textarea { border-color: var(--error); }
.field-error { display: none; color: var(--error); font-size: .85rem; margin-top: 7px; font-weight: 500; }
.field[data-invalid="1"] .field-error { display: block; }

.info-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: .8rem; font-weight: 600; color: var(--brand); margin-bottom: 11px;
}
.info-btn:hover { text-decoration: underline; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip {
  padding: 5px 13px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-2); font-size: .78rem; cursor: pointer;
}
.chip:hover { border-color: var(--line-strong); background: var(--tint); }

/* ---------- option cards ------------------------------------------------- */
.cards { display: flex; flex-direction: column; gap: 9px; }
.opt-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px; border-radius: 6px;
  border: 2px solid var(--line); background: var(--panel); cursor: pointer;
}
.opt-card:hover { border-color: var(--mute2); }
.opt-card[data-selected="1"] { border-color: var(--brand); background: var(--tint); }
.opt-card input { margin-top: 4px; accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.opt-card .t { font-weight: 700; font-size: .95rem; color: var(--ink); display: block; }
.opt-card .d { font-size: .85rem; color: var(--mute); line-height: 1.5; margin-top: 2px; display: block; }

/* The tick under a text box ("We do not have one yet"). */
.none-tick { display: inline-flex; align-items: center; gap: 9px; margin-top: 10px; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.none-tick input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; }
.none-tick[data-checked="1"] { margin-top: 0; color: var(--ink); font-weight: 600; }

/* ---------- review page -------------------------------------------------- */
.review-group { margin-bottom: 32px; }
.review-group h2 {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 4px; padding-bottom: 9px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.edit-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand);
}
.edit-link:hover { text-decoration: underline; }
.review-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-row:last-child { border-bottom: none; }
.review-q { font-size: .85rem; color: var(--mute); margin: 0 0 5px; line-height: 1.45; }
.review-a { font-size: .98rem; color: var(--ink); margin: 0; white-space: pre-wrap; word-break: break-word; font-weight: 500; }
.review-a.empty { color: var(--mute2); font-style: italic; font-weight: 400; }
.review-a.yes { color: var(--brand); font-weight: 700; }
.review-a.no { color: var(--error); font-weight: 700; }

/* ---------- buttons ------------------------------------------------------ */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line);
}
.nav-spacer { flex: 1; }
.btn {
  font-family: var(--sans); font-size: .95rem; font-weight: 700;
  border-radius: 6px; padding: 12px 28px; cursor: pointer; border: 1.5px solid transparent;
}
.btn-primary { background: var(--brand); color: var(--brand-text); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: var(--shadow-h); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: none; color: var(--mute); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--mute2); }

.save-hint { font-size: .75rem; color: var(--mute2); text-align: center; margin-top: 16px; }

/* The pill at the bottom right: Saved / Saving / Not saved. */
.save-status {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; margin: 0;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); box-shadow: var(--shadow);
  font-size: .8rem; font-weight: 600; color: var(--mute);
  pointer-events: none;
}
.save-status[data-state="saved"]::before { content: "\2713  "; color: var(--brand); }
.save-status[data-state="retrying"], .save-status[data-state="failed"] { color: var(--error); border-color: var(--error); }

/* ---------- the info window ---------------------------------------------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .42);
  display: none; place-items: center; padding: 24px; z-index: 50;
}
.modal-back[data-open="1"] { display: grid; }
.modal {
  background: var(--panel); border-radius: 10px; border: 1px solid var(--line);
  box-shadow: var(--shadow-h); max-width: 560px; width: 100%; padding: 28px 30px 24px;
}
.modal h3 { margin: 0 0 12px; font-size: 1.15rem; }
.modal ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); font-size: .93rem; }
.modal li { margin-bottom: 8px; }

/* ---------- thank-you page ----------------------------------------------- */
.centred { text-align: center; }
.tick {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 800;
  background: var(--brand); color: var(--brand-text);
}
.done-block { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); text-align: center; }
.done-block h2 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.done-body { margin: 0 auto 14px; max-width: 46ch; font-size: .95rem; color: var(--ink-2); }
.done-link { font-weight: 700; color: var(--brand); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.done-steps { margin: 14px auto 0; padding: 0 0 0 1.25em; max-width: 52ch; text-align: left; color: var(--ink-2); font-size: .97rem; }
.done-steps li { margin: 0 0 12px; }

.brandfoot { margin-top: 32px; text-align: center; font-size: .8rem; color: var(--mute2); }

/* ---------- phones ------------------------------------------------------- */
@media (max-width: 640px) {
  .wrap { padding: 24px 16px 64px; }
  .card { padding: 28px 20px 24px; }
  h1 { font-size: 1.6rem; }
  .rail { margin-bottom: 24px; }
  .rail-step { width: 36px; }
  .rail-dot { width: 30px; height: 30px; font-size: .78rem; }
  .rail-label { display: none; }
  .rail-line { margin-top: 14px; min-width: 6px; }
  .nav { flex-direction: column-reverse; align-items: stretch; }
  .nav .btn { width: 100%; }
  .nav-spacer { display: none; }
  .save-status { right: 10px; bottom: 10px; padding: 5px 10px; font-size: .75rem; }
}
