/* Prefer meaning-based breaks in short copy, without forcing a fixed line count. */
.text-phrase {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: wrap;
}

main :is(h1, h2, h3, h4) {
  text-wrap: balance;
  overflow-wrap: break-word;
}

:lang(ja) main :is(h1, h2, h3, h4, p, blockquote, li, dd) {
  line-break: strict;
}

/* Progressive enhancement; authored heading phrases also work without this. */
@supports (word-break: auto-phrase) {
  :lang(ja) main,
  :lang(ja) .footer-copy {
    word-break: auto-phrase;
  }
}

/* Longer explanations should read as paragraphs, rather than balanced captions. */
main p,
main blockquote,
.hero-sub .hero-lead,
.section-cta p,
.editorial-section-head-lead,
.editorial-emotion-text,
.editorial-emotion-highlight,
.editorial-service-tag,
.editorial-visit-note,
.editorial-visit-lead,
.message-lead-text,
.message-v2-intro-text,
.stats-v2-caption,
.stats-v2-caption-sub,
.recruit-hero-lead,
.recruit-v2-text,
.cta-v2-text,
.footer-copy,
.sos-intro-text,
.features-intro .message-lead-text {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Long translated calls to action must still fit narrow screens. */
main :is(.btn, .cta-v2-btn, .recruit-v2-btn) {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
}

/* Leave room for the authored phrases on the smallest phone layouts. */
@media (max-width: 360px) {
  .message-v2-headline {
    font-size: 28px;
  }

  .recruit-v2-headline {
    font-size: 26px;
  }

}

/* Recruit copy has a headline, a supporting sentence, and a short invitation. */
.recruit-hero .recruit-hero-inner {
  max-width: 1000px;
  padding: 48px 0 88px;
}

.recruit-hero .recruit-hero-title {
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin-bottom: 20px;
}

.recruit-hero .recruit-hero-description {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: 0.015em;
  line-height: 1.8;
  color: #f2f4f3;
  margin: 0 0 20px;
  text-wrap: wrap;
}

.recruit-hero .recruit-hero-lead {
  max-width: 44em;
  margin: 0 auto 32px;
}

.recruit-emotion-reading .recruit-emotion-summary .text-phrase:last-child,
.recruit-emotion-reading .recruit-emotion-stories .text-phrase:nth-child(-n + 2),
.recruit-emotion-reading .recruit-emotion-invitation .text-phrase:last-child {
  display: block;
}

.recruit-steps-heading.editorial-position-steps-title {
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.8;
  text-transform: none;
}

@media (max-width: 720px) {
  .recruit-emotion-reading .editorial-emotion-title {
    font-size: clamp(20px, 6vw, 26px);
    letter-spacing: 0.02em;
    line-height: 1.6;
  }

  .recruit-emotion-reading .recruit-emotion-summary {
    font-size: clamp(17px, 4.5vw, 19px);
    letter-spacing: 0.01em;
    line-height: 1.9;
  }
}
