/*
 * What an editor or an assistant writes in a post or a page: WordPress's blocks, drawn in the city's palette.
 *
 * Loaded on a post or page that holds blocks (functions.php, city_dentist_assets()) and as the block editor's
 * stylesheet. .entry-content is the published page and .is-root-container the editor's canvas; a rule that
 * names both makes what is typed look like what is published. Rules that name .entry-content alone draw
 * markup only the published page has: blocks.php wraps tables, galleries and very wide pictures in rows that
 * scroll sideways, and gives a file a picture of its first page. content.js adds Back and Next to those rows.
 *
 * Widths. A post's words sit in a reading column inside .article, which is the container the "Wide" and "Full"
 * widths are measured from; a page's words sit in .content-card, and there Wide and Full reach the card's
 * edges. --wide and --full say how wide each is, so one rule places both on posts and pages.
 */

.entry-content,
.is-root-container {
	/* WordPress's named text sizes, which a block carries as a class, scaled to this page. */
	--wp--preset--font-size--small: 0.9375rem;
	--wp--preset--font-size--medium: 1.125rem;
	--wp--preset--font-size--large: 1.375rem;
	--wp--preset--font-size--x-large: clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem);
	--field-radius: 12px;
	--wide: 100%;
	--full: 100%;
	--wide-pad: 0px;
	--full-pad: 0px;

	font-size: 1.0625rem;
	line-height: 1.7;
	overflow-wrap: break-word;
}
.entry-content::after {
	content: "";
	display: table;
	clear: both;
}
:is(.entry-content, .is-root-container) > * {
	margin-top: 0;
	margin-bottom: 1.4em;
}
.entry-content > :last-child {
	margin-bottom: 0;
}
:is(.entry-content, .is-root-container) :is(strong, b) {
	font-weight: 750;
}
:is(.entry-content, .is-root-container) a {
	color: var(--accent-dark);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
:is(.entry-content, .is-root-container) a:hover {
	color: var(--accent);
	text-decoration-thickness: 2px;
}
/* A long address in running text breaks rather than pushing the column wider than the screen. */
:is(.entry-content, .is-root-container) :is(p, li, dd, td, figcaption) a {
	overflow-wrap: anywhere;
}

/* Headings */
:is(.entry-content, .is-root-container) :is(h2, h3, h4) {
	margin: 2.4rem 0 0.8rem;
	color: var(--ink);
	line-height: 1.18;
	letter-spacing: -0.03em;
	text-wrap: balance;
	scroll-margin-top: 96px;
}
:is(.entry-content, .is-root-container) > :is(h2, h3, h4):first-child {
	margin-top: 0;
}
:is(.entry-content, .is-root-container) h2 + h3,
:is(.entry-content, .is-root-container) h3 + h4 {
	margin-top: 1.2rem;
}
:is(.entry-content, .is-root-container) h2 {
	font-size: 1.6rem;
}
:is(.entry-content, .is-root-container) h3 {
	font-size: 1.25rem;
	letter-spacing: -0.02em;
}
:is(.entry-content, .is-root-container) h4 {
	font-size: 1.0625rem;
	letter-spacing: -0.01em;
}

/* Lists, and a list of terms with what each means (a dl in a Custom HTML block). */
:is(.entry-content, .is-root-container) :is(ul, ol) {
	padding-left: 1.4rem;
}
:is(.entry-content, .is-root-container) li + li,
:is(.entry-content, .is-root-container) li > :is(ul, ol) {
	margin-top: 0.45em;
}
:is(.entry-content, .is-root-container) li::marker {
	color: var(--accent);
}
:is(.entry-content, .is-root-container) dl {
	display: grid;
	gap: 0.3rem;
	padding: 1.1rem 1.25rem;
	border-left: 4px solid var(--accent);
	border-radius: 0 var(--field-radius) var(--field-radius) 0;
	background: var(--wash);
	font-size: 0.97rem;
	line-height: 1.55;
}
:is(.entry-content, .is-root-container) dt {
	color: var(--ink);
	font-weight: 750;
}
:is(.entry-content, .is-root-container) dd {
	margin: 0;
	color: var(--muted);
}
:is(.entry-content, .is-root-container) dd + dt {
	margin-top: 0.7rem;
}

/* Quote: someone's words, in the run of the text. */
:is(.entry-content, .is-root-container) blockquote {
	margin: 2rem 0;
	padding: 0.2rem 0 0.2rem 1.25rem;
	border-left: 4px solid var(--accent);
	color: var(--ink);
	font-size: 1.2rem;
	line-height: 1.5;
}
:is(.entry-content, .is-root-container) blockquote p {
	margin: 0;
}
:is(.entry-content, .is-root-container) blockquote p + p {
	margin-top: 0.75em;
}
:is(.entry-content, .is-root-container) blockquote cite {
	display: block;
	margin-top: 0.7rem;
	color: var(--muted);
	font-size: 0.9rem;
	font-style: normal;
	font-weight: 650;
	line-height: 1.45;
}
/* Pull quote: one line lifted out of the text, large, on the city's tint. */
:is(.entry-content, .is-root-container) .wp-block-pullquote {
	margin: 2.4rem 0;
	padding: 1.6rem 1.5rem;
	border: 0;
	border-radius: var(--radius);
	background: var(--accent-soft);
	font-size: inherit;
	line-height: inherit;
	text-align: left;
}
:is(.entry-content, .is-root-container) .wp-block-pullquote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--accent-dark);
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.02em;
	text-wrap: balance;
}
:is(.entry-content, .is-root-container) .wp-block-pullquote blockquote::before {
	content: "\201C";
	display: block;
	height: 0.55em;
	color: var(--accent);
	font-size: 3.2rem;
	line-height: 1;
}
:is(.entry-content, .is-root-container) .wp-block-pullquote cite {
	color: var(--ink);
	font-size: 0.92rem;
	font-weight: 650;
	letter-spacing: 0;
	text-transform: none;
}

