/* IAG r17 – accessibility + readability layer (WCAG 2.2 AA, owner rule "body copy ≥ 16px").
   Loaded LAST on every page (python3 tools/page.py hash a11y; linked via Page.ensure_css("a11y")), so equal-specificity
   selectors here win. Only sizes / colours / hit areas – no layout or content changes.
   Targets: running text Latin ≥ 16px, Arabic ≥ 17px, line-height ≥ 1.5, measure ≤ ~75ch.
   Kept small on purpose: micro labels (eyebrows, kickers, tags, status pills, step numbers, figure labels inside
   interface sketches) and legal fine print ≥ 13px are not running text and keep their size. */

/* ---------------------------------------------------------------- 1. type tokens */
:root{--fs-sm:16px}
:root:lang(ar){--fs-sm:17px}

/* ---------------------------------------------------------------- 2. running text below 16px (site.css) */
.f-sum,.sq-l,.sq-c span,.more,.link,.tlink,.tlink span,.tblwrap table,.perm,.toc,.privacy,.f label,.f-check label{font-size:16px}
:root:lang(ar) :is(.f-sum,.sq-l,.sq-c span,.tlink,.tlink span,.tblwrap table,.perm,.toc,.privacy,.f label,.f-check label){font-size:17px}
:root:lang(ar) .toc ol a{font-size:16px}
:root:lang(ar) .toc>p{font-size:16px}
@media (max-width:760px){
  .note,.ex-note,.privacy,.hint,.f-check label,.form-note,.mkt-note,.f label,table.tbl-stack{font-size:16px}
  :root:lang(ar) :is(.note,.ex-note,.privacy,.hint,.f-check label,.form-note,.mkt-note,.f label,table.tbl-stack){font-size:17px}
}

/* ---------------------------------------------------------------- 3. fx kit (fx.css, fx-sw/fx-core/fx-invb overrides) */
:is(.fx-pk-inc li,.fx-spec li li,.fx-spec p,.fx-g-d,.fx-costs li p,.fx-cn,.fx-ch-wait,.fx-chc span,.fx-pk-dec p,
    .fx-ib-t,.fx-ib-dec span,.fx-ib-log-t,.fx-ib-pr p,
    .fx-cr-five li,.fx-cr-fnote,.fx-cr-note,.fx-cr-sw span>span,.fx-cr-what>p,.fx-cr-also){font-size:16px}
:root:lang(ar) :is(.fx-pk-inc li,.fx-spec li li,.fx-spec p,.fx-g-d,.fx-costs li p,.fx-cn,.fx-ch-wait,.fx-chc span,.fx-pk-dec p,
    .fx-costs>div>p,.fx-rules li,.fx-ch-d,.fx-ch legend,.fx-not li,.fx-tl li,.fx-dl dd,.fx-fq-a p,
    .fx-ib-t,.fx-ib-dec span,.fx-ib-log-t,.fx-ib-pr p,.fx-ib-next .fx-ib-nt,.fx-ib-pr-n,
    .fx-cr-five li,.fx-cr-fnote,.fx-cr-note,.fx-cr-sw span>span,.fx-cr-what>p,.fx-cr-also,.fx-cr-pd,.fx-cr-fp,.fx-cr-facts dd){font-size:17px}
/* fx-sw.css re-declares the kit under ".core main" (higher specificity) */
.core main :is(.fx-pk-inc li,.fx-spec li li,.fx-spec p,.fx-g-d,.fx-costs li p,.fx-cn,.fx-chc span,.fx-pk-dec p,
    .fxs-band-n,.fxs-ft p,.fxs-note,.fxs-md dd,.fxs-path p,.fxs-ev dd,.fxs-rp li p,.fxs-more4 p,.fxs-more4 a span,.fxs-defs dd,.fxs-leg li){font-size:16px}
.fxs-note{font-size:16px}
:root:lang(ar) .core main :is(.fx-pk-inc li,.fx-spec li li,.fx-spec p,.fx-g-d,.fx-costs li p,.fx-cn,.fx-chc span,.fx-pk-dec p,
    .fx-dl dd,.fx-fq-a p,.fx-not li,.fx-rules li,.fx-tl li,
    .fxs-band-n,.fxs-ft p,.fxs-note,.fxs-md dd,.fxs-path p,.fxs-ev dd,.fxs-rp li p,.fxs-more4 p,.fxs-more4 a span,.fxs-defs dd,.fxs-leg li,
    .fxs-fd li,.fxs-fd>div>p,.fxs-pc-d,.fxs-it-b>p,.fxs-bv),
:root:lang(ar) :is(.fxs-note,.fxs-an){font-size:17px}
/* AR hero: the signal-green second line of the h1 must not drop below 17px on phones */
:root:lang(ar) .fx-h1b,:root:lang(ar) .core main .fx-h1b{font-size:max(.52em,17px)}

/* ---------------------------------------------------------------- 4. core.css pages (home, about, government, software…) */
.core :is(.c-rel a,.c-formbox .f label,.c-note,.c-formbox .form-note,.c-tlink,.c-tlink.c-sm,.c-hero-gov a,.c-spec dt,.c-hero-alt,
    .c-opt span,.c-card-d,.c-pr-r,.c-formbox .hint,.c-formbox .privacy,.c-fdr-pl a){font-size:16px}
:root:lang(ar) .core :is(.c-pr-r,.c-line-a,.c-hero-note,.c-spec dt,.c-tlink,.c-tlink.c-sm,.c-hero-alt,.c-hero-gov a,.c-card-svc a,
    .c-more-row a,.c-rel a,.c-more-b,.c-fdr-pl a,.c-faq summary,.c-ticks li,.c-dash li,.c-index-g li,.c-perm-m dl>div,
    .c-note,.c-formbox .f label,.c-formbox .form-note,.c-opt span,.c-card-d,.c-card-b .c-ticks li,.c-perm td,.c-formbox .hint,.c-formbox .privacy){font-size:17px}

