.site-nav-menu {
    display: flex;
    flex-direction: column;
}

.site-nav-menu-links {
    display: flex;
    flex-direction: column;
    gap: calc(var(--space) / 2);
    padding: var(--space);
    padding-top: calc(var(--space) - 2px);
}

.site-nav-menu-links a, .site-nav-menu button{
    text-shadow: 0 0 2px var(--black);
    font-weight: bold;
    font-size: .9em;
    font-family: 'Libre Caslon', serif;
    color: var(--gold-1);
}

.site-nav-menu button {
    padding: calc(var(--space) / 2);
    margin-left: var(--space);
    margin-right: var(--space);
    text-align: center;
    box-sizing: border-box;
    border-bottom: 1px solid var(--gold-1);
}

.site-nav-menu-links a:hover {
    color: var(--blue-2);
}

.mw-list-item {
    display: flex;
    gap: calc(var(--space));
    overflow: clip;
}

#site-lastedit.layout-mouse {
    text-align: center;
    font-size: .9em;
    color: var(--blue-5);
    padding-left: var(--space);
    padding-right: var(--space);
}

#site-nav-toc-title {
    justify-content: center;
}

#site-nav-wrapper {
    width: 100%;
}

#site-nav-wrapper > div {
    display: flex;
}

.nav-external:last-of-type {
    display: none;
}

@media (min-width: 1081px) {

    #site-nav-wrapper {
        grid-column: navstart;
        grid-row: pagebody / -1;
    }

    #site-lastedit.layout-touch {
        display: none;
    }

    .site-nav-menu-links > li:not(#site-nav-toc-title):hover::before {
        background-image: url(assets/cursor-right.svg);
        background-size: contain;
        background-repeat: no-repeat;
        background-position: bottom;
        content: '';
        width: 1em;
        flex-shrink: 0;
        margin-right: -.3em;
    }

    #site-nav-wrapper > div {
        flex-direction: column;
        gap: calc(var(--space) * 2);
        height: 100%;
    }

    .site-nav-menu button {
        display: none;
    }

    .site-nav-sticky {
        position: sticky;
        top: calc(var(--space));
    }

}

@media (max-width: 1080px) {

    #site-lastedit.layout-mouse {
        display: none;
    }

    #site-nav-wrapper .site-nav-menu {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    #site-nav-wrapper {
        position: fixed;
        bottom: 0;
        z-index: 6;
    }

    #site-nav-wrapper > div {
        flex-direction: row-reverse;
        height: fit-content;
        justify-content: center;
        gap: var(--space);
        align-items: end;
    }

    .site-nav-menu {
        overflow-y: hidden;
    }

    .site-nav-menu-links {
        align-self: center;
        align-items: center;
        padding-top: calc(var(--space));
    }

    .site-nav-menu:not(:focus-within) {
        height: calc(var(--space) * 3);
    }

}

@media (max-width: 720px) {

    #site-nav-wrapper > div {
        width: fit-content;
    }

    #site-nav-wrapper {
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
    }

    .site-nav-menu:last-child {
        margin-left: .6em;
    }

    .site-nav-menu {
        width: 90vw;
        flex-shrink: 0;
        scroll-snap-align: center;
    }

    #site-nav-wrapper > div::before {
        content: '';
        padding: 1px;
    }
}