/* ==========================================================================
   ABLENTRA V18 — SMALL-WIDTH FIXES (Agent 13, 2026-11-09)
   Linked LAST on every page (after v18-howitworks.css etc.), so these
   overrides win the cascade. Colours exactly as V17 — no palette changes,
   no new sections, no Cal.com changes. Scope: ONLY the three owner faults
   below, at small widths. Desktop layout untouched (Agent 2 owns the
   How-It-Works laptop layout; the Averlo pill + square-rail design stands
   above 900px).
   ========================================================================== */

/* --- 1. HEADLINES MUST NEVER BREAK MID-WORD (all widths, all pages) -----
   Root causes found in the tree:
   - v15-responsive.css sets `overflow-wrap: break-word` on h1/h2/h3, and
     team2-retail-tree-2026-11-04.css sets `overflow-wrap: anywhere` on
     .page-hero h1/lede. Either lets a long word split across lines
     ("profession al", "Constructi on", "developme nt") once the JS
     line-mask splitter (site-core-b1.js Module A) wraps a line inside a
     .line-mask/.line-inner inline-block that is narrower than the word.
   - Fix: words wrap ONLY between words. `overflow-wrap: normal` +
     `word-break: normal` + `hyphens: manual` on every heading and on the
     splitter wrappers. Long unbreakable strings (emails/URLs) are NOT
     headings, so their break-all rules (.footer-mail etc.) are untouched.
   - .line-mask/.line-inner also get max-width:100% site-wide (previously
     only on /industries/retail-local-shops/ + /industries/tree-services/),
     so a split line can never exceed its H1 box. */
h1, h2, h3, h4,
.h-display, .h-section, .h-final,
.line-mask, .line-inner,
[data-word-reveal], [data-hero-lines] {
  overflow-wrap: normal !important;
  word-break: normal !important;
  -webkit-hyphens: manual !important;
  hyphens: manual !important;
}
.line-mask, .line-inner {
  max-width: 100% !important;
}

/* --- 1b. TABLET BAND (768-960px): hero display type is too big for the
   two-column hero's text column. Measured at 779px: text column is 333px
   wide while .h-display sits at 8vw = 62.32px (governing rule is
   v16-averlo.css:58 `main#main .h-display` clamp(2.5rem,8vw,5rem)
   !important — specificity (1,1,1) — so this override uses the
   stronger `main#main section.page-hero:not(.home-hero) .h-display`
   selector, (1,3,2), linked last). The longest H1 words measure ~390px
   ("professional", "Construction") and ~388px ("memberships") at 62px —
   wider than the column, which is exactly why they split mid-word
   ("profession al", "Constructi on") and why the Fitness rotator
   overflows its H1 box by ~55px into the image card. Below 768px the
   hero stacks full-width (no fault); above ~960px the column is wide
   enough (no fault). In the band only, cap the hero H1 fluidly (5.4vw:
   longest word ~262px at 779px, ~70px spare in the 333px column) and
   let it use the full column (20ch, so the column — not the 14ch cap —
   binds). Home hero (.home-hero) is NOT touched: it is full-width and
   never broke. --- */
@media (min-width: 768px) and (max-width: 960px) {
  main#main section.page-hero:not(.home-hero) .h-display {
    font-size: clamp(2.35rem, 5.4vw, 3.35rem) !important;
    max-width: 20ch !important;
  }
}

/* --- 2. HOMEPAGE / PROCESS "HOW IT WORKS" BUTTONS: SHOW THE NAMES ------
   (small widths only, max-width: 900px — desktop Averlo design untouched)
   Root cause (verified in live renders at 779px + 390px): v16-averlo.css
   forces `.proc-dot span { display: none !important; }` for every step
   and hides the active step's <li> entirely, so the rail renders as the
   .proc-pill (current step only) + four bare squares — the owner's
   "empty boxes with no names". The spans also carry opacity:0 /
   max-width:0 / overflow:hidden from ablentra-fixes-bundle.css.
   Fix: at <=900px every step button is a labelled chip (square + name),
   including the active step, and the rail wraps instead of squeezing. */
@media (max-width: 900px) {
  main#main section.proc .proc-rail-col {
    flex-wrap: wrap !important;
  }
  main#main section.proc .proc-rail {
    flex-wrap: wrap !important;
    row-gap: .5rem !important;
  }
  /* Un-hide the active step's button (the pill above still names the
     current step too — the button row now shows all five names). */
  main#main section.proc .proc-rail li:has(.proc-dot.is-on) {
    display: block !important;
  }
  main#main section.proc .proc-dot {
    display: inline-flex !important;
    align-items: center !important;
    gap: .5rem !important;
    min-height: 44px !important;
    padding: .55rem .85rem !important;
    background: rgba(255, 255, 255, .08) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 999px !important;
    color: rgba(255, 255, 255, .75) !important;
    white-space: nowrap !important;
  }
  main#main section.proc .proc-dot.is-on {
    background: rgba(255, 255, 255, .14) !important;
    color: #FFFFFF !important;
  }
  main#main section.proc .proc-dot span {
    display: inline !important;
    opacity: 1 !important;
    max-width: none !important;
    overflow: visible !important;
    white-space: nowrap !important;
    margin-left: 0 !important;
    font-size: .85rem !important;
    color: inherit !important;
  }
  main#main section.proc .proc-dot i {
    flex: none !important;
  }
}

/* --- 3. FITNESS PAGE: "memberships" ROTATOR CUT OFF ---------------------
   Root cause (measured at 779px): the .pq-rotator word "memberships" is
   388px wide at the 8vw (62.32px) hero size but its H1 box is only 333px
   wide (two-column hero), so it overflows ~55px to the right, into the
   hero image card, which paints over its tail — the "cut off on the
   right" the owner saw. At 390px it fits (249px < 323px box); at 1440px
   it fits (499px < 559px box). Fixed by the 768-960px cap in §1b above:
   at 779px "memberships" is ~262px and sits alone on its own line
   ("into" wraps to the line above — a between-words wrap, allowed).
   No rotator-specific rule is needed; the word-break guard in §1 also
   covers the rotator (overflow-wrap/word-break inherit into it). --- */