/* Pictures, video, audio, covers and embeds, each with its caption. */
: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) {
	margin-block: 2.2rem;
}
:is(.entry-content, .is-root-container) .wp-block-image img {
	border-radius: var(--field-radius);
}
:is(.entry-content, .is-root-container) .wp-block-image :is(img, a) {
	display: block;
	max-width: 100%;
	height: auto;
}
:is(.entry-content, .is-root-container) figcaption {
	margin: 0.6rem 0 0;
	color: var(--muted);
	font-size: 0.86rem;
	line-height: 1.5;
	text-align: left;
}
:is(.entry-content, .is-root-container) .wp-block-image.aligncenter {
	display: table;
	margin-inline: auto;
}
:is(.entry-content, .is-root-container) .wp-block-image.aligncenter > figcaption {
	display: table-caption;
	caption-side: bottom;
}

/*
 * A video filmed upright stops short of the screen's height and keeps its shape; the spare width is dark.
 * WordPress has a video with a poster fill its frame, which would cut the top and bottom off it.
 */
:is(.entry-content, .is-root-container) .wp-block-video video {
	display: block;
	width: 100%;
	max-height: min(75svh, 42rem);
	border-radius: var(--field-radius);
	background: var(--hero);
	object-fit: contain;
}
:is(.entry-content, .is-root-container) .wp-block-audio audio {
	display: block;
	width: 100%;
	min-width: 0;
}

/* Embeds: the player or post another website draws. */
:is(.entry-content, .is-root-container) .wp-block-embed__wrapper {
	min-width: 0;
}
:is(.entry-content, .is-root-container) .wp-block-embed iframe {
	display: block;
	max-width: 100%;
	border: 0;
	border-radius: var(--field-radius);
}
/* A video from a website that does not say its player's shape (WordPress adds wp-has-aspect-ratio when it does).
   TikTok is left out: this selector outranks the upright TikTok rule below. */
: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;
}
/* TikTok's player is upright: 325 by 578. */
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-tiktok .wp-block-embed__wrapper > iframe {
	width: min(100%, 325px);
	height: auto;
	margin-inline: auto;
	aspect-ratio: 325 / 578;
}
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-tiktok figcaption {
	text-align: center;
}
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-spotify iframe {
	width: 100%;
}
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-soundcloud iframe {
	width: 100%;
	height: 400px;
}
:is(.entry-content, .is-root-container) .wp-block-embed.is-provider-pocket-casts iframe {
	width: 100%;
	height: 200px;
}
/* X and Bluesky draw their posts no wider than this, and centred. */
:is(.entry-content, .is-root-container) .wp-block-embed:is(.is-provider-twitter, .is-provider-bluesky, .is-provider-reddit) .wp-block-embed__wrapper {
	max-width: 550px;
	margin-inline: auto;
}
:is(.entry-content, .is-root-container) .wp-block-embed:is(.is-provider-twitter, .is-provider-bluesky, .is-provider-reddit) figcaption {
	max-width: 550px;
	margin-inline: auto;
}
/*
 * A post from X, Bluesky or Reddit is a quotation until that network's script draws it, and stays one when
 * the script is blocked or slow: the words and the link, as a plain card.
 */
