/**
 * LabPulse Motion (SOE Phase 2.3)
 * -----------------------------------------------------------------
 * Every keyframe, duration and easing in one place, per theme. Loaded on every shell (app, public, sign-in, maintenance) after the theme
 * sheets. What starts each animation:
 *   - a page change: the browser's own cross-document view transition (no script; theme-init.php names the content while it plays),
 *   - the first paint of a page: the blocks the server rendered arrive in order (CSS, no script, so nothing flashes before scripts run),
 *   - anything later (a panel scrolled into view, rows or cards a module renders, a tab panel, the sidebar): lp-transitions.js adds a class
 *     at that moment and removes it on animationend.
 * Modes (<html data-lp-motion>, set before the first paint by theme-init.php from this browser's Motion choice):
 *   full     movement, depth and the theme's personality;
 *   reduced  short fades only: no movement, no 3D, no tilt, no parallax, no count-up (Automatic picks this when the device asks for less
 *            motion, e.g. Windows "Show animations" off).
 * Only transform, opacity and (once) clip-path are animated. Nothing loops except the small live markers, which stop in reduced mode.
 * -----------------------------------------------------------------
 */

/* ---------------------------------------------------------------- tokens: DYCI Classic, then each theme's personality */
:root {
    /* entrances */
    --lp-in: lp-in-rise; --lp-in-time: 560ms; --lp-in-ease: cubic-bezier(0.2, 0.7, 0.2, 1); --lp-in-step: 70ms;
    --lp-row-in: lp-row-rise; --lp-row-time: 380ms; --lp-row-step: 26ms;
    --lp-tab-in: lp-in-rise; --lp-tab-time: 300ms;
    /* page change */
    --lp-vt: 480ms; --lp-vt-out: lp-vt-recede; --lp-vt-in: lp-vt-rise; --lp-vt-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    /* dialogs and menus */
    --lp-modal-time: 300ms; --lp-modal-from: perspective(1200px) rotateX(-10deg) translateY(30px) scale(0.94); --lp-modal-origin: 50% 0%;
    --lp-menu-from: perspective(700px) rotateX(-14deg) translateY(-6px) scale(0.98); --lp-menu-time: 200ms;
    /* pointer depth */
    --lp-tilt: 1; --lp-tilt-deg: 4deg; --lp-hover-lift: -3px;
    /* the header's arrival light */
    --lp-arrive-light: linear-gradient(90deg, transparent, #e2ae45, transparent);
    --lp-side-time: 340ms;
}
/* Midnight Pro: crisp, fast, a cyan scan */
:root[data-lp-theme="midnight"] { --lp-in: lp-in-scan; --lp-in-time: 340ms; --lp-in-ease: cubic-bezier(0.3, 0.8, 0.3, 1); --lp-in-step: 40ms; --lp-row-in: lp-row-scan; --lp-row-time: 240ms; --lp-row-step: 16ms; --lp-tab-in: lp-in-scan; --lp-tab-time: 200ms; --lp-vt: 320ms; --lp-vt-out: lp-vt-cut-out; --lp-vt-in: lp-vt-cut-in; --lp-vt-ease: cubic-bezier(0.3, 0.8, 0.3, 1); --lp-modal-time: 180ms; --lp-modal-from: scale(0.97) translateY(8px); --lp-menu-from: translateY(-4px); --lp-menu-time: 130ms; --lp-tilt: 0; --lp-hover-lift: -1px; --lp-side-time: 220ms; }
:root[data-lp-theme="midnight"]:where(:not([data-theme="light"])) { --lp-arrive-light: linear-gradient(90deg, transparent, #38bdf8 40%, #e0f2fe 50%, #38bdf8 60%, transparent); }
/* Aurora: floating, soft, layered */
:root[data-lp-theme="aurora"] { --lp-in: lp-in-float; --lp-in-time: 820ms; --lp-in-ease: cubic-bezier(0.16, 1, 0.3, 1); --lp-in-step: 95ms; --lp-row-in: lp-row-float; --lp-row-time: 520ms; --lp-row-step: 34ms; --lp-tab-in: lp-in-float; --lp-tab-time: 460ms; --lp-vt: 600ms; --lp-vt-out: lp-vt-drift-out; --lp-vt-in: lp-vt-drift-in; --lp-vt-ease: cubic-bezier(0.22, 1, 0.36, 1); --lp-modal-time: 420ms; --lp-modal-from: perspective(1200px) translateY(56px) rotateX(8deg) scale(0.9); --lp-modal-origin: 50% 100%; --lp-menu-from: translateY(-10px) scale(0.95); --lp-menu-time: 260ms; --lp-tilt-deg: 5deg; --lp-hover-lift: -4px; --lp-side-time: 420ms; }
:root[data-lp-theme="aurora"]:where(:not([data-theme="light"])) { --lp-arrive-light: linear-gradient(90deg, transparent, #c084fc, #7dd3fc, transparent); }
/* Copper Luxe: refined depth, panels set into place, a metallic glint */
:root[data-lp-theme="copper"] { --lp-in: lp-in-depth; --lp-in-time: 680ms; --lp-in-ease: cubic-bezier(0.18, 0.84, 0.22, 1); --lp-in-step: 80ms; --lp-row-in: lp-row-rise; --lp-row-time: 420ms; --lp-row-step: 28ms; --lp-tab-in: lp-in-depth; --lp-tab-time: 380ms; --lp-vt: 560ms; --lp-vt-out: lp-vt-sink; --lp-vt-in: lp-vt-emerge; --lp-vt-ease: cubic-bezier(0.18, 0.84, 0.22, 1); --lp-modal-time: 360ms; --lp-modal-from: perspective(1300px) translateZ(-160px) rotateX(14deg) translateY(20px); --lp-modal-origin: 50% 100%; --lp-menu-from: perspective(700px) rotateX(-18deg) translateY(-6px); --lp-menu-time: 220ms; --lp-tilt-deg: 4deg; --lp-hover-lift: -3px; --lp-side-time: 380ms; }
:root[data-lp-theme="copper"]:where(:not([data-theme="light"])) { --lp-arrive-light: linear-gradient(90deg, transparent, #b98a2e 20%, #f3e2b0 50%, #b98a2e 80%, transparent); }
/* Emerald Tech: precise, structured, stepwise */
:root[data-lp-theme="emerald"] { --lp-in: lp-in-wipe; --lp-in-time: 300ms; --lp-in-ease: cubic-bezier(0.4, 0, 0.2, 1); --lp-in-step: 45ms; --lp-row-in: lp-row-scan; --lp-row-time: 200ms; --lp-row-step: 20ms; --lp-tab-in: lp-in-wipe; --lp-tab-time: 180ms; --lp-vt: 260ms; --lp-vt-out: lp-vt-step-out; --lp-vt-in: lp-vt-step-in; --lp-vt-ease: steps(6, end); --lp-modal-time: 150ms; --lp-modal-from: scaleY(0.9); --lp-modal-origin: 50% 0%; --lp-menu-from: scaleY(0.85); --lp-menu-time: 110ms; --lp-tilt: 0; --lp-hover-lift: 0px; --lp-side-time: 180ms; }
:root[data-lp-theme="emerald"]:where(:not([data-theme="light"])) { --lp-arrive-light: linear-gradient(90deg, #34d399, #34d399); }
/* Obsidian: a slow, cinematic fade; sharp and deliberate */
:root[data-lp-theme="obsidian"] { --lp-in: lp-in-veil; --lp-in-time: 900ms; --lp-in-ease: cubic-bezier(0.4, 0, 0.1, 1); --lp-in-step: 110ms; --lp-row-in: lp-row-fade; --lp-row-time: 520ms; --lp-row-step: 30ms; --lp-tab-in: lp-in-veil; --lp-tab-time: 500ms; --lp-vt: 680ms; --lp-vt-out: lp-vt-veil-out; --lp-vt-in: lp-vt-veil-in; --lp-vt-ease: cubic-bezier(0.4, 0, 0.1, 1); --lp-modal-time: 360ms; --lp-modal-from: scale(1.04); --lp-menu-from: none; --lp-menu-time: 260ms; --lp-tilt: 0; --lp-hover-lift: 0px; --lp-side-time: 420ms; }
:root[data-lp-theme="obsidian"]:where(:not([data-theme="light"])) { --lp-arrive-light: linear-gradient(90deg, transparent, #d9c7a4, transparent); }
/* Black Red: strong but controlled; crimson reveals */
:root[data-lp-theme="black-red"] { --lp-in: lp-in-door; --lp-in-time: 600ms; --lp-in-ease: cubic-bezier(0.16, 1, 0.3, 1); --lp-in-step: 70ms; --lp-row-in: lp-row-crimson; --lp-row-time: 360ms; --lp-row-step: 24ms; --lp-tab-in: lp-in-door; --lp-tab-time: 340ms; --lp-vt: 520ms; --lp-vt-out: lp-vt-door-out; --lp-vt-in: lp-vt-door-in; --lp-vt-ease: cubic-bezier(0.16, 1, 0.3, 1); --lp-modal-time: 320ms; --lp-modal-from: perspective(1100px) rotateY(-16deg) translateX(-40px) scale(0.94); --lp-modal-origin: 0% 50%; --lp-menu-from: perspective(700px) rotateY(-12deg) translateX(8px); --lp-menu-time: 200ms; --lp-tilt-deg: 5deg; --lp-hover-lift: -3px; --lp-side-time: 320ms; }
:root[data-lp-theme="black-red"]:where(:not([data-theme="light"])) { --lp-arrive-light: linear-gradient(90deg, transparent, #f0424f 30%, #ff8a93 50%, #f0424f 70%, transparent); }
/* reduced: the same events, as short fades */
:root[data-lp-motion="reduced"] {
    --lp-in: lp-in-fade; --lp-in-time: 260ms; --lp-in-ease: ease-out; --lp-in-step: 30ms;
    --lp-row-in: lp-row-fade; --lp-row-time: 200ms; --lp-row-step: 12ms; --lp-tab-in: lp-in-fade; --lp-tab-time: 180ms;
    --lp-vt: 220ms; --lp-vt-out: lp-vt-fade-out; --lp-vt-in: lp-vt-fade-in; --lp-vt-ease: ease;
    --lp-modal-time: 180ms; --lp-modal-from: none; --lp-menu-from: none; --lp-menu-time: 140ms;
    --lp-tilt: 0; --lp-hover-lift: 0px; --lp-side-time: 200ms;
}

/* ---------------------------------------------------------------- keyframes */
@keyframes lp-in-rise { from { opacity: 0; transform: perspective(1100px) translateY(34px) rotateX(-8deg); } }
@keyframes lp-in-scan { from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateX(-10px); } 60% { opacity: 1; } }
@keyframes lp-in-float { from { opacity: 0; transform: perspective(1200px) translateY(44px) translateZ(-40px) scale(0.95); } }
@keyframes lp-in-depth { from { opacity: 0; transform: perspective(1200px) translateY(26px) translateZ(-90px) rotateX(11deg); } 55% { opacity: 1; } }
@keyframes lp-in-wipe { from { opacity: 0.2; clip-path: inset(0 0 100% 0); } }
@keyframes lp-in-veil { from { opacity: 0; transform: scale(1.018); } }
@keyframes lp-in-door { from { opacity: 0; transform: perspective(1000px) translateX(34px) rotateY(-16deg); outline: 1px solid rgba(240, 66, 79, 0.9); } 70% { outline-color: rgba(240, 66, 79, 0.25); } to { outline: 1px solid rgba(240, 66, 79, 0); } }
@keyframes lp-in-fade { from { opacity: 0; } }
@keyframes lp-row-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes lp-row-scan { from { opacity: 0; transform: translateX(-12px); } }
@keyframes lp-row-float { from { opacity: 0; transform: translateY(16px) scale(0.985); } }
@keyframes lp-row-fade { from { opacity: 0; } }
@keyframes lp-row-crimson { from { opacity: 0; transform: translateX(14px); box-shadow: inset 3px 0 0 #f0424f; } 70% { box-shadow: inset 3px 0 0 rgba(240, 66, 79, 0.6); } to { box-shadow: inset 3px 0 0 rgba(240, 66, 79, 0); } }
/* page changes: the old content leaves, the new arrives */
@keyframes lp-vt-recede { to { opacity: 0; transform: perspective(1400px) translateZ(-120px) rotateX(5deg); } }
@keyframes lp-vt-rise { from { opacity: 0; transform: perspective(1400px) translateY(46px) translateZ(80px) rotateX(-7deg); } }
@keyframes lp-vt-cut-out { to { opacity: 0; clip-path: inset(0 0 0 100%); } }
@keyframes lp-vt-cut-in { from { clip-path: inset(0 100% 0 0); filter: brightness(1.6); } }
@keyframes lp-vt-drift-out { to { opacity: 0; transform: perspective(1500px) translateX(-60px) rotateY(9deg) scale(0.95); } }
@keyframes lp-vt-drift-in { from { opacity: 0; transform: perspective(1500px) translateX(80px) rotateY(-11deg) scale(0.95); } }
@keyframes lp-vt-sink { to { opacity: 0; transform: perspective(1300px) translateZ(-180px) rotateX(9deg); } }
@keyframes lp-vt-emerge { from { opacity: 0; transform: perspective(1300px) translateY(30px) translateZ(-120px) rotateX(-10deg); } 60% { opacity: 1; } }
@keyframes lp-vt-step-out { to { opacity: 0; } }
@keyframes lp-vt-step-in { from { clip-path: inset(0 0 100% 0); } }
@keyframes lp-vt-veil-out { to { opacity: 0; transform: scale(1.03); } }
@keyframes lp-vt-veil-in { from { opacity: 0; transform: scale(0.975); } }
@keyframes lp-vt-door-out { to { opacity: 0; transform: perspective(1200px) rotateY(-22deg) translateX(-70px); transform-origin: 0 50%; } }
@keyframes lp-vt-door-in { from { opacity: 0; transform: perspective(1200px) rotateY(18deg) translateX(70px); transform-origin: 100% 50%; } }
@keyframes lp-vt-fade-out { to { opacity: 0; } }
@keyframes lp-vt-fade-in { from { opacity: 0; } }
/* the light draws across the header from the left and fades; it scales inside the header and never moves past its edge (a translate parked
   the line beyond the right edge and made every page scroll sideways) */
@keyframes lp-arrive-light { from { transform: scaleX(0); opacity: 1; } 62% { transform: scaleX(1); opacity: 1; } to { transform: scaleX(1); opacity: 0; } }
@keyframes lp-nav-mark { from { transform: scaleY(0); } }
@keyframes lp-beat { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes lp-switch-out { to { opacity: 0; transform: perspective(1600px) translateZ(-140px) rotateY(-8deg); } }
@keyframes lp-switch-in { from { opacity: 0; transform: perspective(1600px) translateZ(120px) rotateY(10deg); } }

/* ---------------------------------------------------------------- page change (cross-document view transition) */
@view-transition { navigation: auto; }
/* the animation layer never takes clicks: the new page can be used while it plays */
::view-transition { pointer-events: none; }
/* Only the content is captured for a page change. When the whole page (the root) was captured as well, every click during the transition
   landed on <html> and the header, menus and sidebar did nothing until it ended (SOE Phase 2.3, measured with real clicks). The rest of
   the page stays live and clickable. A theme change still captures the whole page, because the whole page changes. */
:root:not([data-lp-switching]) { view-transition-name: none; }
/* The content is named only while a page change is running (both pages match this during it). A script naming it from <head> ran before the
   content existed on the new page, so nothing was captured and the page change never animated (SOE Phase 2.3 root cause). Named only
   for the duration, it never becomes a lasting stacking context that would put dialogs under the navigation. */
:root:active-view-transition:not([data-lp-transit]):not([data-lp-switching]) :is(.app-content, .public-main, .auth-shell) { view-transition-name: lp-content; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-group(lp-content) { animation-duration: var(--lp-vt); animation-timing-function: var(--lp-vt-ease); }
::view-transition-old(lp-content) { animation: var(--lp-vt-out) var(--lp-vt) var(--lp-vt-ease) both; }
::view-transition-new(lp-content) { animation: var(--lp-vt-in) var(--lp-vt) var(--lp-vt-ease) both; }
/* the sidebar collapse (lp-transitions.js names the rail and the page only while it plays): no stretched text, the page slides */
:root[data-lp-transit="sidebar"] .sidebar { view-transition-name: lp-sidebar; }
:root[data-lp-transit="sidebar"] .app-main { view-transition-name: lp-main; }
::view-transition-group(lp-sidebar), ::view-transition-group(lp-main) { animation-duration: var(--lp-side-time); animation-timing-function: var(--lp-vt-ease); }
::view-transition-image-pair(lp-main), ::view-transition-image-pair(lp-sidebar) { overflow: clip; }
::view-transition-old(lp-main), ::view-transition-new(lp-main), ::view-transition-old(lp-sidebar), ::view-transition-new(lp-sidebar) { height: 100%; width: auto; object-fit: none; object-position: left top; animation-duration: var(--lp-side-time); }
/* a theme change: the old look sinks back, the new one comes forward */
:root[data-lp-switching]::view-transition-old(root) { animation: lp-switch-out 420ms cubic-bezier(0.4, 0, 0.2, 1) both; }
:root[data-lp-switching]::view-transition-new(root) { animation: lp-switch-in 560ms cubic-bezier(0.16, 1, 0.3, 1) both; }
:root[data-lp-switching][data-lp-motion="reduced"]::view-transition-old(root) { animation: lp-vt-fade-out 200ms ease both; }
:root[data-lp-switching][data-lp-motion="reduced"]::view-transition-new(root) { animation: lp-vt-fade-in 240ms ease both; }

/* ---------------------------------------------------------------- the first paint of a page: what the server rendered arrives in order */
.app-content > :not(script):not(style):not(.modal-backdrop):not(.lp-dash):not(.skip-link),
.lp-dash > :not(.lp-dissolve), .lp-dash > .lp-dissolve > * { animation: var(--lp-in) var(--lp-in-time) var(--lp-in-ease) backwards; }
.app-content > :nth-child(2), .lp-dash > :nth-child(2), .lp-dissolve > :nth-child(2) { animation-delay: calc(var(--lp-in-step) * 1); }
.app-content > :nth-child(3), .lp-dash > :nth-child(3), .lp-dissolve > :nth-child(3) { animation-delay: calc(var(--lp-in-step) * 2); }
.app-content > :nth-child(4), .lp-dash > :nth-child(4), .lp-dissolve > :nth-child(4) { animation-delay: calc(var(--lp-in-step) * 3); }
.app-content > :nth-child(5), .lp-dash > :nth-child(5), .lp-dissolve > :nth-child(5) { animation-delay: calc(var(--lp-in-step) * 4); }
.app-content > :nth-child(n+6), .lp-dash > :nth-child(n+6), .lp-dissolve > :nth-child(n+6) { animation-delay: calc(var(--lp-in-step) * 5); }
/* the header and the rail arrive too: the active link's marker grows, a line of the theme's light crosses the header */
.sidebar-link.is-active::before { animation: lp-nav-mark 460ms var(--lp-in-ease) 120ms backwards; transform-origin: 50% 50%; }
.topbar { isolation: isolate; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--lp-arrive-light); pointer-events: none; opacity: 0; transform-origin: 0 50%; animation: lp-arrive-light 1100ms var(--lp-in-ease) 160ms 1 both; }
:root[data-lp-motion="reduced"] .topbar::after { animation: none; }

/* ---------------------------------------------------------------- later arrivals (lp-transitions.js) */
.lp-await { opacity: 0; animation: none !important; }
.lp-in { animation: var(--lp-in) var(--lp-in-time) var(--lp-in-ease) backwards !important; animation-delay: calc(var(--lp-i, 0) * var(--lp-in-step)) !important; }
.lp-row-in { animation: var(--lp-row-in) var(--lp-row-time) var(--lp-in-ease) backwards !important; animation-delay: calc(var(--lp-i, 0) * var(--lp-row-step)) !important; }
.lp-tab-in { animation: var(--lp-tab-in) var(--lp-tab-time) var(--lp-in-ease) backwards !important; }

/* ---------------------------------------------------------------- dialogs: the backdrop fades, the panel arrives in the theme's way; closing plays it backwards */
.modal-backdrop { transition: opacity var(--lp-modal-time) var(--lp-in-ease), visibility 0s linear var(--lp-modal-time); }
.modal { opacity: 0; transform: var(--lp-modal-from); transform-origin: var(--lp-modal-origin, 50% 50%); transition: transform var(--lp-modal-time) var(--lp-in-ease), opacity calc(var(--lp-modal-time) * 0.8) ease; }
.modal-backdrop[data-open="true"] .modal { opacity: 1; transform: none; }
/* menus (notifications, account, row actions) fold open */
.dropdown-panel { transform-origin: 90% 0%; transform: var(--lp-menu-from); transition: opacity var(--lp-menu-time) var(--lp-in-ease), transform var(--lp-menu-time) var(--lp-in-ease), visibility 0s linear var(--lp-menu-time); }
.dropdown[data-open="true"] .dropdown-panel { transform: none; }
/* a row's action menu (display:none while closed, components.css) folds open from its starting style */
.table-row-menu-panel { transform-origin: 90% 0%; transition: opacity var(--lp-menu-time) var(--lp-in-ease), transform var(--lp-menu-time) var(--lp-in-ease), visibility 0s linear var(--lp-menu-time), display var(--lp-menu-time) allow-discrete; }
.table-row-menu-panel[data-open="true"] { transform: none; }
@starting-style { .table-row-menu-panel[data-open="true"] { opacity: 0; transform: var(--lp-menu-from); } }
/* panels shown with the hidden attribute (filters, drawers, details, notices): they fade and settle in, and fade out */
.lp-reveal-box { transition: opacity var(--lp-menu-time) ease, transform var(--lp-menu-time) var(--lp-in-ease), display var(--lp-menu-time) allow-discrete, overlay var(--lp-menu-time) allow-discrete; }
.lp-reveal-box[hidden] { opacity: 0; transform: translateY(-6px); }
@starting-style { .lp-reveal-box:not([hidden]) { opacity: 0; transform: translateY(-6px); } }
details > summary ~ * { animation: none; }
details[open] > summary ~ * { animation: lp-in-fade 240ms ease backwards; }

/* ---------------------------------------------------------------- the pointer: buttons lift and press, cards take depth, rows answer */
.btn { transition: background var(--lp-motion) ease, background-position 700ms var(--lp-in-ease), border-color var(--lp-motion) ease, color var(--lp-motion) ease, box-shadow var(--lp-motion) ease, transform 140ms var(--lp-in-ease), filter var(--lp-motion) ease; }
.btn:hover:not(:disabled) { transform: translateY(var(--lp-hover-lift)); }
.btn-ghost:hover:not(:disabled), .icon-btn:hover { transform: none; }
.btn:active:not(:disabled), .icon-btn:active { transform: translateY(1px) scale(0.97); transition-duration: 60ms; }
.btn .icon, .icon-btn .icon { transition: transform var(--lp-motion) var(--lp-in-ease); }
.btn:hover:not(:disabled) .icon, .icon-btn:hover .icon { transform: scale(1.1); }
.stat-card, .card-hover, a.lp-op, .dev-kpi, .tp-card, .pc-card { transition: transform 260ms var(--lp-in-ease), box-shadow var(--lp-motion) var(--lp-in-ease), border-color var(--lp-motion) ease; }
.stat-card:hover, .card-hover:hover, a.lp-op:hover, .dev-kpi:hover, .pc-card:hover { transform: translateY(var(--lp-hover-lift)); box-shadow: var(--lp-card-shadow-hover), var(--lp-card-highlight); }
/* pointer depth (lp-transitions.js sets --lp-tx / --lp-ty from -1 to 1 while the pointer is over the card) */
:root[data-lp-motion="full"] [data-lp-tilt] { transform: perspective(900px) translateY(var(--lp-hover-lift)) rotateX(calc(var(--lp-ty, 0) * -1 * var(--lp-tilt-deg) * var(--lp-tilt))) rotateY(calc(var(--lp-tx, 0) * var(--lp-tilt-deg) * var(--lp-tilt))); transition: transform 120ms linear, box-shadow var(--lp-motion) ease; }
:root[data-lp-motion="full"] .lp-hero[data-lp-tilt] { transform: perspective(1600px) rotateX(calc(var(--lp-ty, 0) * -1.2deg * var(--lp-tilt))) rotateY(calc(var(--lp-tx, 0) * 1.6deg * var(--lp-tilt))); }
.table tbody tr { transition: background-color var(--lp-motion) ease, box-shadow var(--lp-motion) ease; }
.sidebar-link { transition: background var(--lp-motion) ease, color var(--lp-motion) ease, transform var(--lp-motion) var(--lp-in-ease), box-shadow var(--lp-motion) ease; }
.sidebar-link:hover { transform: translateX(3px); }
.sidebar-link .sidebar-icon { transition: transform var(--lp-motion) var(--lp-in-ease), color var(--lp-motion) ease; }
.sidebar-link:hover .sidebar-icon { transform: scale(1.14); }
.sidebar-heading-chevron { transition: transform var(--lp-motion) var(--lp-in-ease); }
.sidebar-section .sidebar-list { transition: opacity var(--lp-motion) ease; }
.tp-card[aria-pressed="true"] { animation: lp-in-fade 1ms; }
:root[data-lp-motion="reduced"] .btn:hover:not(:disabled), :root[data-lp-motion="reduced"] .btn:active:not(:disabled), :root[data-lp-motion="reduced"] .sidebar-link:hover,
:root[data-lp-motion="reduced"] .stat-card:hover, :root[data-lp-motion="reduced"] .card-hover:hover, :root[data-lp-motion="reduced"] a.lp-op:hover, :root[data-lp-motion="reduced"] .dev-kpi:hover, :root[data-lp-motion="reduced"] .pc-card:hover { transform: none; }
:root[data-lp-motion="reduced"] .sidebar-link:hover .sidebar-icon, :root[data-lp-motion="reduced"] .btn:hover .icon { transform: none; }
/* theme accents on hover */
:root[data-lp-theme="black-red"]:where(:not([data-theme="light"])) .sidebar-link:hover .sidebar-icon { filter: drop-shadow(0 0 6px rgba(240, 66, 79, 0.8)); }
:root[data-lp-theme="midnight"]:where(:not([data-theme="light"])) .sidebar-link:hover .sidebar-icon { filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.8)); }
:root[data-lp-theme="emerald"] .sidebar-link:hover { transform: none; }
:root[data-lp-theme="emerald"] .stat-card:hover, :root[data-lp-theme="emerald"] a.lp-op:hover { transform: translateX(2px); }
:root[data-lp-theme="obsidian"] .sidebar-link:hover { transform: none; }

/* ---------------------------------------------------------------- live markers: small, and still in reduced mode */
.lp-live i, .lp-hero-beat { animation: lp-beat 2.4s ease-in-out infinite; }
:root[data-lp-theme="black-red"]:not([data-lp-motion="reduced"]) .sidebar-link.is-active .sidebar-icon { animation: lp-beat 2.6s ease-in-out infinite; }
:root[data-lp-motion="reduced"] .lp-live i, :root[data-lp-motion="reduced"] .lp-hero-beat, :root[data-lp-motion="reduced"] .sidebar-link .sidebar-icon, :root[data-lp-motion="reduced"] .chart-dot-now, :root[data-lp-motion="reduced"] .chart-sweep { animation: none; }
:root[data-lp-motion="reduced"] { scroll-behavior: auto; }
/* a tab in the background: nothing decorative keeps running */
:root[data-lp-hidden] *, :root[data-lp-hidden] *::before, :root[data-lp-hidden] *::after { animation-play-state: paused !important; }

/* ---------------------------------------------------------------- sign-in and maintenance: each theme arrives its own way */
.auth-shell { animation: var(--lp-in) calc(var(--lp-in-time) + 140ms) var(--lp-in-ease) backwards; }
.auth-brand-logo { animation: lp-seal-in calc(var(--lp-in-time) + 300ms) var(--lp-in-ease) 160ms backwards; }
@keyframes lp-seal-in { from { opacity: 0; transform: perspective(800px) rotateY(-70deg) scale(0.8); } }
:root[data-lp-motion="reduced"] .auth-brand-logo { animation-name: lp-in-fade; }
.auth-panel-form > *, .maintenance-card > * { animation: lp-in-fade 520ms ease backwards; }
.auth-panel-form > :nth-child(2), .maintenance-card > :nth-child(2) { animation-delay: 220ms; }
.auth-panel-form > :nth-child(3), .maintenance-card > :nth-child(3) { animation-delay: 280ms; }
.auth-panel-form > :nth-child(n+4), .maintenance-card > :nth-child(n+4) { animation-delay: 340ms; }
.auth-topbar { animation: lp-in-fade 600ms ease 120ms backwards; }
.auth-panel-form .input, .auth-panel-form .select { transition: border-color var(--lp-motion) ease, box-shadow var(--lp-motion) var(--lp-in-ease), background-color var(--lp-motion) ease; }
/* a refused sign-in: the form answers (a short shake; in reduced mode only the message) */
@keyframes lp-refuse { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
.auth-panel-form.lp-refused { animation: lp-refuse 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
:root[data-lp-motion="reduced"] .auth-panel-form.lp-refused { animation: none; }
.maintenance-notice-icon { animation: lp-seal-in 900ms var(--lp-in-ease) 200ms backwards; }
:root[data-lp-motion="reduced"] .maintenance-notice-icon { animation-name: lp-in-fade; }

/* =============================================================================
 * SOE Phase 2.4 #9 - more of each theme's own motion identity
 * ========================================================================== */
/* -- the sign-in and maintenance backgrounds: one slow layer per theme (transform / opacity only; Motion Full only) */
.auth-body::before { content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none; opacity: 0; }
:root[data-lp-motion="full"] .auth-body::before { opacity: 1; }
:root:not([data-lp-theme]) .auth-body::before, :root[data-lp-theme="dyci-classic"] .auth-body::before {
    background: linear-gradient(105deg, transparent 40%, rgba(226, 174, 69, 0.16) 50%, transparent 60%); animation: lp-auth-sweep 14s ease-in-out infinite; }
:root[data-lp-theme="midnight"] .auth-body::before { inset: 0; animation: lp-auth-scan 9s linear infinite; }
:root[data-lp-theme="midnight"]:where(:not([data-theme="light"])) .auth-body::before { background: linear-gradient(transparent 0 48%, rgba(56, 189, 248, 0.12) 50%, transparent 52%) 0 0 / 100% 100%, linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px) 0 0 / 100% 36px; }
:root[data-lp-theme="aurora"] .auth-body::before { animation: lp-auth-float 26s ease-in-out infinite alternate; }
:root[data-lp-theme="aurora"]:where(:not([data-theme="light"])) .auth-body::before { background: radial-gradient(40% 30% at 30% 30%, rgba(167, 139, 250, 0.32), transparent 70%), radial-gradient(35% 28% at 70% 65%, rgba(125, 211, 252, 0.28), transparent 70%); }
:root[data-lp-theme="copper"] .auth-body::before { animation: lp-auth-sweep 11s cubic-bezier(0.6, 0, 0.3, 1) infinite; }
:root[data-lp-theme="copper"]:where(:not([data-theme="light"])) .auth-body::before { background: linear-gradient(115deg, transparent 42%, rgba(245, 230, 184, 0.10) 48%, rgba(201, 160, 63, 0.16) 50%, transparent 58%); }
:root[data-lp-theme="emerald"] .auth-body::before { inset: 0; animation: lp-auth-tick 4s steps(4, jump-none) infinite; }
:root[data-lp-theme="emerald"]:where(:not([data-theme="light"])) .auth-body::before { background: linear-gradient(rgba(52, 211, 153, 0.08) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(52, 211, 153, 0.08) 1px, transparent 1px) 0 0 / 24px 24px; }
:root[data-lp-theme="obsidian"] .auth-body::before { content: ""; animation: lp-auth-breathe 12s ease-in-out infinite; }
:root[data-lp-theme="obsidian"]:where(:not([data-theme="light"])) .auth-body::before { background: radial-gradient(60% 50% at 50% 40%, transparent 30%, rgba(0, 0, 0, 0.55) 100%); }
:root[data-lp-theme="black-red"] .auth-body::before { animation: lp-auth-slash 7s cubic-bezier(0.7, 0, 0.2, 1) infinite; }
:root[data-lp-theme="black-red"]:where(:not([data-theme="light"])) .auth-body::before { background: linear-gradient(120deg, transparent 46%, rgba(240, 66, 79, 0.22) 49%, rgba(240, 66, 79, 0.05) 51%, transparent 54%); }
@keyframes lp-auth-sweep { 0%, 100% { transform: translateX(-30%); } 50% { transform: translateX(30%); } }
@keyframes lp-auth-scan { from { transform: translateY(-50%); } to { transform: translateY(50%); } }
@keyframes lp-auth-float { from { transform: translate(-6%, -4%) scale(1); } to { transform: translate(6%, 5%) scale(1.08); } }
@keyframes lp-auth-tick { 50% { opacity: 0.55; } }
@keyframes lp-auth-breathe { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes lp-auth-slash { 0%, 55% { transform: translateX(-60%); opacity: 0; } 62% { opacity: 1; } 80%, 100% { transform: translateX(60%); opacity: 0; } }
:root[data-lp-motion="reduced"] .auth-body::before { animation: none !important; opacity: 0; }

/* -- table rows: how a row answers the pointer, per theme */
:root[data-lp-theme="midnight"]:where(:not([data-theme="light"])) .table tbody tr:hover { box-shadow: inset 3px 0 0 #38bdf8; }
:root[data-lp-theme="aurora"]:where(:not([data-theme="light"])) .table tbody tr:hover { box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.35), 0 6px 16px -10px rgba(167, 139, 250, 0.45); }
:root[data-lp-theme="emerald"] .table tbody tr { transition-timing-function: steps(2, jump-none); }
:root[data-lp-theme="emerald"]:where(:not([data-theme="light"])) .table tbody tr:hover { box-shadow: inset 2px 0 0 #34d399, inset -2px 0 0 #34d399; }
:root[data-lp-theme="obsidian"]:where(:not([data-theme="light"])) .table tbody tr:hover { box-shadow: inset 0 -1px 0 #d9c7a4; }
:root[data-lp-theme="black-red"]:where(:not([data-theme="light"])) .table tbody tr:hover { box-shadow: inset 4px 0 0 #f0424f; }
:root:not([data-lp-theme]) .table tbody tr:hover, :root[data-lp-theme="dyci-classic"] .table tbody tr:hover { box-shadow: inset 3px 0 0 #c9a227; }

/* -- the press: each theme's buttons answer a click their own way (transform only) */
:root[data-lp-theme="midnight"] .btn:active:not(:disabled) { transform: scale(0.96); }
:root[data-lp-theme="aurora"] .btn:active:not(:disabled) { transform: translateY(1px) scale(0.95); transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
:root[data-lp-theme="copper"] .btn:active:not(:disabled) { transform: perspective(400px) translateZ(-14px); }
:root[data-lp-theme="emerald"] .btn:active:not(:disabled) { transform: translate(1px, 1px); transition-duration: 0ms; }
:root[data-lp-theme="obsidian"] .btn:active:not(:disabled) { transform: none; opacity: 0.8; }
:root[data-lp-theme="black-red"] .btn:active:not(:disabled) { transform: translateX(2px) scale(0.98); }
:root[data-lp-motion="reduced"] .btn:active:not(:disabled) { transform: none !important; }