/* auth screen styles, round 1 (R1-01 to R1-06, R1-28, R1-43) */
.auth .center { text-align: center; }
.auth .mb16 { margin-bottom: var(--space-16); }
.auth .h-sm { font-size: var(--type-body); line-height: var(--lh-body); font-weight: var(--weight-medium); margin: var(--space-24) 0 var(--space-4); }
.auth .or { margin: var(--space-16) 0; }
.auth-login .head { margin-bottom: var(--space-16); }
.auth-login h1 { margin-bottom: var(--space-16); }
.auth-login .btn-primary { margin-top: var(--space-4); }

/* Google button: real four colour G */
.btn-google { font-weight: var(--weight-medium); }
.btn-google .g-logo { width: 24px; height: 24px; flex: none; }
.choice .g-logo { width: 24px; height: 24px; flex: none; }
.btn-google:focus-visible, .link-btn:focus-visible, .otp-box:focus-visible { outline: 3px solid var(--stroke-focus); outline-offset: 2px; }

/* password guide with live ticks */
.pwg { list-style: none; margin: var(--space-8) 0 0; padding: 0; display: grid; gap: var(--space-4); }
.pwg li { display: flex; align-items: center; gap: var(--space-8); font-size: var(--type-tiny); line-height: var(--lh-tiny); color: var(--text-weak); }
.pwg .tick { width: 20px; height: 20px; flex: none; border-radius: var(--radius-full); border: 1.5px solid var(--stroke-strong); display: grid; place-items: center; background: var(--surface-card); }
.pwg li.ok { color: var(--text-success); }
.pwg li.ok .tick { background: var(--text-success); border-color: var(--text-success); color: var(--text-on-action); }
.pwg .tick .ic { width: 14px; height: 14px; }
.pwg .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* OTP page: six boxes */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-8); }
.otp-box { min-height: 56px; padding: 0; text-align: center; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; caret-color: var(--stroke-focus); }
.otp-box:focus { border-color: var(--stroke-focus); }
.field.error .otp-box { border: 2px solid var(--stroke-error); background: var(--fill-error-weak); }
.link-btn:disabled { color: var(--text-weak); background: none; cursor: not-allowed; }

