/* ============================================================================
   ENROLLMENT — the public page a new client opens from one link (12 Oct 2026).
   A letter from the coach, not a registration wizard. One espresso brand band
   carries the mark and the four steps; everything the client reads and answers
   sits on warm ivory (the brand's ivory / stone, not another black screen), and
   the legal documents are paper. Black and gold stay the signature: the mark,
   the current step, the one primary action. Mobile first — 390px is the design
   width — and the same composition widens to a reading column on a desktop.

   NO WEBFONT, by design: a font CDN would be a second origin on a page that
   carries a health declaration (CSP `default-src 'none'`). The system faces are
   set with care instead: the Apple serif family for the voice (headings, the
   coach's words), the system sans for everything a person fills in.
   Tap targets ≥ 48px, inputs at 16px (iOS never zooms), errors with a sign and
   words, never colour alone. Prints as it reads.
   ============================================================================ */
:root {
  --ground: #f3ede2;          /* the page: brand ivory */
  --stone: #e9e2d6;           /* a quiet second surface */
  --paper: #fbfaf7;           /* documents, the signature pad, white-ish */
  --band: #141210;            /* the brand band: warm espresso */
  --band-ink: #f3ede2; --band-ink-2: #a8a49b; --band-line: rgba(243,237,226,.12);
  --ink-1: #1a1815; --ink-2: #3a3630; --ink-3: #625c53; --ink-4: #7d776d;
  --line: rgba(26,24,21,.11); --line-strong: rgba(26,24,21,.26);
  --gold: #8f7440;            /* gold for text on ivory (4.6:1) */
  --gold-bright: #c9a96e;     /* gold on the espresso band */
  --ok: #276848; --attn: #a63f34;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --r: 6px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink-1);
  font: 16px/1.55 var(--ui); -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.ob { max-width: 41rem; margin: 0 auto; padding: 0 20px 96px; outline: none; }

/* ---------------------------------------------------------------- the brand band --- */
.ob-head {
  display: flex; align-items: center; gap: 12px; margin: 0 calc(50% - 50vw) 28px; padding: 18px calc(50vw - 50% + 20px);
  background: var(--band); color: var(--band-ink);
}
.ob-head svg { display: block; flex: none; width: 34px; height: 24px; }
.ob-head .wm { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--band-ink); font-weight: 600; }
.ob-head .sub { margin-left: auto; font-size: 12.5px; color: var(--band-ink-2); font-variant-numeric: tabular-nums; }
.ob-head .leave { font-size: 13px; color: var(--band-ink-2); }
.ob-head .wm + .leave { margin-left: auto; }
.ob-head .sub + .leave { margin-left: 16px; }
.ob-head .leave:hover { color: var(--band-ink); }
@media (max-width: 419px) { .ob-head { gap: 10px; } .ob-head .wm { font-size: 11.5px; letter-spacing: .11em; min-width: 0; line-height: 1.3; } .ob-head .sub { display: none; } .ob-head .leave { flex: none; white-space: nowrap; } }   /* I7-S3-01 (21 Oct): the wordmark may wrap when the text is enlarged (it stays one line at its normal size); Leave keeps its place and never leaves the viewport */   /* the band stays one line on a small phone; the progress words live on the screen itself */

