/* The site menu's groups: the Play and Extras dropdowns and the pinned pill (the Yule log while it's lit).
   Written by inc/plugins/mr_theme/topnav.php, loaded on every page that shows the menu: the forum (headerinclude)
   and the static pages D:\mr-hl2dm deploys (their menu file in cache/mr_nav/ starts with it). The bar and its plain
   links are each page's own CSS (.topnav, .topnav a: css/global.css here, web/theme/mr2026.css there, the same
   rules); this file adds only what the groups need, in the tokens both define, and is written to win over
   .topnav a. Orange is something you can click, amber something that was measured. Dark only. */

.topnav { align-items: center; }
.topnav-group { position: relative; }
.topnav-trigger { display: flex; align-items: center; gap: 5px; background: none; border: 0; margin: 0; color: var(--text-dim); font-family: inherit; font-weight: 600; font-size: 15px; line-height: inherit; padding: 8px 8px 8px 10px; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.topnav-trigger:hover, .topnav-group.is-open > .topnav-trigger { color: var(--text); background: var(--raised); }
.topnav-trigger.is-active, .topnav-group.is-open > .topnav-trigger.is-active { color: var(--orange); }   /* the page you're on is in it */
.topnav-chev { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.topnav-group.is-open .topnav-chev { transform: rotate(180deg); }

/* the dropdown: shut until mr_nav.js opens it (a click); with no script, on hover and keyboard focus */
.topnav-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 260px; padding: 6px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 3px; box-shadow: 0 12px 24px rgba(0,0,0,.5); }
.topnav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px; }   /* the gap, so hover survives it */
.topnav-group.is-open > .topnav-menu,
.topnav:not(.nav-js) .topnav-group:hover > .topnav-menu,
.topnav:not(.nav-js) .topnav-group:focus-within > .topnav-menu { display: block; }
.topnav .topnav-item { display: block; padding: 7px 10px 8px; white-space: normal; color: var(--text-dim); }
.topnav .topnav-item:hover { background: var(--raised); }
.topnav-label { display: block; color: var(--text); font-weight: 600; font-size: 15px; line-height: 1.35; }
.topnav-note { display: block; color: var(--text-dim); font-weight: 400; font-size: 13px; line-height: 1.35; }
.topnav .topnav-item.is-active .topnav-label { color: var(--orange); }
.topnav-count { margin-left: 8px; color: var(--amber); font-size: 12px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }

/* the pill: a page that is on for a while (the Back Burner, December 1 to January 6), in the bar beside the groups */
.topnav .topnav-pin { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 5px 12px 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--orange); font-size: 14px; }
.topnav .topnav-pin:hover { color: var(--orange-bright); background: var(--raised); border-color: var(--orange); }
.topnav .topnav-pin.is-active { border-color: var(--orange); }
.topnav-pin svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* phones and narrow windows (the bar folds into the menu button at 1024px on every page): each group is a heading
   with its links under it, always shown; the pill's page is in Extras */
@media (max-width: 1024px) {
  .topnav { align-items: stretch; }
  .topnav .topnav-pin { display: none; }
  .topnav-group { position: static; flex-shrink: 0; }
  .topnav-trigger { width: 100%; padding: 14px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); cursor: default; pointer-events: none; }
  .topnav-trigger.is-active { color: var(--text-faint); }
  .topnav-chev { display: none; }
  .topnav-menu, .topnav-group.is-open > .topnav-menu { display: block; position: static; min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; }
  .topnav-menu::before { display: none; }
  .topbar.open .topnav .topnav-item { padding: 10px 8px 10px 16px; }
  .topnav-label { color: var(--text-dim); font-size: 16px; }
  .topnav .topnav-item:hover .topnav-label { color: var(--text); }
  .topnav-note, .topnav-count { display: none; }
}