/* ---------------------------------------------------------------- 5. inv10 (investors) + sw8 (software development) */
.invp :is(.pk-inc li,.chc span,.ch-wait,.pk-for,.ct-spec p,.rp-costs li p,.rp-cn,.sv-d,.mks p,.iv-rq-st li){font-size:16px}
:root:lang(ar) .invp :is(.pk-inc li,.chc span,.ch-wait,.pk-for,.ct-spec p,.rp-costs li p,.rp-cn,.sv-d,.mks p,.iv-rq-st li,
    .iv-rules li,.ct-not li,.jr-dl dd,.ch-d,.pk-dec p,.rp-costs>div>p,.fq-a p){font-size:17px}
@media (max-width:560px){.swp .cp p{font-size:16px}:root:lang(ar) .swp .cp p{font-size:17px}}

/* ---------------------------------------------------------------- 6. measure (≤ ~75ch) */
.form-note,.core .c-formbox .form-note{max-width:70ch}
main .glance .gl-not{max-width:74ch}
:is(.fxs-note,.fx-fine,.fx-ib-pr-n,.sw-price p,.sw-ex-c,.fx-cr-facts dd),.core main :is(.fxs-note,.fx-fine),.invp .iv-fine{max-width:72ch}
:is(.fx-not li,.fq-a p,details>div>p){max-width:72ch}
.rel small,.fx-hero .fx-fine,.core main .fx-hero .fx-fine,.fx-cr-note{max-width:72ch}

/* ---------------------------------------------------------------- 7. contrast (WCAG 1.4.3 / 1.4.1) */
/* investors (inv10.css has no source): inactive stage chapters dimmed by colour, not by opacity .32 */
html.js .invp .jr-g.is-live .jr-ch:not(.is-on){opacity:1}
html.js .invp .jr-g.is-live .jr-ch :is(h3,p:not(.jr-k),.jr-dl dd,.jr-pk){transition:color var(--m-4) var(--e)}
html.js .invp .jr-g.is-live .jr-ch:not(.is-on) :is(h3,p:not(.jr-k),.jr-dl dd,.jr-pk,.jr-pk bdi){color:var(--fg3);font-weight:400}
/* footer privacy link inside the legal line: distinguishable without colour */
.f-bot p a.f-priv{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}

/* ---------------------------------------------------------------- 8. keyboard */
/* a focused element inside a scroll reveal is shown at once (no 0.6 s fade while it already has focus) */
html.fx-js [data-fx-in]>:focus-within,html.fx-js [data-fx-in]>:focus{animation:none!important;opacity:1!important;transform:none!important}
:is([data-sw-in],[data-iv-in],[data-mo-reveal]):focus-within,:is([data-sw-in],[data-iv-in],[data-mo-reveal])>:focus-within{opacity:1!important;transform:none!important}
/* scrollable swipe rows / glance grid made focusable by a11y.js */
:is([data-swipe],.gl-grid)[tabindex="0"]:focus-visible{outline:2px solid var(--acc,var(--signal));outline-offset:-2px}

/* ---------------------------------------------------------------- 9. tap targets ≥ 44 × 44 px (owner rule; WCAG 2.5.8 asks 24) */
.f-topic-x{min-width:44px;justify-content:center}
/* consent checkbox: 24 × 24 px own target (the whole label row stays clickable) */
.f-check input,.core .c-formbox .f-check input{width:24px;height:24px;margin-top:0}
.sq-c,.fx-chc,.invp .chc{min-width:44px}
.sq-c>span,.fx-chc>span{justify-content:center}
.fx-cr-la a{min-width:44px;justify-content:center}
.invp .mks a{display:inline-flex;align-items:center;min-height:44px;padding-block:10px 2px;border-bottom:0;text-decoration:underline;text-decoration-color:var(--line2);text-underline-offset:4px}
.fx-spec li li>a:only-child{display:inline-flex;align-items:center;min-height:44px}
.fx-spec li li:has(>a:only-child)::before{top:22px}
/* doc / FAQ measure */
.fx-fq-a p{max-width:72ch}
/* quick-contact button: if a keyboard user reaches it while it is fading out, keep it visible */
.qc.is-off:focus-within{opacity:1;visibility:visible;transform:none;pointer-events:auto}


/* r17 brand: official slogan line in the footer brand block */
.ftr .f-brand p .f-slogan{display:block;margin-bottom:.35em;font-weight:600;font-size:1.06em;letter-spacing:.01em;color:inherit}

/* r19 menu INP: the mobile-menu open state on <body> is `nav-on` (site.js). Same rules as site.css body.nav-open,
   but with targeted selectors: `body.nav-open [data-mo-header]>*` invalidated the whole document on every toggle. */
body.nav-on [data-mo-header],body.nav-on [data-mo-header]>.hdr-in{transform:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
body.nav-on .qc{display:none}
body.nav-on .hdr{translate:none}
body.nav-on .hdr[data-mo-header]{background-color:var(--ink-950);-webkit-backdrop-filter:none;backdrop-filter:none}
@media (max-width:960px){
  body.nav-on{overflow:visible}
  body.nav-on .hdr{border-bottom-color:var(--line-d2)}
}
/* r19: with the site's pause switch (html.mo-paused) the paused entry animations left the mobile-menu items at their
   first frame (opacity 0) – the open menu looked empty. Paused = no motion: show the final state. */
html.mo-paused .nav-wrap.open,html.mo-paused .nav-wrap.open *{animation:none!important}
