/* The same navigation moves into a roomy menu on mobile and tablet. */
.mobile-menu-toggle{display:none}
:root #mobile-menu{padding:0;margin:0 0 0 auto;inset:0 0 0 auto;width:min(100vw,560px);max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-left:1px solid var(--glass-edge);background:rgba(24,20,27,.96);color:var(--brand-copy);overflow:auto;overscroll-behavior:contain;backdrop-filter:blur(28px);font-family:var(--reading-font)}
#mobile-menu::backdrop{background:rgba(9,7,12,.66);backdrop-filter:blur(12px)}
:root[data-theme=day] #mobile-menu{background:rgba(249,246,251,.97)}
:root[data-theme=day] #mobile-menu::backdrop{background:rgba(79,67,91,.2)}
.mobile-menu-open,.mobile-menu-open body{overflow:hidden!important}
:root #mobile-menu .mobile-menu-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:80px;padding:16px 26px;position:sticky;top:0;z-index:3;background:rgba(24,20,27,.96);border-bottom:1px solid var(--glass-edge)}
:root[data-theme=day] #mobile-menu .mobile-menu-toolbar{background:rgba(249,246,251,.97)}
:root #mobile-menu .brand-logo{width:140px}
.mobile-menu-close{width:46px;height:46px;display:grid;place-items:center;padding:12px;border:1px solid var(--glass-edge);background:transparent;color:inherit;cursor:pointer;flex-shrink:0}
.mobile-menu-close svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5}
.mobile-menu-content{padding:26px clamp(24px,5vw,40px) max(30px,env(safe-area-inset-bottom))}
:root #mobile-menu h2,:root #mobile-menu h3{font:400 12px/1.5 var(--reading-font);letter-spacing:.05em;color:var(--brand-muted);margin:0 0 15px}
:root #mobile-menu nav{display:flex;position:static;flex-direction:column;align-items:stretch;justify-content:start;gap:0;margin:0;padding:0;width:100%;height:auto;max-width:none;overflow:visible;white-space:normal;counter-reset:menu-item;transform:none;border:0;mask:none;-webkit-mask:none}
:root #mobile-menu nav a{display:grid;grid-template-columns:25px minmax(0,1fr) 20px;align-items:center;gap:14px;position:relative;min-height:70px;width:100%;padding:18px 0;margin:0;border:0;border-bottom:1px solid var(--glass-edge);font:400 clamp(20px,2.5vw,28px)/1.5 var(--reading-font);letter-spacing:0;text-transform:none;text-decoration:none;color:var(--brand-copy);white-space:normal;counter-increment:menu-item;opacity:1}
:root #mobile-menu nav a::before{content:counter(menu-item,decimal-leading-zero);position:static;inset:auto;background:none;width:auto;height:auto;font:400 11px/1.5 var(--reading-font);color:var(--brand-muted);opacity:1;transform:none}
:root #mobile-menu nav a::after{content:'↗';display:block;position:static;inset:auto;background:none;width:auto;height:auto;font:400 21px/1 sans-serif;letter-spacing:0;color:var(--brand-muted);opacity:1;transform:none}
:root #mobile-menu nav a[aria-current=true],:root #mobile-menu nav a:hover{color:var(--brand-accent)}
:root #mobile-menu nav a[aria-current=true]::after{color:var(--brand-accent)}
.mobile-menu-settings{margin-top:34px}
:root #mobile-menu .header-controls{display:grid;grid-template-columns:minmax(0,1fr) 50px;align-items:center;gap:14px;margin:0;padding:0;width:100%;height:auto}
:root #mobile-menu .language-picker{grid-column:1 / -1;width:100%}
:root #mobile-menu .language-trigger{width:100%;max-width:none;height:52px;padding:0 16px;font-size:15px}
:root #mobile-menu .theme-toggle{width:100%;max-width:none;height:50px;justify-content:center;padding:0 16px;gap:12px;font:400 14px/1.5 var(--reading-font)}
:root #mobile-menu #theme-toggle-label{display:inline}
:root #mobile-menu .motion-control{width:50px;height:50px;font-size:14px}
:root #mobile-menu :is(a,button):focus-visible,.mobile-menu-toggle:focus-visible{outline:2px solid var(--brand-accent);outline-offset:4px}
@media(max-width:1180px){
 :root .site-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:20px;height:80px;min-height:80px;padding:16px 24px}
 :root .site-header>.brand{margin:0;flex-shrink:0}
 :root .site-header>.brand .brand-logo{width:140px}
 :root .site-header>nav,:root .site-header>.header-controls{display:none}
 :root .mobile-menu-toggle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:46px;height:46px;flex-shrink:0;margin-left:auto;padding:10px;border:1px solid var(--glass-edge);border-radius:0;background:var(--glass-toolbar);color:var(--brand-copy);cursor:pointer}
 .mobile-menu-toggle span{display:block;width:22px;height:1px;background:currentColor}
 :root .mobile-menu-toggle:hover,:root .mobile-menu-close:hover{color:var(--brand-accent);border-color:var(--brand-accent)}
}
@media(max-width:640px){
 :root .site-header{height:76px;min-height:76px;padding:14px 20px}
 :root .site-header>.brand .brand-logo{width:134px}
 :root #mobile-menu{width:100vw;border:0}
 :root #mobile-menu .mobile-menu-toolbar{padding:14px 22px;min-height:76px}
 :root #mobile-menu nav a{min-height:66px;padding:16px 0;font-size:20px}
}
@media(prefers-reduced-motion:reduce){#mobile-menu{animation:none}}
