/* tonyhelmy.com v3 "Signal Room": global site CSS for every page (EN + AR).
   Header E, footer, blog index, archive, post, search. Uses logical properties so dir="rtl" mirrors automatically.
   In WordPress: load once site-wide (child theme or Elementor Custom Code), after the theme tokens. */
:root {
  --sr-bg: #fbfcff; --sr-bg-2: #f1f5fd; --sr-bg-3: #e6edfb;
  --sr-line: rgb(15 40 90 / .10); --sr-line-2: rgb(15 40 90 / .18);
  --sr-text: #0b1830; --sr-muted: #4a5876; --sr-dim: #8a96b0;
  --sr-blue: var(--brand-seed, #1565ff); --sr-cyan: #0a86b8; --sr-leak: #d4373a; --sr-ok: #138a54;
  --sr-grad: linear-gradient(100deg, var(--sr-blue), var(--brand-tertiary, #00c2e0));
  --sr-display: "Space Grotesk", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --sr-mono: "JetBrains Mono", "IBM Plex Sans Arabic", ui-monospace, Consolas, monospace;
  --sr-ease: cubic-bezier(.05,.7,.1,1);
  --hd-h: 68px;
}
.dark { --sr-bg: #050a18; --sr-bg-2: #0a1226; --sr-line: rgb(148 170 220 / .14); --sr-line-2: rgb(148 170 220 / .26); --sr-text: #e8eefc; --sr-muted: #93a2c3; --sr-cyan: var(--brand-tertiary, #00c2e0); background: var(--sr-bg); color: var(--sr-text); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hd-h) + 24px); overflow-x: clip; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sr-bg); color: var(--sr-text); font: 400 1.0625rem/1.65 var(--sr-display); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--sr-cyan); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 32px, 1240px); margin-inline: auto; }
.label { display: inline-flex; align-items: center; gap: 10px; font: 600 .78rem/1 var(--sr-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sr-cyan); text-decoration: none; }
.label::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.grad { background: var(--sr-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; top: -80px; inset-inline-start: 8px; z-index: 300; padding: 10px 14px; border-radius: 8px; background: #fff; color: #000; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: 600 .95rem/1 var(--sr-display); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .25s var(--sr-ease), box-shadow .25s, background .25s, border-color .25s; }
.btn--primary { background: var(--sr-blue); color: #fff !important; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px -10px rgb(21 101 255 / .6); }
.btn--ghost { border-color: var(--sr-line-2); color: var(--sr-text); background: transparent; }
.btn--ghost:hover { border-color: var(--sr-cyan); }
.btn__k { display: grid; place-items: center; width: 24px; height: 24px; margin-inline-end: -10px; border-radius: 50%; background: #fff; color: var(--sr-blue); font-size: .8rem; }

/* ===== Header E ===== */
.hd { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--sr-line); }
.hd__in { display: flex; align-items: center; gap: 18px; min-height: var(--hd-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; min-height: 44px; text-decoration: none; font: 600 1.05rem/1 var(--sr-mono); direction: ltr; }
.logo b { color: var(--sr-cyan); font-weight: 600; }
.logo i { width: 10px; height: 10px; border-radius: 50%; background: var(--sr-ok); box-shadow: 0 0 0 4px rgb(19 138 84 / .15); }
.crumb { display: flex; align-items: center; min-width: 0; padding-inline-start: 18px; border-inline-start: 1px solid var(--sr-line-2); font: 400 .84rem/1 var(--sr-mono); color: var(--sr-muted); white-space: nowrap; }
.crumb ol { display: flex; align-items: center; min-width: 0; margin: 0; padding: 0; list-style: none; }
.crumb li { display: flex; align-items: center; flex: none; }
.crumb li:last-child { flex: 0 1 auto; min-width: 10ch; }
.crumb li + li::before { content: "/"; padding: 0 4px; color: var(--sr-dim); }
.crumb a { color: var(--sr-muted); text-decoration: none; padding: 6px 2px; } .crumb a:hover { color: var(--sr-blue); }
.crumb [aria-current] { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--sr-cyan); font-weight: 600; max-width: 26ch; }
.crumb__left { flex: none; margin-inline-start: 10px; padding: 4px 8px; border-radius: 99px; background: var(--sr-bg-3); color: var(--sr-text); font-size: .74rem; opacity: 0; transition: opacity .3s; }
.hd.is-reading .crumb__left { opacity: 1; }
.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; counter-reset: n; }
.nav > a:not(.lang):not(.nav__cta), .dd > a { counter-increment: n; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--sr-muted); text-decoration: none; font: 500 .8rem/1 var(--sr-mono); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; transition: color .2s, background .2s; }
.nav > a:not(.lang):not(.nav__cta)::before, .dd > a::before { content: "0" counter(n) "\00a0"; color: var(--sr-cyan); }
.nav > a:not(.lang):not(.nav__cta):hover, .dd > a:hover { color: var(--sr-text); background: var(--sr-bg-3); }
.nav > a[aria-current], .dd > a[aria-current], .nav > a.is-on { background: var(--sr-text); color: #fff; }
.nav > a[aria-current]::before, .dd > a[aria-current]::before, .nav > a.is-on::before { color: #7fe3ff; }
.dd { position: relative; display: flex; align-items: center; }
.dd__btn { display: grid; place-items: center; width: 28px; height: 40px; margin-inline-start: -4px; border: 0; border-radius: 8px; background: none; color: var(--sr-muted); cursor: pointer; }
.dd__btn:hover { background: var(--sr-bg-3); }
.dd__btn svg { width: 12px; height: 12px; transition: transform .25s; } .dd.is-open .dd__btn svg { transform: rotate(180deg); }
.dd__panel { position: absolute; top: calc(100% + 14px); left: 50%; translate: -50% 0; width: min(640px, 90vw); display: grid; grid-template-columns: 1fr 1.3fr; border: 1px solid var(--sr-line-2); border-radius: 20px; background: #fff; box-shadow: 0 30px 70px -30px rgb(20 50 120 / .45); overflow: hidden; }
.dd__panel[hidden] { display: none; }
.dd__pillar { display: flex; flex-direction: column; gap: 10px; padding: 22px; text-decoration: none; }
.dd__pillar small { font: 600 .7rem/1 var(--sr-mono); letter-spacing: .12em; text-transform: uppercase; color: #7fe3ff; }
.dd__pillar b { font: 600 1.2rem/1.2 var(--sr-display); }
.dd__pillar span { color: var(--sr-muted); font-size: .88rem; line-height: 1.5; }
.dd__pillar em { margin-top: auto; font: 600 .82rem/1 var(--sr-mono); font-style: normal; color: #7fe3ff; }
.dd__cats { margin: 0; padding: 10px; list-style: none; }
.dd__cats a { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; }
.dd__cats a:hover, .dd__cats a:focus-visible { background: var(--sr-bg-2); }
.dd__cats a[aria-current] b { color: var(--sr-blue); }
.dd__cats i { grid-row: span 2; font: 600 .72rem/1.6 var(--sr-mono); font-style: normal; color: var(--sr-cyan); }
.dd__cats b { font-weight: 600; font-size: .95rem; } .dd__cats span { color: var(--sr-muted); font-size: .8rem; }
.dd__cats li:last-child a { margin-top: 6px; border-top: 1px dashed var(--sr-line-2); border-radius: 0 0 12px 12px; color: var(--sr-blue); font: 600 .82rem/1.4 var(--sr-mono); grid-template-columns: 1fr; }
.lang { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--sr-line-2); border-radius: 50%; text-decoration: none; font: 600 .95rem/1 var(--sr-display); color: var(--sr-muted); }
.lang:hover { border-color: var(--sr-blue); color: var(--sr-blue); }
.lang__t { display: none; }
.hd .btn { min-height: 42px; font-size: .9rem; }
.progress { position: absolute; inset-inline: 0; bottom: -1px; height: 2px; }
.progress span { display: block; height: 100%; background: var(--sr-grad); transform-origin: left; transform: scaleX(var(--p, 0)); }
.menu-btn { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--sr-line-2); border-radius: 10px; background: #fff; color: var(--sr-text); font: 600 .82rem/1 var(--sr-mono); cursor: pointer; }
.menu-btn i { position: relative; width: 14px; height: 2px; background: currentColor; transition: background .2s; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; width: 14px; height: 2px; background: currentColor; transition: transform .25s; }
.menu-btn i::before { top: -5px; } .menu-btn i::after { top: 5px; }
.menu-btn[aria-expanded="true"] i { background: transparent; }
.menu-btn[aria-expanded="true"] i::before { transform: translateY(5px) rotate(45deg); } .menu-btn[aria-expanded="true"] i::after { transform: translateY(-5px) rotate(-45deg); }
.crumb-m { display: none; padding: 10px 0; border-bottom: 1px solid var(--sr-line); background: var(--sr-bg); }
.crumb-m .crumb { padding: 0; border: 0; overflow-x: auto; scrollbar-width: none; }
.crumb-m .crumb::-webkit-scrollbar { display: none; }
.crumb-m .crumb li, .crumb-m .crumb li:last-child { flex: none; min-width: 0; }
.crumb-m .crumb [aria-current] { max-width: none; }
.crumb-m .crumb a, .crumb-m .crumb [aria-current] { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; }
@media (max-width: 1180px) { .crumb [aria-current] { max-width: 12ch; } }
@media (max-width: 1060px) { .hd .crumb { display: none; } .crumb-m { display: block; } }
@media (max-width: 899px) {
  :root { --hd-h: 60px; }
  .menu-btn { display: inline-flex; margin-inline-start: auto; }
  .hd .hd__cta { display: none; }
  .nav { position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 4px 16px 20px; background: #fff; border-bottom: 1px solid var(--sr-line); box-shadow: 0 30px 40px -30px rgb(20 50 120 / .35); max-height: calc(100dvh - var(--hd-h)); overflow-y: auto; overscroll-behavior: contain; }
  .nav[hidden] { display: none; }
  .nav > a:not(.lang):not(.nav__cta), .dd > a { min-height: 52px; padding: 0 4px; border-bottom: 1px solid var(--sr-line); border-radius: 0; font-size: .9rem; }
  .nav > a[aria-current], .dd > a[aria-current], .nav > a.is-on { background: none; color: var(--sr-text); }
  .nav > a[aria-current]::before, .dd > a[aria-current]::before, .nav > a.is-on::before { color: var(--sr-cyan); }
  .nav > a[aria-current]::after, .dd > a[aria-current]::after { content: "you are here"; margin-inline-start: auto; font-size: .68rem; color: var(--sr-cyan); text-transform: none; letter-spacing: 0; }
  .dd { flex-wrap: wrap; } .dd > a { flex: 1; }
  .dd__btn { width: 52px; height: 52px; margin: 0; border-bottom: 1px solid var(--sr-line); border-radius: 0; }
  .dd__panel { position: static; translate: none; width: 100%; grid-template-columns: 1fr; border: 0; border-radius: 0; box-shadow: none; }
  .dd__pillar { margin: 12px 0 4px; border-radius: 14px; }
  .dd__cats { padding: 4px 0; }
  .lang { justify-content: start; gap: 10px; width: auto; height: 52px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--sr-line); border-radius: 0; font-size: 1.05rem; }
  .lang__t { display: inline; font: 500 .8rem/1 var(--sr-mono); color: var(--sr-muted); }
  .nav .nav__cta { display: inline-flex; margin-top: 16px; min-height: 52px; }
  body.menu-open { overflow: hidden; }
}
@media (min-width: 900px) { .nav[hidden] { display: flex; } .nav .nav__cta { display: none; } }

/* ===== shared blog components ===== */
.pghead { padding-block: 56px 36px; background: radial-gradient(50% 90% at 85% 0%, rgb(21 101 255 / .10), transparent 70%); }
.pghead h1 { margin: 18px 0 14px; max-width: 20ch; font: 600 clamp(2.1rem, 1.3rem + 2.8vw, 3.6rem)/1.06 var(--sr-display); letter-spacing: -.035em; overflow-wrap: anywhere; }
.pghead .dek { margin: 0; max-width: 60ch; color: var(--sr-muted); font-size: 1.12rem; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.facts li { padding: 7px 12px; border: 1px solid var(--sr-line-2); border-radius: 99px; background: #fff; font: 400 .78rem/1 var(--sr-mono); color: var(--sr-muted); }
.facts b { color: var(--sr-text); font-weight: 600; }
.topics { position: relative; border-block: 1px solid var(--sr-line); background: #fff; }
.topics ul { display: flex; gap: 8px; margin: 0; padding: 12px 0; list-style: none; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.topics ul::-webkit-scrollbar { display: none; }
.topics li { flex: none; scroll-snap-align: start; }
.topics a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--sr-line-2); border-radius: 99px; text-decoration: none; font: 500 .86rem/1 var(--sr-display); white-space: nowrap; transition: border-color .2s, background .2s; }
.topics a i { font: 600 .76rem/1 var(--sr-mono); font-style: normal; color: var(--sr-cyan); }
.topics a small { font: 400 .78rem/1 var(--sr-mono); color: var(--sr-muted); }
.topics a:hover { border-color: var(--sr-blue); }
.topics a[aria-current] { border-color: var(--sr-text); background: var(--sr-text); color: #fff; } .topics a[aria-current] i, .topics a[aria-current] small { color: #7fe3ff; }
@media (max-width: 899px) { .topics::after { content: ""; position: absolute; top: 1px; bottom: 1px; inset-inline-end: 0; width: 32px; background: linear-gradient(90deg, transparent, #fff); pointer-events: none; } }
.pcard { position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 22px 22px 18px; border: 1px solid var(--sr-line); border-radius: 18px; background: #fff; transition: border-color .25s, box-shadow .25s, transform .25s var(--sr-ease); }
.pcard:hover { border-color: rgb(21 101 255 / .35); box-shadow: 0 18px 44px -26px rgb(20 70 160 / .45); transform: translateY(-2px); }
.pcard__cat { font: 400 .78rem/1.3 var(--sr-mono); color: var(--sr-cyan); }
.pcard h3, .pcard h2 { margin: 0; font: 600 1.15rem/1.3 var(--sr-display); letter-spacing: -.01em; }
.pcard h3 a, .pcard h2 a { text-decoration: none; }
.pcard h3 a::after, .pcard h2 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pcard p { margin: 0; color: var(--sr-muted); font-size: .95rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--sr-line-2); font: 400 .76rem/1.3 var(--sr-mono); color: var(--sr-muted); }
.pcard__meta b { color: var(--sr-blue); font-weight: 600; }
.pcard__d { display: block; }
.start { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 32px; border-radius: 24px; }
@media (max-width: 899px) { .start { grid-template-columns: 1fr; gap: 20px; padding: 24px 20px; } }
.start h2 { margin: 12px 0 10px; font: 600 clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem)/1.1 var(--sr-display); letter-spacing: -.03em; }
.start p { margin: 0 0 20px; color: var(--sr-muted); }
.start ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--sr-line); }
.start li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--sr-line); font: 400 .88rem/1.3 var(--sr-mono); }
.start li::before { content: "✓"; color: #3ddc97; }
.band { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px 30px; border-radius: 22px; }
.band__t { margin: 10px 0 4px; font: 600 clamp(1.3rem, 1.1rem + .8vw, 1.7rem)/1.2 var(--sr-display); }
.band__d { margin: 0; color: var(--sr-muted); max-width: 52ch; }
@media (max-width: 599px) { .band { padding: 22px 20px; } .band .btn { width: 100%; } }
.sec { padding-block: 48px; }
.sec-title { margin: 0 0 18px; font: 600 .76rem/1 var(--sr-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sr-muted); }

/* ===== blog index: topic groups ===== */
.grp { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; padding-block: 32px; border-top: 1px solid var(--sr-line); }
.grp__no { font: 600 .78rem/1 var(--sr-mono); color: var(--sr-cyan); }
.grp__head h2 { margin: 10px 0 8px; font: 600 1.45rem/1.15 var(--sr-display); letter-spacing: -.02em; }
.grp__head h2 a { display: inline-block; padding-block: 6px; text-decoration: none; } .grp__head h2 a:hover { color: var(--sr-blue); }
.grp__head p { margin: 0 0 14px; color: var(--sr-muted); font-size: .95rem; }
.grp__all { display: inline-flex; align-items: center; min-height: 40px; font: 600 .82rem/1 var(--sr-mono); color: var(--sr-blue); text-decoration: none; }
.grp__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 999px) { .grp { grid-template-columns: 1fr; gap: 16px; } }
@media (max-width: 699px) { .grp__list { grid-template-columns: 1fr; } .grp { padding-block: 26px; } }

/* ===== archive (category / search / tag / date) ===== */
.list { display: grid; gap: 12px; }
.list .pcard { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 20px; row-gap: 8px; align-items: start; padding: 24px; }
.list .pcard__no { grid-row: span 2; font: 600 1.6rem/1 var(--sr-display); color: var(--sr-dim); letter-spacing: -.04em; }
.list .pcard h2 { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); }
.list .pcard p { grid-column: 2; -webkit-line-clamp: 2; }
.list .pcard__meta { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; justify-content: space-between; height: 100%; margin: 0; padding: 0; padding-inline-start: 20px; border: 0; border-inline-start: 1px dashed var(--sr-line-2); text-align: end; white-space: nowrap; }
@media (max-width: 699px) {
  .list .pcard { grid-template-columns: 1fr; padding: 20px; }
  .list .pcard__no { grid-row: auto; font-size: .9rem; font-family: var(--sr-mono); }
  .list .pcard p { grid-column: auto; }
  .pcard__d { display: inline; } .pcard__d::before { content: " · "; }
  .list .pcard__meta { grid-column: auto; grid-row: auto; flex-direction: row; align-items: center; padding: 12px 0 0; border: 0; border-top: 1px dashed var(--sr-line-2); text-align: start; }
}
.mini { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 18px 20px; border: 1px dashed var(--sr-line-2); border-radius: 18px; text-decoration: none; }
.mini i { font: 600 .76rem/1 var(--sr-mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--sr-cyan); white-space: nowrap; }
.mini b { flex: 1; font-weight: 600; } .mini em { font-style: normal; color: var(--sr-blue); font-family: var(--sr-mono); }
@media (max-width: 599px) { .mini { flex-wrap: wrap; gap: 6px 12px; } .mini b { flex-basis: 100%; order: 2; } .mini em { order: 3; } }
.others { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 899px) { .others { grid-template-columns: 1fr 1fr; } }
@media (max-width: 499px) { .others { grid-template-columns: 1fr; } }
.others a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border: 1px solid var(--sr-line); border-radius: 16px; background: #fff; text-decoration: none; transition: border-color .2s; }
.others a:hover { border-color: var(--sr-blue); }
.others i { font: 600 .76rem/1 var(--sr-mono); font-style: normal; color: var(--sr-cyan); } .others b { font-weight: 600; } .others span { color: var(--sr-muted); font-size: .85rem; }
.empty { padding: 40px 28px; border: 1px dashed var(--sr-line-2); border-radius: 20px; text-align: center; }
.empty__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sr-bg-3); font: 600 1.3rem/1 var(--sr-mono); color: var(--sr-cyan); }
.empty h2 { margin: 16px 0 8px; font: 600 1.4rem/1.2 var(--sr-display); } .empty p { margin: 0 auto 20px; max-width: 46ch; color: var(--sr-muted); }
.empty__acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sform { display: flex; gap: 8px; max-width: 560px; margin-top: 22px; }
.sform input { flex: 1; min-width: 0; min-height: 50px; padding: 0 16px; border: 1px solid var(--sr-line-2); border-radius: 12px; background: #fff; font: 400 1rem/1 var(--sr-display); color: var(--sr-text); }
.sform input:focus { outline: none; border-color: var(--sr-cyan); box-shadow: 0 0 0 4px rgb(0 194 224 / .15); }
@media (max-width: 499px) { .sform { flex-direction: column; } .sform .btn { width: 100%; } }

/* ===== single post ===== */
.phead { padding-block: 40px 30px; background: radial-gradient(50% 80% at 85% 0%, rgb(21 101 255 / .10), transparent 70%); }
.phead .label { min-height: 40px; }
.phead h1 { margin: 18px 0 16px; max-width: 22ch; font: 600 clamp(1.9rem, 1.2rem + 2.8vw, 3.6rem)/1.08 var(--sr-display); letter-spacing: -.035em; }
.phead .dek { margin: 0; max-width: 62ch; color: var(--sr-muted); font-size: 1.12rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 24px; font: 400 .8rem/1.4 var(--sr-mono); color: var(--sr-muted); }
.meta .av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #7fe3ff, var(--sr-blue) 60%, #0a3cc2); }
.meta .av svg { width: 20px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.meta b { color: var(--sr-text); font-weight: 600; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; padding-block: 24px 72px; border-top: 1px solid var(--sr-line); }
@media (max-width: 999px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; } }
.toc { position: sticky; top: calc(var(--hd-h) + 28px); align-self: start; padding-top: 16px; }
.toc > p, .toc-m summary { margin: 0 0 12px; font: 600 .78rem/1 var(--sr-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sr-muted); }
.toc ol, .toc-m ol { margin: 0; padding: 0; list-style: none; counter-reset: t; border-inline-start: 1px solid var(--sr-line-2); }
.toc ol a, .toc-m ol a { counter-increment: t; position: relative; display: grid; grid-template-columns: 26px 1fr; padding-block: 7px; padding-inline: 14px 0; color: var(--sr-muted); text-decoration: none; font-size: .86rem; line-height: 1.4; }
.toc ol a::before, .toc-m ol a::before { content: counter(t, decimal-leading-zero); font: 600 .7rem/1.9 var(--sr-mono); color: var(--sr-dim); }
.toc ol a:hover { color: var(--sr-text); }
.toc ol a.is-on, .toc-m ol a.is-on { color: var(--sr-text); font-weight: 600; } .toc ol a.is-on::before, .toc-m ol a.is-on::before { color: var(--sr-cyan); }
.toc ol a.is-on::after, .toc-m ol a.is-on::after { content: ""; position: absolute; inset-inline-start: -1px; top: 6px; bottom: 6px; width: 2px; background: var(--sr-grad); }
.toc__cta { display: block; margin-top: 22px; padding: 16px; border: 1px dashed var(--sr-line-2); border-radius: 14px; text-decoration: none; font-size: .86rem; color: var(--sr-muted); }
.toc__cta b { display: block; margin-bottom: 4px; color: var(--sr-blue); font-size: .92rem; }
.toc-m { display: none; margin: 4px 0 8px; border: 1px solid var(--sr-line-2); border-radius: 16px; background: #fff; }
.toc-m summary { display: flex; justify-content: space-between; align-items: center; min-height: 52px; margin: 0; padding: 0 18px; cursor: pointer; list-style: none; }
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary::after { content: "+"; font-size: 1.2rem; color: var(--sr-cyan); transition: transform .25s; }
.toc-m[open] summary::after { transform: rotate(45deg); }
.toc-m ol { margin: 0 18px 16px; }
.toc-m ol a { min-height: 40px; align-items: center; }
@media (max-width: 999px) { .toc { display: none; } .toc-m { display: block; } }
.prose { min-width: 0; max-width: 72ch; padding-top: 12px; color: #26324d; font-size: 1.09rem; line-height: 1.75; overflow-wrap: break-word; }
@media (max-width: 599px) { .prose { font-size: 1.03rem; line-height: 1.72; } }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.2em 0 .6em; color: var(--sr-text); font: 600 clamp(1.4rem, 1.15rem + .9vw, 1.95rem)/1.2 var(--sr-display); letter-spacing: -.025em; }
.prose h3 { margin: 1.8em 0 .5em; color: var(--sr-text); font: 600 1.2rem/1.3 var(--sr-display); }
.prose a { color: var(--sr-blue); text-underline-offset: 3px; }
.prose code { padding: .12em .4em; border-radius: 6px; background: var(--sr-bg-3); font: 400 .86em/1.5 var(--sr-mono); color: #0b3a8c; overflow-wrap: anywhere; }
.prose pre { max-width: 100%; overflow-x: auto; padding: 18px 20px; border-radius: 16px; background: #050a18; color: #e8eefc; font: 400 .84rem/1.65 var(--sr-mono); -webkit-overflow-scrolling: touch; }
@media (max-width: 599px) { .prose pre { margin-inline: -16px; border-radius: 0; padding: 16px; font-size: .8rem; } }
.prose pre code { padding: 0; background: none; color: inherit; overflow-wrap: normal; font-size: inherit; }
.prose ul, .prose ol { padding-inline-start: 1.3em; } .prose li { margin: .35em 0; } .prose li::marker { color: var(--sr-cyan); }
.prose figure { margin: 1.6em 0; max-width: 100%; overflow-x: auto; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .92rem; }
.prose > table { display: block; overflow-x: auto; min-width: 0; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--sr-line); text-align: start; vertical-align: top; }
.prose th { font: 600 .76rem/1.4 var(--sr-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--sr-muted); }
.prose blockquote { margin: 1.6em 0; padding-block: 4px; padding-inline: 20px 0; border-inline-start: 3px solid var(--sr-cyan); color: var(--sr-muted); }
.prose .pcta .btn--primary { text-decoration: none; }
.pcta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 2.2em 0; padding: 24px 26px; border-radius: 20px; }
.pcta__t { margin: 10px 0 4px; font: 600 1.25rem/1.25 var(--sr-display); color: var(--sr-text); }
.pcta__d { margin: 0; color: var(--sr-muted); font-size: .95rem; line-height: 1.5; max-width: 46ch; }
@media (max-width: 599px) { .pcta { padding: 20px; } .pcta .btn { width: 100%; } }
.pend { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--sr-line); }
.prose .pend a { text-decoration: none; color: inherit; }
.pillar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 20px 22px; border: 1px solid var(--sr-line-2); border-radius: 18px; background: #fff; transition: border-color .25s, box-shadow .25s; }
.pillar:hover { border-color: var(--sr-blue); box-shadow: 0 16px 40px -22px rgb(20 70 160 / .4); }
.pillar i { font: 600 .76rem/1 var(--sr-mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--sr-cyan); }
.pillar b { display: block; font: 600 1.1rem/1.3 var(--sr-display); } .pillar span { color: var(--sr-muted); font-size: .88rem; line-height: 1.5; }
.pillar em { font: 600 1.2rem/1 var(--sr-mono); font-style: normal; color: var(--sr-blue); }
@media (max-width: 599px) { .pillar { grid-template-columns: 1fr auto; gap: 8px 12px; } .pillar > div:first-child { grid-column: 1 / -1; } }
.rel { margin-top: 28px; }
.rel h2 { margin: 0 0 14px !important; font: 600 .76rem/1 var(--sr-mono) !important; letter-spacing: .14em !important; text-transform: uppercase; color: var(--sr-muted) !important; }
.rel ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0 !important; list-style: none; }
.rel li { margin: 0 !important; }
@media (max-width: 699px) { .rel ul { grid-template-columns: 1fr; } }
.rel .pcard h3 { font-size: 1.02rem; }

/* ===== footer (compact) ===== */
.ft { padding-block: 40px 22px; background: radial-gradient(60% 140% at 100% 0%, rgb(21 101 255 / .3), transparent 70%), var(--sr-bg); }
.ft__row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.ft__big { margin: 0; font: 600 clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem)/1.05 var(--sr-display); letter-spacing: -.03em; }
.ft__act { display: flex; gap: 10px; flex-wrap: wrap; }
.ft__bottom { display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--sr-line); font: 400 .76rem/1.4 var(--sr-mono); color: var(--sr-muted); }
.ft__bottom a { display: inline-flex; align-items: center; min-height: 40px; color: var(--sr-muted); text-decoration: none; } .ft__bottom a:hover { color: var(--sr-cyan); }
.ft__bottom nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
@media (max-width: 599px) { .ft__act, .ft__act .btn { width: 100%; } .ft__bottom { flex-direction: column; } }
.concept-tag { position: fixed; bottom: 16px; inset-inline-end: 16px; z-index: 200; padding: 8px 14px; border-radius: 99px; background: #0b1830; color: #fff; font: 600 12px/1 var(--sr-mono); }
@media (max-width: 599px) { .concept-tag { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ======================= Arabic / RTL =======================
   Latin words keep Space Grotesk / JetBrains Mono; Arabic glyphs fall back to IBM Plex Sans Arabic (font stacks above).
   Arabic never gets letter-spacing or uppercase transforms (they break letter joining). */
[dir="rtl"] body { line-height: 1.85; }
[dir="rtl"] *, [dir="rtl"] *::before, [dir="rtl"] *::after { letter-spacing: 0 !important; }
[dir="rtl"] .label, [dir="rtl"] .nav > a, [dir="rtl"] .dd > a, [dir="rtl"] .sec-title, [dir="rtl"] .toc > p, [dir="rtl"] .toc-m summary, [dir="rtl"] .dd__pillar small, [dir="rtl"] .pillar i, [dir="rtl"] .mini i, [dir="rtl"] .prose th { text-transform: none; }
[dir="rtl"] .label, [dir="rtl"] .sec-title, [dir="rtl"] .toc > p, [dir="rtl"] .toc-m summary { font-size: .86rem; }
[dir="rtl"] .nav > a:not(.lang):not(.nav__cta), [dir="rtl"] .dd > a { font: 500 .92rem/1 var(--sr-display); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] .ft__big, [dir="rtl"] .band__t, [dir="rtl"] .pcta__t { line-height: 1.35 !important; }
[dir="rtl"] .pghead h1, [dir="rtl"] .phead h1 { max-width: 24ch; }
[dir="rtl"] .prose { line-height: 1.95; font-size: 1.1rem; }
[dir="rtl"] .progress span { transform-origin: right; }
[dir="rtl"] .menu-btn i::before, [dir="rtl"] .menu-btn i::after { left: auto; right: 0; }
@media (max-width: 899px) { [dir="rtl"] .topics::after { background: linear-gradient(270deg, transparent, #fff); } [dir="rtl"] .nav > a[aria-current]::after, [dir="rtl"] .dd > a[aria-current]::after { content: "أنت هنا"; font-size: .78rem; } }
/* code, URLs, phone numbers and the logo stay left-to-right inside Arabic text */
[dir="rtl"] .prose pre, [dir="rtl"] .prose pre code { direction: ltr; text-align: left; }
[dir="rtl"] .prose code { unicode-bidi: isolate; }
[dir="rtl"] .ltr, [dir="rtl"] input[type="url"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="email"] { direction: ltr; text-align: right; }
[dir="rtl"] .ltr { unicode-bidi: isolate; display: inline-block; }
