

/* ------------------------------------------------------------------ */
/* v2.2 home-menu-fixes-20261122/v2.2 — 22 Nov 2026
   Shared CSS for the clock-bar alert slot and the Menu box height.
   HTML query pins on the pages are bumped to this file's sha8.
   A. Clock bar (has [data-vilnius-clock]): after JS sets .alert-ready,
      "System · Live" is replaced visually by the live level colour.
      The pill is hidden only when .alert-ready is set, so old JS + new
      CSS still shows System · Live and the pill (no empty slot).
      If JS cannot read a level, .alert-ready is not set and the leading
      slot is emptied by JS; no stale colour.
   B. Map (MF1): colour rules include .pg-map and .wrap > span.live so
      they beat .pg-map .status-strip .wrap > span:not(.alert-mount)
      (strip-dim gray). Map's strip stays dark in every theme (--strip-bg),
      so Map always uses the dark-strip colours, including #f08a3a for ORANGE.
   C. White and sand (MF2): index/daily/about/air/privacy strips use
      --bg-elev (light). Those pages use --t-sev-* so level text meets
      WCAG AA 4.5:1. Dark theme keeps #f08a3a for ORANGE (7.18:1 on #14171D).
   D. Menu box: 44px -> 33px (25%). This rule is .site-header .nav-toggle
      and DOES apply to Forces (live forces.html uses that class). It does
      not change the Map hamburger (.map-icon-btn). */
/* ------------------------------------------------------------------ */

/* Hide the pill only once the new JS has claimed the leading slot. */
.status-strip:has([data-vilnius-clock]).alert-ready .alert-mount {
  display: none !important;
}