:is(.entry-content, .is-root-container) .wp-block-embed blockquote {
	margin: 0;
	padding: 1rem 1.15rem;
	border: 1px solid var(--line);
	border-radius: var(--field-radius);
	background: var(--wash);
	font-size: 0.97rem;
	line-height: 1.55;
}
:is(.entry-content, .is-root-container) .wp-block-embed blockquote p + p {
	margin-top: 0.5em;
}
/* An address no website answered for stays a link; it can be long, so it breaks anywhere. */
:is(.entry-content, .is-root-container) .wp-block-embed__wrapper > a {
	overflow-wrap: anywhere;
}

/*
 * A panorama: three times as wide as tall or more, marked by blocks.php with its --ratio. It is never drawn
 * shorter than --panorama-height, and 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(--field-radius);
	scrollbar-width: thin;
	scrollbar-color: var(--field-line) transparent;
}
.panorama[tabindex] {
	cursor: grab;
}
.panorama[data-dragging] {
	cursor: grabbing;
	user-select: none;
}
.panorama:focus-visible {
	outline-offset: -3px;
}
.entry-content .wp-block-image .panorama img {
	--panorama-height: clamp(11rem, 25cqw, 15rem);

	width: max(100cqw, var(--panorama-height) * var(--ratio));
	max-width: none;
	border-radius: 0;
}
.panorama-hint {
	margin: 0.45rem 0 0;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 650;
}
.panorama-hint[hidden] {
	display: none;
}

/* Cover: a heading or a few words over a picture, which WordPress dims. */
:is(.entry-content, .is-root-container) .wp-block-cover {
	min-height: 18rem;
	padding: 1.75rem 1.5rem;
	overflow: hidden;
	border-radius: var(--radius);
	color: #fff;
	line-height: 1.45;
}
:is(.entry-content, .is-root-container) .wp-block-cover__inner-container {
	width: 100%;
	max-width: 40rem;
	color: inherit;
}
/* WordPress darkens the words when it thinks the picture is light; over a dimmed picture they stay white. */
:is(.entry-content, .is-root-container) .wp-block-cover.is-light:has(.wp-block-cover__background.has-background-dim:not(.has-background-dim-0, .has-background-dim-10, .has-background-dim-20, .has-background-dim-30)) .wp-block-cover__inner-container {
	color: #fff;
}
:is(.entry-content, .is-root-container) .wp-block-cover :is(h2, h3, h4, p) {
	color: inherit;
}
:is(.entry-content, .is-root-container) .wp-block-cover :is(h2, h3, h4, .has-large-font-size, .has-x-large-font-size) {
	margin: 0;
	line-height: 1.12;
	letter-spacing: -0.03em;
	text-wrap: balance;
}
:is(.entry-content, .is-root-container) .wp-block-cover__inner-container > * + * {
	margin-top: 0.6rem;
}
:is(.entry-content, .is-root-container) .wp-block-cover + figcaption,
:is(.entry-content, .is-root-container) .wp-block-cover figcaption {
	color: rgba(255, 255, 255, 0.86);
}

/* Media and text: a picture beside a few paragraphs; on a phone, above them. */
:is(.entry-content, .is-root-container) .wp-block-media-text {
	gap: 1.1rem 1.75rem;
	align-items: start;
}
: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__media :is(img, video) {
	border-radius: var(--field-radius);
}
:is(.entry-content, .is-root-container) .wp-block-media-text__content > :first-child {
	margin-top: 0;
}
:is(.entry-content, .is-root-container) .wp-block-media-text__content > * + * {
	margin-top: 0.9em;
}
/* Stacked on a phone, a portrait would fill the screen: it keeps to a height and to its own shape. */
@media (max-width: 600px) {
	.entry-content .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media img {
		width: auto;
		max-width: 100%;
		max-height: 18rem;
	}
}

