/* CS Vertical typography rules (child theme, global).
   1. Widows and orphans: balanced headings, tidy last lines in body copy.
      A PHP filter in functions.php also binds the last two words with a non-breaking space for browsers
      that do not support text-wrap: pretty.
   2. Justified body copy on the capability detail pages: the Elementor widget carries the class csv-justify. */

h1, h2, h3, h4, .elementor-heading-title {
  text-wrap: balance;
}

.elementor-widget-text-editor p,
.elementor-widget-text-editor li,
.elementor-widget-theme-post-content p,
.elementor-widget-theme-post-content li,
.elementor-icon-list-text {
  text-wrap: pretty;
}

.csv-justify p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

/* Bullet lists inside a justified widget stay left-aligned: short items stretched to the column width show large word gaps. */
.csv-justify ul,
.csv-justify ol,
.csv-justify li {
  text-align: left;
}

/* Narrow phone columns leave large gaps when justified, so phones stay left-aligned. */
@media (max-width: 767px) {
  .csv-justify p {
    text-align: left;
    hyphens: manual;
    -webkit-hyphens: manual;
  }
}
