/* 038: desktop compact normal-flow header; mobile geometry untouched. */
.nav-scroll-prev,.nav-scroll-next{display:none}
@media(min-width:761px){
 header{grid-template-columns:220px minmax(210px,490px) minmax(250px,1fr);grid-template-rows:auto;gap:16px;padding:10px 20px;align-items:center}
 header>div:first-child{grid-column:1;grid-row:1}
 header h1{font-size:24px;letter-spacing:.02em}
 header .skyline-slot{grid-column:2;grid-row:1;width:100%;height:106px;aspect-ratio:auto;max-width:490px;justify-self:center;overflow:visible}
 header .header-skyline{object-fit:contain;object-position:center center;clip-path:none;transform:none}
 header .header-right{grid-column:3;grid-row:1;align-items:flex-end;gap:4px;width:100%}
 header nav{justify-content:flex-end;flex-wrap:wrap;overflow:visible;gap:2px;width:100%}
 header nav a{font-size:12px;min-height:30px;padding:5px 7px;line-height:20px}
 header .seal{display:block;font-size:10px}
 body:has(.workspace){height:100dvh;display:flex;flex-direction:column}
 body:has(.workspace)>header,body:has(.workspace)>footer{flex:none}
 .workspace{flex:1;height:auto;min-height:0;overflow:hidden}
}
@media(min-width:761px) and (max-width:1023px){header{grid-template-columns:210px minmax(210px,1fr) 250px;gap:12px;padding:8px 16px}header h1{font-size:22px}header .skyline-slot{height:100px}header nav a{padding-inline:5px}}
@media(max-width:760px){
 header .header-right{position:relative}
 header nav{padding-inline:24px;scroll-padding-inline:24px;touch-action:pan-x;overscroll-behavior-x:contain}
 header .nav-scroll-prev,header .nav-scroll-next{display:block;position:absolute;top:0;z-index:2;width:24px;height:30px;min-height:0;margin:0;padding:0;border:0;border-radius:0;font-size:22px;line-height:30px;color:#9feaff;cursor:pointer}
 header .nav-scroll-prev{left:0;background:linear-gradient(90deg,#091e30 75%,#091e3000)}
 header .nav-scroll-next{right:0;background:linear-gradient(270deg,#091e30 75%,#091e3000)}
 header .nav-scroll-prev:disabled,header .nav-scroll-next:disabled{opacity:.25;cursor:default;pointer-events:none}
 header .header-skyline{object-fit:contain;object-position:center center;clip-path:none;transform:none}
}
/* 041: desktop emphasis only; <=900px stays on the accepted 040 header. */
@media screen and (min-width:901px){
 header{grid-template-columns:minmax(285px,.8fr) minmax(220px,1fr) minmax(360px,1.25fr);gap:16px}
 header h1{font-size:clamp(30px,2.5vw,38px);font-weight:800;letter-spacing:.02em}
 header nav a{font-size:clamp(16px,1.2vw,19px);font-weight:700;padding:7px 9px;line-height:1.5}
}

@media screen and (min-width:901px){header{grid-template-columns:minmax(240px,.75fr) minmax(160px,.7fr) minmax(0,1.6fr);gap:clamp(8px,1vw,16px)}header h1{font-size:clamp(28px,2.3vw,38px);white-space:nowrap}header .header-right{min-width:0;position:relative}header nav{display:flex;flex-wrap:nowrap!important;justify-content:flex-start;overflow-x:auto!important;overflow-y:hidden!important;gap:clamp(2px,.3vw,6px);padding-inline:24px;scroll-padding-inline:24px;scrollbar-width:thin}header nav a{flex:none;white-space:nowrap;font-size:clamp(14px,1.05vw,19px);padding:7px 6px}header .nav-scroll-prev,header .nav-scroll-next{display:block;position:absolute;top:0;z-index:2;width:24px;height:40px;padding:0;border:0;background:#091e30;color:#9feaff;font-size:24px;cursor:pointer}header .nav-scroll-prev{left:0}header .nav-scroll-next{right:0}header .nav-scroll-prev:disabled,header .nav-scroll-next:disabled{opacity:.3;pointer-events:none}}

/* 046: full-width single navigation row, including 761–900 CSS-pixel laptops. */
@media screen{
body>header{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,1fr);grid-template-rows:auto auto;gap:4px 14px;padding:8px 16px;align-items:center}
body>header>div:first-child{grid-column:1;grid-row:1;min-width:0}
body>header h1{font-size:clamp(20px,2.6vw,32px);white-space:nowrap;margin:0}
body>header .skyline-slot{grid-column:2;grid-row:1;width:100%;height:54px;max-width:490px;justify-self:end;overflow:hidden;aspect-ratio:auto}
body>header .header-skyline{width:100%;height:100%;object-fit:contain;object-position:right center;clip-path:none;transform:none}
body>header .header-right{grid-column:1/-1;grid-row:2;position:relative;min-width:0;width:100%;gap:0;align-items:stretch}
body>header nav{display:flex;flex-wrap:nowrap!important;justify-content:flex-start;overflow-x:auto!important;overflow-y:hidden!important;width:100%;box-sizing:border-box;padding:0 26px;scroll-padding-inline:26px;gap:4px;scrollbar-width:none;touch-action:pan-x}
body>header nav a{flex:0 0 auto;white-space:nowrap;font-size:clamp(13px,1.2vw,17px);padding:5px 8px;line-height:24px;min-height:34px;box-sizing:border-box}
body>header .seal{display:none}
body>header .nav-scroll-prev,body>header .nav-scroll-next{display:block;position:absolute;top:0;z-index:2;width:26px;height:34px;min-height:0;padding:0;margin:0;border:0;background:#091e30;color:#9feaff;font-size:24px;line-height:34px;cursor:pointer}
body>header .nav-scroll-prev{left:0}body>header .nav-scroll-next{right:0}
body>header .nav-scroll-prev:disabled,body>header .nav-scroll-next:disabled{opacity:.3;pointer-events:none}
}

/* 047: full right-side skyline; 046 navigation remains below left title. */
@media screen and (min-width:761px){body>header{grid-template-columns:minmax(210px,.8fr) minmax(230px,1.2fr);grid-template-rows:54px 34px;gap:4px 14px}body>header .skyline-slot{grid-column:2;grid-row:1;max-width:none;height:54px;width:100%;align-self:center}body>header .header-skyline{object-fit:contain;object-position:center;width:100%;height:100%;clip-path:none;transform:none}body>header .header-right{grid-column:1/-1;grid-row:2}body>header nav{justify-content:flex-start}body>header h1{font-size:clamp(20px,2.6vw,32px)}}@media screen and (min-width:1101px){body>header{grid-template-columns:260px minmax(240px,1fr) minmax(430px,1.4fr);grid-template-rows:92px}body>header .skyline-slot{grid-column:2;grid-row:1;height:92px}body>header .header-right{grid-column:3;grid-row:1}body>header h1{font-size:28px}}
