/* P28 text-size scale. Loaded last (manifest). Scope: text size and header sizing at html[data-ics-text] 1-3 only; default (no attribute) is unchanged.
   Mechanism: html font-size steps 112.5/125/150% scale every rem term. The fluid tokens in global-variables had a vw term that does not scale with root, so max/default was 1.17-1.33 instead of 1.5.
   Fix: --text-scale multiplies only the vw term; every fluid token then scales by the same factor as root. Default scale is 1, so the default design is unchanged. */
:root { --text-scale: 1; }
html:root[data-ics-text='1'] { --text-scale: 1.125; }
html:root[data-ics-text='2'] { --text-scale: 1.25; }
html:root[data-ics-text='3'] { --text-scale: 1.5; }
html:root {
  --fs-display: clamp(2rem, 1.3333rem + calc(2.9630vw * var(--text-scale)), 4rem);
  --fs-h1: clamp(1.75rem, 1.1667rem + calc(2.5926vw * var(--text-scale)), 3.5rem);
  --fs-h2: clamp(1.625rem, 1.1667rem + calc(2.0370vw * var(--text-scale)), 3rem);
  --fs-h3: clamp(1.375rem, 1.0833rem + calc(1.2963vw * var(--text-scale)), 2.25rem);
  --fs-h4: clamp(1.25rem, 1.0000rem + calc(1.1111vw * var(--text-scale)), 2rem);
  --fs-sub2: clamp(1.125rem, 1.0000rem + calc(0.5556vw * var(--text-scale)), 1.5rem);
  --fs-label-l: clamp(1.0625rem, 1.0000rem + calc(0.2778vw * var(--text-scale)), 1.25rem);
}
/* Hero eyebrow and lead paragraph: ics-hero.css set 16px (px, did not scale). Now 1rem = body token at default. */
html body section.ics-hero.ics-hero p[class] { font-size: 1rem !important; } /* !important: ics-hero.css uses !important 16px */
/* Balanced wrapping for headings at larger steps (no 3-line H1 orphans). */
html[data-ics-text] :is(h1, h2, h3) { text-wrap: balance; }
/* Header at 112.5-150%: controls stay 44-48px touch targets (do not scale with root); logo keeps 98x48 (no collapse). Gap reduction handled by the flex gap below. */
html[data-ics-text='2'] #brx-header :is(#ics-a11y-toggle, .bricks-mobile-menu-toggle, .wpml-floating-language-switcher .wpml-ls-item-toggle),
html[data-ics-text='3'] #brx-header :is(#ics-a11y-toggle, .bricks-mobile-menu-toggle, .wpml-floating-language-switcher .wpml-ls-item-toggle) {
  width: 48px; height: 48px; min-width: 44px; min-height: 44px; box-sizing: border-box;
}
html[data-ics-text='2'] #brx-header a.brxe-image img,
html[data-ics-text='3'] #brx-header a.brxe-image img {
  height: 48px; width: auto; min-width: 98px;
}
/* P28c (2026-11-05): step-3 fixes. Globe toggle lives outside #brx-header (wpml floating switcher): same 44-48px box. */
html[data-ics-text='2'] .wpml-floating-language-switcher .wpml-ls-item-toggle,
html[data-ics-text='3'] .wpml-floating-language-switcher .wpml-ls-item-toggle {
  width: 48px !important; height: 48px !important; min-width: 44px !important; min-height: 44px !important; box-sizing: border-box !important;
}
/* Skip link: at 360px step 3 its text made the box 345px wide, right edge 369px (page overflow). Cap to the viewport. */
html[data-ics-text] a.skip-link { max-width: calc(100vw - 2rem); }
/* Fixed 22px headings (timeline cards, set in other agents' css with !important): scale with root like every other rem token. 1.375rem = 22px at default. */
@media (max-width: 1023px) { html[data-ics-text] body :is(#mv-r1-h,#mv-r2-h,#mv-r3-h,#mv-r4-h,#mv-r5-h,#mv-r6-h,#mv-r7-h,#mv-r8-h,#mv-r9-h,#mv-r10-h,#ms-1-h,#ms-2-h,#ms-3-h,#ms-4-h,#ms-5-h) { font-size: var(--fs-h3) !important; } }

/* P28d (2026-11-05): 360px step-3 fixes. Footer copyright line wraps instead of overflowing (nowrap 341px text in a 312px box made scrollWidth 365px). */
html[data-ics-text='3'] #brx-footer .brxe-text-basic { white-space: normal; }
/* P28d: header row at <=380px, steps 2-3: 8px gaps so logo + globe + accessibility + menu fit the 264px content box (no 6px overlap). Controls stay 44px. */
@media (max-width: 380px) { html[data-ics-text='2'] #brx-header #brxe-5sh2mw, html[data-ics-text='3'] #brx-header #brxe-5sh2mw { gap: 8px; } }

/* P31b (2026-11-05): hero H1 must not run over the collage at text steps 1-3 (<=900px) and steps 1-3 (>=1200px). Steps 0-1 at <=900px keep the P19 geometry. */
:root { --hero-extra: 0px; }
@media (max-width: 389px) { html[data-ics-text='1'] { --hero-extra: 36px; } html[data-ics-text='2'] { --hero-extra: 115px; } html[data-ics-text='3'] { --hero-extra: 234px; } }
@media (min-width: 390px) and (max-width: 429px) { html[data-ics-text='2'] { --hero-extra: 57px; } html[data-ics-text='3'] { --hero-extra: 222px; } }
@media (min-width: 430px) and (max-width: 479px) { html[data-ics-text='2'] { --hero-extra: 35px; } html[data-ics-text='3'] { --hero-extra: 152px; } }
@media (min-width: 480px) and (max-width: 599px) { html[data-ics-text='3'] { --hero-extra: 128px; } }
@media (min-width: 600px) and (max-width: 679px) { html[data-ics-text='3'] { --hero-extra: 10px; } }
@media (max-width: 900px) {
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage { height: calc(183.75vw + var(--hero-extra)) !important; aspect-ratio: auto !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #ics-hero-head { top: 55.125vw !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #hc-690-4067 { top: 0vw !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #hc-690-4087 { top: 1.8375vw !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage :is(#hc-698-3760,#dl-star) { top: 34.9125vw !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #dl-t2 { top: 38.5875vw !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #dl-t4 { top: 42.2625vw !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #hc-693-4635 { top: calc(124.95vw + var(--hero-extra)) !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #hc-690-4591 { top: calc(126.7875vw + var(--hero-extra)) !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #hc-693-4668 { top: calc(155.2875vw + var(--hero-extra)) !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #dl-pink { top: calc(152.5125vw + var(--hero-extra)) !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #dl-t3 { top: calc(157.1125vw + var(--hero-extra)) !important; }
  :is(html[data-ics-text='1'],html[data-ics-text='2'],html[data-ics-text='3']) body #ics-hero #ics-hero-stage#ics-hero-stage #dl-t5 { top: calc(158.025vw + var(--hero-extra)) !important; }
}
@media (min-width: 1200px) { html[data-ics-text] body #ics-hero #ics-hero-stage#ics-hero-stage #ics-hero-head #h-hero { font-size: clamp(32px, 21.333px + 2.963vw, 64px) !important; } }
