/*
 * What an editor or an assistant writes in a post or page: WordPress's blocks in the site's own look, on a
 * phone and on a wide screen. Loaded on single posts and pages after WordPress's block library, and in the
 * editor with add_editor_style(), so what is typed looks like what is published.
 *
 * .entry-content is the published body and .is-root-container the editor's canvas. Rules naming
 * .entry-content alone draw markup only the published page has (inc/blocks.php wraps tables, galleries,
 * panoramas and files, and draws the cards); the rest name both, so the editor matches. style.css sets the
 * serif on p, ul, ol and blockquote with the weight of :is(.entry-content, ...) p, so a rule that gives a
 * paragraph inside a block its own face carries the same prefix.
 */
.entry-content,
.is-root-container {
	--b-ink: var(--ink, #1d1d1b);
	--b-muted: var(--muted, #5b5b57);
	--b-line: var(--line, #d9d4c7);
	--b-line-strong: var(--line-strong, #9c968a);
	--b-surface: var(--surface, #f6f2ea);
	--b-card: var(--card, #fffdf9);
	--b-accent: var(--accent, #2f6f6a);
	--b-on-accent: var(--on-accent, #ffffff);
	--b-dark: var(--dark, #171613);
	--b-sans: var(--sans, system-ui, sans-serif);
	--b-mono: var(--mono, ui-monospace, monospace);
	--b-radius: var(--radius, 8px);
	/* How far a wide block reaches past the words on each side, and the page's side margin on a phone. */
	--b-wide: var(--wide, 55rem);
	--b-gutter: var(--gutter, 1.25rem);
}

:is(.entry-content, .is-root-container) > * {
	margin-block: 0 1.35em;
}
:is(.entry-content, .is-root-container) > :last-child {
	margin-bottom: 0;
}
/* Long addresses and words in a narrow column break rather than push the page sideways. */
:is(.entry-content, .is-root-container) :is(p, li, dd, figcaption, cite) {
	overflow-wrap: anywhere;
}
:is(.entry-content, .is-root-container) img {
	max-width: 100%;
	height: auto;
}

/*
 * Headings step down in size from the second level. The theme's third-level size is smaller than the
 * reading size of the words under it, so inside an article a heading of the third level is larger than the
 * words and the fourth level is small capitals-style labels in the muted ink.
 */
:is(.entry-content, .is-root-container) h3 {
	font-size: 1.45rem;
	letter-spacing: -0.01em;
}
:is(.entry-content, .is-root-container) h4 {
	color: var(--b-muted);
	font-size: 1rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Lists, and a list of terms. */
:is(.entry-content, .is-root-container) :is(ul, ol) {
	padding-left: 1.4rem;
}
:is(.entry-content, .is-root-container) li + li {
	margin-top: 0.45em;
}
:is(.entry-content, .is-root-container) dl {
	font-family: var(--b-sans);
}
:is(.entry-content, .is-root-container) dt {
	font-weight: 700;
}
:is(.entry-content, .is-root-container) dd {
	margin: 0.2rem 0 0;
	color: var(--b-muted);
}
:is(.entry-content, .is-root-container) dd + dt {
	margin-top: 0.85rem;
}

/* Quote, and a pull quote: one line lifted out of the story between two rules. */
:is(.entry-content, .is-root-container) blockquote {
	margin: 2rem 0;
	padding: 0.25rem 0 0.25rem 1.25rem;
	border-left: 3px solid var(--b-accent);
}
/* The "Plain" style of a quote: no rule beside it, still in italics so it reads as someone else's words. */
:is(.entry-content, .is-root-container) .wp-block-quote.is-style-plain {
	padding-left: 0;
	border-left: 0;
}
:is(.entry-content, .is-root-container) blockquote p {
	margin: 0;
}
:is(.entry-content, .is-root-container) blockquote p + p {
	margin-top: 0.7em;
}
:is(.entry-content, .is-root-container) cite {
	display: block;
	margin-top: 0.7rem;
	color: var(--b-muted);
	font-family: var(--b-sans);
	font-size: 0.9rem;
	font-style: normal;
}
:is(.entry-content, .is-root-container) .wp-block-pullquote {
	margin: 2.25rem 0;
	padding: 1.5rem 0;
	border-block: 1px solid var(--b-line-strong);
	font-size: inherit;
	text-align: left;
}
:is(.entry-content, .is-root-container) .wp-block-pullquote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 1.45rem;
	line-height: 1.3;
	text-wrap: balance;
}
:is(.entry-content, .is-root-container) .wp-block-pullquote blockquote p {
	font-size: inherit;
	line-height: inherit;
}

/* Every figure keeps the same space around it; captions are small, in the UI face, and start at the left. */
:is(.entry-content, .is-root-container) :is(.wp-block-image, .wp-block-video, .wp-block-audio, .wp-block-embed, .wp-block-cover, .wp-block-media-text, .wp-block-table, .wp-block-gallery, .wp-block-file, .wp-block-columns.is-style-figures) {
	margin-block: 2rem;
}
:is(.entry-content, .is-root-container) figcaption {
	margin: 0.6rem 0 0;
	color: var(--b-muted);
	font-family: var(--b-sans);
	font-size: 0.875rem;
	line-height: 1.5;
	text-align: left;
}
:is(.entry-content, .is-root-container) :is(.wp-block-image img, .wp-block-video video, .wp-block-embed iframe) {
	border-radius: var(--b-radius);
}
/* The "Rounded" style of a picture: a circle for a square one, an ellipse for any other. */
:is(.entry-content, .is-root-container) .wp-block-image.is-style-rounded img {
	border-radius: 9999px;
}

/*
 * Video file. WordPress has a video with a poster fill its frame, which cuts the top and bottom off an
 * upright one: keep its shape and stop it short of the screen's height.
 */
:is(.entry-content, .is-root-container) .wp-block-video video {
	display: block;
	width: 100%;
	max-height: min(70svh, 40rem);
	background: var(--b-dark);
	object-fit: contain;
}
:is(.entry-content, .is-root-container) .wp-block-audio audio {
	display: block;
	width: 100%;
	min-width: 0;
}

/*
 * Embeds. WordPress gives a player its shape (wp-has-aspect-ratio) only when the website says its size AND
 * the theme declares add_theme_support( 'responsive-embeds' ); without that support every YouTube frame is
 * drawn 500 by 281 in any column. These rules cover players that say nothing.
 */
/* An embed the site keeps as a link (Dailymotion, a website with no player) is a long address with no spaces. */
:is(.entry-content, .is-root-container) .wp-block-embed__wrapper {
	overflow-wrap: anywhere;
}
:is(.entry-content, .is-root-container) .wp-block-embed iframe {
	display: block;
	max-width: 100%;
	border: 0;
}
/*
 * The provider rules below have fewer classes than this one, so a provider with its own shape is excluded
 * here; otherwise this rule outranks them and an upright TikTok is drawn in a 16:9 box.
 */
:is(.entry-content, .is-root-container) .wp-block-embed.is-type-video:not(.wp-has-aspect-ratio, .is-provider-tiktok) .wp-block-embed__wrapper > iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}
/* A YouTube Short is saved 9:16; core's ratio box would make it 1100 pixels tall in a wide column. */
:is(.entry-content, .is-root-container) .wp-block-embed.wp-embed-aspect-9-16 .wp-block-embed__wrapper {
	width: min(100%, 20.3125rem);
	margin-inline: auto;
}
/* TikTok's player is upright (325 by 578). In a 16:9 box its caption and controls cover the picture. */
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-tiktok .wp-block-embed__wrapper {
	width: min(100%, 20.3125rem);
	margin-inline: auto;
}
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-tiktok .wp-block-embed__wrapper::before {
	content: none;
}
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-tiktok .wp-block-embed__wrapper > iframe {
	position: static;
	width: 100%;
	height: auto;
	aspect-ratio: 325 / 578;
}
/* Audio players: Spotify says 352 tall (hold it there, or a 21:9 box leaves a band under it); the others say little. */
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-spotify .wp-block-embed__wrapper::before {
	content: none;
}
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-spotify iframe {
	position: static;
	width: 100%;
	height: 352px;
	border-radius: 12px;
}
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-pocket-casts iframe {
	width: 100%;
	height: 200px;
}
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-soundcloud iframe {
	width: 100%;
	height: 400px;
}
/* Mastodon's script sets the frame's height as an attribute; any CSS height would override it and cut the post. */
:is(.entry-content, .is-root-container) .wp-block-embed iframe.mastodon-embed {
	width: 100%;
	max-width: 550px;
	min-height: 360px;
	margin-inline: auto;
}
/* Posts from other networks sit centred at the width their networks draw them. */
:is(.entry-content, .is-root-container) .wp-block-embed.is-type-rich .wp-block-embed__wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
}
/*
 * A post from X, Bluesky, Reddit, Mastodon or TikTok is a blockquote until its network's script draws it,
 * and stays one when the script is blocked: then it reads as a plain card, not as the story's own quotation.
 */
:is(.entry-content, .is-root-container) .wp-block-embed blockquote {
	box-sizing: border-box;
	width: 100%;
	max-width: 550px;
	margin: 0 auto;
	padding: 1rem 1.125rem;
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	background: var(--b-card);
	font-family: var(--b-sans);
	font-size: 0.95rem;
	font-style: normal;
	line-height: 1.5;
}
/* X and Bluesky frames show white corners on a dark page until the frame is told it holds a light page. */
.entry-content .wp-block-embed :is(.twitter-tweet, .bluesky-embed) iframe {
	color-scheme: light;
}
/* Frames the plugin's handlers make (maps, document viewers) carry their own shape inline; give them the frame look. */
:is(.entry-content, .is-root-container) iframe.site-embed {
	display: block;
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
}

/*
 * Panorama: a picture three times as wide as tall or more (inc/blocks.php). Never shorter than
 * --panorama-height; where that makes it wider than its space it scrolls sideways.
 */
.panorama {
	container-type: inline-size;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	border-radius: var(--b-radius);
	scrollbar-width: thin;
}
.panorama:focus-visible {
	outline-offset: -3px;
}
.panorama[tabindex] {
	cursor: grab;
}
.panorama[data-dragging] {
	cursor: grabbing;
	user-select: none;
}
.entry-content .wp-block-image .panorama img {
	--panorama-height: clamp(11rem, 25cqw, 15rem);

	display: block;
	width: max(100cqw, var(--panorama-height) * var(--ratio));
	max-width: none;
	height: auto;
	border-radius: 0;
}

/* Cover: words over a dimmed picture. WordPress guesses light or dark from the picture and can guess wrong, so the words are always white. */
:is(.entry-content, .is-root-container) .wp-block-cover {
	min-height: 15rem;
	padding: 1.5rem;
	overflow: hidden;
	border-radius: var(--b-radius);
}
:is(.entry-content, .is-root-container) .wp-block-cover .wp-block-cover__inner-container,
:is(.entry-content, .is-root-container) .wp-block-cover.is-light .wp-block-cover__inner-container {
	color: #fff;
	text-shadow: 0 1px 12px rgb(0 0 0 / 0.45);
}
:is(.entry-content, .is-root-container) .wp-block-cover__inner-container > * {
	margin: 0;
	color: inherit;
}
:is(.entry-content, .is-root-container) .wp-block-cover__inner-container > * + * {
	margin-top: 0.5rem;
}
:is(.entry-content, .is-root-container) .wp-block-cover__inner-container :is(h2, h3) {
	text-wrap: balance;
}

/* Media and text: a picture beside a few paragraphs; on a phone, above them, a portrait kept to a height. */
:is(.entry-content, .is-root-container) .wp-block-media-text {
	gap: 1rem 1.5rem;
}
:is(.entry-content, .is-root-container) .wp-block-media-text > :is(.wp-block-media-text__media, .wp-block-media-text__content) {
	align-self: start;
	padding: 0;
}
:is(.entry-content, .is-root-container) .wp-block-media-text__content > * + * {
	margin-top: 1em;
}
@media (max-width: 600px) {
	:is(.entry-content, .is-root-container) .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media img {
		width: auto;
		max-width: 100%;
		max-height: 18rem;
		margin-inline: auto;
	}
}

/* Columns in the "Figures" style (inc/blocks.php registers it): each column is a figure and what it counts, on a card. */
:is(.entry-content, .is-root-container) .wp-block-columns.is-style-figures {
	display: grid;
	gap: 0.625rem;
}
:is(.entry-content, .is-root-container) .is-style-figures > .wp-block-column {
	min-width: 0;
	padding: 1rem 1.125rem;
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	background: var(--b-surface);
	color: var(--b-muted);
	font-family: var(--b-sans);
	font-size: 0.9375rem;
	line-height: 1.4;
}
:is(.entry-content, .is-root-container) .is-style-figures > .wp-block-column > * {
	margin: 0.375rem 0 0;
	font: inherit;
}
:is(.entry-content, .is-root-container) .is-style-figures > .wp-block-column > :first-child {
	margin-top: 0;
	color: var(--b-ink);
	font-size: 1.875rem;
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}
@media (min-width: 40rem) {
	:is(.entry-content, .is-root-container) .wp-block-columns.is-style-figures {
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
	}
}
/* A group: a boxed panel, such as an "In short" summary. */
:is(.entry-content, .is-root-container) .wp-block-group {
	padding: 1.2rem 1.35rem;
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	background: var(--b-surface);
}
:is(.entry-content, .is-root-container) .wp-block-group > * {
	margin-block: 0;
}
:is(.entry-content, .is-root-container) .wp-block-group > * + * {
	margin-top: 0.9rem;
}

/* A row that scrolls sideways inside a post: a table's columns or a gallery's pictures, on a phone. */
.swipe-track {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}
.swipe-track:focus-visible {
	outline-offset: -3px;
}
.swipe-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.75rem;
	font-family: var(--b-sans);
}
.swipe-controls[hidden] {
	display: none;
}
:is(.entry-content, .is-root-container) .swipe-counter {
	margin: 0;
	color: var(--b-muted);
	font-family: var(--b-sans);
	font-size: 0.85rem;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}
.swipe-buttons {
	display: flex;
	gap: 0.5rem;
}
.swipe-step {
	min-height: 44px;
	padding: 0 0.9rem;
	border: 1px solid var(--b-ink);
	border-radius: var(--b-radius);
	background: var(--b-card);
	color: var(--b-ink);
	font: inherit;
	cursor: pointer;
}
.swipe-step:disabled {
	border-color: var(--b-line);
	color: var(--b-muted);
	cursor: default;
}

/* Table */
:is(.entry-content, .is-root-container) .wp-block-table {
	overflow-x: auto;
}
.entry-content .wp-block-table[data-swipe] {
	overflow-x: visible;
}
:is(.entry-content, .is-root-container) .wp-block-table table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-family: var(--b-sans);
	font-size: 0.9375rem;
	line-height: 1.45;
	font-variant-numeric: tabular-nums;
}
:is(.entry-content, .is-root-container) .wp-block-table :is(th, td) {
	padding: 0.7rem 0.85rem;
	border: 0;
	border-bottom: 1px solid var(--b-line);
	text-align: left;
	vertical-align: top;
	word-break: normal;
	overflow-wrap: normal;
}
:is(.entry-content, .is-root-container) .wp-block-table thead :is(th, td) {
	border-bottom: 2px solid var(--b-line-strong);
	vertical-align: bottom;
}
:is(.entry-content, .is-root-container) .wp-block-table tfoot :is(th, td) {
	border-top: 1px solid var(--b-line-strong);
	border-bottom: 0;
}
/* WordPress rules off a striped table's foot, which falls under the caption. */
:is(.entry-content, .is-root-container) .wp-block-table.is-style-stripes {
	border-bottom: 0;
}
:is(.entry-content, .is-root-container) .wp-block-table.is-style-stripes tbody tr:nth-child(odd) > * {
	background-color: var(--b-surface);
}
:is(.entry-content, .is-root-container) .wp-block-table.is-style-stripes tbody tr:nth-child(even) > * {
	background-color: var(--b-card);
}
/*
 * Between a phone and a desktop WordPress's fixed table layout gives every column the same width, and a
 * long word spills into the next column. Columns size to their words; the track scrolls when they cannot.
 */
:is(.entry-content, .is-root-container) .wp-block-table table.has-fixed-layout {
	table-layout: auto;
}
.entry-content .swipe-track:has(> table) {
	/* --first-word is the longest word in the first column, in letters (inc/blocks.php); bold UI text runs about 0.63rem a letter. */
	--first-column: clamp(6.5rem, calc(var(--first-word, 8) * 0.63rem + 1.8rem), 45cqw);

	container-type: inline-size;
	/* Columns stop at the first column's edge, not under it. */
	scroll-padding-left: var(--first-column);
}
/*
 * Narrower than 34rem, a table of three columns or more would squeeze its words into broken stubs
 * ("Micros oft"). Its first column stays put and names the row; each other column is four fifths of the
 * space left, so the next one shows at the edge. A two-column table works out no wider and is drawn whole.
 */
@container (max-width: 34rem) {
	.entry-content .swipe-track > table {
		--column: calc((100cqw - var(--first-column)) * 0.8);

		width: max(100%, calc(var(--first-column) + (var(--columns) - 1) * var(--column)));
		table-layout: fixed;
		hyphens: auto;
	}
	.entry-content .swipe-track > table tr:first-child > :first-child {
		width: var(--first-column);
	}
	.entry-content .swipe-track > table :is(th, td) {
		scroll-snap-align: start;
	}
	/* The pinned column needs its own background, or the others show through it as they pass. */
	.entry-content .swipe-track > table :is(th, td):first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		border-right: 1px solid var(--b-line-strong);
		background-color: var(--b-card);
		scroll-snap-align: none;
	}
	.entry-content .wp-block-table.is-style-stripes .swipe-track > table tbody tr:nth-child(odd) > :first-child {
		background-color: var(--b-surface);
	}
}

/* Gallery: a row to swipe on a phone, each caption under its picture; a grid from 40rem. */
.entry-content .wp-block-gallery.has-nested-images {
	display: block;
}
.entry-content .wp-block-gallery > .swipe-track {
	display: flex;
	gap: 0.75rem;
}
/*
 * WordPress sizes a gallery's pictures, and lays each caption over its picture on a gradient, with
 * :not(#individual-image) in its selectors to outrank itself. These rules carry it to win.
 */
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
	display: block;
	flex: 0 0 80%;
	width: auto;
	margin: 0;
	scroll-snap-align: start;
}
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):only-child {
	flex-basis: 100%;
}
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) img {
	width: 100%;
	height: auto;
}
/* Cropped: every picture takes the first one's shape (inc/blocks.php). flex: none, or a flex-column figure shrinks the picture to 0 pixels. */
.entry-content .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
	flex: none;
	aspect-ratio: var(--gallery-shape, 16 / 10);
	object-fit: cover;
}
:is(.entry-content, .is-root-container) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image)::before {
	content: none;
}
:is(.entry-content, .is-root-container) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) figcaption {
	position: static;
	max-height: none;
	margin: 0.5rem 0 0;
	padding: 0;
	overflow: visible;
	background: none;
	color: var(--b-muted);
	text-align: left;
	text-shadow: none;
}
.entry-content .wp-block-gallery.has-nested-images > figcaption {
	margin-top: 0.75rem;
	/* WordPress centres a gallery's own caption; every other caption starts where the words do. */
	text-align: left;
}
@media (min-width: 40rem) {
	.entry-content .wp-block-gallery > .swipe-track {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.25rem 1rem;
		overflow: visible;
	}
	/* WordPress gives each picture a width per count of pictures; a least width outranks them all. */
	.entry-content .wp-block-gallery > .swipe-track > .wp-block-image {
		min-width: 100%;
	}
	/* One picture, two or four: rows of one or two, never one picture alone on a last row. */
	.entry-content .wp-block-gallery:is(.columns-1, .columns-default:has(.wp-block-image:only-child)) > .swipe-track {
		grid-template-columns: minmax(0, 1fr);
	}
	.entry-content .wp-block-gallery:is(.columns-2, .columns-default:has(.wp-block-image:nth-child(2):last-child, .wp-block-image:nth-child(4):last-child)) > .swipe-track {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.entry-content .wp-block-gallery:is(.columns-4, .columns-5, .columns-6, .columns-7, .columns-8) > .swipe-track {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* File: a picture of its first page (or a tile naming its kind), then its name, its facts and the button. */
:is(.entry-content, .is-root-container) .wp-block-file {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.375rem 1rem;
	align-items: start;
	justify-items: start;
	padding: 0.9rem;
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	background: var(--b-surface);
	font-family: var(--b-sans);
}
.entry-content .wp-block-file > :not(.file-preview) {
	grid-column: 2;
}
:is(.entry-content, .is-root-container) .wp-block-file > a:not(.wp-block-file__button) {
	font-weight: 700;
	overflow-wrap: anywhere;
}
.file-preview {
	grid-row: 1 / span 3;
	width: 4.75rem;
	height: auto;
	border: 1px solid var(--b-line);
	border-radius: 3px;
	background: #fff;
}
.file-kind {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1.294;
	color: var(--b-accent);
	font: 700 0.8rem var(--b-mono);
}
/* What the file is; a host name such as iea.blob.core.windows.net wraps instead of overflowing. */
:is(.entry-content, .is-root-container) .file-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 0.9rem;
	margin: 0;
	color: var(--b-muted);
	font-family: var(--b-sans);
	font-size: 0.8rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}
.file-facts > span:empty {
	display: none;
}
:is(.entry-content, .is-root-container) .wp-block-file .wp-block-file__button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: 0.3rem 0 0;
	padding: 0 1rem;
	border-radius: var(--b-radius);
	background: var(--b-accent);
	color: var(--b-on-accent);
	text-decoration: none;
}
@media (min-width: 40rem) {
	.file-preview {
		width: 5.5rem;
	}
}

/*
 * A title, an episode or a news article linked on a line of its own (inc/blocks.php, aiserye_own_embed): the
 * card the catalogue's lists and shelves draw, laid out as a picture beside its words, which fits a column of
 * reading. The whole card is the link; the link's own box is dropped so the picture and the words share the grid.
 */
.entry-content :is(.card, .news-card) {
	position: relative;
	display: grid;
	grid-template-columns: minmax(6.5rem, 10rem) minmax(0, 1fr);
	gap: 0.2rem 1rem;
	align-content: center;
	align-items: center;
	width: 100%;
	padding: 0.75rem;
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	background: var(--b-card);
	font-family: var(--b-sans);
}
.entry-content :is(.card-link, .news-card-link) {
	display: contents;
	color: var(--b-ink);
}
.entry-content :is(.card-art, .news-card-art) {
	grid-column: 1;
	grid-row: 1 / span 3;
	margin: 0;
}
.entry-content :is(.card-title, .news-card-title) {
	grid-column: 2;
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
}
.entry-content :is(.card-title, .news-card-title)::after {
	content: "";
	position: absolute;
	inset: 0;
}
.entry-content :is(.card-facts, .news-card-line) {
	grid-column: 2;
	margin: 0;
	color: var(--b-muted);
	font-family: var(--b-sans);
	font-size: 0.875rem;
	line-height: 1.4;
}
.entry-content .news-card:not(:has(.news-card-art)) {
	grid-template-columns: minmax(0, 1fr);
}
.entry-content .news-card:not(:has(.news-card-art)) :is(.news-card-title, .news-card-line, .card-facts) {
	grid-column: 1;
}
.entry-content :is(.card, .news-card):has(a:focus-visible) {
	outline: 3px solid var(--b-accent);
	outline-offset: 3px;
}

/* Buttons: the first filled, "Outline" the secondary one. */
:is(.entry-content, .is-root-container) .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}
:is(.entry-content, .is-root-container) .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.55rem 1.1rem;
	border: 2px solid var(--b-accent);
	border-radius: var(--b-radius);
	background: var(--b-accent);
	color: var(--b-on-accent);
	font-family: var(--b-sans);
	text-decoration: none;
}
:is(.entry-content, .is-root-container) .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) {
	background: transparent;
	color: var(--b-accent);
}

