/* Shared public article measures. Typography and vertical rhythm stay local. */
#top.rv-site .rv-entry-container,
#top.ed-site .ed-knowledge-single-container {
	max-width: 1440px;
}

/* Measure media against the usable article area, not the viewport. */
#top.rv-site .rv-entry-content,
#top.ed-site .ed-knowledge-single-content {
	container-type: inline-size;
}

#top.rv-site .rv-entry-header,
#top.ed-site .ed-knowledge-entry-header {
	width: min(100%, 950px);
	max-width: 950px;
}

#top.rv-site .rv-entry-body,
#top.ed-site .ed-knowledge-entry-body {
	width: min(100%, 800px);
	max-width: 800px;
}

/* Centred standalone media can extend beyond the text column.
   Natural image widths remain authoritative; small images are not enlarged.
   Without container-unit support, the existing reading-column layout remains. */
@supports (width: 1cqw) {
	#top.rv-site .rv-entry-body img.aligncenter,
	#top.ed-site .ed-knowledge-entry-body img.aligncenter {
		display: block;
		float: none;
		width: var(--rv-image-width, auto);
		max-width: min(1100px, 100cqw);
		height: auto;
		position: relative;
		left: 50%;
		transform: translateX(-50%);
		margin-left: 0;
		margin-right: 0;
	}

	#top.rv-site .rv-entry-body :is(figure, .wp-caption).aligncenter,
	#top.ed-site .ed-knowledge-entry-body :is(figure, .wp-caption).aligncenter,
	#top.rv-site .rv-entry-body a:has(> img.aligncenter),
	#top.ed-site .ed-knowledge-entry-body a:has(> img.aligncenter) {
		display: block;
		float: none;
		width: max-content;
		max-width: min(1100px, 100cqw);
		position: relative;
		left: 50%;
		transform: translateX(-50%);
		margin-left: 0;
		margin-right: 0;
	}

	/* Wrapper owns centring; never shift its image or link a second time. */
	#top.rv-site .rv-entry-body :is(figure, .wp-caption).aligncenter img,
	#top.ed-site .ed-knowledge-entry-body :is(figure, .wp-caption).aligncenter img,
	#top.rv-site .rv-entry-body a:has(> img.aligncenter) > img.aligncenter,
	#top.ed-site .ed-knowledge-entry-body a:has(> img.aligncenter) > img.aligncenter {
		width: var(--rv-image-width, auto);
		max-width: 100%;
		position: static;
		left: auto;
		transform: none;
		margin-left: auto;
		margin-right: auto;
	}

	#top.rv-site .rv-entry-body :is(figure, .wp-caption).aligncenter a:has(> img.aligncenter),
	#top.ed-site .ed-knowledge-entry-body :is(figure, .wp-caption).aligncenter a:has(> img.aligncenter) {
		width: auto;
		max-width: 100%;
		position: static;
		left: auto;
		transform: none;
	}
}
