/* ═══════════════════════════════════════════════════════════════════════
   FIRST-RUN · the phone first run's styles, at every width (6 Nov 2026, onboarding launch fixes, Task 3)
   Moved word for word out of lift-ios.css (the Lift C block) so the desktop first run can use them too.
   lift-ios.css only loads at phone width; this file has no media query. The four tokens below are the ones
   lift-ios.css alone defines (same values, same names); every other token the rules read (--bg, --text,
   --surface, --border, --green, --red, ...) already exists at desktop. Phones read identical values.
   The four sit on the first-run hosts only, never on bare html: desktop CSS reads them too (Go Pro text, lab chips),
   and before this file they did not exist at desktop (final review, 7 Nov). Phones still get them on html from lift-ios.css.
   ═══════════════════════════════════════════════════════════════════════ */
:root { --ios-ease: cubic-bezier(0.16, 1, 0.3, 1); }
html[data-theme="dark"] :is(#fr-desk, #onb-day1, #ist-sheet:has(.ifr-sheet-head), #onb-firstrun, #onb-resolve, #ios-check, #ios-home, #ios-signin, #ifr-offbar, .first-move, .aic-note){--accent-bright:oklch(0.88 0.140 72);--accent-deep:oklch(0.72 0.150 62);--on-accent:oklch(0.18 0.020 275);--track:oklch(0.30 0.010 275);}
html[data-theme="light"] :is(#fr-desk, #onb-day1, #ist-sheet:has(.ifr-sheet-head), #onb-firstrun, #onb-resolve, #ios-check, #ios-home, #ios-signin, #ifr-offbar, .first-move, .aic-note){--accent-bright:oklch(0.62 0.150 58);--accent-deep:oklch(0.46 0.150 52);--on-accent:oklch(0.99 0.008 85);--track:oklch(0.88 0.010 85);}

/* ═════════════════ LIFT C · FIRST RUN (onboarding-*.html, cert-ios-daily-limit.html) ═════════════════
   June E2E @ ee053395, HUD "C ›". Hosts: #ios-home (day-0, capped, offline), #ios-check (the check, its
   score, the daily limit), #onb-firstrun (picker), #ist-sheet (lock-in), #onb-resolve (restore). */
html.ifr-day0 #lift-tabbar, html.ifr-check #lift-tabbar { display: none !important; }
.ifr-home, .ifr-check, .ifr-picker, .ifr-date { color: var(--text); font: 15px/1.55 Inter, -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; }
.ifr-home *, .ifr-check *, .ifr-picker *, .ifr-date *, #ist-sheet .ifr-terms * { box-sizing: border-box; }
.ifr-home button, .ifr-check button, .ifr-picker button, .ifr-date button { font-family: inherit; }
.ifr-home svg, .ifr-check svg, .ifr-picker svg, .ifr-off svg, #ist-sheet .ifr-sheet-head svg, #ist-sheet .ifr-ti svg, .ifr-restore svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ifr-home { padding: 12px 20px 28px; }
/* 30 Oct: Skip, top right like an iOS nav bar; leaves day 0 for the cert's normal Home */
.ifr-d0-top { display: flex; justify-content: flex-end; margin: 0 -8px -6px; }
.ifr-skip { min-height: 44px; padding: 0 8px; border: 0; background: none; cursor: pointer; color: var(--accent-bright); font: 600 15px/1 Inter, sans-serif; transition: transform .15s var(--ios-ease); }
html[data-theme="light"] .ifr-skip { color: var(--accent-deep); }
.ifr-skip:active { transform: scale(0.97); }
.ifr-greet { margin: 10px 2px 4px; }
.ifr-hi { font: 800 10px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 7px; }
.ifr-greet h1 { font: 600 24px/1.12 Fraunces, Georgia, serif; letter-spacing: -.015em; margin: 0; color: var(--text); }
.ifr-lede { font-size: 13.5px; line-height: 1.5; color: var(--text-mid); margin: 9px 0 0; }
#ios-home .ifr-day0 .ifr-lede { font-size: 14px; color: var(--text-mid); max-width: 32ch; margin: 8px 0 0; }
.ifr-hb { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 14px 15px; margin-top: 14px; }
.ifr-hb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ifr-hb-quota { border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); padding-top: 4px; margin-top: 12px; }
.ifr-hb-cert { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.ifr-mark { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: color-mix(in oklab, var(--accent) 14%, var(--surface3)); color: var(--accent-deep); display: grid; place-items: center; font: 800 13px/1 Inter, sans-serif; }
.ifr-hb-name { display: block; font: 650 15px/1.1 Inter, sans-serif; color: var(--text); }
.ifr-hb-code { display: block; font: 600 11.5px/1 'Roboto Mono', monospace; color: var(--text-dim); margin-top: 3px; }
.ifr-plan, .ifr-tag { flex: 0 0 auto; font: 800 10px/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--border); border-radius: 999px; padding: 5px 9px; }
.ifr-hb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; }
.ifr-hb-row + .ifr-hb-row { border-top: 1px solid color-mix(in oklab, var(--border) 55%, transparent); }
.ifr-hb-rn { font-size: 13.5px; color: var(--text-mid); }
.ifr-hb-rv { font: 600 13px/1 Inter, sans-serif; color: var(--text); }
.ifr-hb-full { display: inline-flex; align-items: center; gap: 6px; font: 700 11.5px/1 Inter, sans-serif; color: var(--green); background: color-mix(in oklab, var(--green) 12%, transparent); border: 1px solid color-mix(in oklab, var(--green) 30%, var(--border)); border-radius: 999px; padding: 6px 10px; }
.ifr-hb-full svg { width: 12px; height: 12px; stroke-width: 2.4; }
.ifr-ready { margin-top: 14px; border: 1px dashed color-mix(in oklab, var(--accent) 34%, var(--border)); border-radius: 16px; background: color-mix(in oklab, var(--accent) 4%, var(--surface)); padding: 16px 15px; display: flex; align-items: center; gap: 14px; }
.ifr-ready-dial { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); border: 2px dashed color-mix(in oklab, var(--accent) 40%, var(--border)); color: var(--accent-deep); }
.ifr-ready-dial svg { width: 22px; height: 22px; }
.ifr-ready-t { font: 650 14px/1.15 Inter, sans-serif; color: var(--text); }
.ifr-ready-s { font-size: 12.5px; line-height: 1.45; color: var(--text-mid); margin-top: 3px; }
.ifr-diag { margin-top: 16px; border: 1px solid color-mix(in oklab, var(--accent) 38%, var(--border)); border-radius: 18px; background: color-mix(in oklab, var(--accent) 8%, var(--surface)); padding: 17px 16px; }
.ifr-diag-head, .ifr-start-head { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.ifr-diag-badge { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 16%, var(--surface3)); color: var(--accent-deep); }
.ifr-diag-badge svg { width: 22px; height: 22px; }
.ifr-diag-kick { font: 800 9.5px/1 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 5px; }
.ifr-diag-h { font: 600 18px/1.15 Fraunces, Georgia, serif; letter-spacing: -.01em; color: var(--text); }
.ifr-diag-p { font-size: 12.8px; line-height: 1.5; color: var(--text-mid); margin: 0 0 14px; }
.ifr-diag-p b, .ifr-lede b, .ifr-note b { color: var(--text); font-weight: 650; }
.ifr-btn { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 13px; padding: 14px; cursor: pointer; background: var(--accent); color: var(--on-accent); font: 700 15px/1 Inter, sans-serif; box-shadow: 0 10px 22px -12px color-mix(in oklab, var(--accent) 70%, transparent); transition: transform .15s var(--ios-ease), opacity .2s; }
.ifr-btn svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.ifr-btn:active { transform: scale(0.985); }
.ifr-btn[disabled] { opacity: .45; box-shadow: none; cursor: default; }
/* Busy (waiting on an answer, no words): the button keeps its look and disables at once; a small ring fades in only after
   150ms (a short wait shows nothing), placed apart from the words so they never move. It turns only with motion allowed.
   A transition, not a delayed animation: if WebKit skips it, the ring simply shows at once. */
