:root {
  --page: #EEEEEE; --surface: #FFFFFF; --text: #000000; --text-muted: #232326; --text-subtle: #969696;
  --rule: rgba(0, 0, 0, .18); --accent: #FFB900; --accent-fg: #000000; --destructive: #B24931;
  --fill: rgba(0, 0, 0, .055); --rule-subtle: rgba(0, 0, 0, .10); --link: #007AFF; --glass-shadow: rgba(0, 0, 0, .08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --page: #000000; --surface: #232326; --text: #FFFFFF; --text-muted: #EEEEEE; --text-subtle: #969696;
    --rule: rgba(255, 255, 255, .2); --destructive: #FF573A; --fill: rgba(255, 255, 255, .10); --rule-subtle: rgba(255, 255, 255, .13); --link: #0A84FF;
    --glass-shadow: rgba(0, 0, 0, .4); }
  .logo { filter: invert(1); }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--page); color: var(--text); }
/* The phone's own fonts: the page loads none. */
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; font-weight: 400;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
main { max-width: 430px; height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; }

.chrome { display: flex; flex-direction: column; gap: 16px; padding: calc(env(safe-area-inset-top) + 20px) 20px 12px; }
/* As tall as its round buttons whether or not one shows, so the wordmark never moves. The room under it is what the bars
   the page once drew there took (setup's progress is the app's own row of parts), so nothing under it moved either. */
.chrome-row { display: flex; align-items: center; min-height: 44px; margin-bottom: 20px; }
.chrome-slot { flex: 1; display: flex; }
.logo { width: 62px; height: auto; display: block; }
.circle { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: .5px solid var(--rule); background: var(--surface); color: var(--text); cursor: pointer;
  box-shadow: 0 2px 10px var(--glass-shadow); }
.circle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notice { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--fill); color: var(--text-muted);
  font-size: 14px; line-height: 16.8px; text-align: center; }
.notice[hidden] { display: none; }

.content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding: 12px 24px 16px; }
.content.centred .stage { margin: auto 0; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 20px; animation: in .25s ease-out; }
/* A form's heading keeps some room under the header. */
.stage.form { gap: 16px; padding-top: 16px; }
@keyframes in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .stage { animation: none; } }

.success { width: 48px; height: 48px; border-radius: 24px; background: var(--accent); color: var(--accent-fg);
  display: flex; align-items: center; justify-content: center; }

.heading { align-self: stretch; display: flex; flex-direction: column; gap: 8px; text-align: center; }
/* Lines balanced, so a wrapped heading or line never leaves one word alone on its last line. */
.heading > * { text-wrap: balance; }
h1 { margin: 0; font-weight: 500; color: var(--text); outline: none; }
h1.h2 { font-size: 32px; line-height: 36.8px; letter-spacing: -.96px; }
h1.h3 { font-size: 24px; line-height: 28.32px; letter-spacing: -.48px; }
.caption { margin: 0; font-size: 16px; line-height: 19.2px; color: var(--text-subtle); }
/* What their iPhone asks next that is theirs to leave alone: a line of its own, marked off in the accent, in ink. */
.heads-up { align-self: stretch; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--fill);
  border-left: 4px solid var(--accent); color: var(--text); font-size: 16px; line-height: 20.8px; font-weight: 500;
  text-align: left; text-wrap: balance; }