/* Details: a question that opens to show its answer. */
:is(.entry-content, .is-root-container) .wp-block-details {
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
}
:is(.entry-content, .is-root-container) .wp-block-details > summary {
	min-height: 44px;
	padding: 0.65rem 1rem;
	font-family: var(--b-sans);
	font-weight: 700;
	cursor: pointer;
}
:is(.entry-content, .is-root-container) .wp-block-details[open] > summary {
	border-bottom: 1px solid var(--b-line);
}
:is(.entry-content, .is-root-container) .wp-block-details > :not(summary) {
	margin: 0.9rem 1rem;
}

/* Separator */
:is(.entry-content, .is-root-container) .wp-block-separator {
	height: 0;
	margin: 2.25rem 0;
	border: 0;
	border-top: 1px solid var(--b-line);
	opacity: 1;
}
:is(.entry-content, .is-root-container) .wp-block-separator.is-style-wide {
	border-top-width: 2px;
	border-top-color: var(--b-line-strong);
}
/* Dots are core's ::before; the rule above would add a line under them. */
:is(.entry-content, .is-root-container) .wp-block-separator.is-style-dots {
	height: auto;
	border: 0;
	color: var(--b-muted);
}

/* Code keeps its lines and scrolls sideways; Preformatted (words quoted with their line breaks) wraps. */
:is(.entry-content, .is-root-container) pre {
	padding: 1rem 1.15rem;
	overflow-x: auto;
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	background: var(--b-surface);
	font: 0.85rem/1.6 var(--b-mono);
	white-space: pre-wrap;
	scrollbar-width: thin;
}
:is(.entry-content, .is-root-container) pre.wp-block-code,
:is(.entry-content, .is-root-container) pre.wp-block-code code {
	white-space: pre;
	overflow-wrap: normal;
}
:is(.entry-content, .is-root-container) :not(pre) > code {
	padding: 0.1em 0.3em;
	border-radius: 4px;
	background: var(--b-surface);
	font: 0.88em var(--b-mono);
}

