/* MOMENTUS · the shared top bar (B148, B149): one glass bar on every momentus.gg page.
   Markup and behaviour: /shared/topbar.js. Geometry is the archive's Figma bar (x 31, y 32, 1858 x 68 on
   the 1920 frame), scaled to the window.
   B149: plain glass. backdrop-filter blurs exactly what is under each point of the bar over a very light,
   neutral, low-alpha fill: over a light list it reads light, over a dark showcase it reads dark, with no
   sampled tint (nothing to flicker on scroll). Text and mark switch between white and near-black per word,
   from what sits directly under each one, only after scrolling stops. */
:root{--mtb-u:calc(min(100vw,2400px)/1920)}
.mtb{position:fixed;z-index:50;left:calc(31*var(--mtb-u));right:calc(31*var(--mtb-u));top:max(calc(32*var(--mtb-u)),env(safe-area-inset-top));height:max(48px,calc(68*var(--mtb-u)));
 box-sizing:border-box;display:grid;grid-template-columns:minmax(max-content,1fr) minmax(0,auto) minmax(max-content,1fr);column-gap:16px;align-items:center;margin:0;padding:0 calc(16*var(--mtb-u)) 0 calc(14*var(--mtb-u));border-radius:max(8px,calc(10*var(--mtb-u)));
 background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.05));border:1px solid rgba(255,255,255,.16);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(0,0,0,.04),0 8px 30px rgba(0,0,0,.08);
 -webkit-backdrop-filter:blur(20px) saturate(1.5);backdrop-filter:blur(20px) saturate(1.5);color:#fff;
 font:500 max(12px,calc(17*var(--mtb-u)))/1.2 -apple-system,BlinkMacSystemFont,"SF Pro Display","Helvetica Neue",Helvetica,Arial,sans-serif;letter-spacing:-.005em;-webkit-font-smoothing:antialiased;
 transition:opacity .45s ease,visibility 0s linear 0s}
.mtb *{box-sizing:border-box}
/* legible on any background, per element: topbar.js looks at what is right under each word (once the page
   stops scrolling, debounced) and sets data-ink; the glass itself never changes colour */
