/**
 * _base.css — the focus outline, text wrapping, bold, the 16px floor, reduced motion.
 * Owns: :focus-visible; the vertical margins of a Spectra container's children; heading and paragraph text-wrap;
 * strong / b in body copy; small print sizes; the reduced-motion guard. Doesn't own: links (_links.css), bands
 * (_surfaces.css), form fields (_forms.css).
 * Depends on: global/_tokens.css. The modules also load in the block editor: site-wide rules that would reach
 * wp-admin's own controls are scoped to body:not(.wp-admin) (the editor canvas is an iframe without that class).
 */

/* The kit's focus: 3px navy, 3px out. Navy bands turn it white (_surfaces.css); fields use the teal ring (_forms.css). */
body:not(.wp-admin) :focus-visible {
	outline: 3px solid var(--rl-color-brand);
	outline-offset: 3px;
}

/* Spectra containers space their children with gap — the global 28px. The children's own margins (Astra's 1.33em
   after paragraphs, its heading and list margins) would add to it. */
:is(.entry-content, .editor-styles-wrapper, [class^="astra-advanced-hook-"]) :is(.wp-block-uagb-container, .uagb-container-inner-blocks-wrap) > * {
	margin-block: 0;
}

:is(.entry-content, .editor-styles-wrapper, [class^="astra-advanced-hook-"]) :is(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;
}

:is(.entry-content, .editor-styles-wrapper, [class^="astra-advanced-hook-"]) :is(p, li) {
	text-wrap: pretty;
}

/* Bold in body copy: 700 in the Headings color (STYLE.md → Type). Direct children only, so bold inside a link keeps
   the link's color. */
:is(.entry-content, .editor-styles-wrapper, [class^="astra-advanced-hook-"]) :is(p, li, td, blockquote) > :is(strong, b) {
	font-weight: 700;
	color: var(--rl-color-headings);
}

/* Nothing below 16px (STYLE.md). */
:is(.entry-content, .editor-styles-wrapper, [class^="astra-advanced-hook-"]) :is(small, figcaption, .wp-element-caption) {
	font-size: 16px;
	line-height: 26px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}