/* Columns, and the "Figures" style: each column a figure and what it counts, on a card. */
:is(.entry-content, .is-root-container) .wp-block-columns {
	gap: 1.25rem 2rem;
}
:is(.entry-content, .is-root-container) .wp-block-columns.is-style-figures {
	display: grid;
	gap: 0.75rem;
	margin-block: 2rem;
}
:is(.entry-content, .is-root-container) .is-style-figures > .wp-block-column {
	padding: 1.1rem 1.2rem 1.2rem;
	border: 1px solid var(--line);
	border-radius: var(--field-radius);
	background: linear-gradient(140deg, var(--accent-soft), var(--paper) 72%);
	color: var(--muted);
	font-size: 0.92rem;
	line-height: 1.45;
}
:is(.entry-content, .is-root-container) .is-style-figures > .wp-block-column > * {
	margin: 0.35rem 0 0;
}
:is(.entry-content, .is-root-container) .is-style-figures > .wp-block-column > :first-child {
	--wp--preset--font-size--x-large: 2rem;

	margin-top: 0;
	color: var(--accent-dark);
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
}
:is(.entry-content, .is-root-container) .is-style-figures > .wp-block-column > :first-child :is(strong, b) {
	font-weight: inherit;
}
@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 row that scrolls sideways: a table's columns or a gallery's pictures on a phone (blocks.php, content.js). */
.swipe-track {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var(--field-line) transparent;
}
.swipe-track:focus-visible {
	outline-offset: -3px;
}
.swipe-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.7rem;
}
.swipe-controls[hidden] {
	display: none;
}
.swipe-counter {
	margin: 0;
	color: var(--muted);
	font-size: 0.82rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.swipe-buttons {
	display: flex;
	gap: 0.5rem;
}
.swipe-step {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 40px;
	padding: 6px 14px;
	border: 2px solid var(--accent-dark);
	border-radius: 9px;
	background: var(--paper);
	color: var(--accent-dark);
	font-size: 0.85rem;
	font-weight: 750;
}
.swipe-step:disabled {
	border-color: var(--line);
	color: var(--field-line);
	cursor: default;
}
@media (hover: hover) and (pointer: fine) {
	.swipe-step:not(:disabled):hover {
		background: var(--accent-soft);
	}
}

/* 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) table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.92rem;
	line-height: 1.45;
	font-variant-numeric: tabular-nums;
}
:is(.entry-content, .is-root-container) .wp-block-table :is(th, td),
:is(.entry-content, .is-root-container) table :is(th, td) {
	padding: 0.7rem 0.85rem;
	border: 0;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
	word-break: normal;
	overflow-wrap: normal;
}
:is(.entry-content, .is-root-container) table :is(th, td):first-child {
	color: var(--ink);
	font-weight: 700;
}
:is(.entry-content, .is-root-container) table thead :is(th, td) {
	border-bottom: 2px solid var(--accent-dark);
	background: var(--paper);
	color: var(--accent-dark);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: bottom;
}
:is(.entry-content, .is-root-container) table tfoot :is(th, td) {
	border-top: 2px solid var(--line);
	border-bottom: 0;
	color: var(--muted);
}
/* WordPress rules off a striped table's foot, which would fall under its 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(--wash);
}
:is(.entry-content, .is-root-container) .wp-block-table.is-style-stripes tbody tr:nth-child(even) > * {
	background-color: var(--paper);
}
:is(.entry-content, .is-root-container) .wp-block-table figcaption {
	margin-top: 0.7rem;
}
/*
 * On a phone a table of three columns or more is wider than the screen. Its first column stays put and names
 * the row; the others pass behind it one at a time, each four fifths of the space left, so the edge of the
 * next column shows. A two-column table works out no wider than its space and is drawn whole. --columns is
 * counted by blocks.php.
 */
.swipe-track:has(> table) {
	/* Wide enough for the column's longest word (--first-word characters of bold 0.92rem, measured at up to 0.63rem each, plus the cell's
	   padding), from 6.5rem up to 45% of the table's space; past that a long word breaks. */
	--first-column: clamp(6.5rem, calc(var(--first-word, 0) * 0.66rem + 1.45rem), 45cqw);

	container-type: inline-size;
	scroll-padding-left: var(--first-column);
}
/* Wider than a phone, columns size to their words (WordPress's fixed layout shares the width equally and
   breaks "Massachusetts" across a column's edge); a table that still does not fit scrolls in its track. */
.entry-content .swipe-track > table {
	table-layout: auto;
}
@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;
	}
	.entry-content .swipe-track > table :is(th, td):first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		padding-left: 0.6rem;
		border-right: 1px solid var(--line);
		background-color: var(--paper);
		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(--wash);
	}
}

