/* ============================================================
   FinBee — shared motion/materials accessibility contract.
   Loaded after each page's own stylesheet on both entry points
   (index.html, app.html) so these overrides always win.

   FinMotion (motion.js) already self-degrades every JS-driven spring
   to an instant jump under prefers-reduced-motion — the rules below
   only need to cover what JS doesn't touch: standalone CSS @keyframes
   loops, prefers-reduced-transparency, prefers-contrast, and a shared
   :focus-visible ring (styles.css has none today).
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    /* Fully kill infinite decorative loops rather than compress them to
       0.001ms — an "infinite" 0.001ms loop still repaints every frame
       for no visible benefit. */
    .badge,
    .nlp-mic-btn.listening,
    .chat-badge-pulse,
    .float-card,
    .float-badge,
    .marquee-track,
    .steps-connector path {
        animation: none !important;
    }
    .marquee-track { transform: translateX(0) !important; }
}

@media (prefers-reduced-transparency: reduce) {
    .toast-item {
        background: var(--bg-card) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    .auth-overlay {
        background: var(--bg-page) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
}

@media (prefers-contrast: more) {
    .glass-card, .kpi-card, .toast-item, .auth-box {
        border-width: 2px !important;
    }
    .toast-item {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: var(--bg-card) !important;
    }
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
