/* RetroWork G06-C R1 — editorial pages only. No CSS affects the separate /laptop-test/ app. */
/* JS refuses initialization if this CSS readiness token was not loaded. */
:root { --rw-g06-css-ready: 1; }
/* Hidden wins even if a page's other rules change in the future. */
.rw-mobile-nav-trigger[hidden], .rw-mobile-nav-popup[hidden], .rw-mobile-nav-backdrop[hidden] { display: none !important; }
.rw-mobile-nav-trigger, .rw-mobile-nav-popup, .rw-mobile-nav-backdrop { display: none; }

@media (max-width: 680px) {
    /* R3: The original five header links remain visible on mobile.
       The floating menu is an additional navigation aid, not their replacement. */
    body.rw-mobile-nav-open { overflow: hidden; }
    body.rw-mobile-nav-ready .rw-mobile-nav-trigger:not([hidden]) {
        position: fixed; z-index: 53; display: flex; align-items: center; justify-content: center;
        gap: .55rem; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        right: calc(16px + env(safe-area-inset-right, 0px));
        min-width: 116px; min-height: 54px; padding: 8px 17px;
        color: #111; background: #ffb000; border: 2px solid #ffcb54;
        border-radius: 28px; box-shadow: 0 10px 30px rgba(0, 0, 0, .7);
        font: 850 1rem/1.2 system-ui, -apple-system, 'Segoe UI', sans-serif;
        cursor: pointer; touch-action: manipulation;
    }
    .rw-mobile-nav-symbol { font-size: 23px; line-height: 1; }
    .rw-mobile-nav-trigger:hover { background: #ffc13c; }
    .rw-mobile-nav-trigger:focus-visible { outline: 3px solid #78e0d3; outline-offset: 4px; }
    body.rw-mobile-nav-ready .rw-mobile-nav-backdrop:not([hidden]) {
        display: block; position: fixed; z-index: 51; inset: 0;
        background: rgba(0, 0, 0, .67);
    }
    body.rw-mobile-nav-ready .rw-mobile-nav-popup:not([hidden]) {
        display: block; position: fixed; z-index: 52;
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
        right: calc(16px + env(safe-area-inset-right, 0px));
        width: min(calc(100vw - 32px), 320px);
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 112px - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - 112px - env(safe-area-inset-bottom, 0px));
        overflow-y: auto; overscroll-behavior: contain;
        color: #f4f1e8; background: #141a21;
        border: 1px solid #4a5561; border-top: 3px solid #ffb000;
        box-shadow: 0 20px 60px rgba(0,0,0,.86);
    }
    .rw-mobile-nav-heading { padding: 13px 18px 10px; color: #ffb000;
        font: 850 .76rem/1.5 system-ui, sans-serif; letter-spacing: .12em; }
    .rw-mobile-nav-links { margin: 0; padding: 0; list-style: none; }
    .rw-mobile-nav-links a { display: block; min-height: 50px; padding: 13px 18px;
        color: #f4f1e8; text-decoration: none; font-size: .95rem;
        line-height: 1.5; font-weight: 700; border-top: 1px solid #303842; }
    .rw-mobile-nav-links a[aria-current="page"] { color: #ffb000; background: rgba(255,176,0,.06); }
    .rw-mobile-nav-links a:hover, .rw-mobile-nav-links a:focus-visible {
        color: #ffb000; background: #28313b;
    }
    .rw-mobile-nav-links a:focus-visible { outline: 3px solid #78e0d3; outline-offset: -3px; }
}
@media (prefers-reduced-motion: reduce) {
    .rw-mobile-nav-trigger, .rw-mobile-nav-popup, .rw-mobile-nav-backdrop { transition: none; animation: none; }
}

@media print {
    .rw-mobile-nav-trigger, .rw-mobile-nav-popup, .rw-mobile-nav-backdrop { display: none !important; }
    body.rw-mobile-nav-ready .site-header .main-nav { display: flex !important; flex-wrap: wrap; }
    body.rw-mobile-nav-open { overflow: visible !important; }
}
