/* Progressive cross-document navigation only. The browser owns navigation,
   scroll restoration and snapshots; no click interception or hidden-page state.
   Hash routes, language switches and gameplay do not start a transition. */
@media screen and (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 260ms;   /* 180ms → 260ms (2026-09-25): long enough to read as a turn of the page */
    animation-timing-function: cubic-bezier(.22, 1, .36, 1);
  }

  /* Separate the shared header from the page fade, without moving or resizing
     it between layouts. Standalone works without this header simply crossfade. */
  .site-header { view-transition-name: site-header; }
  ::view-transition-group(site-header),
  ::view-transition-old(site-header),
  ::view-transition-new(site-header) { animation: none; }
  ::view-transition-old(site-header) { opacity: 0; }
  ::view-transition-new(site-header) { opacity: 1; }

  /* Keep the snapshot overlay from intercepting a second navigation. */
  ::view-transition { pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* V9 has one navigation set. Do not replay V5's staggered nav-zone entrance
   while the shared header is held steady during a cross-document transition. */
html.nav-switch .site-header .container > div:first-child > *,
html.nav-switch .site-header nav > * { opacity: 1; animation: none; }