.ifr-btn.is-busy[disabled] { opacity: 1; cursor: progress; }
.ifr-btn { position: relative; }
.ifr-btn::after { content: ''; position: absolute; right: 16px; top: calc(50% - 7px); width: 14px; height: 14px; box-sizing: border-box; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; opacity: 0; pointer-events: none; }
.ifr-btn.is-busy::after { opacity: .8; transition: opacity 0s linear .15s; }
@media (prefers-reduced-motion: no-preference) {
  .ifr-btn.is-busy::after { transition: opacity .2s cubic-bezier(0.16, 1, 0.3, 1) .15s; animation: ifrBusyTurn .8s linear infinite; }
  @keyframes ifrBusyTurn { to { transform: rotate(360deg); } }
}
.ifr-ghost { width: 100%; min-height: 46px; border: 1px solid color-mix(in oklab, var(--accent) 36%, var(--border)); border-radius: 13px; padding: 13px; cursor: pointer; background: transparent; color: var(--accent-bright); font: 650 14px/1 Inter, sans-serif; transition: transform .15s var(--ios-ease); }
html[data-theme="light"] .ifr-ghost { color: var(--accent-deep); }
.ifr-ghost:active { transform: scale(0.985); }
.ifr-text { width: 100%; min-height: 44px; border: none; background: none; color: var(--text-dim); font: 600 13.5px/1 Inter, sans-serif; cursor: pointer; }
.ifr-start, .ifr-rev { margin-top: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 16px; }
.ifr-start-head { margin-bottom: 13px; }
.ifr-start-ring { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); border: 2px solid color-mix(in oklab, var(--accent) 45%, var(--border)); font: 600 18px/1 Fraunces, serif; color: var(--accent-deep); font-variant-numeric: lining-nums; }
.ifr-start-ring svg { width: 20px; height: 20px; }
.ifr-start-t { font: 650 15px/1.1 Inter, sans-serif; color: var(--text); }
.ifr-start-s { font-size: 12.5px; color: var(--text-mid); margin-top: 3px; }
.ifr-see { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 15px; border: 1px solid var(--border); border-radius: 16px; }
.ifr-see-t { font: 650 14px/1.2 Inter, sans-serif; color: var(--text); }
.ifr-see-s { font-size: 12.5px; color: var(--text-mid); margin-top: 2px; }
.ifr-see-btn { flex: 0 0 auto; min-height: 44px; border: 1px solid color-mix(in oklab, var(--accent) 36%, var(--border)); background: transparent; color: var(--accent-deep); border-radius: 999px; padding: 0 16px; font: 700 13px/1 Inter, sans-serif; cursor: pointer; }
/* The check, its score and the daily limit: a full screen over the app (#ios-check). */
#ios-check { position: fixed; inset: 0; z-index: 9000; background: var(--bg); overflow: hidden; }
#ios-check[hidden] { display: none !important; }
.ifr-check { height: 100%; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.ifr-hdr { display: flex; align-items: center; gap: 10px; padding: 14px 20px 6px; }
.ifr-hdr h1 { flex: 1; margin: 0; font: 600 21px/1.15 Fraunces, Georgia, serif; letter-spacing: -.01em; color: var(--text); }
.ifr-hdr-k { flex: 1; font: 800 10px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-bright); }
.ifr-back { width: 44px; height: 44px; margin-left: -10px; border: none; background: none; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.ifr-back svg { width: 22px; height: 22px; }
.ifr-body { flex: 1; overflow-y: auto; padding: 8px 20px 16px; }
.ifr-prog { display: flex; justify-content: space-between; font: 600 12.5px/1 Inter, sans-serif; color: var(--text-mid); margin: 6px 0 9px; }
.ifr-qt { font-family: 'Roboto Mono', monospace; color: var(--text-dim); }
.ifr-qbar { height: 5px; border-radius: 999px; background: var(--track); overflow: hidden; }
.ifr-qbar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transform-origin: left center; }   /* scaleX set inline (Task 11) */
.ifr-topic { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; font: 800 10px/1 Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.ifr-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ifr-qtext { font: 600 18px/1.35 Inter, sans-serif; color: var(--text); margin: 12px 0 16px; }
.ifr-opt { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; text-align: left; margin-bottom: 9px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font: 500 15px/1.35 Inter, sans-serif; cursor: pointer; transition: transform .12s var(--ios-ease), border-color .2s; }
.ifr-opt:active { transform: scale(0.99); }
.ifr-opt.sel { border-width: 2px; padding: 11px 13px; border-color: var(--accent); background: color-mix(in oklab, var(--accent) 9%, var(--surface)); }
.ifr-key { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface3); font: 700 13px/1 Inter, sans-serif; color: var(--text-mid); }
.ifr-opt.sel .ifr-key { background: var(--accent); color: var(--on-accent); }
.ifr-note { display: flex; gap: 10px; margin-top: 12px; padding: 12px 13px; border: 1px solid color-mix(in oklab, var(--border) 80%, transparent); border-radius: 13px; background: color-mix(in oklab, var(--accent) 4%, var(--surface)); }
.ifr-note svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--accent-deep); margin-top: 1px; }
.ifr-note p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-mid); }
.ifr-foot { padding: 10px 20px calc(14px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 6px; border-top: 1px solid color-mix(in oklab, var(--border) 50%, transparent); background: var(--bg); }
.ifr-foot-hint { margin: 2px 0 0; text-align: center; font-size: 12px; color: var(--text-dim); }
/* F3: the picker as the app's opening screen (lifted from the approved ?v=first drawing). */
.ifr-first-head { padding: 18px 22px 14px; }
.ifr-fh-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.ifr-fh-mark { width: 26px; height: 26px; color: var(--accent); display: inline-flex; }
.ifr-fh-mark svg { width: 100%; height: 100%; }
.ifr-fh-name { font: 700 15px/1 Inter, sans-serif; letter-spacing: -0.01em; color: var(--text); }
.ifr-first-head h1 { margin: 0; max-width: 15ch; font: 600 27px/1.1 Fraunces, Georgia, serif; letter-spacing: -0.015em; color: var(--text); }
@keyframes ifr-rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) { .ifr-first-head { animation: ifr-rise .5s var(--ios-ease) backwards; } }
.ifr-first-signin { width: 100%; min-height: 44px; margin-top: 4px; border: 0; background: none; cursor: pointer; font: 500 13.5px/1 Inter, sans-serif; color: var(--text-mid); transition: transform .15s var(--ios-ease); }
.ifr-first-signin b { color: var(--accent-bright); font-weight: 650; }
html[data-theme="light"] .ifr-first-signin b { color: var(--accent-deep); }
.ifr-first-signin:active { transform: scale(0.97); }
.ifr-first .ifr-pnote { margin-top: 0; }   /* F3 Task 9: the drawing's note sits on the head's 14px; Sign in sits 4px under Lock in */
.ifr-first .ifr-foot { gap: 0; }
.ifr-kicker { font: 800 10px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-bright); margin: 10px 0 12px; }
.ifr-ac { border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--border)); border-radius: 18px; background: color-mix(in oklab, var(--accent) 6%, var(--surface)); padding: 16px; }
.ifr-ac-top { display: flex; align-items: center; gap: 10px; }
.ifr-ac-top > span:nth-child(2) { flex: 1; }
.ifr-badge { font: 800 9.5px/1 Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); border: 1px solid color-mix(in oklab, var(--accent) 36%, var(--border)); border-radius: 999px; padding: 5px 9px; }
.ifr-ac-score { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 12px; }
.ifr-ac-num { font: 600 46px/1 Fraunces, serif; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.ifr-ac-of { font-size: 13px; color: var(--text-dim); }
.ifr-bar { position: relative; height: 8px; border-radius: 999px; background: var(--track); }
.ifr-bar > span:first-child { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left center; }   /* scaleX set inline (Task 11) */
.ifr-tick { position: absolute; top: -3px; width: 2px; height: 14px; border-radius: 1px; background: var(--text-mid); }
.ifr-legend { display: flex; justify-content: space-between; margin-top: 7px; font: 600 11px/1 'Roboto Mono', monospace; color: var(--text-dim); }
.ifr-legend .p { color: var(--text-mid); }
.ifr-frame { font: 600 17px/1.3 Fraunces, Georgia, serif; color: var(--text); margin: 18px 2px 10px; }
.ifr-aha2 { display: flex; gap: 10px; }
.ifr-aha2 svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--accent-deep); margin-top: 2px; }
.ifr-aha2 p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-mid); }
.ifr-lock { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 14%, var(--surface3)); color: var(--accent-deep); margin: 8px 0 14px; }
.ifr-lock svg { width: 24px; height: 24px; }
.ifr-limit-h { font: 600 26px/1.15 Fraunces, Georgia, serif; letter-spacing: -.015em; margin: 0; color: var(--text); }
.ifr-limit-h em { font-style: italic; color: var(--accent-deep); }
.ifr-allow { margin-top: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.ifr-arow { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.ifr-arow + .ifr-arow { border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.ifr-aico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface3); color: var(--accent-deep); }
.ifr-aico svg { width: 17px; height: 17px; }
.ifr-atx { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text-dim); }
.ifr-atx b { font: 650 14px/1.2 Inter, sans-serif; color: var(--text); }
.ifr-aamt { font: 700 13px/1 'Roboto Mono', monospace; color: var(--text); }
.ifr-proline { margin: 16px 2px 0; font-size: 13.5px; color: var(--text-mid); }
.ifr-proline b { color: var(--accent-deep); }
/* Offline: Home shows June's calm state; every page gets the small Offline bar. */
#ifr-offbar { position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 9100; display: none; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font: 700 11.5px/1 Inter, sans-serif; color: var(--text-mid); box-shadow: 0 8px 20px -14px rgba(0,0,0,.5); }
html.ifr-offline #ifr-offbar { display: inline-flex; }
#ifr-offbar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
html.ifr-offline #connectivity-banner { display: none !important; }
.ifr-off { min-height: 70dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 28px; color: var(--text); }
.ifr-off-glyph { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface3); color: var(--text-mid); margin-bottom: 18px; }
.ifr-off-glyph svg { width: 28px; height: 28px; }
.ifr-off h2 { font: 600 24px/1.15 Fraunces, Georgia, serif; margin: 0 0 10px; }
.ifr-off p { margin: 0; max-width: 30ch; font-size: 14px; line-height: 1.5; color: var(--text-mid); }
.ifr-off p b { color: var(--text); }
.ifr-saved { margin-top: 18px; display: inline-flex; align-items: center; gap: 7px; font: 700 12px/1 Inter, sans-serif; color: var(--green); background: color-mix(in oklab, var(--green) 12%, transparent); border: 1px solid color-mix(in oklab, var(--green) 30%, var(--border)); border-radius: 999px; padding: 7px 11px; }
.ifr-saved svg { width: 13px; height: 13px; stroke-width: 2.4; }
/* Onboarding D task 1.4 (coordinator ruling b): a paying person in grace keeps the grace banner (.ca-grace,
   features/billing-notices.js) over the phone's full-screen first-run steps (html.ifr-picking: the picker; html.ifr-check:
   the check). The banner is pinned at the top; every full-screen phone host already starts at --ap-free-top (lift-ios.css,
   the admin bar's room), so that room grows by the banner's height (--ca-grace-top, set by JS) and the hosts start below
   it; its shadow fills the space around it in the page colour. Sign-in and the lock sheets still sit above it. */