/* ---------------------------------------------------------------- the four steps --- */
.ob-steps { margin: -8px 0 22px; }
.ob-steps ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.ob-steps li { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 4px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 12.5px; letter-spacing: .04em; color: var(--ink-4); white-space: nowrap; min-width: max-content; }   /* I7-S3-01 (21 Oct): a step keeps its words whole; when the enlarged text no longer fits one row, the row wraps (see .ob-steps ol) instead of overlapping or leaving the viewport */
@media (min-width: 420px) { .ob-steps li { font-size: 13.5px; } }
.ob-steps li.cur { color: var(--ink-1); font-weight: 600; border-bottom-color: var(--gold); }
.ob-steps li.done { color: var(--ink-3); }
.ob-sub { margin: 10px 0 0; font-size: 13px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.ob-sent { display: inline-flex; gap: 8px; align-items: baseline; margin: 0 0 18px; color: var(--ok); font-size: 14.5px; font-weight: 500; }

/* ---------------------------------------------------------------- the sections --- */
.ob-card { padding-top: 6px; }
.ob-card + .ob-card { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
h1 { font: 500 34px/1.12 var(--serif); letter-spacing: -.012em; margin: 0 0 12px; color: var(--ink-1); text-wrap: balance; }
.lead { color: var(--ink-2); margin: 0 0 24px; font-size: 17px; line-height: 1.5; max-width: 34em; }
.quiet { color: var(--ink-3); margin: 0 0 16px; }
.note { color: var(--ink-3); font-size: 14px; line-height: 1.55; margin: 18px 0 0; max-width: 36em; }
.err { color: var(--attn); font-size: 14.5px; margin: 14px 0 0; }
.err:empty { display: none; }
h1[tabindex]:focus { outline: 0; }   /* programmatic focus for assistive tech; a heading is not a control, so no ring */

/* ---------------------------------------------------------------- the plan, the documents --- */
.ob-list { list-style: none; margin: 4px 0 4px; padding: 0; border-top: 1px solid var(--line); }
.ob-list li { display: grid; grid-template-columns: 30px 1fr auto; align-items: baseline; gap: 4px 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.ob-list.docs li { grid-template-areas: "n t g" "x b b"; }
.ob-list.docs .n { grid-area: n; } .ob-list.docs .t { grid-area: t; } .ob-list.docs .g { grid-area: g; }
.ob-list.docs .btn { grid-area: b; justify-self: start; margin-top: 10px; }
.ob-list .n { font: 500 15px/1 var(--serif); color: var(--gold); font-variant-numeric: tabular-nums; }
.ob-list .t { font-size: 17px; font-weight: 500; color: var(--ink-1); }
.ob-list .t .v { display: block; color: var(--ink-4); font-size: 13px; font-weight: 400; margin-top: 3px; }
.ob-list .g { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
.ob-list .g.ok { color: var(--ok); font-weight: 500; }
.ob-list .g.opt { display: inline; min-height: 0; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--ink-4); }   /* `.opt` is also the answer-row class; the tag is text */

.ob-filed { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--line); }
.ob-filed li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ob-filed .t { font-size: 16.5px; font-weight: 500; }
.ob-filed .t .v { display: block; color: var(--ink-4); font-size: 13px; font-weight: 400; margin-top: 3px; }
.ob-filed .ref { font: 500 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; color: var(--ink-3); white-space: nowrap; }
.ob-filed .copy { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: 14px; }
.ob-filed .copy .dl { color: var(--ink-3); }

/* ---------------------------------------------------------------- the server's terms (R8) --- */
.ob-doc .variant { margin: -6px 0 18px; padding: 8px 12px; border-left: 2px solid var(--gold); background: var(--ground); font-weight: 600; font-size: 13.5px; }
.terms { margin: 0 0 20px; padding: 14px 16px; background: var(--stone); border-radius: var(--r); }
.terms .lbl { display: block; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; font-weight: 600; }
.terms dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: 15px; }
.terms dt { color: var(--ink-3); }
.terms dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }

