/* Murmur · authoritative responsive title layer
   Loaded last on every page so headings respond to their available width. */

body main h1,
body main h2,
body main h3 {
  min-width: 0;
}

body main h1,
body main h2 {
  text-wrap: balance;
}

body main h3 {
  overflow-wrap: break-word;
}

/* Authored lines stay editorial when they fit, but may wrap inside their span. */
body main :is(
  #hero-title,
  #home-vision-title,
  #category-title,
  #audience-title,
  #measurement-title,
  #shift-title,
  #pdemo-title,
  #flow-title,
  #day-title,
  #control-title,
  #agentic-hero-title,
  #reader-title,
  #marketing-title,
  #why-title,
  #next-title,
  #vision-title,
  #home-prefooter-title,
  #product-prefooter-title,
  #agentic-prefooter-title,
  #contact-prefooter-title
) > span {
  white-space: normal;
}

/* Keep the changing AI mark attached to the word it represents. */
body main #hero-title .hero__ai-token {
  display: inline;
  white-space: nowrap;
}

/* The measurement copy needs the full row before its visual becomes narrow. */
@media (min-width: 761px) and (max-width: 1100px) {
  body .measurement-report {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(42px, 6vw, 64px);
  }

  body #measurement-title {
    max-width: 14ch;
  }

  body .measurement-report__intro > p {
    max-width: 38ch;
  }
}

/* Long editorial statements become one balanced text flow on small screens. */
@media (max-width: 700px) {
  body main :is(
    #home-vision-title,
    #category-title,
    #audience-title,
    #measurement-title,
    #shift-title,
    #reader-title,
    #marketing-title,
    #why-title,
    #next-title,
    #vision-title
  ) > span {
    display: inline;
  }

  body .control-story__head #control-title {
    font-size: clamp(36px, 10.8vw, 42px);
  }
}

@media (max-width: 360px) {
  body #flow-title {
    font-size: 34px;
  }

  body #audience-title span:first-child {
    white-space: normal;
  }
}