/* Gallery: on a phone a row to swipe through with each picture's caption under it; wider, a grid. */
.entry-content .wp-block-gallery {
	display: block;
}
.entry-content .wp-block-gallery > .swipe-track {
	display: flex;
	gap: 0.75rem;
}
/*
 * WordPress sizes and crops a gallery's pictures with an id in its selectors, and lays each caption over its
 * picture; ":not(#individual-image)" is how its own stylesheet outranks itself, and how these rules do.
 */
.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 (blocks.php), or that of the site's cards when unknown. */
.entry-content .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
	aspect-ratio: var(--gallery-shape, 16 / 10);
	object-fit: cover;
}
/* The captions, under each picture rather than over it, apply in the editor as well. */
: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(--muted);
	font-size: 0.8rem;
	text-align: left;
	text-shadow: none;
	scrollbar-gutter: auto;
}
:is(.entry-content, .is-root-container) .wp-block-gallery.has-nested-images > figcaption {
	margin-top: 0.75rem;
	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 for every count of pictures; a least width outranks them all. */
	.entry-content .wp-block-gallery > .swipe-track > .wp-block-image {
		min-width: 100%;
	}
	.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));
	}
}

/* Buttons: the site's own button; the "Outline" style is 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: 48px;
	padding: 12px 22px;
	border: 2px solid var(--accent-dark);
	border-radius: 9px;
	background: var(--accent-dark);
	color: #fff;
	font-size: 1rem;
	font-weight: 750;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: transform 0.18s, background-color 0.18s;
}
:is(.entry-content, .is-root-container) .wp-block-button__link:hover {
	background: var(--accent);
	color: #fff;
	transform: translateY(-1px);
}
:is(.entry-content, .is-root-container) .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) {
	padding: 12px 22px;
	background: transparent;
	color: var(--accent-dark);
}
:is(.entry-content, .is-root-container) .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover {
	background: var(--accent-soft);
	color: var(--accent-dark);
}

/* Details: a question that opens to show its answer, drawn as the listing pages draw theirs. */
:is(.entry-content, .is-root-container) details {
	border: 1px solid var(--line);
	border-radius: var(--field-radius);
	background: var(--paper);
}
:is(.entry-content, .is-root-container) details > summary {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: 52px;
	padding: 0.7rem 1.1rem;
	color: var(--ink);
	font-weight: 750;
	line-height: 1.35;
	list-style: none;
	cursor: pointer;
}
:is(.entry-content, .is-root-container) details > summary::-webkit-details-marker {
	display: none;
}
:is(.entry-content, .is-root-container) details > summary::after {
	content: "";
	flex: none;
	width: 9px;
	height: 9px;
	margin-left: auto;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	transform: translateY(-3px) rotate(45deg);
	transition: transform 0.18s;
}
:is(.entry-content, .is-root-container) details[open] > summary::after {
	transform: translateY(2px) rotate(-135deg);
}
:is(.entry-content, .is-root-container) details[open] > summary {
	border-bottom: 1px solid var(--line);
}
:is(.entry-content, .is-root-container) details > :not(summary) {
	margin: 1rem 1.1rem;
}

/* Separator */
:is(.entry-content, .is-root-container) hr,
:is(.entry-content, .is-root-container) .wp-block-separator {
	height: 0;
	margin: 2.6rem auto;
	border: 0;
	border-top: 1px solid var(--line);
	background: none;
	opacity: 1;
}
:is(.entry-content, .is-root-container) .wp-block-separator.is-style-wide {
	width: 100%;
}
:is(.entry-content, .is-root-container) .wp-block-separator:not(.is-style-wide, .is-style-dots) {
	width: 6rem;
	border-top-width: 3px;
	border-top-color: var(--accent);
}
:is(.entry-content, .is-root-container) .wp-block-separator.is-style-dots {
	border: 0;
	color: var(--accent);
}

/*
 * File: a picture of its first page (or a tile naming its kind), its name, what it is, and the button. The
 * picture and the facts come from blocks.php and city-dentist-core's document previews.
 */