/* the ID card on the last step */
.idcard { margin: var(--space-16) 0 0; padding: var(--space-16); border: 1px solid var(--stroke-strong); border-radius: var(--radius-card); background: var(--fill-brand-weak); }
.idcard .idval { font-size: 28px; line-height: 36px; font-weight: var(--weight-medium); letter-spacing: 1px; color: var(--text-strong); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---------- onboarding pictures and the logo intro (Addendum 86) ----------
   One style: flat, stroke 3, round ends, brand green with neutral greys. Pictures are drawn finished.
   Motion is declared only for people who have not asked for less, and uses transform, opacity and stroke-dashoffset only. */
.ob { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ob .k { fill: var(--bg-raised); stroke: var(--text-strong); }
.ob .kw { fill: var(--stroke-brand); stroke: var(--text-strong); }
.ob .kg { fill: none; stroke: var(--stroke-strong); }
.ob .ik { fill: none; stroke: var(--text-strong); }
.ob .ga { fill: none; stroke: var(--fill-action); }
.ob .gf { fill: var(--fill-action); stroke: none; }
.ob .gw { fill: var(--stroke-brand); stroke: none; }
.ob .wf { fill: none; stroke: var(--text-on-action); }
.ob .ef { fill: var(--fill-error-strong); stroke: none; }
.ob .wf2 { fill: var(--fill-warning-strong); stroke: none; }
.ob-ring { stroke-dasharray: 1 1; stroke-dashoffset: .3; }
.ob-draw { stroke-dasharray: 1 1; }
.ob-chip-due { opacity: 0; }
.ob-pop, .ob-growx, .ob-growy { transform-box: fill-box; transform-origin: center; }
.ob-growx { transform-origin: 0 50%; }
.ob-growy { transform-origin: 50% 100%; }

@keyframes obDraw { from { stroke-dashoffset: 1; } }
@keyframes obRing { from { stroke-dashoffset: 1; } }
@keyframes obPop { from { opacity: 0; transform: scale(.8); } }
@keyframes obRise { from { opacity: 0; transform: translateY(8px); } }
@keyframes obFade { from { opacity: 0; } }
@keyframes obSlide { from { opacity: 0; transform: translateX(-24px); } }
@keyframes obGrowX { from { transform: scaleX(0); } }
@keyframes obGrowY { from { transform: scaleY(0); } }
@keyframes obChipOut { from { opacity: 1; } }
@keyframes obRest { from { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .ob-draw { animation: obDraw 180ms var(--ease-standard) backwards; }
  .ob-ring { animation: obRing 260ms var(--ease-standard) backwards; }
  .ob-pop { animation: obPop 160ms var(--ease-standard) backwards; }
  .ob-rise { animation: obRise 120ms var(--ease-standard) backwards; }
  .ob-fade { animation: obFade 140ms var(--ease-standard) backwards; }
  .ob-slide { animation: obSlide 200ms var(--ease-standard) backwards; }
  .ob-growx { animation: obGrowX 180ms var(--ease-standard) backwards; }
  .ob-growy { animation: obGrowY 180ms var(--ease-standard) backwards; }
  .ob-chip-due { animation: obChipOut 160ms var(--ease-standard) 100ms backwards; }
  .ob-chip-paid { animation: obFade 160ms var(--ease-standard) 100ms backwards; }
  .onb-wait .onb-art * { animation-play-state: paused !important; }
}
/* reduced motion: the finished picture, with a fade of 100 ms at most */
@media (prefers-reduced-motion: reduce) {
  .onb-art { animation: obRest 100ms linear; }
}

/* intro: phone, khata page, pen, then the screen shrinks into the logo tile */
.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--bg-screen); color: var(--text-weak); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.intro:focus-visible { outline: 3px solid var(--stroke-focus); outline-offset: -6px; }
.intro:hover .i-hint { color: var(--text-strong); }
.intro:active .i-hint { color: var(--text-strong); text-decoration: underline; }
.intro .i-wrap { position: relative; display: block; width: 200px; height: 260px; }
.intro .i-stage { position: absolute; inset: 0; width: 200px; height: 260px; display: none; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.intro .i-tile { position: absolute; left: 80px; top: 110px; width: 40px; height: 40px; display: block; }
.intro .i-tile .logo { display: block; }
.intro .i-hint { position: absolute; left: 0; right: 0; bottom: calc(32px + env(safe-area-inset-bottom)); text-align: center; font-size: var(--type-tiny); line-height: var(--lh-tiny); }
.intro .i-body { fill: var(--bg-sunken); stroke: var(--text-strong); }
.intro .i-sheet { fill: var(--bg-raised); stroke: none; }
.intro .i-rule { stroke: var(--stroke-strong); stroke-width: 2; opacity: .5; }
.intro .kg { stroke: var(--stroke-strong); }
.intro .ik { stroke: var(--text-strong); }
.intro .gf { fill: var(--fill-action); stroke: none; }
.intro .i-w { stroke: var(--fill-action); stroke-width: 6; stroke-dasharray: 1 1; }
.intro .i-penbody { fill: var(--text-strong); stroke: none; }
.intro .i-page, .intro .i-tile { transform-box: fill-box; transform-origin: center; }
@keyframes iIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes iWrite { from { stroke-dashoffset: 1; } }
@keyframes iPenvis { 0%, 8% { opacity: 0; } 22%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes iPen {
  0% { transform: translate(66px, 102px); } 14.1% { transform: translate(66px, 166px); } 20.7% { transform: translate(66px, 102px); }
  27.2% { transform: translate(93px, 117px); } 35.9% { transform: translate(66px, 132px); } 44.6% { transform: translate(98px, 150px); }
  51.1% { transform: translate(66px, 166px); } 57.6% { transform: translate(112px, 102px); } 71.7% { transform: translate(112px, 166px); }
  78.3% { transform: translate(144px, 102px); } 85.9% { transform: translate(114px, 134px); } 100% { transform: translate(146px, 166px); }
}
@keyframes iPhoneOut { to { opacity: 0; } }
@keyframes iPage { 0% { opacity: 1; transform: none; } 55% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(.25); } }
@keyframes iTile { 0% { opacity: 0; transform: scale(3.2); } 45% { opacity: 0; } 70% { opacity: 1; } 100% { opacity: 1; transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(.8); } }
@keyframes iOut { to { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .intro .i-stage { display: block; }
  .intro { animation: iOut 200ms var(--ease-standard) 1850ms forwards; }
  .intro.skip { animation: iOut 120ms linear forwards; }
  .intro .i-dev { animation: iIn 280ms var(--ease-standard) backwards; }
  .intro .i-w { animation: iWrite linear backwards; }
  .intro .i-w1 { animation-delay: 300ms; animation-duration: 130ms; }
  .intro .i-w2 { animation-delay: 490ms; animation-duration: 280ms; }
  .intro .i-w3 { animation-delay: 830ms; animation-duration: 130ms; }
  .intro .i-w4 { animation-delay: 1020ms; animation-duration: 200ms; }
  .intro .i-penvis { animation: iPenvis 1320ms linear forwards; }
  .intro .i-pen { animation: iPen 920ms linear 300ms both; }
  .intro .i-phone { animation: iPhoneOut 250ms var(--ease-standard) 1300ms forwards; }
  .intro .i-page { animation: iPage 550ms cubic-bezier(.77, 0, .175, 1) 1300ms forwards; }
  .intro .i-tile { animation: iTile 550ms cubic-bezier(.77, 0, .175, 1) 1300ms both; }
}
/* reduced motion: only the logo tile, a 100 ms fade in and out, then onboarding */
@media (prefers-reduced-motion: reduce) {
  .intro .i-stage { display: none; }
  .intro { animation: iOut 100ms linear 600ms forwards; }
  .intro.skip { animation: iOut 100ms linear forwards; }
  .intro .i-tile { animation: obRest 100ms linear; }
}