/* AXIA image refresh 1.1 — existing heading text, palette and section grid stay intact. */

/* Phrase units wrap at Japanese meaning boundaries. max-inline-size permits zoom/reflow. */
#axqv2 .axir-phrase,
#axia-company .axir-phrase,
#axct-v4 .axir-phrase,
#axfam-v4 .axir-phrase,
#axtr-v2 .axir-phrase {
  display: inline-block;
  max-inline-size: 100%;
  vertical-align: baseline;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: wrap;
}

#axqv2 .axir-line,
#axia-company .axir-line,
#axct-v4 .axir-line,
#axfam-v4 .axir-line,
#axtr-v2 .axir-line {
  display: block;
  max-inline-size: 100%;
  white-space: normal;
}

/* Existing family navigation styles target all spans; phrase spans inherit the heading. */
#axfam-v4 .axfam-concern-grid strong .axir-phrase,
#axfam-v4 .axfam-concern-grid strong .axir-line {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

/* Quality hero: eight Japanese characters per original line, sized to its own column. */
#axqv2 #axqv2-hero-title {
  font-size: clamp(34px, 4vw, 56px);
}

@supports (container-type: inline-size) {
  #axqv2 .axqv2-hero__copy {
    container-type: inline-size;
  }

  #axqv2 #axqv2-hero-title {
    font-size: min(clamp(43px, 5vw, 64px), 11.5cqi);
  }

  @media (max-width: 600px) {
    #axqv2 #axqv2-hero-title {
      font-size: min(clamp(34px, 11vw, 44px), 11.5cqi);
    }
  }

  /* These existing two-column introductions are narrower than their original h2 size. */
  @media (min-width: 901px) {
    #axqv2 .axqv2-safety__intro,
    #axtr-v2 .axtr-policy__layout > .axtr-section-head,
    #axtr-v2 .axtr-security__layout > .axtr-section-head {
      container-type: inline-size;
    }

    #axqv2 #axqv2-safety-title {
      font-size: min(clamp(35px, 4.2vw, 51px), 9.3cqi);
    }

    #axtr-v2 #axtr-policy-title,
    #axtr-v2 #axtr-security-title {
      font-size: clamp(28px, 8.5cqi, 38px);
    }
  }
}

/* Balance operates between whole phrases, rather than leaving a final kana on a line. */
#axia-company #axc-dialogue-title,
#axct-v4 #axct-options-title,
#axct-v4 #axct-form-title,
#axct-v4 #axct-related-title,
#axfam-v4 #axfam-confirm-title,
#axtr-v2 #axtr-policy-title,
#axtr-v2 #axtr-security-title {
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: balance;
}

/* Print has a different layout and does not need the on-screen column size containment. */
@media print {
  #axqv2 .axqv2-hero__copy,
  #axqv2 .axqv2-safety__intro,
  #axtr-v2 .axtr-policy__layout > .axtr-section-head,
  #axtr-v2 .axtr-security__layout > .axtr-section-head {
    container-type: normal;
  }

  #axqv2 #axqv2-hero-title {
    font-size: 34px;
  }

  #axqv2 #axqv2-safety-title,
  #axtr-v2 #axtr-policy-title,
  #axtr-v2 #axtr-security-title {
    font-size: 28px;
  }
}
