:root {
  /* Surfaces */
  --ground:       #e9e0d2;   /* THE LyForic cream, behind white cards */
  --card:         #ffffff;
  --line:         #eee8dc;
  --line-strong:  #ddd3c0;
  --note-bg:      #f4f5f7;

  /* Ink */
  --ink:          #17181c;
  --ink-2:        #5c6470;
  --ink-3:        #9aa1ab;

  /* The one Lyforic thread */
  --action:        #1b3a5f;
  --terra-500:     #c1502e;   /* accents at display size only */
  --terra-600:     #9f3e23;   /* fills behind small text, accent-as-text */
  --terra-700:     #7f301a;   /* hover */
  --action-hover:  #152b47;
  --action-active: #111f32;
  --action-ring:   rgba(27, 58, 95, .25);

  /* Success (sage) */
  --success:       #5f7d4f;
  --success-text:  #375a30;

  /* Danger */
  --danger-bg:     #fdeeec;
  --danger-border: #f2c4bd;
  --danger-text:   #a13535;

  /* Radius */
  --r-card:     16px;
  --r-control:  12px;
  --r-chip:     999px;

  /* Shadow */
  --shadow-card: 0 1px 2px rgba(16,17,20,.04), 0 12px 32px rgba(16,17,20,.07);

  /* Type — Inter only */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, serif;

  /* Motion (unchanged from prior build; re-skin, don't re-time) */
  --ease:          cubic-bezier(.2, .7, .2, 1);
  --ease-out-soft: cubic-bezier(.22, 1, .36, 1);
  --ease-out-back: cubic-bezier(.34, 1.4, .46, 1);
  --motion-base:   220ms;
  --motion-slow:   520ms;
  --motion-shift:  14px;
  --motion-scale-from: .96;
  --motion-pop-from:   .9;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font: 15.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(18px, 5vw, 56px) 16px;
}

/* ── The sheet ─────────────────────────────────────────────────── */

.card {
  background: var(--card);
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: clamp(20px, 5vw, 26px) clamp(20px, 5vw, 30px) clamp(26px, 5vw, 32px);
  position: relative;
  animation: sheet-in var(--motion-slow) var(--ease-out-soft) both;
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(var(--motion-shift)) scale(var(--motion-scale-from)); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Sheet top bar: brand word left, step counter right, hairline below ── */

.letterhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--line);
  animation: rise var(--motion-slow) .12s var(--ease-out-soft) both;
}

/* brand mark: navy rounded-square glyph + wordmark */
.seal {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--action);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  flex: none;
  animation: seal-strike var(--motion-base) .18s var(--ease-out-back) both;
}
.wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  animation: rise var(--motion-slow) .2s var(--ease-out-soft) both;
}
/* step counter, right side of the sheet top bar */
.stepcount {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  flex: none;
  animation: rise var(--motion-slow) .2s var(--ease-out-soft) both;
}
/* group the glyph + word on the left, counter on the right */
.letterhead .seal { order: 0; }
.letterhead .wordmark { order: 1; margin-right: auto; }
.letterhead .stepcount { order: 2; }