/* ---- Dark-strip colours (dark theme on all clock bars; Map in every theme) ---- */
.status-strip:has([data-vilnius-clock]).alert-ready.alert-green .live { color: #5ecf9a; }
.status-strip:has([data-vilnius-clock]).alert-ready.alert-yellow .live { color: #e0b040; }
.status-strip:has([data-vilnius-clock]).alert-ready.alert-orange .live { color: #f08a3a; }
.status-strip:has([data-vilnius-clock]).alert-ready.alert-red .live { color: #ff6b6b; }

/* MF1: beat .pg-map .status-strip .wrap > span:not(.alert-mount) (0,4,1). */
.pg-map .status-strip:has([data-vilnius-clock]).alert-ready.alert-green .wrap > span.live { color: #5ecf9a; }
.pg-map .status-strip:has([data-vilnius-clock]).alert-ready.alert-yellow .wrap > span.live { color: #e0b040; }
.pg-map .status-strip:has([data-vilnius-clock]).alert-ready.alert-orange .wrap > span.live { color: #f08a3a; }
.pg-map .status-strip:has([data-vilnius-clock]).alert-ready.alert-red .wrap > span.live { color: #ff6b6b; }

.status-strip:has([data-vilnius-clock]).alert-ready .live::before {
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

/* ---- Light strips (white / sand on pg-n26 and pg-legacy). Map excluded: its strip stays dark. ---- */
:root[data-theme="white"] :where(.pg-n26, .pg-legacy) .status-strip:has([data-vilnius-clock]).alert-ready.alert-green .live { color: #1E6B4F; }
:root[data-theme="white"] :where(.pg-n26, .pg-legacy) .status-strip:has([data-vilnius-clock]).alert-ready.alert-yellow .live { color: #7A5B00; }
:root[data-theme="white"] :where(.pg-n26, .pg-legacy) .status-strip:has([data-vilnius-clock]).alert-ready.alert-orange .live { color: #9A3F0C; }
:root[data-theme="white"] :where(.pg-n26, .pg-legacy) .status-strip:has([data-vilnius-clock]).alert-ready.alert-red .live { color: #A3221C; }

:root[data-theme="sand"] :where(.pg-n26, .pg-legacy) .status-strip:has([data-vilnius-clock]).alert-ready.alert-green .live { color: #1E6B4F; }
:root[data-theme="sand"] :where(.pg-n26, .pg-legacy) .status-strip:has([data-vilnius-clock]).alert-ready.alert-yellow .live { color: #6E5200; }
:root[data-theme="sand"] :where(.pg-n26, .pg-legacy) .status-strip:has([data-vilnius-clock]).alert-ready.alert-orange .live { color: #8F3A0B; }
:root[data-theme="sand"] :where(.pg-n26, .pg-legacy) .status-strip:has([data-vilnius-clock]).alert-ready.alert-red .live { color: #9A201A; }

/* v2.4.1 re-freeze (Desk 23:52 EET 22 Nov): menu control is 44px on
   .site-header .nav-toggle, same as Map's .map-icon-btn / .map-nav-toggle
   (pinned nsait-2026.css already sets min-height/min-width 44px; the
   earlier 33px reduction from v2.2/v2.4-today is withdrawn). Do not set
   display here: visibility stays in the max-width: 880px rule. */
.site-header .nav-toggle {
  min-height: 33px;   /* 24 Nov 2026 (Algirdas 21:34 GMT+2 "atstatyk į žemesnį"): lower Menu box restored, 44px -> 33px (the v2.2 value) */
  height: 33px;
  min-width: 44px;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}
@media (max-width: 880px) {
  .site-header .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}


/* ------------------------------------------------------------------ */
/* v2.4.1 — 22 Nov 2026
   Site-header mobile menu must match Map's .map-mobile-nav panel:
   a right-aligned dropdown (not a full-width stacked list), the same
   item list (incl. Privacy and X · @nsait_desk), and a Theme row
   inside the panel. Does not change nsait-2026.css (r18 pin 5dd5ce20)
   or Map's own HUD markup. */
/* ------------------------------------------------------------------ */

@media (max-width: 880px) {
  .site-header { overflow: visible; }
  .site-header .header-inner {
    position: relative;
    flex-wrap: nowrap;
    align-items: center;
  }
  .site-header .nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    z-index: 400;
    order: 3;
    width: auto;
    min-width: 12rem;
    max-width: min(20rem, calc(100vw - 1.5rem));
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
    padding: 0.45rem;
    margin: 0.25rem 0 0;
    box-sizing: border-box;
    background: var(--bg-elev, var(--bg, #fff));
    color: var(--text);
    border: 1px solid var(--border-strong, var(--border));
  }
  .site-header .nav.is-open { display: flex; }
  .site-header .nav {
    text-align: left;
  }
  .site-header .nav a,
  :where(.pg-n26, .pg-legacy) .site-header .nav a,
  :where(.pg-n26, .pg-legacy) .site-header .nav a[aria-current="page"] {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.5rem;
    margin: 0;
    border: 0;
    border-bottom: 0;
    border-bottom-color: transparent;
    box-shadow: none;
    min-height: 44px;
  }
  .site-header .nav-theme {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    margin: 0.25rem 0 0;
    padding: 0.45rem 0.5rem 0.15rem;
    border-top: 1px solid var(--border);
    align-items: center;
    gap: 0.5rem;
  }
}

/* Desktop: keep the X handle visible so the item list matches Map's
   mobile label; wrap rather than overflow if the extra Privacy + handle
   tighten the row (880px breakpoint already exists for Archive). */
.site-header .nav-x-handle { white-space: pre; }
@media (min-width: 881px) {
  /* Map's desktop HUD shows 'X'; the handle is a mobile-panel label. */
  .site-header .nav-x-handle { display: none; }
}


/* v2.4.1 re-freeze (Desk 23:52): Theme switch is progressive enhancement.
   It must remain visible if theme.js is blocked, stale, or re-adds the
   hidden attribute. Breakpoint visibility (bar vs in-menu) stays in
   nsait-2026.css; these rules only undo [hidden] { display:none } on
   the copy that that breakpoint already intends to show. */
.theme-switch[data-theme-switch][hidden] {
  display: inline-flex;
}
@media (max-width: 880px) {
  .site-header .nav-theme .theme-switch[hidden],
  .map-mobile-nav .nav-theme .theme-switch[hidden] {
    display: inline-flex !important;
  }
}
@media (min-width: 881px) {
  .site-header .header-inner > .theme-switch[hidden] {
    display: inline-flex !important;
  }
}
@media (max-width: 900px) {
  .map-mobile-nav .nav-theme .theme-switch[hidden] {
    display: inline-flex !important;
  }
}
@media (min-width: 901px) {
  .map-hud-tools > .theme-switch[hidden],
  .map-hud-top > .theme-switch[hidden] {
    display: inline-flex !important;
  }
}
