/* Reference-led masthead: generous desktop proportions, clear pill states. */
:root{--header-clearance:136px;--nav-fill:#233731;--nav-on-fill:#fff;--nav-hover:#e9ede7}
html[data-theme="dark"]{--nav-fill:#f4d447;--nav-on-fill:#20251e;--nav-hover:#343c37}
.topbar{border-top:0;background:var(--page);border-bottom:1px solid var(--line)}
html[data-theme="dark"] .topbar{background:var(--surface)}
.topbar .header-inner{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);width:90%;max-width:2600px;min-height:112px;height:auto;margin-inline:auto;padding:18px 0;gap:28px}
.topbar .brand{justify-self:start;min-width:0;gap:14px;font-size:28px;font-weight:750;line-height:1.12;letter-spacing:-.04em}
.topbar .brand>span:last-child{white-space:nowrap}
.topbar .brand-light{font-weight:500}
.topbar .brand small{font-size:14px;font-weight:500;letter-spacing:.06em;line-height:1.5;margin-top:6px;color:var(--muted)}
.topbar .brandmark{width:54px;height:54px;min-width:54px;border-radius:12px;font-size:40px}
.topbar .brandmark span{width:10px;height:5px;right:7px;bottom:10px}
.topbar .header-inner nav{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;justify-self:center;flex-wrap:nowrap;gap:24px;min-height:0;height:auto;width:auto;margin:0}
.topbar .header-inner nav a{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:54px;height:auto;padding:12px 24px;border-radius:999px;font-size:20px;font-weight:650;line-height:1.3;white-space:nowrap;color:var(--ink);background:transparent}
.topbar .header-inner nav a::after{display:none;content:none}
.topbar .header-inner nav a:hover{background:var(--nav-hover)}
.topbar .header-inner nav a.active{color:var(--nav-on-fill);background:var(--nav-fill);font-weight:700}
.topbar .nav-count{min-width:23px;height:23px;padding:0 6px;border-radius:999px;font-size:13px;font-weight:600;line-height:23px;color:var(--muted);background:var(--soft)}
.topbar nav a.active .nav-count{color:inherit;background:color-mix(in srgb,currentColor 15%,transparent)}
.topbar .header-actions{grid-column:3;grid-row:1;align-self:center;display:flex;align-items:center;justify-content:flex-end;gap:16px}
.topbar .preview-label{display:none}
.topbar .theme-toggle{min-width:96px;width:auto;min-height:52px;padding:12px 18px;gap:9px;border:1px solid var(--line);border-radius:999px;font-size:16px;font-weight:600;line-height:1.3;background:var(--surface);color:var(--ink)}
.topbar .theme-toggle svg{width:20px;height:20px}
.topbar .theme-toggle:hover{background:var(--nav-hover);border-color:var(--control-line)}
.topbar .header-contact,.topbar .header-contact.active{align-self:center;display:inline-flex;align-items:center;justify-content:center;min-width:132px;min-height:54px;height:auto;padding:12px 25px;border:1px solid transparent;border-radius:999px;font-size:18px;font-weight:700;line-height:1.3;color:var(--nav-on-fill);background:var(--nav-fill);box-shadow:none}
.topbar .header-contact:hover{filter:brightness(1.12)}
.topbar .header-contact.active{outline:2px solid var(--nav-fill);outline-offset:4px}
.topbar :is(nav a,.header-contact,.theme-toggle):focus-visible{outline:3px solid var(--accent);outline-offset:5px}
@media(prefers-reduced-motion:no-preference){.topbar :is(nav a,.header-contact,.theme-toggle){transition:background-color .18s,color .18s,filter .18s}}
@media(min-width:1800px){
 :root{--header-clearance:152px}
 .topbar .header-inner{min-height:128px;gap:36px}
 .topbar .brand{font-size:32px;gap:16px}
 .topbar .brandmark{width:60px;height:60px;min-width:60px;font-size:44px}
 .topbar .brand small{font-size:16px}
 .topbar .header-inner nav{gap:48px}
 .topbar .header-inner nav a{min-height:60px;padding:14px 30px;font-size:24px}
 .topbar .theme-toggle{min-width:108px;min-height:58px;font-size:18px}
 .topbar .header-contact,.topbar .header-contact.active{min-width:152px;min-height:60px;font-size:20px}
}
@media(min-width:1101px) and (max-width:1399px){
 .topbar .header-inner{gap:16px}
 .topbar .brand{font-size:24px;gap:10px}
 .topbar .brandmark{width:48px;height:48px;min-width:48px;font-size:36px}
 .topbar .header-inner nav{gap:10px}
 .topbar .header-inner nav a{padding-inline:18px;font-size:19px}
 .topbar .header-actions{gap:10px}
 .topbar .theme-toggle{min-width:80px;padding-inline:12px}
 .topbar .header-contact,.topbar .header-contact.active{min-width:114px;padding-inline:18px;font-size:17px}
}
@media(max-width:1100px){
 :root{--header-clearance:172px}
 .topbar .header-inner{grid-template-columns:minmax(0,1fr) auto;width:calc(100% - 48px);min-height:0;padding:18px 0 14px;gap:14px 20px}
 .topbar .brand{font-size:25px}
 .topbar .brandmark{width:48px;height:48px;min-width:48px;font-size:36px}
 .topbar .header-actions{grid-column:2;gap:12px}
 .topbar .header-inner nav{grid-column:1/-1;grid-row:2;gap:24px}
 .topbar .header-inner nav a{min-height:48px;padding:10px 24px;font-size:18px}
 .topbar .theme-toggle{min-height:48px}
 .topbar .header-contact,.topbar .header-contact.active{min-height:48px}
}
@media(max-width:600px){
 :root{--header-clearance:144px}
 .topbar .header-inner{width:calc(100% - 32px);padding:14px 0 12px;gap:14px 10px}
 .topbar .brand{font-size:20px;gap:9px}
 .topbar .brandmark{width:40px;height:40px;min-width:40px;font-size:30px;border-radius:9px}
 .topbar .brandmark span{right:5px;bottom:7px;width:8px;height:4px}
 .topbar .brand small{font-size:11px;margin-top:4px;letter-spacing:.04em}
 .topbar .header-actions{gap:8px}
 .topbar .theme-toggle{min-width:44px;width:44px;min-height:44px;padding:10px}
 .topbar .theme-label{display:none}
 .topbar .header-contact,.topbar .header-contact.active{min-width:80px;min-height:44px;padding:10px 12px;font-size:13px}
 .topbar .header-inner nav{width:100%;gap:6px;justify-content:space-between}
 .topbar .header-inner nav a{min-height:44px;padding:10px 16px;font-size:16px;gap:6px}
 .topbar .nav-count{min-width:20px;height:20px;padding:0 5px;font-size:11px;line-height:20px}
}
@media(max-width:380px){
 .topbar .header-inner{width:calc(100% - 24px);column-gap:6px}
 .topbar .brand{font-size:16px;gap:7px}
 .topbar .brandmark{width:34px;height:34px;min-width:34px;font-size:26px}
 .topbar .brand small{font-size:10px}
 .topbar .header-actions{gap:6px}
 .topbar .header-contact,.topbar .header-contact.active{min-width:74px;padding-inline:9px}
 .topbar .header-inner nav a{font-size:15px;padding-inline:12px}
}
@media(max-width:340px){
 .topbar .brand{font-size:15px}
 .topbar .header-inner nav a{padding-inline:10px}
}
@media(forced-colors:active){
 .topbar .header-inner nav a.active,.topbar .header-contact{outline:2px solid Highlight;outline-offset:0}
}
