/* A stable primary row and a separate tools disclosure, at every screen size. */
html[data-theme] body>header{position:relative;z-index:50;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;justify-content:stretch;height:auto!important;min-height:88px;padding:18px max(24px,env(safe-area-inset-right)) 18px max(24px,env(safe-area-inset-left))!important;gap:16px!important;overflow:visible}
html[data-theme] body>header>.brand{margin:0;min-width:0;white-space:nowrap;font-size:27px}
html[data-theme] body>header #main-navigation{display:flex!important;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:nowrap;position:static;width:auto;min-width:0;padding:0!important;overflow:visible;mask-image:none}
html[data-theme] body>header #main-navigation>.top-control,html[data-theme] body>header #navigation-toggle{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;width:auto!important;height:auto;min-width:0;min-height:44px;flex:0 0 auto;padding:11px 16px!important;order:0!important;border:0!important;border-radius:13px!important;font-family:inherit;font-size:16px!important;line-height:1.35;white-space:nowrap;color:var(--text)!important;background:color-mix(in srgb,var(--panel) 55%,transparent)!important;box-shadow:var(--shadow-control,0 3px 12px #0002)!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);cursor:pointer}
html[data-theme=light] body>header :is(#main-navigation>.top-control,#navigation-toggle){background:#fffaf080!important}
html[data-theme] body>header #main-navigation>:is(#quick-tip,#themes-open){order:0!important}
html[data-theme] body>header #main-navigation>.workspace-nav:after{display:none!important}
html[data-theme] body>header #navigation-toggle[aria-expanded=true]{background:var(--accent-soft)!important;color:var(--accent)!important}
html[data-theme] body>header #navigation-panel{position:absolute;top:calc(100% - 4px);right:max(24px,env(safe-area-inset-right));width:300px;max-width:calc(100vw - 28px);max-height:calc(100dvh - 155px);overflow:auto;padding:14px;display:grid;gap:4px;border-radius:20px;background:color-mix(in srgb,var(--panel) 98%,transparent);box-shadow:0 18px 50px #0003,inset 0 1px 0 #ffffff26;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);animation:navigation-reveal .16s ease-out}
html[data-theme=light] body>header #navigation-panel{background:#fffaf2fa;box-shadow:0 16px 48px #66533a26,inset 0 1px 0 #fff}
html[data-theme] body>header #navigation-panel[hidden]{display:none!important}
.navigation-caption{font-size:16px;font-weight:600;letter-spacing:.12em;color:var(--muted);padding:8px 12px 10px;margin:0}
html[data-theme] body>header #navigation-panel>.top-control{display:flex!important;align-items:center;justify-content:flex-start;gap:10px;width:100%!important;height:auto;min-width:0;min-height:46px;padding:12px!important;margin:0;order:0!important;white-space:normal;overflow-wrap:anywhere;text-align:left;font:inherit;font-size:16px!important;line-height:1.4;color:var(--text)!important;border:0!important;border-radius:10px!important;background:transparent!important;box-shadow:none!important;text-decoration:none}
html[data-theme] body>header #navigation-panel>.top-control:hover{background:var(--accent-soft)!important;color:var(--accent)!important}
html[data-theme] body>header #navigation-panel>.top-control:after{display:none!important}
html[data-theme] body>header #navigation-panel>.top-control span{display:inline!important;font-size:inherit;max-width:none;min-width:0;overflow-wrap:anywhere}
html[data-theme] body>header #navigation-panel #favorites-nav b{margin-left:auto;flex:none;font-size:16px}
html[data-theme] body>header #navigation-panel #account-button{border-top:1px solid color-mix(in srgb,var(--text) 10%,transparent)!important;margin-top:7px;padding-top:15px!important}
@keyframes navigation-reveal{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
@media(max-width:840px){
 html[data-theme] body>header{grid-template-columns:minmax(0,1fr) auto;min-height:0;gap:12px!important;padding:12px max(14px,env(safe-area-inset-right)) 14px max(14px,env(safe-area-inset-left))!important}
 html[data-theme] body>header>.brand{font-size:25px}
 html[data-theme] body>header #navigation-toggle{grid-column:2;grid-row:1;padding:10px 14px!important;font-size:16px!important}
 html[data-theme] body>header #main-navigation{grid-row:2;grid-column:1/-1;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}
 html[data-theme] body>header #main-navigation>.top-control{padding:11px 6px!important;font-size:16px!important;width:100%!important;gap:6px}
 html[data-theme] body>header #navigation-panel{right:max(14px,env(safe-area-inset-right));width:330px}
}
@media(prefers-reduced-motion:reduce){html[data-theme] body>header #navigation-panel{animation:none}}
