/* Bayit — Welcome, Sign In, Request Access, Waiting for Approval.
   Apple-style onboarding: animated app mark, three feature pages, then the forms.
   Black/white with one system-blue accent. Every motion is off under prefers-reduced-motion. */
.wl {
  --bg: #FFFFFF; --label: #000000; --label2: rgba(60,60,67,.62); --label3: rgba(60,60,67,.32);
  --fill: #F2F2F7; --fill2: rgba(120,120,128,.12); --sep: rgba(60,60,67,.18); --accent: #007AFF; --red: #FF3B30; --green: #34C759;
  --ring1: #E5E5EA; --ring2: #C7C7CC; --ring3: #8E8E93; --card: #FFFFFF;
  --ease: cubic-bezier(.32,.72,0,1); --spring: cubic-bezier(.2,.9,.25,1.12);
  position: fixed; inset: 0; z-index: 200; background: var(--bg); color: var(--label);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden;
  display: flex; flex-direction: column; letter-spacing: -.01em;
}
.wl.in-device { position: absolute; border-radius: inherit; }
@media (prefers-color-scheme: dark) {
  .wl:not(.light) { --bg: #000000; --label: #FFFFFF; --label2: rgba(235,235,245,.62); --label3: rgba(235,235,245,.3);
    --fill: #1C1C1E; --fill2: rgba(120,120,128,.24); --sep: rgba(84,84,88,.6); --accent: #0A84FF; --red: #FF453A; --green: #30D158;
    --ring1: #2C2C2E; --ring2: #48484A; --ring3: #8E8E93; --card: #1C1C1E; }
}
.wl.dark { --bg: #000000; --label: #FFFFFF; --label2: rgba(235,235,245,.62); --label3: rgba(235,235,245,.3);
  --fill: #1C1C1E; --fill2: rgba(120,120,128,.24); --sep: rgba(84,84,88,.6); --accent: #0A84FF; --red: #FF453A; --green: #30D158;
  --ring1: #2C2C2E; --ring2: #48484A; --ring3: #8E8E93; --card: #1C1C1E; }
.wl *, .wl *::before, .wl *::after { box-sizing: border-box; }
.wl [hidden] { display: none !important; }
.wl button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.wl.leaving { transition: opacity .45s var(--ease), transform .55s var(--ease); opacity: 0; transform: scale(1.04); pointer-events: none; }

/* ---------- screens (a small navigation stack) ---------- */
.wl-screen { position: absolute; inset: 0; padding: env(safe-area-inset-top) 0 0; display: flex; flex-direction: column;
  background: var(--bg); transition: transform .5s var(--ease), opacity .35s var(--ease); will-change: transform; }
.wl-screen[hidden] { display: none; }
.wl-screen.off-right { transform: translateX(100%); }
.wl-screen.off-left { transform: translateX(-28%); opacity: .0; }
.wl-top { height: 52px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 0; }
.wl-back, .wl-skip { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 17px; }
.wl-back svg { width: 13px; height: 22px; margin-right: 4px; }
.wl-skip { padding: 0 6px; }
.wl-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 24px calc(28px + env(safe-area-inset-bottom)); }

/* ---------- pager: welcome + three feature pages ---------- */
.wl-pager { flex: 1; position: relative; overflow: hidden; touch-action: pan-y; }
.wl-track { display: flex; height: 100%; transition: transform .55s var(--ease); will-change: transform; }
.wl-page { flex: 0 0 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 32px 12px; text-align: center; }
.wl-art { width: 260px; height: 230px; display: flex; align-items: center; justify-content: center; margin-bottom: 34px; }
.wl-h { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.wl-p { font-size: 17px; line-height: 24px; color: var(--label2); margin: 12px auto 0; max-width: 320px; }
.wl-page .wl-h, .wl-page .wl-p { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.wl-page.on .wl-h { opacity: 1; transform: none; transition-delay: .12s; }
.wl-page.on .wl-p { opacity: 1; transform: none; transition-delay: .22s; }
.wl-page[data-p="0"].on .wl-h { transition-delay: 1.3s; }
.wl-page[data-p="0"].on .wl-p { transition-delay: 1.42s; }

.wl-foot { flex: none; padding: 8px 24px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.wl-dots { display: flex; justify-content: center; gap: 9px; height: 22px; align-items: center; }
.wl-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--label3); transition: width .4s var(--ease), background .3s; }
.wl-dots i.on { width: 22px; background: var(--label); }

/* ---------- buttons ---------- */
.wl-btn { height: 52px; border-radius: 26px; width: 100%; font-size: 17px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .18s var(--ease), opacity .2s, background-color .2s; white-space: nowrap; }
.wl-btn:active { transform: scale(.97); }
.wl-btn.primary { background: var(--accent); color: #FFFFFF; }
.wl-btn.secondary { background: var(--fill2); color: var(--label); }
.wl-btn.plain { height: 44px; color: var(--accent); font-weight: 500; }
.wl-btn[disabled] { opacity: .4; pointer-events: none; }
.wl-btn svg { width: 22px; height: 22px; }
.wl-cta2 { display: grid; gap: 12px; }
.wl-foot .wl-cta2, .wl-foot .wl-next { transition: opacity .35s var(--ease), transform .45s var(--ease); }
.wl-foot.last .wl-next, .wl-foot:not(.last) .wl-cta2 { display: none; }
.wl-foot.last .wl-cta2 { animation: wl-rise .5s var(--ease) both; }

/* ---------- app mark: the book opens, the bars rise (mark.js) ---------- */
.klm { display: block; flex: none; border-radius: 22.3%; }
.klm .klm-pl, .klm .klm-pr, .klm .klm-b, .klm .klm-all, .klm .klm-tile { transform-box: view-box; }
.klm .klm-pl, .klm .klm-pr { transform-origin: 512px 742px; }
.klm .klm-all, .klm .klm-tile { transform-origin: 512px 512px; }
.klm.play .klm-tile { animation: klm-tile .5s cubic-bezier(.2,.9,.25,1.1) both; }
.klm.play .klm-book { animation: klm-fade .2s linear both; }
.klm.play .klm-pl { animation: klm-open-l .72s cubic-bezier(.3,1.42,.55,1) .2s both; }
.klm.play .klm-pr { animation: klm-open-r .72s cubic-bezier(.3,1.42,.55,1) .2s both; }
.klm.play .klm-b { animation: klm-rise .5s cubic-bezier(.28,1.36,.5,1) both; }
.klm.play .klm-b1 { animation-delay: .62s; }
.klm.play .klm-b2 { animation-delay: .76s; }
.klm.play .klm-b3 { animation: klm-rise .52s cubic-bezier(.28,1.36,.5,1) .9s both, klm-blue .3s ease-out 1.14s both; }
.klm.play .klm-all { animation: klm-settle .36s ease-in-out 1.3s both; }
@keyframes klm-tile { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }
@keyframes klm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes klm-open-l { from { transform: rotate(82deg); } to { transform: none; } }
@keyframes klm-open-r { from { transform: rotate(-82deg); } to { transform: none; } }
@keyframes klm-rise { from { transform: translateY(360px); } to { transform: none; } }
@keyframes klm-blue { from { fill: #FFFFFF; } to { fill: #0A84FF; } }
@keyframes klm-settle { 0% { transform: none; } 45% { transform: translateY(6px) scale(.985); } 100% { transform: none; } }
@keyframes klm-word { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .klm.play *, .klm.play { animation: none !important; } }
.wl-art.mark { position: relative; }
.wl-art.mark .klm { box-shadow: 0 18px 40px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.12); }
.wl.dark .wl-art.mark .klm, .wl.dark .wl-wait-art .klm { box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 18px 40px rgba(0,0,0,.5); }
@media (prefers-color-scheme: dark) { .wl:not(.light) .wl-art.mark .klm, .wl:not(.light) .wl-wait-art .klm { box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 18px 40px rgba(0,0,0,.5); } }

/* ---------- feature art ---------- */
.wl-ring circle { fill: none; stroke-width: 22; transform: rotate(-90deg); transform-origin: 50% 50%; }
.wl-ring .seg { stroke-dasharray: 0 999; transition: stroke-dasharray 1.1s var(--ease); }
.wl-ring text { fill: var(--label); font-weight: 700; letter-spacing: -.02em; }
.wl-ring .sm { fill: var(--label2); font-weight: 500; letter-spacing: 0; }
.wl-card { background: var(--card); border-radius: 22px; padding: 18px 20px; width: 250px; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.08), 0 0 0 .5px var(--sep); }
.wl-card .k { font-size: 13px; font-weight: 600; color: var(--label2); text-transform: uppercase; letter-spacing: .02em; }
.wl-card .big { font-size: 46px; line-height: 54px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.wl-card .bar { height: 8px; border-radius: 4px; background: var(--fill2); margin-top: 12px; overflow: hidden; }
.wl-card .bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width 1.2s var(--ease) .3s; }
.wl-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .4s var(--ease) .6s, transform .5s var(--spring) .6s; }
.wl-page.on .wl-chip { opacity: 1; transform: none; }
.wl-buckets { display: flex; gap: 18px; align-items: flex-end; }
.wl-bucket { width: 64px; text-align: center; }
.wl-bucket .tube { height: 150px; border-radius: 22px; background: var(--fill2); position: relative; overflow: hidden; }
.wl-bucket .tube i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--label); border-radius: 0 0 22px 22px; transition: height 1.2s var(--ease); }
.wl-bucket:nth-child(2) .tube i { background: var(--accent); }
.wl-bucket .lb { font-size: 13px; color: var(--label2); margin-top: 10px; font-weight: 500; }
.wl-bucket .amt { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- forms ---------- */
.wl-form-head { text-align: center; padding: 6px 8px 26px; }
.wl-form-head img { width: 64px; height: 64px; border-radius: 15px; display: block; margin: 0 auto 16px; animation: wl-pop .6s var(--spring) both; }
.wl-form-head .wl-h { font-size: 30px; line-height: 36px; }
.wl-form-head .wl-p { font-size: 16px; line-height: 22px; margin-top: 8px; }
.wl-group { background: var(--fill); border-radius: 16px; overflow: hidden; }
.wl-field { display: flex; align-items: center; min-height: 54px; padding: 0 6px 0 16px; position: relative; }
.wl-field + .wl-field::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--sep); }
.wl-field label { width: 92px; flex: none; font-size: 17px; }
.wl-field input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent; color: var(--label); font: inherit; font-size: 17px; padding: 0 10px 0 0; }
.wl-field input::placeholder { color: var(--label3); }
.wl-eye { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--label2); border-radius: 22px; flex: none; }
.wl-eye svg { width: 22px; height: 22px; }
.wl-hint { font-size: 13px; line-height: 18px; color: var(--label2); padding: 8px 16px 0; }
.wl-err { min-height: 22px; font-size: 15px; line-height: 20px; color: var(--red); text-align: center; padding: 12px 8px 4px; }
.wl-err:empty { min-height: 14px; padding: 0; }
.wl-or { display: flex; align-items: center; gap: 12px; color: var(--label2); font-size: 13px; margin: 18px 4px; }
.wl-or::before, .wl-or::after { content: ""; flex: 1; height: .5px; background: var(--sep); }
.wl-links { display: flex; justify-content: center; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
.wl-note { margin-top: 14px; background: var(--fill); border-radius: 16px; padding: 14px 16px; font-size: 15px; line-height: 20px; color: var(--label2); animation: wl-rise .4s var(--ease) both; }
.wl-note b { color: var(--label); font-weight: 600; }
.wl-banner { display: flex; gap: 12px; align-items: center; background: color-mix(in srgb, var(--accent) 12%, var(--bg)); color: var(--label); border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; font-size: 15px; line-height: 20px; }
.wl-banner svg { color: var(--accent); width: 24px; height: 24px; flex: none; }
.wl-legal { font-size: 13px; line-height: 18px; color: var(--label2); text-align: center; margin-top: 18px; }
.wl-agree { margin-top: 12px; padding: 0 12px; } .wl-agree a { color: var(--accent, #0A84FF); text-decoration: underline; }
.wl-check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 4px 0; font-size: 14px; line-height: 19px; color: var(--label); text-align: left; }
.wl-check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent, #0A84FF); }
.wl-check a { color: var(--accent, #0A84FF); text-decoration: underline; }
.wl-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: wl-rot .8s linear infinite; }

/* ---------- waiting for approval ---------- */
.wl-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 32px; }
.wl-wait-art { width: 120px; height: 120px; position: relative; margin-bottom: 30px; }
.wl-wait-art .klm { width: 120px; height: 120px; box-shadow: 0 14px 34px rgba(0,0,0,.16); }
.wl-wait-art .track { fill: none; stroke: var(--fill2); stroke-width: 8; }
.wl-wait-art .arc { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 90 400; transform-origin: 75px 75px; animation: wl-rot 2.4s linear infinite; }
.wl-wait-art .env { fill: none; stroke: var(--label); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 220; stroke-dashoffset: 220; animation: wl-draw 1s var(--ease) .2s forwards; }
.wl-wait .wl-h { font-size: 30px; line-height: 36px; animation: wl-rise .6s var(--ease) .35s both; }
.wl-wait .wl-p { animation: wl-rise .6s var(--ease) .45s both; }
.wl-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--fill); font-size: 15px; color: var(--label2); animation: wl-rise .6s var(--ease) .55s both; }
.wl-pill i { width: 8px; height: 8px; border-radius: 4px; background: #FF9F0A; animation: wl-blink 1.6s ease-in-out infinite; }

/* First launch: the buttons arrive after the mark has drawn itself. */
.wl.intro .wl-foot, .wl.intro .wl-top { animation: wl-rise .6s var(--ease) 1.4s both; }
@keyframes wl-pop-unused { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes wl-draw { to { stroke-dashoffset: 0; } }
@keyframes wl-halo { 0% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { opacity: 0; box-shadow: 0 0 0 26px color-mix(in srgb, var(--accent) 0%, transparent); } }
@keyframes wl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wl-rot { to { transform: rotate(360deg); } }
@keyframes wl-blink { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  .wl *, .wl *::before, .wl *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; transition-delay: 0s !important; }
  .wl-wait-art .arc { animation: none !important; }
}
@media (max-height: 700px) { .wl-art { height: 180px; margin-bottom: 20px; transform: scale(.85); } .wl-h { font-size: 30px; line-height: 36px; } }

/* 9.4.1: lets the page notice iOS / Chrome AutoFill (it may fire no input event): animationstart re-checks the buttons. */
@keyframes klAutofill { from { opacity: 1; } to { opacity: 1; } }
.wl input:-webkit-autofill { animation: klAutofill 1ms; }
/* 3.2.2 — AutoFill keeps the field's own look (no yellow/blue tint), light and dark. Two rules: a browser that
   doesn't know one of the selectors still applies the other. */
.wl input:-webkit-autofill, .wl input:-webkit-autofill:hover, .wl input:-webkit-autofill:focus, .wl input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--fill) inset !important; box-shadow: 0 0 0 1000px var(--fill) inset !important;
  -webkit-text-fill-color: var(--label) !important; caret-color: var(--label);
  transition: background-color 9999s ease-out 0s, color 9999s ease-out 0s;
}
.wl input:autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--fill) inset !important; box-shadow: 0 0 0 1000px var(--fill) inset !important;
  -webkit-text-fill-color: var(--label) !important; caret-color: var(--label);
  transition: background-color 9999s ease-out 0s, color 9999s ease-out 0s;
}


