/* Reading content and core block defaults shared by front end and editor. */
.itlu-page-header {
	margin-block-end: var(--itlu-section-space-sm);
}

.itlu-entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--itlu-space-2) var(--itlu-space-4);
	color: var(--itlu-color-text-muted);
	font-size: var(--itlu-font-size-meta);
}

:where(.itlu-entry__content, .editor-styles-wrapper) > :first-child {
	margin-block-start: 0;
}

:where(.itlu-entry__content, .editor-styles-wrapper) > :last-child {
	margin-block-end: 0;
}

:where(.itlu-entry__content, .editor-styles-wrapper) :where(p, li, dd) {
	max-inline-size: var(--itlu-width-reading);
}

:where(.itlu-entry__content, .editor-styles-wrapper) :where(ul, ol) {
	padding-inline-start: var(--itlu-space-6);
}

:where(.itlu-entry__content, .editor-styles-wrapper) :where(ul, ol) :where(ul, ol) {
	margin-block: var(--itlu-space-2);
}

:where(.itlu-entry__content, .editor-styles-wrapper) li + li {
	margin-block-start: var(--itlu-space-1);
}

:where(.itlu-entry__content, .editor-styles-wrapper) dt {
	font-weight: var(--itlu-font-weight-strong);
}

:where(.itlu-entry__content, .editor-styles-wrapper) dd {
	margin-inline-start: var(--itlu-space-6);
}

:where(.itlu-entry__content, .editor-styles-wrapper) blockquote {
	margin-inline: 0;
	padding: var(--itlu-space-4) var(--itlu-space-6);
	border-inline-start: var(--itlu-border-width-prominent) var(--itlu-border-style) var(--itlu-color-primary);
	background: var(--itlu-color-surface-alt);
}

:where(.itlu-entry__content, .editor-styles-wrapper) blockquote > :first-child {
	margin-block-start: 0;
}

:where(.itlu-entry__content, .editor-styles-wrapper) blockquote > :last-child {
	margin-block-end: 0;
}

:where(.itlu-entry__content, .editor-styles-wrapper) blockquote cite {
	color: var(--itlu-color-text-muted);
	font-size: var(--itlu-font-size-small);
}

:where(.itlu-entry__content, .editor-styles-wrapper) table {
	inline-size: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}

:where(.itlu-entry__content, .editor-styles-wrapper) :where(th, td) {
	padding: var(--itlu-space-3);
	border: var(--itlu-border-width) var(--itlu-border-style) var(--itlu-color-border);
	overflow-wrap: anywhere;
	text-align: start;
	vertical-align: top;
}

:where(.itlu-entry__content, .editor-styles-wrapper) th {
	color: var(--itlu-color-heading);
	background: var(--itlu-color-surface-alt);
	font-weight: var(--itlu-font-weight-strong);
}

:where(.itlu-entry__content, .editor-styles-wrapper) caption {
	padding-block-end: var(--itlu-space-2);
	color: var(--itlu-color-text-muted);
	font-size: var(--itlu-font-size-meta);
	overflow-wrap: anywhere;
	text-align: start;
}

/* Keep a table's min-content width inside its own scroll container at zoom. */
.itlu-entry__content .wp-block-table,
.editor-styles-wrapper .wp-block-table {
	display: block;
	inline-size: 100%;
	min-inline-size: 0;
	max-inline-size: 100%;
	overflow-x: auto;
}

:where(.itlu-entry__content, .editor-styles-wrapper) :where(figure, .wp-block-image) {
	margin-inline: 0;
}

:where(.itlu-entry__content, .editor-styles-wrapper) figcaption {
	margin-block-start: var(--itlu-space-2);
	color: var(--itlu-color-text-muted);
	font-size: var(--itlu-font-size-small);
}

:where(.itlu-entry__content, .editor-styles-wrapper) .wp-block-separator {
	border: 0;
	border-block-start: var(--itlu-border-width) var(--itlu-border-style) var(--itlu-color-border);
}

:where(.itlu-entry__content, .editor-styles-wrapper) .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--itlu-space-3);
}

:where(.itlu-entry__content, .editor-styles-wrapper) .wp-block-button {
	margin: 0;
}

:where(.itlu-entry__content, .editor-styles-wrapper) :where(.wp-block-columns, .wp-block-media-text) {
	gap: var(--itlu-space-6);
}

:where(.itlu-entry__content, .editor-styles-wrapper) :where(.wp-block-cover, .wp-block-cover h1, .wp-block-cover h2, .wp-block-cover h3) {
	color: var(--itlu-color-text-on-media);
}

:where(.itlu-entry__content, .editor-styles-wrapper) .wp-block-file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--itlu-space-3);
}

.itlu-entry__files,
.itlu-entry__gallery,
.itlu-entry__related {
	margin-block-start: var(--itlu-section-space-md);
}

.itlu-front-section {
	margin-block: var(--itlu-section-space-md);
}

.itlu-align-wide,
.alignwide {
	inline-size: min(var(--itlu-width-wide), calc(100vw - (2 * var(--itlu-container-gutter))));
	max-inline-size: none;
	margin-inline: calc((100% - min(var(--itlu-width-wide), calc(100vw - (2 * var(--itlu-container-gutter))))) / 2);
}

.itlu-align-full,
.alignfull {
	inline-size: 100vw;
	max-inline-size: none;
	margin-inline: calc(50% - 50vw);
}

@media (max-width: 37.5rem) {

	:where(.itlu-entry__content, .editor-styles-wrapper) :where(th, td) {
		padding: var(--itlu-space-2);
	}
}

@media print {

	:where(.itlu-entry__content, .editor-styles-wrapper) :where(blockquote, th, td) {
		border-color: #999;
	}
}
