/*
  Accounting is server-rendered: every sidebar click loads a full page. Without this, the
  browser repaints header, sidebar and content together, which reads as the whole shell
  "reloading". Cross-document view transitions (Chrome/Edge 126+; ignored elsewhere) keep the
  previous page on screen until the next one is ready, hold the header and sidebar in place,
  and only cross-fade the content area.
*/
@view-transition {
  navigation: auto;
}

#header {
  view-transition-name: accounting-header;
}

#sidebar {
  view-transition-name: accounting-sidebar;
}

/* Shell parts swap instantly instead of fading, so they appear perfectly still. */
::view-transition-old(accounting-header),
::view-transition-new(accounting-header),
::view-transition-old(accounting-sidebar),
::view-transition-new(accounting-sidebar) {
  animation: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 120ms;
}

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