/* Loaded last on purpose: shared leftovers, reduced motion and touch sizes. */
/* ---------- small leftovers used across screens ---------- */
.full{position:fixed;inset:0;z-index:var(--z-over);background:var(--bg);overflow:auto;overscroll-behavior:contain;animation:xb-fade var(--t-2) var(--ease-out)}
.full>.scr{max-width:var(--read-max);margin:0 auto}
.row-actions.wrap{flex-wrap:wrap}
.ticker{gap:var(--s-2)}
.prow.hit{align-items:center}
.tw3{position:relative;width:100%;max-width:400px;margin:0 auto;aspect-ratio:340/470;touch-action:pan-y}
.card.pf{gap:var(--s-5)}
.pf>.top{align-items:flex-start}
.pf .chips{gap:var(--s-2)}
.pf .chip[class*="lv-"]::before{content:'';flex:none;width:8px;height:8px;border-radius:50%;background:var(--line-2)}
.pf .chip.lv-hi::before{background:var(--ok-fill)}.pf .chip.lv-mid::before{background:var(--accent)}.pf .chip.lv-lo::before{background:var(--bad-fill)}
.pf .chip.on.lv-hi::before,.pf .chip.on.lv-mid::before,.pf .chip.on.lv-lo::before{box-shadow:0 0 0 1.5px var(--on-accent)}
.pf .chip small{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 6px;border-radius:var(--r-pill);background:var(--fill-2);color:var(--ink-2);opacity:1}
.pf .chip.on small{background:rgba(0,0,0,.2);color:inherit}

/* ---------- reduced motion: movement becomes a short fade; progress indicators still run ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *:not(.val):not(.xi-r):not(.sk),*::before,*::after{animation-name:xb-fade!important;animation-duration:var(--t-2)!important;animation-delay:0s!important;animation-iteration-count:1!important;animation-timing-function:var(--ease-out)!important}
  *,*::before,*::after{transition-property:opacity,color,background-color,border-color,box-shadow,stroke-dashoffset!important}
  .btn[aria-busy=true]::after,.btn-sm[aria-busy=true]::after,.btn-pill[aria-busy=true]::after,.tw3-spin{animation-name:xb-spin!important;animation-duration:.8s!important;animation-iteration-count:infinite!important;animation-timing-function:linear!important}
  .sk{animation:none!important}
}

/* ---------- touch: on touch screens every control is at least 44px under the finger.
   Controls that would change the layout by growing keep their look; an invisible 44px hit area is centred on them instead. ---------- */
@media (pointer:coarse){
  .btn-sm,a.btn-sm,.lg-qb,.th-sw button,.th-sw.on-xi button,.btn-pill,.chip,.chip.sm,.icon-btn,.seg>button,.seg.mini>button,.yn button,.link,.link.small,.link.sm,.utabs button,.stat-sel,.inline-in,.date-in,.t-in,.amt-in,.mb-in,.qty,.rate,.cell,.note-cell,.rng-in input,.sortby select,.set-nav button,.al-chip,.pgb,.pgb.sm,.donut-l>button,.fl-edit,.card.dark .link.fl-edit{min-height:var(--tap)}
  .btn-sm,a.btn-sm,.chip,.yn button,.pgb,.icon-btn,.th-sw button{min-width:var(--tap)}
  .icon-btn.sm{width:var(--tap);height:var(--tap)}
  details.more>summary{width:var(--tap);height:var(--tap);margin:-4px}
  .shs-x{width:var(--tap);height:var(--tap);margin:-10px}
  :is(.link,.info,.info-b,.tg:not(i),.vf-b,.lang-sw button,.per-row button,.regs button,.ana-tabs button,.avp-e,.avatar-btn,.eq-codes,.week>button,.cal-d,.rg-it,.link-q){position:relative}
  :is(.link,.info,.info-b,.tg:not(i),.vf-b,.lang-sw button,.per-row button,.regs button,.ana-tabs button,.avp-e,.avatar-btn,.eq-codes,.week>button,.cal-d,.rg-it,.link-q)::after{content:'';position:absolute;top:50%;left:50%;width:max(100%,var(--tap));height:max(100%,var(--tap));transform:translate(-50%,-50%)}
  .utabs button::before{content:'';position:absolute;top:0;bottom:0;left:50%;width:max(100%,var(--tap));transform:translateX(-50%)}
  .si-back{min-width:var(--tap)}
  details>summary,.pg-how summary{min-height:var(--tap)}
  .search input{min-height:var(--tap)}
  .card>.top>.link{margin-block:-11px}
  .th-sw.compact button{width:var(--tap);min-width:var(--tap)}
  .rk-name,.att-n,.tchk-r .checkline,.card>.checkline{padding-block:11px;margin-block:-11px}
}

/* sentence case everywhere: small labels, table and section headers, chips and eyebrows are not shouted.
   Uppercase stays only for the brand mark, the welcome step tag and the printed report. */
.lab,.lab-l,.lab-g,.lab-c,.acc-t,.grp-l,.nav-t,.g2-k,.bt-k,.tour-n,.bt-date b,.bt-cmp>span,.bt-tag,.stat-l,.shx-tc,.live,.kcol strong,.dg-h,.mchip b,.mb-m,.tbl.rep tr.sec td,.nav-ed-t,.plg-cols,.plg-u,.modebar,.next-d span,.shs-k,.shs-t span,.lg-adj-t,.lg-sh,.rec-k,.gf2-k span,.onb-n,.brief-f b,.tp-ht small,.cal-h,.cc-l{text-transform:none;letter-spacing:0}
/* segment-style controls centre their labels (buttons inherit start alignment from the reset) */
:is(.per-row,.regs,.bt-seg,.yn,.seg.mini,.utabs) button{text-align:center}
/* a button beside a full-height inline field takes the same height */
.inline-in+.btn-sm{min-height:var(--tap)}
/* time and date values are left to right in Arabic too, kept on the start edge of the field */
[dir=rtl] input:is([type=time],[type=date]){direction:ltr;text-align:right}
[dir=rtl] input:is([type=tel],[inputmode=tel],[type=email]){direction:ltr;text-align:right}
/* Latin names in Arabic take their own direction, so a long name is cut at its end, not its start */
[dir=rtl] :is(.tt-tn b,.tt-name,.row-a,.plg-cn,.att-n,.plg-nm,.tt-ts b,.call-r b,.cell-link b,td b){unicode-bidi:plaintext;text-align:right}
/* Arabic forms: every field's value sits on the same (right) edge, whether the value is Arabic or Latin */
[dir=rtl] :is(input,textarea)[dir=auto]{text-align:right}
