/* ZARYA independent V14: deterministic authored headline line behaviour.
   Root issue: inherited text-wrap:balance can rebalance inline text inside authored .ln lines;
   prevent premature wrapping at desktop while allowing natural narrow-mobile layouts. */
@media (min-width: 640px) {
  h1.fit > .ln, h2.fit > .ln, h3.fit > .ln, #stage-title.fit > .ln {
    text-wrap: nowrap !important;
    white-space: nowrap;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  .fit { min-width: 0; }
}
@media (max-width: 639px) {
  h1.fit > .ln, h2.fit > .ln, h3.fit > .ln { text-wrap: wrap !important; overflow-wrap: normal; }
}
/* Do not re-balance explicit line compositions even at narrower widths. */
h1.fit, h2.fit, h3.fit { text-wrap: initial !important; }
/* Correct missing font fallback consistency: headline fitting uses bundled Inter. */

/* V24.2: pin the optical size of the width-fitted headings (see embed-fonts.css for the reason). */
@media(min-width:600px){.fit,.fit .ln{font-optical-sizing:none;font-variation-settings:"opsz" 32}}

/* V24.2 ZRY-HOME-S03-002: the V14 rule above removed the balancing that avoided one-word last lines. On phones, restore balancing for the Home section headings (the pre-V14 behaviour, the V9 orphan fix). The .ln blocks are targeted because the V14 rule sets text-wrap:wrap on them. */
@media(max-width:599px){h2.display.fit,h2.display.fit>.ln{text-wrap:balance!important}}

/* V24.2: the largest fitted headings (h1, 50px and up on phones) also need the pinned optical size below 600px, or a long word such as relationship overflows a 320px WebKit viewport by 9px. Chromium already resolves opsz 32 at these sizes, so nothing changes there. */
@media(max-width:599px){h1.fit,h1.fit .ln{font-optical-sizing:none;font-variation-settings:"opsz" 32}}
