/* Editorial paragraphs only. Source records, verse and controls keep their layout. */
@supports (text-wrap: pretty) {
  body.bw-wrap-page main p.bw-wrap-copy {
    text-wrap: pretty;
  }
}

/* Links inside running prose must not create button-sized line boxes. */
body.bw-wrap-page main p.bw-wrap-copy:not(:where(.file-formats, .reader-contact, .reader-return)) a:not(:where(
  .button,
  .reader-primary,
  .reader-button,
  .note-ref,
  [role="button"],
  [download],
  nav a,
  .reader-tools a,
  .actions a,
  .file-formats a,
  .note-backlinks a
)) {
  display: inline;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  line-height: inherit;
  white-space: normal;
  vertical-align: baseline;
}

/* Build-time spans join short editorial word groups without changing their text. */
body.bw-wrap-page main :is(p.bw-wrap-copy, h1, h2, h3) .bw-keep {
  display: inline-block;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: inherit;
  vertical-align: baseline;
}
