/* Shared compact navigation. Visual weight is small; hit targets remain 44px. */
.topbar{--compact-header-height:52px;font-optical-sizing:auto}
.topbar>.wrap{min-height:var(--compact-header-height);gap:18px}
.topbar .logo{font-size:1rem;line-height:1.2;gap:8px;letter-spacing:-.025em;min-height:44px}
.topbar .brand-symbol{width:24px;height:24px;font-size:18px;border-radius:8px;padding-right:2px;letter-spacing:-1.5px}
.topbar .brand-home{display:none!important}
.topbar #portal-nav{gap:18px;font-size:.75rem}
.topbar #portal-nav>a{font-family:var(--font-platform);font-size:.75rem;font-weight:400;letter-spacing:.01em;min-height:44px}
.topbar #portal-nav>a[aria-current]{font-weight:600}
.topbar #portal-nav>a[aria-current]:after{height:2px;width:12px;bottom:5px;left:calc(50% - 6px)}
.topbar .header-account{gap:2px}
.topbar .header-account :is(a.site-language-switch,a.login-link,button.header-theme,a.account-link){display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;height:44px;padding:0 8px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--ink);font-size:.75rem;font-weight:400;letter-spacing:.01em}
.topbar .header-account .header-theme{width:44px;padding:0}
.topbar .header-account button.header-theme{border:0;background:transparent;box-shadow:none;color:var(--ink)}
.topbar .header-account .header-theme svg{width:16px;height:16px}
.topbar .account-link>span{display:none}
.topbar .account-link .ui-icon{width:16px;height:16px}
.topbar .account-chip{padding:0;gap:0;border:0;border-radius:8px;background:transparent;max-width:175px}
.topbar .avatar-trigger{width:44px;height:44px;padding:10px;border-radius:8px}
.topbar .header-avatar{width:24px;height:24px}
.topbar .account-chip .login-link.is-signed-in{min-width:0;max-width:120px;min-height:44px;padding:0 6px;border-radius:8px;background:transparent}
.topbar .cursor-toggle{padding:0 5px;gap:5px;border:0;background:transparent;font-size:.6875rem;border-radius:8px}
.topbar .trail-symbol{width:16px;height:16px}
.topbar .switch-track{width:26px;height:15px}
.topbar .switch-track>span{width:9px;height:9px}
.topbar .menu-control{width:44px;height:44px;border-radius:8px;flex-shrink:0}
.topbar .menu-control>span{width:17px}
.academic-shell{--header:112px}
.academic-shell .site-header{top:52px}
@media(min-width:981px){
 .topbar #portal-nav{margin:0 auto;flex:1;justify-content:space-evenly}
 .topbar #portal-nav .cursor-toggle>span:not(.switch-track){display:none}
}
@media(min-width:981px) and (max-width:1200px){
 .topbar>.wrap{gap:12px}
 .topbar #portal-nav{gap:12px}
}
@media(max-width:980px){
 .topbar>.wrap{min-height:52px;gap:10px}
 .topbar #portal-nav{gap:4px;margin:0}
 .topbar #portal-nav>a{font-size:.8125rem;min-height:44px;padding:10px 12px}
 .topbar #portal-nav .cursor-toggle{min-height:44px;font-size:.8125rem}
 .topbar .header-account .account-link{display:none}
 .topbar .header-account{margin-left:auto;gap:0}
 .topbar .account-chip .login-link.is-signed-in{max-width:90px}
}
@media(max-width:700px){
 .academic-shell{--header:106px}
 .topbar>.wrap{gap:6px}
 .topbar .account-chip .login-link.is-signed-in{max-width:65px}
}
@media(max-width:360px){
 .topbar>.wrap{gap:4px}
 .topbar .logo{font-size:.9375rem;gap:6px}
 .topbar .account-chip .login-link.is-signed-in{max-width:36px;padding:0 2px}
}
@media(hover:hover){.topbar .header-account :is(a,button):hover{background:var(--surface-subtle)}}
@media(prefers-contrast:more){.topbar{box-shadow:inset 0 -1px 0 var(--muted)}}
