/*!
 * POPNIX AUTH kit.css: the shared component kit of every page at auth.pop.co.th (login steps, account app, errors).
 * Same language as POPNIX Cloud (cloud.css + cloud-kit.css, palette v2): ONE flat accent (POP cobalt, amber in the
 * staff realm via .px-staff), ink neutrals, FC Vision 400/500/700 at a 15px root, one radius scale, house easing.
 *
 * Load order (no build step):
 *   fonts/fc-vision/font.css → css/tokens.css → css/icons.css → css/kit.css → the page's own CSS
 *   js/prepaint.js first in <head> (sets <html data-theme>), js/kit.js deferred.
 *
 * Rules: tokens only (var(--px-*)), no raw hex here · no gradient on a control · no coloured glow · no coloured bars
 * (a stripe beside, under or over anything): grey hairlines (var(--px-border*)) only · transform/opacity motion only,
 * every animation stops under prefers-reduced-motion and while the tab is hidden (html.px-paused, set by kit.js).
 * Prefix px- is reserved for this file; a page's own CSS uses its own prefix.
 *
 * Contents (markup sketch above each section):
 *    1 base ......... type, links, focus ring, selection, .px-sr (screen reader only), .px-num
 *    2 top bar ...... .px-top · .px-brand · .px-tools · .px-icon-btn · .px-theme-toggle
 *    3 segmented .... .px-seg (language switch, filters): links or buttons, the current one raised
 *    4 card ......... .px-card · .px-chip (the app the person is going to) · .px-title · .px-sub (a fact, never a tagline)
 *    5 buttons ...... .px-btn + .is-primary | .is-secondary | .is-ghost | .is-danger | .is-ink | .is-google ·
 *                     .is-block · .is-sm · .is-busy · .px-actions (a row of buttons)
 *    6 forms ........ .px-field · .px-label · .px-input · .px-input-wrap (.has-icon, .has-reveal) · .px-input-icon ·
 *                     .px-reveal (password show/hide) · .px-count (a live readout such as 7/10) · .px-error · .px-check
 *    7 callouts ..... .px-alert + .is-error | .is-warning | .is-success | .is-info (soft tint + icon, no stripe)
 *    8 divider ...... .px-divider ("or")
 *    9 tags ......... .px-tag + .is-accent | .is-ok | .is-warn | .is-crit · .px-led
 *   10 skeleton ..... .px-skel · .px-skel-line
 *   11 links row .... .px-links (secondary links under a form)
 *   12 footer ....... .px-foot
 *   13 OTP boxes .... input[data-px-otp] → .px-otp (six boxes drawn over the one real input; kit.js)
 *   14 motion ....... .px-rise (entrance, --i stagger) · .px-shake · html.px-paused · html.px-theme-fade · reduced motion
 * Behaviour (theme toggle, password reveal, submit once, OTP boxes, copy, live readout): js/kit.js.
 */

/* ======================================================================================================= 1. base */
/* <html lang="th" data-theme="light"> … <body> */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--px-font);
    font-weight: 400;
    line-height: 1.6;
    color: var(--px-text);
    background: var(--px-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.3; color: var(--px-text); }
p { margin: 0 0 .85rem; }
b, strong { font-weight: 700; }
small { font-size: .87em; }
a { color: var(--px-accent-text); text-decoration: none; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(var(--px-accent-rgb), .22); }
:focus { outline: none; }
:focus-visible { outline: 2px solid rgba(var(--px-accent-rgb), .9); outline-offset: 2px; border-radius: var(--px-r-sm); }
.px-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.px-num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.fa-duotone { --fa-secondary-opacity: .4; }

/* ==================================================================================================== 2. top bar */
/* <header class="px-top">
 *   <a class="px-brand" href="…"><img src="…/img/mark.svg" alt="" width="32" height="32"><b>POPNIX</b> <span>Account</span></a>
 *   <div class="px-tools"><nav class="px-seg">…</nav>
 *     <button type="button" class="px-icon-btn px-theme-toggle" data-px-theme-toggle data-label-light="…" data-label-dark="…">
 *       <i class="fa-duotone fa-solid fa-moon is-to-dark"></i><i class="fa-duotone fa-solid fa-sun-bright is-to-light"></i></button></div>
 * </header> */
