/* Loaded on the front end and in the editor canvas (inc/blocks.php, enqueue_block_assets). */

/* The prototype runs on Tailwind's preflight: border-box everywhere, no default margins, headings and links inherit,
   images are blocks. The same reset here, at zero specificity, so every block and preset class still wins. */
*,
::before,
::after {
	box-sizing: border-box;
}

:where(h1, h2, h3, h4, h5, h6, p, blockquote, figure, dl, dd, ol, ul, hr, pre) {
	margin: 0;
}

:where(h1, h2, h3, h4, h5, h6) {
	font-size: inherit;
	font-weight: inherit;
}

:where(ol, ul):not([class*="wp-block-list"]) {
	list-style: none;
	padding: 0;
}

:where(img, svg, video, canvas, iframe) {
	display: block;
	vertical-align: middle;
}

:where(img, video) {
	max-width: 100%;
	height: auto;
}

/* grayscale text smoothing, as the prototype (Tailwind `antialiased` on body) */
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Focus, handled once (prototype cmc.css §1): navy ring, amber on dark sections. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--navy);
	outline-offset: 3px;
	border-radius: 2px;
}

:where(.has-charcoal-background-color, .has-black-background-color, .on-dark) :where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline-color: var(--wp--preset--color--amber);
}

[hidden]:not([hidden="until-found"]) {
	display: none !important;
}

/* Line height for each theme.json font size (theme.json presets only output font-size, B6).
   Values from the prototype's type scale (tailwind.config.js TYPE_SCALE). */
.has-text-1-font-size,
.has-text-2-font-size,
.has-text-3-font-size,
.has-text-4-font-size {
	line-height: 1.1;
}

.has-text-5-font-size,
.has-text-6-font-size {
	line-height: 1.2;
}

.has-text-7-font-size,
.has-text-8-font-size,
.has-text-10-font-size,
.has-text-11-font-size {
	line-height: 1.3;
}

.has-text-9-font-size {
	line-height: 1.35;
}

/* `is-desktop-only` / `is-mobile-only`: hidden below / from the design's main breakpoint (1024px). */
@media (width < 1024px) {
	.is-desktop-only {
		display: none !important;
	}
}

@media (width >= 1024px) {
	.is-mobile-only {
		display: none !important;
	}
}
