/* Whitespace normalization for prettified HTML */

/* Remove unwanted whitespace between inline elements */
.wp-block-heading > *,
.wp-block-list > *,
p > * {
  white-space: normal;
}

/* Preserve layout for inline elements */
a, span, strong, em, code {
  display: inline;
  white-space: nowrap;
}

/* Fix list item spacing */
.wp-block-list li {
  white-space: normal;
}

/* Normalize paragraph spacing */
p {
  margin-bottom: 1em;
  white-space: normal;
}

/* Fix image wrapper spacing */
.wp-block-image,
figure {
  display: block;
  margin: 1em 0;
}

/* Remove extra space around images */
.wp-block-image img,
figure img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Fix heading whitespace */
h1, h2, h3, h4, h5, h6 {
  white-space: normal;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* Ensure links don't break layout */
.wpcom_tag_link {
  display: inline;
}

/* Remove whitespace between list items */
ol, ul {
  padding-left: 1.5em;
}

/* Normalize block-level containers */
div, section, article, aside, nav, header, footer {
  display: block;
}