/* Balance short Arabic headings and actions. Keep longer copy naturally wrapped. */
:where(main, footer) :where(h1, h2, h3, h4) {
  overflow-wrap: break-word;
  text-wrap: balance;
}
:where(main, footer) :where(p, blockquote, dd, figcaption) {
  min-width: 0;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
:where(main) :where(.btn, summary, .chip) {
  text-wrap: balance;
}
:where(main) :where(ul:not(.trust), ol) > li {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* Let longer labels form complete lines rather than forcing the whole box wider. */
[data-il-page] :is(.cst,.hero-t,.ctt,.exb,.fct,.wc,.faq-list) { min-width: 0; }
[data-il-page] :is(.hero-t > p,.chead p,.phead p,.lead,.fcs,.exnote,.exb p) { text-align: start; }
[data-il-page] :is(.cst h2,.bundle .bh2 h3,.cta h2,.exca h3) { white-space: normal; text-wrap: balance; overflow-wrap: break-word; }
[data-il-page] .hero .btns .btn { white-space: normal; }
[data-il-page] :is(.hero .hpts li,.hero .btns .btn,.cst h2) { text-wrap: balance; }
[data-il-page] .contact .lead { text-align: start; }

.il-portal :is(.page-heading,.trainee-identity,.section-header,.row-link) > * { min-width:0; }
.il-portal :is(.trainee-identity h2,.page-heading h1,.notification h3,.item-line,.row-link > strong,.trainee-footer nav a) {
  overflow-wrap:break-word;
  text-wrap:balance;
}
.il-portal :is(.admin-task-text small,.notice,.muted,.help,.visitor-privacy-note,.trainee-auth-help) {
  text-wrap:pretty;
}
.il-portal .trainee-auth-help a { display:inline-block; max-width:100%; text-wrap:balance; }
@media(max-width:620px) {
  .il-portal .section-header:not(.trainee-support-header) { flex-wrap:wrap; column-gap:12px; row-gap:6px; }
  .il-portal .course-level-heading p { text-align:start; }
  [data-il-page] .bundle .bh2 { flex-wrap:wrap; }
}
@media(max-width:360px) {
  [data-il-page="index"] #home.hero.lt .hero-t h1.one { white-space:normal; text-wrap:balance; }
}