/* ---------- 9.3.1: sign-in redesign (Sign In, Welcome Back, 2-step, Add Email) ----------
   Grey glass tiles on pure black, one Apple-blue accent, SF Pro. Motion: the card rises in, a wrong password shakes,
   code boxes fill one by one, Face ID breathes while it waits, and the screen fades into the app. All of it is off under
   prefers-reduced-motion (the rule at the end of this block). */
.wl { --glass: rgba(118,118,128,.12); --glass-edge: rgba(0,0,0,.06); }
@media (prefers-color-scheme: dark) { .wl:not(.light) { --glass: rgba(118,118,128,.16); --glass-edge: rgba(255,255,255,.07); } }
.wl.dark { --glass: rgba(118,118,128,.16); --glass-edge: rgba(255,255,255,.07); }
.wl-stage .wl-group, .wl-who, .wl-switch-row, .wl-face { background: var(--glass); box-shadow: inset 0 0 0 .5px var(--glass-edge);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); }
.wl-stage .wl-group { border-radius: 18px; transition: box-shadow .25s var(--ease); }
.wl-stage .wl-group:focus-within { box-shadow: inset 0 0 0 .5px var(--glass-edge), 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.wl-stage .wl-field label { color: var(--label2); width: 86px; font-size: 16px; }
.wl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wl-form-head img.wl-app { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 10px 30px rgba(10,132,255,.18); }
.wl-sub { color: var(--label2); min-height: 22px; font-variant-numeric: tabular-nums; }
.wl-sub:empty { display: none; }
/* the card rises in, child by child */
.wl-screen:not([hidden]) .wl-stage > * { animation: wl-rise .55s var(--ease) both; }
.wl-stage > *:nth-child(2) { animation-delay: .05s !important; } .wl-stage > *:nth-child(3) { animation-delay: .1s !important; }
.wl-stage > *:nth-child(4) { animation-delay: .15s !important; } .wl-stage > *:nth-child(5) { animation-delay: .2s !important; }
.wl-stage > *:nth-child(n+6) { animation-delay: .25s !important; }
/* buttons: a calm disabled state (no muddy see-through blue), a shimmer while busy */
.wl-stage .wl-btn.primary[disabled]:not(.is-busy) { opacity: 1; background: var(--fill2); color: var(--label3); }
.wl-btn.is-busy { opacity: 1; position: relative; overflow: hidden; }
.wl-btn.is-busy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.22) 50%, transparent 80%); transform: translateX(-100%); animation: wl-sheen 1.1s ease-in-out infinite; }
.wl-btn.plain[disabled] { opacity: 1; color: var(--label3); }
.wl-links-col { flex-direction: column; align-items: center; gap: 0; }
.wl-links-col .wl-btn.plain { width: auto; padding: 0 12px; }
/* Welcome Back: who is signing in */
.wl-who { display: flex; align-items: center; gap: 12px; width: 100%; height: 60px; padding: 0 16px 0 10px; border-radius: 18px; margin-bottom: 12px; text-align: left; }
.wl-ava { width: 40px; height: 40px; border-radius: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: 17px; font-weight: 600; }
.wl-who-em { flex: 1; min-width: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-who-x { color: var(--accent); font-size: 15px; flex: none; }
/* a wrong password / code */
.wl-shake { animation: wl-shake .42s cubic-bezier(.36,.07,.19,.97) both !important; }
.wl-err:not(:empty) { animation: wl-fade .25s var(--ease) both; }
/* six code boxes over one input */
.wl-otp { position: relative; margin: 4px 0 2px; }
.wl-otp-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; color: transparent; background: transparent; caret-color: transparent; font-size: 16px; z-index: 2; }
.wl-otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.wl-otp-boxes i { font-style: normal; height: 60px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--glass); box-shadow: inset 0 0 0 .5px var(--glass-edge); color: var(--label); transition: box-shadow .2s var(--ease), background-color .2s, transform .2s var(--ease); }
.wl-otp-boxes i:nth-child(3) { margin-right: 6px; } .wl-otp-boxes i:nth-child(4) { margin-left: 6px; }
.wl-otp-boxes i.on { box-shadow: inset 0 0 0 2px var(--accent); }
.wl-otp-boxes i.on:empty::after { content: ""; width: 2px; height: 28px; border-radius: 1px; background: var(--accent); animation: wl-blink 1s steps(1) infinite; }
.wl-otp-boxes i.full { animation: wl-pop-digit .22s var(--spring) both; }
.wl-otp.intro .wl-otp-boxes i { animation: wl-rise .45s var(--ease) both; }
.wl-otp.intro .wl-otp-boxes i:nth-child(2) { animation-delay: .04s; } .wl-otp.intro .wl-otp-boxes i:nth-child(3) { animation-delay: .08s; }
.wl-otp.intro .wl-otp-boxes i:nth-child(4) { animation-delay: .12s; } .wl-otp.intro .wl-otp-boxes i:nth-child(5) { animation-delay: .16s; }
.wl-otp.intro .wl-otp-boxes i:nth-child(6) { animation-delay: .2s; }
.wl-otp.bad .wl-otp-boxes { animation: wl-shake .42s cubic-bezier(.36,.07,.19,.97) both; }
.wl-otp.bad .wl-otp-boxes i { box-shadow: inset 0 0 0 2px var(--red); }
.wl-otp.good .wl-otp-boxes i { background: var(--accent); color: #fff; box-shadow: none; transform: scale(.96); }
.wl-stage.checking .wl-otp-boxes i { animation: wl-breathe 1s ease-in-out infinite; }
.wl-stage.checking .wl-otp-boxes i:nth-child(2n) { animation-delay: .15s; }
/* the round glass badge above a title */
.wl-badge { width: 72px; height: 72px; border-radius: 36px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; color: var(--accent);
  background: var(--glass); box-shadow: inset 0 0 0 .5px var(--glass-edge); animation: wl-pop .6s var(--spring) both; }
.wl-badge svg { width: 34px; height: 34px; }
/* Face ID: breathes while it waits, a check when it passes */
.wl-face-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 6px 0 10px; }
.wl-face-wrap .wl-btn { width: 100%; } /* 9.6.4: one tap on it = one Face ID scan */
.wl-face { width: 120px; height: 120px; border-radius: 60px; color: var(--accent); display: flex; align-items: center; justify-content: center; position: relative; transition: transform .3s var(--ease); }
.wl-face svg { width: 60px; height: 60px; }
.wl-face:active { transform: scale(.95); }
.scan .wl-face svg { animation: wl-breathe 1.4s ease-in-out infinite; }
.scan .wl-face::after { content: ""; position: absolute; inset: 0; border-radius: 60px; animation: wl-halo 1.6s var(--ease) infinite; }
.done .wl-face { background: var(--accent); color: #fff; }
/* Remember This Device */
.wl-switch-row { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 12px 0 16px; border-radius: 18px; margin: 14px 0 14px; font-size: 17px; }
.wl-switch-row > span:first-child { flex: 1; }
.wl-val { color: var(--label2); font-size: 15px; }
.wl-switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill2); position: relative; flex: none; margin: 0; cursor: pointer; transition: background-color .25s var(--ease); }
.wl-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.22); transition: transform .28s var(--spring); }
.wl-switch:checked { background: var(--green); }
.wl-switch:checked::after { transform: translateX(20px); }
.wl-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* into the app */
.wl.wl-leave { transition: opacity .38s var(--ease), transform .45s var(--ease), filter .38s; opacity: 0; transform: scale(.97); filter: blur(6px); pointer-events: none; }
@keyframes wl-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
@keyframes wl-sheen { to { transform: translateX(100%); } }
@keyframes wl-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes wl-pop-digit { 0% { transform: scale(.82); } 100% { transform: scale(1); } }
@keyframes wl-breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) {
  .wl-stage > *, .wl-otp-boxes i, .wl-badge, .wl-face svg, .wl-face::after, .wl-btn.is-busy::after, .wl-err, .wl-shake, .wl-otp.bad .wl-otp-boxes { animation: none !important; }
  .wl.wl-leave { transition: none; }
}


