/* Demo-only styles for the standalone auth (demo/auth/*) and error (demo/errors/*) pages.
   Tokens only; builds on .ac-auth / .ac-fullpage from layout.css. */

/* ---- corner chrome: brand pill + language / theme pill ---------------------- */
.sa-top {
  position: absolute;
  z-index: 2;
  inset-block-start: calc(var(--ac-s-4) + var(--ac-safe-top));
  inset-inline: calc(var(--ac-s-4) + var(--ac-safe-start)) calc(var(--ac-s-4) + var(--ac-safe-end));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ac-s-3);
  pointer-events: none;
}
.sa-top > * { pointer-events: auto; }
.sa-tools { gap: 2px; padding: 4px; }
.sa-tools .ac-iconbtn { inline-size: 2.25rem; block-size: 2.25rem; }
.sa-top .ac-brand__name { display: inline; }

/* ---- auth: split layout ----------------------------------------------------- */
.auth .ac-auth__main { position: relative; padding-block: calc(var(--ac-s-20, 5rem) + var(--ac-safe-top)) calc(var(--ac-s-8) + var(--ac-safe-bottom)); }
.auth-card {
  max-inline-size: 26rem;
  padding: var(--ac-s-8);
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-r-2xl);
  background: var(--ac-surface-1);
  animation: sa-rise var(--ac-dur-4) var(--ac-ease-out) both;
}
.auth-head { display: grid; gap: var(--ac-s-2); }
.auth-head__icon {
  display: grid;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  margin-block-end: var(--ac-s-2);
  border-radius: var(--ac-r-lg);
  background: var(--ac-surface-2);
  color: var(--ac-text);
}
.auth-head__icon .ac-icon { inline-size: 1.4rem; block-size: 1.4rem; }
.auth-title { margin: 0; font-size: var(--ac-fs-2xl); font-weight: var(--ac-fw-semibold); line-height: var(--ac-lh-tight); letter-spacing: -0.01em; }
.auth-sub { margin: 0; color: var(--ac-muted); font-size: var(--ac-fs-sm); line-height: var(--ac-lh-normal); }
.auth-sub b { color: var(--ac-text); font-weight: var(--ac-fw-semibold); }
.auth-form { display: grid; gap: var(--ac-s-4); }
.auth-form .ac-field { margin: 0; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ac-s-3); flex-wrap: wrap; font-size: var(--ac-fs-sm); }
.auth-row .ac-choice { font-size: var(--ac-fs-sm); align-items: center; }
.auth-link { color: var(--ac-text); font-weight: var(--ac-fw-semibold); text-decoration: none; border-radius: var(--ac-r-xs); }
.auth-link:hover { color: var(--ac-accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-actions { display: grid; gap: var(--ac-s-3); }
.auth-submit { min-block-size: var(--ac-control-h-lg); font-size: var(--ac-fs-md); }
.auth-or { display: flex; align-items: center; gap: var(--ac-s-3); color: var(--ac-faint); font-size: var(--ac-fs-xs); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; block-size: 1px; background: var(--ac-border); }
.auth-social { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ac-s-2); }
.auth-social .ac-btn { min-block-size: 2.75rem; padding-inline: var(--ac-s-2); background: var(--ac-surface-1); border-color: var(--ac-border); }
.auth-social .ac-btn:hover { background: var(--ac-hover); }
.auth-social svg { inline-size: 1.15rem; block-size: 1.15rem; flex: none; }
.auth-social span { overflow: hidden; text-overflow: ellipsis; }
.auth-foot { margin: 0; text-align: center; color: var(--ac-muted); font-size: var(--ac-fs-sm); }
.auth-legal { margin: 0; text-align: center; color: var(--ac-faint); font-size: var(--ac-fs-2xs); }
.auth-panel[hidden] { display: none; }
.auth-success { display: grid; justify-items: center; gap: var(--ac-s-3); text-align: center; animation: sa-rise var(--ac-dur-4) var(--ac-ease-out) both; }
.auth-success__badge { display: grid; place-items: center; inline-size: 4rem; block-size: 4rem; border-radius: 50%; background: var(--ac-success-soft); color: var(--ac-success-ink); }
.auth-success__badge .ac-icon { inline-size: 1.75rem; block-size: 1.75rem; }
.auth-timer { color: var(--ac-muted); font-size: var(--ac-fs-sm); text-align: center; }
.auth-timer button { padding: 0; border: 0; background: none; color: var(--ac-text); font: inherit; font-weight: var(--ac-fw-semibold); cursor: pointer; }
.auth-timer button:disabled { color: var(--ac-faint); cursor: default; }
.auth-otp .ac-otp__box { inline-size: clamp(2.6rem, 11vw, 3.25rem); block-size: clamp(3rem, 13vw, 3.6rem); font-size: var(--ac-fs-xl); }

/* lock screen */
.auth-lock { justify-items: center; text-align: center; }
.auth-lock .ac-avatar { inline-size: 5.5rem; block-size: 5.5rem; font-size: var(--ac-fs-2xl); box-shadow: 0 0 0 6px var(--ac-surface-1), 0 0 0 7px var(--ac-border); }
.auth-lock__clock { font-size: var(--ac-fs-4xl); font-weight: var(--ac-fw-semibold); letter-spacing: -0.02em; line-height: 1; }
.auth-lock .auth-form { inline-size: 100%; text-align: start; }

/* ---- auth: showcase panel (desktop) ----------------------------------------- */
.auth .ac-auth__aside {
  background: var(--ac-gradient);
  color: #fff;
  padding: var(--ac-s-10);
  gap: var(--ac-s-8);
}
.auth .ac-auth__aside::before {
  inset: 0;
  filter: none;
  opacity: 1;
  background:
    radial-gradient(60% 50% at 85% 10%, rgb(255 255 255 / 0.28), transparent 70%),
    radial-gradient(50% 45% at 10% 95%, rgb(8 22 34 / 0.42), transparent 70%),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.06) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.06) 0 1px, transparent 1px 56px);
}
.show-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: var(--ac-s-2); padding-block: 6px; padding-inline: 6px 14px; border-radius: var(--ac-r-pill); background: rgb(255 255 255 / 0.18); border: 1px solid rgb(255 255 255 / 0.28); backdrop-filter: blur(10px); font-size: var(--ac-fs-xs); font-weight: var(--ac-fw-medium); }
.show-tag b { display: inline-grid; place-items: center; padding: 2px 8px; border-radius: var(--ac-r-pill); background: #111; color: #fff; font-weight: var(--ac-fw-semibold); }
.show-copy { display: grid; gap: var(--ac-s-3); max-inline-size: 30rem; }
.show-copy h2 { margin: 0; color: #fff; font-size: clamp(1.75rem, 2.4vw, 2.4rem); font-weight: var(--ac-fw-semibold); line-height: 1.15; letter-spacing: -0.02em; }
.show-copy p { margin: 0; color: rgb(255 255 255 / 0.82); font-size: var(--ac-fs-md); line-height: var(--ac-lh-normal); }
.show-points { display: flex; flex-wrap: wrap; gap: var(--ac-s-2); }
.show-points span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--ac-r-pill); background: rgb(0 0 0 / 0.16); font-size: var(--ac-fs-xs); }
.show-points .ac-icon { inline-size: 0.9rem; block-size: 0.9rem; }

