@media (max-width: 62rem) {
    .js-menu .topbar { position: sticky; top: 0; }
    .js-menu .mobile-menu-toggle {
        display: grid;
        width: 2.75rem;
        height: 2.75rem;
        flex: 0 0 2.75rem;
        place-content: center;
        gap: 5px;
        border: 1px solid #637e97;
        border-radius: .6rem;
        background: var(--nav-highlight);
    }
    .mobile-menu-toggle span { width: 1.25rem; height: 2px; border-radius: 1px; background: #fff; }
    .js-menu .topbar nav {
        position: fixed;
        inset: var(--header-height) 0 0 auto;
        width: min(100%, 22rem);
        max-height: calc(100vh - var(--header-height));
        max-height: calc(100dvh - var(--header-height));
        overflow-y: auto;
        align-content: start;
        background: var(--nav);
        padding: .75rem;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        visibility: hidden;
        pointer-events: none;
        transform: translateX(100%);
        transition: transform .18s ease;
    }
    .js-menu .topbar nav.is-open { visibility: visible; pointer-events: auto; transform: none; }
    .nav-scrim.is-open { display: block; position: fixed; inset: 0; z-index: 9; background: #10223a8c; }
}

@media (min-width: 43rem) {
    .page { padding: 1.6rem 1.4rem 3rem; }
    .grid.two, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 55rem) {
    .is-public .desktop-calendar { display: grid; }
    .is-public .mobile-list { display: none; }
}
@media (min-width: 62.001rem) {
    .is-public .topbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding-inline: max(0rem, calc((100% - 94rem) / 2));
    }
    .is-public .topbar nav { display: flex; align-items: center; flex-wrap: wrap; padding: .6rem 1.4rem .6rem 0; }
    .is-public .topbar-identity { padding-inline-start: 1.4rem; }
    .is-admin { padding-left: var(--sidebar-width); }
    .is-admin .topbar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; }
    .is-admin .topbar nav { overflow: auto; flex: 1; align-content: start; }
    .is-admin .topbar-identity { flex: 0 0 auto; border-bottom: 1px solid #334a61; }
}
@media (min-width: 70rem) {
    .is-admin .desktop-calendar { display: grid; }
    .is-admin .mobile-list { display: none; }
}
@media (max-width: 53rem), (min-width: 62.001rem) and (max-width: 70rem) {
    .table-wrap { overflow: visible; }
    .table, .table tbody, .table tr, .table td { display: block; }
    .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .table tr {
        margin-bottom: .65rem;
        padding: .4rem .7rem;
        border: 1px solid var(--border);
        border-radius: .65rem;
        background: var(--surface);
    }
    .table tr.has-overlap { border-left: 4px solid #c3760b; background: #fffbf2; }
    .table .has-overlap td:first-child { box-shadow: none; }
    .table td { border-bottom: 0; padding: .36rem 0; }
    .table td[data-label] { display: grid; grid-template-columns: minmax(5.7rem, 31%) minmax(0, 1fr); gap: .15rem .6rem; }
    .table td[data-label]::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .82rem;
        font-weight: 650;
        grid-row: 1 / span 2;
    }
    .table td[data-label] > * { justify-self: start; grid-column: 2; }
    .table td:empty { display: none; }
}
@media (max-width: 30rem) {
    .filterbar { align-items: stretch; }
    .filterbar .field { flex-basis: 100%; }
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-stats > :last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
    body, .is-admin { padding: 0; background: #fff; color: #000; font-size: 11pt; }
    .topbar, .skip-link, .nav-scrim, .footer, .filterbar, .hero, .actions, .mobile-list { display: none !important; }
    .page { width: 100%; padding: 0; }
    .print-title { display: block; margin-bottom: 1rem; }
    .calendar.print-calendar { display: grid !important; box-shadow: none; }
    .calendar .day { min-height: 0; break-inside: avoid; }
}
