/* Cross-fades between portal pages that have no globe (motion pass 1d). Linked by layout() on every page but home and
   /signin: a cross-document view transition runs only when BOTH pages opt in, so a move to or from those two pages
   (each with its own globe) stays exactly as before, and a globe is never in two places. The top bar is the same bar on
   both pages: it stays; the rest fades at the standard step. Browsers without it navigate as before. */
@view-transition { navigation: auto; }
.nav { view-transition-name: mg-nav; }
::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
  animation-duration: var(--mg-t-standard); animation-timing-function: var(--mg-ease);
}
/* The page itself fades THROUGH, not across: the old page has gone by 40 % of the step and the new one comes in over
   the rest, so the two pages' words are never drawn over each other (a plain cross-fade showed "Plans, billed m" through
   "Setup guides" at 40-120 ms, and after Add the account at the form through the account at the new device). */
@keyframes mg-page-out { to { opacity: 0; } }
@keyframes mg-page-in { from { opacity: 0; } }
::view-transition-old(root) { animation: mg-page-out calc(var(--mg-t-standard) * .4) var(--mg-ease) both; }
::view-transition-new(root) {
  animation: mg-page-in calc(var(--mg-t-standard) * .6) var(--mg-ease) calc(var(--mg-t-standard) * .4) both;
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