.px-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; }
.px-brand { display: inline-flex; align-items: center; gap: .65rem; min-width: 0; color: var(--px-text); font-size: 1.15rem; line-height: 1.1; white-space: nowrap; }
.px-brand:hover { text-decoration: none; color: var(--px-text); }
.px-brand img { display: block; width: 32px; height: 32px; border-radius: 8px; flex: none; }
.px-brand b { font-weight: 700; }
.px-brand span { font-weight: 700; color: var(--px-accent-text); }
.px-tools { display: flex; align-items: center; gap: 10px; }
.px-icon-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0;
    border: 1px solid var(--px-border); border-radius: 50%; background: var(--px-surface); color: var(--px-text-2); line-height: 1;
    transition: background-color var(--px-dur-micro) var(--px-ease), color var(--px-dur-micro) var(--px-ease), transform var(--px-dur-micro) var(--px-ease);
}
.px-icon-btn:hover { background: var(--px-surface-2); color: var(--px-text); }
.px-icon-btn:active { transform: scale(.94); }
.px-icon-btn:focus-visible { outline: none; box-shadow: var(--px-ring); }
.px-icon-btn i { line-height: 1; }
/* the theme toggle shows where a click goes: a moon in light, a sun in dark */
.px-theme-toggle .is-to-light, [data-theme="dark"] .px-theme-toggle .is-to-dark { display: none; }
[data-theme="dark"] .px-theme-toggle .is-to-light { display: inline-block; }

/* ================================================================================================= 3. segmented */
/* <nav class="px-seg" aria-label="…"><a href="…" aria-current="true" lang="th">ไทย</a><a href="…" lang="en">EN</a></nav>
 * buttons work too: <div class="px-seg" role="group"><button type="button" aria-pressed="true">…</button>…</div> */
.px-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--px-r-pill); background: var(--px-surface-3); border: 1px solid var(--px-border); }
.px-seg > a, .px-seg > button {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem; height: 28px; min-width: 40px; padding: 0 10px;
    border: 0; border-radius: var(--px-r-pill); background: transparent; color: var(--px-muted); font-size: .85rem; font-weight: 500; line-height: 1;
    white-space: nowrap; text-decoration: none;
    transition: background-color var(--px-dur-micro) var(--px-ease), color var(--px-dur-micro) var(--px-ease), box-shadow var(--px-dur-micro) var(--px-ease);
}
.px-seg > a:hover, .px-seg > button:hover { color: var(--px-text); text-decoration: none; }
.px-seg > [aria-current="true"], .px-seg > [aria-pressed="true"] { background: var(--px-surface); color: var(--px-text); font-weight: 700; box-shadow: var(--px-shadow-xs); }
.px-seg > a:focus-visible, .px-seg > button:focus-visible { outline: none; box-shadow: var(--px-ring); }

/* ====================================================================================================== 4. card */
/* <section class="px-card">
 *   <span class="px-chip"><i class="fa-duotone fa-solid fa-plane-departure"></i><span>POPNIX IDC Portal</span></span>
 *   <h1 class="px-title">เข้าสู่ระบบ</h1> <p class="px-sub">a fact only: the address a code went to</p> …
 * </section> */
.px-card { position: relative; background: var(--px-surface); color: var(--px-text-2); border-radius: var(--px-r-xl); box-shadow: var(--px-shadow-lg); padding: 32px; }
[data-theme="dark"] .px-card { box-shadow: var(--px-shadow-lg), inset 0 0 0 1px var(--px-border); }
.px-chip {
    display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; height: 28px; padding: 0 .75rem 0 .6rem;
    border-radius: var(--px-r-pill); background: var(--px-surface-3); color: var(--px-text-2); font-size: .86rem; font-weight: 500; line-height: 1;
}
.px-chip > i { flex: none; color: var(--px-accent-text); }
.px-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.px-title { margin: 0 0 1.25rem; font-size: 1.6rem; font-weight: 700; line-height: 1.25; color: var(--px-text); text-wrap: balance; overflow-wrap: anywhere; }
.px-chip + .px-title { margin-top: 1rem; }
.px-sub { margin: -.85rem 0 1.25rem; color: var(--px-text-2); font-weight: 500; overflow-wrap: anywhere; }
.px-text { margin: 0 0 1rem; color: var(--px-text-2); line-height: 1.6; overflow-wrap: anywhere; }
.px-text b { color: var(--px-text); }

