/* Intrinsic geometry for image backgrounds; page-specific layout rules follow. */
:where(.bt-background-image){
  --bt-max-width:100000px;--bt-max-height:100000px;--bt-css-height:var(--bt-natural-height);
  --bt-auto-width:min(var(--bt-attr-width,100000px),calc(var(--bt-max-height)*var(--bt-ratio)),calc(var(--bt-css-height)*var(--bt-ratio)));
  display:inline-block;width:var(--bt-auto-width);height:var(--bt-attr-height,auto);
  aspect-ratio:var(--bt-ratio);vertical-align:baseline;
}
:root body span.bt-background-image[data-bt-src]{background-image:var(--bt-image,none)!important;background-size:contain!important;background-position:var(--bt-position,center)!important;background-repeat:no-repeat!important;background-origin:content-box;background-clip:content-box;}
:root body span.bt-background-image[data-bt-src][data-bt-fit="cover"]{background-size:cover!important;}
:root.bt-bg-pending body span.bt-background-image[data-bt-src][data-bt-lazy]:not([data-bt-ready]){background-image:none!important;}
.bt-background-image[hidden]{display:none!important;}
@media print{
 :root body span.bt-background-image[data-bt-src][role="img"]{display:inline-block!important;width:auto!important;height:auto!important;min-height:1.3em;max-height:none!important;max-width:100%!important;aspect-ratio:auto!important;background-image:none!important;overflow:visible!important;break-inside:avoid;}
 .bt-background-image[role="img"]::after{content:attr(aria-label) " — " attr(data-bt-src);display:block;font:10pt/1.3 sans-serif;color:#000;background:#fff;overflow-wrap:anywhere;white-space:normal;}
}
/* Replaced images used the available grid track, not its content minimum. */
:where(.client-logo,.basis-logo-chip):has(>.bt-background-image){grid-template-columns:minmax(0,1fr);}
.normacs-showcase:has(.bt-background-image){min-width:0;}

@media(max-width:760px){.cert-wrap:has(.bt-background-image){grid-template-columns:minmax(0,1fr);}}
.shot:has(.bt-background-image),.shot-frame:has(.bt-background-image){min-width:0;}
.shot-frame:has(>.bt-background-image){grid-template-columns:minmax(0,1fr);}

/* Preserve intrinsic document sizing in the original review grid. */
.review-document > .bt-background-image { width:100%; height:auto; }
/* Bound long encoded resource URLs even inside intrinsic flex/grid logo links. */
@media print{
 :root body span.bt-background-image[data-bt-src][role="img"]{width:min(100%,28ch)!important;max-width:28ch!important;min-width:0!important;white-space:normal!important;flex-shrink:1!important;}
 :root body span.bt-background-image[data-bt-src][role="img"]::after{white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-all!important;}
 :root body header:has(.bt-background-image){position:static!important;height:auto!important;}
 :root body header :is(div,a):has(.bt-background-image){height:auto!important;min-height:0!important;}
}

/* Zoomed gallery documents must keep the width selected by the viewer. */
@media screen {
 #charityLightbox .charity-lightbox__viewport {justify-content:flex-start;}
 #charityLightbox [data-charity-image] {flex-shrink:0;margin-inline:auto;max-width:none!important;}
}
