/* Frontend editorial typography. Editor canvas rules live in editor-canvas.css. */
:is(.mr-editorial-body,.mr-note-lead) {font-family:Georgia,serif;font-size:18px;line-height:1.65;}
:is(.mr-editorial-body,.mr-note-lead) :is(h1,h2,h3,h4,h5,h6):not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify){text-align:left;}
.mr-editorial-body :is(h1,h2,h3,h4,h5,h6){font-family:Georgia,serif;font-weight:normal;line-height:1.2;margin:1.2em 0 .55em;}
.mr-editorial-body h1{font-size:clamp(30px,4vw,44px);}
.mr-editorial-body h2{font-size:32px;}
.mr-editorial-body h3{font-size:26px;}
.mr-editorial-body h4{font-size:22px;}
.mr-editorial-body h5{font-size:19px;}
.mr-editorial-body h6{font-size:16px;}
.mr-editorial-body > h1:first-child{margin-top:0;}
:is(.mr-editorial-body,.mr-note-lead) figcaption{font-size:.85em;font-style:italic;line-height:1.45;}
.mr-editorial-body :is(blockquote,.wp-block-quote){font-family:inherit;font-size:.9em;line-height:1.6;margin:1.2em clamp(18px,4vw,42px);padding:0;border:0;background:transparent;box-shadow:none;}
.mr-editorial-body :is(blockquote,.wp-block-quote) p{font-size:inherit;line-height:inherit;}
:is(.mr-editorial-body,.mr-note-lead) p.is-style-references{font-size:.83em;line-height:1.5;}
.mr-editorial-body .ma-editorial-gallery{margin-inline:auto;justify-content:center;text-align:center;}
.mr-editorial-body .ma-editorial-row{justify-content:center;}
.mr-editorial-body .ma-editorial-gallery img{margin-inline:auto;object-position:center;}
.mr-editorial-body .mr-editorial-citation{margin-top:48px;padding:18px 0 0;border-top:1px solid #bbb;font:14px/1.6 Arial,sans-serif;}
.mr-editorial-body .mr-editorial-citation h3{font:600 14px/1.4 Arial,sans-serif;margin:0 0 8px;}

/* Editorial archive objects: a shared visual height per row, independent of captions.
 * The block provides --ma-ratio from the preview dimensions (3:4 or 4:3).
 * Proportional flex shrink keeps the complete row within the article column. */
.mr-shell .mr-editorial-body .ma-editorial-gallery.ma-editorial-frontend {
    --mr-editorial-preview-height: 400px;
    width: 80%; max-width: 100%; display: block;
}
.mr-shell .mr-editorial-body .ma-editorial-frontend .ma-editorial-row {
    display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start;
    gap: 18px; width: 100%; margin: 0 0 24px;
}
.mr-shell .mr-editorial-body .ma-editorial-frontend .ma-editorial-row > figure {
    flex: 0 1 calc(var(--ma-ratio, 1) * var(--mr-editorial-preview-height));
    min-width: 0; width: auto; max-width: 100%; margin: 0; padding: 0;
    box-sizing: border-box; text-align: center;
}
.mr-shell .mr-editorial-body .ma-editorial-frontend .ma-editorial-row > figure:only-child {
    flex: 0 1 calc(var(--ma-ratio, 1) * var(--mr-editorial-preview-height)); max-width: 100%;
}
.mr-shell .mr-editorial-body .ma-editorial-frontend figure > :is(.ma-result-image, .ma-result-placeholder) {
    display: block; width: 100%; height: auto; aspect-ratio: var(--ma-ratio, 1);
    max-width: 100%; margin: 0; box-sizing: border-box;
}
.mr-shell .mr-editorial-body .ma-editorial-frontend .mr-thumb-frame {
    width: 100%; height: 100%; max-width: 100%; aspect-ratio: auto; box-sizing: border-box;
}
.mr-shell .mr-editorial-body .ma-editorial-frontend .ma-result-image img {
    display: block; width: 100% !important; height: 100% !important;
    max-width: 100% !important; max-height: none !important;
    aspect-ratio: auto; object-fit: contain; object-position: center; box-sizing: border-box; margin: 0;
}
.mr-shell .mr-editorial-body .ma-editorial-frontend .mr-thumb-placeholder > img.mr-type-icon {
    width: 72% !important; height: 72% !important; margin: auto;
}
.mr-shell .mr-editorial-body .ma-editorial-frontend figcaption {
    width: auto; max-width: none; min-width: 0; height: auto; max-height: none;
    margin: 8px 0 0; padding: 0; overflow: visible; overflow-wrap: anywhere;
    white-space: normal; text-align: center;
}
.mr-shell .mr-editorial-body .ma-editorial-frontend figcaption .ma-object-caption {
    overflow-wrap: anywhere; white-space: normal; height: auto; max-height: none;
}
@media (max-width: 480px) {
    .mr-shell .mr-editorial-body .ma-editorial-gallery.ma-editorial-frontend { --mr-editorial-preview-height: 260px; }
    .mr-shell .mr-editorial-body .ma-editorial-frontend .ma-editorial-row { flex-direction: column; align-items: center; gap: 18px; }
    .mr-shell .mr-editorial-body .ma-editorial-frontend .ma-editorial-row > figure,
    .mr-shell .mr-editorial-body .ma-editorial-frontend .ma-editorial-row > figure:only-child {
        flex: none; width: min(100%, calc(var(--ma-ratio, 1) * var(--mr-editorial-preview-height))); max-width: 100%;
    }
}

/* Native Gutenberg footnotes: restore semantic numbering after the site-wide
 * list reset; each note is a list item, not an independent paragraph block. */
:is(.mr-editorial-body,.mr-note-lead) ol.wp-block-footnotes {
    list-style: decimal outside;
    padding-inline-start: 1.8em;
    margin-block: 1em 1.5em;
    font-size: .83em;
    line-height: 1.5;
}
:is(.mr-editorial-body,.mr-note-lead) ol.wp-block-footnotes > li {
    display: list-item;
    list-style: decimal outside;
    padding-inline-start: .2em;
    margin-block: 0 .45em;
    overflow-wrap: anywhere;
}
:is(.mr-editorial-body,.mr-note-lead) ol.wp-block-footnotes > li:last-child { margin-block-end: 0; }
.mr-editorial-body .ma-editorial-custom-caption {
    display: block;
    margin-block-start: .3em;
    font-style: italic;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Editorial media: a common centered 80% column, independent of captions.
 * Explicit Gutenberg wide/full/float choices are not reset. Gallery children
 * keep their own widths so the 80% rule is not applied twice. */
.mr-shell .mr-editorial-body :is(.wp-block-image,.wp-block-gallery,.wp-block-video,.wp-block-embed,.video-container,.wp-video):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright) {
    max-width: 80%; margin-inline: auto;
}
.mr-shell .mr-editorial-body :is(.wp-block-video,.wp-block-embed,.video-container):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright) { width: 80%; }
.mr-shell .mr-editorial-body .wp-video:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright) { width: 80% !important; max-width: 80% !important; }
.mr-shell .mr-editorial-body :is(.wp-block-gallery,.wp-block-image,.wp-block-video,.wp-block-embed) figcaption { overflow-wrap: anywhere; }
.mr-shell .mr-editorial-body .wp-block-image:not(.alignleft):not(.alignright) img { display: block; margin-inline: auto; }
.mr-shell .mr-editorial-body .wp-block-gallery .wp-block-image { max-width: 100%; margin-inline: 0; }
.mr-shell .mr-editorial-body .wp-block-gallery:not(.is-cropped) img { object-fit: contain; }
.mr-shell .mr-editorial-body .wp-block-video video { display: block; width: 100%; height: auto; max-width: 100%; }
.mr-shell .mr-editorial-body .wp-block-video .wp-video { width: 100% !important; max-width: 100% !important; margin-inline: 0; }
.mr-shell .mr-editorial-body .wp-block-embed iframe { max-width: 100%; }
.mr-shell .mr-editorial-body .wp-block-embed.is-type-video:not(.wp-has-aspect-ratio) iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.mr-shell .mr-editorial-body .video-container { aspect-ratio: 16 / 9; padding-bottom: 0; height: auto; }
.mr-shell .mr-editorial-body > iframe[src*="youtube"], .mr-shell .mr-editorial-body > video { display: block; width: 80%; max-width: 100%; height: auto; margin: 24px auto; }
.mr-shell .mr-editorial-body > iframe[src*="youtube"] { aspect-ratio: 16 / 9; }
/* Override the compact catalogue preview ratio only for the uncropped variant. */
.mr-shell img.ma-optimized-preview.ma-preview-fit { aspect-ratio: auto; object-fit: contain; }
.mr-shell .mr-note-hero figure img.ma-preview-fit { object-fit: contain; object-position: center; aspect-ratio: auto; }
@media (max-width: 480px) {
    .mr-shell .mr-editorial-body :is(.wp-block-image,.wp-block-gallery,.wp-block-video,.wp-block-embed,.video-container):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright) { max-width: 100%; }
    .mr-shell .mr-editorial-body :is(.wp-block-video,.wp-block-embed,.video-container):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright), .mr-shell .mr-editorial-body > iframe[src*="youtube"], .mr-shell .mr-editorial-body > video, .mr-shell .mr-editorial-body .ma-editorial-gallery.ma-editorial-frontend { width: 100%; }
    .mr-shell .mr-editorial-body .wp-video:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright) { width: 100% !important; max-width: 100% !important; }
}
