/*
 * Core overrides — rules that beat one of core's global styles.
 *
 * Remit: a rule here undoes a default core writes for every site through a
 * zero-specificity `:where()` global style. Each block names the core rule it
 * overrides and why. Nothing with a feature name belongs here (that gets its
 * own file, assets/css/<feature>.css), and no block looks: those are
 * theme.json. Loaded on every page and in the editor (functions.php).
 */

/*
 * No root block gap.
 *
 * Core: `:where(.wp-site-blocks) > * { margin-block-start: <blockGap> }`,
 * from theme.json styles.spacing.blockGap (M). It puts the gap between a
 * template's top-level blocks: header, after-header, main, footer. Every one
 * of those carries its own padding, so the gap only ever showed as a strip of
 * page background under the header. Core zeroes it itself for a Post Content
 * main; this zeroes it for every root child, so a Group main (a custom
 * template) and the after-header part sit flush too.
 *
 * Not done with blockGap 0 in theme.json: that value is also the default gap
 * inside every Group, Stack and post content that sets none. Only direct
 * children of the root change here. The selector carries class specificity,
 * so it beats core's `:where()` whatever the load order, and a block's own
 * margin control still wins.
 *
 * Templates with two non-part blocks side by side at the root (index.html's
 * title and excerpt) lose that gap: put them in a Group. The Site Editor
 * canvas uses `.is-root-container`, not `.wp-site-blocks`, so the editor can
 * keep showing the gap the front end does not.
 */
.wp-site-blocks > * {
	margin-block-start: 0;
}
