/* Instant UI — kill motion that fights full-page navigation.
   Specificity beats single-class `transition: … !important` rules. */
html.ems-instant {
    scroll-behavior: auto !important;
    --ems-duration: 0ms;
    --ems-ease: linear;
    --transition-fast: 0ms;
    --ds-transition: 0ms;
    --ds-ease-out: linear;
}

html.ems-instant body,
html.ems-instant body *,
html.ems-instant body *::before,
html.ems-instant body *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    transition: none !important;
    transition-delay: 0s !important;
    transition-duration: 0s !important;
}

/* Entrance helpers must never start hidden (animation:none would leave them invisible). */
html.ems-instant .motion-fade-in,
html.ems-instant .motion-fade-up,
html.ems-instant .motion-scale-in,
html.ems-instant .stagger-item,
html.ems-instant .ds-stagger > *,
html.ems-instant .ds-page,
html.ems-instant .saas-dashboard .wow-hero,
html.ems-instant .saas-dashboard .saas-metric,
html.ems-instant .saas-dashboard .saas-panel,
html.ems-instant .report-subtabs .nav-item {
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
}

html.ems-instant .fade.show {
    opacity: 1 !important;
}

html.ems-instant .workspace-tab-indicator {
    display: none !important;
}

html.ems-instant .workspace-tabs-scroll {
    scroll-behavior: auto !important;
}

/* Sticky chrome: avoid backdrop blur thrashing during scroll/nav paint. */
html.ems-instant .workspace-tabs,
html.ems-instant .app-topbar,
html.ems-instant .mobile-bottom-nav {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Keep shell stable while soft-nav swaps tab content. */
html.ems-nav-pending,
html.ems-nav-pending body {
    cursor: progress;
}
html.ems-nav-pending .app-sidebar,
html.ems-nav-pending .app-main {
    transition: none !important;
}
html.ems-nav-pending main.app-content {
    opacity: .72;
    pointer-events: none;
}

/* Cross-document view transitions (Chrome): kill white-flash reload when soft-nav falls back. */
@view-transition {
    navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}
