/* Compact, balanced mobile header controls shared by every page. */
@media (max-width:650px){
 html body header{grid-template-columns:44px minmax(0,1fr) 44px;grid-template-rows:70px 44px;height:132px;padding:6px 4%;gap:6px 10px;align-items:center}
 html body header>.brand{grid-column:1/3;grid-row:1;max-width:100%;min-width:0}
 html body header>.compact-nav{grid-column:3;grid-row:1;justify-self:end}
 html body header>.header-tools{grid-column:1;grid-row:2;justify-self:stretch;justify-content:center;gap:0}
 html body header .theme-switch{width:44px;height:44px;min-height:44px;border-radius:10px;padding:0}
 html body header>.button.small{grid-column:2/4;grid-row:2;justify-self:stretch;display:flex;align-items:center;justify-content:center;width:100%;min-width:0;height:44px;min-height:44px;padding:0 14px;gap:12px;font-size:14px;line-height:1.2;white-space:nowrap;box-sizing:border-box}
 html body header>.button.small .contact-text{display:none}
 html body header>.button.small .contact-short{display:inline;border:0;padding:0;font-size:inherit}
 html body header>.button.small>span:last-child{font-size:20px;padding-left:12px}
 html body header>.button.small::before{width:22px;height:22px;flex-basis:22px}
 html body header .compact-nav nav{top:132px;max-height:calc(100dvh - 144px)}
}

/* Long navigation labels must wrap inside the scrollable menu on small screens. */
@media (max-width:1279px){
 html body header .compact-nav nav a:nth-child(n){min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
