/* Native posts and Pages, excluding the dedicated homepage. No content rewriting. */
body.shd-editorial {
    --shd-text-measure: 50rem;
    --shd-content-font: 'Open Sans', sans-serif;
    --shd-content-muted: #5f6368;
    --shd-editorial-accent: var(--shd-accent);
    background: var(--shd-surface);
}
/* As on the Blog, disabled utilities must not leave an empty mobile bar. */
body.shd-editorial:not(:has(#bwp-sticky-buttons .bwp-mobile-buttons > *)) { padding-top: 0; }
body.shd-editorial #bwp-sticky-buttons:not(:has(.bwp-mobile-buttons > *)) { display: none; }
body.shd-editorial .bwp-single-post-section { margin-top: 0; background: var(--shd-surface); box-shadow: none; border-radius: 0; }
body.shd-editorial .bwp-single-post-article { padding-block: clamp(2.5rem, 5vw, 5rem) 3rem; }
body.shd-editorial .bwp-single-post-header { width: min(100% - 2 * var(--shd-gutter), 58rem); max-width: none; margin: 0 auto clamp(2rem, 4vw, 3.5rem); padding: 0; text-align: left; }
body.shd-editorial .bwp-single-post-title { color: var(--shd-ink); font: 600 clamp(2rem, 4vw, 4rem)/1.15 var(--shd-font-display); letter-spacing: -.035em; text-wrap: balance; }
body.shd-editorial .bwp-single-post-content { width: min(100% - 2 * var(--shd-gutter), var(--shd-text-measure)); max-width: none; padding: 0; }
body.shd-editorial .bwp-single-post-media-container { width: min(100% - 2 * var(--shd-gutter), 68rem); max-width: none; padding: 0; margin-block: clamp(2rem, 4vw, 3.5rem); }
body.shd-editorial .bwp-single-post-media-container :is(.bwp-post-media, .bwp-post-media-slider) { box-shadow: none; }
body.shd-editorial picture.hero-fullwidth { display: block; }
body.shd-editorial picture.hero-fullwidth img { display: block; width: 100%; height: auto; }

body.shd-editorial .bwp-single-post-content > .entry-content { font: 400 clamp(1rem, 1.25vw, 1.125rem)/1.78 var(--shd-content-font); letter-spacing: 0; color: var(--shd-ink); overflow-wrap: anywhere; }
body.shd-editorial .entry-content p { margin-block: 0 1.35em; }
body.shd-editorial .entry-content :is(h1, h2, h3, h4, h5, h6) { margin-block: 1.8em .65em; font-family: var(--shd-font-display); font-weight: 600; line-height: 1.3; text-transform: none; letter-spacing: -.02em; color: var(--shd-ink); }
body.shd-editorial .entry-content h1 { font-size: clamp(2rem, 3.5vw, 3rem); }
body.shd-editorial .entry-content h2 { font-size: clamp(1.75rem, 2.6vw, 2.5rem); }
body.shd-editorial .entry-content h3 { font-size: clamp(1.4rem, 2vw, 1.875rem); }
body.shd-editorial .entry-content h4 { font-size: clamp(1.2rem, 1.7vw, 1.5rem); }
body.shd-editorial .entry-content :is(h5, h6) { font-size: 1.125rem; }
body.shd-editorial .entry-content > :first-child { margin-top: 0; }
body.shd-editorial .entry-content :is(ul, ol):not([class*="wp-block-"]),
body.shd-editorial .entry-content .wp-block-list { margin-block: 0 1.35em; padding-left: 1.5em; }
body.shd-editorial .entry-content :is(ul, ol) :is(ul, ol) { margin-block: .5em; padding-left: 1.35em; }
body.shd-editorial .entry-content .wp-block-list li { margin-block: .35em; }
body.shd-editorial .entry-content strong { font-weight: 700; }
body.shd-editorial .entry-content a:not(.wp-block-button__link):not(.wp-block-file__button) { color: var(--shd-accent); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; box-shadow: none; }
body.shd-editorial .entry-content a:hover { text-decoration-thickness: 2px; }
body.shd-editorial .entry-content figure > a { text-decoration: none; }
/* Halva globally disables keyboard outlines with !important. */
body.shd-editorial :is(.bwp-single-post-section, .bwp-comments-area, .bwp-single-post-navigation, .bwp-related-posts) :is(a, button, input, textarea, select, [tabindex]):focus-visible { outline: 2px solid var(--shd-accent) !important; outline-offset: 4px; }
body.shd-editorial .entry-content hr { width: 100%; max-width: none; margin-block: 2.5rem; height: 1px; border: 0; background: var(--shd-line); }
body.shd-editorial .entry-content hr::after { display: none; }
body.shd-editorial .entry-content :is(img, iframe) { box-shadow: none; }
body.shd-editorial .entry-content :is(figcaption, .wp-caption-text) { font: 400 .8125rem/1.6 var(--shd-content-font); color: var(--shd-content-muted); margin-top: .75rem; }
body.shd-editorial .entry-content > figure { margin-block: 2rem; }
/* Retain wide/full semantics with safe viewport gutters. Parent margins use !important. */
body.shd-editorial .entry-content .alignwide { width: min(62rem, calc(100vw - 2 * var(--shd-gutter))); max-width: none; margin-inline: calc((100% - min(62rem, 100vw - 2 * var(--shd-gutter))) / 2) !important; }
body.shd-editorial .entry-content .alignfull { width: calc(100vw - 2 * var(--shd-gutter)); max-width: none; margin-inline: calc((100% - (100vw - 2 * var(--shd-gutter))) / 2) !important; }

body.shd-editorial .entry-content .wp-block-table { max-width: 100%; overflow-x: auto; }
body.shd-editorial .entry-content table { width: 100%; border-collapse: collapse; font-size: .9375em; margin-block: 1.5rem; }
body.shd-editorial .entry-content :is(td, th) { padding: .8em 1em; border: 1px solid var(--shd-line); vertical-align: top; }
body.shd-editorial .entry-content th { background: #eae8e2; color: var(--shd-ink); text-align: left; }
body.shd-editorial .entry-content tbody tr:nth-child(even) { background: rgba(255,255,255,.45); }
body.shd-editorial .entry-content .wp-block-table table { min-width: 28rem; table-layout: auto; }
body.shd-editorial .entry-content > table { display: block; max-width: 100%; overflow-x: auto; }
body.shd-editorial .entry-content blockquote { margin: 2rem 0; padding: .5rem 0 .5rem 1.5rem; border: 0; border-left: 3px solid var(--shd-editorial-accent); box-shadow: none; background: transparent; color: var(--shd-ink); font: inherit; }
body.shd-editorial .entry-content blockquote::before { display: none; }
body.shd-editorial .entry-content blockquote p { font: inherit; margin-block: 0 .75em; }
body.shd-editorial .entry-content blockquote :is(cite, footer) { color: var(--shd-content-muted); font-family: var(--shd-content-font); font-size: .875rem; }
/* Match Halva's block-variant specificity without flattening other blocks. */
body.shd-editorial .entry-content .wp-block-quote:not(.is-large):not(.is-style-large):not(.is-style-plain) { padding-left: 1.5rem; border-left: 3px solid var(--shd-editorial-accent); }
body.shd-editorial .entry-content .wp-block-quote:is(.is-style-plain, .is-large, .is-style-large),
body.shd-editorial .entry-content .wp-block-quote:not(.is-large):not(.is-style-large):not(.is-style-plain) { font: inherit; }
body.shd-editorial .entry-content .wp-block-quote:is(.is-style-plain, .is-large, .is-style-large) p,
body.shd-editorial .entry-content .wp-block-quote:not(.is-large):not(.is-style-large):not(.is-style-plain) p { font: inherit; margin-block: 0 .75em; }
body.shd-editorial .entry-content :is(code, kbd, samp) { font-family: ui-monospace, Consolas, monospace; font-size: .875em; }
body.shd-editorial .entry-content :not(pre) > code { padding: .12em .3em; border-radius: .2rem; background: #eae8e2; color: var(--shd-ink); }
body.shd-editorial .entry-content pre { max-width: 100%; overflow-x: auto; padding: 1.25rem; margin-block: 1.75rem; background: #eae8e2; color: var(--shd-ink); border: 1px solid var(--shd-line); font: .875rem/1.65 ui-monospace, Consolas, monospace; white-space: pre; }
body.shd-editorial .entry-content pre code { padding: 0; background: transparent; color: inherit; font: inherit; white-space: inherit; }

body.shd-editorial :is(.bwp-single-post-metadata li, .bwp-single-post-taxonomies, .bwp-author-bio, .comment-content) { font-family: var(--shd-content-font); color: var(--shd-content-muted); letter-spacing: 0; }
body.shd-editorial .bwp-single-post-metadata li { font-size: .8125rem; line-height: 1.6; }
body.shd-editorial .bwp-single-post-metadata a { color: var(--shd-content-muted); }
body.shd-editorial :is(.bwp-single-post-taxonomies a, .post-navigation a, .bwp-author-name) { color: var(--shd-ink); }
body.shd-editorial :is(.bwp-single-post-taxonomies a:hover, .post-navigation a:hover) { color: var(--shd-accent); }
body.shd-editorial :is(.bwp-single-post-navigation-container, .bwp-about-author-container) { width: min(100% - 2 * var(--shd-gutter), var(--shd-text-measure)); max-width: none; padding-inline: 0; }
body.shd-editorial .post-navigation .post-title-nav { font: 500 1.125rem/1.5 var(--shd-font-display); }
body.shd-editorial .post-navigation .meta-nav { font-family: var(--shd-content-font); color: var(--shd-content-muted); }
body.shd-editorial :is(.bwp-related-posts-title, .bwp-random-posts-title, .comment-reply-title, .bwp-comments-title) { font-family: var(--shd-font-display); color: var(--shd-ink); }
body.shd-editorial :is(.bwp-related-posts, .bwp-random-posts) .bwp-post-content { background: var(--shd-surface); box-shadow: none; }
body.shd-editorial :is(.bwp-related-posts, .bwp-random-posts) .bwp-post-title { font-family: var(--shd-font-display); color: var(--shd-ink); }
body.shd-editorial .bwp-comments-area { font: 400 1rem/1.75 var(--shd-content-font); color: var(--shd-ink); background: var(--shd-surface); }
body.shd-editorial .comment-form :is(input:not([type="submit"]):not([type="checkbox"]), textarea) { background: var(--shd-surface); color: var(--shd-ink); border-color: var(--shd-line); }
/* Finish the warm canvas without changing footer markup or widgets. */
body.shd-editorial .bwp-single-post-section > .bwp-section-separator { background: var(--shd-line); }
body.shd-editorial .bwp-site-footer { background: var(--shd-surface); }

/* Main-loop utility navigation, independent of Halva's title/media markup. */
body.shd-editorial:is(.single-post, .page) { --shd-post-outer: 67.5rem; }
body.single-post.shd-editorial .shd-breadcrumbs { width: min(100% - 2 * var(--shd-gutter), var(--shd-post-outer)); margin: 1.5rem auto 0; }
body.single-post.shd-editorial .shd-breadcrumbs + .bwp-single-post-section .bwp-single-post-article { padding-top: clamp(1.5rem, 2.2vw, 2rem); }
/* Center the existing article once; nested regions share its left content edge. */
body.shd-editorial:is(.single-post, .page) .bwp-single-post-article { width: min(100% - 2 * var(--shd-gutter), var(--shd-post-outer)); margin-inline: auto; container-type: inline-size; }
body.shd-editorial:is(.single-post, .page) :is(.bwp-single-post-header, .bwp-single-post-media-container) { width: 100%; margin-inline: 0; }
body.shd-editorial:is(.single-post, .page) .bwp-single-post-content { width: 100%; margin-inline: 0; }
/* Keep wide/full blocks within the shared column, without viewport offsets.
   The percentage fallback also contains them in older browsers. */
body.shd-editorial:is(.single-post, .page) .entry-content :is(.alignwide, .alignfull) { width: 100%; margin-inline: 0 !important; }
@supports (width: 1cqw) {
    body.shd-editorial:is(.single-post, .page) .entry-content .alignwide { width: min(62rem, 100cqw); }
    body.shd-editorial:is(.single-post, .page) .entry-content .alignfull { width: 100cqw; }
}
