/**
 * Editor canvas - color-scheme parity.
 *
 * The front end gets `color-scheme: light dark` from dist/theme.css, but that
 * bundle is not enqueued in the Site Editor iframe, and theme.json's free-form
 * styles.css only reaches the front end (WP emits it via the front-end-only
 * custom-css path). Without color-scheme on the canvas root, the theme's
 * light-dark() palette tokens can't resolve to the viewer's OS preference and
 * the editor renders inconsistently. Enqueued via enqueue_block_assets so it
 * lands on the iframe :root unscoped (add_editor_style would prefix the
 * selector and miss :root).
 */
:root {
	color-scheme: light dark;
}

/*
 * Editor/front-end parity overrides for WP core rules that only exist in the
 * canvas and beat the theme's zero-specificity :where() rules. See
 * docs/wordpress-best-practices.md section 2.
 *
 * Core forces overflow-wrap:break-word both on every block wrapper
 * (.block-editor-block-list__block) AND on the RichText editable
 * (.block-editor-rich-text__editable) - the latter is the element that actually
 * holds the text inside list items, headings, etc. (a paragraph is both at once).
 * These beat the theme's :where(p,li,...){overflow-wrap:normal} (0,0,0) in the
 * canvas only and split ordinary words mid-wrap (e.g. a "touched\A0it" token where
 * an nbsp glues the words). Override BOTH to restore the front-end behaviour.
 */
.block-editor-block-list__layout .block-editor-block-list__block,
.block-editor-rich-text__editable {
	overflow-wrap: normal;
}