:is(.entry-content, .is-root-container) .wp-block-file {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.3rem 1rem;
	align-items: start;
	justify-items: start;
	padding: 1rem;
	border: 1px solid var(--line);
	border-radius: var(--field-radius);
	background: var(--wash);
	line-height: 1.35;
}
.entry-content .wp-block-file > :not(.file-preview, .wp-block-file__embed) {
	grid-column: 2;
}
.entry-content .wp-block-file > a:not(.wp-block-file__button) {
	color: var(--ink);
	font-weight: 750;
	text-decoration-color: var(--field-line);
	overflow-wrap: anywhere;
}
.file-preview {
	grid-row: 1 / span 3;
	width: 4.5rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--paper);
	box-shadow: 0 6px 18px rgba(18, 33, 44, 0.08);
}
.file-kind {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1.294;
	color: var(--accent-dark);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.06em;
}
.file-facts {
	display: flex;
	flex-wrap: wrap;
	column-gap: 1.1em;
	margin: 0;
	overflow: hidden;
	color: var(--muted);
	font-size: 0.84rem;
	line-height: 1.45;
	font-variant-numeric: tabular-nums;
}
.file-facts > span {
	position: relative;
}
/* Each fact's dot hangs to its left, where the start of a line hides it, so a line never ends on a dot. */
.file-facts > span::before {
	content: "\00B7";
	position: absolute;
	left: -0.7em;
}
:is(.entry-content, .is-root-container) .wp-block-file .wp-block-file__button {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	margin: 0.4rem 0 0;
	padding: 6px 15px;
	border: 2px solid var(--accent-dark);
	border-radius: 9px;
	background: var(--paper);
	color: var(--accent-dark);
	font-size: 0.88rem;
	font-weight: 750;
	text-decoration: none;
	opacity: 1;
}
@media (hover: hover) and (pointer: fine) {
	:is(.entry-content, .is-root-container) .wp-block-file .wp-block-file__button:hover {
		background: var(--accent-soft);
	}
}
/* The editor still shows WordPress's inline viewer, which blocks.php leaves out of the published page. */
.is-root-container .wp-block-file__embed {
	grid-column: 1 / -1;
	width: 100%;
	margin-top: 0.5rem;
}
@media (min-width: 40rem) {
	.file-preview {
		width: 5.5rem;
	}
}

/* Another article or a practice from this site, linked on a line of its own (blocks.php). */
.article-card {
	position: relative;
	display: grid;
	grid-template-columns: 6.5rem minmax(0, 1fr);
	gap: 0.9rem;
	align-items: center;
	padding: 0.75rem;
	border: 1px solid var(--line);
	border-radius: var(--field-radius);
	background: var(--paper);
	line-height: 1.35;
}
.article-card-media {
	align-self: start;
	overflow: hidden;
	border-radius: 8px;
	background: var(--accent-soft);
}
.article-card-media img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 0;
}
.article-card-media.is-logo img {
	padding: 6px;
	object-fit: contain;
	background: #fff;
}
.article-card-text {
	display: grid;
	gap: 0.2rem;
	min-width: 0;
}
.article-card-text .eyebrow {
	margin: 0;
	font-size: 0.68rem;
}
.article-card-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 750;
	line-height: 1.25;
	letter-spacing: -0.02em;
}
.entry-content .article-card-title a {
	color: var(--ink);
	text-decoration: none;
}
.article-card-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.article-card-title a:focus-visible {
	outline: none;
}
.article-card:has(a:focus-visible) {
	outline: 3px solid var(--accent-dark);
	outline-offset: 3px;
}
.article-card-summary {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--muted);
	font-size: 0.86rem;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
.entry-content .wp-block-embed:has(.article-card) + .wp-block-embed:has(.article-card) {
	margin-top: -1.4rem;
}
@media (min-width: 40rem) {
	.article-card {
		grid-template-columns: 9rem minmax(0, 1fr);
		gap: 1.1rem;
	}
	.article-card-title {
		font-size: 1.2rem;
	}
}
@media (hover: hover) and (pointer: fine) {
	.article-card {
		transition: border-color 0.18s, box-shadow 0.18s;
	}
	.article-card:hover {
		border-color: var(--accent);
		box-shadow: var(--shadow);
	}
}

/* Code keeps its own lines and scrolls sideways; words set as typed (Preformatted) wrap. */
:is(.entry-content, .is-root-container) :is(pre, code, kbd) {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.86em;
}
:is(.entry-content, .is-root-container) pre {
	padding: 1rem 1.1rem;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--field-radius);
	background: var(--wash);
	color: var(--ink);
	font-size: 0.86rem;
	line-height: 1.6;
	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) pre.wp-block-code {
	background: var(--hero);
	color: #e8eef2;
	border-color: transparent;
}
:is(.entry-content, .is-root-container) pre.wp-block-code code {
	font-size: 0.86rem;
}
:is(.entry-content, .is-root-container) :not(pre) > code {
	padding: 0.1em 0.35em;
	border-radius: 4px;
	background: var(--accent-soft);
	color: var(--accent-dark);
}

