/* Phone fixes for the document-style pages (rules, staff SOP, penal codes, reference, onboarding). */
@media (max-width: 992px) {
    body .app-layout { margin: 1rem auto; padding: 0 1rem; gap: 1rem; }
    body .app-layout > * { min-width: 0; }

    /* Section links become a swipeable strip instead of disappearing. */
    body .sidebar {
        display: flex;
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.4rem;
        padding: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    body .sidebar .nav-header { display: none; }
    body .sidebar .nav-link { flex: 0 0 auto; white-space: nowrap; padding: 0.55rem 0.8rem; }
    body .sidebar .nav-link:hover,
    body .sidebar .nav-link.active { transform: none; }
}

@media (max-width: 720px) {
    body > header {
        position: static;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    body > header .brand-container { gap: 0.75rem; min-width: 0; }
    body > header .brand-logo-img { height: 44px; }
    body > header .brand-text h1 { font-size: 1.05rem; letter-spacing: 1px; }
    body > header .brand-text p { font-size: 0.75rem; letter-spacing: 1px; }
    body > header .search-box { width: 100%; }
    body > header .header-links { width: 100%; }

    body table { display: block; max-width: 100%; overflow-x: auto; }
    body img { max-width: 100%; height: auto; }
}

body { overflow-x: hidden; }