/* ---------------------------------------------------------------- the signed copy (R7 A) --- */
.ob-copy-bar { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.ob-copy { background: var(--paper); color: var(--ink-1); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 22px 44px; font-size: 15px; line-height: 1.62; overflow-wrap: anywhere; }
.ob-copy header { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.ob-copy h1 { font-size: 24px; margin: 22px 0 4px; }
.ob-copy h2 { font: 600 16px/1.35 var(--ui); margin: 24px 0 6px; }
.ob-copy h3 { font: 600 14px/1.35 var(--ui); margin: 18px 0 4px; }
.ob-copy p { margin: 0 0 11px; }
.ob-copy ul { margin: 0 0 11px 20px; padding: 0; }
.ob-copy .ver { color: var(--ink-3); font-size: 13px; }
.ob-copy .var { padding: 8px 12px; border-left: 2px solid var(--gold); background: var(--ground); font-weight: 600; font-size: 13px; }
.ob-copy .blk { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 18px; }
.ob-copy .sig { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.ob-copy .sig img { display: block; max-width: 280px; width: 100%; height: auto; }
.ob-copy dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin: 10px 0 0; font-size: 13px; }
.ob-copy dt { color: var(--ink-3); }
.ob-copy dd { margin: 0; overflow-wrap: anywhere; }
.ob-copy .ref { font: 600 14px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }

/* ---------------------------------------------------------------- fields --- */
.fld { display: block; margin: 0 0 22px; }
.fld > span, .fld .lbl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 8px; }
.fld input[type="text"], .fld input[type="date"] {
  width: 100%; background: var(--paper); color: var(--ink-1); border: 1px solid var(--line-strong);
  border-radius: var(--r); padding: 13px 14px; font: 16px/1.2 var(--ui);   /* 16px: anything smaller makes iOS zoom the page */
  -webkit-appearance: none; appearance: none; min-height: 48px;
}
.fld input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* the pad: paper, a baseline to sign on; `touch-action: none` (set from signature.js) stops the page scrolling under the stroke */
.pad { position: relative; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px; }
.pad canvas { display: block; width: 100%; height: 172px; touch-action: none; }
.pad .rule { position: absolute; left: 24px; right: 24px; bottom: 36px; height: 1px; background: var(--line-strong); pointer-events: none; }

/* ---------------------------------------------------------------- consents --- */
.grp { border: 0; border-top: 1px solid var(--line); margin: 0 0 4px; padding: 20px 0 6px; }
.grp legend { padding: 0; font: 500 18px/1.3 var(--serif); color: var(--ink-1); }
.chk { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 12px 0; cursor: pointer; min-height: 48px; }
.chk input { width: 21px; height: 21px; margin: 2px 0 0; accent-color: var(--ink-1); flex: none; }
.chk b { display: block; font-weight: 600; font-size: 15.5px; }
.chk em { display: block; font-style: normal; color: var(--ink-3); font-size: 14px; line-height: 1.5; margin-top: 3px; }
.chk.ack { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 18px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

.adopted { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 22px 0 4px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-1); }
.adopted .quiet { color: var(--ink-3); margin: 0; font-size: 13px; }
.adopted b { font-size: 15.5px; }
.adopted img { display: block; height: 46px; width: auto; margin-left: auto; }

/* ---------------------------------------------------------------- the document --- */
/* Paper, at reading measure. It prints as it reads. */
.ob-doc { background: var(--paper); color: var(--ink-1); border: 1px solid var(--line); border-radius: var(--r); padding: 30px 22px 32px; margin-bottom: 26px; }
.ob-doc h1 { font-size: 26px; margin: 0 0 18px; }
.ob-doc .body { font-size: 15.5px; line-height: 1.65; }
.ob-doc h2 { font: 600 16px/1.35 var(--ui); margin: 26px 0 6px; }
.ob-doc h3 { font: 600 14.5px/1.35 var(--ui); margin: 20px 0 4px; }
.ob-doc p { margin: 0 0 11px; }
.ob-doc ul { margin: 0 0 11px 20px; padding: 0; }
.ob-doc li { margin: 0 0 5px; }

/* ---------------------------------------------------------------- buttons --- */
.btn {
  display: inline-block; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-1);
  border-radius: var(--r); padding: 14px 22px; font: 600 15px/1 var(--ui); cursor: pointer;
  min-height: 48px;   /* a real tap target, on a page that is mostly used one-handed */
}
.btn.primary { background: var(--band); border-color: var(--band); color: var(--band-ink); }
.btn.primary:hover { background: #26221d; }
.btn.small { padding: 11px 16px; min-height: 44px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn:focus-visible, .tlink:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ob-card > .btn { margin-top: 24px; }
.tlink { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------------------------------------------------------------- the questions --- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qs { margin: 2px 0 0; }
.q { padding: 20px 0 22px; border-bottom: 1px solid var(--line); }
.q[hidden] { display: none; }
.q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.qlabel { display: block; font-size: 17px; line-height: 1.4; font-weight: 500; color: var(--ink-1); margin: 0 0 12px; padding: 0; }
.optl { font-size: 13px; font-weight: 400; color: var(--ink-4); margin-left: 6px; }
.hint { display: block; color: var(--ink-3); font-size: 14px; line-height: 1.5; margin: -6px 0 12px; }
.qerr { display: block; color: var(--attn); font-size: 14px; margin-top: 10px; }
.q.has-err .qlabel::before { content: '! '; color: var(--attn); font-weight: 700; }
.q input[type="text"], .q input[type="tel"], .q input[type="date"], .q input[type="number"], .q textarea, .q select {
  width: 100%; background: var(--paper); color: var(--ink-1); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 13px 14px; font: 16px/1.35 var(--ui); min-height: 48px; -webkit-appearance: none; appearance: none;
}
.q textarea { min-height: 120px; resize: vertical; }
.q select { background-image: none; }
.q [aria-invalid="true"], .q fieldset[aria-invalid="true"] .opts { border-color: var(--attn); }
.q input:focus-visible, .q textarea:focus-visible, .q select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.opts { display: grid; gap: 8px; }
.opts.yn { grid-template-columns: 1fr 1fr; }
.opts.multi { grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); cursor: pointer; font-size: 15.5px; line-height: 1.3; color: var(--ink-1); }
.opt input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink-1); }
.opt:has(input:checked) { border-color: var(--ink-1); background: #fff; font-weight: 500; }
.opt:has(input:disabled) { opacity: .5; cursor: default; }
.opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 1px; }
.unit { display: inline-flex; gap: 0; margin: 0 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.unit label { display: flex; align-items: center; min-height: 40px; cursor: pointer; }
.unit input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.unit span { padding: 9px 16px; font-size: 14px; color: var(--ink-3); }
.unit input:checked + span { background: var(--band); color: var(--band-ink); font-weight: 600; }
.unit input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.pair { display: flex; gap: 10px; }
.mini { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 12rem; }
.mini span { color: var(--ink-3); font-size: 14px; }
.tz .tzline { margin: 0 0 8px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.qblock { margin-top: 28px; }
.qblock h2, .rv h2 { font: 500 20px/1.3 var(--serif); color: var(--ink-1); margin: 0 0 4px; }
.qblock > .note { margin: 6px 0 4px; color: var(--ink-2); font-size: 14.5px; }
.ob-errs { margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--attn); border-radius: var(--r); background: var(--paper); outline: none; }
.ob-errs h2 { font: 600 15px/1.3 var(--ui); margin: 0 0 6px; color: var(--ink-1); }
.ob-errs ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.ob-errs a { color: var(--gold); }
.ob-save { min-height: 20px; margin: 16px 0 0; font-size: 13.5px; color: var(--ink-4); }
.ob-save.warn { color: var(--attn); }
.ob-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.ob-nav .btn { min-width: 7.5rem; }
.rv { padding: 20px 0 10px; border-bottom: 1px solid var(--line); }
.rv-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rv-h .tlink { padding: 0 8px; margin-right: -8px; }   /* the row-end Edit: a 44 × 44 target, type where it was */
.rv dl { display: grid; grid-template-columns: 1fr; gap: 3px 16px; margin: 10px 0 8px; font-size: 15px; }
.rv dt { color: var(--ink-3); font-size: 13px; margin-top: 10px; }
.rv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--ink-1); }
.faint { color: var(--ink-4); }
.sig-line { margin-top: -8px; font: italic 500 17px/1.3 var(--serif); color: var(--ink-2); }
@media (min-width: 560px) {
  .rv dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rv dt { margin-top: 0; }
  .opts.multi { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 559px) { .ob-card > .btn.primary, .ob-nav .btn.primary { flex: 1; width: 100%; } .ob-nav .btn { min-width: 0; } }
/* a text action is a real target on a phone or any touch screen: 44px tall, the type does not move */
@media (max-width: 559px), (pointer: coarse) {
  .tlink { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; }
  .ob-head .leave { margin-top: -12px; margin-bottom: -12px; }
  .fld .lbl-row .tlink { margin: -14px 0; }
}

/* ---------------------------------------------------------------- wider --- */
@media (min-width: 560px) {
  .ob { padding: 0 32px 120px; }
  .ob-head { margin-bottom: 40px; padding-top: 22px; padding-bottom: 22px; }
  .ob-head svg { width: 40px; height: 28px; }
  .ob-head .wm { font-size: 13px; }
  h1 { font-size: 42px; }
  .ob-doc { padding: 44px 44px 48px; }
  .ob-list.docs li { grid-template-areas: "n t g b"; grid-template-columns: 30px 1fr auto auto; align-items: center; }
  .ob-list.docs .btn { margin-top: 0; margin-left: 16px; }
  .ob-steps { margin-top: -14px; }
}
/* An iPad signing in the studio: the pad gets the room a pen wants. */
@media (min-width: 760px) and (pointer: coarse) { .pad canvas { height: 220px; } }

@media (prefers-reduced-motion: no-preference) { .ob-card { animation: up .22s ease-out both; } }
@keyframes up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media print {
  body { background: #fff; color: #000; }
  .ob-head, .btn, .tlink, .ob-card.sign, .ob-steps, .noprint { display: none !important; }
  .ob-doc, .ob-copy { border: 0; border-radius: 0; padding: 0; }
}

/* ONB-V2 · after Done, the app (only when the page runs on the enrollment backend) */
.ob-app { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.ob-app h2 { font: 500 20px/1.3 var(--serif); color: var(--ink-1); margin: 0 0 6px; }
.ob-app p { margin: 0 0 16px; }
.ob-app .err { margin: 0 0 14px; }
.ob-app a.btn { text-decoration: none; display: inline-flex; align-items: center; }
