/* CKB R1-D-P5-R1: article-only Gutenberg image patterns, no global layout changes. */
.ckb-wp-shell .ckb-article-detail .entry-content .wp-block-image,
.ckb-wp-shell .ckb-article-detail .entry-content .wp-block-gallery {
    margin: clamp(24px, 4vw, 44px) 0;
    min-width: 0;
    max-width: 100%;
}
.ckb-wp-shell .ckb-article-detail .entry-content .wp-block-image img,
.ckb-wp-shell .ckb-article-detail .entry-content .wp-block-gallery img,
.ckb-wp-shell .ckb-article-detail .entry-content .wp-block-media-text img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.ckb-wp-shell .ckb-article-detail .entry-content figure figcaption,
.ckb-wp-shell .ckb-article-detail .entry-content .wp-element-caption {
    color: var(--section-shell-muted, #afbac1);
    font-size: clamp(12px, 1.3vw, 14px);
    line-height: 1.5;
    margin: 9px 0 0;
    overflow-wrap: anywhere;
    text-align: left;
}
.ckb-wp-shell .ckb-article-detail .entry-content .wp-block-media-text.ckb-editorial-split {
    align-items: start;
    margin: 32px 0;
    min-width: 0;
    max-width: 100%;
    gap: clamp(20px, 4vw, 44px);
}
.ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-split .wp-block-media-text__content {
    min-width: 0;
    padding: 0;
    overflow-wrap: anywhere;
}
.ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-split .wp-block-media-text__media {
    min-width: 0;
    margin: 0;
}
.ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-gallery {
    gap: clamp(9px, 2vw, 16px);
}
.ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-gallery figure {
    min-width: 0;
}
.ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-gallery img {
    object-fit: contain;
}
.ckb-wp-shell .ckb-article-detail .entry-content .ckb-legacy-image-pending {
    padding: 12px 16px;
    border-left: 3px solid currentColor;
    opacity: .85;
    font-size: 14px;
}
@media (max-width: 780px) {
    .ckb-wp-shell .ckb-article-detail .entry-content .wp-block-media-text.ckb-editorial-split {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px;
    }
    .ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-split > .wp-block-media-text__media {
        grid-column: 1;
        grid-row: 1;
    }
    .ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-split > .wp-block-media-text__content {
        grid-column: 1;
        grid-row: 2;
    }
    .ckb-wp-shell .ckb-article-detail .entry-content .wp-block-gallery {
        gap: 8px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .ckb-wp-shell .ckb-article-detail .entry-content figure { transition: none !important; }
}

/* P5-R1-R3: editor-friendly single-photo media slot, caption below the image.
 * Uses native Media & Text so editors select/upload rather than see an empty <img>.
 */
.ckb-wp-shell .ckb-article-detail .entry-content .wp-block-media-text.ckb-editorial-photo-stack {
    display: block;
    width: 100%;
    margin: clamp(24px, 4vw, 44px) 0;
    max-width: 100%;
}
.ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-photo-stack .wp-block-media-text__media {
    display: block;
    margin: 0;
    width: 100%;
}
.ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-photo-stack .wp-block-media-text__media img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.ckb-wp-shell .ckb-article-detail .entry-content .ckb-editorial-photo-stack .wp-block-media-text__content {
    display: block;
    width: 100%;
    padding: 0;
    margin-top: 10px;
    color: var(--section-shell-muted, #afbac1);
    font-size: clamp(12px, 1.3vw, 14px);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