@keyframes seal-strike {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Research review: a working sheet with an evidence margin ─── */
.review-sheet { width: min(100%, 980px); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); border-radius: var(--r-card); padding: clamp(20px,4vw,48px); }
.review-intro { max-width: 700px; border-left: 4px solid var(--terra-500); padding-left: 18px; }
.review-intro h1 { font-size: clamp(30px,5vw,52px); }
.review-intro > p:last-child { color: var(--ink-2); margin: 0; }
.eyebrow { color: var(--terra-600); font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; margin: 0 0 8px; }
.review-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin:28px 0 18px; padding:12px 0; color:var(--ink-2); font-size:13px; }
.review-toolbar > span { margin-right:auto; }
.quiet-button { appearance:none; border:1px solid var(--line-strong); border-radius:var(--r-chip); background:#fff; color:var(--action); padding:7px 11px; font:600 13px var(--font); cursor:pointer; }
.quiet-button:hover { background:var(--note-bg); }
.claim-group { margin: 28px 0; }
.claim-group h2 { font-size:14px; text-transform:uppercase; letter-spacing:.1em; color:var(--ink-2); margin:0 0 10px; }
.claim-card { display:grid; grid-template-columns:minmax(0,1fr) 180px; border:1px solid var(--line-strong); border-radius:12px; overflow:hidden; margin:10px 0; background:#fff; }
.claim-body { padding:18px; min-width:0; }
.claim-body h3 { font-size:18px; line-height:1.35; margin:8px 0; font-weight:600; }
.claim-boundary { color:var(--ink-2); font-size:13px; margin:0 0 14px; }
.status { display:inline-block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; border-radius:var(--r-chip); padding:3px 8px; background:#edf2f7; color:var(--action); }
.status.stale,.status.conflicted { background:var(--danger-bg); color:var(--danger-text); }
.claim-controls { display:flex; flex-wrap:wrap; gap:6px; border:0; padding:0; margin:0 0 10px; }
.decision { border:1px solid var(--line-strong); border-radius:var(--r-chip); color:var(--ink-2); padding:5px 9px; font-size:13px; cursor:pointer; }
.decision:has(input:checked) { background:var(--action); border-color:var(--action); color:#fff; }
.decision input { width:auto; min-height:auto; margin:0 5px 0 0; accent-color:var(--action); }
.claim-body textarea { width:100%; border:1px solid var(--line-strong); border-radius:8px; padding:8px; color:var(--ink); font:13px/1.4 var(--font); resize:vertical; }
.claim-body textarea:focus { outline:2px solid var(--action); outline-offset:2px; }
.evidence-rail { background:#f8f4ec; border-left:1px solid var(--line-strong); padding:16px 13px; display:flex; flex-direction:column; align-items:flex-start; gap:5px; font-size:12px; overflow-wrap:anywhere; }
.evidence-rail a { color:var(--action); font-weight:600; text-underline-offset:3px; }
.evidence-rail small { color:var(--ink-2); line-height:1.35; }
.rail-label { color:var(--terra-600); font-size:10px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.review-footer { border-top:1px solid var(--line); margin-top:25px; padding-top:18px; display:flex; gap:20px; align-items:center; }.review-footer p { margin:0; color:var(--ink-2); font-size:13px; }.review-footer .btn { max-width:280px; flex:none; }
.loading { color:var(--ink-2); }.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
button:focus-visible,a:focus-visible { outline:3px solid var(--terra-500); outline-offset:3px; }
@media (max-width:650px) { body:has(.review-sheet) { padding:0; }.review-sheet { border-radius:0; border-width:0; min-height:100vh; }.claim-card { grid-template-columns:1fr; }.evidence-rail { border-left:0; border-top:1px solid var(--line-strong); display:grid; grid-template-columns:auto 1fr; }.rail-label { grid-column:1/-1; }.review-footer { display:block; }.review-footer .btn { max-width:none; margin-top:14px; }.review-toolbar > span { width:100%; } }
@media (prefers-reduced-motion: reduce) { .review-sheet, .review-intro, .claim-card { animation:none !important; } }

/* ── Progress: Evernote-style thin segment bar (3 segments) ──────
   Rendered from the existing <nav class=steps><ol>...</ol></nav> markup:
   each <li.step> becomes a 4px segment; the connector rules are hidden.
   Filled (#1b3a5f) for done/current, #e0e2e6 upcoming. Lives inside the
   top bar's flow region, but we place it as its own row under the bar. */

.steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 22px;
  animation: rise var(--motion-slow) .26s var(--ease-out-soft) both;
}
.steps ol {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  flex: 1 1 0;
  height: 4px;
  border-radius: var(--r-chip);
  background: var(--line-strong);   /* upcoming */
  overflow: hidden;
  position: relative;
}
.step .num, .step .label { display: none; }
.step-rule { display: none; }

/* done + current segments fill navy; current animates its fill */
.step.done { background: var(--action); }
.step.on {
  background: var(--action);
  /* segment fill sweep, honoring the num/segment-fill choreography beat */
  animation: segment-fill var(--motion-base) .56s var(--ease-out-soft) both;
  transform-origin: left center;
}
@keyframes segment-fill {
  from { transform: scaleX(.4); opacity: .5; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* ── Eyebrow / kicker (sentence case, no uppercase kickers) ─────── */

.kicker {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  animation: rise var(--motion-slow) .32s var(--ease-out-soft) both;
}

/* index eyebrow pill → quiet chip */
.pill {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-chip);
  background: var(--card);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  animation: rise var(--motion-slow) .28s var(--ease-out-soft) both;
}

h1 {
  font-family: var(--font-display);
  font-weight: 550;
  font-optical-sizing: auto;
  font-size: clamp(30px, 5.8vw, 42px);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 14px;
  text-wrap: balance;
  animation: rise var(--motion-slow) .38s var(--ease-out-soft) both;
}
/* copy is fixed; drop italic emphasis into the flat weight/color of the register */
h1 em { font-style: italic; color: var(--terra-600); }
/* pages whose eyebrow/kicker was removed: h1 is now the first content element
   after the progress bar, so it inherits the earlier ~.3s entrance slot */
.page-index h1, .page-phone h1, .page-verify h1, .page-done h1, .page-ai h1 {
  animation-delay: .30s;
}
.page-index .sub, .page-phone .sub, .page-verify .sub, .page-done .sub, .page-ai .sub {
  animation-delay: .38s;
}

.sub {
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0 0 22px;
  animation: rise var(--motion-slow) .44s var(--ease-out-soft) both;
}
.sub b { color: var(--ink); font-weight: 600; }

/* ── Buttons ──────────────────────────────────────────────────── */

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  animation: rise var(--motion-slow) .5s var(--ease-out-soft) both;
}

/* primary CTA: full-width, 52px, navy, radius 12 */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  background: var(--action);
  color: #fff;
  text-decoration: none;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15.5px;
  padding: 12px 20px;
  border-radius: var(--r-control);
  border: 1px solid var(--action);
  cursor: pointer;
  text-align: center;
  transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--action-hover); border-color: var(--action-hover); }
.btn:active { background: var(--action-active); border-color: var(--action-active); }

/* provider rows (index): Airbnb-style white rows, icon flush-left, label centered */
.actions .btn {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  font-weight: 500;
  position: relative;
}
.actions .btn:hover { background: var(--note-bg); border-color: var(--line-strong); }
.actions .btn:active { background: var(--note-bg); }

.ms {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-weight: 500;
  font-size: 15.5px;
  padding: 0 42px; /* keep the centered label clear of the flush-left icon */
}
/* icon flush-left, label optically centered (Airbnb pattern) */
.ms svg {
  position: absolute;
  left: 18px;
  width: 20px;
  height: 20px;
  flex: none;
}

/* ── Trust markers (index): quiet stacked micro-rows, sage checks ── */

.trust {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  animation: rise var(--motion-slow) .58s var(--ease-out-soft) both;
}
.trust li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
}
.trust svg { width: 15px; height: 15px; flex: none; color: var(--success); }

/* ── Form (phone) ─────────────────────────────────────────────── */

form {
  margin: 0;
  animation: rise var(--motion-slow) .5s var(--ease-out-soft) both;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 8px;
}

/* generic single input (fallback / verify-style if ever used) */
input[type="tel"], input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  background: var(--card);
  color: var(--ink);
  font: 15.5px/1.3 var(--font);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
input::placeholder { color: var(--ink-3); }
input:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 2px var(--action-ring); }

/* phone: split country-select + tel input styled as ONE 52px field.
   The wrapper owns the border + focus ring (focus-within). */
.phone-field {
  display: flex;
  align-items: stretch;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  background: var(--card);
  overflow: hidden;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.phone-field:focus-within {
  border-color: var(--action);
  box-shadow: 0 0 0 2px var(--action-ring);
}
.phone-field .cc {
  flex: none;
  border: 0;
  border-right: 1px solid var(--line);   /* subtle right hairline */
  border-radius: 0;
  background: var(--card);
  color: var(--ink);
  font: 15.5px/1.3 var(--font);
  padding: 14px 30px 14px 16px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235c6470' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
}
.phone-field .cc:hover { background-color: var(--note-bg); }
/* the inner controls carry no frame of their own; the wrapper owns it */
.phone-field input[type="tel"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.phone-field input[type="tel"]:focus { box-shadow: none; border-color: transparent; }
/* keyboard :focus-visible still lands a ring on the individual control for a11y */
.phone-field .cc:focus-visible,
.phone-field input[type="tel"]:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }

form .btn { margin-top: 18px; }

/* ── ai.html: bring-your-own-model form ───────────────────────── */
.page-ai .field-label { margin-top: 18px; }
.page-ai form > .field-label:first-of-type { margin-top: 0; }
.ai-select {
  width: 100%;
  min-height: 52px;
  padding: 14px 40px 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  background: var(--card);
  color: var(--ink);
  font: 15.5px/1.3 var(--font);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235c6470' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.ai-select:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 2px var(--action-ring); }
.field-hint { color: var(--ink-3); font-size: 12.5px; line-height: 1.5; margin: 7px 0 0; }
.field-hint code {
  font-family: var(--font); font-size: 12px;
  background: var(--note-bg); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 6px; color: var(--ink-2);
}
.field-block[hidden] { display: none; }
.ai-alt {
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.ai-alt .ai-or {
  display: block; margin-bottom: 12px;
  color: var(--ink-3); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
}
.ai-alt .btn { margin-top: 0; }
.ai-alt .muted { margin-top: 12px; }

.receipt {
  position: relative;
  background: var(--note-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  padding: 6px 16px 6px 34px;   margin: 6px 0 20px;
  animation: rise var(--motion-slow) .46s var(--ease-out-soft) both;
}

.row {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 0;
  font-size: 14.5px;
}
.row + .row { border-top: 1px solid var(--line); }

/* sage check circle marks each completed line */
.row .check {
  position: absolute;
  left: -26px;
  top: 12px;
  width: 18px;
  height: 18px;
  line-height: 0;
  animation: pop-in var(--motion-base) .74s var(--ease-out-back) both;
}
.row .check svg { width: 18px; height: 18px; display: block; }
.row + .row .check { animation-delay: .82s; }
.tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  min-width: 74px;
  flex: none;
}
.row .val { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

.mails-intro { margin-top: 4px; animation-delay: .5s; }
.mail-list { margin: 0 0 22px; }

/* .mail rows: crisp list, server emits them flat (no wrapper) */
.mail {
  border-top: 1px solid var(--line);
  padding: 13px 2px;
  font-size: 14.5px;
  animation: rise var(--motion-slow) .56s var(--ease-out-soft) both;
}
.mail + .mail { animation-delay: .62s; }
.mail + .mail + .mail { animation-delay: .68s; }
.mail + .mail + .mail + .mail { animation-delay: .74s; }
.mail + .mail + .mail + .mail + .mail { animation-delay: .8s; }
.mail + .mail + .mail + .mail + .mail + .mail { animation-delay: .86s; }
.mail:last-child { border-bottom: 1px solid var(--line); }
.mail b {
  display: block;
  font-weight: 600;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.35;
}
.mail span {
  display: block;
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 13px;
}

/* activate: navy primary CTA, pops in last (terracotta is gone) */
.activate {
  margin: 0;
  animation: pop-in var(--motion-base) .88s var(--ease-out-back) both;
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(var(--motion-pop-from)); }
  to   { opacity: 1; transform: scale(1); }
}
.activate .btn {
  background: var(--terra-600);
  border-color: var(--terra-600);
  color: #fff;
  font-weight: 600;
}
.activate .btn:hover { background: var(--terra-700); border-color: var(--terra-700); }
.activate .btn:active { background: var(--action-active); border-color: var(--action-active); }

/* server-injected ACTIVATE variants arrive flat (no .activate wrapper) */
.card > .btn {
  margin: 16px 0 0;
  background: var(--terra-600);
  border-color: var(--terra-600);
  color: #fff;
  font-weight: 600;
  animation: pop-in var(--motion-base) .88s var(--ease-out-back) both;
}
.card > .btn:hover { background: var(--terra-700); border-color: var(--terra-700); }
.card > .ok {
  display: block;
  text-align: center;
  margin: 16px 0 0;
  animation: pop-in var(--motion-base) .88s var(--ease-out-back) both;
}

/* ── Shared small type + server-injected flat blocks ───────────── */

.ok { color: var(--success-text); font-weight: 600; }

.note {
  background: var(--note-bg);
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 13px 15px;
  border-radius: var(--r-control);
  font-size: 14px;
  margin: 16px 0 0;
}
.err {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  padding: 13px 15px;
  border-radius: var(--r-control);
  font-size: 14px;
  margin: 16px 0 0;
}

.muted {
  color: var(--ink-2);
  font-size: 13px;
  margin: 20px 0 0;
  animation: rise var(--motion-slow) .64s var(--ease-out-soft) both;
}
.page-done .muted { animation-delay: .96s; }
.muted a { color: var(--action); text-underline-offset: 3px; }
.muted a:hover { color: var(--action-hover); }
.muted code {
  font-family: var(--font);
  font-size: 12.5px;
  background: var(--note-bg);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--ink-2);
}

/* ── verify.html: 6-digit code boxes ──────────────────────────── */

.code {
  display: flex;
  justify-content: space-between;
  gap: clamp(7px, 2.4vw, 12px);
  margin: 6px 0 20px;
}
.code-box {
  flex: 1 1 0;
  max-width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  background: var(--card);
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(20px, 5.6vw, 24px);
  color: var(--action);
  animation: pop-in var(--motion-base) var(--ease-out-back) both;
}
.code-box:nth-child(1) { animation-delay: .40s; }
.code-box:nth-child(2) { animation-delay: .54s; }
.code-box:nth-child(3) { animation-delay: .68s; }
.code-box:nth-child(4) { animation-delay: .86s; }
.code-box:nth-child(5) { animation-delay: 1.02s; }
.code-box:nth-child(6) { animation-delay: 1.18s; }
/* filled boxes read as active: navy border + navy digit */
.code-box:not(:empty) { border-color: var(--action); }
.resend { animation-delay: 1.3s; }

/* ── done.html closing: try-first chips ───────────────────────── */

.allset { margin-top: 24px; animation: rise var(--motion-slow) 1s var(--ease-out-soft) both; }
.allset .sub { margin-bottom: 14px; }
.allset .try {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-chip);
  padding: 7px 14px;
}

/* ── Signoff (retained hook; quiet footer line) ────────────────── */

.signoff {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  animation: rise var(--motion-slow) .7s var(--ease-out-soft) both;
}
.page-done .signoff { animation-delay: 1s; }
.signoff .from {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--action);
}
.signoff .role {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--ink-2);
}

/* ── Cross-page continuity (progressive enhancement) ───────────── */
@view-transition { navigation: auto; }
.seal  { view-transition-name: seal; }
.steps { view-transition-name: steps; }

/* ── Focus + motion accessibility ─────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 2px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover { transform: none; }
  @view-transition { navigation: none; }
}

/* ── Full-bleed app-screen mode at phone widths ────────────────────
   At phone-ish widths the card fills the viewport like a native screen:
   no cream gutter, square edges, and the signoff anchored to the bottom.
   Above 430px the centered-card-on-cream layout is unchanged. */
@media (max-width: 430px) {
  body {
    padding: 0;
    align-items: stretch;
  }
  .card {
    max-width: none;
    min-height: 100vh;   /* fallback first */
    min-height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    display: flex;
    flex-direction: column;
  }
  /* footer anchors to the bottom of the tall card */
  .signoff {
    margin-top: auto;
    padding-top: 18px;
  }
}

/* ── 360px floor ──────────────────────────────────────────────── */

@media (max-width: 380px) {
  body { padding: 14px 10px; }
  .card { padding: 20px 16px 26px; }
  .tag { min-width: 64px; }
  .ms svg { left: 14px; }
}
