/* Same public header design across home and legacy pages.
   Only the outer shell responds to scroll; its content and hit targets stay put. */
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header]{
 --mh-surface:var(--site-surface);
 --mh-base:var(--site-canvas);
 --mh-edge:var(--site-border);
 --mh-ink:var(--site-text);
 --mh-muted:var(--site-muted);
 --mh-action:var(--site-action);
 --mh-on-action:var(--site-action-ink);
 --mh-hover:var(--site-selection);
 box-sizing:border-box!important;
 inset-inline:0!important;top:10px!important;
 max-width:1360px!important;width:calc(100% - 32px)!important;
 min-width:0!important;height:auto!important;min-height:60px!important;
 margin:14px auto 0!important;transform:none!important;
 border:1px solid var(--mh-edge)!important;border-radius:24px!important;
 background:color-mix(in srgb,var(--mh-surface) 86%,transparent)!important;
 color:var(--mh-ink)!important;
 -webkit-backdrop-filter:saturate(1.25) blur(14px)!important;
 backdrop-filter:saturate(1.25) blur(14px)!important;
 box-shadow:0 10px 35px color-mix(in srgb,var(--mh-ink) 9%,transparent)!important;
 z-index:400!important;overflow:visible!important;
 transition:background .24s ease,border-radius .24s ease,box-shadow .24s ease!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header="home"]{
 position:sticky!important;display:flex!important;align-items:center!important;
 justify-content:space-between!important;gap:8px!important;
 padding:8px clamp(8px,2vw,24px)!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header="legacy"]{
 position:fixed!important;display:block!important;padding:0!important;margin-top:0!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header][data-floated]{
 background:color-mix(in srgb,var(--mh-surface) 96%,transparent)!important;
 box-shadow:0 12px 40px color-mix(in srgb,var(--mh-ink) 19%,transparent)!important;
 border-radius:19px!important;
}
html[data-theme] body #navbar#navbar#navbar#navbar[data-shared-header="legacy"] .nav-inner{
 display:flex!important;width:100%!important;max-width:none!important;
 min-height:58px!important;height:auto!important;align-items:center!important;justify-content:space-between!important;
 padding:7px clamp(8px,2vw,24px)!important;gap:8px!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.brand,.mg-brand){
 display:inline-flex!important;align-items:center!important;gap:7px!important;flex:none!important;
 font:780 clamp(18px,2vw,25px)/1.1 system-ui,sans-serif!important;letter-spacing:-.05em!important;
 color:var(--mh-ink)!important;text-decoration:none!important;white-space:nowrap!important;padding:0!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.brand,.mg-brand) img{
 width:32px!important;height:33px!important;object-fit:contain!important;margin:0!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.primary-live,.mg-primary-links){
 display:flex!important;align-items:center!important;gap:clamp(10px,1.8vw,23px)!important;white-space:nowrap!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.primary-live,.mg-primary-links) a{
 font:540 .86rem/1.35 system-ui,sans-serif!important;
 color:var(--mh-muted)!important;text-decoration:none!important;
 padding:7px 0!important;background:none!important;border:0!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-actions,.nav-actions){
 display:flex!important;align-items:center!important;justify-content:flex-end!important;
 gap:clamp(4px,.9vw,12px)!important;flex:none!important;padding:0!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.tone,.nav-icon,.menu-btn,#mgThemeToggle){
 display:inline-grid!important;place-items:center!important;flex:none!important;
 width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
 padding:0!important;border-radius:12px!important;background:var(--mh-surface)!important;
 border:1px solid var(--mh-edge)!important;color:var(--mh-ink)!important;box-shadow:none!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.tone,.nav-icon,.menu-btn,#mgThemeToggle):hover{
 background:var(--mh-hover)!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-actions>.btn,.mg-shared-header-auth){
 display:inline-flex!important;min-height:44px;align-items:center;justify-content:center;
 border-radius:13px!important;border:1px solid var(--mh-action)!important;
 padding:0 clamp(10px,1.6vw,18px)!important;color:var(--mh-on-action)!important;
 background:var(--mh-action)!important;font:660 .8rem/1.2 system-ui,sans-serif!important;
 white-space:nowrap!important;text-decoration:none!important;box-shadow:none!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-actions,.nav-actions) :focus-visible{
 outline:2px solid var(--mh-action)!important;outline-offset:3px!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-menu[open] nav,#navLinks:not([hidden])){
 position:absolute!important;inset:auto!important;top:calc(100% + 8px)!important;
 inset-inline-end:0!important;width:min(calc(100vw - 32px),440px)!important;
 max-height:min(65dvh,460px)!important;overflow:auto!important;margin:0!important;
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:2px!important;padding:8px!important;
 border:1px solid var(--mh-edge)!important;border-radius:16px!important;
 background:var(--mh-surface)!important;box-shadow:var(--site-shadow)!important;opacity:1!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-menu nav,#navLinks:not([hidden])) a{
 min-width:0!important;min-height:42px!important;display:flex!important;align-items:center!important;
 padding:7px 10px!important;border-radius:9px!important;overflow-wrap:anywhere!important;
 color:var(--mh-ink)!important;font:520 .85rem/1.35 system-ui,sans-serif!important;
 text-decoration:none!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-menu nav,#navLinks:not([hidden])) a:is(:hover,:focus-visible){
 background:var(--mh-hover)!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.menu-kicker,.mg-menu-label){
 grid-column:1/-1;color:var(--mh-muted)!important;padding:6px 10px!important;
 text-transform:uppercase!important;font:600 .72rem/1.3 system-ui,sans-serif!important;letter-spacing:.07em!important;
}
html:has(header[data-shared-header]) {scroll-padding-top:84px}
header[data-shared-header] .home-menu summary{list-style:none;cursor:pointer}
header[data-shared-header] .home-menu summary::-webkit-details-marker{display:none}
header[data-shared-header] .home-menu:not([open]) nav{display:none}
header[data-shared-header] .web-theme-control{display:inline-flex}
header[data-shared-header] .tone svg,header[data-shared-header] .nav-icon svg,header[data-shared-header] #mgThemeToggle svg{width:19px;height:19px}
header[data-shared-header] #navLinks[hidden]{display:none!important}
.home-search#site-search {width:min(calc(100% - 24px),560px);max-height:80vh;padding:0;border:1px solid var(--site-border);border-radius:24px;color:var(--site-text);background:var(--site-surface);box-shadow:var(--site-shadow)}
.home-search#site-search::backdrop{background:#161b11a8}
.home-search#site-search .search-inner{padding:clamp(15px,4vw,28px)}
.home-search#site-search .search-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.home-search#site-search label{display:block;margin:10px 0 4px}
.home-search#site-search input{box-sizing:border-box;width:100%;margin-bottom:10px;padding:10px;border:1px solid var(--site-border);border-radius:10px;background:var(--site-panel);color:var(--site-text)}
.home-search#site-search .search-links{display:grid;max-height:42vh;overflow:auto}
.home-search#site-search .search-links a{display:grid;gap:3px;padding:8px;border-radius:8px;color:var(--site-text)}
.home-search#site-search .search-links a[hidden]{display:none}
.home-search#site-search .search-links a:hover{background:var(--site-selection)}
@media(max-width:900px){
 html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.primary-live,.mg-primary-links){display:none!important}
}
@media(max-width:465px){
 html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-actions>.btn,.mg-shared-header-auth){display:none!important}
 html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header]{width:calc(100% - 20px)!important}
 html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.brand,.mg-brand) img{width:26px!important;height:27px!important}
}
@media(prefers-reduced-motion:reduce){
 html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header]{transition:none!important}
}

