/* ===================================================================
   css/lang-es.css — the Spanish-only rules (S15-PLAN.md §5).
   Linked by the three layouts (src/layouts/site.pug · contact.pug · error.pug) right after `block styles` on every
   page built in a non-default language — the last stylesheet of the head, so it wins over the page CSS; the English
   pages never load it (Pug emits nothing for the default language, the English bytes never change). Cache-busting:
   src/data/site.json → versions "css/lang-es.css".
   Write every rule as `:lang(es) …` so it skips the kept-English containers (they carry lang="en"); a url() here
   resolves against css/ → `url("../assets/…")`. The mobile pass's responsive.css loads after this file.
   The rules: S15 = the case-studies title shift + one balance rule (six selectors); S16 (S16-PLAN.md §3.5) = one
   balance rule for the leadership hero lead (.al-hero__lead), and after the review (S16-PLAN.md §11) a second one for
   the seven candidates of T16c's orphan scan that qualify (nine selectors: the last line under a third of the box,
   the line count kept); S17 (S17-PLAN.md §3.3) = a fourth balance rule for the landing + the two solutions pages
   (eight selectors, measured by worker T17c) and ONE non-balance rule, the acquirer Interchange popup's title cap;
   marketing corrections 17 (2026-10-14) = a 240 px cap + balance on the two solutions pages' stat band labels;
   marketing correction 19 (2026-10-14) = the Opex popup's one-paragraph lead at a 445 px text box.
   =================================================================== */

  /* ---- Case Studies hero title (S15, measured by worker T15d in headless real Chrome) ----
     "Casos de éxito" is fitted to the column like the English title (js/case-studies.js fitTitle, not edited), but the
     locked decorative shift translateX(var(--case-title-x) = 140px) pushed its right edge past the viewport, where
     .case-hero clips it: 87 px cut at 1280, 24 px at 1366. 40px is the largest multiple of 10 that keeps the title's
     right edge ≥ 10 px inside the viewport at 1280 · 1366 · 1440 · 1536 (margins 12.6 · 76.2 · 140.9 · 188.9 px). */
  :lang(es) .case-title { --case-title-x: 40px; }

  /* ---- Balanced Spanish wraps (S15-PLAN.md §13 — C-1 / C-2 / C-4 / C-9, and C-5 / V-1 / V-2 after the fix round) ----
     The longer Spanish copy left a one-word last line on the case-studies wall heading + lead and the featured cards'
     hover stat line, the get-started done line and the About closing lead (the landing's Proven-results row labels
     left with that section's rebuild, correction 56, 2026-10-17);
     `text-wrap: balance` evens those lines out on the Spanish pages only (the English bytes never change). */
  :lang(es) .case-h2, :lang(es) .case-lead, :lang(es) .case-stat__desc, :lang(es) .ct-done, :lang(es) .au-cta__lead { text-wrap: balance; }

  /* ---- Balanced Spanish wraps 2 (S16-PLAN.md §3.5, measured by worker T16c in headless real Chrome) ----
     The render reader named six candidates (.al-hero__lead · .pr-fmp__h2 · .al-tm__h2 · .pr-hiw__h2 · .pr-hero__h1 ·
     .pr-mod__h2); on the real es pages at 1280 · 1366 · 1440 · 1536 only the leadership hero lead leaves an orphan last
     line: «… en todas las | regiones.» (104 px of the 689 px box, 3 lines). Balanced it keeps its 3 lines at every width
     and the last line grows to 493 px. The other five end on a line wider than a third of their box (no rule). */
  :lang(es) .al-hero__lead { text-wrap: balance; }

  /* ---- Balanced Spanish wraps 3 (S16-PLAN.md §11, T16c's orphan scan measured by fix worker F2 in headless real Chrome) ----
     Every element each selector matches was measured on the real es pages at 1280 · 1366 · 1440 · 1536 (light, the
     products FAQ answers opened, both product popups opened), before and with the rule injected. Each selector leaves a
     one- or two-word last line somewhere (shorter than a third of its box) and balance changes the line count of NONE of
     its elements at any width:
       .au-tl__desc         the six timeline descs, 1–2 lines: «… sigue sin | igual.» 35 px of 543 at 1366 → 295 px
       .al-band__sub        «… bancos de todo el | sector.» 129 of 604 (2 lines, every width) → 327
       .al-tm__quote        slide 2, 6 lines (balance's limit): «… le | encanta.» 119 of 511–539 at ≥ 1366 → 411
       .pr-mod__lead        «… en el Interchange | Hub.» 134 of 600 (3 lines) → 451
       .pr-cap-card__desc   the six capability cards (2–3 lines; «… ni más ni | menos.» 47 of 313–321 → 207) and the two
                            popups' three cap cards each («… del | portafolio.» 89 of 310 at ≥ 1366 → 211) — scoped to the
                            products page: the solutions popups share the class and keep their English bodies until S17
                            (S17 widens it to .pr-modal--narrow below)
       .pr-faq__a-inner p   the five answers (4–5 lines at 1536; marketing's corrected copy since correction 38, 2026-10-16)
     The CEO quote (.au-quote__text, 7–8 lines) is past balance's six-line limit — no rule. */
  :lang(es) .au-tl__desc, :lang(es) .al-band__sub, :lang(es) .al-tm__quote, :lang(es) .pr-mod__lead,
  :lang(es) .pr-caps__grid .pr-cap-card__desc, :lang(es) #pr-modal-fee .pr-cap-card__desc, :lang(es) #pr-modal-ix .pr-cap-card__desc,
  :lang(es) .pr-faq__a-inner p { text-wrap: balance; }

  /* ---- Balanced Spanish wraps 4 (S17-PLAN.md §3.3 a, measured by worker T17c in headless real Chrome) ----
     Every element each selector matches was measured on the real es pages at 1280 · 1366 · 1440 · 1536 (light; the
     index switcher in both states, the three Proven-results tabs; each of the seven solutions popups opened by its
     Learn more, on both solutions pages), before and with the rule injected. Each selector leaves a one- or two-word last
     line somewhere (shorter than a third of its box) and balance changes the line count of NONE of its elements:
       .tools__title                        3 lines in both switcher states: «… tarifarias | complejas» 178 of 538 → 338
       .sol-meth__desc                      the five methodology descs, 4 lines each, both pages: step 1 «… dejando | pasar.»
                                            36 of 228 → 170, step 2 «… sin | sorpresas.» 62 → 158; step 3's «ocurran.» stays
                                            49 px (its <br> splits the paragraph, balance cannot reach across it)
       .pr-fmp__glance-text                 the acquirer glance strip's three labels (2–3 lines): «… de | equilibrio» 62 of
                                            203 → 107, «… bruta | negativa» 44 of 189 → 114, «… del | portafolio» 49 of 181 → 143
       .pr-modal--narrow .pr-fmp__lead      the Opex popup's second lead «… cómo | capturarlos.» 111 of 455 → 271 (2 lines,
                                            both pages); the acquirer Interchange lead «… y los | precios.» 69 of 441 → 305
                                            (3 lines); the other narrow leads end wide and keep their wraps (the Opex entry is superseded since correction 19,
                                            2026-10-14: one <p> with a <br> — see the Opex rule at the end of this file)
       .pr-modal--narrow .pr-fmp__cta-h2    the Scheme popup «¿Está pagando más de lo que | debería?» 109 of 441 → 231
       (.pr-modal--narrow .pr-fmp__cta-lead was listed here until correction 20, 2026-10-14: no solutions popup has a
                                            cta lead any more — the selector was dropped)
       .pr-modal--narrow .pr-cap-card__desc the 18 cap descs of the seven solutions popups (2 lines each): the issuer
                                            Interchange card 2 «… directamente en | incontrol.» 44 of 263 → 156 — the S16
                                            products-only rule widened (S16-PLAN.md §9)
     Measured and left alone (no orphan anywhere): .services__title (its two <br>s), .presence__title, .sol-hero__h1,
     .sol-cta__h2 (2 lines, «… le conviene?» 175 of 500), the narrow .pr-fmp__h2. */
  :lang(es) .tools__title, :lang(es) .sol-meth__desc, :lang(es) .pr-fmp__glance-text,
  :lang(es) .pr-modal--narrow .pr-fmp__lead, :lang(es) .pr-modal--narrow .pr-fmp__cta-h2,
  :lang(es) .pr-modal--narrow .pr-cap-card__desc { text-wrap: balance; }

  /* ---- (The acquirer Interchange popup's Spanish title cap of S17 — :lang(es) #sol-modal-interchange-acq .pr-fmp__h2
     { max-width: 441px } — was REMOVED in correction 20, 2026-10-14: the new title «Aumente la utilidad bruta hasta un
     17%.» breaks «Aumente la utilidad bruta / hasta un 17%.» in the English cap of css/solutions.css (361 px); at 441 px
     it would leave «17%.» alone on line 2.) ---- */

  /* ---- Spanish stat band labels (2026-10-14, marketing corrections 17) ----
     The four .sol-stats__cell of the solutions pages' stat band are width: max-content, centred in the four 1fr columns
     of .sol-wrap (294 px each at 1280, 320 px from 1536). The faithful Spanish labels measure 290–304 px on one line
     («En oportunidades de ahorro identificadas en 2025» 304 · «Recuperado del gasto anual en tarifas de marca» 290), which
     would bring neighbouring cells within a few px of each other (0.5 px between cells 1 and 2 at 1280). Capped at 240 px
     they wrap to two balanced lines and the cells keep a clear gap; the shorter labels stay on one line. The English
     pages never load this file — their labels (the widest, «In savings opportunities found in 2025», 235 px) stay on
     one line. */
  :lang(es) .sol-stats__label { max-width: 240px; text-wrap: balance; }

  /* ---- The Opex popup's lead as ONE paragraph (2026-10-14, marketing correction 19) ----
     Deck slide 19 merged the two lead paragraphs into one <p> with a <br> before the second sentence. Balance (rule 4
     above) cannot reach across a <br>, so at the shared 455 px width the Spanish second sentence broke «… ahorros: le
     muestran exactamente | cómo capturarlos.» (last line 111 of 455) — the very wrap rule 4 had fixed. At 445 px the
     first sentence keeps its two lines (430.4 must fit) and the second breaks «… ahorros: le muestran | exactamente cómo
     capturarlos.» («… le muestran exactamente» 448 must not fit). The box keeps its 455 px (a 10 px right padding narrows
     only the text) so the head grid's checks column does not move. Both solutions pages (same popup id). */
  :lang(es) #sol-modal-opex .pr-fmp__lead { padding-right: 10px; }
