/* Dark mode, Arabic typography and RTL fixes. Loaded after style.css. */
.nav{gap:18px}
.tgs{display:flex;gap:8px}
.tg{height:38px;min-width:38px;padding:0 13px;border-radius:99px;border:1px solid #ffffff45;background:transparent;color:#fff;font:600 .85rem "IBM Plex Sans","IBM Plex Sans Arabic",sans-serif;cursor:pointer;transition:background .3s}
.tg:hover{background:#ffffff26}
#theme::before{content:"☾";font-size:1.05rem}
[data-theme=dark] #theme::before{content:"☀"}
.tt,.tt *{transition:background-color .5s,color .5s,border-color .5s,box-shadow .5s!important}

/* dark */
:root[data-theme=dark]{color-scheme:dark;background:#070e1f;--paper:#101b36;--line:#25355c;--mute:#9fadcc}
:root[data-theme=dark]{--cert-fade:#070e1f}
[data-theme=dark] :is(body,dialog){color:#e8edf8}
[data-theme=dark] body::before{opacity:.14}
[data-theme=dark] :is(.card,.tabs,.sel,.cert,.pc,#drawer,#quote,input,select,textarea,option){background:#101b36}
[data-theme=dark] :is(input,select,textarea,option){color:#e8edf8;caret-color:#e8edf8}
[data-theme=dark] .pdg:not(.product-photo-stage){background:#eef2f9;box-shadow:0 40px 90px #0006}
[data-theme=dark] .btn.ghost{color:#e8edf8;box-shadow:inset 0 0 0 1.5px #e8edf8}
[data-theme=dark] .btn.ghost:hover{background:#e8edf8;color:#0c1a3a}
[data-theme=dark] .tag{background:#12382a;color:#6fdca3}
[data-theme=dark] :is(.card,.pc):hover{box-shadow:0 22px 46px #0007}
[data-theme=dark] .leaflet-tile-pane{filter:invert(.92) hue-rotate(180deg) brightness(.95)}

/* Arabic */
:lang(ar) body{font-family:"IBM Plex Sans Arabic","IBM Plex Sans",system-ui,sans-serif}
:lang(ar) :is(h1,h2,h3,.h1,.out b,.stats b,.vc span,.tline){font-family:"IBM Plex Sans Arabic","Archivo",sans-serif;font-stretch:100%;font-weight:700;letter-spacing:0;line-height:1.3}
:lang(ar) .hero .h1 .ln{padding-block:.08em}
[dir=rtl] :is(a[href^=tel],a[href^=mailto]){direction:ltr;unicode-bidi:isolate;display:inline-block}
[dir=rtl] .back:hover{transform:translateX(4px)}
[dir=rtl] .bk{direction:ltr}   /* the PDF books themselves are English */
[dir=rtl] .steps::before,[dir=rtl] .steps::after{inset-inline-start:11px}
