/* Keep normal document navigation, history, forms and script lifecycles intact. */

::view-transition-old(root){animation:none;opacity:1}
::view-transition-new(root){animation:page-in 240ms cubic-bezier(.22,.61,.36,1) both}
::view-transition-group(root){animation-duration:240ms}
::view-transition-old(root),::view-transition-new(root){mix-blend-mode:normal}
@keyframes page-in{from{opacity:0}to{opacity:1}}
/* Keep the outgoing snapshot opaque under the incoming page: no white gap. */
/* Unsupported browsers keep native navigation without a second page fade. */
.page-loading-indicator{position:fixed;inset:0 0 auto;height:3px;z-index:2147483646;pointer-events:none;overflow:hidden;opacity:0;background:#d9edff;transition:opacity .15s}
.page-loading-indicator:after{content:"";display:block;width:35%;height:100%;background:#1266cc;transform:translateX(-110%)}
html.is-page-loading .page-loading-indicator{opacity:1}
html.is-page-loading .page-loading-indicator:after{animation:page-loading-pass 1.1s ease-in-out infinite}
@keyframes page-loading-pass{to{transform:translateX(390%)}}
@media(prefers-reduced-motion:reduce){::view-transition-old(root),::view-transition-new(root),html.page-motion-fallback #main-content{animation:none!important}.page-loading-indicator{transition:none}html.is-page-loading .page-loading-indicator:after{animation:none;transform:none;width:100%}}

/* Keep the directory list and WebGL map inside the same opaque outgoing snapshot.
   City-to-results navigation already animates in place and preserves the map. */

/* A ready profile becomes a sheet over the still-opaque directory snapshot. */
html.profile-slide-in::view-transition-group(root),
html.profile-slide-out::view-transition-group(root){animation-duration:420ms;overflow:clip}
html.profile-slide-in::view-transition-old(root){animation:profile-recede 420ms cubic-bezier(.22,.8,.24,1) both;z-index:1}
html.profile-slide-in::view-transition-new(root){animation:profile-enter 420ms cubic-bezier(.22,.8,.24,1) both;z-index:2;box-shadow:-20px 0 60px #102e4930}
html.profile-slide-out::view-transition-old(root){animation:profile-leave 380ms cubic-bezier(.4,0,.2,1) both;z-index:2;box-shadow:-20px 0 60px #102e4930}
html.profile-slide-out::view-transition-new(root){animation:profile-return 380ms cubic-bezier(.4,0,.2,1) both;z-index:1}
@keyframes profile-enter{from{transform:translateX(100%)}to{transform:translateX(0)}}
@keyframes profile-recede{from{transform:translateX(0);filter:brightness(1)}to{transform:translateX(-5%);filter:brightness(.9)}}
@keyframes profile-leave{from{transform:translateX(0)}to{transform:translateX(100%)}}
@keyframes profile-return{from{transform:translateX(-5%);filter:brightness(.9)}to{transform:translateX(0);filter:brightness(1)}}
