/* Preserve all three fixed source headers and final ui-system sizing tokens. */
@media(min-width:1100px){
 body .site-header .header-inner,body .product-header .product-header__inner,body .topic-header>.shell{grid-template-columns:auto minmax(0,1fr) auto;gap:16px!important}
 body header .ai-network{grid-column:2;grid-row:1;justify-self:end}
}
@media(min-width:1400px){
 body .site-header .header-inner:has(>nav),body .product-header .product-header__inner:has(>nav),body .topic-header>.shell:has(>nav){grid-template-columns:auto auto minmax(0,1fr) auto}
 body .site-header .main-nav,body .product-header nav,body .topic-header nav{grid-column:3;grid-row:1;gap:18px}
 body .site-header .header-inner:has(>nav)>.header-actions,body .product-header .header-actions,body .topic-header .header-actions{grid-column:4;grid-row:1}
}
@media(min-width:1100px) and (max-width:1399px){
 html:has(header nav){--ui-header-height:104px}
 body .site-header .header-inner:has(>nav),body .product-header .product-header__inner:has(>nav),body .topic-header>.shell:has(>nav){grid-template-rows:44px 38px;gap:4px 14px!important;padding:8px 0}
 body .site-header .header-inner:has(>nav)>.brand,body .product-header .product-brand,body .topic-header .topic-brand{grid-row:1}
 body .site-header .main-nav,body .product-header nav,body .topic-header nav{grid-column:1/-1;grid-row:2;justify-self:center;margin:0}
 body .site-header .header-inner:has(>nav)>.header-actions,body .product-header .header-actions,body .topic-header .header-actions{grid-column:3;grid-row:1;min-height:44px}
}
@media(max-width:1099px){
 :root{--ui-header-height:112px}
 body .site-header,body .product-header,body .topic-header{box-sizing:border-box;height:112px}
 body .site-header .header-inner,body .product-header .product-header__inner,body .topic-header>.shell{width:calc(100% - 20px)!important;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:40px 40px;gap:8px!important;height:111px;min-height:111px!important;padding:10px 0;box-sizing:border-box}
 body .site-header .brand,body .product-header .product-brand,body .topic-header .topic-brand{grid-column:1;grid-row:1;justify-self:start;margin:0;min-width:0}
 body header .ai-network{grid-column:2;grid-row:1;justify-self:end}
 body .site-header .header-actions,body .product-header .header-actions,body .topic-header .header-actions{grid-column:1/-1;grid-row:2;justify-self:stretch;width:100%;min-height:40px;margin:0}
 body .site-header .header-actions>.button,body .product-header .header-actions>.product-header__cta,body .topic-header .header-actions>.header-cta{width:100%!important;margin:0!important}
}
@media(max-width:639px){
 body .site-header .brand>img,body .product-brand img,body .topic-brand img{width:32px!important;height:32px!important}
 body .site-header .brand,body .product-brand,body .topic-brand{gap:6px!important}
 body .site-header .brand>span:not(.brand-copy){font-size:13px;white-space:nowrap}
}
/* Existing headerless404 keeps its centered error card below one menu-only row. */
body:has(>header[data-ai-network-service-header]){grid-template-rows:64px 1fr}
header[data-ai-network-service-header]{position:static;display:flex;align-items:center;justify-content:flex-end;width:100%;min-height:64px;padding:12px;box-sizing:border-box}
body:has(>header[data-ai-network-service-header]) #ai-network-panel a{margin-top:0}
body:has(>header[data-ai-network-service-header]) #ai-network-panel .ai-network-slidy,body:has(>header[data-ai-network-service-header]) #ai-network-panel .ai-network-close{padding:0}