/* Footnotes: the marks in the story and the numbered notes after the sources. */
:is(.entry-content, .is-root-container) sup.fn a {
	padding: 0 0.15em;
	text-decoration: none;
}
:is(.entry-content, .is-root-container) .wp-block-footnotes {
	margin-top: 1.75rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--b-line);
	color: var(--b-muted);
	font-family: var(--b-sans);
	font-size: 0.875rem;
}

/*
 * Where an editor placed a block to one side, centred it, or made it wide or full. A classic theme saves a
 * side picture as div.wp-block-image > figure.alignleft, and core floats that with the same weight, so the
 * phone rule names the wrapped form too.
 */
:is(.entry-content, .is-root-container) .aligncenter {
	margin-inline: auto;
}
:is(.entry-content, .is-root-container) :is(.alignleft, .alignright, .wp-block-image > .alignleft, .wp-block-image > .alignright) {
	float: none;
	max-width: 100%;
	margin-inline: auto;
}
@media (min-width: 40rem) {
	.entry-content :is(.alignleft, .wp-block-image > .alignleft) {
		float: left;
		max-width: 50%;
		margin: 0.375rem 1.5rem 1rem 0;
	}
	.entry-content :is(.alignright, .wp-block-image > .alignright) {
		float: right;
		max-width: 50%;
		margin: 0.375rem 0 1rem 1.5rem;
	}
	/* Words run beside a picture placed to one side; a new section and anything wide start beneath it. */
	.entry-content > :is(h2, h3, figure, pre, details, hr, .wp-block-columns, .wp-block-cover, .wp-block-file, .wp-block-buttons, .wp-block-media-text, .wp-block-group, .wp-block-table, .wp-block-gallery, .wp-block-footnotes):not(.alignleft, .alignright) {
		clear: both;
	}
}
/* On a phone "wide" and "full" reach the screen's edges, lose their corners, and keep their caption in line with the words. */
@media (max-width: 59.9375rem) {
	.entry-content > :is(.alignwide, .alignfull) {
		width: calc(100% + 2 * var(--b-gutter));
		max-width: none;
		margin-inline: calc(-1 * var(--b-gutter));
	}
	.entry-content > :is(.alignwide, .alignfull) :is(img, video, iframe, .panorama),
	.entry-content > .wp-block-cover:is(.alignwide, .alignfull) {
		border-radius: 0;
	}
	.entry-content > :is(.alignwide, .alignfull) > figcaption {
		padding-inline: var(--b-gutter);
	}
}
/* Wide, a gallery of three or more, and a table of five columns or more reach --b-wide on a wide screen. */
@media (min-width: 60rem) {
	.entry-content > :is(.alignwide, .alignfull, .wp-block-table.has-many-columns, .wp-block-gallery:has(.wp-block-image:nth-child(3))) {
		width: var(--b-wide);
		max-width: none;
		margin-inline: calc(50% - var(--b-wide) / 2);
	}
}