/* ---------- 9.3.1: the Sign In / Welcome Back screen ----------
   The app's mark, "Welcome back, <first name>", the saved email as a small glass pill. With Face ID on this phone the big
   blue button is Face ID and the password sits right under it; after a cancel or a failed scan the password leads
   (focused) and the Face ID button turns grey ("Try Face ID Again"). Pure black, grey glass, one Apple blue. */
.wl-in { display: flex; flex-direction: column; min-height: 100%; }
.wl-in > .wl-hero { order: 0; } .wl-in > #pkWrap { order: 4; } .wl-in > #inGroup, .wl-in > #inOk, .wl-in > #inErr { order: 2; }
.wl-in > #inGo { order: 3; } .wl-in > .wl-links { order: 5; } .wl-in > .wl-agree { order: 6; }
.wl-in.face-first > #pkWrap, .wl-in.pw-first > #pkWrap { order: 1; }
.wl-in.pw-first > #pkWrap { order: 4; }
.wl-hero { text-align: center; padding: 14px 0 30px; }
.wl-in.returning .wl-hero { padding-top: 46px; }
.wl-mark { width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 17px; position: relative;
  box-shadow: 0 0 0 .5px rgba(255,255,255,.14), 0 18px 44px -8px rgba(10,132,255,.32); animation: wl-mark-in .7s var(--spring) both; }
