/* Shared spacing for internal pages; artwork and page-specific columns stay independent. */
html body#nw-web { --nw-intro-top:24px; --nw-title-gap:24px; --nw-content-gap:32px; --nw-footer-gap:28px; }
html body#nw-web:is([class]) > main > :is(.page-intro,.news-intro,.intro-grid) { padding-top:var(--nw-intro-top);padding-bottom:0; }
html body#nw-web:is([class]) > main > .contact-layout { padding-top:var(--nw-intro-top); }
html body#nw-web main :is(.page-intro,.news-intro,.intro-grid,.state-page) h1, html body#nw-web.page-loading-lk .cabinet-title { margin-bottom:var(--nw-title-gap); }
html body#nw-web:is([class]) > main > :is(.page-intro,.intro-grid) + :is(.section,.legal-layout) { margin-top:var(--nw-content-gap); }
html body#nw-web .contact-layout .page-intro { padding-bottom:var(--nw-content-gap); }
html body#nw-web.page-news .news-tools { min-height:var(--nw-content-gap); }
html body#nw-web.page-news .news-feed-layout { margin-bottom:0; }
html body#nw-web#nw-web:is([class]) > footer.site-footer { margin-top:var(--nw-footer-gap)!important; }
html body#nw-web:is([class]) > main:has(>.state-page) { padding-block:var(--nw-intro-top) 0!important; }
html body#nw-web:not(.page-loading-lk) > main:has(>.state-page) { align-items:flex-start; }
@media(max-width:700px){ html body#nw-web { --nw-intro-top:20px;--nw-title-gap:20px;--nw-content-gap:24px;--nw-footer-gap:24px; } }

/* Keep error copy and the visible illustration inside one centered frame. */
html body#nw-web:is(.page-403,.page-404,.page-500,.page-502,.page-503,.page-failure) .state-page {
  max-width:none;
  margin-inline:auto;
  grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);
  column-gap:clamp(16px,1.8vw,28px);
}
html body#nw-web:is(.page-403,.page-404,.page-500,.page-502,.page-503,.page-failure) .state-art {
  width:min(100%,380px);
  height:auto;
  aspect-ratio:2 / 3;
  max-height:570px;
  justify-self:end;
  object-position:center;
  transform:none;
  mask-image:none;
  -webkit-mask-image:none;
}
html body#nw-web.page-failure .state-page { max-width:none; }
html body#nw-web.page-failure .state-art { justify-self:center; }
html body#nw-web.page-success .state-art { mask-image:none;-webkit-mask-image:none; }
/* Keep portraits on the same visual rail without moving them out of their sections. */
@media(min-width:1025px) and (max-width:1199px){
  html body#nw-web:is(.page-failure,.page-success) .state-art{position:relative;left:clamp(0px,calc((100vw - 1024px) * .295),52px)}
}
@media(min-width:901px) and (max-width:1199px){
  html body#nw-web.page-docs .docs-faq-art{position:relative;left:calc(-1 * clamp(0px,calc((1200px - 100vw) * .16),28px))}
  html body#nw-web.status-page .status-guide-art-frame{position:relative;left:calc(-1 * clamp(0px,calc((1200px - 100vw) * .28),50px))}
  html body#nw-web:is(.page-offer,.page-processing,.page-rules) .document-art{position:relative;left:calc(-1 * clamp(0px,calc((1200px - 100vw) * .19),34px))}
}
@media(min-width:701px) and (max-width:900px){
  html body#nw-web.page-docs .docs-faq-art{position:relative;left:-30px}
  html body#nw-web.status-page .status-guide-art-frame{position:relative;left:-12px}
}
@media(min-width:1200px){
  html body#nw-web:is(.page-failure,.page-success) .state-art{position:relative;left:clamp(16px,calc(112px - 5vw),52px)}
  html body#nw-web.page-information .contact-art-frame{position:relative;left:calc(-1 * clamp(0px,calc((100vw - 1200px) * .26),80px))}
  html body#nw-web.page-docs .docs-faq-art,
  html body#nw-web.status-page .status-guide-art-frame{position:relative;left:calc(-1 * clamp(0px,calc((100vw - 1200px) * .067),28px))}
  html body#nw-web:is(.page-offer,.page-processing,.page-rules) .document-art{position:relative;left:calc(-1 * clamp(0px,calc((100vw - 1200px) * .2),66px))}
}
@media(max-width:700px){
  html body#nw-web:is(.page-403,.page-404,.page-500,.page-502,.page-503,.page-failure) .state-page { grid-template-columns:minmax(0,1fr);row-gap:clamp(8px,2vw,16px); }
  html body#nw-web:is(.page-403,.page-404,.page-500,.page-502,.page-503,.page-failure) .state-art { width:min(100%,350px);height:auto;max-height:410px;justify-self:center;object-position:center;transform:none; }
}
/* The homepage's 85rem content rail grows with its root font above 1920px.
   Inner pages use fixed-pixel type, so zoom that same 85rem rail instead of
   shrinking its layout width by the zoom factor.  Shrinking it compressed
   three-column cards and made long headings wrap on wide monitors. */
@media(min-width:1921px){
 html body#nw-web[data-desktop-kind="pages"]{
  --nw-page-scale:var(--nw-wide-scale,1);
 }
 html body#nw-web[data-desktop-kind="pages"] > :is(main,footer.site-footer){
  width:min(92vw,85rem)!important;
  zoom:var(--nw-page-scale)!important;
 }
 /* Keep page titles on the same visual scale as the homepage headline. */
 html body#nw-web[data-desktop-kind="pages"] main h1{
  font-size:min(var(--nw-page-title-size,66px),calc(80px * var(--nw-wide-inverse,1)))!important;
 }
 html body#nw-web:is(.page-403,.page-404,.page-500,.page-502,.page-503,.page-failure,.page-success){--nw-page-title-size:51px}
 html body#nw-web.page-information{--nw-page-title-size:58px}
 html body#nw-web.page-news{--nw-page-title-size:52px}
}
