/* The homepage's top menu on every other page (2026-11-17, Moshe: "all the items should be in the
   top nav bar"). unify_header.py puts the homepage <header id="header"> on each page; these rules
   style it there with their own colors, so they never depend on a page's variables. */
#header {
    --sh-bg: rgba(6,10,24,0.88); --sh-panel: #060a18; --sh-text: #f1f5f9; --sh-muted: #7b8aa3;
    --sh-border: rgba(255,255,255,0.09); --sh-accent: #0071e3;
    position: sticky; top: 0; z-index: 150;
    height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 0 clamp(16px, 4vw, 40px);
    background: var(--sh-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--sh-border);
    font-family: inherit; box-sizing: border-box;
}
html.light #header {
    --sh-bg: rgba(246,247,251,0.9); --sh-panel: #f6f7fb; --sh-text: #0f172a; --sh-muted: #5b6b82;
    --sh-border: rgba(15,23,42,0.10);
}
#header .logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.98rem;
    letter-spacing: -0.01em; color: var(--sh-text); text-decoration: none; white-space: nowrap; }
#header .logo img { width: 26px; height: 26px; border-radius: 7px; }
#header .header-links { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); }
#header .header-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--sh-muted);
    text-decoration: none; font-size: 0.82rem; font-weight: 500; transition: color .2s; white-space: nowrap; }
#header .header-links a:hover, #header .header-links a[aria-current="page"] { color: var(--sh-text); }
#header .nav-icon { width: 15px; height: 15px; flex: none; }
/* 2026-12-04 Moshe: header too messy. Top row: text only (the Download button keeps its icon). Phone menu keeps icons. */
#header .header-links > a:not(.nav-cta) .nav-icon { display: none; }
#header .header-links a.nav-cta { color: #fff; background: var(--sh-accent); padding: 6px 12px; border-radius: 999px; font-weight: 700; }
#header .header-links a.nav-cta:hover { color: #fff; background: #0062cc; }
#header .menu-btn { display: none; }
#header .menu-panel[hidden] { display: none; }
@media (max-width: 760px) {
    #header .header-links > a:not(.nav-cta) { display: none !important; }
    #header .menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
        width: 36px; height: 36px; padding: 0 9px; border-radius: 10px; cursor: pointer;
        background: transparent; border: 1px solid var(--sh-border); }
    #header .menu-btn span { display: block; height: 2px; border-radius: 2px; background: var(--sh-text); transition: transform .2s, opacity .2s; }
    #header.open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    #header.open .menu-btn span:nth-child(2) { opacity: 0; }
    #header.open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    #header .menu-panel { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column;
        padding: 8px 16px 14px; background: var(--sh-panel); border-bottom: 1px solid var(--sh-border);
        box-shadow: 0 14px 30px rgba(15,23,42,.12); }
    #header .menu-panel a { display: flex; align-items: center; gap: 10px; padding: 13px 4px; color: var(--sh-text);
        font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--sh-border); }
    #header .menu-panel a:last-child { border-bottom: 0; }
}
@media (max-width: 420px) {
    #header { height: 48px; }
    #header .logo span { font-size: 0.92rem; }
    #header .header-links { gap: 12px; }
}
/* 320 px phones: the row was 3 px too wide (2026-12-03). */
@media (max-width: 340px) {
    #header { padding: 0 12px; gap: 8px; }
    #header .logo { gap: 6px; }
    #header .logo span { font-size: 0.8rem; }
    #header .header-links { gap: 8px; margin-left: 8px; }
    #header .header-links a.nav-cta { padding: 6px 10px; }
}
/* Page footers: Privacy and Terms live here now, so the links must wrap on small phones (2026-12-03). */
footer#site-footer nav { flex-wrap: wrap; row-gap: 0.6rem; }