/* =================================================================================================== 5. buttons */
/* <button class="px-btn is-primary is-block" type="submit"><span>เข้าสู่ระบบ</span><i class="fa-solid fa-arrow-right"></i></button>
 * <a class="px-btn is-google is-block" href="…"><svg class="px-brand-g">…</svg><span>เข้าสู่ระบบด้วย Google</span></a>
 * <div class="px-actions"><button class="px-btn is-primary">…</button><button class="px-btn is-secondary">…</button></div> */
.px-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: var(--px-control-h); padding: .5rem 1.15rem;
    border: 1px solid transparent; border-radius: var(--px-r-md); background: var(--px-surface); color: var(--px-text-2);
    font-family: inherit; font-size: 1rem; font-weight: 500; line-height: 1.25; text-align: center; text-decoration: none; white-space: nowrap;
    cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--px-dur-micro) var(--px-ease), border-color var(--px-dur-micro) var(--px-ease),
                color var(--px-dur-micro) var(--px-ease), box-shadow var(--px-dur-micro) var(--px-ease), transform var(--px-dur-micro) var(--px-ease);
}
.px-btn:hover { text-decoration: none; }
.px-btn:active { transform: scale(.98); }
.px-btn:focus-visible { outline: none; box-shadow: var(--px-ring); }
.px-btn i, .px-btn svg { flex: none; line-height: 1; }
.px-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.px-btn[disabled], .px-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.px-btn.is-block { display: flex; width: 100%; }
.px-btn.is-sm { min-height: var(--px-control-h-sm); padding: .3rem .8rem; font-size: .9rem; gap: .4rem; }

.px-btn.is-primary { background: var(--px-accent); border-color: var(--px-accent); color: var(--px-on-accent); }
.px-btn.is-primary:hover { background: var(--px-accent-text); border-color: var(--px-accent-text); color: var(--px-on-accent); }
.px-btn.is-primary:active { background: var(--px-accent-deep); border-color: var(--px-accent-deep); }
[data-theme="dark"] .px-btn.is-primary { background: var(--px-accent-deep); border-color: var(--px-accent-deep); }
[data-theme="dark"] .px-btn.is-primary:hover { background: var(--px-accent-deep); border-color: var(--px-accent-deep); filter: brightness(1.1); }
.px-btn.is-primary i { transition: transform .25s var(--px-ease); }
.px-btn.is-primary:hover .fa-arrow-right { transform: translateX(3px); }

.px-btn.is-secondary { background: var(--px-surface); border-color: var(--px-border-strong); color: var(--px-text-2); box-shadow: var(--px-shadow-xs); }
.px-btn.is-secondary:hover { background: var(--px-surface-2); border-color: var(--px-input-border); color: var(--px-text); }
.px-btn.is-secondary:active { background: var(--px-surface-3); }

.px-btn.is-ghost { background: transparent; color: var(--px-text-2); }
.px-btn.is-ghost:hover { background: var(--px-hover); color: var(--px-text); }
.px-btn.is-ghost:active { background: var(--px-press); }

.px-btn.is-danger { background: var(--px-crit-text); border-color: var(--px-crit-text); color: var(--px-on-accent); }
.px-btn.is-danger:hover { background: var(--px-crit); border-color: var(--px-crit); }
[data-theme="dark"] .px-btn.is-danger { background: var(--px-crit); border-color: var(--px-crit); }
[data-theme="dark"] .px-btn.is-danger:hover { background: var(--px-crit-text); border-color: var(--px-crit-text); color: var(--px-bg); }

/* ink in light, paper in dark: the distinct second path (Microsoft, POPNIX staff), like POPNIX Cloud's .btn-sso */
.px-btn.is-ink { background: var(--px-text); border-color: var(--px-text); color: var(--px-surface); font-weight: 700; }
.px-btn.is-ink:hover { background: var(--px-text-2); border-color: var(--px-text-2); color: var(--px-surface); }

/* Google: Google's own colours (tokens.css), the page font, the G mark 20px, 12px before it and 10px after it */
.px-btn.is-google { gap: 10px; padding-left: 12px; background: var(--px-google-bg); border-color: var(--px-google-border); color: var(--px-google-text); }
.px-btn.is-google:hover { background: var(--px-google-bg-hover); color: var(--px-google-text); }
.px-brand-g, .px-brand-ms { width: 20px; height: 20px; flex: none; }

/* busy: a small ring replaces the trailing icon; the label stays */
.px-btn.is-busy { pointer-events: none; }
.px-btn.is-busy > i { display: none; }
.px-btn.is-busy::after { content: ""; width: 1em; height: 1em; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: px-spin .7s linear infinite; }

