/* ==========================================================================
   ANIMATIONS & TRANSITIONS
   ADHD Screening Portal — animations.css

   Table of Contents:
   01. Fade Animations
   02. Slide Animations
   03. Scale & Transform Animations
   04. Continuous / Looping Animations
   05. UI-specific Animations
   06. Page Transitions
   07. SVG / Chart Animations
   08. Number Counter
   09. Skeleton / Loading
   10. Utility Animation Classes
   11. Print Styles
   12. Reduced Motion (prefers-reduced-motion)
   ========================================================================== */


/* ==========================================================================
   01. FADE ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}


/* ==========================================================================
   02. SLIDE ANIMATIONS
   ========================================================================== */

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-48px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(48px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-48px);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(48px);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(48px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-48px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-48px);
  }
}

@keyframes slideOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(48px);
  }
}

/* Slide from bottom only (no fade) — for drawers */
@keyframes slideUpDrawer {
  from { transform: translateY(100%); }
  to   { transform: translateY(0);    }
}

@keyframes slideDownDrawer {
  from { transform: translateY(0);    }
  to   { transform: translateY(100%); }
}


/* ==========================================================================
   03. SCALE & TRANSFORM ANIMATIONS
   ========================================================================== */

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.92);
  }
}

@keyframes scaleInSpring {
  0%   { opacity: 0; transform: scale(0.80); }
  60%  { opacity: 1; transform: scale(1.03); }
  80%  { transform: scale(0.98); }
  100% { transform: scale(1);    }
}

/* Pop: used for checkmarks, confirmations */
@keyframes pop {
  0%   { transform: scale(0);    }
  60%  { transform: scale(1.20); }
  80%  { transform: scale(0.90); }
  100% { transform: scale(1);    }
}

/* Shake: used for form errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-6px) rotate(-1deg); }
  30%       { transform: translateX(5px)  rotate(1deg);  }
  45%       { transform: translateX(-4px) rotate(-0.5deg); }
  60%       { transform: translateX(3px); }
  75%       { transform: translateX(-2px); }
}

/* Flip card */
@keyframes flipInX {
  from {
    opacity: 0;
    transform: perspective(400px) rotateX(90deg);
  }
  40% {
    transform: perspective(400px) rotateX(-10deg);
  }
  to {
    opacity: 1;
    transform: perspective(400px) rotateX(0);
  }
}

@keyframes flipInY {
  from {
    opacity: 0;
    transform: perspective(400px) rotateY(90deg);
  }
  40% {
    transform: perspective(400px) rotateY(-10deg);
  }
  to {
    opacity: 1;
    transform: perspective(400px) rotateY(0);
  }
}


/* ==========================================================================
   04. CONTINUOUS / LOOPING ANIMATIONS
   ========================================================================== */

/* Float — gentle up/down hover effect */
@keyframes float {
  0%, 100% { transform: translateY(0px);    }
  50%       { transform: translateY(-10px); }
}

/* Float with slight rotation */
@keyframes floatRotate {
  0%, 100% { transform: translateY(0px) rotate(0deg);   }
  33%       { transform: translateY(-8px) rotate(2deg);  }
  66%       { transform: translateY(-4px) rotate(-1deg); }
}

/* Pulse scale */
@keyframes pulse {
  0%, 100% { transform: scale(1);    opacity: 1;   }
  50%       { transform: scale(1.05); opacity: 0.8; }
}

/* Glow pulse */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.30),
                0 0 20px rgba(14, 165, 233, 0.10);
  }
  50% {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.60),
                0 0 40px rgba(14, 165, 233, 0.25),
                0 0 60px rgba(14, 165, 233, 0.10);
  }
}

/* Text glow */
@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 8px rgba(14, 165, 233, 0.30);
  }
  50% {
    text-shadow: 0 0 16px rgba(14, 165, 233, 0.70),
                 0 0 30px rgba(14, 165, 233, 0.30);
  }
}

/* Spin (loading) */
@keyframes spin {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}

/* Spin slow */
@keyframes spinSlow {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}

/* Ping: expanding ring */
@keyframes ping {
  0%   { transform: scale(1);   opacity: 1;   }
  75%  { transform: scale(2);   opacity: 0.4; }
  100% { transform: scale(2);   opacity: 0;   }
}

/* Bounce */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(-16px);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* Typing cursor blink */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Breathing — subtle scale */
@keyframes breathe {
  0%, 100% { transform: scale(1);    }
  50%       { transform: scale(1.02); }
}

