.doc-heading .doc-guide-intro,
.doc-heading .doc-explanation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(.75rem, 3vw, 2rem);
}

/* Reserve a readable line for the text. The illustration moves beneath it when
   the two no longer fit, including when the reader increases their font size. */
.doc-guide-intro > div {
  flex: 1 1 23em;
  min-width: 0;
}
.doc-guide-intro > img {
  flex: none;
  width: clamp(5rem, 23%, 13.5rem);
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
}
.documents-page .doc-guide-intro h1 {
  overflow-wrap: normal;
  word-break: normal;
}

/* The index title is a single word. Let it use all of its column, with an
   additional size bound only when an enlarged title would outgrow the line. */
@supports (container-type: inline-size) {
  .doc-guide-intro > div { container-type: inline-size; }
  .documents-page .doc-guide-intro h1 {
    font-size: min(clamp(2.125rem, 5vw, 3.75rem), 15.5cqi);
  }
}

.doc-heading .doc-explanation {
  align-items: flex-start;
  margin-top: .9rem;
}
.doc-explanation > p {
  margin-block: 0;
  flex: 1 1 18em;
  min-width: 0;
}
.doc-explanation > img {
  flex: none;
  width: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 100%;
  height: auto;
  margin-top: .25rem;
}