.px-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.25rem; }
.px-actions > .px-btn { flex: 1 1 0; }
.px-actions.is-stack { flex-direction: column; }

/* ===================================================================================================== 6. forms */
/* <div class="px-field">
 *   <div class="px-label"><label for="password">รหัสผ่าน</label><a href="…">ลืมรหัสผ่าน</a></div>
 *   <div class="px-input-wrap has-icon has-reveal">
 *     <i class="px-input-icon fa-duotone fa-solid fa-lock-keyhole" aria-hidden="true"></i>
 *     <input class="px-input" id="password" name="password" type="password" autocomplete="current-password">
 *     <button type="button" class="px-reveal" data-px-reveal aria-controls="password" aria-pressed="false" aria-label="…" data-label-show="…" data-label-hide="…">
 *       <i class="fa-duotone fa-solid fa-eye is-show"></i><i class="fa-duotone fa-solid fa-eye-slash is-hide"></i></button>
 *   </div>
 *   <p class="px-error" id="password-error"><i class="fa-solid fa-circle-exclamation"></i><span>…</span></p>
 * </div> */
.px-field { margin: 0 0 1.05rem; }
.px-label { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin: 0 0 .4rem; }
.px-label > label, .px-label > span:first-child { font-weight: 500; font-size: .93rem; color: var(--px-text-2); line-height: 1.4; }
.px-label > a { font-size: .9rem; font-weight: 500; white-space: nowrap; }
.px-input {
    display: block; width: 100%; min-height: var(--px-control-h); padding: .55rem .85rem; margin: 0;
    font-family: inherit; font-size: 1rem; line-height: 1.4; color: var(--px-text);
    background: var(--px-surface); border: 1px solid var(--px-input-border); border-radius: var(--px-r-md);
    box-shadow: inset 0 1px 1px rgba(18, 22, 28, .03); -webkit-appearance: none; appearance: none;
    transition: border-color var(--px-dur-micro) var(--px-ease), box-shadow var(--px-dur-micro) var(--px-ease), background-color var(--px-dur-micro) var(--px-ease);
}
[data-theme="dark"] .px-input { background: var(--px-surface-2); box-shadow: none; }
.px-input::placeholder { color: var(--px-placeholder); opacity: 1; }
.px-input:hover:not(:disabled):not(:focus):not([readonly]) { border-color: var(--px-muted); }
.px-input:focus { outline: none; border-color: var(--px-accent); box-shadow: var(--px-ring); }
.px-input[aria-invalid="true"] { border-color: var(--px-crit); }
.px-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(var(--px-crit-rgb), .25); }
.px-input:disabled, .px-input[readonly] { background: var(--px-surface-2); color: var(--px-muted); border-color: var(--px-border-strong); }
textarea.px-input { min-height: 6rem; line-height: 1.55; resize: vertical; }
select.px-input { padding-right: 2.4rem; cursor: pointer; }
select.px-input[multiple] { padding-right: .85rem; }
.px-input-wrap { position: relative; }
.px-input-wrap.has-icon > .px-input { padding-left: 2.55rem; }
.px-input-wrap.has-reveal > .px-input { padding-right: 3.1rem; }
.px-input-icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--px-muted); pointer-events: none; font-size: .95rem; line-height: 1; }
.px-input-wrap.is-select > .px-input-icon { left: auto; right: .95rem; font-size: .75rem; }
.px-reveal {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center;
    width: 2.45rem; height: 2.45rem; padding: 0; border: 0; border-radius: calc(var(--px-r-md) - 2px); background: transparent; color: var(--px-muted); line-height: 1;
    transition: background-color var(--px-dur-micro) var(--px-ease), color var(--px-dur-micro) var(--px-ease);
}
.px-reveal:hover { background: var(--px-hover); color: var(--px-text); }
.px-reveal:focus-visible { outline: none; box-shadow: var(--px-ring); }
.px-reveal .is-hide, .px-reveal[aria-pressed="true"] .is-show { display: none; }
.px-reveal[aria-pressed="true"] .is-hide { display: inline-block; }
.px-count { display: block; margin-top: .35rem; font-size: .86rem; color: var(--px-muted); font-variant-numeric: tabular-nums; text-align: right; }
.px-count:empty { display: none; }
.px-error { display: flex; align-items: flex-start; gap: .45rem; margin: .45rem 0 0; color: var(--px-crit-text); font-size: .9rem; line-height: 1.45; }
.px-error > i { margin-top: .22rem; font-size: .85em; flex: none; }
.px-check { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 1rem; color: var(--px-text-2); font-size: .95rem; line-height: 1.45; cursor: pointer; }
.px-check input { flex: none; width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--px-accent); cursor: pointer; }

