/* Shared cross-page fade. Content stays visible if JavaScript is unavailable. */
body {
  animation: page-fade-in 320ms ease-out backwards;
}

body.is-page-leaving {
  animation: page-fade-out 180ms ease-in forwards;
  pointer-events: none;
}

body.is-page-restoring {
  animation: page-fade-restore 320ms ease-out backwards;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes page-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes page-fade-restore {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body,
  body.is-page-leaving,
  body.is-page-restoring {
    animation: none !important;
    opacity: 1 !important;
  }
}

@media print {
  body,
  body.is-page-leaving,
  body.is-page-restoring {
    animation: none !important;
    opacity: 1 !important;
  }
}