/* Footnotes: the numbered notes after the sources, and the numbers in the text that lead to them. */
:is(.entry-content, .is-root-container) sup.fn {
	font-size: 0.72em;
	font-weight: 750;
	line-height: 0;
}
: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: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.9rem;
	line-height: 1.55;
}
:is(.entry-content, .is-root-container) .wp-block-footnotes li {
	scroll-margin-top: 96px;
}
:is(.entry-content, .is-root-container) .wp-block-footnotes a {
	text-decoration: none;
}
:is(.entry-content, .is-root-container) [id] {
	scroll-margin-top: 96px;
}

/*
 * The "Sources" heading and the list of links that end a post or a page, before its footnotes when it has
 * any: set apart from the text by a rule, in smaller type.
 */
.entry-content > h2:has(+ ul:last-child),
.entry-content > h2:has(+ ul + .wp-block-footnotes:last-child) {
	margin-top: 3rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--line);
	font-size: 1.15rem;
	letter-spacing: -0.01em;
}
.entry-content > h2 + ul:last-child,
.entry-content > h2 + ul:has(+ .wp-block-footnotes:last-child) {
	display: grid;
	gap: 0.5rem;
	color: var(--muted);
	font-size: 0.9rem;
	line-height: 1.5;
}
.entry-content > h2 + ul:last-child li,
.entry-content > h2 + ul:has(+ .wp-block-footnotes:last-child) li {
	margin: 0;
}

/* Where a block is placed to one side, centred, or made wide. */
:is(.entry-content, .is-root-container) .aligncenter {
	margin-inline: auto;
}
:is(.entry-content, .is-root-container) .has-text-align-center {
	text-align: center;
}
:is(.entry-content, .is-root-container) .has-text-align-right {
	text-align: right;
}
@media (max-width: 39.99rem) {
	/* Too narrow to run words beside a picture: it is centred, at its own width or the column's.
	   A classic theme gets a picture to one side as div.wp-block-image > figure.alignleft, which core's
	   own .wp-block-image .alignleft floats, so that form needs the stronger selector. */
	.entry-content :is(.alignleft, .alignright),
	.entry-content .wp-block-image > :is(.alignleft, .alignright) {
		float: none;
		margin-inline: auto;
	}
	.entry-content .wp-block-image:is(.alignleft, .alignright) {
		display: table;
	}
	.entry-content .wp-block-image:is(.alignleft, .alignright) > figcaption {
		display: table-caption;
		caption-side: bottom;
	}
}
@media (min-width: 40rem) {
	.entry-content .alignleft,
	.entry-content .wp-block-image > .alignleft {
		float: left;
		max-width: 50%;
		margin: 0.35rem 1.75rem 1rem 0;
	}
	.entry-content .alignright,
	.entry-content .wp-block-image > .alignright {
		float: right;
		max-width: 50%;
		margin: 0.35rem 0 1rem 1.75rem;
	}
	.entry-content .wp-block-image:is(.alignleft, .alignright) {
		display: table;
	}
	.entry-content .wp-block-image:is(.alignleft, .alignright) > figcaption {
		display: table-caption;
		caption-side: bottom;
	}
	/* Words run beside a picture to one side; a new section, and anything that needs the width, starts under it. */
	.entry-content > :is(h2, figure, pre, details, hr, dl, .wp-block-columns, .wp-block-cover, .wp-block-file, .wp-block-buttons, .wp-block-media-text, .wp-block-group, .wp-block-footnotes):not(.alignleft, .alignright) {
		clear: both;
	}
}
.entry-content > :is(.alignwide, .alignfull) {
	clear: both;
	width: var(--wide);
	max-width: none;
	margin-inline: calc((100% - var(--wide)) / 2);
}
.entry-content > .alignfull {
	width: var(--full);
	margin-inline: calc((100% - var(--full)) / 2);
}
/* At the screen's or the card's edge a picture has no corners, and its caption starts where the words do. */
.entry-content > .alignwide > figcaption {
	padding-inline: var(--wide-pad);
}
.entry-content > .alignfull > figcaption {
	padding-inline: var(--full-pad);
}
.entry-content > .alignfull:is(.wp-block-image, .wp-block-video, .wp-block-embed) :is(img, video, iframe, .panorama),
.entry-content > .alignfull.wp-block-cover {
	border-radius: 0;
}