.promises { align-self: stretch; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.promises li { display: flex; align-items: flex-start; gap: 14px; color: var(--text-muted); font-size: 16px; line-height: 19.2px; }
.promises svg { flex-shrink: 0; }
.promises span { flex: 1; }

.fields { align-self: stretch; display: flex; flex-direction: column; gap: 16px; margin: 0; }
.labeled { position: relative; display: flex; align-items: center; height: 56px; padding: 0 16px; border-radius: 16px;
  background: var(--surface); cursor: text; }
.labeled::after { content: ""; position: absolute; inset: -4px; border: 2px solid var(--accent); border-radius: 20px;
  opacity: 0; transition: opacity .15s; pointer-events: none; }
.labeled:focus-within::after { opacity: 1; }
.labeled .label { position: absolute; left: 16px; top: 16px; font-size: 20px; line-height: 24px; color: var(--text-subtle);
  transform-origin: left center; transition: transform .25s cubic-bezier(.2, 0, 0, 1); pointer-events: none;
  white-space: nowrap; }
.labeled input { width: 100%; height: 28px; padding: 0; border: 0; outline: none; background: transparent; color: var(--text);
  font-size: 20px; caret-color: var(--text); transition: transform .25s cubic-bezier(.2, 0, 0, 1); }
.labeled:focus-within .label, .labeled:has(input:not(:placeholder-shown)) .label { transform: translateY(-10px) scale(.75); }
.labeled:focus-within input, .labeled:has(input:not(:placeholder-shown)) input { transform: translateY(8px); }

/* The account a password is for, shown and not to change: no ring, no caret, its words muted. */
.labeled:has(input[readonly]) { cursor: default; }
.labeled:has(input[readonly])::after { display: none; }
.labeled input[readonly] { color: var(--text-subtle); pointer-events: none; }

.keyboard-submit { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }

/* The tick on the first line of its words, however many they wrap to; the row still a 44px tap. */
.agree { display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px; color: var(--text-muted);
  font-size: 16px; line-height: 19.2px; cursor: pointer; }
.agree a { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.agree a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.tick { position: relative; flex: none; width: 24px; height: 24px; margin-top: -2.4px; }
.tick input { appearance: none; -webkit-appearance: none; display: block; width: 24px; height: 24px; margin: 0;
  border: 1.5px solid var(--rule); border-radius: 7px; background: var(--surface); cursor: pointer;
  transition: background-color .15s, border-color .15s; }
.tick input:checked { background: var(--accent); border-color: var(--accent); }
.tick input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tick svg { position: absolute; left: 4px; top: 4px; color: var(--accent-fg); opacity: 0; pointer-events: none; }
.tick input:checked + svg { opacity: 1; }

.error { margin: 0; align-self: stretch; text-align: center; font-size: 14px; line-height: 16.8px; color: var(--destructive); }
.error[hidden] { display: none; }

.technical { align-self: stretch; color: var(--text-subtle); font-size: 14px; line-height: 16.8px; }
.technical summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  list-style: none; cursor: pointer; }
.technical summary::-webkit-details-marker { display: none; }
.technical summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.technical[open] summary svg { transform: rotate(180deg); }
.technical-lines { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.technical-lines p { margin: 0; overflow-wrap: anywhere; }

/* Over cells that are only offered: for whom, quietly. */
.code-offer { margin: 4px 0 -8px; font-size: 15px; line-height: 18px; color: var(--text-subtle); text-align: center;
  text-wrap: balance; }
/* A sign-in under way: a quiet line with a spinner under its words. */
.waiting { margin: 8px 0 0; display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 18px;
  color: var(--text-subtle); }
.waiting-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--rule);
  border-top-color: var(--text-subtle); animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .waiting-spinner { animation: none; } }

/* Apple's code: six cells, one field laid over them (otp.ts), in two threes as Apple shows it. */
.code-cells { align-self: stretch; display: flex; justify-content: center; padding-top: 4px; }
.code-cells.checking .otp { opacity: .5; }
.otp { position: relative; display: flex; align-items: center; gap: 8px; }
.otp-group { display: flex; gap: 8px; }
/* Inside the page's 24px sides, narrower than 44px only where the screen is (a 320px phone: 36px each). */
.otp-cell { position: relative; width: min(44px, calc((100vw - 48px - 56px) / 6)); height: 56px; border-radius: 14px;
  background: var(--surface); display: flex; align-items: center; justify-content: center; }
.otp-cell.active { outline: 2px solid var(--accent); }
.otp.invalid .otp-cell { outline: 2px solid var(--destructive); }
.otp.disabled { pointer-events: none; }
.otp-value { font-size: 24px; line-height: 32px; color: var(--text); animation: digit-in .25s cubic-bezier(0, .75, .5, .9); }
@keyframes digit-in { from { opacity: 0; transform: rotateX(-90deg); } }
.otp-cell.active::after { content: ""; position: absolute; width: 2px; height: 16px; border-radius: 999px;
  background: var(--text-subtle); animation: caret 1s ease-in-out infinite alternate; }
@keyframes caret { from { opacity: 1; height: 16px; } to { opacity: 0; height: 18px; } }
.otp-separator { width: 8px; height: 2px; border-radius: 999px; background: var(--rule); }
.otp-input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
  opacity: .02; color: transparent; caret-color: transparent; background: transparent; font-size: 16px; outline: none; }
