/* Smooth page transitions — no white flash between pages */
html{background:#fff}

/* Chromium / Safari 18.2+: browser keeps the old page on screen and cross-fades
   into the new one only when it is ready to paint (no blank frame). */
@view-transition{navigation:auto}
::view-transition-old(root){animation:pc-out .22s ease both}
::view-transition-new(root){animation:pc-in .38s ease both}
@keyframes pc-out{to{opacity:0}}
@keyframes pc-in{from{opacity:0}}

/* Fallback for browsers without cross-document view transitions (e.g. Firefox) */
@supports not (view-transition-name:none){
  body{animation:pc-fade .45s ease backwards}
  html.pc-leaving body{opacity:0;transition:opacity .2s ease}
}
@keyframes pc-fade{from{opacity:0}}

/* Thin top progress bar while the next page is fetched */
#pc-bar{position:fixed;top:0;left:0;height:3px;width:0;z-index:2147483647;
  background:linear-gradient(90deg,#2e7d32,#7cb342);opacity:0;pointer-events:none;
  transition:width .6s cubic-bezier(.1,.7,.2,1),opacity .25s ease}
html.pc-leaving #pc-bar{opacity:1;width:85%}

@media (prefers-reduced-motion:reduce){
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
  body{animation:none!important}
}