/* A post: a reading column, with Wide reaching a picture's width and Full the screen's edges. */
.article {
	container-type: inline-size;
	padding-bottom: 5rem;
}
.article-hero {
	margin-bottom: 2.5rem;
}
.article-hero h1 {
	text-wrap: balance;
}
.article-hero .article-summary {
	max-width: 720px;
	color: var(--ink);
	font-size: 1.15rem;
	line-height: 1.5;
}
.article-hero .article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1rem;
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
	font-weight: 650;
}
.article-picture {
	width: min(68.75rem, 100cqw - 48px);
	margin: 0 auto 2.75rem;
}
.article-picture img {
	width: 100%;
	border-radius: var(--radius);
}
.article-picture figcaption {
	margin-top: 0.6rem;
	color: var(--muted);
	font-size: 0.86rem;
	line-height: 1.5;
}
@media (max-width: 800px) {
	.article-picture {
		width: calc(100cqw - 32px);
	}
}
.article .entry-content {
	/* The reading column: .shell-narrow, which this is inside. */
	--measure: min(780px, 100cqw - 48px);
	--wide: min(68.75rem, 100cqw - 48px);
	--full: 100cqw;
	--full-pad: calc((100cqw - var(--measure)) / 2);
}
/* A page: its words sit on a card, and Wide and Full both reach the card's edges. */
.content-card.entry-content {
	--wide: calc(100% + 64px);
	--full: calc(100% + 64px);
	--wide-pad: 32px;
	--full-pad: 32px;
}
.content-card.entry-content > .alignwide:is(.wp-block-image, .wp-block-cover, .wp-block-video) :is(img, video, .panorama),
.content-card.entry-content > .alignwide.wp-block-cover {
	border-radius: 0;
}
@media (max-width: 800px) {
	.article .entry-content {
		--measure: calc(100cqw - 32px);
		--wide: 100cqw;
		--wide-pad: 16px;
	}
	.entry-content > .alignwide:is(.wp-block-image, .wp-block-cover, .wp-block-video, .wp-block-gallery, .wp-block-embed) :is(img, video, iframe, .panorama),
	.entry-content > .alignwide.wp-block-cover {
		border-radius: 0;
	}
}
@media (max-width: 560px) {
	.content-card.entry-content {
		--wide: calc(100% + 48px);
		--full: calc(100% + 48px);
		--wide-pad: 24px;
		--full-pad: 24px;
	}
}

@media (min-width: 48rem) {
	.entry-content,
	.is-root-container {
		font-size: 1.125rem;
		line-height: 1.72;
	}
	:is(.entry-content, .is-root-container) h2 {
		font-size: 1.9rem;
	}
	:is(.entry-content, .is-root-container) h3 {
		font-size: 1.4rem;
	}
	:is(.entry-content, .is-root-container) h4 {
		font-size: 1.15rem;
	}
	:is(.entry-content, .is-root-container) blockquote {
		font-size: 1.32rem;
	}
	:is(.entry-content, .is-root-container) .wp-block-pullquote {
		padding: 2.2rem 2.4rem;
	}
	:is(.entry-content, .is-root-container) .wp-block-pullquote blockquote {
		font-size: 1.8rem;
	}
	: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) {
		margin-block: 2.6rem;
	}
	:is(.entry-content, .is-root-container) .wp-block-cover {
		min-height: 22rem;
		padding: 2.5rem;
	}
	:is(.entry-content, .is-root-container) table {
		font-size: 0.97rem;
	}
	:is(.entry-content, .is-root-container) figcaption {
		font-size: 0.9rem;
	}
}

/* Three pictures or more, or a table of five columns or more, need more room than the words. */
@media (min-width: 60rem) {
	.article .entry-content > .wp-block-gallery:not(.alignwide, .alignfull):has(.wp-block-image:nth-child(3)),
	.article .entry-content > .wp-block-table.has-many-columns:not(.alignwide, .alignfull) {
		--wide: min(60rem, 100cqw - 48px);

		width: var(--wide);
		margin-inline: calc((100% - var(--wide)) / 2);
	}
}

@media (prefers-reduced-motion: reduce) {
	:is(.entry-content, .is-root-container) .wp-block-button__link,
	:is(.entry-content, .is-root-container) details > summary::after {
		transition: none;
	}
}