@media (prefers-reduced-motion: reduce) { .otp-value, .otp-cell.active::after { animation: none; } }

/* Apple's two alerts on the customer's iPhone, drawn in their own shapes (page.ts's appleAlerts): what to press, and the
   code, ringed in Whim's colour. Apple's own colours, for the alerts alone. */
.apple-alerts { align-self: stretch; display: flex; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none;
  --ios-alert: rgba(242, 242, 242, .97); --ios-ink: #000000; --ios-soft: rgba(60, 60, 67, .78);
  --ios-faint: rgba(60, 60, 67, .18); --ios-blue: #007AFF; --ios-map: #DDE9D4; --ios-water: #B9D7F0; }
@media (prefers-color-scheme: dark) {
  .apple-alerts { --ios-alert: rgba(44, 44, 46, .97); --ios-ink: #FFFFFF; --ios-soft: rgba(235, 235, 245, .7);
    --ios-faint: rgba(235, 235, 245, .2); --ios-blue: #0A84FF; --ios-map: #34402F; --ios-water: #26425A; }
}
.ios-step { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ios-caption { margin: 0; font-size: 14px; line-height: 16.8px; color: var(--text-muted); text-align: center; }
.ios-alert { flex: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 10px 0; border-radius: 14px; background: var(--ios-alert); color: var(--ios-ink);
  border: .5px solid var(--rule-subtle); box-shadow: 0 4px 16px var(--glass-shadow); overflow: hidden; }
.ios-title { margin: 0; font-size: 12px; line-height: 14.5px; font-weight: 600; text-align: center; }
.ios-text { margin: 0; font-size: 10px; line-height: 12.5px; color: var(--ios-soft); text-align: center; }
.ios-map { display: block; align-self: stretch; height: 40px; margin: 2px -10px 0; background:
  linear-gradient(115deg, transparent 46%, rgba(255, 255, 255, .55) 47% 49%, transparent 50%),
  linear-gradient(25deg, transparent 58%, rgba(255, 255, 255, .45) 59% 61%, transparent 62%),
  radial-gradient(ellipse 34% 70% at 100% 100%, var(--ios-water) 0 98%, transparent 100%), var(--ios-map); }
.ios-code { display: flex; align-items: center; gap: 3px; margin: 8px 0 6px; padding: 5px 8px; border-radius: 8px; }
.ios-code span { width: 10px; height: 15px; border-radius: 2px; background: var(--ios-ink); opacity: .75; }
.ios-code i { width: 6px; }
.ios-buttons { align-self: stretch; display: flex; margin: auto -10px 0; border-top: .5px solid var(--ios-faint); }
.ios-buttons > span { flex: 1; padding: 9px 2px 10px; font-size: 12px; line-height: 14px; text-align: center;
  color: var(--ios-blue); white-space: nowrap; }
.ios-buttons > span + span { border-left: .5px solid var(--ios-faint); }
/* The one to press: Whim's ring around it. */
.ios-buttons > .ios-tap { font-weight: 600; box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0 0 12px 0; }
.ios-code.ios-tap { box-shadow: 0 0 0 2px var(--accent); }

.footer { padding: 8px 24px max(env(safe-area-inset-bottom), 16px); }
.footer:empty { padding: 0 0 max(env(safe-area-inset-bottom), 16px); }
.primary { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 56px;
  border: 0; border-radius: 28px; background: var(--accent); color: var(--accent-fg); font-size: 20px; line-height: 24px;
  font-weight: 500; text-decoration: none; cursor: pointer; transition: opacity .15s; }
.primary.dimmed { opacity: .45; }
.primary:active:not(.dimmed) { opacity: .8; }
.primary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.spinner { display: none; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(0, 0, 0, .25);
  border-top-color: var(--accent-fg); animation: spin .8s linear infinite; }
.primary.busy .spinner { display: block; }
.primary.busy .primary-label { display: none; }
.secondary { display: block; width: 100%; height: 48px; margin-top: 8px; border: 0; background: transparent;
  color: var(--text); font-size: 17px; line-height: 22px; font-weight: 500; cursor: pointer; transition: opacity .15s; }
/* The second way on as a link out of the page: drawn as the button is. */
a.secondary { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.secondary:active:not(:disabled) { opacity: .6; }
.secondary:disabled { opacity: .45; }
.secondary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.noscript { padding: 24px; }



.match { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.match .otp-value { animation: none; }
