/* ============================================================
   JW&Co — spacing reset
   Kill browser + WP core-block default top/bottom spacing so the
   design's explicit tokens are the ONLY source of vertical rhythm.
   ============================================================ */

/* Belt-and-braces UA reset (base.css also sets these) */
h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd,ul,ol { margin-block-start: 0; margin-block-end: 0; }

/* WordPress core blocks add their own margins via :where() (low specificity).
   Zero the vertical ones; spacing comes from block layout gaps / inline styles. */
:where(.wp-block-heading),
:where(.wp-block-paragraph),
:where(p.wp-block-paragraph),
:where(.wp-block-post-content) > :where(h1,h2,h3,h4,h5,h6,p) {
  margin-top: 0;
  margin-bottom: 0;
}

/* Remove the default gap the block layout injects between sibling blocks;
   JW&Co sections define their own spacing explicitly. */
:where(.wp-site-blocks) > * { margin-block: 0; }

/* Kill default top/bottom margin + padding on container blocks (Group, Columns,
   Column) and Form blocks at any nesting depth. Explicit tokens/inline styles
   still win via higher specificity. */
:where(.wp-block-group),
:where(.wp-block-columns),
:where(.wp-block-column),
:where(.wp-block-form),
:where(.wp-block-form .wp-block-form-input),
:where(.wp-block-form .wp-block-form-submit-button) {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Keep images fluid inside content */
img, svg, video { max-width: 100%; height: auto; }