/* ================================================================================================== 7. callouts */
/* <div class="px-alert is-error" role="alert"><i class="fa-duotone fa-solid fa-circle-exclamation" aria-hidden="true"></i><div>…</div></div> */
.px-alert {
    --al-soft: var(--px-info-soft); --al-text: var(--px-info-text);
    display: flex; align-items: flex-start; gap: .7rem; margin: 0 0 1.15rem; padding: .8rem .95rem;
    border-radius: var(--px-r-md); background: var(--al-soft); color: var(--px-text); font-size: .95rem; line-height: 1.5;
}
.px-alert > i { flex: none; margin-top: .22rem; color: var(--al-text); font-size: 1rem; line-height: 1; }
.px-alert > div { min-width: 0; overflow-wrap: anywhere; }
.px-alert p { margin: 0; }
.px-alert p + p { margin-top: .35rem; }
.px-alert.is-error { --al-soft: var(--px-crit-soft); --al-text: var(--px-crit-text); }
.px-alert.is-warning { --al-soft: var(--px-warn-soft); --al-text: var(--px-warn-text); }
.px-alert.is-success { --al-soft: var(--px-ok-soft); --al-text: var(--px-ok-text); }
.px-alert.is-info { --al-soft: var(--px-info-soft); --al-text: var(--px-info-text); }

/* =================================================================================================== 8. divider */
/* <div class="px-divider"><span>หรือ</span></div> */
.px-divider { display: flex; align-items: center; gap: 12px; margin: 1.35rem 0; color: var(--px-muted); font-size: .88rem; line-height: 1.2; }
.px-divider::before, .px-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--px-border); }

/* ====================================================================================================== 9. tags */
/* <span class="px-tag is-accent">TOTP</span> · <span class="px-led is-ok"></span> */
.px-tag { display: inline-flex; align-items: center; gap: .35rem; height: 24px; padding: 0 .55rem; border-radius: var(--px-r-sm); background: var(--px-surface-3); color: var(--px-text-2); font-size: .84rem; font-weight: 500; line-height: 1; white-space: nowrap; }
.px-tag.is-accent { background: var(--px-accent-soft); color: var(--px-accent-text); }
.px-tag.is-ok { background: var(--px-ok-soft); color: var(--px-ok-text); }
.px-tag.is-warn { background: var(--px-warn-soft); color: var(--px-warn-text); }
.px-tag.is-crit { background: var(--px-crit-soft); color: var(--px-crit-text); }
.px-led { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--px-faint); }
.px-led.is-ok { background: var(--px-ok); }
.px-led.is-warn { background: var(--px-warn); }
.px-led.is-crit { background: var(--px-crit); }

/* ================================================================================================= 10. skeleton */
/* <span class="px-skel px-skel-line" style="width:60%"></span> (never a spinner on first load) */
.px-skel { display: block; border-radius: var(--px-r-sm); background: var(--px-surface-3); animation: px-skel 1.4s ease-in-out infinite; }
.px-skel-line { height: .8rem; margin: .4rem 0; }
@keyframes px-skel { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ================================================================================================ 11. links row */
/* <div class="px-links"><a href="…"><i class="fa-duotone fa-solid fa-key"></i>ลืมรหัสผ่าน</a><a href="…">…</a></div> */
.px-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.25rem; margin-top: 1.1rem; font-size: .95rem; }
.px-links:has(> :only-child) { justify-content: center; }
.px-links a, .px-links button.px-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; }
.px-links i { font-size: .92em; }
button.px-link { padding: 0; border: 0; background: none; color: var(--px-accent-text); font: inherit; font-weight: 500; cursor: pointer; }
button.px-link:hover { text-decoration: underline; }

/* =================================================================================================== 12. footer */
/* <footer class="px-foot"><a href="…">นโยบายความเป็นส่วนตัว</a><a href="…">ข้อตกลง</a></footer> */
.px-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 22px; padding: 14px 28px 22px; font-size: .86rem; color: var(--px-muted); }
.px-foot a { color: var(--px-muted); }
.px-foot a:hover { color: var(--px-text); }

