/* Use intrinsic dimensions. A small source can shrink on mobile but never expands beyond its natural width. */
#aaph10-home .ah-feed-media,
#aaph10-home .ah-journal-image,
#aap-mb .mb-card .mb-photo.mb-natural-photo,
#aria-search-results .ars-card .ars-media:has(img){
  min-height:0!important;height:auto!important;aspect-ratio:auto!important;
  padding:0!important;background:transparent;border:0;border-radius:9px;
}
#aap-mb .mb-card .mb-photo.mb-natural-photo .mb-image-frame{
  position:static;display:block;height:auto;min-height:0;border:0;border-radius:9px;
}
#aaph10-home .ah-journal-card .ah-feed-media img.ah-feed-photo,
#aaph10-home .ah-journal-card .ah-journal-image img.ah-photo,
#aap-mb .mb-card .mb-photo.mb-natural-photo .mb-image-frame img.mb-image-main,
#aria-search-results .ars-card .ars-media img,
#aap-premium-hero .aap-catalog-item img,
.woocommerce ul.products li.product a img,
.wp-block-post-featured-image img.wp-post-image{
  display:block!important;position:static!important;width:auto!important;height:auto!important;
  min-width:0!important;min-height:0!important;max-width:100%!important;max-height:none!important;
  aspect-ratio:auto!important;object-fit:contain!important;transform:none!important;
  margin:0 auto!important;padding:0!important;border:0;border-radius:9px!important;
}
#aaph10-home .ah-feed-media picture,
#aria-search-results .ars-media picture{display:block;line-height:0;max-width:100%}
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail{border-radius:9px}

#aap-mb .mb-card,#aaph10-home .ah-journal-card,#aria-search-results .ars-card{
  border-start-start-radius:9px;border-start-end-radius:9px;
  border-top-left-radius:9px;border-top-right-radius:9px;
}
.woocommerce div.product .woocommerce-product-gallery__image a>img.wp-post-image{
  display:block;width:auto;height:auto;max-width:100%;margin-inline:auto;border-radius:9px;
}

/* Some content filters add sizes="auto" after WordPress renders an attachment.
   Discard the artificial 3000 × 1500 placeholder for these bounded thumbnails. */
img:is(.wp-post-image,.ah-feed-photo,.mb-image-main,.lab-sample-photo,.attachment-woocommerce_thumbnail)[sizes^="auto"]{
  contain:none!important;contain-intrinsic-size:none!important;
}
@supports (aspect-ratio:attr(width type(<number>)) / attr(height type(<number>))){
  img:is(.wp-post-image,.ah-feed-photo,.mb-image-main,.lab-sample-photo,.attachment-woocommerce_thumbnail)[width][height][sizes^="auto"]{
    width:min(100%,attr(width px))!important;height:auto!important;
    aspect-ratio:attr(width type(<number>)) / attr(height type(<number>))!important;
  }
}
/* The colour service shares the desktop navigation grid and the mobile drawer. */
#aap-premium-hero #aap-hero-nav .aap-n-main [data-aap-nav=custom],.aap-n-drawer [data-aap-nav=custom],.aap-n-native-drawer a[data-aap-nav=custom]{background:linear-gradient(115deg,#52345a,#69446b)!important;color:#fff!important;border-color:#806581!important}
[data-aap-nav=custom] .aap-n-micro,[data-aap-nav=custom] small{color:inherit!important}
@media(min-width:1321px){#aap-premium-hero #aap-hero-nav .aap-n-main .aap-n-link{font-size:clamp(11px,.88vw,14px);padding-inline:5px;gap:4px}#aap-premium-hero #aap-hero-nav .aap-n-consult{width:130px;min-width:130px}}