/* The standalone toggle is fixed at the viewport edge on legacy pages.
   Inside the shared header it must instead occupy its own real flex slot. */
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] .web-theme-control {
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 flex:0 0 44px!important;inline-size:44px!important;block-size:44px!important;
 margin:0!important;padding:0!important;align-self:center!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] .web-theme-control > #mgThemeToggle {
 position:static!important;inset:auto!important;margin:0!important;
 transform:none!important;translate:none!important;z-index:auto!important;
 -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
}

/* Quiet public navigation: the menu remains the complete directory. */
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] {
 max-width:1100px!important;
}
html body header#navbar#navbar#navbar#navbar#navbar[data-shared-header] :is(.primary-live,.mg-primary-links) {display:none!important}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-actions,.nav-actions) {gap:4px!important}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.tone,.nav-icon,.menu-btn,#mgThemeToggle) {
 border:1px solid transparent!important;background:transparent!important;
 border-radius:12px!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.tone,.nav-icon,.menu-btn,#mgThemeToggle):is(:hover,:focus-visible),
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-menu[open] summary,.menu-btn[aria-expanded="true"]) {
 background:var(--mh-hover)!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-actions>.btn,.mg-shared-header-auth) {
 margin-inline:5px!important;
}
@media(max-width:900px) {
 html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-actions>.btn,.mg-shared-header-auth) {display:none!important}
}

