/* Moose Merch: the shared Moose Matrix header (22 Oct 2026). Uses the theme.css tokens. Loaded after theme.css. */
/* ===== Shared Moose Matrix header (mmx-*) — identical on moosematrix.com, mooseman, m2 and merch. 2026-10-22 =====
   Canonical copy: /workspace/redesign-2026-10-22/src/mmx-nav-2026-10-22.css (pasted into each repo; keep in sync).
   Bar (>=1056px): brand | [Home ·] R&D · Moose Mumbles · Moo$e Money · Shop · More ▾ | theme toggle.
   1056px = the narrowest width where the bar fits on every site with the same header (m2 is widest: 1042px with
   Home + R&D, measured 22 Oct 2026), plus a little room for font differences between systems.
     More = native <details> disclosure (no JS needed) with About · Directory · Security · Contact.
   Below 1056px the four links + More do not fit next to the brand (see the 360px measurement in the report), so the
     bar is brand | theme | Menu, and the Menu sheet uses the same groups: the 4 main links, then "More".
   Row 2 (subdomains only, >=1056px): this site's own pages. Current: aria-current + a 2px accent underline, never
   colour alone. Focus: the global :focus-visible ring (3px --ring). Targets >= 44px. Uses the shared tokens. */
:root { --mmx-bar-h: 64px; --mmx-sub-h: 40px; --mmx-header-h: var(--mmx-bar-h); }
.mmx-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 84%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.mmx-bar, .mmx-sub-list { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .mmx-bar, .mmx-sub-list { padding: 0 1.5rem; } }
.mmx-bar { position: relative; display: flex; align-items: center; gap: 0.5rem; height: var(--mmx-bar-h); }
.mmx-brand { display: inline-flex; flex: none; align-items: center; gap: 0.6rem; min-height: 44px; color: var(--fg); text-decoration: none; border-radius: 10px; }
.mmx-brand:hover { color: var(--fg); }
/* Brand logo (store lockup, site-specific sizes): the light and dark copies are both in the HTML (brand.css shows
   the active theme's one); width/height on each <img>/<source> reserve the box (CLS 0). */
.mmx-brand img { display: block; width: auto; height: 34px; max-width: none; border: 0; border-radius: 0; background: none; }
@media (min-width: 560px) { .mmx-brand img { height: 22px; } }
@media (min-width: 1100px) { .mmx-brand img { height: 30px; } }
.mmx-logo { display: block; }
.mmx-only-dark { display: none; }
:root[data-theme="dark"] .mmx-only-light { display: none; }
:root[data-theme="dark"] .mmx-only-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .mmx-only-light { display: none; }
  :root:not([data-theme]) .mmx-only-dark { display: block; }
}
.mmx-list { display: flex; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.mmx-link, .mmx-more > summary { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color 140ms ease, color 140ms ease; }
.mmx-link:hover, .mmx-more > summary:hover { color: var(--fg); background: var(--surface-2); }
.mmx-link[aria-current], .mmx-more > summary.mmx-more-cur { color: var(--fg); }
.mmx-link[aria-current]::after, .mmx-more > summary.mmx-more-cur::after { content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: 5px; height: 2px; border-radius: 2px; background: var(--accent); }
.mmx-nav { display: none; }
.mmx-tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
/* "More" disclosure in the bar: a button-like summary with a chevron, and a small dropdown under it. */
.mmx-more { position: relative; }
.mmx-more > summary { gap: 0.3rem; list-style: none; cursor: pointer; -webkit-user-select: none; user-select: none; }
.mmx-more > summary::-webkit-details-marker { display: none; }
.mmx-chev { width: 16px; height: 16px; flex: none; transition: transform 140ms ease; }
.mmx-more[open] > summary { color: var(--fg); background: var(--surface-2); }
.mmx-more[open] .mmx-chev { transform: rotate(180deg); }
.mmx-more-list { position: absolute; top: calc(100% + 0.4rem); right: 0; z-index: 60; display: grid; gap: 0.15rem; min-width: 12rem; margin: 0; padding: 0.4rem; list-style: none; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.mmx-more-list .mmx-link { display: flex; color: var(--fg); font-size: 15px; }
.mmx-more-list .mmx-link[aria-current] { background: var(--surface-2); }
.mmx-more-list .mmx-link[aria-current]::after { right: auto; width: 2rem; bottom: 6px; }
/* Phone / narrow menu: native disclosure (works without JS; the summary exposes expanded/collapsed). */
.mmx-menu > summary { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 44px; min-height: 44px; padding: 0 0.85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: 14px; font-weight: 700; list-style: none; cursor: pointer; }
.mmx-menu > summary::-webkit-details-marker { display: none; }
.mmx-menu > summary:hover { background: var(--surface-2); }
.mmx-menu > summary svg { width: 18px; height: 18px; flex: none; }
.mmx-menu .mmx-ico-close, .mmx-menu[open] .mmx-ico-open { display: none; }
.mmx-menu[open] .mmx-ico-close { display: block; }
.mmx-panel { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100svh - var(--mmx-bar-h)); overflow-y: auto; overscroll-behavior: contain; padding: 0.5rem 1rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.mmx-panel .mmx-group { margin: 0.75rem 0 0.25rem; padding: 0 0.75rem; color: var(--muted); font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.mmx-panel .mmx-list { display: grid; gap: 0.15rem; }
.mmx-panel .mmx-link { display: flex; min-height: 48px; font-size: 16px; color: var(--fg); }
.mmx-panel .mmx-link[aria-current] { background: var(--surface-2); }
.mmx-panel .mmx-link[aria-current]::after { left: 0.75rem; right: auto; width: 2.5rem; bottom: 8px; }
/* Theme toggle sits right of the links on every site: icons only in the bar (each button keeps its title/name) so the
   widest lockup (Moo$e Money) still fits with the four links + More; slightly smaller below the desktop bar. */
.mmx-tools > .theme-toggle .tt-label, .mmx-bar-theme .mm-tt-label { display: none; }
@media (max-width: 1055.98px) {
  .mmx-tools .theme-toggle button, .mmx-tools .mm-theme-toggle button { min-width: 40px; min-height: 40px; padding: 0 0.55rem; }
}
/* Row 2 (subdomains): the current site's own pages (desktop). On narrow screens they are in the Menu. */
.mmx-sub { display: none; }
@media (min-width: 1056px) {
  .mmx-nav { display: flex; align-items: center; gap: 0.15rem; margin-left: 1rem; }
  .mmx-menu { display: none; }
  .mmx-sub { display: block; border-top: 1px solid var(--border); }
  .mmx-sub-list { display: flex; align-items: center; gap: 0.15rem; height: var(--mmx-sub-h); margin: 0 auto; list-style: none; }
  .mmx-sub .mmx-link { min-height: 36px; font-size: 13px; padding: 0 0.7rem; }
  .mmx-sub .mmx-link[aria-current]::after { left: 0.7rem; right: 0.7rem; bottom: 3px; }
  .mmx-sub-label { margin-right: 0.5rem; color: var(--muted); font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
  :root:has(.mmx-sub) { --mmx-header-h: calc(var(--mmx-bar-h) + var(--mmx-sub-h) + 1px); }
}
@media (prefers-reduced-motion: reduce) { .mmx-link, .mmx-more > summary { transition: none; } .mmx-chev { transition: none; } }
/* ===== end shared nav ===== */
