/* Site menu, first paint. Loaded only on sites with the menu (SITE_PAGES_ENABLED):
   the backend page shell links it when the flag is on, and chaoticgoodtech.com's
   nginx rebrand injects it into the static pages. Because it is in <head>, the
   ☰ button shows and the links it replaces stay hidden from the first frame —
   site-menu.js only wires the button up. smasht.org never loads this file. */
#siteMenuBtn {
    display: inline-block !important;      /* overrides the hidden attribute */
    background: var(--brand-primary, #ffffff);
    border: 1px solid var(--brand-primary, #ffffff);
    color: var(--brand-primary-text, #000000);
    padding: 6px 14px;
    font-size: 1.2rem;
    line-height: 1.2;
    cursor: pointer;
    flex: 0 0 auto;
    font-family: var(--brand-font-body, Helvetica, Arial, sans-serif);
    transition: all 0.3s ease;
}
#siteMenuBtn:hover,
#siteMenuBtn:focus-visible,
#siteMenuBtn[aria-expanded="true"] {
    background: var(--brand-primary-text, #000000);
    color: var(--brand-primary, #ffffff);
    border-color: var(--brand-primary, #ffffff);
    outline: none;
}
/* Links that only repeat a menu entry, and the old inline login. */
[data-menu-dup],
#authContainer {
    display: none !important;
}
/* The header stays at the top while scrolling (the admin console's tall header excepted). */
.header:not(:has(#adminSectionNav)) {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Header user bar (drawn by site-menu.js; styled here so it never appears unstyled). */
.sm-userbar { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--brand-title, #000000); font-family: var(--brand-font-body, Helvetica, Arial, sans-serif); }
.sm-avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #ffffff; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.03em; flex: 0 0 auto; }
.sm-username { font-size: 1rem; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-ic { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--brand-title, #000000); background: var(--brand-header-bg, #ffffff); color: var(--brand-title, #000000); cursor: pointer; padding: 0; text-decoration: none; transition: all 0.2s ease; }
.sm-ic:hover, .sm-ic:focus-visible { background: var(--brand-title, #000000); color: var(--brand-header-bg, #ffffff); outline: none; }
.sm-badge { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #d9534f; color: #ffffff; font-size: 0.7rem; line-height: 18px; text-align: center; }
@media (max-width: 560px) { .sm-username { display: none; } .sm-userbar { gap: 6px; } .sm-ic { width: 34px; height: 34px; } }
