/* Keep the public document as the only vertical scroll surface. */
html:root {
    min-height: 100%;
    overflow-x: clip;
    overflow-y: auto;
}

body:not(.admin) {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    overflow-x: clip;
    overflow-y: visible;
}

body:not(.admin) > main {
    flex: 1 0 auto;
    min-height: 0;
}

body:not(.admin) > .site-footer {
    display: block;
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
}

.site-footer__grid {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.site-footer__grid > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.site-footer__grid > div.site-footer__contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.site-footer__contact > a {
    margin: 0;
}

@media (max-width: 767px) {
    html,
    body:not(.admin) {
        overflow-x: clip;
        overflow-y: visible;
    }

    body:not(.admin) > .site-footer {
        display: block;
        padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px));
    }

    .site-footer__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }

    .site-footer__grid > div {
        display: grid;
        justify-items: start;
        gap: 5px;
    }

    .site-footer__grid > div > b {
        margin-bottom: 4px;
    }

    .site-footer__grid p,
    .site-footer__grid a,
    .site-footer__grid button {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    body:not(.admin) > .site-footer {
        padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px));
    }

    .site-footer__grid > div:last-child {
        padding-right: 72px;
    }
}
