@media screen and (prefers-reduced-motion: no-preference) {
  :root { --section-rise: 20px; }

  /* Hold the first paint until the deferred initializer runs; a failed script releases it. */
  @media (scripting: enabled) {
    html:not(.sections-ready) body > :is(main, footer) {
      animation: await-sections 650ms step-end;
    }
  }

  [data-section-motion="waiting"] { opacity: 0; }
  [data-section-motion="entering"], #press-notice:popover-open {
    animation: section-entrance 360ms cubic-bezier(.2,.7,.25,1) var(--section-delay, 0ms) backwards;
  }
  .archive-card.is-selected, [data-section-motion]:focus-within {
    animation: none;
    opacity: 1;
  }

  @media (max-width: 700px) {
    :root { --section-rise: 12px; }
  }
}

@keyframes await-sections { from { opacity: 0; } to { opacity: 1; } }
@keyframes section-entrance {
  from { opacity: 0; translate: 0 var(--section-rise); }
  to { opacity: 1; translate: 0 0; }
}
