/* Article content rules, isolated from theme and third-party ad resets. */
.single .entry-content,
.single .entry-content .ifazo-html,
.single .entry-content .mw-parser-output {
    min-width: 0;
    max-width: 100%;
    word-break: normal;
    overflow-wrap: break-word;
}

.single .entry-content :is(p, li, figcaption, .thumbcaption) a:not(.ai-ad-wrapper a) {
    display: inline !important;
    font-size: inherit;
}

.single .entry-content img.mwe-math-fallback-image-inline {
    display: inline !important;
    float: none !important;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.single .entry-content figure,
.single .entry-content .thumbinner,
.single .entry-content .wp-caption {
    box-sizing: border-box;
    max-width: 100%;
}

.single .entry-content figure > a {
    display: block;
    max-width: 100%;
}

.single .entry-content figure > a > img,
.single .entry-content figure > img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

.single .entry-content :is(figcaption, .thumbcaption, .gallerytext) {
    min-width: 0;
    max-width: 100%;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word;
    text-align: start;
}

@media (max-width: 767px) {
    .single #main > .bloglo-container {
        padding-inline: 16px;
    }

    .single .entry-content {
        font-size: 16px;
        line-height: 1.75;
    }

    .single .entry-content :is(h1, h2) {
        clear: both;
        font-size: clamp(24px, 6vw, 30px);
        line-height: 1.3;
        margin-top: 1.3em;
        margin-bottom: 0.7em;
    }

    .single .entry-content h3 {
        clear: both;
        font-size: 21px;
        line-height: 1.4;
    }

    /* Desktop floats must not leave a few letters per line beside the image. */
    .single .entry-content :is(figure, .thumb, .infobox, .wp-caption, .alignleft, .alignright) {
        display: block !important;
        float: none !important;
        clear: both !important;
        box-sizing: border-box !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 1.25em auto !important;
    }

    .single .entry-content :is(img.alignleft, img.alignright) {
        height: auto !important;
    }

    .single .entry-content .thumbinner {
        box-sizing: border-box !important;
        width: auto !important;
        max-width: 100% !important;
    }

    .single .entry-content :is(figcaption, .thumbcaption, .gallerytext) {
        display: block !important;
        width: auto !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
        margin-top: 8px;
    }

    /* Figure-only tables are image galleries, not tabular data. */
    .single .entry-content table.ifazo-image-gallery,
    .single .entry-content table.ifazo-image-gallery > tbody {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        border: 0 !important;
        padding: 0 !important;
        margin: 1.25em 0 !important;
    }

    .single .entry-content table.ifazo-image-gallery > :is(tbody, thead, tfoot) > tr,
    .single .entry-content table.ifazo-image-gallery > tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .single .entry-content table.ifazo-image-gallery td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        border: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .single .entry-content table.ifazo-image-gallery td > figure {
        margin: 0 !important;
        padding: 12px !important;
    }

    /* Real tables and code scroll inside their own bounds. */
    .single .entry-content table:not(.ifazo-image-gallery) {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .single .entry-content pre {
        max-width: 100%;
        overflow-x: auto;
    }

    .single .entry-content :is(img, video) {
        max-width: 100%;
    }

    /* Keep oversized third-party inline creatives within the article column. */
    .single .ai-ad-wrapper {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        overflow-x: clip;
    }

    .single .ai-ad-wrapper > div,
    .single .ai-ad-wrapper :is(iframe, video) {
        max-width: 100% !important;
    }
}