/* Liquid treatment on public controls. Keep the opaque tint and contrast;
   the specular layer moves only on pointer devices, without moving layout. */
html[data-theme]{
 --lg-face:color-mix(in srgb,var(--site-surface) 94%,white);
 --lg-depth:color-mix(in srgb,var(--site-panel) 92%,transparent);
 --lg-rim:color-mix(in srgb,var(--site-border) 71%,white);
 --lg-shine:#ffffffb8;
 --lg-shade:color-mix(in srgb,var(--site-text) 12%,transparent);
 --lg-dark-action:color-mix(in srgb,var(--site-action) 82%,#212b12);
 --lg-action-rim:color-mix(in srgb,var(--site-action) 68%,white);
 --lg-lens:radial-gradient(ellipse at var(--mg-liquid-x,29%) var(--mg-liquid-y,8%),var(--lg-shine),transparent 63%);
 --lg-face-gradient:linear-gradient(151deg,var(--lg-face),var(--lg-depth));
 --lg-edge-gradient:linear-gradient(141deg,var(--lg-rim),var(--site-border) 48%,var(--lg-rim));
}
html[data-theme=dark]{
 --lg-face:color-mix(in srgb,var(--site-surface) 88%,#a2c46e 6%);
 --lg-depth:color-mix(in srgb,var(--site-panel) 85%,transparent);
 --lg-rim:color-mix(in srgb,var(--site-border) 81%,#c3df98);
 --lg-shine:#ebfbd32b;
 --lg-shade:#0005;
 --lg-action-rim:color-mix(in srgb,var(--site-action) 72%,#d2eaae);
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header]{
 border:1px solid transparent!important;
 background:var(--lg-lens) padding-box,var(--lg-face-gradient) padding-box,var(--lg-edge-gradient) border-box!important;
 box-shadow:inset 0 1px 0 var(--lg-shine),0 12px 30px -14px var(--lg-shade)!important;
 backdrop-filter:blur(19px) saturate(1.38)!important;
 -webkit-backdrop-filter:blur(19px) saturate(1.38)!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header][data-floated]{
 background:var(--lg-lens) padding-box,linear-gradient(152deg,var(--lg-face),color-mix(in srgb,var(--site-panel) 96%,transparent)) padding-box,var(--lg-edge-gradient) border-box!important;
 box-shadow:inset 0 1px 0 var(--lg-shine),0 14px 36px -12px var(--lg-shade)!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.tone,.nav-icon,.menu-btn,#mgThemeToggle){
 background:radial-gradient(ellipse at var(--mg-liquid-x,24%) var(--mg-liquid-y,0%),var(--lg-shine),transparent 66%),linear-gradient(145deg,color-mix(in srgb,var(--site-surface) 50%,transparent),color-mix(in srgb,var(--site-panel) 35%,transparent))!important;
 border:1px solid color-mix(in srgb,var(--site-border) 35%,transparent)!important;
 box-shadow:inset 0 1px 0 color-mix(in srgb,var(--lg-shine) 58%,transparent)!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.tone,.nav-icon,.menu-btn,#mgThemeToggle):is(:hover,:focus-visible),
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-menu[open] summary,.menu-btn[aria-expanded="true"]){
 background:var(--lg-lens),linear-gradient(144deg,var(--lg-face),var(--mh-hover))!important;
 border-color:var(--mh-edge)!important;
}
html[data-theme]:not(#_):not(#_) body:not(.mg-pro) main :is(button:not(.ticker-viewport),a.btn,a.button,input[type=submit],input[type=button],[role=button]):not(.ticker-viewport,.danger,.btn-danger,[data-variant=destructive],[data-status=failed],.danger-action,.destructive,.warning-action,[role=tab],[role=switch]){
 background:var(--lg-lens),var(--lg-face-gradient)!important;
 border-color:var(--site-border)!important;
 box-shadow:inset 0 1px 0 var(--lg-shine),0 3px 8px -6px var(--lg-shade)!important;
 color:var(--site-text)!important;
}
html[data-theme]:not(#_):not(#_) body:not(.mg-pro) main :is(button:not(.ticker-viewport),a.btn,a.button,input[type=submit],input[type=button],[role=button]):not(.ticker-viewport,.danger,.btn-danger,[data-variant=destructive],[data-status=failed],.danger-action,.destructive,.warning-action,[role=tab],[role=switch]):enabled:is(:hover,:focus-visible),
html[data-theme]:not(#_):not(#_) body:not(.mg-pro) main :is(a.btn,a.button)[href]:is(:hover,:focus-visible){
 background:var(--lg-lens),linear-gradient(150deg,var(--lg-face),var(--site-selection))!important;
 border-color:color-mix(in srgb,var(--site-action) 44%,var(--site-border))!important;
}
html[data-theme]:not(#_):not(#_) body:not(.mg-pro) main :is(button:not(.ticker-viewport),a.btn,a.button,input[type=submit],input[type=button],[role=button]):not(.ticker-viewport,.danger,.btn-danger,[data-variant=destructive],[data-status=failed],.danger-action,.destructive,.warning-action,[role=tab],[role=switch]):is([aria-pressed="true"],[aria-current="true"]){
 background:var(--lg-lens),linear-gradient(155deg,var(--site-selection),var(--lg-depth))!important;
 border-color:color-mix(in srgb,var(--site-action) 54%,var(--site-border))!important;
}
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(.home-actions>.btn,.mg-shared-header-auth),
html[data-theme]:not(#_):not(#_) body:not(.mg-pro) main :is(.btn.main,.btn.primary,.btn-primary,.button.primary,.primary-cta,.hero-primary,.platform-action,.platform-button.primary,#downloadButton,[data-scan]):not(.ticker-viewport,.danger,.btn-danger,[data-variant=destructive],[data-status=failed],.danger-action,.destructive,.warning-action,[role=tab],[role=switch]),
html[data-theme]:not(#_):not(#_) body:not(.mg-pro) main :is(.btn.main,.btn.primary,.btn-primary,.button.primary,.primary-cta,.hero-primary,.platform-action,.platform-button.primary,#downloadButton,[data-scan]):not(.ticker-viewport,.danger,.btn-danger,[data-variant=destructive],[data-status=failed],.danger-action,.destructive,.warning-action,[role=tab],[role=switch]):is(:hover,:focus-visible,:active){
 background:radial-gradient(ellipse at var(--mg-liquid-x,27%) var(--mg-liquid-y,3%),#ffffff29,transparent 58%),linear-gradient(151deg,var(--site-action),var(--lg-dark-action))!important;
 color:var(--site-action-ink)!important;
 border-color:var(--lg-action-rim)!important;
 box-shadow:inset 0 1px 0 #ffffff31,0 6px 18px -10px var(--site-action)!important;
}
html[data-theme]:not(#_):not(#_) body:not(.mg-pro) main :is(button:not(.ticker-viewport),a.btn,a.button,input[type=submit],input[type=button],[role=button]):not(.ticker-viewport,.danger,.btn-danger,[data-variant=destructive],[data-status=failed],.danger-action,.destructive,.warning-action,[role=tab],[role=switch]):focus-visible,
html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header] :is(a,button,summary):focus-visible{
 outline:2px solid var(--site-action)!important;outline-offset:3px!important;
}
/* Do not restyle ticker or destructive controls; keep all disabled properties. */
@media(prefers-reduced-motion:reduce){
 html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header], html[data-theme]:not(#_):not(#_) body:not(.mg-pro) main :is(button:not(.ticker-viewport),a.btn,a.button,input[type=submit],input[type=button],[role=button]):not(.ticker-viewport,.danger,.btn-danger,[data-variant=destructive],[data-status=failed],.danger-action,.destructive,.warning-action,[role=tab],[role=switch]){transition:none!important}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
 html[data-theme] body header#navbar#navbar#navbar#navbar[data-shared-header]{background:var(--site-surface)!important;border-color:var(--site-border)!important}
}