.wl-mark .klm, .wl-mark img { display: block; width: 76px; height: 76px; }
.wl-greet { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
.wl-hero .wl-who { display: inline-flex; width: auto; max-width: 100%; height: 34px; margin: 12px auto 0; padding: 0 4px 0 14px; gap: 0; border-radius: 17px; font-size: 15px; }
.wl-hero .wl-who-em { color: var(--label2); font-size: 15px; padding-right: 10px; }
.wl-hero .wl-who-x { font-size: 15px; font-weight: 500; padding: 0 10px; height: 22px; line-height: 22px; border-left: .5px solid var(--sep); }
/* Face ID */
.wl-pk { display: flex; flex-direction: column; }
.wl-in:not(.face-first) .wl-pk { flex-direction: column-reverse; } /* "or" above a secondary Face ID button */
.wl-in.face-first .wl-pk .wl-or { margin: 22px 4px 18px; }
.wl-in:not(.face-first) .wl-pk .wl-or { margin: 18px 4px; }
.wl-pk-btn { height: 56px; border-radius: 18px; font-size: 17px; gap: 10px; transition: background-color .35s var(--ease), color .35s var(--ease), transform .18s var(--ease), box-shadow .35s var(--ease); }
.wl-in .wl-btn.primary { box-shadow: 0 10px 28px -10px rgba(10,132,255,.65); }
.wl-stage .wl-btn.primary[disabled] { box-shadow: none; }
.wl-in .wl-btn.secondary { background: var(--glass); box-shadow: inset 0 0 0 .5px var(--glass-edge); color: var(--label); }
.wl-in .wl-btn.secondary[disabled] { opacity: 1; color: var(--label3); }
.wl-pk-ico { position: relative; width: 26px; height: 26px; flex: none; display: inline-block; }
.wl-pk-ico svg { position: absolute; inset: 0; width: 26px; height: 26px; transition: opacity .25s var(--ease), transform .35s var(--spring); }
.wl-pk-ico svg + svg { opacity: 0; transform: scale(.6); }
.wl-pk-btn.secondary .wl-pk-ico { color: var(--accent); }
.wl-pk-btn.scan .wl-pk-ico svg:first-child { animation: wl-breathe 1.3s ease-in-out infinite; }
.wl-pk-btn.done .wl-pk-ico svg:first-child { opacity: 0; transform: scale(.6); }
.wl-pk-btn.done .wl-pk-ico svg + svg { opacity: 1; transform: none; }
/* fields and the main button */
.wl-in #inGroup { border-radius: 18px; }
.wl-field[hidden] + .wl-field::before { display: none; }
.wl-in #inGo { height: 54px; border-radius: 18px; margin-top: 14px; transition: background-color .35s var(--ease), color .35s var(--ease), transform .18s var(--ease), box-shadow .35s var(--ease); }
.wl-in.face-first #inGo { margin-top: 12px; }
.wl-in #inErr { font-size: 14px; line-height: 19px; text-wrap: balance; padding: 12px 4px 0; }
.wl-in #inErr:empty { padding: 0; min-height: 0; }
.wl-in .wl-links { margin-top: 10px; }
.wl-new { order: 5; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; padding-top: 18px; border-top: .5px solid var(--sep); font-size: 16px; color: var(--label2); }
.wl-new .wl-btn.plain { width: auto; height: 44px; padding: 0 4px; font-size: 16px; font-weight: 600; }
.wl-pk-btn.scan { pointer-events: none; } /* one Face ID at a time: no taps while it is up */
.wl-in .wl-agree { margin-top: auto; padding-top: 28px; color: var(--label3); }
.wl-in .wl-agree a { color: var(--label2); text-decoration: none; }
.wl-inline { width: auto !important; height: auto !important; display: inline !important; font-size: 13px !important; font-weight: 400 !important; }
.wl-form-head .wl-mark { margin-bottom: 18px; }
/* the 6-digit code screen and friends: same rhythm */
.wl-stage .wl-form-head { padding-top: 18px; }
.wl-stage .wl-btn { border-radius: 18px; }
#cdGo, #emGo { height: 54px; margin-top: 4px; }
@keyframes wl-mark-in { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
.wl-badge { animation-name: wl-mark-in; }
@media (prefers-reduced-motion: reduce) {
  .wl-mark, .wl-pk-btn.scan .wl-pk-ico svg:first-child { animation: none !important; }
  .wl-pk-btn, .wl-pk-ico svg, .wl-in #inGo { transition: none; }
}
