/* Only linked by the outer-dashboard allowlist. Full document navigation,
   authentication, dirty-form guards and browser history remain native. */
@view-transition { navigation: auto; }

body[data-navigation="smooth"] [data-app-side] { view-transition-name: ld-sidebar; }
body[data-navigation="smooth"] #gradientHeader { view-transition-name: ld-header; }
body[data-navigation="smooth"] :is(.portal-shell>.portal-main,.portal-shell>.python-main,.catalog-app>.catalog-stage) { view-transition-name: ld-content; }

/* Do not morph pane dimensions or capture input behind the temporary images. */
::view-transition { pointer-events: none; }
::view-transition-group(root),
::view-transition-group(ld-sidebar),
::view-transition-group(ld-header),
::view-transition-group(ld-content) { animation: none; }

/* Never show two pages at once: old text must not remain beneath new text.
   The new content is already readable at the first transition frame; only
   a subtle 4% opacity settle distinguishes it from the stationary shell. */
::view-transition-old(root),
::view-transition-old(ld-sidebar),
::view-transition-old(ld-header),
::view-transition-old(ld-content) { display: none; animation: none; }
::view-transition-new(root),
::view-transition-new(ld-sidebar),
::view-transition-new(ld-header) { animation: none; mix-blend-mode: normal; }
::view-transition-image-pair(ld-content) { isolation: isolate; }
::view-transition-new(ld-content) {
  animation: ld-content-reveal 150ms cubic-bezier(.4,0,.2,1) both;
  mix-blend-mode: normal;
}
@keyframes ld-content-reveal { from { opacity: .96; } to { opacity: 1; } }

/* AppearancePreferences uses "on" to mean reduced motion is enabled. */
html[data-reduce-motion="on"]::view-transition-new(ld-content) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(ld-content) { animation: none; }
}