@media (max-width: 899px) {
  html.ca-grace-on.ifr-picking, html.ca-grace-on.ifr-check { --ap-free-top: calc(var(--ca-grace-top, 0px) + 24px); }
  html.ap-free.ca-grace-on.ifr-picking, html.ap-free.ca-grace-on.ifr-check { --ap-free-top: calc(var(--ca-grace-top, 0px) + 80px); }
  html.ca-grace-on.ifr-picking #page-setup > .ca-grace, html.ca-grace-on.ifr-check #page-setup > .ca-grace {
    display: flex !important; position: fixed; z-index: 9001; top: env(safe-area-inset-top, 0px); left: 0; right: 0; margin: 12px 20px 0 !important;
    box-shadow: 0 0 0 20px var(--bg), 0 -60px 0 20px var(--bg); }   /* the same margins as on phone Home (lift-ios.css); the shadow fills the space around it with the page colour, and never takes a tap */
  html.ap-free.ca-grace-on.ifr-picking #page-setup > .ca-grace, html.ap-free.ca-grace-on.ifr-check #page-setup > .ca-grace { top: calc(56px + env(safe-area-inset-top, 0px)); }
}
/* Picker (behind the onboarding switch): #onb-firstrun full screen on phones. */
#onb-firstrun.ifr-on { position: fixed !important; inset: 0 !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border-radius: 0 !important; background: var(--bg) !important; z-index: 8995; }
.ifr-picker { height: 100%; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.ifr-pnote { display: flex; gap: 10px; margin: 6px 20px 0; padding: 11px 13px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.ifr-pnote svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--accent-deep); margin-top: 1px; }
.ifr-pnote p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-mid); }
.ifr-pnote b { color: var(--text); }
.ifr-sect { font: 800 10px/1 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin: 16px 2px 10px; }
.ifr-picker .ifr-body { padding-top: 4px; }   /* the drawing's picker body: 4px + the label's 16px = 20px under the note */
.ifr-cert { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; margin-bottom: 10px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: transform .12s var(--ios-ease); }
.ifr-cert:active { transform: scale(0.99); }
.ifr-cert.sel { border-color: color-mix(in oklab, var(--accent) 55%, var(--border)); background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.ifr-cert .ifr-mark { width: 40px; height: 40px; border-radius: 11px; }   /* F3 Task 9: the drawing's 40px row mark (day 0's card keeps 34px) */
.ifr-meta { flex: 1; min-width: 0; }
.ifr-nm { display: block; font: 650 15px/1.15 Inter, sans-serif; }
.ifr-cd { display: block; font: 600 11.5px/1 'Roboto Mono', monospace; color: var(--text-dim); margin-top: 3px; }
/* gap 12 (7 Nov): the company under the exam name, then the code on the same line. Plain text flow, so a long code
   (Professional Scrum Product Owner II) wraps word by word after the company and never strands its last word. */
.ifr-sub { display: block; margin-top: 4px; line-height: 1.3; }
.ifr-vd { font: 600 12px/1.3 Inter, sans-serif; color: var(--text-mid); margin-right: 8px; }
.ifr-sub .ifr-cd { display: inline; margin-top: 0; line-height: 1.3; }
.ifr-pick { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--text) 22%, var(--border)); display: grid; place-items: center; color: transparent; }
.ifr-cert.sel .ifr-pick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ifr-pick svg { width: 13px; height: 13px; stroke-width: 2.6; }
#ist-sheet .ifr-sheet-head { display: flex; align-items: center; gap: 11px; margin: 4px 0 8px; }
#ist-sheet .ifr-sheet-head h2 { margin: 0; font: 600 21px/1.15 Fraunces, Georgia, serif; color: var(--text); }
#ist-sheet .ifr-sheet-lock { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 14%, var(--surface3)); color: var(--accent-deep); }
#ist-sheet .ifr-sheet-lock svg { width: 19px; height: 19px; }
#ist-sheet .ifr-sheet-intro { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--text-mid); }
#ist-sheet .ifr-terms { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
#ist-sheet .ifr-terms li { display: flex; gap: 11px; }
#ist-sheet .ifr-ti { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface3); color: var(--accent-deep); }
#ist-sheet .ifr-ti svg { width: 15px; height: 15px; }
#ist-sheet .ifr-tt { font: 650 14px/1.2 Inter, sans-serif; color: var(--text); }
#ist-sheet .ifr-ts { font-size: 12.5px; line-height: 1.45; color: var(--text-mid); margin-top: 2px; }
#ist-sheet .ifr-ts b { color: var(--text); }
#ist-sheet .ifr-sheet-actions { display: grid; gap: 8px; }
/* Session restore skeleton (#onb-resolve, behind the switch). */
#onb-resolve .ifr-restore { display: block; padding: calc(24px + env(safe-area-inset-top, 0px)) 20px; }
#onb-resolve .onb-resolve-inner { display: none !important; }
.ifr-skb, .ifr-skcard { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 15px; margin-bottom: 14px; }
.ifr-skb-top { display: flex; align-items: center; gap: 10px; }
.ifr-skb-row { display: flex; justify-content: space-between; padding: 10px 0 0; margin-top: 10px; border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.ifr-sk { display: block; height: 11px; border-radius: 6px; background: var(--surface3); }
.ifr-sk.sm { height: 9px; } .ifr-sk.lg { height: 14px; }
.ifr-sk-stack { flex: 1; display: grid; gap: 6px; }
.ifr-sk-mark { width: 34px; height: 34px; border-radius: 9px; }
.ifr-sk-plan { width: 44px; height: 20px; border-radius: 999px; }
.ifr-sk-ring { width: 44px; height: 44px; border-radius: 50%; }
.ifr-sk-btn { height: 46px; border-radius: 13px; margin-top: 13px; }
.ifr-sk-note { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.ifr-sk-note svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: no-preference) {
  .ifr-rv { animation: ifrRise .5s var(--ios-ease) backwards; }
  .ifr-rv:nth-child(2) { animation-delay: .06s; } .ifr-rv:nth-child(3) { animation-delay: .12s; } .ifr-rv:nth-child(4) { animation-delay: .18s; } .ifr-rv:nth-child(n+5) { animation-delay: .24s; }
  @keyframes ifrRise { from { opacity: 0; transform: translateY(10px); } }
  .ifr-sk { animation: ifrPulse 1.4s ease-in-out infinite; }
  @keyframes ifrPulse { 50% { opacity: .55; } }
}
html.ifr-picking #ist-sheet-scrim { z-index: 9004; } html.ifr-picking #ist-sheet { z-index: 9005; }   /* the lock-in sheet sits over the full-screen picker */
html.ifr-picking #lift-tabbar { display: none !important; }
/* Lift C side-by-side fixes (26 Oct): June's back control, serif question, tinted keys, centred limit/capped, offline bar */
.ifr-hdr .ifr-back { width: 40px; height: 40px; margin: 0; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ifr-hdr .ifr-back svg { width: 19px; height: 19px; }
.ifr-qtext { font: 600 22px/1.28 Fraunces, Georgia, serif; letter-spacing: -.01em; }
.ifr-topic { padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-mid); }
.ifr-key { background: color-mix(in oklab, var(--accent) 14%, var(--surface3)); color: var(--accent-deep); }
.ifr-opt.sel { border-width: 1px; padding: 12px 14px; }
.ifr-note { border-color: color-mix(in oklab, var(--accent) 30%, var(--border)); background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.ifr-ac-of { font: 700 11px/1 Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.ifr-legend { font: 600 11.5px/1 Inter, sans-serif; }
.ifr-legend .p { color: var(--accent-deep); font-weight: 700; }
.ifr-aha2 { padding: 13px 14px; border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--border)); border-radius: 14px; background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.ifr-greet-c { text-align: center; margin-top: 26px; }
.ifr-hi-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.ifr-hi-ok svg { width: 13px; height: 13px; stroke-width: 2.6; }
.ifr-greet-c h1 { font-size: 26px; }
.ifr-hb-reset { display: inline-flex; align-items: center; gap: 6px; font: 700 11.5px/1 Inter, sans-serif; color: var(--accent-deep); background: color-mix(in oklab, var(--accent) 14%, transparent); border: 1px solid color-mix(in oklab, var(--accent) 34%, var(--border)); border-radius: 999px; padding: 6px 10px; }
.ifr-hb-reset svg { width: 12px; height: 12px; }
.ifr-body-c { text-align: center; }
.ifr-body-c .ifr-lock { width: 76px; height: 76px; border-radius: 50%; margin: 22px auto 18px; }
.ifr-body-c .ifr-lock svg { width: 30px; height: 30px; }
.ifr-body-c .ifr-allow { text-align: left; }
.ifr-aico { background: color-mix(in oklab, var(--accent) 14%, var(--surface3)); }
.ifr-aamt { font: 700 14px/1 Inter, sans-serif; color: var(--accent-deep); }
.ifr-proline b { color: var(--text); }
.ifr-ghost-n { border-color: var(--border); color: var(--text) !important; background: var(--surface); }
#ist-sheet .ifr-terms { gap: 0; }
#ist-sheet .ifr-terms li { padding: 12px 0; }
#ist-sheet .ifr-terms li + li { border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent); }
#ist-sheet .ifr-ti { background: color-mix(in oklab, var(--accent) 14%, var(--surface3)); }
.ifr-pnote { border-color: color-mix(in oklab, var(--accent) 30%, var(--border)); background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
#ifr-offbar { left: 20px; right: 20px; transform: none; justify-content: center; background: var(--surface3); border-color: transparent; box-shadow: none; }
#ifr-offbar .dot { background: var(--text-dim); }
.ifr-off-glyph { background: color-mix(in oklab, var(--accent) 16%, var(--surface3)); color: var(--accent-deep); }
.ifr-saved { color: var(--text); }
.ifr-saved svg { color: var(--green); }
#onb-resolve:not([hidden]) { display: block !important; padding: 0 !important; background: var(--bg) !important; }   /* phones always carry June's skeleton (features/ios-firstrun.js) */
#onb-resolve .ifr-restore { width: 100%; max-width: none; padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 20px; }
.ifr-limit-h em { color: var(--text); }
.ifr-qt { color: var(--accent-deep); }
/* Stage 5a: the last check replaces the lock-in sheet's content in place; Task 11: the sheet takes its new size at once and
   only the new content fades in. A fade is all it does, so reduced motion keeps it as it is. */
#ist-sheet .ifr-last-body { margin: 6px 0 20px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
#ist-sheet .ifr-last-body b { font-weight: 700; }
#ist-sheet.ifr-step-in > :not(.ist-grab) { animation: ifrStepFade .16s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
@keyframes ifrStepFade { from { opacity: 0; } }

/* ── Stage 5b (28 Oct): sign in by email code in the iOS app (features/ios-signin.js; June E2E @ a345d1da) ── */
.isi-host { position: fixed; inset: 0; z-index: 9002; background: var(--bg); color: var(--text); overflow-y: auto; display: flex; justify-content: center; }   /* over the Pass Plan (#ios-check 9000): "Create a free account" opens sign-in while the plan stays */
.isi-host[hidden] { display: none !important; }
html.isi-open { overflow: hidden; }
.isi-screen { width: 100%; max-width: 440px; min-height: 100%; display: flex; flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 28px max(26px, env(safe-area-inset-bottom)); }
.isi-top { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.isi-back { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-mid); transition: transform .15s var(--ios-ease); }
.isi-back:active { transform: scale(0.97); }
.isi-back svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.isi-mark { width: 30px; height: 30px; color: var(--accent); display: inline-flex; }
.isi-mark svg { width: 100%; height: 100%; }
.isi-mark-sm { width: 26px; height: 26px; margin-left: 2px; }
.isi-brand-name { font: 700 15px/1 Inter, sans-serif; letter-spacing: -0.01em; color: var(--text); }
.isi-title { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 27px; line-height: 1.1; letter-spacing: -0.015em; margin: 30px 0 0; color: var(--text); }
.isi-sub { font-size: 14px; line-height: 1.5; color: var(--text-mid); margin: 9px 0 0; }
.isi-sub b { color: var(--text); font-weight: 650; word-break: break-all; }
.isi-auth .isi-sub b { color: var(--accent); word-break: normal; }
.isi-form { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.isi-primary, .isi-outline, .isi-apple { width: 100%; min-height: 50px; border-radius: 14px; padding: 0 15px; cursor: pointer; font: 700 15px/1 Inter, sans-serif; transition: transform .15s var(--ios-ease); }
.isi-primary { border: 0; background: var(--accent); color: var(--on-accent, var(--bg)); box-shadow: 0 12px 26px -14px color-mix(in oklab, var(--accent) 70%, transparent); }
.isi-outline { border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 650; }
.isi-apple { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; background: oklch(0.98 0.004 275); color: oklch(0.16 0.010 275); font-weight: 600; }   /* the drawing's --apple-bg/--apple-fg: white on dark */
html[data-theme="light"] .isi-apple { background: oklch(0.17 0.010 280); color: oklch(0.98 0.004 85); }   /* black on light (Apple's button rules) */
.isi-apple[hidden] { display: none; }
.isi-apple svg { width: 17px; height: 17px; fill: currentColor; margin-top: -1px; }
.isi-primary:active, .isi-outline:active, .isi-apple:active { transform: scale(0.985); }
.isi-field { display: flex; flex-direction: column; gap: 6px; }
.isi-field label { font: 650 12px/1 Inter, sans-serif; color: var(--text-mid); }
.isi-field input { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 13px 14px; font: 500 16px/1.2 Inter, sans-serif; transition: border-color .18s, box-shadow .18s; }
.isi-field input::placeholder { color: var(--text-dim); }
.isi-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.isi-field input[aria-invalid="true"] { border-color: color-mix(in oklab, var(--accent) 60%, var(--border)); }
.isi-typo { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border)); background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.isi-typo p { margin: 0; font: 600 14px/1.35 Inter, sans-serif; color: var(--text); }
.isi-typo b { color: var(--accent); font-weight: 700; }
.isi-typo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.isi-typo-row button { min-height: 44px; font-size: 14px; border-radius: 12px; }
.isi-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 2px 0 0; font: 500 12.5px/1.4 Inter, sans-serif; color: var(--text-dim); }
.isi-note svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 30 Oct (founder): the agreement sits just under the form, as drawn, not pinned to the screen's foot */
.isi-legal { margin: 0; padding-top: 22px; text-align: center; font-size: 11px; line-height: 1.5; color: var(--text-dim); }
.isi-legal a { color: var(--text-mid); text-decoration: underline; text-underline-offset: 2px; }
.isi-msg { min-height: 20px; margin: 12px 0 0; font: 550 13px/1.45 Inter, sans-serif; color: var(--text-dim); }
.isi-msg:empty { display: none; }
.isi-code .isi-msg:empty { display: block; }
.isi-msg.err { color: var(--red, oklch(0.62 0.17 28)); }
.isi-msg.ok { color: var(--text-mid); }
.isi-env { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--accent); background: color-mix(in oklab, var(--accent) 14%, var(--surface)); margin-top: 30px; }
.isi-env svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.isi-code .isi-title { margin-top: 18px; }
.isi-boxes-wrap { margin-top: 26px; }
.isi-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.isi-boxes input { width: 100%; height: 56px; padding: 0; text-align: center; border: 1px solid color-mix(in oklab, var(--text) 22%, var(--border)); background: var(--surface); color: var(--text); border-radius: 12px;
  font: 650 22px/1 "SF Mono", ui-monospace, Menlo, monospace; caret-color: var(--accent); transition: border-color .18s, box-shadow .18s, opacity .2s; }
.isi-boxes input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.isi-boxes.checking input { opacity: .55; }
.isi-boxes.bad input { border-color: var(--red, oklch(0.62 0.17 28)); }
.isi-code > .isi-primary { margin-top: 4px; }
.isi-resend { margin: 18px 0 0; font: 500 13px/1.4 Inter, sans-serif; color: var(--text-dim); }
.isi-resend b { font-variant-numeric: tabular-nums; color: var(--text-mid); font-weight: 650; }
.isi-textbtn { background: none; border: 0; padding: 4px 0; cursor: pointer; font: 650 13.5px/1.2 Inter, sans-serif; color: var(--accent); }
.isi-change { margin-top: auto; padding-top: 20px; text-align: center; }
.isi-change .isi-textbtn { color: var(--text-mid); }
/* June's welcome */
.isi-welcome { align-items: stretch; text-align: center; }
.isi-brand { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 14px; }
.isi-hero { display: flex; flex-direction: column; align-items: center; margin-top: 28px; }
.isi-gauge { position: relative; width: 232px; height: 232px; }
.isi-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.isi-g-track { fill: none; stroke: color-mix(in oklab, var(--text) 12%, transparent); stroke-width: 12; }
.isi-g-fill { fill: none; stroke: var(--green, oklch(0.6 0.14 150)); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 691; stroke-dashoffset: 126; }
.isi-g-tick { stroke: var(--text-dim); stroke-width: 3; stroke-linecap: round; }
.isi-g-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.isi-g-num { font: 700 64px/1 Fraunces, Georgia, serif; color: var(--green, oklch(0.6 0.14 150)); letter-spacing: -0.02em; }
.isi-g-of { margin-top: 8px; font: 800 11px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.isi-g-ready { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px; border-radius: 999px; font: 700 12px/1 Inter, sans-serif; color: var(--green, oklch(0.6 0.14 150));
  background: color-mix(in oklab, var(--green, oklch(0.6 0.14 150)) 14%, transparent); border: 1px solid color-mix(in oklab, var(--green, oklch(0.6 0.14 150)) 35%, transparent); }
.isi-g-ready svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.isi-g-pass { margin-top: 14px; font: 800 11px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.isi-copy { margin-top: auto; padding-top: 24px; }
.isi-copy h1 { font: 600 30px/1.1 Fraunces, Georgia, serif; letter-spacing: -0.015em; margin: 0; color: var(--text); }
.isi-copy p { margin: 10px auto 0; max-width: 32ch; font-size: 14.5px; line-height: 1.5; color: var(--text-mid); }
.isi-cta { margin-top: 24px; }
/* gap 10 (7 Nov): Sign in is a real button under Get started, the same size */
.isi-cta .isi-outline { margin-top: 10px; }
/* Onboarding D screen 1 (Chunk 2 Job A, features/onb-flow.js): the welcome's two buttons become the goal question. The
   rows follow the exam picker's rows (.ifr-cert): same border, radius, surface and chosen tint; a ring like .ifr-pick. */
.onb-goal { margin-top: 20px; text-align: left; }
.onb-goal-q { margin: 0 0 10px; text-align: center; font: 650 14px/1.3 Inter, sans-serif; color: var(--text-mid); }
.onb-goal-opts { display: flex; flex-direction: column; gap: 8px; }
.onb-goal-opt { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: 600 15px/1.3 Inter, sans-serif;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: transform .12s var(--ios-ease), border-color .18s var(--ios-ease), background-color .18s var(--ios-ease); }
.onb-goal-opt:active { transform: scale(0.98); }
.onb-goal-opt[aria-checked="true"] { border-color: color-mix(in oklab, var(--accent) 55%, var(--border)); background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.onb-ring { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--text) 22%, var(--border)); box-sizing: border-box;
  transition: border-color .18s var(--ios-ease), box-shadow .18s var(--ios-ease); }
.onb-goal-opt[aria-checked="true"] .onb-ring { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 11px var(--accent); }
.onb-goal-t { flex: 1; min-width: 0; }
.onb-signin { display: block; margin: 14px auto 0; min-height: 44px; color: var(--text-mid); font-weight: 550; }
.onb-signin b { color: var(--accent); font-weight: 700; }
/* the switch not known yet: the goal question's space (lead review c2 r1, S1), so the slogan does not jump when "on"
   arrives; a device whose last reading was "off" never waits (ios-signin.js dLater). */
.onb-wait { min-height: 270px; display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
@media (max-height: 740px) { .onb-wait { min-height: 236px; margin-top: 14px; } }
/* While the switch is asked (at most 2 s, ios-signin.js DECIDE_MS): quiet placeholders in the answers' shape, never a blank
   space. A soft breathing on the house curve; reduced motion: still. */
.onb-wait-q { align-self: center; width: 46%; height: 14px; margin: 3px 0 7px; border-radius: 7px; background: color-mix(in oklab, var(--text) 8%, transparent); }
.onb-wait-row { height: 52px; border-radius: 14px; border: 1px solid color-mix(in oklab, var(--text) 7%, var(--border)); background: color-mix(in oklab, var(--text) 4%, var(--surface)); }
@media (max-height: 740px) { .onb-wait-row { height: 48px; } }
@media (prefers-reduced-motion: no-preference) {
  .onb-wait-q, .onb-wait-row { animation: onbBreathe 1.4s cubic-bezier(0.16, 1, 0.3, 1) .3s infinite alternate backwards; }
  .onb-wait-row:nth-of-type(3) { animation-delay: .42s; } .onb-wait-row:nth-of-type(4) { animation-delay: .54s; }
  @keyframes onbBreathe { from { opacity: .55; } to { opacity: 1; } }
}
/* Back to screen 1: the welcome is a return, not a fresh start, so its entrance does not play again */
.isi-still .isi-rv, .isi-still .isi-g-fill { animation: none !important; }
/* The iPhone's edge swipe (features/onb-flow.js): a thin strip at the left edge starts it; the backdrop shows while it moves */
.onb-edge { position: fixed; z-index: 9002; left: 0; top: 0; bottom: 0; width: 16px; touch-action: none; }
.onb-swipe-backdrop { position: fixed; inset: 0; z-index: 8994; background: var(--bg); pointer-events: none; }   /* just under #onb-firstrun (8995) */
@media (hover: hover) and (pointer: fine) { .onb-goal-opt:hover { border-color: color-mix(in oklab, var(--text) 30%, var(--border)); } }
/* A short phone (iPhone SE, a phone on its side): the dial steps down so the three answers stay on screen. */
@media (max-height: 740px) {
  .onb-s1 .isi-hero { margin-top: 10px; }
  .onb-s1 .isi-gauge { width: 168px; height: 168px; }
  .onb-s1 .isi-g-num { font-size: 46px; }
  .onb-s1 .isi-g-ready { margin-top: 8px; }
  .onb-s1 .isi-g-pass { margin-top: 10px; }
  .onb-s1 .isi-copy { padding-top: 12px; }
  .onb-s1 .isi-copy h1 { font-size: 26px; }
  .onb-s1 .isi-copy p { font-size: 13.5px; margin-top: 6px; }
  .onb-s1 .onb-goal { margin-top: 14px; }
  .onb-s1 .onb-goal-opt { min-height: 48px; padding: 8px 14px; }
}
/* Desktop: screen 1 sits in the centred first-run card (#fr-desk). The compact dial so the three answers stay above the fold
   at 1280x800; the welcome's full-screen spacing (margin-top: auto) does not apply inside a card. */
.fr-card .onb-s1 { padding: 0; min-height: 0; }
.fr-card .onb-s1 .isi-brand { margin-top: 0; }
.fr-card .onb-s1 .isi-hero { margin-top: 12px; }
.fr-card .onb-s1 .isi-gauge { width: 160px; height: 160px; }
.fr-card .onb-s1 .isi-g-num { font-size: 44px; }
.fr-card .onb-s1 .isi-g-ready { margin-top: 8px; }
.fr-card .onb-s1 .isi-g-pass { margin-top: 10px; }
.fr-card .onb-s1 .isi-copy { margin-top: 0; padding-top: 14px; }
.fr-card .onb-s1 .isi-copy h1 { font-size: 26px; }
.fr-card .onb-s1 .onb-goal { margin-top: 14px; }
.fr-card .onb-s1 .onb-goal-opt { min-height: 48px; padding: 8px 14px; }
/* Onboarding D screen 2: Back to screen 1, first in the header row (before the brand on phones, the title on desktop),
   drawn like the app's other Backs (.isi-back) inside a 44px target; the negative margins keep the row's own height. */
.onb-back { flex: 0 0 auto; width: 44px; height: 44px; margin: -10px 2px -10px -10px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--text-mid);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.onb-back svg { width: 36px; height: 36px; padding: 9px; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s var(--ios-ease); }
.onb-back:active svg { transform: scale(0.97); }
/* Onboarding D screens 3 and 4 (Chunk 2 Job B: features/onb-s3-date.js, onb-s4-time.js), in the shared first-run host:
   the date step's layout (.ifr-date: a scrolling body, a pinned foot), screen 1's answer rows, and chips for short picks.
   What moves: the chosen ring fills (as on screen 1), and the row under screen 3's answers rises in when it changes
   (220 ms, house curve, transform and opacity only; reduced motion: a fade). Nothing below it moves: the button is pinned
   in the foot, and screen 4 keeps the minutes line's space before the hours are chosen. */
.onb-step { color: var(--text); font: 15px/1.55 Inter, -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased;
  height: 100%; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.onb-step *, .onb-step *::before, .onb-step *::after { box-sizing: border-box; }
.onb-step button { font-family: inherit; }
.onb-step-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 22px 16px; }
.onb-step-hdr { display: flex; align-items: center; min-height: 44px; margin: 0 0 10px; }
.onb-step-hdr .onb-back { margin: 0 0 0 -10px; }
.onb-step-body h1 { margin: 0; max-width: 17ch; font: 600 27px/1.1 Fraunces, Georgia, serif; letter-spacing: -0.015em; color: var(--text); text-wrap: balance; }
.onb-step-p { margin: 10px 0 0; max-width: 34ch; font-size: 14px; line-height: 1.5; color: var(--text-mid); }
.onb-step-opts { margin-top: 20px; }
.onb-opt2 { min-height: 60px; }
.onb-opt-sub { display: block; margin-top: 2px; font: 500 13px/1.35 Inter, sans-serif; color: var(--text-mid); }
.onb-step-foot { padding: 10px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid color-mix(in oklab, var(--border) 50%, transparent); background: var(--bg); }
.onb-step-foot .ifr-btn { width: 100%; }
.onb-step-lbl { margin: 18px 0 8px; font: 650 14px/1.3 Inter, sans-serif; color: var(--text); }
.onb-s3-more { margin-top: 14px; display: flow-root; }   /* its children's margins stay inside it */
.onb-leaving .onb-step-body { pointer-events: none; }   /* screen 4 handed on: the Diagnostic draws over it */
.onb-s3-more:empty { display: none; }
.onb-s3 .onb-s3-field { margin: 0; }   /* the date step's own margins (24px, 14px on short screens) never apply here */
.onb-s3-none { margin: 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in oklab, var(--accent) 7%, var(--surface)); font-size: 14px; line-height: 1.5; color: var(--text); }
.onb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onb-s4-hours { margin-top: 20px; }
.onb-chip, .onb-seg { min-height: 44px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer;
  font: 600 14.5px/1.25 Inter, sans-serif; -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: transform .12s var(--ios-ease), border-color .18s var(--ios-ease), background-color .18s var(--ios-ease), color .18s var(--ios-ease); }
.onb-chip:active, .onb-seg:active { transform: scale(0.97); }
.onb-chip:focus:not(:focus-visible), .onb-seg:focus:not(:focus-visible), .onb-opt2:focus:not(:focus-visible) { outline: none; }
.onb-chip:focus-visible, .onb-seg:focus-visible, .onb-opt2:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* chosen: the tint and border of screen 1's chosen row, plus the accent text, so it reads at a glance (not colour-only) */
.onb-chip[aria-checked="true"], .onb-seg[aria-checked="true"] { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, var(--surface)); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.onb-s4-mins { min-height: 1.5em; margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-mid); }
/* three short picks (screen 3's weeks, screen 4's readiness): one row of three equal taps; a long answer wraps inside its own segment */
.onb-segs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.onb-seg { border-radius: 14px; min-height: 52px; padding: 8px 6px; text-align: center; }
.onb-s4-ready.has-subs { grid-template-columns: 1fr; }
.onb-s4-ready.has-subs .onb-seg { text-align: left; padding: 10px 14px; }
@media (prefers-reduced-motion: no-preference) {
  .onb-s3-more.is-in > * { animation: onbRowIn .22s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  @keyframes onbRowIn { from { opacity: 0; transform: translateY(6px); } }
}
@media (prefers-reduced-motion: reduce) {
  .onb-s3-more.is-in > * { animation: onbRowFade .12s ease-out backwards; }
  @keyframes onbRowFade { from { opacity: 0; } }
}
@media (hover: hover) and (pointer: fine) { .onb-chip:not([aria-checked="true"]):hover, .onb-seg:not([aria-checked="true"]):hover { border-color: color-mix(in oklab, var(--text) 30%, var(--border)); } }   /* hover never hides the chosen one */
/* A short phone (iPhone SE, on its side): tighter spacing so screen 4's two answers and its button stay on screen. */
@media (max-height: 740px) {
  .onb-step-hdr { margin-bottom: 4px; }
  .onb-step-body h1 { font-size: 24px; }
  .onb-step-opts, .onb-s4-hours { margin-top: 14px; }
  .onb-step-lbl { margin-top: 12px; }
  .onb-opt2 { min-height: 54px; }
}
/* Desktop: in the centred first-run card, like the date step */
.fr-card .onb-step { height: auto; padding-top: 0; flex: 1; min-height: 0; }
.fr-card .onb-step-body { flex: none; overflow: visible; padding: 16px 24px 20px; }
.fr-card .onb-step-foot { background: transparent; padding: 12px 24px 20px; border-top: 0; }
.fr-card .onb-step .ifr-date-in { background: var(--bg); }
/* lead r1 S5: the card isn't pinned, so the row under screen 3's answers keeps room for its tallest form before and
   between answers (the "not booked" line or the segments wrapping to two lines on some systems' fonts): the button never moves */
.fr-card .onb-s3-more, .fr-card .onb-s3-more:empty { display: flow-root; min-height: 68px; }

/* Onboarding D screen 5 (Chunk 2 Job C, features/first-run-diagnostic.js d runs): today's question screen with Back first in
   its header row and the Free tag; the free line under the first question; the two "can't go on" screens in the same frame. */
.onb-s5-hdr .onb-back { margin-left: -10px; }
.onb-s5-note { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-mid); }
.onb-s5-stop .ifr-body { padding-top: 28px; }
.onb-s5-stop-t { margin: 0; font: 600 24px/1.15 Fraunces, Georgia, serif; letter-spacing: -0.01em; color: var(--text); text-wrap: balance; }
.onb-s5-stop-p { margin: 10px 0 0; max-width: 34ch; font-size: 14px; line-height: 1.5; color: var(--text-mid); }
/* Onboarding D screen 6 (features/onb-s6-start.js): the welcome's dial, with a band where the needle would be. The band
   sweeps from its low end to its high end once (520ms, house curve; reduced motion: drawn at once). */
.onb-s6-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.onb-s6-eb { margin: 0; font: 800 11px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.onb-s6-dial { display: flex; justify-content: center; margin: 18px 0 0; }
.onb-s6-gauge { width: 200px; height: 200px; }
.onb-s6-band { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; }
.onb-s6-tick { stroke: var(--text); stroke-width: 3; }
.onb-s6-num { font: 700 32px/1 Fraunces, Georgia, serif; color: var(--text); letter-spacing: -0.02em; white-space: nowrap; }
.onb-s6-num span { margin: 0 3px; color: var(--text-dim); }
.onb-s6-range { margin: 18px 0 0; text-align: center; font: 650 16px/1.35 Inter, sans-serif; color: var(--text); }
.onb-s6-facts { margin: 6px 0 0; text-align: center; font-size: 14px; color: var(--text-mid); }
.onb-s6-missed { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in oklab, var(--accent) 7%, var(--surface)); font-size: 14px; line-height: 1.45; color: var(--text); }
.onb-s6-line { margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .onb-s6-band { animation: onbBand .52s cubic-bezier(0.16, 1, 0.3, 1) .12s backwards; }
  @keyframes onbBand { from { stroke-dasharray: 0 691; } }
}
@media (max-height: 740px) { .onb-s6-gauge { width: 168px; height: 168px; } .onb-s6-num { font-size: 27px; } .onb-s6-dial { margin-top: 10px; } }
/* Onboarding D screen 7 (features/onb-s7-plan.js): the Pass Plan. Three facts, then a timeline on one rail (this week lit,
   exam day last), then "Each day". The rows build in once, top to bottom (300ms each, 45ms apart, house curve; reduced
   motion: drawn at once). Transform and opacity only. */
.onb-s7-eb { margin: 0; font: 800 11px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.onb-s7 h1 { margin-top: 8px; }
.onb-s7-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; }
.onb-s7-fact { display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.onb-s7-n { font: 700 24px/1 Fraunces, Georgia, serif; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onb-s7-fact small { font-size: 12px; line-height: 1.3; color: var(--text-mid); }
.onb-s7-card { margin: 14px 0 0; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.onb-s7-h { margin: 0 0 10px; font: 800 11px/1 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.onb-s7-tl { list-style: none; margin: 0; padding: 0; }
.onb-s7-tl li { position: relative; padding: 0 0 14px 22px; display: flex; flex-direction: column; gap: 2px; }
.onb-s7-tl li:last-child { padding-bottom: 0; }
.onb-s7-tl li::before { content: ''; position: absolute; left: 4px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); }
.onb-s7-tl li:not(:last-child)::after { content: ''; position: absolute; left: 8px; top: 17px; bottom: 1px; width: 2px; margin-left: -1px; background: var(--border); }
.onb-s7-tl li.now::before { background: var(--accent); border-color: var(--accent); }
.onb-s7-tl li.exam::before { border-color: var(--green, var(--accent)); }
.onb-s7-tl em { font: 700 11px/1.3 Inter, sans-serif; font-style: normal; letter-spacing: .04em; color: var(--text-dim); }
.onb-s7-tl li.now em { color: var(--accent); }
.onb-s7-tl b { font: 650 15px/1.35 Inter, sans-serif; color: var(--text); }
.onb-s7-tl span { font-size: 13px; line-height: 1.45; color: var(--text-mid); }
.onb-s7-tl .onb-s7-note { color: var(--text); }
.onb-s7-pro { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.onb-s7-pro b { font-size: 14px; }
.onb-s7-pro span:last-child { flex-basis: 100%; }
.onb-s7-chart { display: block; width: 100%; height: auto; overflow: visible; }
.onb-s7-band { fill: color-mix(in oklab, var(--accent) 22%, transparent); stroke: none; }
.onb-s7-mid { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 5; }
.onb-s7-now { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.onb-s7-end { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.onb-s7-passl { stroke: var(--green, var(--accent)); stroke-width: 1.5; stroke-dasharray: 4 4; }
.onb-s7-chart text { stroke: none; stroke-width: 0; paint-order: normal; }
.onb-s7-passt { fill: var(--green, var(--accent)); font: 600 10px Inter, sans-serif; }
.onb-s7-axis { fill: var(--text-dim); font: 500 10px Inter, sans-serif; }
.onb-s7-pathp { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-mid); }
.onb-s7-day p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); }
.onb-s7-day .onb-s7-free { margin-top: 6px; font-size: 13px; color: var(--text-mid); }
.onb-s7-date { display: block; min-height: 44px; margin: 10px 0 0; padding: 10px 0; border: 0; background: none; font: 500 14px/1.4 Inter, sans-serif; color: var(--text-mid);
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.onb-s7-date b { font-weight: 650; color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .onb-s7-date:hover b { text-decoration: underline; text-underline-offset: 3px; } }
@media (prefers-reduced-motion: no-preference) {
  .onb-s7-tl li { animation: onbRow .3s cubic-bezier(0.16, 1, 0.3, 1) backwards; animation-delay: calc(80ms + var(--i, 0) * 45ms); }
  @keyframes onbRow { from { opacity: 0; transform: translateY(6px); } }
  .onb-s7-tl.is-still li { animation: none; }
  .onb-s7-band, .onb-s7-mid { animation: onbPath .52s cubic-bezier(0.16, 1, 0.3, 1) .12s backwards; }
  @keyframes onbPath { from { opacity: 0; } }
}
@media (max-width: 359px) { .onb-s7-n { font-size: 20px; } .onb-s7-fact { padding: 10px 8px; } }
/* Onboarding D screen 8 (features/onb-s8-commit.js): the commitment, "Forge". The sentence (Fraunces), the seal with its
   ring, the stamp after the strike. The ring's fill is drawn by the script (linear, time passing); the seal presses in with a
   small spring; the parts light up; the stamp lands (200 ms, house curve). Reduced motion: no sweep, no sparks, a fade. */
.onb-s8 { position: relative; }
.onb-s8-eb { margin: 0; font: 800 11px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.onb-s8-line { margin: 12px 0 0; font: 600 26px/1.25 Fraunces, Georgia, serif; letter-spacing: -0.015em; color: var(--text); text-wrap: balance; }
.onb-s8-line b { font-weight: 600; color: var(--text); box-shadow: inset 0 -2px 0 var(--border); transition: color .28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .28s cubic-bezier(0.16, 1, 0.3, 1); }
.onb-s8-line b.lit { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.onb-s8-stamp { display: inline-block; margin-top: 16px; padding: 7px 11px; border: 2px solid var(--green); border-radius: 8px; color: var(--green);
  font: 800 11px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-4deg) scale(1.35); transform-origin: left center; opacity: 0;
  box-sizing: border-box; min-height: 29px; vertical-align: top; }   /* G-E1: the same height empty or written, so the seal never moves at the strike */
.onb-s8.is-done .onb-s8-stamp { opacity: .92; transform: rotate(-4deg) scale(1); transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), opacity .12s linear; }
.onb-s8-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 0 8px; }
.onb-s8-seal { position: relative; width: 184px; height: 184px; border: 0; background: none; padding: 0; border-radius: 50%; cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.onb-s8-seal[disabled] { cursor: default; }
.onb-s8-seal:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.onb-s8-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.onb-s8-track { fill: none; stroke: var(--border); stroke-width: 5; }
.onb-s8-fill { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.onb-s8-disc { position: absolute; inset: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); will-change: transform;
  box-shadow: inset 0 -8px 16px color-mix(in oklab, #000 16%, transparent), inset 0 2px 0 color-mix(in oklab, #fff 22%, transparent), 0 14px 28px -12px color-mix(in oklab, var(--accent) 70%, transparent); }
.onb-s8-disc svg { grid-area: 1 / 1; transition: opacity .18s linear, transform .28s cubic-bezier(0.16, 1, 0.3, 1); }
.onb-s8-mark { width: 66px; height: 66px; }
.onb-s8-tick { width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.96); }
.onb-s8.is-done .onb-s8-mark { opacity: 0; }
.onb-s8.is-done .onb-s8-tick { opacity: 1; transform: none; }
.onb-s8.is-done .onb-s8-fill { stroke: var(--green); }
.onb-s8.is-done .onb-s8-disc { background: var(--green); color: var(--bg); box-shadow: inset 0 -8px 16px color-mix(in oklab, #000 16%, transparent), inset 0 2px 0 color-mix(in oklab, #fff 22%, transparent), 0 14px 28px -12px color-mix(in oklab, var(--green) 70%, transparent); }
.onb-s8-label { margin: 0; font: 650 16px/1.3 Inter, sans-serif; color: var(--text); }
.onb-s8-hint { min-height: 20px; margin: 0; text-align: center; font-size: 13.5px; line-height: 1.45; color: var(--text-mid); }
.onb-s8-skip { display: block; width: 100%; min-height: 44px; margin-top: 4px; border: 0; background: none; font: 600 14px/1.3 Inter, sans-serif; color: var(--text-mid);
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
@media (hover: hover) and (pointer: fine) { .onb-s8-skip:hover { color: var(--text); } }
.onb-s8-after { display: none; flex-direction: column; gap: 8px; }
.onb-s8.is-done .onb-s8-after { display: flex; }
.onb-s8.is-done .onb-s8-before { display: none; }
.onb-s8-sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
@media (prefers-reduced-motion: no-preference) {
  .onb-s8.is-done .onb-s8-after { animation: onbRow .5s cubic-bezier(0.16, 1, 0.3, 1) .25s backwards; }
}
@media (prefers-reduced-motion: reduce) {
  .onb-s8-stamp, .onb-s8.is-done .onb-s8-stamp { transform: rotate(-4deg); transition: opacity .2s linear; }
  .onb-s8-disc svg, .onb-s8-line b { transition: opacity .2s linear; }
}
@media (max-height: 700px) { .onb-s8-line { font-size: 22px; } .onb-s8-stage { padding-top: 20px; } .onb-s8-seal { width: 160px; height: 160px; } .onb-s8-disc { inset: 19px; } }
/* Onboarding D Day 1 on Home (features/onb-day1.js): one card on top of today's Home for a guest who finished D. */
.onb-day1 { padding: 12px 16px 0; }
.onb-day1[hidden] { display: none; }
.onb-d1-card { box-sizing: border-box; max-width: 640px; margin: 0 auto; padding: 18px; border-radius: 18px; border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border));
  background: color-mix(in oklab, var(--accent) 6%, var(--surface)); }
.onb-d1-eb { margin: 0; font: 800 11px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.onb-d1-h { margin: 8px 0 0; font: 600 22px/1.2 Fraunces, Georgia, serif; letter-spacing: -0.01em; color: var(--text); text-wrap: balance; }
.onb-d1-p { margin: 6px 0 14px; font-size: 14px; line-height: 1.5; color: var(--text-mid); }
.onb-d1-said { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.onb-d1-said-k { margin: 0; font: 800 10px/1 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.onb-d1-said-t { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--text); }
@media (prefers-reduced-motion: no-preference) { .onb-day1:not([hidden]) .onb-d1-card { animation: onbRow .4s cubic-bezier(0.16, 1, 0.3, 1) backwards; } }
@media (min-width: 900px) { .onb-day1 { padding: 20px 24px 0; } .onb-d1-card { max-width: 892px; } }
/* Onboarding D screen 12 (features/onb-s12-save.js): save your plan. The app's own tokens; the buttons stack in the foot. */
.onb-s12-eb { margin: 0; font: 800 11px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.onb-s12 h1 { margin-top: 8px; }
.onb-s12-carry { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.onb-s12-carry li { display: flex; align-items: center; gap: 10px; font: 600 15px/1.35 Inter, sans-serif; color: var(--text); }
.onb-s12-carry svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: var(--green, var(--accent)); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.onb-s12-note { margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-mid); }
.onb-s12-foot { display: flex; flex-direction: column; gap: 8px; }
.onb-s12-foot .ifr-ghost, .onb-s12-foot .ifr-text { width: 100%; min-height: 44px; }
.onb-s12-code { margin: 2px 0 0; text-align: center; font-size: 12px; color: var(--text-dim); }
/* Onboarding D Chunk 4 Job 4A: paywall steps 1 and 2 (features/onb-paywall-steps.js). The app's own list look. */
.onb-pw-eb { margin: 0; font: 800 11px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.onb-s9 h1, .onb-s10 h1 { margin-top: 8px; }
.onb-pw-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.onb-pw-list li { display: flex; align-items: flex-start; gap: 12px; }
.onb-pw-k { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent); font: 800 12px/1 Inter, sans-serif; }
.onb-pw-k svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.onb-pw-list b { display: block; font: 650 15px/1.35 Inter, sans-serif; color: var(--text); }
.onb-pw-list small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--text-mid); }
.onb-pw-foot { display: flex; flex-direction: column; gap: 8px; }
.onb-pw-foot .ifr-text { width: 100%; min-height: 44px; }
@media (prefers-reduced-motion: no-preference) { .onb-pw-list li { animation: onbRow .3s cubic-bezier(0.16, 1, 0.3, 1) backwards; } .onb-pw-list li:nth-child(2) { animation-delay: 45ms; } .onb-pw-list li:nth-child(3) { animation-delay: 90ms; } }
/* Chunk 3 Job 3C: the one question and the free-exam line, a small sheet above everything (the lock wall included). */
.onb-q-wrap { position: fixed; inset: 0; z-index: 9300; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in oklab, #000 45%, transparent); }
.onb-q { box-sizing: border-box; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 20px; background: var(--surface, #fff); color: var(--text); box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); }
.onb-q-t { margin: 0 0 6px; font: 600 17px/1.4 Inter, sans-serif; color: var(--text); }
.onb-q .ifr-ghost { min-height: 44px; }
@media (min-width: 900px) { .onb-q-wrap { align-items: center; } }
@media (prefers-reduced-motion: no-preference) { .onb-q { animation: onbRow .3s cubic-bezier(0.16, 1, 0.3, 1) backwards; } }
/* Job G: the full-check strip (after Day 1's session), one action while the card is up, and room under the card */
.onb-d1-strip { box-sizing: border-box; max-width: 640px; margin: 0 auto; }
.onb-d1-full { display: block; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: 650 14px/1.35 Inter, sans-serif; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
@media (hover: hover) and (pointer: fine) { .onb-d1-full:hover { border-color: var(--accent); } }
#ios-home .onb-day1 { padding-bottom: 14px; }
html.onb-d1-up #ios-home .ih-rec, html.onb-d1-up #ios-home .ih-rec-wrap, html.onb-d1-up #ios-home .ih-greeting { display: none; }
html.onb-d1-up #page-setup .cell-recommend { opacity: .55; filter: saturate(.4); }
@media (min-width: 900px) { .onb-d1-strip { max-width: 892px; } }   /* the width of Home's column under it */

/* the one-time lock toast */
.isi-toast { position: fixed; z-index: 9003; left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 18px 40px -18px rgba(0,0,0,.45); transform: translateY(-16px); opacity: 0; pointer-events: none; }
.isi-toast.open { transform: none; opacity: 1; pointer-events: auto; transition: transform .34s var(--ios-ease), opacity .25s var(--ios-ease); }
.isi-toast.out { transform: translateY(-10px); opacity: 0; transition: transform .22s var(--ios-ease), opacity .18s ease; }
.isi-toast-i { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: color-mix(in oklab, var(--accent) 14%, transparent); }
.isi-toast-i svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.isi-toast-t { font: 600 13px/1.4 Inter, sans-serif; color: var(--text); }
.isi-toast-t b { font-weight: 750; }
@media (hover: hover) and (pointer: fine) { .isi-primary:hover, .isi-apple:hover { filter: brightness(1.05); } }
@media (prefers-reduced-motion: no-preference) {
  .isi-rv { animation: isiRise .5s var(--ios-ease) backwards; }
  .isi-screen > .isi-rv:nth-child(2) { animation-delay: .04s; } .isi-screen > .isi-rv:nth-child(3) { animation-delay: .08s; }
  .isi-screen > .isi-rv:nth-child(4) { animation-delay: .12s; } .isi-screen > .isi-rv:nth-child(5) { animation-delay: .16s; }
  .isi-screen > .isi-rv:nth-child(6) { animation-delay: .2s; }
  .isi-typo { animation: isiRise .32s var(--ios-ease) backwards; }
  .isi-g-fill { animation: isiSweep 1.1s var(--ios-ease) .15s backwards; }
  .isi-boxes.shake { animation: isiShake .32s var(--ios-ease); }
  @keyframes isiRise { from { opacity: 0; transform: translateY(10px); } }
  @keyframes isiSweep { from { stroke-dashoffset: 691; } }
  @keyframes isiShake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } 100% { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .isi-rv, .isi-typo { animation: isiFade .2s ease backwards; }
  @keyframes isiFade { from { opacity: 0; } }
  .isi-toast, .isi-toast.open, .isi-toast.out { transform: none; transition: opacity .18s ease; }
}

/* Stage 5c (28 Oct): Continue with Google (outlined, Google's own G mark) and the provider failure line */
.isi-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; border: 1px solid var(--border); border-radius: 14px; padding: 0 15px;
  background: var(--surface); color: var(--text); font: 600 15px/1 Inter, sans-serif; cursor: pointer; transition: transform .15s var(--ios-ease), border-color .2s; }
.isi-google svg { width: 18px; height: 18px; }
.isi-google:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) { .isi-google:hover { border-color: color-mix(in oklab, var(--text) 30%, var(--border)); } }
.isi-perr { margin: 0; font: 550 13px/1.45 Inter, sans-serif; color: var(--red, oklch(0.62 0.17 28)); }
.isi-or { display: flex; align-items: center; gap: 12px; margin: 3px 0; color: var(--text-dim); font: 600 11px/1 Inter, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
.isi-or::before, .isi-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }


/* ═════════════════ DESKTOP FIRST RUN (6 Nov 2026, onboarding launch fixes, Task 4) ═════════════════
   At 900px and up, behind the onboarding switch, the phone screens draw in #fr-desk (inside #page-setup) as one centred
   column, max 520px: day-0, the picker, the check and its score. Sidebar and top bar stay. html.fr-desk-on (set from JS,
   never :has(), see CLAUDE.md WebKit note) hides the rest of the desktop Home while a card is up. The lock-in sheets use
   the shared desktop dialog (dg-system.css .is-dialog); only their phone grab handle is dropped here. No new motion. */
#fr-desk[hidden] { display: none !important; }
@media (min-width: 900px) {
  /* Onboarding D task 1.4: the billing grace banner (.ca-grace, features/billing-notices.js) stays: a paying person in grace
     who lands on the first run must still see that their payment needs fixing. */
  html.fr-desk-on #page-setup > :not(#fr-desk):not(.ca-grace) { display: none !important; }
  html.fr-desk-on #page-setup > .ca-grace { max-width: 520px; margin: 12px auto 12px; box-sizing: border-box; }   /* lined up with the centred card */
  #fr-desk { display: flex; align-items: center; justify-content: center; min-height: var(--fr-desk-h, calc(100dvh / 1.1 - 120px)); padding: 12px 0 24px; box-sizing: border-box; }
  .fr-card { position: relative; width: 100%; max-width: 520px; box-sizing: border-box; }
  .fr-mark { display: block; width: 32px; height: 32px; color: var(--accent); }
  .fr-mark svg { display: block; width: 100%; height: 100%; }

  /* Day-0: the phone's own cards in a column; the mark sits on the Skip row. */
  .fr-home .fr-mark { position: absolute; top: 6px; left: 0; }
  .fr-home .ifr-home { padding: 0; }
  .fr-home .ifr-d0-top { margin: 0 -8px 2px; }
  .fr-home .ifr-greet { margin-top: 8px; }
  .fr-home .ifr-greet h1 { font-size: 30px; }
  .fr-home .ifr-lede { font-size: 14.5px; max-width: 44ch; }

  /* The picker, the check and the score: one surface card, header, body, then the buttons straight after. */
  .fr-pick, .fr-check { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
    box-shadow: 0 1px 0 color-mix(in oklab, var(--text) 4%, transparent), 0 18px 40px -16px color-mix(in oklab, var(--text) 22%, transparent); }
  .fr-card .ifr-check, .fr-card .ifr-picker { height: auto; padding-top: 0; }
  .fr-card .ifr-hdr { padding: 18px 24px 6px; }
  .fr-card .ifr-body { flex: none; overflow: visible; padding: 8px 24px 16px; }
  .fr-card .ifr-foot { background: transparent; padding: 12px 24px 20px; }
  .fr-card .ifr-opt, .fr-card .ifr-cert { background: var(--bg); }
  .fr-check .ifr-back { margin-left: -12px; }

  /* The picker's 16 rows scroll inside the card, so Lock in stays on screen under them. */
  .fr-pick { display: flex; flex-direction: column; max-height: var(--fr-desk-h, calc(100dvh / 1.1 - 120px)); }
  .fr-pick .fr-mark { margin: 20px 24px 0; }
  .fr-pick .ifr-hdr { padding-top: 10px; }
  .fr-pick .ifr-picker { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .fr-pick .ifr-pnote { margin-left: 24px; margin-right: 24px; }
  .fr-pick .ifr-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

  /* The lock-in sheets as the centred dialog: no grab handle; the title clears the dialog's Close. */
  #ist-sheet.is-dialog .ist-grab { display: none; }
  #ist-sheet.is-dialog .ifr-sheet-head { padding-right: 44px; }
}

/* ═════════════════ PICKER SEARCH + FIELD CHIPS; SHEETS THAT FIT (6 Nov 2026, onboarding launch fixes, Task 6) ═════════════════
   The picker's rows sit under the shared cert-list bar (lib/cert-list.js; its .clist-* look lives in dg-system.css, the same
   as the Switch cert sheet). Here only the bar's backdrop and spacing on the picker. Chips and search switch instantly (no
   motion, per the cert-lists spec). The lock-in sheets: head and buttons stay put, the words between them scroll. */
.ifr-picker .ifr-body[data-clist-host] { padding-top: 0; overscroll-behavior: contain; }
.ifr-picker .clist-bar { background: var(--bg); margin: 0 -20px; padding: 6px 20px 8px; }
.ifr-picker .clist-sect { padding: 14px 2px 8px; }
#ist-sheet .ist-grab, #ist-sheet .ifr-sheet-head, #ist-sheet .ifr-sheet-actions { flex: 0 0 auto; }
#ist-sheet .ifr-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* Short, wide screens (a phone turned sideways): the picker splits into two columns, the heading, the note and the button
   on the left and the list on the right, so several exams show at once; the lock-in buttons sit side by side. */
@media (orientation: landscape) and (max-height: 500px) {
  #onb-firstrun .ifr-picker { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto auto 1fr auto;
    padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  #onb-firstrun .ifr-picker > * { grid-column: 1; min-width: 0; }
  #onb-firstrun .ifr-picker > .ifr-body { grid-column: 2; grid-row: 1 / -1; min-height: 0; border-left: 1px solid color-mix(in oklab, var(--border) 50%, transparent); }
  #onb-firstrun .ifr-pnote { grid-row: 2; }
  #onb-firstrun .ifr-foot { grid-row: 4; border-top: 0; background: transparent; }
  #onb-firstrun .ifr-first-head { padding: 12px 22px 10px; }
  #onb-firstrun .ifr-fh-brand { margin-bottom: 10px; }
  #onb-firstrun .ifr-first-head h1 { font-size: 22px; max-width: none; }
  #ist-sheet .ifr-sheet-actions { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  /* The desktop card: the bar on the card's surface, and the five chips wrap rather than scroll sideways. */
  .fr-pick .clist-bar { background: var(--surface); margin: 0 -24px; padding: 6px 24px 8px; }
  .fr-pick .clist-chips { flex-wrap: wrap; overflow: visible; }
}

/* Fix round 1 (6 Nov): day-0 on a short phone (an iPhone SE in Safari shows 568px). The same cards and words, tighter
   spacing, so "Take the 30-second check" sits above the fold. Phone layout kept; nothing is hidden. */
@media (max-width: 899px) and (max-height: 600px) {
  #ios-home .ifr-day0 { padding-top: 2px; }
  #ios-home .ifr-day0 .ifr-d0-top { margin-bottom: -14px; }
  #ios-home .ifr-day0 .ifr-greet { margin: 2px 2px 2px; }
  #ios-home .ifr-day0 .ifr-hi { margin-bottom: 5px; }
  #ios-home .ifr-day0 .ifr-greet h1 { font-size: 22px; }
  #ios-home .ifr-day0 .ifr-lede { margin-top: 5px; line-height: 1.42; }
  #ios-home .ifr-day0 .ifr-hb { margin-top: 10px; padding: 10px 13px; }
  #ios-home .ifr-day0 .ifr-hb-row { padding: 6px 0; }
  #ios-home .ifr-day0 .ifr-hb-quota { margin-top: 8px; padding-top: 2px; }
  #ios-home .ifr-day0 .ifr-ready { margin-top: 10px; padding: 10px 13px; gap: 12px; }
  #ios-home .ifr-day0 .ifr-ready-dial { width: 44px; height: 44px; }
  #ios-home .ifr-day0 .ifr-diag { margin-top: 10px; padding: 12px 14px; }
  #ios-home .ifr-day0 .ifr-diag-head { margin-bottom: 8px; }
  #ios-home .ifr-day0 .ifr-diag-badge { width: 36px; height: 36px; }
  #ios-home .ifr-day0 .ifr-diag-p { margin-bottom: 10px; line-height: 1.42; }
}
/* The first iPhone SE size (320 wide): the row labels stay on one line and the small print steps down half a point. */
@media (max-width: 359px) and (max-height: 600px) {
  #ios-home .ifr-day0 .ifr-hb-rn { white-space: nowrap; }
  #ios-home .ifr-day0 .ifr-lede { font-size: 13.5px; }
  #ios-home .ifr-day0 :is(.ifr-ready-s, .ifr-diag-p) { font-size: 12px; }
  #ios-home .ifr-day0 .ifr-ready-dial { width: 40px; height: 40px; }
}

/* First move line on the results page (features/first-move.js). Green only on "up"; flat and drop stay calm. */
.first-move { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text-mid); font: 500 14px/1.45 Inter, sans-serif; }
.first-move p { margin: 0; }
.first-move-up p { color: var(--text); }
.first-move-chip { flex: none; font: 700 12px/1 Inter, sans-serif; border-radius: 999px; padding: 6px 10px; color: var(--green); background: color-mix(in oklab, var(--green) 12%, transparent); border: 1px solid color-mix(in oklab, var(--green) 30%, transparent); }

/* ═════════════════ EXAM DATE STEP (7 Nov 2026, onboarding launch fixes, Task 8) ═════════════════
   One optional screen after the last lock sheet (or Pro's "Start with"): a title, one line, a date box, Save date and
   Not sure yet. Drawn in the picker's host (#onb-firstrun on phones, the #fr-desk card on desktop). No motion here (Task 11). */
.ifr-date { height: 100%; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.ifr-date-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 40px 22px 16px; }
.ifr-date-body h1 { margin: 0; max-width: 15ch; font: 600 27px/1.1 Fraunces, Georgia, serif; letter-spacing: -0.015em; color: var(--text); }
.ifr-date-p { margin: 12px 0 0; max-width: 34ch; font-size: 14px; line-height: 1.5; color: var(--text-mid); }
.ifr-date-in { display: block; width: 100%; min-height: 52px; margin-top: 24px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); color-scheme: dark; font: 500 17px/1.2 Inter, -apple-system, BlinkMacSystemFont, sans-serif; -webkit-appearance: none; appearance: none; }
html[data-theme="light"] .ifr-date-in { color-scheme: light; }
.ifr-date-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
/* gap 19 (7 Nov): "Pick a date" over the empty box. While the box is empty and not focused its own text (blank on iPhone,
   dd/mm/yyyy on a computer) is hidden under the label; focus hands the box back so a computer can type a date. */
.ifr-date-field { position: relative; margin-top: 24px; }
.ifr-date-field .ifr-date-in { margin-top: 0; }
.ifr-date-ph { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); pointer-events: none; font: 500 17px/1.2 Inter, -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text-dim); visibility: hidden; }
.ifr-date-field.is-empty .ifr-date-in:not(:focus) { color: transparent; }
.ifr-date-field.is-empty .ifr-date-in:not(:focus) + .ifr-date-ph { visibility: visible; }
.ifr-date-foot { padding: 10px 20px calc(14px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 6px; border-top: 1px solid color-mix(in oklab, var(--border) 50%, transparent); background: var(--bg); }
@media (orientation: landscape) and (max-height: 500px) {
  .ifr-date-body { padding-top: 14px; }
  .ifr-date-body h1 { font-size: 22px; max-width: none; }
  .ifr-date-field { margin-top: 14px; }
  .ifr-date-foot { grid-template-columns: 1fr 1fr; padding-left: calc(20px + env(safe-area-inset-left, 0px)); padding-right: calc(20px + env(safe-area-inset-right, 0px)); }
}
@media (min-width: 900px) {
  .fr-card .ifr-date { height: auto; padding-top: 0; flex: 1; min-height: 0; }
  .fr-card .ifr-date-body { flex: none; overflow: visible; padding: 20px 24px 20px; }
  .fr-card .ifr-date-foot { background: transparent; padding: 12px 24px 20px; border-top: 0; }
  .fr-card .ifr-date-in { background: var(--bg); }
}

/* ═════════════════ THE CHECK WAITING AND FAILING; THE WELCOME RING LABEL (6 Nov 2026, onboarding launch fixes, Task 9) ═════════════════
   Wait: skeleton cards shaped like a question under the shimmer line (antalik .t-shimmer, dg-system.css, its own 2s sweep).
   [data-paused] (set offscreen and on a hidden tab, ios-firstrun.js) stops every layer: the line's band and the cards' pulse.
   Reduced motion: dg-system.css drops the band and the pulse never starts, so one still frame. No new motion here. */
.ifr-wait-line { margin: 6px 0 14px; font: 600 13.5px/1.3 Inter, sans-serif; }
.ifr-wait-q .ifr-sk-bar { height: 5px; border-radius: 999px; }
.ifr-wait-q .ifr-sk-opt { height: 52px; border-radius: 14px; margin-bottom: 9px; }
.ifr-wait .ifr-foot .ifr-sk-btn { margin-top: 0; }
.ifr-wait[data-paused] .ifr-sk, .ifr-wait[data-paused] .t-shimmer::before { animation-play-state: paused !important; }
.ifr-cerr-line { max-width: 30ch; margin: 0 auto; font: 600 17px/1.4 Fraunces, Georgia, serif; color: var(--text); }
/* Welcome: "Example" on the 735 ring, read before the number (V7). */
.isi-g-ex { margin-bottom: 8px; font: 800 10px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }

/* ═════════════════ MOTION (7 Nov 2026, onboarding launch fixes, Task 11) ═════════════════
   BRAND.md §6 numbers on transitions.dev choreography: the house curve, written out (the sheet and the toast sit on <body>),
   transform + opacity only (the step slide's 2px blur is the one filter), entrances from 0.96 or more, each one resting
   visible and animating from hidden (backwards), exits faster than entrances. Reduced motion: fades only, no movement. */
@keyframes frStepIn { from { opacity: 0; transform: translateX(12px); filter: blur(2px); } }
@keyframes frStepInBack { from { opacity: 0; transform: translateX(-12px); filter: blur(2px); } }
@keyframes frStepOut { from { opacity: 1; transform: none; filter: none; } }
@keyframes frFade { from { opacity: 0; } }
@keyframes frFadeOut { from { opacity: 1; } }
@keyframes frRise { from { opacity: 0; transform: translateY(10px); } }
@keyframes ifrBarSweep { from { transform: scaleX(0); } }
@keyframes ifrCheckIn { from { opacity: 0; transform: rotate(-24deg); } }
@keyframes ifrCheckDraw { from { stroke-dashoffset: 24; } }
@keyframes fmChipIn { from { opacity: 0; transform: scale(0.96); } }
@keyframes fmNumIn { from { opacity: 0; transform: translateY(6px); } }

/* 1. Desktop card, step to step (ios-firstrun.js slideIn): the new card comes in from the right in 520ms; the old one stays
   as a ghost over it and leaves to the left in 280ms. .fr-back (Back, a lower step) mirrors both. The ghost rests hidden. */
@media (min-width: 900px) {
  #fr-desk { position: relative; }
  #fr-desk > .fr-out { position: absolute; margin: 0; pointer-events: none; opacity: 0; transform: translateX(-12px); filter: blur(2px); }
  #fr-desk > .fr-out.fr-back { transform: translateX(12px); }
}
#fr-desk > .fr-card.fr-in { animation: frStepIn .52s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
#fr-desk > .fr-card.fr-in.fr-back { animation-name: frStepInBack; }
#fr-desk > .fr-out { animation: frStepOut .28s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
#fr-desk > .fr-in .ifr-rv, #fr-desk > .fr-out * { animation: none; }   /* each card moves as one; its cards' own rise is for a first draw */

/* 2. Lock sheet 1 to 2: no height animation (BRAND.md §6, transform + opacity only). The sheet jumps to the shorter
   "One last check" and its content fades (#ist-sheet.ifr-step-in, above). One more motion rule: while the desktop first
   run shows, the app's page fade stays off for Home, so a step change is the card's slide alone. */
html.fr-desk-on #page-setup.active:not(.page-exit) { animation: none; }   /* the exit fade still runs (final wave) */

/* 3. "{cert} is set.": the check fades in turning upright, then its stroke draws (520ms all told, after the heading lands). */
.ifr-set-check { display: inline-block; width: .6em; height: .6em; margin-left: .2em; vertical-align: .04em; color: var(--green); animation: ifrCheckIn .52s cubic-bezier(0.16, 1, 0.3, 1) .3s backwards; }
.ifr-set-check svg { display: block; width: 100%; height: 100%; overflow: visible; stroke-width: 2.8; }
.ifr-set-check path { stroke-dasharray: 24; animation: ifrCheckDraw .44s cubic-bezier(0.16, 1, 0.3, 1) .38s backwards; }
.ifr-set-check.is-still, .ifr-set-check.is-still path { animation: none; }   /* seen already in this visit (Back from the check) */

/* 4. The score: the bar sweeps to the score (1000ms, data motion), then the two lines under the card rise 60ms apart. */
.ifr-bar > span:first-child { animation: ifrBarSweep 1s cubic-bezier(0.16, 1, 0.3, 1) .2s backwards; }
.ifr-score .ifr-frame { animation: frRise .52s cubic-bezier(0.16, 1, 0.3, 1) .5s backwards; }
.ifr-score .ifr-aha2 { animation: frRise .52s cubic-bezier(0.16, 1, 0.3, 1) .56s backwards; }

/* 5. First move up: the "+N" chip grows from 0.96 and its number pops up inside it. */
.first-move-chip { animation: fmChipIn .36s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.first-move-chip > span { display: inline-block; animation: fmNumIn .4s cubic-bezier(0.16, 1, 0.3, 1) .12s backwards; }

@media (prefers-reduced-motion: reduce) {
  #fr-desk > .fr-card.fr-in, #fr-desk > .fr-card.fr-in.fr-back { animation: frFade .2s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  #fr-desk > .fr-out, #fr-desk > .fr-out.fr-back { transform: none; filter: none; animation: frFadeOut .15s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .ifr-set-check { animation: frFade .2s cubic-bezier(0.16, 1, 0.3, 1) .2s backwards; }
  .ifr-set-check path { animation: none; }
  .ifr-bar > span:first-child { animation: none; }
  .ifr-score .ifr-frame, .ifr-score .ifr-aha2, .first-move-chip { animation: frFade .2s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .first-move-chip > span { animation: none; }
  /* Buttons keep their colour and fade changes; the press scale goes. */
  .ifr-skip, .ifr-btn, .ifr-ghost, .ifr-opt, .ifr-cert, .onb-goal-opt, .onb-chip, .onb-seg, .onb-back svg, .ifr-first-signin, .isi-back, .isi-primary, .isi-outline, .isi-apple, .isi-google { transition-property: opacity, border-color; }
  .ifr-skip:active, .ifr-btn:active, .ifr-ghost:active, .ifr-opt:active, .ifr-cert:active, .onb-goal-opt:active, .onb-chip:active, .onb-seg:active, .onb-back:active svg, .ifr-first-signin:active, .isi-back:active, .isi-primary:active, .isi-outline:active, .isi-apple:active, .isi-google:active { transform: none; }
}

/* 6. The fold (Task 4 review): at 1280x800 and 1440x900 day-0 and the check were taller than the screen, so they sat at the
   top and "Just start practising" / "Skip the check" fell below the fold. On a desktop under 960px tall the same cards get
   tighter spacing; a card that fits stays centred (#fr-desk's flex centring). */
@media (min-width: 900px) and (max-height: 959px) {
  #fr-desk { padding: 0 0 12px; }
  .fr-home .ifr-d0-top { margin-bottom: -2px; }   /* the mark (32px, top 6px) stays clear of "You're in" */
  .fr-home .ifr-greet { margin-top: 0; }
  .fr-home .ifr-hi { margin-bottom: 5px; }
  .fr-home .ifr-greet h1 { font-size: 26px; }
  .fr-home .ifr-lede { max-width: none; margin-top: 5px; }
  .fr-home .ifr-hb, .fr-home .ifr-ready, .fr-home .ifr-diag, .fr-home .ifr-start { margin-top: 10px; }
  .fr-home .ifr-hb { padding: 10px 14px; }
  .fr-home .ifr-hb-row { padding: 6px 0; }
  .fr-home .ifr-hb-quota { margin-top: 8px; padding-top: 2px; }
  .fr-home .ifr-ready { padding: 10px 14px; gap: 12px; }
  .fr-home .ifr-ready-dial { width: 40px; height: 40px; }
  .fr-home .ifr-diag { padding: 12px 15px; }
  .fr-home .ifr-diag-head { margin-bottom: 8px; }
  .fr-home .ifr-diag-badge { width: 36px; height: 36px; }
  .fr-home .ifr-diag-p { margin-bottom: 10px; }
  .fr-home .ifr-start { padding: 12px 15px; }
  .fr-home .ifr-start-head { margin-bottom: 10px; }
  .fr-home .ifr-start-ring { width: 38px; height: 38px; }
  .fr-check .ifr-hdr { padding-top: 12px; }
  .fr-check .ifr-body { padding-bottom: 10px; }
  .fr-check .ifr-qtext { margin: 10px 0 12px; }
  .fr-check .ifr-opt { min-height: 46px; padding-top: 9px; padding-bottom: 9px; margin-bottom: 7px; }
  .fr-check .ifr-note { margin-top: 8px; padding: 9px 12px; }
  .fr-check .ifr-foot { padding-top: 8px; padding-bottom: 14px; }
}

/* ═════════════════ VISUAL PASS (7 Nov 2026, onboarding launch fixes, Task 14) ═════════════════
   Fixes the six-stage pass found; no new words, no new motion. */
/* Tap targets: the sheet's own button reset (lift-ios.css, min-height: 0) shrank both buttons to 42-43px. */
#ist-sheet .ifr-sheet-actions .ifr-btn { min-height: 48px; }
#ist-sheet .ifr-sheet-actions .ifr-ghost { min-height: 46px; }
/* Light theme: the small bronze labels used the bright bronze (3.5:1 on paper); the deep bronze reads at 7:1. */
html[data-theme="light"] .ifr-hi:not(.ifr-hi-ok), html[data-theme="light"] .ifr-hdr-k, html[data-theme="light"] .ifr-kicker { color: var(--accent-deep); }
/* Day-0 rows: a value that wraps on a narrow phone stays right-aligned with room between its lines. */
.ifr-hb-rv { text-align: right; line-height: 1.3; }
/* The picker's one-line hint wraps evenly instead of leaving one word on its own line. */
.ifr-foot-hint { text-wrap: balance; }
/* Sideways: the sheet's words scroll under the side-by-side buttons, so a hairline marks where the buttons start. */
@media (orientation: landscape) and (max-height: 500px) {
  #ist-sheet .ifr-sheet-actions { border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent); padding-top: 10px; }
}

@media (min-width: 900px) {
  /* desk-tour (13 Nov): the Home tour on desktop (features/ios-tour.js, _IT_STEPS_DESK). lift-ios.css holds the phone
     tour and only loads below 899px, so this is the desktop copy: a bubble of at most 360px beside its ring, never over
     it. BRAND §6 on --ios-ease: overlay in 240ms / out 180ms, bubble enter 220ms from translateY(6px) scale(0.96), step
     out 120ms. Transform and opacity only (the phone's step blur is left out); reduced motion keeps the fades. */
  #ios-tour { position: fixed; inset: 0; z-index: 9000; opacity: 0; pointer-events: none; transition: opacity .18s var(--ios-ease); }
  #ios-tour[hidden] { display: none; }
  #ios-tour.open { opacity: 1; pointer-events: auto; transition-duration: .24s; }
  #ios-tour .tour-ring { position: fixed; border-radius: 20px; pointer-events: none;
    box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--accent) 70%, transparent), 0 0 0 9999px color-mix(in oklab, #07080b 58%, transparent);
    transition: opacity .12s var(--ios-ease); }
  #ios-tour .tour-safe { position: fixed; top: 0; left: 0; width: 0; height: 0; visibility: hidden; pointer-events: none; }
  #ios-tour .tour-tip { position: fixed; box-sizing: border-box; max-width: 360px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px;
    padding: 16px 16px 14px 18px; box-shadow: 0 22px 48px -24px rgba(0,0,0,0.6); transform-origin: var(--tip-ox, 50%) top;
    transition: opacity .22s var(--ios-ease), transform .22s var(--ios-ease); }
  #ios-tour .tour-tip.above { transform-origin: var(--tip-ox, 50%) bottom; }
  #ios-tour .tour-tip.side { transform-origin: left var(--tip-oy, 50%); }
  #ios-tour .tour-tip.side-l { transform-origin: right var(--tip-oy, 50%); }
  #ios-tour .tour-tip::before { content: ""; position: absolute; left: calc(var(--tip-ox, 50%) - 7px); top: -7px; width: 12px; height: 12px; background: var(--surface);
    border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); border-top-left-radius: 3px; }
  #ios-tour .tour-tip.above::before { top: auto; bottom: -7px; transform: rotate(225deg); }
  #ios-tour .tour-tip.side::before { left: -7px; top: calc(var(--tip-oy, 50%) - 7px); transform: rotate(-45deg); }
  #ios-tour .tour-tip.side-l::before { left: auto; right: -7px; top: calc(var(--tip-oy, 50%) - 7px); transform: rotate(135deg); }
  #ios-tour.stepping .tour-tip, #ios-tour.stepping .tour-ring { opacity: 0; transition-duration: .12s; }
  #ios-tour.stepping .tour-tip { transform: translateY(4px) scale(0.98); }
  #ios-tour.entering .tour-tip { opacity: 0; transform: translateY(6px) scale(0.96); }
  #ios-tour .tt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  #ios-tour .tt-count { font: 800 10px/1 Inter, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-deep); }
  html:not([data-theme="light"]) #ios-tour .tt-count { color: var(--accent-bright); }
  #ios-tour .tt-x { width: 36px; height: 36px; margin: -10px -10px -10px 0; padding: 0; display: grid; place-items: center; border: none; border-radius: 10px; background: none; cursor: pointer; color: var(--text-dim); transition: transform .15s var(--ios-ease); }
  #ios-tour .tt-x svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
  #ios-tour .tt-h { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 19px; line-height: 1.2; letter-spacing: -0.01em; text-transform: none; margin: 8px 0 6px; padding: 0; color: var(--text); }   /* the app's global h3 is uppercase */
  #ios-tour .tt-p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-mid); }
  #ios-tour .tt-p b { color: var(--text); font-weight: 650; }
  #ios-tour .tt-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
  #ios-tour .tt-next { min-height: 38px; padding: 0 18px; border: none; border-radius: 11px; cursor: pointer; background: var(--accent); color: var(--on-accent); font: 700 14px/1 Inter, sans-serif; transition: transform .15s var(--ios-ease), opacity .15s var(--ios-ease); }
  #ios-tour .tt-next:active, #ios-tour .tt-x:active { transform: scale(0.97); }
  #ios-tour :is(.tt-next, .tt-x):focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px; box-shadow: none !important; }
  @media (hover: hover) and (pointer: fine) {
    #ios-tour .tt-next:hover { opacity: 0.9; }
  }
  @media (prefers-reduced-motion: reduce) {
    #ios-tour .tour-tip, #ios-tour.stepping .tour-tip, #ios-tour.entering .tour-tip { transform: none; }
    #ios-tour .tt-x:active, #ios-tour .tt-next:active { transform: none; }
    #ios-tour .tt-x, #ios-tour .tt-next { transition: opacity .15s var(--ios-ease); }
  }
}
