.site-mobile-shell,
.site-mobile-nav,
.site-mobile-sheet {
    display: none;
}

@media (max-width: 48rem) {
    :root {
        --site-mobile-nav-height: 4rem;
    }

    body.has-site-mobile-nav {
        padding-bottom: calc(var(--site-mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    }

    body.has-site-mobile-nav.site-mobile-sheet-open {
        overflow: hidden;
    }

    body.has-site-mobile-nav .navbar,
    body.has-site-mobile-nav .topbar > .nav {
        display: none !important;
    }

    body.home-page #landing {
        height: calc(100dvh - var(--site-mobile-nav-height) - env(safe-area-inset-bottom, 0px)) !important;
    }

    body.programs-page #action-buttons {
        padding-top: 1.25rem !important;
    }

    .site-mobile-shell {
        display: contents;
    }

    .site-mobile-nav {
        position: fixed;
        inset: auto 0 0;
        z-index: 80;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: var(--site-mobile-nav-height);
        padding: 0.25rem max(0.35rem, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px)
            max(0.35rem, env(safe-area-inset-left, 0px));
        color: #4a423b;
        background: rgba(255, 253, 249, 0.98);
        border-top: 1px solid rgba(23, 19, 16, 0.22);
        box-shadow: 0 -8px 24px rgba(23, 19, 16, 0.08);
    }

    .site-mobile-nav__item {
        appearance: none;
        display: flex;
        min-width: 0;
        min-height: 3.5rem;
        padding: 0.35rem 0.15rem 0.3rem;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        color: inherit;
        background: transparent;
        border: 0;
        border-radius: 0.65rem;
        font: 700 0.625rem/1.1 'Montserrat', system-ui, sans-serif;
        letter-spacing: 0.02em;
        text-decoration: none;
        cursor: pointer;
    }

    .site-mobile-nav__item svg {
        width: 1.35rem;
        height: 1.35rem;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.75;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .site-mobile-nav__item[aria-current='page'] {
        color: #c64f18;
        background: #fdecd3;
    }

    .site-mobile-nav__item:focus-visible,
    .site-mobile-sheet a:focus-visible,
    .site-mobile-sheet button:focus-visible {
        outline: 3px solid #7b3f9d;
        outline-offset: 1px;
    }

    .site-mobile-sheet:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 70;
        display: block;
    }

    .site-mobile-sheet__backdrop {
        position: absolute;
        inset: 0;
        width: 100%;
        padding: 0;
        background: rgba(23, 19, 16, 0.42);
        border: 0;
    }

    .site-mobile-sheet__panel {
        position: absolute;
        inset: auto 0 calc(var(--site-mobile-nav-height) + env(safe-area-inset-bottom, 0px));
        max-height: min(70dvh, 34rem);
        padding: 1rem 1rem 1.1rem;
        overflow-y: auto;
        color: #171310;
        background: #fffdf9;
        border-top: 2px solid #171310;
        border-radius: 1rem 1rem 0 0;
        box-shadow: 0 -18px 48px rgba(23, 19, 16, 0.18);
    }

    .site-mobile-sheet__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgba(23, 19, 16, 0.2);
    }

    .site-mobile-sheet__eyebrow {
        margin: 0 0 0.15rem;
        color: #c64f18;
        font: 700 0.625rem/1.2 'Montserrat', system-ui, sans-serif;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .site-mobile-sheet h2 {
        margin: 0;
        font: 400 1.45rem/1.1 'Gloock', Georgia, serif;
    }

    .site-mobile-sheet__close {
        display: grid;
        width: 2.75rem;
        height: 2.75rem;
        padding: 0;
        place-items: center;
        color: #171310;
        background: #f0ece5;
        border: 0;
        border-radius: 50%;
    }

    .site-mobile-sheet__close svg {
        width: 1.2rem;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
    }

    .site-mobile-sheet nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        padding-top: 0.75rem;
    }

    .site-mobile-sheet nav a {
        display: flex;
        min-height: 4.25rem;
        padding: 0.7rem 0.75rem;
        flex-direction: column;
        justify-content: center;
        color: #171310;
        background: #f0ece5;
        border: 1px solid rgba(23, 19, 16, 0.14);
        border-radius: 0.65rem;
        text-decoration: none;
    }

    .site-mobile-sheet nav a:nth-child(1) { background: #fdecd3; }
    .site-mobile-sheet nav a:nth-child(2) { background: #cfe7e0; }
    .site-mobile-sheet nav a:nth-child(3) { background: #ded1f0; }
    .site-mobile-sheet nav a:nth-child(4) { background: #f9dcda; }

    .site-mobile-sheet nav a[aria-current='page'] {
        border-color: #171310;
        box-shadow: inset 0 -3px #ef6a1e;
    }

    .site-mobile-sheet nav span {
        font: 700 0.85rem/1.2 'Montserrat', system-ui, sans-serif;
    }

    .site-mobile-sheet nav small {
        margin-top: 0.2rem;
        color: #5d554e;
        font: 500 0.67rem/1.25 'Montserrat', system-ui, sans-serif;
    }
}
