/* Restore the image sizing used by the older Medium-imported posts. */
article p:has(> img[class*="blog-post-md-img-"]) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
}

article p > img[class*="blog-post-md-img-"] {
    box-sizing: border-box;
    display: block;
    height: auto;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    object-fit: contain;
}

article p > img.blog-post-md-img-half {
    flex: 0 0 calc(50% - 0.5rem);
    width: calc(50% - 0.5rem);
}

article p > img.blog-post-md-img-30 {
    flex: 0 0 calc(33.333% - 0.667rem);
    width: calc(33.333% - 0.667rem);
}

article p > img.blog-post-md-img-15 {
    flex: 0 0 calc(15% - 0.5rem);
    width: calc(15% - 0.5rem);
}

article p > img.blog-post-md-img-70 {
    flex: 0 0 calc(70% - 0.5rem);
    width: calc(70% - 0.5rem);
}

@media (max-width: 640px) {
    article p:has(> img[class*="blog-post-md-img-"]) {
        display: block;
    }

    article p > img[class*="blog-post-md-img-"] {
        width: 100%;
        margin: 0.75rem auto;
    }
}
