/* مدار — نظام التصميم: الألوان والخطوط والأساسيات */
:root {
  --font-body: 'IBM Plex Sans Arabic', system-ui, 'Segoe UI', Tahoma, sans-serif;
  --font-head: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --r-s: 8px; --r-m: 12px; --r-l: 18px; --r-xl: 26px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --side: 276px; --top: 66px; --max: 1240px;
  --fs: 1rem;
}
:root, :root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #050914; --bg2: #090f1f; --surface: #0e1628; --surface2: #131d34; --surface3: #1a2744;
  --line: rgba(148, 170, 224, .14); --line2: rgba(148, 170, 224, .28);
  --ink: #eaf0ff; --ink2: #a9b8d8; --ink3: #7385a6;
  --brand: #2cc4f4; --brand-d: #129ccb; --brand-ink: #03121e; --brand2: #7b8cff; --gold: #f2c46d;
  --ok: #34d399; --warn: #fbbf24; --bad: #fb7185; --info: #60a5fa;
  --ok-bg: rgba(52, 211, 153, .12); --warn-bg: rgba(251, 191, 36, .12); --bad-bg: rgba(251, 113, 133, .13); --info-bg: rgba(96, 165, 250, .13); --brand-bg: rgba(44, 196, 244, .12); --gold-bg: rgba(242, 196, 109, .13);
  --shadow: 0 1px 0 rgba(255, 255, 255, .045) inset, 0 18px 40px -22px rgba(0, 0, 0, .75);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .85), 0 0 0 1px var(--line);
  --glow: 0 0 0 1px rgba(44, 196, 244, .3), 0 12px 44px -12px rgba(44, 196, 244, .45);
  --side-bg: linear-gradient(180deg, #07101f, #050a15); --side-ink: #c5d2ee;
  --glass: rgba(14, 22, 40, .72);
  --mesh: radial-gradient(900px 520px at 85% -8%, rgba(44, 196, 244, .16), transparent 60%), radial-gradient(760px 520px at 0% 105%, rgba(123, 140, 255, .14), transparent 60%);
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #eef3fa; --bg2: #e6edf7; --surface: #ffffff; --surface2: #f5f8fd; --surface3: #ebf1fa;
  --line: rgba(15, 32, 74, .1); --line2: rgba(15, 32, 74, .22);
  --ink: #0a1530; --ink2: #3d4d70; --ink3: #687898;
  --brand: #0a8dc2; --brand-d: #07739f; --brand-ink: #ffffff; --brand2: #4a5fe0; --gold: #a97514;
  --ok: #0c9468; --warn: #a96a05; --bad: #cf2f4b; --info: #2158d6;
  --ok-bg: rgba(12, 148, 104, .1); --warn-bg: rgba(217, 140, 10, .12); --bad-bg: rgba(207, 47, 75, .09); --info-bg: rgba(33, 88, 214, .09); --brand-bg: rgba(10, 141, 194, .1); --gold-bg: rgba(169, 117, 20, .11);
  --shadow: 0 1px 2px rgba(15, 32, 74, .05), 0 14px 34px -20px rgba(15, 32, 74, .28);
  --shadow-lg: 0 30px 70px -28px rgba(15, 32, 74, .38), 0 0 0 1px var(--line);
  --glow: 0 0 0 1px rgba(10, 141, 194, .35), 0 12px 36px -14px rgba(10, 141, 194, .4);
  --side-bg: linear-gradient(180deg, #0b1830, #070f20); --side-ink: #c5d2ee;
  --glass: rgba(255, 255, 255, .78);
  --mesh: radial-gradient(900px 520px at 85% -8%, rgba(10, 141, 194, .12), transparent 60%), radial-gradient(760px 520px at 0% 105%, rgba(74, 95, 224, .09), transparent 60%);
}
:root[data-text='lg'] { --fs: 1.14rem; }
:root[data-contrast='high'] { --line: rgba(148, 170, 224, .5); --ink2: var(--ink); --ink3: var(--ink2); }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-motion='off'] { scroll-behavior: auto; }
html[data-motion='off'] *, html[data-motion='off'] *::before, html[data-motion='off'] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
body {
  margin: 0; min-height: 100vh; font: 400 calc(var(--fs) * .97)/1.75 var(--font-body); color: var(--ink);
  background: var(--bg); background-image: var(--mesh); background-attachment: fixed; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; font-feature-settings: 'tnum' 1;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.4; margin: 0; font-weight: 700; letter-spacing: -.005em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); } h2 { font-size: 1.2rem; } h3 { font-size: 1.03rem; } h4 { font-size: .95rem; }
p { margin: 0; } a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; } button, input, select, textarea { font: inherit; color: inherit; }
code, kbd, pre, .mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: plaintext; }
code { background: var(--surface3); padding: .08em .4em; border-radius: 6px; font-size: .88em; }
pre { background: var(--surface2); border: 1px solid var(--line); padding: 14px; border-radius: var(--r-m); overflow: auto; margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
::selection { background: color-mix(in srgb, var(--brand) 38%, transparent); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.skip { position: fixed; inset-block-start: -60px; inset-inline-start: 12px; z-index: 999; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 10px; transition: inset-block-start .2s; }
.skip:focus { inset-block-start: 10px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-track { background: transparent; }
.ltr { direction: ltr; unicode-bidi: isolate; } .num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--ink2); } .faint { color: var(--ink3); } .sm { font-size: .86rem; } .xs { font-size: .78rem; } .b { font-weight: 600; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide { display: none !important; }

/* شاشة الإقلاع */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 20px; }
.boot img { border-radius: 22px; background: #fff; padding: 6px; box-shadow: var(--glow); animation: pulse 1.6s ease-in-out infinite; }
.boot-bar { width: 120px; height: 3px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.boot-bar::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: -40%; width: 40%; background: linear-gradient(90deg, transparent, var(--brand), transparent); animation: slide 1.1s linear infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } } @keyframes slide { to { inset-inline-start: 100%; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } } @keyframes shimmer { to { background-position: -200% 0; } }
