/* Keep the footer below content and at the viewport bottom on short pages. */
body:has(.site-footer),
body:has(> footer.footer) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
}
body:has(.site-footer) > .page-shell {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 0;
}
body:has(.site-footer) > .page-shell > .page-content {
    flex: 1 0 auto;
}
body:has(.site-footer) > main,
body:has(> footer.footer) > main {
    flex: 1 0 auto;
}
footer.site-footer,
body > footer.footer {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto !important;
}

/* Let the branding scroll away before the navigation reaches the viewport top. */
body:has(header.site-header) {
    padding-top: 0 !important;
    transition: none !important;
}
header.site-header {
    position: sticky !important;
    top: calc(0px - var(--site-sticky-offset, 0px)) !important;
    flex: 0 0 auto;
    align-self: stretch;
    z-index: 3000;
}
@media (max-width: 920px) {
    .mobile-only-navigation {
        display: contents !important;
    }
}

/* Use the page scrollbar, rather than a separate fixed-height body scrollbar. */
html:has(header.site-header),
body:has(header.site-header) {
    height: auto !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
}
