/* The menu, the views and the bar (menu.js), shared by every page. Self-contained: the server pages have none of the
   live page's styles. A menu opens under its button on wide screens and from the bottom on phones; the dimmed layer
   behind it belongs to the button, so a tap on it closes the menu even where no script runs. */
.pmenu, .pm-bar, .pm-views { --pm-bg: #121009; --pm-glass: rgba(20, 18, 14, 0.78); --pm-line: rgba(203, 243, 77, 0.16); --pm-soft: rgba(203, 243, 77, 0.08); --pm-fg: #f0ece2; --pm-mut: #9a9486; --pm-lime: #cbf34d; --pm-ink: #1a2208; }
.pmenu { position: relative; display: inline-block; }
.pm-btn { list-style: none; display: grid; place-items: center; width: 38px; height: 38px; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--pm-line); background: var(--pm-glass); color: var(--pm-fg); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pm-btn::-webkit-details-marker { display: none; }
.pm-btn::marker { content: ""; }
.pm-btn svg { width: 18px; height: 18px; }
.pm-btn:hover, .pmenu[open] > .pm-btn { border-color: var(--pm-lime); color: var(--pm-lime); }
.pm-btn:focus-visible, .pm-panel a:focus-visible, .pm-panel button:focus-visible, .pm-views a:focus-visible, .pm-brand:focus-visible { outline: 2px solid var(--pm-lime); outline-offset: 2px; }
.pmenu[open] > .pm-btn::before { content: ""; position: fixed; inset: 0; z-index: 30; cursor: default; }
.pm-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 31; width: 300px; max-height: calc(100vh - 90px); overflow-y: auto; box-sizing: border-box; background: var(--pm-bg); border: 1px solid var(--pm-line); border-radius: 14px; padding: 8px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.75); color: var(--pm-fg); font: 14px/1.35 var(--font-ui, system-ui, sans-serif); text-align: left; }
.pm-group { display: grid; gap: 1px; padding: 2px 0 6px; }
.pm-group p { margin: 4px 8px 3px; font: 500 10.5px var(--font-num, monospace); color: var(--pm-mut); text-transform: uppercase; letter-spacing: 0.08em; }
.pm-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; color: var(--pm-fg); text-decoration: none; min-height: 34px; box-sizing: border-box; }
.pm-row:hover { background: var(--pm-soft); }
.pm-row[aria-current="page"] { background: rgba(203, 243, 77, 0.13); color: var(--pm-lime); font-weight: 700; }
.pm-row span { min-width: 0; }
.pm-row small { margin-left: auto; padding-left: 8px; color: var(--pm-mut); font-size: 11.5px; white-space: nowrap; }
.pm-tile { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font: 700 10px/1 var(--font-num, monospace); font-style: normal; background: rgba(203, 243, 77, 0.12); color: var(--pm-lime); }
.pm-tile svg { width: 12px; height: 12px; }
.pm-tile b { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pm-live { background: var(--pm-lime); color: var(--pm-ink); }
.pm-fiber, .pm-ai { background: rgba(98, 201, 245, 0.16); color: #62c9f5; }
.pm-funded { background: rgba(245, 177, 76, 0.16); color: #f5b14c; }
.pm-notices { background: rgba(255, 95, 143, 0.16); color: #ff7fa6; }
.pm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; border-top: 1px solid var(--pm-soft); margin-top: 2px; padding: 9px 8px 3px; font-size: 12.5px; }
.pm-foot a { color: var(--pm-fg); text-decoration: none; }
.pm-foot a:hover { color: var(--pm-lime); }
.pm-langs { display: flex; gap: 2px; margin-left: auto; }
.pm-langs a, .pm-langs button { font: inherit; font-size: 12px; color: var(--pm-mut); background: none; border: 1px solid transparent; border-radius: 7px; padding: 2px 6px; cursor: pointer; text-decoration: none; }
.pm-langs [aria-current="true"], .pm-langs [aria-pressed="true"] { color: var(--pm-lime); border-color: var(--pm-line); }
.pm-by { flex-basis: 100%; color: var(--pm-mut); font-size: 11.5px; }
.pm-by a { color: var(--pm-mut); }

/* the three views, side by side */
.pm-views { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--pm-glass); border: 1px solid var(--pm-line); }
.pm-views a { padding: 4px 11px; border-radius: 999px; font: 500 12.5px/1.4 var(--font-ui, system-ui, sans-serif); color: var(--pm-mut); text-decoration: none; white-space: nowrap; }
.pm-views a:hover { color: var(--pm-fg); }
.pm-views a[aria-current="page"] { background: var(--pm-lime); color: var(--pm-ink); }

/* the bar of the server pages */
.pm-bar { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.pm-brand { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; color: var(--pm-fg); font-weight: 800; font-size: 17px; text-decoration: none; white-space: nowrap; }
.pm-brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--pm-lime); box-shadow: 0 0 8px var(--pm-lime); }
.pm-bar .pm-views { order: 1; }
.pm-bar ~ header > i { display: none; } /* the name in the bar already carries the live dot */
.pm-bar .pmenu { order: 2; }
@media (max-width: 700px) { .pm-bar .pm-views { display: none; } }

/* phones: the menu comes up from the bottom, over a dimmed page */
@media (max-width: 860px) {
  .pmenu[open] > .pm-btn::before { background: rgba(0, 0, 0, 0.55); }
  .pm-panel { position: fixed; top: auto; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100% - 70px); border-radius: 18px; padding: 10px; font-size: 15px; }
  .pm-row { min-height: 40px; }
}
/* short phones (640 px): tighter rows, so the nine still fit without scrolling */
@media (max-width: 860px) and (max-height: 700px) {
  .pm-panel { padding: 8px; font-size: 14px; }
  .pm-row { min-height: 34px; padding: 5px 8px; }
  .pm-group { padding-bottom: 4px; }
  .pm-group p { margin: 3px 8px 2px; }
}
@media print { .pmenu, .pm-views { display: none; } }

/* sharing (shareHtml in menu.js): a pill that opens a small list of where to share */
.pshare { position: relative; display: inline-block; }
.ps-btn { list-style: none; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: 500 13px var(--font-ui, system-ui, sans-serif); color: #f0ece2; border: 1px solid #36322a; border-radius: 999px; padding: 6px 13px; background: rgba(20, 18, 14, 0.8); -webkit-tap-highlight-color: transparent; }
.ps-btn::-webkit-details-marker { display: none; } .ps-btn::marker { content: ""; }
.ps-btn svg { width: 15px; height: 15px; }
.ps-btn:hover, .pshare[open] > .ps-btn { border-color: #cbf34d; color: #cbf34d; }
.ps-btn:focus-visible, .ps-panel a:focus-visible, .ps-panel button:focus-visible { outline: 2px solid #cbf34d; outline-offset: 2px; }
.ps-panel { position: absolute; left: 0; top: calc(100% + 6px); z-index: 31; min-width: 190px; display: grid; gap: 2px; padding: 6px; background: #121009; border: 1px solid #36322a; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7); }
.ps-panel a, .ps-panel button { display: block; text-align: left; padding: 8px 10px; border-radius: 9px; font: 14px var(--font-ui, system-ui, sans-serif); color: #f0ece2; text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.ps-panel a:hover, .ps-panel button:hover { background: rgba(203, 243, 77, 0.08); }
.pshare.up .ps-panel { top: auto; bottom: calc(100% + 6px); left: auto; right: 0; }
@media print { .pshare { display: none; } }
