/* Strix token layer 6/7 — reduced motion.
 * Generated by scripts/build-tokens.mjs from scripts/tokens/upstream-snapshot.css.
 * Do not edit by hand — change the generator or the snapshot. `pnpm tokens:check` gates this.
 *
 * A single honest default for WCAG 2.3.3, rather than a `motion-reduce:` variant
 * remembered per component. An audit of the built Storybook found that none of the
 * twenty-seven primitives honored the query -- Button, Card, Switch, Tabs,
 * Accordion and Textarea all kept animating -- while the eight patterns, written
 * after the rule was understood, all did. Opting in per component means the next
 * component forgets.
 */

@media (prefers-reduced-motion: reduce) {
  /*
   * 0.01ms rather than `none`, and this is the load-bearing detail: a duration of
   * `none` stops `transitionend` and `animationend` from ever firing, and any
   * component that sequences state off those events silently hangs. An imperceptible
   * duration removes the motion and keeps the event.
   *
   * `!important` because the utilities this overrides are single-class selectors of
   * equal specificity that would otherwise win on source order.
   *
   * `animation-iteration-count` is capped so an infinite spinner stops rather than
   * spinning imperceptibly fast forever, and `scroll-behavior` is reset because a
   * smooth programmatic scroll is motion too.
   */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
