/* Cross-document View Transitions.
 *
 * Opting in on both the outgoing and incoming page lets the browser crossfade
 * one full-page load into the next instead of flashing white in between.
 * Browsers without support (Firefox) ignore all of this and navigate as usual.
 * Loaded on every page so any link between two of them qualifies. */
@view-transition {
    navigation: auto;
}

/* Default crossfade for the whole document. Kept short: the point is to hide
 * the blank frame between pages, not to draw attention to the transition. */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .18s;
    animation-timing-function: ease;
}

/* Shared chrome is named so the browser pairs it across pages and holds it in
 * place instead of fading it out and back in. Only the content area moves. */
.sb {
    view-transition-name: sidebar;
}

.fld-col {
    view-transition-name: folder-column;
}

::view-transition-old(sidebar),
::view-transition-new(sidebar),
::view-transition-old(folder-column),
::view-transition-new(folder-column) {
    animation: none;
}

/* Users who asked for less motion get an instant swap. */
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}
