/* Shared download entry for the homepage, guides and articles. */
.header-download.button{min-height:42px;padding:10px 16px;font-size:12px;line-height:1.4;border-radius:13px;flex-shrink:0}
.header-download-mobile{display:none}
.header-download:hover{transform:none}
.header-inner{gap:18px;min-height:86px;flex-wrap:nowrap}
.header-inner>.brand{flex-basis:auto;max-width:none}
.header-inner nav{gap:16px}
.header-actions{display:flex;align-items:center;gap:10px}
.guide-header{position:sticky;top:0;z-index:20;background:var(--surface,#fff)}
.guide-header>.guide-shell{padding:15px 0;gap:20px}
.guide-header nav{margin-left:auto;gap:20px}
.guide-header-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.guide-header .brand img{height:44px;width:32px}
.guide-header .brand b{font-size:28px}
.guide-header .theme-control{margin-left:0}
.guide-toc{top:108px;max-height:calc(100dvh - 130px);overflow-y:auto}
.guide-article section{scroll-margin-top:12px}
.back-to-top{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));z-index:15;width:46px;height:46px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:15px;background:var(--surface,#fff);color:var(--purple);box-shadow:0 4px 20px #21192f1c}
.back-to-top svg{width:21px;height:21px}
.back-to-top:hover{border-color:var(--purple)}
body:has(dialog[open]) .back-to-top{display:none}
@media(max-width:1350px){
 .header-inner{height:80px;min-height:80px;padding-top:10px;padding-bottom:10px}
 .header-inner nav{display:none;position:absolute;left:0;right:0;top:100%;padding:20px 28px;background:var(--surface,#fff);border-bottom:1px solid var(--line);box-shadow:0 15px 20px #30164808;max-height:calc(100dvh - 80px);overflow-y:auto}
 .header-inner nav.open{display:flex;flex-direction:column;gap:3px}
 .header-inner .mobile-login{display:block}
 #menu-toggle{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff)}
 #menu-toggle span{width:15px;height:1px;background:var(--muted)}
}
@media(max-width:850px){
 .guide-toc{max-height:none;overflow:visible}
 .guide-header>.guide-shell{display:grid;grid-template-columns:1fr auto;gap:10px 16px;padding:12px 0}
 .guide-header nav{grid-row:2;grid-column:1/-1;margin:0;width:auto;justify-content:flex-start;gap:24px;font-size:13px}
 .guide-header-actions{grid-column:2;grid-row:1}
 .guide-header .brand small{display:none}
 html:has(.guide-header){scroll-padding-top:140px}
}
@media(max-width:650px){
 .header-download-desktop{display:none}
 .header-download-mobile{display:inline}
 .header-inner .login-link{display:none}
 .header-inner .brand small{display:none}
 .header-inner .theme-trigger>span,.guide-header .theme-trigger>span{display:none}
 .header-inner .theme-trigger,.guide-header .theme-trigger{padding:8px;min-width:36px}
 .header-actions,.guide-header-actions{gap:8px}
 .header-download.button{padding:10px 12px;font-size:11px}
}
@media(max-width:380px){
 .header-inner{gap:7px}
 .header-inner .brand b,.guide-header .brand b{font-size:22px}
 .header-inner .brand img,.guide-header .brand img{width:23px;height:33px}
 .header-actions,.guide-header-actions{gap:5px}
 .wrap.header-inner{width:calc(100% - 24px)}
 .header-inner .header-download.button{padding:10px 8px}
}
@media(max-width:360px){
 .header-inner .brand img{display:none}
 .header-inner .brand b{font-size:20px}
}
