@layer blocks {
	/*
	 * Existing page content is Gutenberg blocks, including CoBlocks galleries.
	 * These rules make that content sit correctly inside the theme's rail.
	 */

	.entry-content > * {
		margin-block: var(--space-m);
	}

	.entry-content > :first-child { margin-block-start: 0; }
	.entry-content > :last-child { margin-block-end: 0; }

	.entry-content > .alignwide {
		width: min(78rem, 100%);
		margin-inline: auto;
	}

	.entry-content > .alignfull {
		width: 100vw;
		max-width: 100vw;
		margin-inline: calc(50% - 50vw);
	}

	.wp-block-image figcaption,
	.wp-caption-text,
	figcaption {
		font-size: var(--step--1);
		color: var(--ink-3);
		text-align: center;
		margin-top: var(--space-2xs);
	}

	/*
	 * White-on-transparent brand artwork (signature, logo) stands as it is now
	 * that the plane behind it is always dark. The class is kept because the
	 * saved content carries it, and it should not become an unstyled unknown.
	 */
	.dz-invertible {
		filter: none;
	}

	.wp-block-quote {
		border-left: 2px solid var(--accent);
		padding-left: var(--space-m);
		margin-inline: 0;
	}

	.wp-block-pullquote {
		border-block: 1px solid var(--line);
		padding-block: var(--space-l);
		text-align: center;
	}

	.wp-block-button__link {
		text-decoration: none;
	}

	.wp-block-separator {
		border-top: 1px solid var(--line);
		max-width: 100%;
	}

	.wp-block-table table {
		width: 100%;
		border-collapse: collapse;
		font-size: var(--step--1);
	}

	.wp-block-table td,
	.wp-block-table th {
		border-bottom: 1px solid var(--line);
		padding: var(--space-2xs) var(--space-xs);
		text-align: left;
	}

	/* --- CoBlocks galleries ------------------------------------------------ */

	.wp-block-coblocks-gallery-stacked figure,
	.wp-block-coblocks-gallery-masonry figure,
	.wp-block-coblocks-gallery-collage figure {
		margin: 0;
	}

	.wp-block-coblocks-gallery-stacked .coblocks-gallery--item img,
	.wp-block-coblocks-gallery-masonry .coblocks-gallery--item img {
		border-radius: var(--radius);
	}

	/* --- embeds ------------------------------------------------------------ */

	.wp-block-embed__wrapper {
		position: relative;
	}

	.wp-block-embed.is-type-video .wp-block-embed__wrapper {
		aspect-ratio: 16 / 9;
	}

	.wp-block-embed.is-type-video iframe {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
	}

	/* --- comments ---------------------------------------------------------- */

	.comment-list {
		list-style: none;
		padding: 0;
		margin: 0;
	}

	.comment-list li {
		border-bottom: 1px solid var(--line);
		padding-block: var(--space-m);
	}

	.comment-form input[type="text"],
	.comment-form input[type="email"],
	.comment-form input[type="url"],
	.comment-form textarea,
	.search-form input[type="search"] {
		width: 100%;
		padding: var(--space-xs) var(--space-s);
		background: var(--surface);
		color: var(--ink);
		border: 1px solid var(--line);
		border-radius: var(--radius);
		font: inherit;
	}

	.comment-form input[type="submit"],
	.search-form button {
		padding: var(--space-xs) var(--space-m);
		background: var(--ink);
		color: var(--bg);
		border: 1px solid var(--ink);
		border-radius: var(--radius);
		font-size: var(--step--1);
		letter-spacing: 0.06em;
		text-transform: uppercase;
		cursor: pointer;
	}
}