/* floating mini dashboard built from cards */
.show-stage { position: relative; flex: 1; min-block-size: 20rem; display: grid; place-items: center; }
.mini {
  position: relative;
  inline-size: min(100%, 27rem);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 12px;
  direction: ltr;
  color: #141416;
  transform: rotate(-3deg);
  animation: sa-float 7s ease-in-out infinite;
}
.mini__card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 48px -18px rgb(80 20 0 / 0.45), 0 2px 6px rgb(0 0 0 / 0.06);
  font-size: 11px;
}
.mini__card--wide { grid-column: 1 / -1; }
.mini__card--ink { background: #141416; color: #fff; }
.mini__label { display: flex; align-items: center; justify-content: space-between; color: #8a8a90; font-weight: 500; }
.mini__card--ink .mini__label { color: #a1a1a8; }
.mini__value { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini__pill { display: inline-flex; align-items: center; gap: 3px; inline-size: max-content; padding: 2px 7px; border-radius: 99px; background: #e7f7ee; color: #12804a; font-size: 10px; font-weight: 600; }
.mini__card--ink .mini__pill { background: rgb(255 255 255 / 0.12); color: #7ee2a8; }
.mini__bars { display: flex; align-items: flex-end; gap: 6px; block-size: 74px; padding-block-start: 6px; }
.mini__bars i { flex: 1; border-radius: 6px 6px 3px 3px; background: #141416; transform-origin: bottom; animation: sa-grow 900ms var(--ac-ease-out) both; }
.mini__bars i:nth-child(odd) { background: var(--ac-accent); }
.mini__bars i:nth-child(1) { block-size: 46%; animation-delay: 120ms; }
.mini__bars i:nth-child(2) { block-size: 70%; animation-delay: 180ms; }
.mini__bars i:nth-child(3) { block-size: 38%; animation-delay: 240ms; }
.mini__bars i:nth-child(4) { block-size: 88%; animation-delay: 300ms; }
.mini__bars i:nth-child(5) { block-size: 60%; animation-delay: 360ms; }
.mini__bars i:nth-child(6) { block-size: 100%; animation-delay: 420ms; }
.mini__bars i:nth-child(7) { block-size: 52%; animation-delay: 480ms; }
.mini__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 5px; border-block-start: 1px solid #efeff1; }
.mini__row:first-of-type { border: 0; }
.mini__switch { inline-size: 26px; block-size: 15px; border-radius: 99px; background: var(--ac-accent); position: relative; flex: none; }
.mini__switch::after { content: ""; position: absolute; inset-block-start: 2px; inset-inline-end: 2px; inline-size: 11px; block-size: 11px; border-radius: 50%; background: #fff; }
.mini__switch--off { background: #dcdce0; }
.mini__switch--off::after { inset-inline: 2px auto; }
.mini__people { display: flex; }
.mini__people span { inline-size: 22px; block-size: 22px; margin-inline-start: -6px; border-radius: 50%; border: 2px solid #141416; display: grid; place-items: center; font-size: 9px; font-weight: 600; color: #fff; }
.mini__people span:first-child { margin: 0; }
.mini__people span:nth-child(1) { background: var(--ac-accent); }
.mini__people span:nth-child(2) { background: #6d6d75; }
.mini__people span:nth-child(3) { background: #3a3a40; }
.mini__ring { inline-size: 54px; block-size: 54px; }
.mini__ring circle { fill: none; stroke-width: 7; }
.mini__ring .t { stroke: rgb(255 255 255 / 0.14); }
.mini__ring .v { stroke: var(--ac-accent); stroke-linecap: round; stroke-dasharray: 113; stroke-dashoffset: 30; }
.mini__chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 99px; background: #fff; color: #141416; font-size: 11px; font-weight: 600; box-shadow: 0 18px 36px -14px rgb(80 20 0 / 0.5); animation: sa-float 6s ease-in-out -2s infinite; }
.mini__chip i { display: grid; place-items: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: #e7f7ee; color: #12804a; font-style: normal; }
.mini__chip--a { inset-block-start: -18px; inset-inline-end: -14px; transform: rotate(4deg); }
.mini__chip--b { inset-block-end: -22px; inset-inline-end: -8px; }
.mini__chip--b i { background: var(--ac-accent-soft); color: var(--ac-accent); }
.mini__chip .ac-icon { inline-size: 13px; block-size: 13px; }

/* ---- auth: phones = full-screen app ----------------------------------------- */
@media (max-width: 639.98px) {
  .auth .ac-auth__main { justify-content: flex-start; min-block-size: 100dvh; padding: calc(var(--ac-s-4) + var(--ac-safe-top)) calc(var(--ac-s-5) + var(--ac-safe-end)) 0 calc(var(--ac-s-5) + var(--ac-safe-start)); }
  .auth .sa-top { position: static; margin-block-end: var(--ac-s-8); }
  .auth-card { flex: 1; display: flex; flex-direction: column; gap: var(--ac-s-5); max-inline-size: none; padding: 0; border: 0; background: none; border-radius: 0; }
  .auth-card > .auth-form, .auth-card > .auth-panel-wrap { flex: 1; display: flex; flex-direction: column; gap: var(--ac-s-4); }
  .auth-title { font-size: var(--ac-fs-3xl); }
  .auth-form > .auth-actions { order: 99; }
  .auth-actions {
    position: sticky;
    inset-block-end: 0;
    z-index: 1;
    margin-block-start: auto;
    margin-inline: calc(-1 * var(--ac-s-5));
    padding: var(--ac-s-4) var(--ac-s-5) calc(var(--ac-s-4) + var(--ac-safe-bottom));
    background: linear-gradient(to top, var(--ac-bg) 70%, transparent);
  }
  .auth-card > .auth-foot:last-child, .auth-card > .auth-legal:last-child { padding-block-end: calc(var(--ac-s-4) + var(--ac-safe-bottom)); }
  .auth-social span { display: none; }
  .auth-lock { padding-block-start: var(--ac-s-4); }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .auth .ac-auth__main { padding-block-start: calc(var(--ac-s-24, 6rem) + var(--ac-safe-top)); }
}

/* ---- error / state pages ---------------------------------------------------- */
.err { position: relative; overflow: hidden; }
.err::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42rem 26rem at 50% 38%, var(--ac-accent-soft), transparent 70%),
    radial-gradient(circle at center, var(--ac-border) 1px, transparent 1.5px) 0 0 / 22px 22px;
  mask-image: radial-gradient(60% 55% at 50% 42%, #000 30%, transparent 80%);
}
.err-box { position: relative; z-index: 1; display: grid; justify-items: center; gap: var(--ac-s-4); max-inline-size: 32rem; animation: sa-rise var(--ac-dur-4) var(--ac-ease-out) both; }
.err-art { inline-size: min(78vw, 22rem); block-size: auto; margin-block-end: var(--ac-s-2); color: var(--ac-ink); overflow: visible; }
.err-code { display: inline-flex; align-items: center; gap: var(--ac-s-2); padding: 4px 12px; border-radius: var(--ac-r-pill); background: var(--ac-surface-1); border: 1px solid var(--ac-border); color: var(--ac-text-soft); font-size: var(--ac-fs-xs); font-weight: var(--ac-fw-semibold); letter-spacing: 0.02em; }
.err-code::before { content: ""; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--_dot, var(--ac-accent)); }
.err-code[data-tone="success"] { --_dot: var(--ac-success); }
.err-title { margin: 0; font-size: clamp(1.6rem, 4vw, 2.25rem); font-weight: var(--ac-fw-semibold); line-height: var(--ac-lh-tight); letter-spacing: -0.02em; }
.err-text { margin: 0; color: var(--ac-muted); font-size: var(--ac-fs-md); line-height: var(--ac-lh-normal); }
.err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ac-s-2); margin-block-start: var(--ac-s-2); }
.err-meta { color: var(--ac-faint); font-size: var(--ac-fs-xs); }
.err-progress { inline-size: min(100%, 20rem); display: grid; gap: var(--ac-s-2); font-size: var(--ac-fs-xs); color: var(--ac-muted); }
.err-progress .ac-spread { gap: var(--ac-s-3); }
@media (max-width: 639.98px) {
  .err-actions { inline-size: 100%; flex-direction: column; }
  .err-actions .ac-btn { inline-size: 100%; min-block-size: var(--ac-control-h-lg); }
}

/* illustration palette (inline SVG) */
.ill-ink { fill: var(--ac-ink); }
.ill-ink-s { stroke: var(--ac-ink); fill: none; }
.ill-acc { fill: var(--ac-accent); }
.ill-acc-s { stroke: var(--ac-accent); fill: none; }
.ill-card { fill: var(--ac-surface-1); stroke: var(--ac-border-strong); }
.ill-soft { fill: var(--ac-surface-2); }
.ill-line { stroke: var(--ac-border-strong); fill: none; }
.ill-paper { fill: var(--ac-surface-1); }
.ill-shadow { fill: var(--ac-ink); opacity: 0.08; }
.ill-float { animation: sa-float 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ill-float--slow { animation-duration: 8s; animation-delay: -3s; }
.ill-spin { animation: sa-spin 9s linear infinite; transform-box: fill-box; transform-origin: center; }
.ill-spin--rev { animation-direction: reverse; animation-duration: 6s; }
.ill-blink { animation: sa-blink 1.6s ease-in-out infinite; }

/* ---- micro-interactions: hover / press / focus -------------------------------- */
.auth-card { transition: box-shadow var(--ac-dur-3) var(--ac-ease), border-color var(--ac-dur-3) var(--ac-ease); }
.auth-card:focus-within { border-color: var(--ac-border-strong); box-shadow: var(--ac-shadow-lg); }
.auth-link { transition: color var(--ac-dur-1) var(--ac-ease), background-size var(--ac-dur-2) var(--ac-ease); background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; }
.auth-link:hover { text-decoration: none; background-size: 100% 1px; }
.auth-link:focus-visible, .auth-timer button:focus-visible { outline: 2px solid var(--ac-ring); outline-offset: 3px; }
.auth-social .ac-btn { transition: transform var(--ac-dur-2) var(--ac-ease), background var(--ac-dur-1), border-color var(--ac-dur-1), box-shadow var(--ac-dur-2) var(--ac-ease); }
.auth-social .ac-btn:hover { transform: translateY(var(--ac-lift, -2px)); border-color: var(--ac-border-strong); box-shadow: var(--ac-shadow-sm); }
.auth-social .ac-btn:active { transform: var(--ac-press); box-shadow: none; }
.auth-social .ac-btn svg { transition: transform var(--ac-dur-2) var(--ac-ease-spring, var(--ac-ease)); }
.auth-social .ac-btn:hover svg { transform: scale(1.12); }
.auth-submit .ac-icon { transition: transform var(--ac-dur-2) var(--ac-ease); }
.auth-submit:hover .ac-icon.ac-flip-rtl { transform: translateX(3px); }
[dir="rtl"] .auth-submit:hover .ac-icon.ac-flip-rtl { transform: scaleX(-1) translateX(3px); }
.auth-submit:active { transform: var(--ac-press); }
.auth-head__icon { transition: transform var(--ac-dur-3) var(--ac-ease-spring, var(--ac-ease)); }
.auth-card:hover .auth-head__icon { transform: rotate(-8deg) scale(1.06); }
.auth .ac-input-group:focus-within .ac-input-group__affix .ac-icon { color: var(--ac-text); transition: color var(--ac-dur-1); }
.ac-otp__box { transition: transform var(--ac-dur-2) var(--ac-ease-spring, var(--ac-ease)), box-shadow var(--ac-dur-1); }
.ac-otp__box:focus { transform: translateY(-2px); }
.mini__card { transition: transform var(--ac-dur-3) var(--ac-ease), box-shadow var(--ac-dur-3) var(--ac-ease); }
.mini__card:hover { transform: translateY(-4px) rotate(1deg); box-shadow: 0 30px 60px -20px rgb(80 20 0 / 0.55); }
.show-points span { transition: background var(--ac-dur-1); }
.show-points span:hover { background: rgb(0 0 0 / 0.28); }
.err-actions .ac-btn { transition: transform var(--ac-dur-2) var(--ac-ease), box-shadow var(--ac-dur-2) var(--ac-ease); }
.err-actions .ac-btn:hover { transform: translateY(-2px); box-shadow: var(--ac-shadow-md); }
.err-actions .ac-btn:active { transform: var(--ac-press); box-shadow: none; }
.err-actions .ac-btn:hover .ac-icon { animation: sa-nudge 600ms var(--ac-ease); }
.err-art { transition: transform var(--ac-dur-4) var(--ac-ease); }
.err-box:hover .err-art { transform: scale(1.02); }
.sa-top .ac-brand { transition: transform var(--ac-dur-2) var(--ac-ease), box-shadow var(--ac-dur-2); }
.sa-top .ac-brand:hover { box-shadow: var(--ac-shadow-md); }
.sa-top .ac-brand:hover .ac-brand__mark { transform: rotate(-12deg); }
.sa-top .ac-brand__mark { transition: transform var(--ac-dur-3) var(--ac-ease-spring, var(--ac-ease)); }
.sa-top .ac-iconbtn:hover .ac-icon { transform: rotate(-20deg); transition: transform var(--ac-dur-3) var(--ac-ease); }

@keyframes sa-nudge { 30% { transform: rotate(-14deg) scale(1.1); } 60% { transform: rotate(8deg); } }
@keyframes sa-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes sa-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes sa-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes sa-spin { to { rotate: 360deg; } }
@keyframes sa-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
/* ---- motion policy: "reduced" keeps every fade / colour change, drops travel, scale, tilt and loops of movement ---- */
@keyframes sa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sa-breathe-o { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }
:root[data-motion="reduced"] :is(.auth-card, .err-box, .auth-success) { animation-name: sa-fade; }
:root[data-motion="reduced"] :is(.mini, .mini__chip, .ill-float, .ill-swing) { animation: none; }
:root[data-motion="reduced"] .mini__bars i { animation-name: sa-fade; }
:root[data-motion="reduced"] :is(.mini__card:hover, .auth-social .ac-btn:hover, .err-actions .ac-btn:hover) { transform: none; }

/* ---- brand mark: disc springs in, the "A" draws itself -------------------------------------------- */
.sa-ready .sa-top .ac-brand__mark { animation: sa-mark-in 700ms var(--ac-spring-bounce, var(--ac-ease-spring)) 80ms backwards; }
.sa-ready .sa-top .ac-brand__mark path { stroke-dasharray: 1; animation: sa-draw 620ms cubic-bezier(0.65, 0, 0.35, 1) 320ms backwards; }
.sa-ready .sa-top .ac-brand__mark path + path { animation-delay: 620ms; }
.sa-ready .sa-top .ac-brand__name { animation: sa-name-in 520ms var(--ac-ease-out) 260ms backwards; }
@keyframes sa-mark-in { from { opacity: 0; transform: rotate(calc(-120deg * var(--ac-travel, 1))) scale(calc(1 - 0.5 * var(--ac-travel, 1))); } }
@keyframes sa-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sa-name-in { from { opacity: 0; transform: translateY(calc(4px * var(--ac-travel, 1))); } }

/* ---- showcase: pointer tilt (vars written by standalone.js) ------------------------------------- */
.mini { transform: rotate(-3deg) perspective(1100px) rotateX(calc(var(--py, 0) * -7deg)) rotateY(calc(var(--px, 0) * 9deg)); }
.mini__card { translate: calc(var(--px, 0) * 6px) calc(var(--py, 0) * 5px); }
.mini__card--ink { translate: calc(var(--px, 0) * 11px) calc(var(--py, 0) * 9px); }
.mini__card--wide { translate: calc(var(--px, 0) * 3px) calc(var(--py, 0) * 2px); }

/* ---- focus: the label lifts and takes the accent ink ----------------------------------------------- */
.auth-form .ac-label { display: inline-block; transition: color var(--ac-dur-2) var(--ac-ease), transform var(--ac-dur-3) var(--ac-ease-out); transform-origin: 100% 50%; }
.auth-form .ac-label:dir(ltr) { transform-origin: 0% 50%; }
.auth-form .ac-field:focus-within > .ac-label, .auth-form .ac-field:focus-within > .ac-spread > .ac-label { color: var(--ac-accent-ink); transform: translateY(calc(-2px * var(--ac-travel, 1))) scale(calc(1 - 0.03 * var(--ac-travel, 1))); }
.auth-form .ac-field[data-invalid] > .ac-label, .auth-form .ac-field[data-invalid] > .ac-spread > .ac-label { color: var(--ac-danger-ink); }

/* ---- submit button morph: pill -> spinner circle -> green check ------------------------------------ */
.auth-actions { justify-items: center; }
.auth-submit { position: relative; inline-size: 100%; transition: inline-size 420ms var(--ac-ease-drawer, cubic-bezier(0.32, 0.72, 0, 1)), padding 420ms var(--ac-ease-drawer, ease), background-color var(--ac-dur-3) var(--ac-ease), color var(--ac-dur-2), transform var(--ac-dur-0) var(--ac-ease-out); }
.auth-submit[data-state] { inline-size: var(--ac-control-h-lg); padding-inline: 0; pointer-events: none; opacity: 1 !important; filter: none !important; }
.auth-submit[data-state="loading"] { background: var(--ac-ink) !important; color: var(--ac-ink-contrast) !important; }
.auth-submit[data-state] > :not(.auth-morph) { opacity: 0; transition: opacity var(--ac-dur-1); }
.auth-submit[aria-busy="true"]::after { display: none; }
.auth-submit[aria-busy="true"] { color: var(--ac-ink-contrast) !important; }
.auth-morph { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.auth-submit > .auth-morph, .auth-submit[aria-busy="true"] > .auth-morph { visibility: visible; filter: none; transform: none; opacity: 1; }
.auth-morph svg { grid-area: 1 / 1; inline-size: 1.35rem; block-size: 1.35rem; fill: none; stroke: currentColor; stroke-linecap: round; opacity: 0; transition: opacity var(--ac-dur-2) var(--ac-ease); }
.auth-morph__spin circle { stroke-width: 2.6; stroke-dasharray: 0.62 1; }
.auth-morph__check path { stroke-width: 2.8; stroke-linejoin: round; stroke-dasharray: 1; }
.auth-submit[data-state="loading"] .auth-morph__spin { opacity: 1; animation: ac-spin 700ms linear infinite; transition-delay: 160ms; }
.auth-submit[data-state="done"] { background: var(--ac-success) !important; color: #fff !important; border-color: transparent; }
.auth-submit[data-state="done"] .auth-morph__check { opacity: 1; }

/* ---- OTP extras: resend ring + demo hint ------------------------------------------------------------- */
.auth-timer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 4px; }
.auth-timer [data-timer-wait]:not([hidden]) { display: inline-flex; align-items: center; gap: 4px; }
.auth-timer__dial { display: inline-grid; place-items: center; inline-size: 1.35rem; block-size: 1.35rem; margin-inline-end: 4px; }
.auth-timer__ring { inline-size: 100%; block-size: 100%; transform: rotate(-90deg); }
.auth-timer__ring circle { fill: none; stroke-width: 4; }
.auth-timer__ring .t { stroke: var(--ac-surface-3); }
.auth-timer__ring .v { stroke: var(--ac-accent); stroke-linecap: round; stroke-dasharray: 1; }
.auth-timer[data-state="ready"] button { color: var(--ac-accent-ink); }
.auth-hint { margin: 0; text-align: center; color: var(--ac-faint); font-size: var(--ac-fs-xs); }

/* ---- register: animated step progress -------------------------------------------------------------- */
.auth-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ac-s-2); margin: 0; padding: 0; list-style: none; }
.auth-steps__step { display: flex; align-items: center; gap: var(--ac-s-2); min-inline-size: 0; color: var(--ac-faint); font-size: var(--ac-fs-xs); font-weight: var(--ac-fw-medium); transition: color var(--ac-dur-3) var(--ac-ease); }
.auth-steps__step > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-steps__dot { position: relative; flex: none; display: grid; place-items: center; inline-size: 1.6rem; block-size: 1.6rem; border-radius: 50%; background: var(--ac-surface-3); color: var(--ac-muted); font-size: var(--ac-fs-2xs); font-weight: var(--ac-fw-semibold); transition: background-color var(--ac-dur-3) var(--ac-ease), color var(--ac-dur-3); }
.auth-steps__step[data-state="current"] { color: var(--ac-text); }
.auth-steps__step[data-state="current"] .auth-steps__dot { background: var(--ac-ink); color: var(--ac-ink-contrast); }
.auth-steps__step[data-state="current"] .auth-steps__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ac-ink); opacity: 0.25; animation: sa-ping 1.8s var(--ac-ease-out) infinite; }
.auth-steps__step[data-state="done"] { color: var(--ac-success-ink); }
.auth-steps__step[data-state="done"] .auth-steps__dot { background: var(--ac-success); color: #fff; animation: sa-pop 520ms var(--ac-spring-bounce, var(--ac-ease-spring)); }
.auth-steps__bar { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--ac-s-2); color: var(--ac-muted); font-size: var(--ac-fs-2xs); }
.auth-steps__track { position: relative; flex: 1; block-size: 4px; border-radius: 4px; background: var(--ac-surface-3); overflow: hidden; }
.auth-steps__fill { position: absolute; inset: 0; border-radius: inherit; background: var(--ac-accent); transform: scaleX(var(--p, 0)); transform-origin: 0% 50%; transition: transform var(--ac-spring-bounce-dur, 600ms) var(--ac-spring-bounce, var(--ac-ease-spring)), opacity var(--ac-dur-3); }
.auth-steps__fill:dir(rtl) { transform-origin: 100% 50%; }
.auth-steps__bar bdi { min-inline-size: 2.5rem; text-align: end; }
@keyframes sa-ping { 0% { transform: scale(calc(1 - 0.25 * var(--ac-travel, 1))); opacity: 0.45; } 100% { transform: scale(calc(1 + 0.35 * var(--ac-travel, 1))); opacity: 0; } }
@keyframes sa-pop { 40% { transform: scale(calc(1 + 0.25 * var(--ac-travel, 1))); } }

/* ---- forgot: envelope ---------------------------------------------------------------------------- */
.auth-envelope { position: relative; overflow: visible; background: var(--ac-accent-soft); color: var(--ac-accent-ink); }
.auth-envelope__svg { inline-size: 2.1rem; block-size: 2.1rem; overflow: visible; }
.auth-envelope__body, .auth-envelope__flap, .auth-envelope__letter { transform-box: fill-box; }
.auth-envelope__body { transform-origin: 50% 50%; }
.auth-envelope__flap { transform-origin: 50% 0; }
.auth-envelope__letter { fill: var(--ac-surface-1); stroke: currentColor; stroke-width: 2; }
.auth-envelope__lines { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: 0.55; }
.auth-envelope__back { fill: var(--ac-accent); stroke: var(--ac-accent); stroke-width: 2; stroke-linejoin: round; }
.auth-envelope__flap { fill: color-mix(in srgb, var(--ac-accent) 78%, #000); stroke: var(--ac-accent); stroke-width: 2; stroke-linejoin: round; opacity: 0; }
.auth-envelope__trail { position: absolute; inset-block-start: 38%; inset-inline-end: 100%; display: grid; gap: 4px; justify-items: end; pointer-events: none; }
.auth-envelope__trail i { display: block; inline-size: 14px; block-size: 2px; border-radius: 2px; background: var(--ac-accent); opacity: 0; }
.auth-envelope__trail i:nth-child(2) { inline-size: 9px; }
.auth-envelope.is-sent .auth-envelope__body { opacity: 0; }
.auth-success__tick { inline-size: 1.9rem; block-size: 1.9rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-success__tick path { stroke-dasharray: 1; }

/* ---- lock: breathing ring + lock badge that opens ------------------------------------------------- */
.auth-lock__avatar { position: relative; display: inline-grid; place-items: center; }
.auth-lock__avatar::before, .auth-lock__avatar::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--ac-accent); opacity: 0.4; animation: sa-breathe 3.2s ease-in-out infinite; pointer-events: none; }
.auth-lock__avatar::after { animation-delay: -1.6s; }
.auth-lock__avatar.is-unlocked::before, .auth-lock__avatar.is-unlocked::after { border-color: var(--ac-success); animation: sa-unlock-ring 700ms var(--ac-ease-out) forwards; }
.auth-lock__avatar.is-unlocked::after { animation-delay: 120ms; }
.auth-lockbadge { position: absolute; inset-block-end: -4px; inset-inline-end: -4px; display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; border-radius: 50%; background: var(--ac-ink); color: var(--ac-ink-contrast); box-shadow: 0 0 0 4px var(--ac-surface-1); transition: background-color var(--ac-dur-3) var(--ac-ease); }
.auth-lockbadge svg { inline-size: 1rem; block-size: 1rem; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.auth-lockbadge__body { fill: currentColor; }
.auth-lockbadge__hole { fill: var(--ac-ink); stroke: none; transition: fill var(--ac-dur-3); }
.auth-lockbadge__shackle { transform-box: fill-box; transform-origin: 100% 100%; transition: opacity var(--ac-dur-2); }
.auth-lockbadge.is-open { background: var(--ac-success); }
.auth-lockbadge.is-open .auth-lockbadge__hole { fill: var(--ac-success); }
:root[data-motion="reduced"] .auth-lockbadge.is-open .auth-lockbadge__shackle { opacity: 0.3; }
@keyframes sa-breathe { 0%, 100% { transform: scale(1); opacity: 0.45; } 50% { transform: scale(calc(1 + 0.12 * var(--ac-travel, 1))); opacity: 0.05; } }
@keyframes sa-unlock-ring { to { transform: scale(calc(1 + 0.4 * var(--ac-travel, 1))); opacity: 0; } }
:root[data-motion="reduced"] .auth-lock__avatar::before, :root[data-motion="reduced"] .auth-lock__avatar::after { animation-name: sa-breathe-o; }

/* ---- error illustrations ----------------------------------------------------------------------- */
.ill-bob { animation: sa-bob 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ill-bob--2 { animation-delay: -1.1s; animation-duration: 3.9s; }
.ill-bob--3 { animation-delay: -2.2s; animation-duration: 4.3s; }
.ill-wobble { animation: sa-wobble 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ill-swing { animation: sa-swing 3s ease-in-out infinite; transform-box: view-box; }
.ill-dots circle { animation: sa-dot 1.4s ease-in-out infinite; }
.ill-dots circle:nth-child(2) { animation-delay: 0.2s; }
.ill-dots circle:nth-child(3) { animation-delay: 0.4s; }
.err-box.is-retrying .ill-dots circle { animation-duration: 0.7s; }
.ill-spark { animation: sa-blink 2.2s ease-in-out infinite; }
.ill-spark--2 { animation-delay: -0.8s; }
@keyframes sa-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(-3deg); } }
@keyframes sa-wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(18deg); } 35% { transform: rotate(-10deg); } 50% { transform: rotate(6deg); } 62% { transform: rotate(0); } }
@keyframes sa-swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes sa-dot { 0%, 100% { opacity: 0.2; } 40% { opacity: 1; } }
/* reduced: movement loops become gentle opacity pulses; lights and dots keep blinking */
:root[data-motion="reduced"] :is(.ill-wobble, .ill-bob) { animation: sa-breathe-o 3s ease-in-out infinite; }
:root[data-motion="reduced"] .ill-spin { animation: sa-breathe-o 4s ease-in-out infinite; }


.ill-swing--crane { transform-origin: 100px 26px; }

/* Air in dark mode: the showcase panel uses the Night navy family so white text stays AA */
:root[data-theme="dark"]:where(:not([data-accent]), [data-accent="air"]) .auth .ac-auth__aside { background: linear-gradient(150deg, #0b7f8a 0%, #0f3a4a 55%, #0f1b28 100%); }
