/* v1.9.2 — Center images without upscaling small originals.
 * High-resolution WordPress originals and responsive srcset are provided by reading-tools.php.
 * A 300px image stays 300px on a 900px article, avoiding blur. */
.article-content :is(img,figure,div.wp-caption){box-sizing:border-box}
.article-content img{max-width:100%;height:auto}
.article-content img.aligncenter,
.article-content a.aligncenter > img,
.article-content .wp-caption.aligncenter img,
.article-content figure.aligncenter img,
.article-content .wp-block-image.aligncenter img,
.article-content p[style*="text-align:center"] > img,
.article-content p[style*="text-align:center"] > a > img,
.article-content p[style*="text-align: center"] > img,
.article-content p[style*="text-align: center"] > a > img{
    display:block;float:none!important;
    width:auto!important;height:auto!important;
    max-width:100%!important;max-height:none;
    margin-inline:auto!important;object-fit:contain;
}
/* WordPress Classic Editor writes a fixed inline width on caption wrappers.
   fit-content allows a large photo to use the article width without stretching a small one. */
.article-content :is(.wp-caption,figure).aligncenter,
.article-content .wp-block-image.aligncenter,
.article-content a.aligncenter{
    display:block;float:none!important;
    width:fit-content!important;max-width:100%!important;
    margin-inline:auto!important;text-align:center!important;
}
.article-content p:has(> img.aligncenter),
.article-content p:has(> a > img.aligncenter),
.article-content p:has(> a.aligncenter),
.article-content p:has(> .wp-caption.aligncenter),
.article-content p[style*="text-align:center"],
.article-content p[style*="text-align: center"]{
    text-align:center!important;
}
.article-content p:has(> a > img.aligncenter) > a,
.article-content p:has(> a.aligncenter) > a,
.article-content p[style*="text-align:center"]:has(> a > img) > a,
.article-content p[style*="text-align: center"]:has(> a > img) > a{
    display:block;width:fit-content;max-width:100%;margin-inline:auto;
}
.article-content .wp-caption-text,
.article-content figure.aligncenter figcaption{max-width:100%;text-align:center!important}
/* Featured image remains its own size, never force-stretched/cropped.
   Lightbox opens it with the original full-resolution attachment. */
.single-story .single-hero{width:fit-content;max-width:100%;text-align:center}
.single-story .single-hero img{
    display:block;width:auto!important;height:auto!important;
    max-width:100%!important;max-height:none!important;
    object-fit:contain!important;margin-inline:auto!important;
}