/* Wave for dot loaders */
@keyframes wave {
  0%, 60%, 100% { transform: initial; }
  30%            { transform: translateY(-8px); }
}


/* ==========================================================================
   05. UI-SPECIFIC ANIMATIONS
   ========================================================================== */

/* Shimmer — for skeleton loaders and progress fills */
@keyframes shimmer {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(150%);  }
}

/* Toast auto-dismiss progress */
@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%;   }
}

/* Checkmark draw */
@keyframes drawCheck {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

/* Option selected bounce */
@keyframes optionSelect {
  0%   { transform: translateX(0) scale(1);    }
  30%  { transform: translateX(6px) scale(1.01); }
  60%  { transform: translateX(2px) scale(1);    }
  100% { transform: translateX(4px) scale(1);    }
}

/* Nav dropdown appear */
@keyframes dropdownReveal {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* Modal appear */
@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Ripple */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Number increment visual */
@keyframes numberFlash {
  0%   { color: var(--color-text-primary); }
  50%  { color: var(--color-primary);      }
  100% { color: var(--color-text-primary); }
}

/* Highlight row */
@keyframes highlightRow {
  0%   { background: transparent; }
  30%  { background: var(--color-primary-subtle); }
  100% { background: transparent; }
}


/* ==========================================================================
   06. PAGE TRANSITIONS
   ========================================================================== */

/* SPA page enter/exit system */
.page-transition-wrapper {
  position: relative;
  overflow-x: hidden;
}

/* Enter — page slides in from right */
.page-enter {
  opacity: 0;
  transform: translateX(32px);
}

.page-enter-active {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
}

/* Exit — page slides out to left */
.page-exit {
  opacity: 1;
  transform: translateX(0);
}

.page-exit-active {
  opacity: 0;
  transform: translateX(-32px);
  transition:
    opacity var(--duration-normal) var(--ease-in),
    transform var(--duration-normal) var(--ease-in);
}

/* Fade-only variant */
.page-enter-fade {
  opacity: 0;
}

.page-enter-fade-active {
  opacity: 1;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.page-exit-fade {
  opacity: 1;
}

.page-exit-fade-active {
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-in);
}

/* Scale variant (for modal-like page transitions) */
.page-enter-scale {
  opacity: 0;
  transform: scale(0.97);
}

.page-enter-scale-active {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-spring);
}

/* Full-screen overlay transition (e.g., loading splash) */
.page-overlay-enter {
  transform: translateY(-100%);
}

.page-overlay-enter-active {
  transform: translateY(0);
  transition: transform var(--duration-slow) var(--ease-in-out);
}

.page-overlay-exit-active {
  transform: translateY(100%);
  transition: transform var(--duration-slow) var(--ease-in-out);
}

/* Swipe transition for test runner questions */
.question-enter-right {
  animation: slideInRight var(--duration-normal) var(--ease-spring) both;
}

.question-enter-left {
  animation: slideInLeft var(--duration-normal) var(--ease-spring) both;
}

.question-exit-left {
  animation: slideOutLeft var(--duration-normal) var(--ease-in) both;
  position: absolute;
  width: 100%;
}

.question-exit-right {
  animation: slideOutRight var(--duration-normal) var(--ease-in) both;
  position: absolute;
  width: 100%;
}

/* Question content fade + slide on transition between questions */
@keyframes qFadeSlideForward {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes qFadeSlideBack {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.q-anim-forward { animation: qFadeSlideForward 0.28s ease-out both; }
.q-anim-back    { animation: qFadeSlideBack    0.28s ease-out both; }

/* Stagger the options container slightly for a cascading feel */
.options-container.q-anim-forward { animation-delay: 0.04s; }
.options-container.q-anim-back    { animation-delay: 0.04s; }

/* Pulse the question number badge on change */
@keyframes qNumPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.q-num-pulse { animation: qNumPulse 0.35s ease-out; }


/* ==========================================================================
   07. SVG / CHART ANIMATIONS
   ========================================================================== */

/* Score circle draw — stroke-dasharray must be set via JS */
@keyframes drawCircle {
  from {
    stroke-dashoffset: var(--circle-circumference, 440);
  }
  to {
    stroke-dashoffset: var(--circle-progress, 0);
  }
}

/* Radar chart polygon fill-in */
@keyframes radarDraw {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Bar chart fill */
@keyframes barFill {
  from { width: 0; }
  to   { width: var(--bar-width, 100%); }
}

/* Chart line draw */
@keyframes lineDraw {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0;    }
}

/* Axis labels fade in staggered */
@keyframes axisAppear {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* Data point appear */
@keyframes dotAppear {
  from { r: 0;   opacity: 0; }
  to   { r: 5;   opacity: 1; }
}

/* Area chart fill */
@keyframes areaFill {
  from { opacity: 0; }
  to   { opacity: 0.2; }
}


/* ==========================================================================
   08. NUMBER COUNTER / COUNT-UP
   ========================================================================== */

/* countUp is primarily driven by JS, but we provide the CSS animation cue */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Number roll-in (digits) */
@keyframes digitRoll {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Score reveal */
@keyframes scoreReveal {
  0%   { opacity: 0; transform: scale(0.5);  filter: blur(8px);  }
  70%  { opacity: 1; transform: scale(1.08); filter: blur(0);    }
  85%  { transform: scale(0.96); }
  100% { transform: scale(1);    }
}

/* Percentage count */
.count-up {
  animation: countUp var(--duration-slow) var(--ease-out) both;
}


/* ==========================================================================
   09. SKELETON / LOADING
   ========================================================================== */

/* Already defined in components.css as @keyframes shimmer.
   Additional loading states here: */

/* Dots loader */
@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0);   opacity: 0.3; }
  40%            { transform: scale(1);   opacity: 1;   }
}

.dots-loader {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.dots-loader span {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  animation: dotBounce 1.4s ease-in-out infinite;
}

.dots-loader span:nth-child(2) { animation-delay: 0.16s; }
.dots-loader span:nth-child(3) { animation-delay: 0.32s; }

/* Line loader (indeterminate) */
.line-loader {
  width: 100%;
  height: 3px;
  background: var(--color-bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.line-loader::after {
  content: '';
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  animation: lineSlide 1.4s ease-in-out infinite;
}

@keyframes lineSlide {
  0%   { left: -35%; }
  100% { left: 100%; }
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2.5px solid rgba(14, 165, 233, 0.20);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

.spinner-lg {
  width: 2.5rem;
  height: 2.5rem;
  border-width: 3px;
}

/* Page loading overlay */
.page-loading {
  position: fixed;
  inset: 0;
  z-index: var(--z-max);
  background: var(--color-bg-body);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  transition: opacity var(--duration-normal) var(--ease-out);
}

.page-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.page-loading__logo {
  width: 3rem;
  height: 3rem;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: breathe 2s ease-in-out infinite, glow 2s ease-in-out infinite;
}


/* ==========================================================================
   10. UTILITY ANIMATION CLASSES
   ========================================================================== */

/* Apply-once (animation: ... both) */
.animate-fadeIn           { animation: fadeIn          var(--duration-normal) var(--ease-out) both; }
.animate-fadeInUp         { animation: fadeInUp        var(--duration-normal) var(--ease-out) both; }
.animate-fadeInDown       { animation: fadeInDown      var(--duration-normal) var(--ease-out) both; }
.animate-fadeInLeft       { animation: fadeInLeft      var(--duration-normal) var(--ease-out) both; }
.animate-fadeInRight      { animation: fadeInRight     var(--duration-normal) var(--ease-out) both; }
.animate-scaleIn          { animation: scaleIn         var(--duration-normal) var(--ease-spring) both; }
.animate-scaleInSpring    { animation: scaleInSpring   var(--duration-slow)   var(--ease-out) both; }
.animate-slideInLeft      { animation: slideInLeft     var(--duration-normal) var(--ease-spring) both; }
.animate-slideInRight     { animation: slideInRight    var(--duration-normal) var(--ease-spring) both; }
.animate-pop              { animation: pop             var(--duration-normal) var(--ease-spring) both; }

/* Continuous loops */
.animate-float    { animation: float    4s ease-in-out infinite; }
.animate-pulse    { animation: pulse    2s ease-in-out infinite; }
.animate-glow     { animation: glow     2s ease-in-out infinite; }
.animate-spin     { animation: spin     0.7s linear infinite;    }
.animate-spin-slow{ animation: spinSlow 3s linear infinite;      }
.animate-bounce   { animation: bounce   1s ease-in-out infinite; }
.animate-breathe  { animation: breathe  3s ease-in-out infinite; }
.animate-ping     { animation: ping     1.5s ease-out infinite;  }
.animate-shake    { animation: shake    0.5s var(--ease-out) both; }

/* Delay helpers */
.delay-75   { animation-delay:  75ms; }
.delay-100  { animation-delay: 100ms; }
.delay-150  { animation-delay: 150ms; }
.delay-200  { animation-delay: 200ms; }
.delay-300  { animation-delay: 300ms; }
.delay-500  { animation-delay: 500ms; }
.delay-700  { animation-delay: 700ms; }
.delay-1000 { animation-delay: 1000ms; }

/* Duration helpers (override) */
.duration-fast    { animation-duration: var(--duration-fast);    }
.duration-normal  { animation-duration: var(--duration-normal);  }
.duration-slow    { animation-duration: var(--duration-slow);    }
.duration-slower  { animation-duration: var(--duration-slower);  }
.duration-slowest { animation-duration: var(--duration-slowest); }

/* Fill mode */
.fill-both     { animation-fill-mode: both;     }
.fill-forwards { animation-fill-mode: forwards; }
.fill-none     { animation-fill-mode: none;     }

/* Stagger children with CSS counters trick */
.stagger-children > * {
  animation-delay: calc(var(--stagger, 80ms) * var(--stagger-i, 0));
}

.stagger-children > *:nth-child(1)  { --stagger-i: 0; }
.stagger-children > *:nth-child(2)  { --stagger-i: 1; }
.stagger-children > *:nth-child(3)  { --stagger-i: 2; }
.stagger-children > *:nth-child(4)  { --stagger-i: 3; }
.stagger-children > *:nth-child(5)  { --stagger-i: 4; }
.stagger-children > *:nth-child(6)  { --stagger-i: 5; }
.stagger-children > *:nth-child(7)  { --stagger-i: 6; }
.stagger-children > *:nth-child(8)  { --stagger-i: 7; }
.stagger-children > *:nth-child(9)  { --stagger-i: 8; }
.stagger-children > *:nth-child(10) { --stagger-i: 9; }

/* Pause animation on hover */
.pause-on-hover:hover,
.pause-on-hover:focus {
  animation-play-state: paused;
}

/* Transition helpers */
.no-transition,
.no-transition * {
  transition: none !important;
  animation: none !important;
}

/* Hover transitions */
.hover-lift {
  transition: transform var(--duration-normal) var(--ease-spring),
              box-shadow var(--duration-normal) var(--ease-out);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.hover-scale {
  transition: transform var(--duration-fast) var(--ease-spring);
}

.hover-scale:hover {
  transform: scale(1.03);
}

.hover-scale:active {
  transform: scale(0.98);
}

.hover-glow {
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow);
}

.hover-primary-glow:hover {
  box-shadow: var(--shadow-glow);
}

/* Intersection Observer trigger classes */
.in-view-hidden {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.in-view-hidden.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered in-view */
.in-view-stagger .in-view-item {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.in-view-stagger.in-view .in-view-item:nth-child(1)  { transition-delay:  0ms; }
.in-view-stagger.in-view .in-view-item:nth-child(2)  { transition-delay: 80ms; }
.in-view-stagger.in-view .in-view-item:nth-child(3)  { transition-delay: 160ms; }
.in-view-stagger.in-view .in-view-item:nth-child(4)  { transition-delay: 240ms; }
.in-view-stagger.in-view .in-view-item:nth-child(5)  { transition-delay: 320ms; }
.in-view-stagger.in-view .in-view-item:nth-child(6)  { transition-delay: 400ms; }
.in-view-stagger.in-view .in-view-item:nth-child(7)  { transition-delay: 480ms; }
.in-view-stagger.in-view .in-view-item:nth-child(8)  { transition-delay: 560ms; }
.in-view-stagger.in-view .in-view-item:nth-child(9)  { transition-delay: 640ms; }
.in-view-stagger.in-view .in-view-item:nth-child(10) { transition-delay: 720ms; }

.in-view-stagger.in-view .in-view-item {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   11. PRINT STYLES
   ========================================================================== */

@media print {
  /* White background everywhere */
  *,
  *::before,
  *::after {
    background: white !important;
    background-image: none !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
    transition: none !important;
  }

  /* Reset body */
  body {
    padding-top: 0 !important;
    min-height: auto;
    font-size: 12pt;
    line-height: 1.5;
  }

  /* Hide non-essential elements */
  .nav,
  .nav__hamburger,
  .nav__mobile-overlay,
  .footer-sticky,
  .donate-float,
  .back-to-top,
  .toast-region,
  .modal-backdrop,
  .btn:not(.print-show),
  .results-actions,
  .results-share,
  .test-runner__sidebar,
  .question-nav-row,
  .hero__visual,
  .hero__float-card,
  .stats-section,
  .cta-banner,
  .filters,
  .test-select-filters,
  [data-no-print],
  .skip-link {
    display: none !important;
  }

  /* Show all content */
  .page-enter,
  .in-view-hidden {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Reset layout */
  .container,
  .container-sm,
  .container-md,
  .container-lg {
    max-width: none;
    padding-inline: 1cm;
  }

  /* Break pages properly */
  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid;
  }

  p, li {
    orphans: 3;
    widows: 3;
  }

  .card,
  .card-glass,
  .feature-card,
  .test-card {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    break-inside: avoid;
  }

  /* Results print layout */
  .results-hero {
    border: 2px solid #000 !important;
  }

  .results-breakdown,
  .results-charts {
    grid-template-columns: 1fr !important;
  }

  /* Footer print */
  .footer {
    border-top: 1px solid #ccc !important;
    padding: 1cm 0 0 !important;
  }

  /* Score circle — print in black */
  .score-circle__number {
    -webkit-text-fill-color: #000 !important;
    background: none !important;
  }

  /* Links show URL */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555 !important;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: "";
  }

  /* Progress bars as text */
  .progress-fill {
    background: #000 !important;
  }

  /* Medical disclaimer always shows on print */
  .medical-disclaimer {
    display: flex !important;
    border: 1px solid #000 !important;
  }

  /* Page breaks */
  .print-break-before { break-before: page; }
  .print-break-after  { break-after: page;  }
  .print-avoid-break  { break-inside: avoid; }
}


/* ==========================================================================
   12. REDUCED MOTION (prefers-reduced-motion: reduce)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  /* Disable ALL animations and transitions */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  /* Keep visibility states working (just snap to final value) */
  .modal-backdrop,
  .nav__dropdown-menu,
  .nav__mobile-overlay {
    transition: visibility 0s !important;
  }

  /* Disable floating animations */
  .animate-float,
  .animate-pulse,
  .animate-glow,
  .animate-breathe,
  .animate-bounce,
  .animate-ping,
  .hero::before,
  .hero::after,
  .donate-float {
    animation: none !important;
  }

  /* Disable skeleton shimmer */
  .skeleton::after,
  .progress-fill::after,
  .bar-chart__fill::after,
  .line-loader::after {
    animation: none !important;
  }

  /* Disable page transitions */
  .page-enter,
  .page-enter-active,
  .page-exit,
  .page-exit-active,
  .question-enter-right,
  .question-enter-left,
  .question-exit-left,
  .question-exit-right {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  /* Disable chart animations */
  .score-circle__fill,
  .bar-chart__fill {
    animation: none !important;
    transition: none !important;
  }

  /* Keep focus styles accessible */
  :focus-visible {
    transition: none !important;
  }

  /* Disable hover transforms for reduced motion */
  .hover-lift:hover,
  .card-hover:hover,
  .card-glass.card-hover:hover,
  .feature-card:hover,
  .test-card:hover,
  .edu-card:hover,
  .resource-card:hover,
  .edu-topic-card:hover,
  .next-step-item:hover,
  .timeline-entry:hover .timeline-entry__card,
  .option-btn:hover {
    transform: none !important;
  }

  /* Keep critical opacity transitions (e.g., modal show/hide) */
  .modal-backdrop {
    transition: opacity 0.01ms, visibility 0s !important;
  }

  /* In-view animations should resolve immediately */
  .in-view-hidden {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .in-view-stagger .in-view-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    transition-delay: 0ms !important;
  }

  /* Hero elements should just appear */
  .hero__label,
  .hero__title,
  .hero__subtitle,
  .hero__cta,
  .hero__disclaimer,
  .hero__visual,
  .hero__trust {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Score/result animations */
  .score-circle__number,
  .count-up {
    animation: none !important;
  }

  /* Dots loader — no animation, show static */
  .dots-loader span {
    animation: none !important;
    opacity: 1 !important;
    transform: scale(1) !important;
  }
}