.mtb .mtb-ink,.mtb .mtb-mark{color:#fff;transition:color .25s ease}
.mtb [data-ink=dark]{color:#141414}
.mtb-menu-btn[data-ink=dark] span{background:#141414}
.mtb a,.mtb button{font:inherit;color:inherit;text-decoration:none;background:none;border:0;margin:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
.mtb a:focus-visible,.mtb button:focus-visible{outline:2px solid #fff;outline-offset:4px;border-radius:3px}
.mtb .mtb-mark{display:block;justify-self:start;width:max(34px,calc(47*var(--mtb-u)))}
.mtb-mark svg{display:block;width:100%;height:auto;fill:currentColor}
.mtb-ticker{display:flex;gap:calc(20*var(--mtb-u));align-items:center;justify-self:center;margin:0;white-space:nowrap;font-weight:500;min-width:0;max-width:100%;overflow:hidden}
/* B150: the middle never overlaps the mark or the links: it shrinks (topbar.js fit(), down to 11px), then ellipsizes */
.mtb-text{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mtb-sep,.mtb-clock{flex:none}
.mtb-ticker [hidden]{display:none}
.mtb-ticker[data-wait] .mtb-text,.mtb-ticker[data-wait] .mtb-sep{opacity:0}
.mtb-ticker[data-empty]{visibility:hidden}
.mtb-text{transition:opacity .3s ease}
.mtb-clock{font-variant-numeric:tabular-nums;font-weight:600}
.mtb-links{justify-self:end;display:flex;gap:calc(21*var(--mtb-u));align-items:center}
.mtb-links a{position:relative;padding:4px 0;font-weight:500;white-space:nowrap}
.mtb-links a:hover .mtb-ink{text-decoration:underline;text-underline-offset:4px}
.mtb i.mtb-dot{display:none;width:max(9px,calc(14*var(--mtb-u)));height:max(9px,calc(14*var(--mtb-u)));border-radius:50%;background:#d6ff3a;margin-left:5px;vertical-align:middle;transform:translateY(-1px)}
.mtb [aria-current=page] i.mtb-dot{display:inline-block}
.mtb-arrow{font-size:.85em;margin-left:3px}
.mtb-menu-btn{display:none;justify-self:end;width:44px;height:44px;margin-right:-8px;padding:0;place-content:center;gap:6px}
.mtb-menu-btn span{display:block;width:20px;height:1px;background:#fff;transition:transform .2s ease,background-color .25s ease}
.mtb-menu-btn[aria-expanded=true] span:first-child{transform:translateY(3.5px) rotate(45deg)}
.mtb-menu-btn[aria-expanded=true] span:last-child{transform:translateY(-3.5px) rotate(-45deg)}
/* the compact menu (phones) */
.mtb-menu{position:fixed;z-index:51;right:10px;top:calc(max(10px,env(safe-area-inset-top)) + 56px);width:min(280px,calc(100vw - 20px));padding:8px;border-radius:10px;box-sizing:border-box;
 font:500 15px/1.2 -apple-system,BlinkMacSystemFont,"SF Pro Display","Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;
 background:rgba(20,22,30,.72);border:1px solid rgba(255,255,255,.14);-webkit-backdrop-filter:blur(22px) saturate(1.2);backdrop-filter:blur(22px) saturate(1.2);color:#fff;box-shadow:0 18px 40px rgba(0,0,0,.35)}
.mtb-menu[hidden]{display:none}
.mtb-menu nav{display:grid}
.mtb-menu a,.mtb-menu button{font:inherit;text-decoration:none;background:none;border:0;margin:0;cursor:pointer;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding:0 12px;border-radius:7px;text-align:left;font-size:15px;color:#fff}
.mtb-menu a:hover,.mtb-menu button:hover{background:rgba(255,255,255,.08)}
.mtb-menu .mtb-sub{margin-top:6px;padding-top:6px;border-top:1px solid rgba(255,255,255,.12);display:grid}
.mtb-menu .mtb-sub a{font-size:12px;letter-spacing:.06em;min-height:40px;color:rgba(255,255,255,.75)}
.mtb-menu i.mtb-dot{display:none;width:9px;height:9px;border-radius:50%;background:#d6ff3a;margin-left:auto}
.mtb-menu [aria-current=page] i.mtb-dot{display:inline-block}
.mtb-menu a:focus-visible,.mtb-menu button:focus-visible{outline:2px solid #fff;outline-offset:-2px}

/* while a drop page plays its opening (the big wordmark), the bar waits, like the old header did */
body:has(#collection[aria-busy=true]) :is(.mtb,.mtb-menu),body:has(#collection.is-entering) :is(.mtb,.mtb-menu){opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility 0s linear .2s}

/* the bar replaces the old headers: the drop page's mark (B138b), menu button and signup button, and the
   archive's own bar. They stay in the page (scripts use them), only out of sight. */
html.mtb-on .card-case>.corner>.menu-toggle,html.mtb-on .card-case>.corner>.desktop-nav,html.mtb-on .card-case>.corner-symbol,html.mtb-on .ar-nav{display:none!important}
/* text pages start below the bar */
html.mtb-on body.mtb-pad{padding-top:calc(max(48px,calc(68*var(--mtb-u))) + max(calc(32*var(--mtb-u)),env(safe-area-inset-top)) + 8px)}

/* B149: the drop pages' story button: a thin drawn plus, centred in its circle (no font glyph) */
#story-toggle svg.plus{display:block;width:16px;height:16px;overflow:visible;transition:transform .2s ease}

@media(max-width:820px){
 .mtb{left:10px;right:10px;top:max(10px,env(safe-area-inset-top));height:48px;padding:0 12px 0 10px;font-size:13px;grid-template-columns:auto minmax(0,1fr) auto;column-gap:10px}
 .mtb .mtb-mark{width:32px}
 .mtb-ticker{font-size:12px;gap:8px}
 .mtb-ticker[data-clock=on] .mtb-text,.mtb-ticker[data-clock=on] .mtb-sep{display:none}
 .mtb-links{display:none}
 .mtb-menu-btn{display:grid}
 html.mtb-on body.mtb-pad{padding-top:calc(48px + max(10px,env(safe-area-inset-top)) + 8px)}
}
@media(prefers-reduced-motion:reduce){.mtb .mtb-ink,.mtb .mtb-mark,.mtb,.mtb-text,.mtb-menu-btn span,#story-toggle svg.plus{transition:none}}
@media print{.mtb,.mtb-menu{display:none}}