/* ================================================================================================ 13. OTP boxes */
/* <input class="px-input" id="otp" name="otp" data-px-otp [data-px-otp-submit] maxlength="6" inputmode="numeric"
 *        pattern="[0-9]*" autocomplete="one-time-code">
 * kit.js wraps it: <div class="px-otp"><div class="px-otp-cells" aria-hidden="true"><span class="px-otp-cell">…</span>×6</div>
 * <input class="px-otp-input" …></div>. The real input lies over the boxes (transparent), so paste, SMS/Email autofill,
 * screen readers and form posts all use the one field; the boxes only draw its digits. */
.px-otp { position: relative; display: block; width: max-content; max-width: 100%; margin: 0 auto; }
.px-otp-cells { display: flex; gap: 8px; justify-content: center; }
.px-otp-cell {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 56px;
    border: 1.5px solid var(--px-input-border); border-radius: var(--px-r-md); background: var(--px-surface);
    color: var(--px-text); font-size: 1.55rem; font-weight: 700; line-height: 1;
    transition: border-color var(--px-dur-micro) var(--px-ease), box-shadow var(--px-dur-micro) var(--px-ease), background-color var(--px-dur-micro) var(--px-ease);
}
.px-otp-cell:nth-child(3) { margin-right: 10px; }
[data-theme="dark"] .px-otp-cell { background: var(--px-surface-2); }
.px-otp-cell.is-filled { border-color: rgba(var(--px-accent-rgb), .6); background: var(--px-accent-soft); animation: px-digit .22s var(--px-ease); }
.px-otp-cell.is-active { border-color: var(--px-accent); box-shadow: var(--px-ring); }
.px-otp-cell.is-active:not(.is-filled)::after { content: ""; width: 2px; height: 1.45rem; border-radius: 1px; background: var(--px-text); animation: px-caret 1.06s steps(1) infinite; }
.px-otp.is-error .px-otp-cell { border-color: var(--px-crit); background: var(--px-crit-soft); }
.px-otp.is-error .px-otp-cells { animation: px-shake .45s var(--px-ease) 1; }
.px-otp-input {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: var(--px-r-md);
    background: transparent; color: transparent; caret-color: transparent; opacity: 0; font-size: 16px; letter-spacing: 1em; cursor: text;
}
@keyframes px-digit { from { transform: scale(.88); } to { transform: none; } }
@keyframes px-caret { 0% { opacity: 1; } 50% { opacity: 0; } }
@media (max-width: 420px) {
    .px-otp-cells { gap: 6px; }
    .px-otp-cell { width: 40px; height: 50px; font-size: 1.35rem; }
    .px-otp-cell:nth-child(3) { margin-right: 6px; }
}

/* =================================================================================================== 14. motion */
/* <section class="px-card px-rise" style="--i:1"> : rises once on load (fill backwards only, no retained transform) */
@keyframes px-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes px-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes px-spin { to { transform: rotate(360deg); } }
@keyframes px-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.px-rise { animation: px-rise var(--px-dur-in) var(--px-ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.px-shake { animation: px-shake .45s var(--px-ease) 1; }
html.px-paused *, html.px-paused *::before, html.px-paused *::after { animation-play-state: paused !important; }
html.px-theme-fade, html.px-theme-fade *, html.px-theme-fade *::before, html.px-theme-fade *::after {
    transition: background-color .35s var(--px-ease), border-color .35s var(--px-ease), color .35s var(--px-ease), box-shadow .35s var(--px-ease) !important;
}

@media (prefers-reduced-motion: reduce) {
    .px-rise, .px-shake, .px-skel, .px-otp-cell, .px-otp.is-error .px-otp-cells { animation: none !important; }
    .px-otp-cell.is-active:not(.is-filled)::after { animation: none; }
    .px-btn.is-busy::after { animation-duration: 1.6s; }
    .px-btn:active, .px-icon-btn:active { transform: none; }
    .px-btn.is-primary:hover .fa-arrow-right { transform: none; }
    html.px-theme-fade, html.px-theme-fade * { transition: none !important; }
}

@media (max-width: 575.98px) {
    .px-top { padding: 12px 16px; }
    .px-brand { font-size: 1.05rem; }
    .px-card { padding: 24px 20px; }
    .px-title { font-size: 1.45rem; }
    .px-foot { padding: 12px 16px 18px; }
}
