/* ============================================================
   Premium redesign — Graduation Project Tracker
   Light premium: glassmorphism, depth, ambient gradients
   ============================================================ */

:root {
  /* توكنز مشتركة مع لوحة التحكم (css/dashboard.css) — مصدر واحد للهوية */
  --ds-success: #10b981;
  --ds-warning: #f59e0b;
  --ds-danger: #e11d48;
  --ds-info: #0ea5e9;
  --ds-radius-sm: 8px;
  --ds-radius-md: 12px;
  --ds-radius-lg: 16px;
  --ds-radius-xl: 20px;

  /* ===== رمادي معماري =====
     رماديات باردة محايدة لا بيج دافئ، حبر شبه أسود، وأزرق إشاري واحد.
     البنية تأتي من شبكة ظاهرة وخطوط فاصلة، لا من ظلال ولا تدرّجات. */
  --paper: #fbfbfc;
  --paper-raised: #ffffff;
  --paper-sunk: #f4f4f5;
  --rule: #e4e4e7;
  --rule-strong: #d4d4d8;

  --ink: #09090b;
  --ink-soft: #3f3f46;
  /* غُمّق من ‎#71717a‎ (تباين ٤٫٦٧ يمرّ بالكاد) إلى ٦٫٢ — لأنه مستعمل
     عند ١١–١٢ بكسل في الوحدات والبيانات الثانوية */
  --ink-mute: #5c5c66;

  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --accent-soft: #eff6ff;

  --bg: var(--paper);

  /* التوكنز القديمة مستهلكة في بقية أقسام الصفحة — تُعاد توجيهها إلى
     درجات اللوحة الجديدة حتى تنتقل تلك الأقسام معنا بدل أن تتعارض،
     ريثما نعيد كتابتها قسماً قسماً. */
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --violet: #1e40af;
  --cyan: #60a5fa;

  /* ظلال محايدة ومنخفضة — الارتفاع يأتي من الحدّ لا من الضبابية */
  --shadow-soft: 0 1px 2px rgba(9,9,11,.04), 0 6px 16px -10px rgba(9,9,11,.10);
  --shadow-lift: 0 1px 2px rgba(9,9,11,.05), 0 12px 32px -14px rgba(9,9,11,.14);
  --shadow-glow: 0 0 0 1px rgba(9,9,11,.06);
  --ease-expo: cubic-bezier(.16,1,.3,1);

  /* عمود الشبكة — مصدر واحد يضبط الهيدر والهيرو معاً */
  --gutter: 24px;
  --maxw: 1200px;

  /* اللاتيني أولاً ثم العربي: الحرف اللاتيني يلتقط Inter Tight، والعربي
     يسقط إلى Almarai لأن Inter لا يملك حروفاً عربية. مكدّس واحد للغتين
     بلا حاجة إلى محدّدات اتجاه. */
  --font-display: "Inter Tight", "Almarai", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font: var(--font-body);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

::selection { background: rgba(15,118,110,.18); }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; border: 0; background: none; cursor: pointer; }
ul { list-style: none; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Paper surfaces ----------
   كانت زجاجاً مثلّجاً في ٢٩ موضعاً — صارت ورقاً بحدّ شعرة.
   الاسم باقٍ لأن بقية الأقسام تستعمله، والمادة تبدّلت. */
.glass {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-soft);
}
.glass-strong {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-lift);
}

/* ---------- Accent text ----------
   كان تدرّجاً ثلاثي الألوان على العنوان كله. صار لوناً مصمتاً على
   كلمة واحدة: الإشارة أقوى من الصراخ. */
.text-gradient {
  color: var(--accent);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

/* ---------- Hairline frame ----------
   كان حدّاً متدرّجاً يدور كل ٨ ثوانٍ بلا توقف. صار خطاً ساكناً. */
.gradient-border { position: relative; }
.gradient-border::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  border: 1px solid var(--rule);
  pointer-events: none;
}

/* ---------- Paper ground ----------
   كانت ثلاث بقع ضبابية ملوّنة وشبكة زرقاء. حُذفت.
   بقي الضجيج وحده — لا كأثر عابر بل كحُبيبات الورق نفسه. */
.mesh-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.noise-overlay {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* حافة سفلية تفصل الهيرو عن أول قسم — خط شعرة بدل تلاشٍ ملوّن */
.hero::after {
  content: "";
  position: absolute; inset-inline: 0; bottom: 0;
  height: 1px; background: var(--rule);
}

/* ---------- Skip link ----------
   مخفي حتى يستقبل التركيز، فيقفز مستخدم لوحة المفاتيح فوق الهيدر كله */
.skip-link {
  position: fixed; inset-inline-start: 50%; top: 10px; z-index: 200;
  transform: translate(50%, -160%);
  padding: 11px 20px; border-radius: 7px;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600;
  transition: transform .2s var(--ease-expo);
}
.skip-link:focus-visible { transform: translate(50%, 0); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  background: rgba(251, 251, 252, .72);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  animation: header-in .5s var(--ease-expo) .05s forwards;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
@keyframes header-in { to { opacity: 1; } }

/* في الأعلى الهيدر شبه شفاف بلا حدّ؛ عند التمرير يكتسب أرضية وحدّاً */
.site-header.scrolled {
  background: rgba(251, 251, 252, .88);
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 24px -16px rgba(9, 9, 11, .5);
}

.nav-bar {
  position: relative;
  max-width: var(--maxw); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding-inline: var(--gutter);
}
/* خطان يربطان الهيدر بشبكة الهيرو */
.nav-bar::before, .nav-bar::after {
  content: "";
  position: absolute; inset-block: 0;
  width: 1px; background: var(--rule);
  opacity: .7;
}
.nav-bar::before { inset-inline-start: var(--gutter); }
.nav-bar::after { inset-inline-end: var(--gutter); }

/* ---------- Brand ----------
   العلامة مبنية من استعارة المنتج نفسه: عقد على مسار تتقدّم.
   لا مربع أسود بأيقونة عامة. */
.brand {
  display: flex; align-items: center; gap: 11px;
  padding-inline-start: 20px;
  position: relative; z-index: 2;
}
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 9px;
  background: var(--paper-raised);
  color: var(--ink);
  transition: border-color .35s var(--ease-expo), background-color .35s ease;
}
.brand:hover .brand-mark { border-color: var(--ink); }
/* العقدة الأخيرة تمتلئ عند المرور — المسار يكتمل */
.brand-mark .node-last {
  fill: none; stroke: currentColor;
  transition: fill .35s var(--ease-expo);
}
.brand:hover .brand-mark .node-last { fill: var(--accent); stroke: var(--accent); }
.brand-mark .rail-fill {
  stroke-dasharray: 20; stroke-dashoffset: 8;
  transition: stroke-dashoffset .45s var(--ease-expo);
}
.brand:hover .brand-mark .rail-fill { stroke-dashoffset: 0; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 800; font-size: 17px; line-height: 1;
  letter-spacing: 0;
}
.brand-sub { display: none; }

/* ---------- Nav with sliding indicator ---------- */
.nav-wrap { position: relative; display: flex; align-items: center; }

.nav-links {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 2px;
}
.nav-links a {
  display: block;
  padding: 9px 15px;
  font-family: var(--font-display);
  font-size: 13.5px; font-weight: 700;
  color: var(--ink-mute);
  border-radius: 8px;
  transition: color .25s var(--ease-expo);
}
.nav-links a:hover,
.nav-links a[aria-current="true"] { color: var(--ink); }

/* حبّة واحدة تنزلق بين الروابط بدل أن تومض تحت كل واحد على حدة.
   موضعها وعرضها يضبطهما JS، والانتقال هنا. */
.nav-pill {
  position: absolute; z-index: 0;
  top: 50%; inset-inline-start: 0;
  height: 34px; width: 0;
  border-radius: 9px;
  background: var(--paper-sunk);
  transform: translateY(-50%);
  opacity: 0;
  transition:
    transform .38s var(--ease-expo),
    width .38s var(--ease-expo),
    opacity .25s ease;
  pointer-events: none;
}
.nav-wrap.pill-ready .nav-pill { opacity: 1; }

/* ---------- Actions ---------- */
.nav-actions {
  display: flex; align-items: center; gap: 10px;
  padding-inline-end: 20px;
  position: relative; z-index: 2;
}

/* مبدّل لغة مجزّأ: الخياران ظاهران معاً فيعرف الزائر ما سينتقل إليه،
   بدل زر واحد يخفي حالته الحالية */
.lang-switch {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 3px;
  border: 1px solid var(--rule); border-radius: 9px;
  background: var(--paper-sunk);
}
.lang-switch button {
  position: relative; z-index: 1;
  padding: 6px 11px;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700;
  color: var(--ink-mute);
  border-radius: 6px;
  transition: color .25s var(--ease-expo);
}
.lang-switch button[aria-pressed="true"] { color: var(--ink); }
.lang-thumb {
  position: absolute; z-index: 0;
  top: 3px; bottom: 3px; left: 0;
  border-radius: 6px;
  background: var(--paper-raised);
  box-shadow: 0 1px 2px rgba(9, 9, 11, .07);
  transition: transform .34s var(--ease-expo), width .34s var(--ease-expo);
}

/* زر الدخول: سهم ينزلق للأمام عند المرور */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 8px; font-weight: 600; font-size: 15px;
  padding: 13px 24px;
  font-family: var(--font-display);
  transition: background-color .25s var(--ease-expo), color .25s ease, border-color .25s ease;
}
.btn-primary { color: #fff; background: var(--accent); box-shadow: 0 10px 22px -14px rgba(37, 99, 235, .8); }
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-ghost { color: var(--ink); border: 1px solid var(--rule-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 8px; }

.btn .btn-arrow { transition: transform .32s var(--ease-expo); }
.btn:hover .btn-arrow { transform: translateX(-4px); }
[dir="ltr"] .btn:hover .btn-arrow { transform: translateX(4px); }

.menu-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 9px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  place-items: center; color: var(--ink);
  transition: border-color .2s ease;
}
.menu-toggle:hover { border-color: var(--ink); }

.mobile-menu { display: none; padding: 6px 20px 18px; }
.mobile-menu.open { display: block; animation: menu-in .22s var(--ease-expo); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
.mobile-menu a {
  display: block; padding: 13px 2px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600; color: var(--ink-soft);
  transition: color .2s ease;
}
.mobile-menu a:hover { color: var(--ink); }
.mobile-menu .btn { justify-content: center; width: 100%; margin-top: 14px; border-bottom: 0; }

/* رابط نصّي بسهم — بديل الزر الثانوي الزجاجي */
.btn-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color .2s ease, gap .2s var(--ease-expo);
}
.btn-link:hover { border-bottom-color: var(--ink); gap: 11px; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 6px;
  border: 1px solid var(--rule);
  background: transparent;
  place-items: center; color: var(--ink);
}

.mobile-menu {
  display: none;
  padding: 8px 20px 18px;
}
.mobile-menu.open { display: block; animation: menu-in .2s var(--ease-expo); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
.mobile-menu a {
  display: block; padding: 12px 2px;
  border-bottom: 1px solid var(--rule);
  font-size: 15px; font-weight: 500; color: var(--ink-soft);
}
.mobile-menu a:hover { color: var(--ink); }
.mobile-menu .btn { justify-content: center; width: 100%; margin-top: 14px; border-bottom: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 68px 0 0;
  overflow: hidden;
}

/* شبكة الأعمدة الظاهرة — هي خلفية الهيرو، لا تدرّج ولا بقع */
.hero-rules {
  position: absolute; inset: 0;
  max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid; grid-template-columns: repeat(6, 1fr);
  pointer-events: none;
}
.hero-rules span {
  border-inline-start: 1px solid var(--rule);
  transform: scaleY(0); transform-origin: top;
  animation: rule-draw .7s var(--ease-expo) forwards;
}
.hero-rules span:last-child { border-inline-end: 1px solid var(--rule); }
.hero-rules span:nth-child(1) { animation-delay: .05s; }
.hero-rules span:nth-child(2) { animation-delay: .1s; }
.hero-rules span:nth-child(3) { animation-delay: .15s; }
.hero-rules span:nth-child(4) { animation-delay: .2s; }
.hero-rules span:nth-child(5) { animation-delay: .25s; }
.hero-rules span:nth-child(6) { animation-delay: .3s; }
@keyframes rule-draw { to { transform: scaleY(1); } }

/* المحتوى ينطبق على الأعمدة الستة الظاهرة نفسها: النص أربعة والأرقام عمودان */
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 0; align-items: stretch;
  padding: 84px 0 64px;
  border-bottom: 1px solid var(--rule);
}

.hero-copy {
  grid-column: span 4;
  display: flex; flex-direction: column; align-items: flex-start; gap: 26px;
  padding-inline: 28px 32px;
}

/* عمود الأرقام يملأ ارتفاع العمود: عنوان في أعلاه والأرقام في قاعه */
.hero-figures {
  grid-column: span 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-inline: 28px;
}
.figures-label {
  margin-bottom: auto;
  font-size: 12px; font-weight: 600; color: var(--ink-mute);
}

/* شارة سطرية صغيرة بحدّ — لا حبّة ملوّنة ولا زجاج */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--paper-raised);
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* العربية خط متصل: التقارب صفر وارتفاع السطر ١٫٣ — التقارب السالب يسحق الحروف */
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 800; line-height: 1.32; letter-spacing: 0;
  max-width: 20ch;
}
.hero h1 .text-gradient { color: var(--accent); }

.hero-sub {
  max-width: 52ch;
  font-size: clamp(15px, 1.35vw, 17px);
  color: var(--ink-mute);
  line-height: 1.8;
}
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* ---------- الهيرو بملء الشاشة ----------
   كان بارتفاع محتواه، فيطلّ رقم القسم التالي «01» من أسفل الشاشة. صار بطول
   الشاشة (svh: بلا قفزة شريط العنوان في متصفّح الجوال)، والنصّ في منتصف
   المساحة، ومسار المشروع في قاعها. */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.hero > .container { flex: 1; display: flex; flex-direction: column; width: 100%; }
.hero-grid { flex: 1; align-content: center; }
.hero-copy { justify-content: center; }

/* ---------- خلفية الهيرو: مرسومة لا صورة ---------- */
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* وهج بلون الهوية خلف العنوان (أعلى اليمين في العربية)، وآخر أخفت في القاع */
.hero-glow {
  position: absolute; inset: -10% -5% 0;
  background:
    radial-gradient(42% 48% at 74% 30%, rgba(37, 99, 235, .13), transparent 70%),
    radial-gradient(30% 36% at 88% 18%, rgba(96, 165, 250, .14), transparent 72%),
    radial-gradient(38% 40% at 14% 92%, rgba(37, 99, 235, .06), transparent 70%);
  animation: glow-breathe 12s ease-in-out infinite alternate;
}
[dir="ltr"] .hero-glow { transform: scaleX(-1); }
@keyframes glow-breathe {
  from { opacity: .85; }
  to { opacity: 1; }
}

/* نقاط دقيقة تتلاشى نحو الحواف — ملمس يربط الأعمدة لا ضجيج فوقها */
.hero-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(9, 9, 11, .13) 1px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(70% 65% at 62% 42%, #000 20%, transparent 80%);
          mask-image: radial-gradient(70% 65% at 62% 42%, #000 20%, transparent 80%);
  opacity: .55;
}



/* الأعمدة والمحتوى فوق الخلفية */
.hero-rules { z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-glow { animation: none; }
}

.figure { padding: 15px 0; border-top: 1px solid var(--rule); }
.figure-num {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.figure-label { margin-top: 2px; font-size: 13px; color: var(--ink-mute); }

/* الانكشاف: صعود هادئ متدرّج بعد رسم الشبكة */
.ink-line { display: block; }
.ink-line > span { display: block; }
.stagger { opacity: 0; transform: translateY(12px); animation: rise .55s var(--ease-expo) forwards; }
.stagger.d1 { animation-delay: .34s; }
.stagger.d2 { animation-delay: .42s; }
.stagger.d3 { animation-delay: .5s; }
.stagger.d4 { animation-delay: .58s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ---------- Stage rail ----------
   شريط بعرض الصفحة يحمل مسار المشروع الحقيقي كما تعرّفه config/statuses.php */
.stage {
  position: relative; z-index: 2;
  padding: 32px 28px 46px;
  opacity: 0;
  animation: rise .6s var(--ease-expo) .66s forwards;
}

.stage-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 30px;
}
.stage-label { font-size: 12px; font-weight: 600; color: var(--ink-mute); }
.stage-project { font-family: var(--font-display); font-size: 14px; font-weight: 700; }

.rail { position: relative; }
/* المسار يبدأ وينتهي عند مركزَي العقدتين الأولى والأخيرة (١٢٫٥٪ من كل
   طرف)، فلا يتدلّى طرفٌ منه في الفراغ */
.rail-line {
  position: absolute; inset-inline: 12.5%; top: 11px; height: 1px;
  background: var(--rule);
}
/* الحركة الوحيدة ذات المعنى: المسار يرسم نفسه من البداية حتى المرحلة
   الحالية. الأنيميشن هنا ليس زينة — هو ما تقوله الصفحة أصلاً. */
.rail-line::before {
  content: "";
  position: absolute; inset-block: 0; inset-inline-start: 0;
  inline-size: var(--progress, 50%);
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right; /* RTL: يبدأ من اليمين حيث أول مرحلة */
  animation: rail-advance 1s var(--ease-expo) 1s forwards;
}
@keyframes rail-advance { to { transform: scaleX(1); } }

.rail-steps {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.step-node { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }

.node {
  inline-size: 23px; block-size: 23px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  color: transparent;
}
.node svg { inline-size: 12px; block-size: 12px; }

.step-node.done .node { background: var(--ink); border-color: var(--ink); color: #fff; }
.step-node.current .node {
  background: var(--paper-raised);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.step-node.current .node::after {
  content: ""; inline-size: 7px; block-size: 7px; border-radius: 50%;
  background: var(--accent);
}

.step-name { font-size: 13px; font-weight: 600; color: var(--ink-mute); }
.step-node.done .step-name { color: var(--ink-soft); }
.step-node.current .step-name { color: var(--ink); }
.step-meta { font-size: 11px; color: var(--ink-mute); }

/* كل عقدة تُضيء لحظة بلوغ الخط إياها — التوقيتات محسوبة على مراكز
   الأعمدة الأربعة (١٢٫٥٪ · ٣٧٫٥٪ · ٦٢٫٥٪) لا مختارة عشوائياً */
.step-node .node,
.step-node .step-name,
.step-node .step-meta { opacity: 0; animation: node-in .45s var(--ease-expo) forwards; }
.step-node .node { transform: scale(.72); }

.step-node:nth-child(1) .node,
.step-node:nth-child(1) .step-name,
.step-node:nth-child(1) .step-meta { animation-delay: 1.05s; }
.step-node:nth-child(2) .node,
.step-node:nth-child(2) .step-name,
.step-node:nth-child(2) .step-meta { animation-delay: 1.4s; }
.step-node:nth-child(3) .node,
.step-node:nth-child(3) .step-name,
.step-node:nth-child(3) .step-meta { animation-delay: 1.75s; }
.step-node:nth-child(4) .node,
.step-node:nth-child(4) .step-name,
.step-node:nth-child(4) .step-meta { animation-delay: 1.95s; }

@keyframes node-in { to { opacity: 1; transform: scale(1); } }

/* العقدة النشطة وحدها تنبض بهدوء: إشارة أن هذه المرحلة جارية الآن */
.step-node.current .node {
  animation:
    node-in .45s var(--ease-expo) 1.75s forwards,
    node-pulse 2.8s ease-in-out 2.3s infinite;
}
@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50% { box-shadow: 0 0 0 9px rgba(37,99,235,.09); }
}

/* نقطة الشارة تومض كمؤشر حيّ */
.badge .dot { animation: dot-live 2.4s ease-in-out 1.4s infinite; }
@keyframes dot-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.45); }
  55% { box-shadow: 0 0 0 5px rgba(37,99,235,0); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding: 60px 0 48px; }
  .hero-copy, .hero-figures { grid-column: auto; padding-inline: 22px; }
  .hero-figures { flex-direction: row; gap: 24px; }
  .figures-label { display: none; }
  .figure { flex: 1; }
  .hero-rules { grid-template-columns: repeat(3, 1fr); }
  .stage { padding-inline: 22px; }
}

@media (max-width: 720px) {
  .rail-steps { grid-template-columns: repeat(2, 1fr); gap: 26px 8px; }
  .rail-line { display: none; }
  .hero-figures { flex-direction: column; gap: 0; }
  .figure { border-bottom: 0; }
  .figure:last-child { border-bottom: 1px solid var(--rule); }
}

/* الهيدر ثابت بارتفاع ٦٨ بكسل، فبدون هذا يقفز أي رابط تنقّل إلى قسم
   يختفي عنوانه خلف الهيدر. المسافة تُقاس من ارتفاعه لا بالتخمين. */
:root { --header-h: 68px; }
section[id], [id] { scroll-margin-top: calc(var(--header-h) + 18px); }
@media (max-width: 860px) { :root { --header-h: 62px; } }

/* ---------- Sections ----------
   كل قسم يفصله خط شعرة عمّا قبله. لا فواصل مزخرفة ولا تدرّجات. */
.section { position: relative; padding: 100px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-divider { display: none; }

/* رأس القسم ----------------------------------------------------------
   اسم القسم علامة واضحة بلون المنصة فوق العنوان، بلا رقم ضخم خلفه:
   الرقم كان زينة لا يقرؤها أحد، ويزاحم العنوان على الشاشات الصغيرة.
   خاصية data-num باقية في الـ markup ولا تُعرض. */
.section-head { position: relative; padding-bottom: 52px; }

.section-index {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 28px;
}
/* العلامة: أرضية زرقاء خفيفة ونص بلون المنصة، فتُقرأ اسماً للقسم لا نصاً سائباً */
.section-index > span {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 13.5px; font-weight: 700; color: var(--accent-deep);
  letter-spacing: .01em;
}
/* نقطة اللون بهالة خفيفة */
.section-index > span::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
/* الخط يتلاشى بدل أن ينقطع فجأة عند حافة الصفحة */
.section-index::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to left, var(--rule), transparent);
}
[dir="ltr"] .section-index::after {
  background: linear-gradient(to right, var(--rule), transparent);
}

/* العنوان والنص فوق الرقم الشبحي */
.section-head-grid, .section h2, .section-head p { position: relative; z-index: 1; }

.section-head-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px 56px; align-items: start;
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.9vw, 2.3rem);
  font-weight: 800; line-height: 1.45; letter-spacing: 0;
}
.section-head p {
  color: var(--ink-mute);
  font-size: 15.5px; line-height: 1.9;
  padding-top: 6px;
}

/* ---------- Cell grid ----------
   العنصر الأساسي في كل الأقسام: خلايا تتقاسم حدودها بدل بطاقات طافية.
   الفاصل هو خلفية الشبكة الظاهرة من خلال gap مقداره بكسل واحد. */
.cell-grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cell {
  background: var(--paper);
  padding: 32px 28px;
  transition: background-color .2s ease;
}
.cell:hover { background: var(--paper-raised); }

.cell-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 9px;
  color: var(--ink);
  margin-bottom: 22px;
}
.cell-index {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800; color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  margin-bottom: 20px;
}
.cell h3 {
  font-family: var(--font-display);
  font-size: 16.5px; font-weight: 700; line-height: 1.6;
  margin-bottom: 10px;
}
.cell p { color: var(--ink-mute); font-size: 14.5px; line-height: 1.85; }

/* الخلية النشطة: شريط أزرق رفيع على حافتها العليا */
.cell.is-accent { position: relative; }
.cell.is-accent::before {
  content: ""; position: absolute; inset-inline: 0; top: 0;
  height: 2px; background: var(--accent);
}

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px; align-items: start;
}
.about-copy h2 { margin-bottom: 20px; }
.about-copy > p { color: var(--ink-mute); font-size: 15.5px; line-height: 1.95; margin-bottom: 34px; }

/* ركائز المنصة: صفوف مرقّمة يفصلها خط، لا شرائح زجاجية */
.pillars { border-top: 1px solid var(--rule); }
.pillar {
  display: grid; grid-template-columns: 34px 1fr;
  gap: 16px; align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.pillar-num {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 800; color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.pillar-text { font-size: 15px; font-weight: 600; }
.pillar-note { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 400; color: var(--ink-mute); }

.link-more {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 30px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  padding-bottom: 3px; border-bottom: 1px solid var(--rule-strong);
  transition: border-color .2s ease, gap .2s var(--ease-expo);
}
.link-more:hover { border-bottom-color: var(--ink); gap: 12px; }

/* «المنصة الآن»: ثلاثة أرقام حقيقية، ثم التخصصات بنسبتها — أشرطة على خطّ
   أساس واحد وبلون واحد (المقارنة بالطول، والاسم يعرّف الشريط) */
.about-panel {
  border: 1px solid var(--rule);
  border-radius: 18px;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(37, 99, 235, .06), transparent 60%),
    var(--paper-raised);
  box-shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 18px 40px -24px rgba(9, 9, 11, .18);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--rule);
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
}
.panel-live {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 11px; border-radius: 99px;
  background: #ecfdf5; color: #047857;
  font-size: 11.5px; font-weight: 700;
}
.panel-live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #10b981; }
.panel-live i::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #10b981; opacity: 0;
  animation: panel-pulse 2.2s var(--ease-expo) infinite;
}
@keyframes panel-pulse { 0% { transform: scale(.4); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

.panel-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--rule);
  border-bottom: 1px solid var(--rule);
}
.panel-stat { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; background: var(--paper-raised); }
.panel-stat b {
  font-family: var(--font-display); font-size: 30px; font-weight: 800;
  line-height: 1; letter-spacing: -.02em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.panel-stat span { font-size: 12.5px; color: var(--ink-mute); }

.panel-split { padding: 18px 22px 8px; }
.panel-sub { margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--ink-mute); }
.panel-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 8px 12px; align-items: baseline;
  padding: 14px 0;
}
.panel-row + .panel-row { border-top: 1px solid var(--rule); }
.panel-row-name { font-size: 14.5px; font-weight: 600; min-width: 0; }
.panel-row-meta { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.panel-row-meta b { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.panel-row-meta > span { font-size: 12px; color: var(--ink-mute); }
.panel-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--paper-sunk); overflow: hidden; }
.panel-bar i {
  display: block; height: 100%; width: var(--w); border-radius: 99px;
  background: var(--accent);
  transform-origin: right; transform: scaleX(0);
  transition: transform 1.1s var(--ease-expo);
}
[dir="ltr"] .panel-bar i { transform-origin: left; }
.about-panel.visible .panel-bar i { transform: scaleX(1); }
.about-panel.visible .panel-row:nth-child(3) .panel-bar i { transition-delay: .08s; }
.about-panel.visible .panel-row:nth-child(4) .panel-bar i { transition-delay: .16s; }
.about-panel.visible .panel-row:nth-child(5) .panel-bar i { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .panel-live i::after { animation: none; }
  .panel-bar i { transform: none; transition: none; }
}
@media (max-width: 640px) {
  .panel-stat { padding: 16px 14px; }
  .panel-stat b { font-size: 24px; }
}

/* ---------- Roles ---------- */

/* ---------- Showcase (مشاريع حقيقية) ----------
   إثبات لا ادّعاء: عناوين من قاعدة البيانات لا نصوص تسويقية */

/* ---------- Lifecycle ----------
   أربع مراحل رأسية يربطها خط — لا أكورديون ولا بطاقات */
.lifecycle { border-top: 1px solid var(--rule); }
.lc-row {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px; align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color .2s ease;
}
.lc-row:hover { background: var(--paper-raised); }
.lc-num {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800; color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.lc-title { font-family: var(--font-display); font-size: 16.5px; font-weight: 700; line-height: 1.6; }
.lc-text { color: var(--ink-mute); font-size: 14.5px; line-height: 1.9; }

@media (max-width: 900px) {
  .lc-row { grid-template-columns: 40px 1fr; gap: 14px; }
  .lc-text { grid-column: 2; }
}

/* ---------- Contact ----------
   لوح واحد بعمودين: جانب داكن هادئ بما يُعرف قبل الكتابة، ونموذج يُرسل في
   الخلفية ويتحوّل في مكانه إلى تأكيد — لا إعادة تحميل ولا قفز إلى الهيرو. */
.contact-grid {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  border: 1px solid var(--rule);
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper-raised);
  box-shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 24px 48px -30px rgba(9, 9, 11, .22);
}
.contact-aside {
  position: relative;
  display: flex; flex-direction: column;
  padding: 40px 34px;
  /* فاتح بلمعة زرقاء خفيفة — كلوحة «ضمانات الثقة»، بلا خلفية غامقة */
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(37, 99, 235, .09), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, rgba(37, 99, 235, .05), transparent 60%),
    #f6f9ff;
  border-inline-end: 1px solid var(--brand-100);
  color: var(--ink);
}
.contact-aside h3 { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.contact-aside p { color: var(--ink-mute); font-size: 14.5px; line-height: 1.95; margin-bottom: 26px; }
.contact-points { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.contact-point { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.contact-point-icon {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--paper-raised);
  border: 1px solid var(--brand-100);
  color: var(--accent);
}
.contact-faq {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: 14px;
  background: var(--paper-raised);
  border: 1px solid var(--brand-100);
  color: var(--ink);
  box-shadow: 0 10px 24px -20px rgba(37, 99, 235, .45);
  transition: background-color .2s ease, border-color .2s ease;
}
.contact-faq:hover { background: var(--accent-soft); border-color: var(--brand-200); color: var(--accent-deep); }
.contact-faq b { display: block; font-size: 14px; font-weight: 700; }
.contact-faq span span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-mute); }
.contact-faq svg { flex: none; transition: transform .3s var(--ease-expo); }
.contact-faq:hover svg { transform: translateX(-4px); }
[dir="ltr"] .contact-faq svg { transform: scaleX(-1); }
[dir="ltr"] .contact-faq:hover svg { transform: scaleX(-1) translateX(-4px); }

.contact-main { position: relative; padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form[hidden] { display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* تسمية ظاهرة فوق كل حقل — الـ placeholder وحده يختفي عند الكتابة */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule); border-radius: 12px;
  padding: 13px 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--ink-mute); }
.contact-form input:hover:not(:read-only),
.contact-form textarea:hover { border-color: var(--rule-strong); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; background: var(--paper-raised);
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.contact-form input:read-only { background: var(--paper-sunk); color: var(--ink-mute); cursor: default; }
.contact-form input.is-invalid,
.contact-form textarea.is-invalid { border-color: #e11d48; box-shadow: 0 0 0 4px rgba(225, 29, 72, .08); }
.contact-form textarea { resize: vertical; min-height: 140px; line-height: 1.8; }

.field-error { min-height: 0; font-size: 12.5px; color: #be123c; }
.field-error:empty { display: none; }
.field-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-count { margin-inline-start: auto; font-size: 12px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

.subject-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.subject-chips button {
  border: 1px solid var(--rule); background: var(--paper-raised);
  padding: 6px 13px; border-radius: 99px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.subject-chips button:hover { border-color: var(--rule-strong); color: var(--ink); }
.subject-chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.subject-chips button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 4px; flex-wrap: wrap; }
.form-hint { font-size: 12.5px; color: var(--ink-mute); }
.contact-form .btn { position: relative; }
.btn-spinner {
  display: none;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.contact-form.is-sending .btn-spinner { display: inline-block; }
.contact-form.is-sending .btn-icon { display: none; }
.contact-form.is-sending .btn { opacity: .85; cursor: progress; }

/* التأكيد: علامة ترسم نفسها، ثم البريد الذي سيصله الردّ */
.contact-done {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 24px 12px;
  outline: none;
  animation: done-in .5s var(--ease-expo) both;
}
.contact-done[hidden] { display: none; }
@keyframes done-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.done-mark { width: 68px; height: 68px; margin-bottom: 8px; }
.done-mark svg { width: 100%; height: 100%; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done-mark circle { stroke: #10b981; stroke-dasharray: 151; stroke-dashoffset: 151; animation: done-draw .7s var(--ease-expo) .1s forwards; fill: #ecfdf5; }
.done-mark path { stroke: #047857; stroke-dasharray: 36; stroke-dashoffset: 36; animation: done-draw .45s var(--ease-expo) .55s forwards; }
@keyframes done-draw { to { stroke-dashoffset: 0; } }
.contact-done h3 { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.contact-done p { max-width: 36ch; color: var(--ink-mute); font-size: 14.5px; line-height: 1.9; }
.contact-done p bdi { color: var(--ink); font-weight: 600; }
.contact-again {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--rule); background: var(--paper-raised);
  padding: 9px 16px; border-radius: 99px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink);
  cursor: pointer;
  transition: border-color .2s ease;
}
.contact-again:hover { border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .contact-done, .done-mark circle, .done-mark path { animation: none; stroke-dashoffset: 0; }
  .btn-spinner { animation-duration: 2s; }
}

.form-alert {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 15px; border-radius: 12px;
  font-size: 14px;
  border: 1px solid var(--rule);
}
.form-alert[hidden] { display: none; }
.form-alert svg { flex: none; }
.form-alert.ok { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.form-alert.err { color: #9f1239; background: #fff1f2; border-color: #fecdd3; }

/* ---------- Closing CTA ----------
   بطاقة فاتحة بلمعة زرقاء — نفس لغة لوحة «ضمانات الثقة» وجانب التواصل،
   بلا شريط أسود. تحت النص مسار الخطوات الثلاث الأولى. */
.cta-band { padding: 8px 0 72px; }
.cta-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px; align-items: center;
  padding: 48px 52px;
  border: 1px solid var(--brand-200);
  border-radius: 24px;
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(37, 99, 235, .10), transparent 60%),
    radial-gradient(70% 80% at 0% 100%, rgba(37, 99, 235, .06), transparent 60%),
    #f6f9ff;
  box-shadow: 0 30px 60px -48px rgba(37, 99, 235, .55);
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 800; line-height: 1.5; letter-spacing: 0;
  margin-bottom: 12px; color: var(--ink);
}
.cta-band p { color: var(--ink-mute); font-size: 15px; line-height: 1.85; max-width: 54ch; }
.cta-steps { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cta-steps li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 99px;
  background: var(--paper-raised); border: 1px solid var(--brand-100);
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
[dir="rtl"] .cta-steps li { padding: 6px 6px 6px 12px; }
.cta-steps i {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-style: normal; font-size: 11px; font-weight: 800;
}
.cta-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-band .btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  box-shadow: 0 12px 24px -14px rgba(37, 99, 235, .8);
}
.cta-band .btn-primary:hover { background: var(--accent-deep); color: #fff; }
.cta-arrow { transition: transform .2s var(--ease-expo); }
[dir="ltr"] .cta-arrow { transform: scaleX(-1); }
.cta-band .btn-primary:hover .cta-arrow { transform: translateX(-3px); }
[dir="ltr"] .cta-band .btn-primary:hover .cta-arrow { transform: scaleX(-1) translateX(-3px); }
.cta-band .btn-link { color: var(--accent-deep); border-bottom-color: var(--brand-200); }
.cta-band .btn-link:hover { border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--paper); }
/* حدّ علوي متدرّج يذوب في الطرفين بدل الخط الرمادي */
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-200) 20%, var(--accent) 50%, var(--brand-200) 80%, transparent);
  opacity: .7;
}

.footer-cols {
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 60px 0 44px;
}
.footer-about { max-width: 36ch; }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.footer-brand .brand-name { font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.footer-about p { color: var(--ink-mute); font-size: 14px; line-height: 1.9; }

/* شارة الفصل الحالي — نقطة نابضة تقول إن المنصة تعمل الآن */
.footer-live {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; padding: 7px 13px; border-radius: 99px;
  background: var(--paper-raised); border: 1px solid var(--brand-100);
  font-size: 12.5px; color: var(--ink-mute);
}
.footer-live > i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #10b981; }
.footer-live > i::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: #10b981; opacity: .35; animation: footer-pulse 2s ease-out infinite;
}
@keyframes footer-pulse { from { transform: scale(.4); opacity: .5; } to { transform: scale(1.4); opacity: 0; } }
.footer-live b { font-weight: 700; color: var(--ink); }
.footer-live-sep { margin: 0 5px; color: var(--ink-mute); }

.footer-col-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 800; color: var(--ink);
  padding-bottom: 14px; margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.footer-col-title::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.footer-col a {
  display: flex; align-items: center; gap: 0;
  padding: 8px 0;
  font-size: 14px; color: var(--ink-mute);
  transition: color .15s ease, gap .2s var(--ease-expo);
}
/* سهم صغير يظهر وينزلق النص معه عند المرور */
.footer-col a::before {
  content: ""; width: 0; height: 1.5px; border-radius: 2px; background: var(--accent);
  transition: width .2s var(--ease-expo);
}
.footer-col a:hover { color: var(--accent-deep); gap: 8px; }
.footer-col a:hover::before { width: 10px; }
.footer-note {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 10px; padding: 7px 11px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 12.5px; font-weight: 600; line-height: 1.5;
}
.footer-note svg { flex: none; }

.footer-socials { display: flex; gap: 6px; margin-top: 16px; }
.footer-socials a {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--rule); background: var(--paper-raised); color: var(--ink-mute);
  padding: 0;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s var(--ease-expo);
}
.footer-socials a:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* الشريط السفلي: الحقوق وزر العودة للأعلى */
.footer-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--ink-mute);
}
.footer-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-up {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 99px; border: 1px solid var(--rule);
  font-weight: 600; color: var(--ink-soft);
  transition: gap .2s var(--ease-expo), color .2s ease, border-color .2s ease;
}
.footer-up:hover { gap: 11px; color: var(--accent-deep); border-color: var(--brand-200); }

/* اسم المنصة بحجم ضخم يقطعه حدّ الصفحة — بتدرّج أزرق فاتح يذوب نحو الأسفل */
.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.6rem, 15vw, 11rem);
  line-height: 1.25;
  text-align: center;
  margin-top: 10px;
  margin-bottom: -.12em;
  background: linear-gradient(180deg, var(--brand-200) 10%, rgba(219, 234, 254, .55) 75%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  user-select: none;
  pointer-events: none;
}

@media (max-width: 900px) {
  .cta-inner { grid-template-columns: 1fr; gap: 26px; padding: 36px 28px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; padding: 48px 0 34px; }
  .footer-about { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 560px) {
  .cta-band { padding-bottom: 48px; }
  .cta-inner { padding: 28px 20px; border-radius: 20px; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bar { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .footer-live > i::after { animation: none; }
}

/* ---------- Back to top ----------
   دائري أبيض بحلقة تقدّم التمرير (--p من premium.js) */
.back-top {
  position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(closest-side, var(--paper-raised) calc(100% - 3px), transparent calc(100% - 2px)),
    conic-gradient(var(--accent) var(--p, 0%), var(--brand-100) 0);
  color: var(--accent);
  box-shadow: 0 12px 26px -14px rgba(37, 99, 235, .6);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s var(--ease-expo), color .2s ease;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { color: var(--accent-deep); transform: translateY(-2px); }

/* ---------- Reveal ----------
   صعود هادئ عند التمرير — بلا ضبابية ولا تكبير */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease-expo), transform .5s var(--ease-expo); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
.reveal.d4 { transition-delay: .28s; }

/* ---------- Responsive ----------
   شبكات الخلايا تنهار تدريجياً: أربعة ← اثنان ← واحد.
   بدونها كانت الخلايا تُضغط إلى شرائط رأسية وتنزلق الصفحة أفقياً. */
@media (max-width: 1024px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 84px 0; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
  .nav-login { display: none; }
  .nav-bar { height: 62px; }

  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .section-head-grid { grid-template-columns: 1fr; gap: 16px; }
  .section-head { padding-bottom: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }

  .section { padding: 64px 0; }
  .hero { padding-top: 62px; }
  .hero-copy { padding-bottom: 48px; }
  .cell { padding: 26px 22px; }
  .contact-aside, .contact-main { padding: 28px 22px; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .brand { padding-inline-start: 12px; }
  .nav-actions { padding-inline-end: 12px; }
  .section { padding: 52px 0; }
}

/* ---------- Touch targets ----------
   المعيار ٤٤ بكسل. على الماوس تبقى الروابط مضغوطة، وعلى اللمس تتوسّع. */
@media (hover: none) and (pointer: coarse) {
  .nav-links a,
  .mobile-menu a,
  .footer-col a,
  .link-more,
  .btn-link,
  .footer-up { min-height: 44px; display: flex; align-items: center; }
  .footer-col a { padding-block: 11px; }
  .socials a, .footer-socials a { width: 44px; height: 44px; }
  .lang-btn, .menu-toggle { min-height: 44px; }
}

/* ---------- Latin typography ----------
   العربية خط متصل فتباعدها صفر دائماً؛ أما اللاتينية في الأحجام الكبيرة
   فتحتاج تقارباً سالباً وإلا بدت مفكّكة. القاعدتان متناقضتان، فتُفصلان
   بالاتجاه لا تُفرض إحداهما على الأخرى. */
[dir="ltr"] .hero h1 {
  letter-spacing: -.033em;
  line-height: 1.08;
  font-weight: 700;
}
[dir="ltr"] .section h2,
[dir="ltr"] .cta-band h2 {
  letter-spacing: -.021em;
  line-height: 1.2;
}
[dir="ltr"] .cell h3,
[dir="ltr"] .project-title,
[dir="ltr"] .lc-title,
[dir="ltr"] .fq-q,
[dir="ltr"] .rx-title,
[dir="ltr"] .rx-tab-text b,
[dir="ltr"] .brand-name,
[dir="ltr"] .stage-project { letter-spacing: -.012em; }

/* الأرقام: مسافة ثابتة حتى لا ترقص عند تغيّر القيمة، وتقارب سالب خفيف */
[dir="ltr"] .figure-num,
[dir="ltr"] .fact-num,
.figure-num, .fact-num, .cell-index, .pillar-num, .lc-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

/* توازن الأسطر: يمنع سقوط كلمة وحيدة في سطر — كانت "project" تسقط وحدها */
.hero h1, .section h2, .cta-band h2, .cell h3, .project-title {
  text-wrap: balance;
}
/* الفقرات: يمنع بقاء كلمة يتيمة في آخر سطر */
.hero-sub, .section-head p, .cell p, .cta-band p { text-wrap: pretty; }

/* ---------- Locale transition ----------
   تبديل اللغة كان يقفز: ينعكس التخطيط وتتبدّل كل النصوص في إطار واحد.
   View Transition يلتقط لقطة قبل وبعد ويمزج بينهما — وهو وحده القادر
   على تنعيم انعكاس RTL إلى LTR، إذ لا يمكن تحريك ذلك بـ CSS. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .42s;
  animation-timing-function: var(--ease-expo);
}

/* البديل لمتصفح بلا دعم: يخفت المحتوى، يُستبدل النص وهو غير مرئي، ثم يعود */
html.locale-swapping body {
  opacity: .32;
  transform: translateY(4px);
}
html.locale-swapping body {
  transition: opacity .19s ease, transform .19s var(--ease-expo);
}
body { transition: opacity .22s ease, transform .22s var(--ease-expo); }

/* أثناء التبديل تُكبح حركات الدخول: استبدال العنوان يعيد إنشاء عناصره
   فتنطلق حركة طباعة الحبر فوق مزج الصفحة — مشهدان متزامنان. */
html.no-entrance .ink-line > span,
html.no-entrance .stagger,
html.no-entrance .stage,
html.no-entrance .hero-rules span,
html.no-entrance .rail-line::before,
html.no-entrance .step-node .node,
html.no-entrance .step-node .step-name,
html.no-entrance .step-node .step-meta,
html.no-entrance .site-header {
  animation: none !important;
}
/* وتُثبَّت حالتها النهائية حتى لا يختفي المحتوى */
html.no-entrance .ink-line > span,
html.no-entrance .step-node .node { transform: none; opacity: 1; }
html.no-entrance .stagger,
html.no-entrance .stage,
html.no-entrance .site-header,
html.no-entrance .step-node .step-name,
html.no-entrance .step-node .step-meta { opacity: 1; transform: none; }
html.no-entrance .hero-rules span { transform: scaleY(1); }
html.no-entrance .rail-line::before { transform: scaleX(1); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .stagger, .stage { opacity: 1; transform: none; filter: none; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .ink-line > span { transform: none; }
  /* الحالة النهائية تظهر فوراً: المسار مرسوم والعقد مضيئة بلا نبض */
  .hero-rules span { transform: scaleY(1); }
  .rail-line::before { transform: scaleX(1); }
  .step-node .node,
  .step-node .step-name,
  .step-node .step-meta { opacity: 1; transform: none; }
  .step-node.current .node { box-shadow: 0 0 0 4px var(--accent-soft); }
  /* تبديل اللغة يقع فوراً: لا مزج ولا تلاشٍ */
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  html.locale-swapping body { opacity: 1; transform: none; }
  .badge .dot { box-shadow: none; }
}


/* ==========================================================
   الهيرو: عرض المنتج
   كان نصّاً وعمود أرقام وخلفية خافتة. صار: النصّ في نصف، ولقطة حقيقية من
   لوحة الطالب في النصف الآخر بمنظور مائل ووهج — الزائر يرى المنصة قبل أن
   يسجّل. في آخر الملف عمداً: يعلو قواعد عمود الأرقام القديمة في كل مقاس.
   ========================================================== */
.hero-grid {
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  padding: 44px 0 40px;
}
.hero-copy { grid-column: span 3; gap: 22px; padding-inline: 28px 24px; }
.hero h1 { font-size: clamp(2rem, 3.4vw, 3.2rem); max-width: 15ch; }
.stagger.d5 { animation-delay: .66s; }

/* الأرقام: شريط أفقي تحت الأزرار — كانت عموداً جانبياً */
.hero-figures {
  grid-column: auto;
  display: flex; flex-direction: row; justify-content: flex-start;
  align-self: stretch;
  margin-top: 8px; padding: 0;
  border-top: 1px solid var(--rule);
}
.hero-figures .figure { flex: 1; padding: 14px 0 0; border-top: 0; }
.hero-figures .figure + .figure { padding-inline-start: 18px; border-inline-start: 1px solid var(--rule); }
.hero-figures .figure-num { font-size: 1.55rem; }
.hero-figures .figure-label { font-size: 12px; }

/* ---------- بنتو حيّ ----------
   كانت لقطة مائلة ببطاقات طافية — نمط شاع حتى صار قالباً. صارت شبكة بلاطات
   غير متساوية، كلٌّ ويدجت حيّة مبنيّة بالكود: حادّة بأيّ دقّة وتُترجم. */
.hero-visual {
  grid-column: span 3;
  position: relative;
  padding-inline: 12px 24px;
  opacity: 0;
  animation: bento-in .9s var(--ease-expo) .5s forwards;
}
/* وهج بلون الهوية تحت الشبكة يرفعها عن الورقة */
.hero-visual::before {
  content: "";
  position: absolute; inset: 6% 2% -4%;
  z-index: -1;
  background: radial-gradient(55% 55% at 50% 50%, rgba(37, 99, 235, .22), rgba(96, 165, 250, .08) 55%, transparent 75%);
  filter: blur(30px);
}
@keyframes bento-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "prog prog stage stage"
    "prog prog chat  chat"
    "role role grade grade";
  gap: 12px;
}
.bento-tile {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(9, 9, 11, .08);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fcfcfd);
  box-shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 14px 32px -20px rgba(15, 23, 42, .28);
  transition: transform .5s var(--ease-expo), box-shadow .5s var(--ease-expo), border-color .3s ease;
  animation: tile-in .7s var(--ease-expo) both;
}
.bento-tile:hover { transform: translateY(-3px); border-color: rgba(37, 99, 235, .25); box-shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 22px 40px -22px rgba(37, 99, 235, .45); }
.is-progress { grid-area: prog; animation-delay: .6s; }
.is-stage { grid-area: stage; animation-delay: .7s; }
.is-chat { grid-area: chat; animation-delay: .8s; }
.is-roles { grid-area: role; animation-delay: .9s; }
.is-grade { grid-area: grade; animation-delay: 1s; }
@keyframes tile-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.bento-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink-mute); }
.bento-ico {
  flex: none;
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent);
}
.bento-ico svg { width: 14px; height: 14px; }
.bento-avatar {
  flex: none;
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-size: 10.5px; font-weight: 700;
}

/* ١) الإنجاز */
.is-progress { justify-content: space-between; }
.bento-ring { position: relative; width: 148px; height: 148px; margin: 4px auto 0; display: grid; place-items: center; }
.bento-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.bento-ring circle { fill: none; stroke-width: 9; }
.bento-ring circle:first-child { stroke: #eef2f7; }
.bento-ring circle + circle {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p));
  transition: stroke-dashoffset 1s var(--ease-expo);
}
.bento-ring b {
  position: relative;
  font-family: var(--font-display);
  font-size: 30px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.bento-project { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.bento-project b { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bento-project small { font-size: 11.5px; color: var(--ink-mute); }

/* ٢) المرحلة: ثلاث محطّات تضيء بالتتابع */
.bento-stage-title { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bento-steps { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.bento-steps li {
  flex: 1;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--ink-mute);
}
.bento-steps i {
  display: block; height: 5px; border-radius: 99px;
  background: #eef0f3;
  position: relative; overflow: hidden;
}
.bento-steps i::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease-expo);
}
[dir="ltr"] .bento-steps i::after { transform-origin: left; }
.bento-steps li.is-on i::after { transform: scaleX(1); }
.bento-steps li.is-on { color: var(--ink-soft); }
.bento-steps li.is-now { color: var(--accent); }
/* الاعتماد أخضر: النهاية السعيدة */
.bento-steps li:last-child.is-on i::after { background: #10b981; }
.bento-steps li:last-child.is-now { color: #047857; }

/* ٣) نقاش الفريق: رسالة تُكتب */
.bento-lock {
  margin-inline-start: auto;
  padding: 1px 8px; border-radius: 99px;
  background: #f4f4f5;
  font-size: 10.5px; font-weight: 700; color: var(--ink-mute);
}
.bento-msg { display: flex; align-items: flex-end; gap: 8px; min-height: 44px; }
.bento-bubble {
  flex: 1;
  min-height: 36px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #e8ecf3;
  border-radius: 14px;
  border-end-start-radius: 4px;
  background: #f8fafc;
  font-size: 12.5px; line-height: 1.6; color: var(--ink-soft);
  transition: background-color .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.bento-bubble .mention { padding: 0 4px; border-radius: 5px; background: var(--accent-soft); font-weight: 700; color: var(--accent); }
.is-chat.is-sent .bento-bubble { border-color: #bfdbfe; background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.bento-caret {
  display: inline-block; width: 2px; height: 1em;
  margin-inline-start: 2px; vertical-align: -2px;
  background: var(--accent);
  opacity: 0;
}
.is-chat.is-typing .bento-caret { opacity: 1; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ٤) الأدوار: تظهر بالتتابع */
.bento-roles { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.bento-roles li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 3px;
  padding-inline: 3px 10px;
  border: 1px solid hsl(var(--h) 60% 88%);
  border-radius: 99px;
  background: hsl(var(--h) 80% 97%);
  opacity: .25; transform: translateY(4px) scale(.96);
  transition: opacity .45s var(--ease-expo), transform .45s var(--ease-expo);
}
.bento-roles li.is-in { opacity: 1; transform: none; }
.bento-roles .bento-avatar { width: 22px; height: 22px; font-size: 9px; }
.bento-roles em { font-style: normal; font-size: 11.5px; font-weight: 700; color: hsl(var(--h) 55% 32%); }

/* ٥) الدرجة */
.bento-grade { display: flex; align-items: baseline; gap: 4px; }
.bento-grade b {
  font-family: var(--font-display);
  font-size: 38px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.bento-grade small { font-size: 14px; font-weight: 600; color: var(--ink-mute); }
.bento-grade-label {
  align-self: flex-start;
  padding: 2px 10px; border-radius: 99px;
  background: #ecfdf5; color: #047857;
  font-size: 11.5px; font-weight: 700;
  opacity: 0; transform: translateY(4px);
  transition: opacity .5s ease .6s, transform .5s var(--ease-expo) .6s;
}
.bento.is-graded .bento-grade-label { opacity: 1; transform: none; }
.bento.is-graded .is-grade { border-color: rgba(16, 185, 129, .3); }

/* نهاية الدورة: تلاشٍ قصير قبل البداية — لا قفزة */
.bento .bento-tile > *:not(.bento-head) { transition-property: opacity, transform, stroke-dashoffset, background-color, border-color, box-shadow; }
.bento.is-resetting .bento-tile > *:not(.bento-head) { opacity: .35; }

/* ---------- المقاسات ---------- */
@media (max-width: 1180px) {
  .hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
  .bento { gap: 10px; }
  .bento-tile { padding: 14px; }
  .bento-ring { width: 124px; height: 124px; }
  .bento-ring b { font-size: 25px; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding: 40px 0 36px; }
  .hero-copy, .hero-visual { grid-column: auto; padding-inline: 22px; }
  .hero-figures { padding-inline: 0; }
}

@media (max-width: 720px) {
  /* تعلو قاعدة العمود القديمة: الأرقام تبقى صفّاً */
  .hero-figures { flex-direction: row; }
  .hero-figures .figure { border-bottom: 0; }
  .hero-figures .figure:last-child { border-bottom: 0; }
  .hero-figures .figure-num { font-size: 1.3rem; }
  .hero-figures .figure + .figure { padding-inline-start: 12px; }
}

@media (max-width: 520px) {
  /* عمودان: الإنجاز والمرحلة، ثم النقاش بعرض كامل، ثم الأدوار والدرجة */
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "prog  stage"
      "prog  grade"
      "chat  chat"
      "role  role";
  }
  .bento-ring { width: 104px; height: 104px; }
  .bento-ring b { font-size: 21px; }
  .bento-grade b { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual, .bento-tile { opacity: 1; animation: none; }
  .bento-tile, .bento-ring circle + circle, .bento-roles li, .bento-steps i::after, .bento-grade-label { transition: none; }
}
html.no-entrance .hero-visual,
html.no-entrance .bento-tile { opacity: 1; animation: none; }


/* ==========================================================
   الخدمات والمميزات وكيف يعمل — لكل قسم عرضه
   كانت الأقسام الثلاثة خلايا بالشكل ذاته (١١ بطاقة متشابهة)، تتكرّر فيها
   العبارات. صارت: بنتو للخدمات، وبطاقات أيقونة ورقم للمميزات، ومسار
   متّصل للخطوات — بشبكة الخطوط الشعرية نفسها التي تميّز الصفحة.
   ========================================================== */

/* ---------- الخدمات: بنتو بخطوط شعرية ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.svc-tile {
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
  padding: 28px 26px;
  background: var(--paper);
  transition: background-color .25s ease;
}
.svc-tile:hover { background: var(--paper-raised); }
.svc-tile.is-wide { grid-column: span 2; gap: 24px; padding: 32px 30px; }
.svc-tile.is-half { grid-column: span 2; flex-direction: row; align-items: flex-start; gap: 16px; }
.svc-tile h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 700; line-height: 1.55; }
.svc-tile.is-wide h3 { font-size: 20px; font-weight: 800; }
.svc-tile p { color: var(--ink-mute); font-size: 14px; line-height: 1.85; }
.svc-tile.is-wide p { font-size: 15px; max-width: 46ch; }
.svc-copy { display: flex; flex-direction: column; gap: 10px; }

.svc-icon {
  flex: none;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--paper-raised);
  color: var(--ink);
  transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}
.svc-icon svg { width: 19px; height: 19px; }
.svc-tile:hover .svc-icon { color: var(--accent); border-color: var(--brand-200); background: var(--accent-soft); }

/* مشهد مصغّر ثابت داخل البلاطة الكبيرة — واجهة مرسومة لا صورة */
.svc-scene {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(37, 99, 235, .06), transparent 60%),
    var(--paper-raised);
}

.scene-team { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.scene-avatars { display: inline-flex; }
.scene-avatars i {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--paper-raised);
  background: var(--ink); color: #fff;
  font-style: normal; font-size: 11px; font-weight: 700;
}
.scene-avatars i + i { margin-inline-start: -9px; }
.scene-avatars i:nth-child(2) { background: #1e3a8a; }
.scene-avatars i:nth-child(3) { background: #334155; }
.scene-avatars i.is-add { background: var(--paper-sunk); color: var(--ink-mute); border-style: dashed; border-color: var(--rule-strong); font-size: 15px; }
.scene-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 99px;
  background: var(--accent-soft);
  font-size: 12px; font-weight: 600; color: var(--accent-deep);
}
.scene-chip b { font-family: var(--font-display); font-size: 14px; }
.scene-alert {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 10px;
  background: #fffbeb; border: 1px solid #fde68a;
  font-size: 12.5px; font-weight: 600; color: #92400e;
}
.scene-alert svg { flex: none; width: 16px; height: 16px; color: #d97706; }

.scene-steps { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
.scene-steps li { flex: 1; display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ink-mute); }
.scene-steps i { display: block; height: 5px; border-radius: 99px; background: var(--ink); }
.scene-steps li.is-warn { color: #b45309; }
.scene-steps li.is-warn i { background: #f59e0b; }
.scene-steps li.is-ok { color: #047857; }
.scene-steps li.is-ok i { background: #10b981; }
.scene-note {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-radius: 10px;
  background: #fffbeb;
  font-size: 12.5px; line-height: 1.7; color: var(--ink-soft);
}
.scene-note b { font-size: 12px; color: #92400e; }


/* ---------- كيف يعمل: أربع محطات على مسار واحد متّصل ---------- */
.journey {
  --node: 46px;
  list-style: none;
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin: 0; padding: 0;
}
/* الخطّ يمرّ بمراكز المحطّات: من منتصف الأولى إلى منتصف الأخيرة */
.journey::before {
  content: "";
  position: absolute; top: calc(var(--node) / 2); inset-inline: 12.5%;
  height: 2px;
  background: linear-gradient(to left, var(--ink) 0%, var(--ink) 66%, var(--rule-strong) 66%);
}
[dir="ltr"] .journey::before { background: linear-gradient(to right, var(--ink) 0%, var(--ink) 66%, var(--rule-strong) 66%); }
.journey-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.journey-node {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: var(--node); height: var(--node); border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  margin-bottom: 8px;
  transition: transform .35s var(--ease-expo), background-color .25s ease;
}
.journey-node .cell-index { margin: 0; font-size: 13px; color: var(--ink); }
.journey-step:hover .journey-node { transform: scale(1.08); }
.journey-step.is-accent .journey-node { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.journey-step.is-accent .journey-node .cell-index { color: #fff; }
.journey-step h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 700; line-height: 1.55; }
.journey-step p { max-width: 30ch; color: var(--ink-mute); font-size: 14px; line-height: 1.8; }

/* ---------- المقاسات ---------- */
@media (max-width: 1024px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .journey { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .journey::before { display: none; }
}
@media (max-width: 640px) {
  .svc-grid { grid-template-columns: 1fr; }
  .svc-tile.is-wide, .svc-tile.is-half { grid-column: auto; }
  .svc-tile.is-wide { padding: 26px 22px; }
  .svc-tile { padding: 24px 22px; }
  /* المسار عموديّاً: خطّ على جانب المحطّات */
  .journey { grid-template-columns: 1fr; gap: 26px; }
  .journey::before {
    display: block;
    top: 0; bottom: 0; inset-inline-start: calc(var(--node) / 2 - 1px); inset-inline-end: auto;
    width: 2px; height: auto;
    background: linear-gradient(to bottom, var(--ink) 0%, var(--ink) 70%, var(--rule-strong) 70%);
  }
  .journey-step { display: grid; grid-template-columns: var(--node) 1fr; column-gap: 16px; align-items: start; text-align: start; }
  .journey-node { grid-row: span 2; margin: 0; }
  .journey-step p { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .journey-step:hover .journey-node { transform: none; }
}

/* ==========================================================
   07 — قبل تخرُّج وبعدها: صفوف مقارنة بأرقامها
   تبقى .lc-row و.lc-num كما هي (طريقة الأرقام)، ويتبدّل العمود الثالث
   إلى عمودين: «قبل» باهتاً مشطوباً، و«مع تخرُّج» بعلامة زرقاء.
   ========================================================== */
.lifecycle.is-vs .lc-row,
.vs-head {
  grid-template-columns: 58px minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
  align-items: center;
}
.vs-head {
  display: grid; gap: 24px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--rule-strong);
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
  color: var(--ink-mute);
}
/* شارتان فوق العمودين مباشرة: رمادية لـ«قبل» وزرقاء لـ«مع تخرُّج» */
.vs-head span:nth-child(3),
.vs-head span:last-child { justify-self: start; padding: 5px 12px; border-radius: 99px; }
.vs-head span:nth-child(3) { background: var(--paper-sunk); color: var(--ink-mute); }
.vs-head span:last-child { background: var(--accent-soft); color: var(--accent-deep); }
.vs-before, .vs-after {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14.5px; line-height: 1.8;
}
.vs-before { color: var(--ink-mute); }
.vs-before > span:last-child {
  text-decoration: line-through;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
}
.vs-after { color: var(--ink); font-weight: 600; }
.vs-mark {
  flex: none;
  display: grid; place-items: center;
  width: 22px; height: 22px; margin-top: 2px;
  border-radius: 50%;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  color: var(--ink-mute);
}
.vs-after .vs-mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.lifecycle.is-vs .lc-row:hover .vs-after .vs-mark { box-shadow: 0 0 0 5px var(--accent-soft); }
.vs-mark { transition: box-shadow .25s ease; }

/* 09 — فقرة القسم (كانت style مضمَّناً) */
.dept-lead { color: var(--ink-mute); font-size: 15.5px; line-height: 1.95; margin-top: 18px; }

@media (max-width: 900px) {
  .vs-head { display: none; }
  .lifecycle.is-vs .lc-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px 14px;
    align-items: baseline;
  }
  .lifecycle.is-vs .vs-before,
  .lifecycle.is-vs .vs-after { grid-column: 2; }
}

/* ==========================================================
   05 — مستكشف الأدوار بروح الهيرو
   كل دور بطاقة بشخصيته في هالة بلونه (الطالب أزرق، المشرف نيلي،
   الإدارة بنفسجي)، ولوحة فيها نموذج من شاشته وما يفعله وما لا يراه،
   وتحتها خطّ يربط الأدوار بما ينتقل بينها. لا مربعات سوداء.
   ========================================================== */
.rx { --rx-dur: 7s; }
.rx .is-student { --role: #2563eb; --role-soft: #eff6ff; --role-line: #bfdbfe; }
.rx .is-supervisor { --role: #4f46e5; --role-soft: #eef2ff; --role-line: #c7d2fe; }
.rx .is-admin { --role: #7c3aed; --role-soft: #f5f3ff; --role-line: #ddd6fe; }

/* ---- بطاقات الأدوار ---- */
.rx-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.rx-tab {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px 14px 14px;
  border: 1px solid var(--rule); border-radius: 20px;
  background: var(--paper-raised);
  font: inherit; color: var(--ink-mute); text-align: start;
  cursor: pointer; overflow: hidden;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s var(--ease-expo), background-color .3s ease;
}
.rx-tab:hover { transform: translateY(-2px); border-color: var(--role-line); }
.rx-tab[aria-selected="true"] {
  border-color: var(--role-line);
  background: linear-gradient(135deg, var(--role-soft), var(--paper-raised) 70%);
  color: var(--ink);
  box-shadow: 0 22px 44px -30px var(--role);
}
.rx-tab:focus-visible { outline: 2px solid var(--role); outline-offset: 3px; }
/* الشخصية في هالة بلون الدور — خافتة حتى يُختار دورها */
.rx-tab-art {
  flex: none; position: relative;
  display: grid; place-items: end center;
  width: 64px; height: 64px; border-radius: 18px;
  background: radial-gradient(circle at 50% 70%, var(--role-soft), #fff 75%);
  box-shadow: inset 0 0 0 1px var(--rule);
  overflow: hidden;
  transition: box-shadow .3s ease, background .3s ease;
}
.rx-tab-art svg { width: 46px; height: 72px; margin-bottom: -10px; overflow: visible; filter: grayscale(.55); opacity: .75; transition: filter .3s ease, opacity .3s ease, transform .4s var(--ease-expo); }
.rx-tab[aria-selected="true"] .rx-tab-art { background: radial-gradient(circle at 50% 75%, #fff, var(--role-soft) 70%); box-shadow: inset 0 0 0 1.5px var(--role-line), 0 10px 20px -12px var(--role); }
.rx-tab[aria-selected="true"] .rx-tab-art svg, .rx-tab:hover .rx-tab-art svg { filter: none; opacity: 1; transform: translateY(-3px); }
.rx-tab-text { flex: 1; min-width: 0; }
.rx-tab-text b { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 800; color: inherit; }
.rx-tab-text small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-mute); }
.rx-tab-num { align-self: flex-start; font-family: var(--font-display); font-size: 12px; font-weight: 800; color: var(--rule-strong); transition: color .3s ease; }
.rx-tab[aria-selected="true"] .rx-tab-num { color: var(--role); }
/* شريط الجولة: يمتلئ أسفل البطاقة النشطة */
.rx-tab::after {
  content: ""; position: absolute; inset-inline: 18px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--role); transform: scaleX(0); transition: transform .3s ease;
}
.rx-tab[aria-selected="true"]::after { transform: scaleX(1); }
.rx.is-playing .rx-tab[aria-selected="true"]::after { transform-origin: right; animation: rx-progress var(--rx-dur) linear both; }
[dir="ltr"] .rx.is-playing .rx-tab[aria-selected="true"]::after { transform-origin: left; }
.rx.is-playing.is-paused .rx-tab[aria-selected="true"]::after { animation-play-state: paused; }
@keyframes rx-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- لوحة الدور ---- */
.rx-panel {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0;
  border: 1px solid var(--rule); border-radius: 24px;
  background: var(--paper-raised);
  overflow: hidden;
}
.rx-panel + .rx-panel { margin-top: 16px; }
.rx.is-enhanced .rx-panel + .rx-panel { margin-top: 0; }
.rx-panel[hidden] { display: none; }

/* المشهد: نموذج من شاشة الدور، والشخصية تقف بجانبه */
.rx-scene {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 34px 34px 34px 70px;
  background:
    radial-gradient(70% 80% at 30% 20%, var(--role-soft), transparent 70%),
    radial-gradient(rgba(15, 23, 42, .07) 1px, transparent 1.2px) 0 0 / 18px 18px,
    var(--paper);
  border-inline-end: 1px solid var(--rule);
}
[dir="rtl"] .rx-scene { padding: 34px 70px 34px 34px; }
.rx-screen {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  border: 1px solid var(--rule); border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 60px -36px rgba(15, 23, 42, .45), 0 0 0 6px rgba(255, 255, 255, .6);
  overflow: hidden;
}
.rx-screen-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.rx-screen-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); }
.rx-screen-bar i:first-child { background: var(--role); }
.rx-screen-bar span { margin-inline-start: 6px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.rx-screen-body { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.rx-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; }
.rx-card-label { font-size: 11.5px; font-weight: 700; color: var(--ink-mute); }
.rx-task { display: flex; align-items: center; gap: 10px; }
.rx-task > span:nth-child(2) { flex: 1; min-width: 0; }
.rx-task b, .rx-sub b { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.rx-task small, .rx-sub small { display: block; font-size: 12px; color: var(--ink-mute); }
.rx-task-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 4px #fef3c7; animation: rx-ping 1.8s ease-in-out infinite; }
@keyframes rx-ping { 50% { box-shadow: 0 0 0 7px rgba(254, 243, 199, .4); } }
.rx-btn { flex: none; display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rx-btn.is-primary { background: var(--role); color: #fff; box-shadow: 0 8px 16px -8px var(--role); }
.rx-btn.is-ok { background: #059669; color: #fff; }
.rx-btn.is-warn { border: 1px solid #fcd34d; background: #fffbeb; color: #92400e; }
.rx-progress-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-mute); }
.rx-progress-head b { color: var(--ink); }
.rx-progress { display: block; height: 7px; border-radius: 99px; background: var(--paper-sunk); overflow: hidden; }
.rx-progress i { display: block; width: var(--w); height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--role), #60a5fa); }
.rx-panel.is-in .rx-progress i { animation: rx-fill 1.1s var(--ease-expo) .3s both; }
@keyframes rx-fill { from { width: 0; } }
.rx-avatars { display: inline-flex; }
.rx-avatars i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: var(--role); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 800; }
.rx-avatars i + i { margin-inline-start: -8px; }
.rx-avatars i:nth-child(2) { background: #0d9488; }
.rx-avatars i:nth-child(3) { background: #f59e0b; }
.rx-sub { display: flex; align-items: center; gap: 10px; }
.rx-av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--role-soft); color: var(--role); font-size: 12px; font-weight: 800; }
.rx-file { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 6px 10px; border-radius: 9px; background: var(--paper); border: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-soft); }
.rx-file i { font-style: normal; font-size: 10px; font-weight: 800; padding: 2px 5px; border-radius: 4px; background: #fee2e2; color: #b91c1c; }
.rx-actions { display: flex; gap: 8px; }
.rx-health { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rx-health span { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 10px; background: var(--paper); }
.rx-health b { font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1; color: var(--ink-mute); }
.rx-health small { font-size: 11.5px; color: var(--ink-mute); }
.rx-health .is-alert { background: #fffbeb; }
.rx-health .is-alert b { color: #b45309; }
/* صاحب الدور يقف عند حافة الشاشة */
.rx-person {
  position: absolute; z-index: 2; bottom: 22px; inset-inline-start: 14px;
  width: 64px; height: 100px; overflow: visible;
}
[dir="ltr"] .rx-person { transform: scaleX(-1); }
.rx-panel.is-in .rx-person { animation: rx-hop .7s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes rx-hop { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }

.rx-panel.is-in .rx-screen { animation: rx-rise .55s var(--ease-expo) both; }
.rx-panel.is-in .rx-card + .rx-card { animation: rx-rise .55s var(--ease-expo) .1s both; }
.rx-panel.is-in .rx-caps li { animation: rx-rise .5s var(--ease-expo) both; }
.rx-panel.is-in .rx-caps li:nth-child(2) { animation-delay: .06s; }
.rx-panel.is-in .rx-caps li:nth-child(3) { animation-delay: .12s; }
.rx-panel.is-in .rx-caps li:nth-child(4) { animation-delay: .18s; }
@keyframes rx-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ما يفعله الدور: بطاقات بأيقونات ملوّنة خفيفة */
.rx-info { display: flex; flex-direction: column; padding: 30px 32px; }
.rx-title { margin: 0 0 18px; font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.rx-caps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rx-caps li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper);
  transition: border-color .25s ease, background-color .25s ease, transform .25s var(--ease-expo);
}
.rx-caps li:hover { border-color: var(--role-line); background: #fff; transform: translateY(-2px); }
.rx-cap-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 10px; background: var(--role-soft); color: var(--role); }
.rx-cap-icon svg { width: 18px; height: 18px; }
.rx-caps b { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.rx-caps span:not(.rx-cap-icon) { font-size: 13px; line-height: 1.75; color: var(--ink-mute); }
.rx-private {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 0; padding: 11px 14px;
  border-radius: 12px; background: var(--role-soft); color: var(--ink-soft); font-size: 13px;
}
.rx-private svg { flex: none; color: var(--role); }

/* ---- كيف تتصل الأدوار ---- */
.rx-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 18px; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper-raised); }
.rx-flow { flex: 1; display: flex; align-items: center; gap: 14px; margin: 0; padding: 0; list-style: none; }
.rx-node { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.rx-node-face {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--role-soft); box-shadow: inset 0 0 0 1px var(--role-line);
  overflow: hidden; transition: box-shadow .3s ease, transform .3s var(--ease-expo);
}
.rx-node-face svg { width: 34px; height: 34px; filter: grayscale(.5); opacity: .8; transition: filter .3s ease, opacity .3s ease; }
.rx-node b { font-size: 13.5px; font-weight: 700; color: var(--ink-mute); transition: color .25s ease; }
.rx-node small { font-size: 12px; color: var(--ink-mute); }
.rx-node.is-active .rx-node-face { box-shadow: inset 0 0 0 2px var(--role), 0 0 0 5px var(--role-soft); transform: scale(1.06); }
.rx-node.is-active .rx-node-face svg { filter: none; opacity: 1; }
.rx-node.is-active b { color: var(--ink); }
.rx-edge { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 40px; font-size: 12px; color: var(--ink-mute); white-space: nowrap; }
.rx-edge::before, .rx-edge::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--rule-strong) 0 5px, transparent 5px 10px); background-size: 10px 2px; }
.rx-edge.is-flowing { color: var(--ink-soft); font-weight: 600; }
.rx-edge.is-flowing::before, .rx-edge.is-flowing::after {
  background-image: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 10px);
  animation: rx-flow .7s linear infinite;
}
@keyframes rx-flow { to { background-position: 10px 0; } }
[dir="rtl"] .rx-edge.is-flowing::before, [dir="rtl"] .rx-edge.is-flowing::after { animation-direction: reverse; }
.rx:not(.is-playing) .rx-edge.is-flowing::before, .rx:not(.is-playing) .rx-edge.is-flowing::after,
.rx.is-paused .rx-edge.is-flowing::before, .rx.is-paused .rx-edge.is-flowing::after { animation-play-state: paused; }

.rx-tour {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border: 1px solid var(--rule); border-radius: 99px; background: #fff;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.rx-tour[hidden] { display: none; }
.rx-tour:hover { border-color: var(--accent); color: var(--accent); }
.rx-tour:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rx-tour .rx-tour-play { display: none; }
.rx-tour.is-off .rx-tour-play { display: block; }
.rx-tour.is-off .rx-tour-pause { display: none; }
.rx-tour.is-off { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

@media (max-width: 980px) {
  .rx-panel { grid-template-columns: 1fr; }
  .rx-scene { border-inline-end: 0; border-bottom: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .rx-tabs { gap: 8px; }
  .rx-tab { flex-direction: column; justify-content: center; gap: 8px; padding: 12px 6px 14px; text-align: center; border-radius: 16px; }
  .rx-tab-art { width: 52px; height: 52px; border-radius: 14px; }
  .rx-tab-art svg { width: 38px; height: 60px; }
  .rx-tab-text small, .rx-tab-num { display: none; }
  .rx-tab-text b { font-size: 14px; }
  .rx-scene, [dir="rtl"] .rx-scene { padding: 22px 18px 22px 18px; }
  .rx-person { display: none; }
  .rx-info { padding: 22px 18px; }
  .rx-caps { grid-template-columns: 1fr; gap: 10px; }
  .rx-foot { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }
  .rx-flow { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rx-tour { align-self: flex-start; }
  .rx-edge { padding-inline-start: 17px; min-height: 24px; }
  .rx-edge::before { display: none; }
  .rx-edge::after { flex: none; order: -1; width: 2px; height: 20px; background: repeating-linear-gradient(180deg, var(--rule-strong) 0 4px, transparent 4px 7px); animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-panel.is-in .rx-screen, .rx-panel.is-in .rx-card + .rx-card, .rx-panel.is-in .rx-caps li,
  .rx-panel.is-in .rx-person, .rx-panel.is-in .rx-progress i, .rx-task-dot { animation: none; }
  .rx-tab, .rx-tab::after, .rx-tab-art svg { transition: none; }
  .rx-edge.is-flowing::before, .rx-edge.is-flowing::after { animation: none; }
}

/* ==========================================================
   06 — مشاريع أُنجزت: أرقام إجمالية، وبطاقة مميّزة، ومسار المراحل
   الشبكة تتكيّف مع العدد (1–4) فلا تبقى مساحة فارغة.
   ========================================================== */
.sc-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: 18px; overflow: hidden;
  margin-bottom: 18px;
}
.sc-stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; background: var(--paper-raised); }
.sc-stat b { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-stat span { font-size: 13px; color: var(--ink-mute); }

.sc-grid { display: grid; gap: 16px; }
.sc-grid.is-1 { grid-template-columns: 1fr; }
.sc-grid.is-2 { grid-template-columns: 1.3fr 1fr; }
.sc-grid.is-3, .sc-grid.is-4 { grid-template-columns: 1.3fr 1fr 1fr; }
.sc-grid.is-3 .is-featured { grid-row: span 2; }
.sc-grid.is-4 .is-featured { grid-row: span 2; }
.sc-grid.is-4 .sc-card:last-child { grid-column: 2 / span 2; }

.sc-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px; border: 1px solid var(--rule); border-radius: 18px;
  background: var(--paper-raised);
  transition: border-color .25s ease, box-shadow .25s ease, transform .35s var(--ease-expo);
}
.sc-card:hover { border-color: var(--rule-strong); box-shadow: 0 18px 40px -26px rgba(9, 9, 11, .3); transform: translateY(-2px); }
.sc-card.is-featured {
  padding: 28px;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(37, 99, 235, .08), transparent 60%),
    var(--paper-raised);
}
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-type { padding: 4px 11px; border: 1px solid var(--rule); border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--paper); }
.sc-done { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #047857; }
.sc-title { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 800; line-height: 1.55; color: var(--ink); }
.is-featured .sc-title { font-size: 24px; line-height: 1.4; }
.sc-desc { margin: 0; font-size: 14px; line-height: 1.85; color: var(--ink-mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-featured .sc-desc { font-size: 15px; -webkit-line-clamp: 3; }

.sc-journey { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); }
.sc-steps { display: inline-flex; align-items: center; }
.sc-steps i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sc-steps i + i { margin-inline-start: 12px; position: relative; }
.sc-steps i + i::before { content: ""; position: absolute; inset-inline-end: 10px; top: 4px; width: 12px; height: 2px; background: var(--accent); opacity: .5; }
.sc-journey-text { font-size: 12.5px; color: var(--ink-mute); }
.sc-journey-text b { color: var(--ink); font-variant-numeric: tabular-nums; }

.sc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 12px; border-top: 1px dashed var(--rule); font-size: 12.5px; color: var(--ink-mute); }
.sc-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.sc-sep { margin: 0 2px; }
.sc-dots { display: inline-flex; }
.sc-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--paper-raised); background: var(--ink); }
.sc-dots i + i { margin-inline-start: -7px; }
.sc-dots i:nth-child(2) { background: #1e3a8a; }
.sc-dots i:nth-child(3) { background: #334155; }
.sc-dots i:nth-child(4) { background: #475569; }
.sc-more { margin-top: 22px; }

@media (max-width: 980px) {
  .sc-grid.is-2, .sc-grid.is-3, .sc-grid.is-4 { grid-template-columns: 1fr 1fr; }
  .sc-grid .is-featured { grid-column: 1 / -1; grid-row: auto !important; }
  .sc-grid.is-4 .sc-card:last-child { grid-column: auto; }
}
@media (max-width: 640px) {
  .sc-grid.is-2, .sc-grid.is-3, .sc-grid.is-4 { grid-template-columns: 1fr; }
  .sc-stats { grid-template-columns: 1fr 1fr; }
  .sc-stat b { font-size: 24px; }
  .is-featured .sc-title { font-size: 20px; }
  .sc-card.is-featured { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-card:hover { transform: none; }
}

/* مسار المشروع المميّز: أسماء مراحله المعتمدة على خطّ واحد */
.sc-path { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.sc-path li { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; color: var(--ink-soft); }
.sc-path li:not(:last-child)::before {
  content: ""; position: absolute; inset-inline-start: 10px; top: 28px; bottom: -8px;
  width: 2px; background: var(--accent-soft);
}
.sc-path-node {
  position: relative; z-index: 1; flex: none;
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--paper-raised);
}
.sc-path-title { font-weight: 600; }

/* ==========================================================
   03 — لوحتان: ضمانات الثقة (داكنة) وراحة كل يوم (فاتحة)
   لكل ميزة دليل مرسوم من شكلها الحقيقي في المنصة بجانب نصّها.
   ========================================================== */
.fx { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.fx-panel { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; }
/* فاتحة بلمعة زرقاء خفيفة وحدّ — تتميّز عن اللوحة البيضاء بجانبها بلا لون غامق */
.fx-panel.is-trust {
  border: 1px solid var(--brand-200);
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(37, 99, 235, .09), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(37, 99, 235, .05), transparent 60%),
    #f6f9ff;
  color: var(--ink);
}
.fx-panel.is-daily { border: 1px solid var(--rule); background: var(--paper-raised); }
.fx-panel-head { padding: 26px 28px 8px; }
.fx-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.is-trust .fx-kicker { color: var(--accent); }
.fx-kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fx-panel-title { margin: 8px 0 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1.5; }
.is-trust .fx-panel-title { color: var(--ink); }

.fx-list { list-style: none; margin: 0; padding: 8px 28px 16px; flex: 1; display: flex; flex-direction: column; }
.fx-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px 0; }
.fx-item + .fx-item { border-top: 1px solid var(--rule); }
.is-trust .fx-item + .fx-item { border-top-color: var(--brand-100); }
.fx-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fx-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; }
.is-trust .fx-icon { background: var(--accent); color: #fff; }
.fx-icon svg { width: 17px; height: 17px; }
.fx-head .cell-index { margin: 0; }
.is-trust .fx-head .cell-index { color: var(--ink-mute); }
.fx-text h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 16px; font-weight: 800; }
.is-trust .fx-text h3 { color: var(--ink); }
.fx-text p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-mute); }
.is-trust .fx-text p { color: var(--ink-mute); }

/* الأدلّة المرسومة */
.fx-proof {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px; border-radius: 14px;
  background: var(--paper); border: 1px solid var(--rule);
  font-size: 12.5px; color: var(--ink-soft);
}
.is-trust .fx-proof { background: var(--paper-raised); border-color: var(--brand-100); color: var(--ink-soft); box-shadow: 0 10px 24px -20px rgba(37, 99, 235, .45); }
.fx-seen { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #047857; }
.fx-seen svg { flex: none; }
.fx-bubble { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px 12px 12px 4px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.fx-bubble i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-size: 9.5px; font-weight: 800; }
.fx-nope { display: flex; gap: 12px; color: #be123c; }
.fx-nope > span { display: inline-flex; align-items: center; gap: 4px; }
.fx-log-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; background: var(--paper); border: 1px solid var(--rule); }
.fx-log-row i { width: 8px; height: 8px; border-radius: 50%; }
.fx-log-row i.fx-dot-amber { background: #f59e0b; }
.fx-log-row i.fx-dot-rose { background: #f43f5e; }
.fx-log-row b { font-weight: 600; color: var(--ink); }
.fx-log-row small { color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.fx-file-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule); }
.fx-file-row i { font-style: normal; font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 5px; background: #fee2e2; color: #b91c1c; }
.fx-file-row span { flex: 1; color: var(--ink); }
.fx-file-row svg { color: #047857; }

.fx-note { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; background: var(--paper-raised); border: 1px solid var(--rule); }
.fx-note i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); }
.fx-note i.is-warn { background: #f59e0b; }
.fx-note i.is-brand { background: var(--accent); }
.fx-note.is-on { font-weight: 600; color: var(--ink); }
.fx-note.is-off { opacity: .55; }
.fx-note.is-off span { text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.fx-note small { margin-inline-start: auto; font-size: 11px; color: var(--ink-mute); white-space: nowrap; }

.fx-lang { align-items: flex-start; }
.fx-lang-toggle {
  display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--rule); border-radius: 99px;
  background: var(--paper-raised); cursor: pointer; font: inherit;
}
.fx-lang-toggle span { padding: 3px 11px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--ink-mute); transition: background-color .2s ease, color .2s ease; }
.fx-lang-toggle[aria-pressed="false"] span:first-child,
.fx-lang-toggle[aria-pressed="true"] span:last-child { background: var(--ink); color: #fff; }
.fx-lang-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fx-lang-line { align-self: stretch; padding: 9px 11px; border-radius: 9px; background: var(--paper-raised); border: 1px solid var(--rule); font-size: 14px; font-weight: 600; color: var(--ink); }
.fx-lang-line.is-flip { animation: fx-flip .35s var(--ease-expo); }
@keyframes fx-flip { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.fx-phone { align-items: center; background: transparent; border: 0; padding: 0; }
.fx-phone-frame {
  display: flex; flex-direction: column; gap: 8px;
  width: 128px; padding: 18px 10px 12px; border-radius: 22px;
  border: 5px solid var(--ink); background: var(--paper-raised);
  position: relative;
}
.fx-phone-notch { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 34px; height: 6px; border-radius: 99px; background: var(--ink); }
.fx-phone-frame small { font-size: 11px; font-weight: 700; color: var(--ink); }
.fx-phone-bar { display: block; height: 5px; border-radius: 99px; background: var(--paper-sunk); overflow: hidden; }
.fx-phone-bar i { display: block; width: 60%; height: 100%; background: var(--accent); }
.fx-phone-btn { padding: 6px 0; border-radius: 8px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }

@media (max-width: 1100px) {
  .fx { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .fx-item { grid-template-columns: 1fr; gap: 12px; }
  .fx-panel-head { padding: 22px 20px 4px; }
  .fx-list { padding: 4px 20px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-lang-line.is-flip { animation: none; }
}

/* ==========================================================
   09 — للأقسام: «ملف الفصل» مرسوماً بجانب العنوان، ثم النقاط الست
   على دورة الفصل في ثلاث مراحل. فاتح كلّه، والأرقام توضيحية.
   ========================================================== */
.dx-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }

.dx-file {
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 22px 14px; border-radius: 22px;
  border: 1px solid var(--brand-200);
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(37, 99, 235, .10), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(37, 99, 235, .05), transparent 60%),
    #f6f9ff;
  box-shadow: 0 30px 60px -46px rgba(37, 99, 235, .55);
}
.dx-file-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--brand-100); }
.dx-file-name { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 14.5px; font-weight: 800; color: var(--ink); }
.dx-file-name svg { color: var(--accent); }

.dx-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.dx-chip.is-open { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.dx-chip.is-open i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.dx-chip.is-closed { background: var(--paper-sunk); color: var(--ink-mute); border: 1px solid var(--rule); }

.dx-row {
  display: grid; grid-template-columns: 9.5em minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 11px 0;
}
.dx-row + .dx-row { border-top: 1px dashed var(--brand-100); }
.dx-q { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.dx-row b { font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dx-bar { height: 7px; border-radius: 99px; background: var(--brand-100); overflow: hidden; }
.dx-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #60a5fa); }
[dir="rtl"] .dx-bar i { margin-inline-start: 0; background: linear-gradient(270deg, var(--accent), #60a5fa); }

.dx-row.is-stages { grid-template-columns: 9.5em minmax(0, 1fr); row-gap: 8px; }
.dx-stages { display: flex; gap: 3px; height: 9px; }
.dx-stages i { border-radius: 3px; }
.dx-stages i:nth-child(1), .dx-legend > span:nth-child(1) i { background: #bfdbfe; }
.dx-stages i:nth-child(2), .dx-legend > span:nth-child(2) i { background: #60a5fa; }
.dx-stages i:nth-child(3), .dx-legend > span:nth-child(3) i { background: #2563eb; }
.dx-stages i:nth-child(4), .dx-legend > span:nth-child(4) i { background: #1e3a8a; }
.dx-legend { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--ink-mute); }
.dx-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.dx-legend i { width: 8px; height: 8px; border-radius: 2px; }

.dx-row.is-warn b { color: #b45309; }
.dx-faces { display: flex; }
.dx-faces i {
  width: 24px; height: 24px; border-radius: 50%; margin-inline-start: -6px;
  border: 2px solid #f6f9ff; background: #fde68a;
  display: grid; place-items: center; font-style: normal; font-size: 9.5px; font-weight: 800; color: #92400e;
}
.dx-faces i:first-child { margin-inline-start: 0; }
.dx-faces i:nth-child(2) { background: #fcd34d; }
.dx-faces i:nth-child(3) { background: #fbbf24; }
.dx-faces i:nth-child(4) { background: #fff7ed; border-color: #fde68a; }

/* المراحل الثلاث: خطّ يصل عُقدها، وتحت كل عقدة ميزتان */
.dx-phases {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  position: relative;
}
.dx-phases::before {
  content: ""; position: absolute; top: 19px; inset-inline: 20px calc(33.333% - 32px);
  height: 2px; background: linear-gradient(90deg, var(--brand-200), var(--accent), var(--brand-200));
  opacity: .6;
}
.dx-phase { display: flex; flex-direction: column; gap: 12px; position: relative; }
.dx-phase-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; position: relative; z-index: 1; }
/* النص فوق الخطّ بخلفية الصفحة فلا يعبره الخطّ */
.dx-phase-head > div { background: var(--paper); padding-inline-end: 14px; }
.dx-node {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--paper-raised); border: 2px solid var(--accent); color: var(--accent);
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  box-shadow: 0 0 0 6px var(--paper);
}
.dx-phase-head small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; color: var(--accent); }
.dx-phase-head h3 { margin: 2px 0 0; font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--ink); }

.dx-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 18px; border-radius: 18px;
  border: 1px solid var(--rule); background: var(--paper-raised);
  transition: border-color .2s ease, box-shadow .25s ease, transform .25s var(--ease-expo);
}
.dx-item:hover { border-color: var(--brand-200); box-shadow: 0 18px 36px -28px rgba(37, 99, 235, .5); transform: translateY(-2px); }
.dx-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.dx-text b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 5px; line-height: 1.55; }
.dx-text > span { display: block; font-size: 13.5px; line-height: 1.85; color: var(--ink-mute); }

/* الأدلّة الصغيرة تحت كل ميزة */
.dx-proof {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--rule);
  font-size: 12px; color: var(--ink-soft);
}
.dx-file-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px 4px 5px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); font-weight: 600; }
[dir="rtl"] .dx-file-chip { padding: 4px 5px 4px 9px; }
.dx-file-chip i { font-style: normal; font-size: 9px; font-weight: 800; padding: 3px 5px; border-radius: 5px; background: #dcfce7; color: #15803d; }
.dx-arrow { display: inline-grid; color: var(--ink-mute); }
[dir="ltr"] .dx-arrow svg { transform: scaleX(-1); }
.dx-count { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.dx-type { padding: 4px 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; }
.dx-seats { display: inline-flex; gap: 4px; }
.dx-seats i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--brand-200); }
.dx-seats i.on { background: var(--accent); border-color: var(--accent); }
.dx-range { font-weight: 700; color: var(--ink-mute); }
.dx-meter { flex: 1 1 70px; max-width: 110px; height: 7px; border-radius: 99px; background: var(--brand-100); overflow: hidden; }
.dx-meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.dx-reject { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; background: #fff1f2; color: #be123c; font-weight: 700; }
.dx-log { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--rule); background: var(--paper); font-weight: 600; color: var(--ink); }
.dx-log > i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; }
.dx-log small { color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.dx-log svg { color: var(--ink-mute); }
.dx-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 8px 18px -12px rgba(37, 99, 235, .8); }
.dx-btn bdi { opacity: .75; font-weight: 600; }

@media (max-width: 1100px) {
  .dx-head { grid-template-columns: 1fr; gap: 32px; }
  .dx-file { max-width: 560px; }
}
@media (max-width: 900px) {
  .dx-phases { grid-template-columns: 1fr; gap: 28px; }
  /* على الجوال: الخطّ عموديّ بجانب العُقد */
  .dx-phases::before { top: 20px; bottom: 20px; inset-inline: 19px auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--brand-200), var(--accent), var(--brand-200)); }
  .dx-item { margin-inline-start: 52px; }
}
@media (max-width: 560px) {
  .dx-file { padding: 16px 16px 10px; }
  .dx-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .dx-row .dx-bar, .dx-row .dx-faces { grid-column: 1 / -1; grid-row: 2; }
  .dx-row.is-stages { grid-template-columns: 1fr; }
  .dx-legend { grid-column: 1; }
  .dx-item { margin-inline-start: 0; padding: 16px; }
  .dx-phases::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dx-item, .dx-item:hover { transition: none; transform: none; }
}

/* ==========================================================
   08 — الأسئلة الشائعة: عمود ثابت بالعنوان والفلاتر وبطاقة «راسلنا»،
   وبجانبه الأسئلة بطاقاتٍ فاتحة؛ المفتوح بلمعة زرقاء.
   ========================================================== */
.fq { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 56px; align-items: start; }
.fq-side { display: flex; flex-direction: column; gap: 22px; }
.fq-side h2 { margin: 0; }
.fq-lead { margin: -8px 0 0; color: var(--ink-mute); font-size: 15px; line-height: 1.9; max-width: 44ch; }

.fq-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fq-filters[hidden] { display: none; }
.fq-filter {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 99px;
  border: 1px solid var(--rule); background: var(--paper-raised);
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.fq-filter svg { color: var(--ink-mute); transition: color .2s ease; }
.fq-filter:hover { border-color: var(--brand-200); color: var(--accent-deep); }
.fq-filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.fq-filter[aria-pressed="true"] svg { color: #fff; }
.fq-filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fq-ask {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center;
  padding: 20px; border-radius: 20px;
  border: 1px solid var(--brand-200);
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(37, 99, 235, .10), transparent 60%),
    #f6f9ff;
}
.fq-ask-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--accent); color: #fff; box-shadow: 0 10px 20px -12px rgba(37, 99, 235, .8); }
.fq-ask b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 800; color: var(--ink); }
.fq-ask div span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.7; color: var(--ink-mute); }
.fq-ask-btn {
  grid-column: 1 / -1; justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 11px;
  background: var(--paper-raised); border: 1px solid var(--brand-200);
  font-size: 13.5px; font-weight: 700; color: var(--accent-deep);
  transition: background-color .2s ease, color .2s ease, gap .2s var(--ease-expo);
}
.fq-ask-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; gap: 11px; }
[dir="ltr"] .fq-ask-btn svg { transform: scaleX(-1); }

.fq-list { display: flex; flex-direction: column; gap: 10px; }
.fq-item {
  border: 1px solid var(--rule); border-radius: 16px; background: var(--paper-raised);
  transition: border-color .2s ease, background-color .25s ease, box-shadow .25s ease;
}
.fq-item[hidden] { display: none; }
.fq-item:hover { border-color: var(--brand-200); }
.fq-item[open]:not(.is-closing) {
  border-color: var(--brand-200);
  background: linear-gradient(180deg, #f6f9ff, var(--paper-raised) 80%);
  box-shadow: 0 20px 40px -32px rgba(37, 99, 235, .55);
}
.fq-item summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 18px 20px; cursor: pointer; list-style: none;
  border-radius: 16px;
}
.fq-item summary::-webkit-details-marker { display: none; }
.fq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fq-num {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--paper-sunk); color: var(--ink-mute);
  font-family: var(--font-display); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: background-color .2s ease, color .2s ease;
}
.fq-item[open]:not(.is-closing) .fq-num { background: var(--accent); color: #fff; }
.fq-q { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; line-height: 1.6; color: var(--ink); }
.fq-sign {
  position: relative; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--rule); color: var(--ink-mute);
  transition: transform .3s var(--ease-expo), border-color .2s ease, color .2s ease, background-color .2s ease;
}
.fq-sign::before, .fq-sign::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 11px; height: 1.6px; border-radius: 2px;
  background: currentColor; transform: translate(-50%, -50%);
}
.fq-sign::after { transform: translate(-50%, -50%) rotate(90deg); }
.fq-item:hover .fq-sign { border-color: var(--brand-200); color: var(--accent); }
.fq-item[open]:not(.is-closing) .fq-sign { transform: rotate(45deg); background: var(--accent-soft); border-color: var(--brand-200); color: var(--accent); }

.fq-body { overflow: hidden; }
.fq-body p {
  margin: 0; padding: 0 20px 20px calc(20px + 34px + 16px);
  font-size: 14.5px; line-height: 1.95; color: var(--ink-mute); max-width: 72ch;
}
[dir="rtl"] .fq-body p { padding: 0 calc(20px + 34px + 16px) 20px 20px; }
.fq-steps {
  list-style: none; margin: -6px 0 0; padding: 0 20px 20px calc(20px + 34px + 16px);
  display: flex; flex-wrap: wrap; gap: 8px;
}
[dir="rtl"] .fq-steps { padding: 0 calc(20px + 34px + 16px) 20px 20px; }
.fq-steps li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; border-radius: 99px;
  background: var(--paper-raised); border: 1px solid var(--brand-100);
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
[dir="rtl"] .fq-steps li { padding: 5px 5px 5px 12px; }
.fq-steps i {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 800;
}

@media (min-width: 1001px) {
  .fq-side { position: sticky; top: 110px; }
}
@media (max-width: 1000px) {
  /* عمود واحد: بطاقة «راسلنا» تنزل بعد الأسئلة، فمن لم يجد جوابه يجدها هناك */
  .fq { grid-template-columns: 1fr; gap: 20px; }
  .fq-side { display: contents; }
  .fq-list { margin-top: 8px; }
  .fq-ask { order: 1; margin-top: 8px; }
}
@media (max-width: 560px) {
  .fq-item summary { gap: 12px; padding: 16px; }
  .fq-num { width: 30px; height: 30px; }
  .fq-q { font-size: 14.5px; }
  .fq-body p, [dir="rtl"] .fq-body p, .fq-steps, [dir="rtl"] .fq-steps { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .fq-sign, .fq-item { transition: none; }
}

/* بطاقة الدرجة في الهيرو: «لم تُرصد بعد» قبل الرصد، و«ممتاز» بعده */
.bento-grade-label.is-final { display: none; }
.bento.is-graded .bento-grade-label.is-final { display: inline-flex; }
.bento.is-graded .bento-grade-label.is-pending { display: none; }
.bento-grade-label.is-pending { background: var(--paper-sunk); color: var(--ink-mute); opacity: 1; transform: none; transition: none; }

/* زر الأعلى على الجوال: أصغر وأقرب للحافة */
@media (max-width: 640px) {
  .back-top { width: 40px; height: 40px; inset-inline-end: 14px; bottom: 14px; }
}

/* ==========================================================
   الهيرو — حياة أكثر: كلمة تتبدّل، وهالة تنساب، وتنبيهات حيّة
   ========================================================== */

/* «من الفكرة إلى …» — الكلمات في خانة واحدة فعرضها عرض أطولها، ولا يتزحزح السطر */
.rot { display: inline-grid; vertical-align: bottom; }
.rot-word {
  grid-area: 1 / 1;
  justify-self: start;
  opacity: 0;
  transform: translateY(.45em);
  filter: blur(6px);
  transition: opacity .5s var(--ease-expo), transform .5s var(--ease-expo), filter .5s var(--ease-expo);
}
.rot-word.is-on { opacity: 1; transform: none; filter: none; }
.rot-word.is-off { opacity: 0; transform: translateY(-.45em); filter: blur(6px); }
/* هالة تنساب ببطء خلف العنوان والبنتو — ثلاث بقع مموّهة بألوان الهوية */
.hero-aurora { position: absolute; inset: -20% -10% 0; filter: blur(60px); opacity: .55; }
.hero-aurora i { position: absolute; border-radius: 50%; }
.hero-aurora i:nth-child(1) { width: 38vw; height: 38vw; top: 4%; inset-inline-start: 4%; background: rgba(37, 99, 235, .22); animation: aurora-a 22s ease-in-out infinite alternate; }
.hero-aurora i:nth-child(2) { width: 30vw; height: 30vw; top: 30%; inset-inline-start: 36%; background: rgba(139, 92, 246, .16); animation: aurora-b 26s ease-in-out infinite alternate; }
.hero-aurora i:nth-child(3) { width: 26vw; height: 26vw; top: 0; inset-inline-end: 6%; background: rgba(96, 165, 250, .2); animation: aurora-c 30s ease-in-out infinite alternate; }
@keyframes aurora-a { to { transform: translate(8vw, 6vh) scale(1.15); } }
@keyframes aurora-b { to { transform: translate(-10vw, -4vh) scale(.9); } }
@keyframes aurora-c { to { transform: translate(-6vw, 10vh) scale(1.1); } }

/* زرّ البدء: لمعة تعبره عند المرور */
.hero-ctas .btn-primary { position: relative; overflow: hidden; }
.hero-ctas .btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease-expo);
}
.hero-ctas .btn-primary:hover::after { transform: translateX(120%); }

@media (max-width: 640px) {
  .hero-aurora { opacity: .4; }
}

@media (prefers-reduced-motion: reduce) {
  .rot-word, .hero-aurora i, .hero-ctas .btn-primary::after { animation: none; transition: none; }
  .hero-aurora { display: none; }
}

/* ==========================================================
   الهيرو: رحلة المشروع — بملء الشاشة
   العنوان في الأعلى بالمنتصف، وتحته مشهد مرسوم يعبر الشاشة كلها.
   ========================================================== */
.hero.hero--journey { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
.hero--journey .hero-rules { display: none; }
.hj-top {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding-top: clamp(96px, 13vh, 140px);
  text-align: center;
}
.hero--journey h1 { max-width: 20ch; margin: 0 auto; font-size: clamp(2.1rem, 4.6vw, 4rem); line-height: 1.18; }
.hero--journey .ink-line > span { display: inline; }
.hero--journey .ink-line { display: block; }
.hero--journey .rot-word { justify-self: start; }
.hero--journey .hero-sub { max-width: 58ch; margin: 0 auto; }
.hero--journey .hero-ctas { justify-content: center; }
.hero--journey .hero-figures { justify-content: center; gap: 0; margin-top: 6px; border-top: 0; }
.hero--journey .hero-figures .figure { flex: 0 1 auto; padding: 0 26px; text-align: center; }

/* المشهد */
.hj-scene { position: relative; z-index: 1; flex: 1; min-height: 300px; margin-top: 8px; }
.hj-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hj-ground { stroke: rgba(9, 9, 11, .06); stroke-width: 1; }
.hj-path { fill: none; stroke: #cbd5e1; stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; }
.hj-trail { fill: none; stroke: url(#hj-trail); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 4px 10px rgba(37, 99, 235, .35)); }

.hj-node { fill: #fff; stroke: #cbd5e1; stroke-width: 2; transition: fill .4s ease, stroke .4s ease; }
.hj-ico { fill: none; stroke: #94a3b8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s ease; }
.hj-halo { opacity: 0; transition: opacity .4s ease; }
.hj-station.is-done .hj-node { fill: #2563eb; stroke: #2563eb; }
.hj-station.is-done .hj-ico { stroke: #fff; }
.hj-station.is-now .hj-node { fill: #fff; stroke: #2563eb; stroke-width: 3; }
.hj-station.is-now .hj-ico { stroke: #2563eb; }
.hj-station.is-now .hj-halo { opacity: 1; animation: hj-pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes hj-pulse { 50% { transform: scale(1.25); opacity: .55; } }

/* المشي: الساقان تتأرجحان والجسم يهتزّ قليلاً — حين يتحرّك الفريق وحده */
.hj-leg, .hj-arm { transform-box: fill-box; transform-origin: 50% 8%; }
.is-walking .hj-leg.is-a { animation: hj-step .42s ease-in-out infinite alternate; }
.is-walking .hj-leg.is-b { animation: hj-step .42s ease-in-out infinite alternate-reverse; }
.is-walking .hj-arm { animation: hj-step .42s ease-in-out infinite alternate-reverse; }
.is-walking .hj-walker > use { animation: hj-bob .42s ease-in-out infinite alternate; }
.is-walking .hj-walker:nth-child(2) > use { animation-delay: .14s; }
.is-walking .hj-walker:nth-child(3) > use { animation-delay: .28s; }
@keyframes hj-step { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes hj-bob { to { transform: translateY(-3px); } }
/* المشرف يلوّح عند المحطة */
.hj-wave { transform-box: fill-box; transform-origin: 50% 0; animation: hj-wave 2.4s ease-in-out infinite; }
@keyframes hj-wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-28deg); } 80% { transform: rotate(-8deg); } 90% { transform: rotate(-26deg); } }

/* القبعات: مخفية حتى التخرّج، ثم تُرمى وتدور وتعود */
.hj-cap { opacity: 0; transform-box: fill-box; transform-origin: center; }
.is-graduated .hj-cap { opacity: 1; animation: hj-toss 1.5s cubic-bezier(.2, .7, .3, 1) both; }
.is-graduated .hj-cap.is-2 { animation-delay: .12s; }
.is-graduated .hj-cap.is-3 { animation-delay: .24s; }
@keyframes hj-toss {
  0% { transform: translateY(30px) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  55% { transform: translateY(-70px) rotate(300deg); }
  100% { transform: translateY(0) rotate(360deg); opacity: 1; }
}

/* أسماء المحطات */
.hj-labels, .hj-cards { position: absolute; inset: 0; pointer-events: none; }
.hj-label {
  position: absolute; top: 0; left: 0;
  white-space: nowrap; font-size: 12.5px; font-weight: 700; color: var(--ink-mute);
  transition: color .3s ease, opacity .3s ease;
}
.hj-label.is-done { color: var(--ink-soft); }
.hj-label.is-now { color: var(--accent); }
.hj-label.is-out { opacity: 0; }

/* البطاقة الحيّة فوق المحطة */
.hj-card {
  position: absolute; top: 0; left: 0;
  display: flex; align-items: center; gap: 10px;
  max-width: 280px; padding: 10px 14px 10px 12px;
  border: 1px solid rgba(9, 9, 11, .08); border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 20px 44px -20px rgba(15, 23, 42, .4), 0 2px 6px rgba(15, 23, 42, .05);
  text-align: start; white-space: nowrap;
  opacity: 0; scale: .92; translate: 0 10px;
  transition: opacity .45s var(--ease-expo), scale .45s var(--ease-expo), translate .45s var(--ease-expo);
}
.hj-card.is-show { opacity: 1; scale: 1; translate: 0 0; }
.hj-card b { display: block; font-size: 13px; color: var(--ink); }
.hj-card small { display: block; font-size: 11.5px; color: var(--ink-mute); }
.hj-card-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; }
.hj-card-ico svg { width: 17px; height: 17px; }
.hj-card-ico.is-amber { background: #fffbeb; color: #d97706; }
.hj-card-ico.is-blue { background: #eff6ff; color: #2563eb; }
.hj-card-ico.is-green { background: #ecfdf5; color: #059669; }
.hj-card-ico.is-violet { background: #f5f3ff; color: #7c3aed; }
.hj-card-ico.is-gold { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #78350f; }

/* قصاصات التخرّج */
.hj-confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.hj-confetti i {
  position: absolute; width: 7px; height: 11px; border-radius: 2px;
  animation: hj-confetti 1.7s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes hj-confetti {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}

/* نهاية الرحلة: يخبو المشهد لحظة ثم يبدأ من جديد */
.hj-scene .hj-svg, .hj-scene .hj-labels { transition: opacity .5s ease; }
.hj-scene.is-fading .hj-svg, .hj-scene.is-fading .hj-labels { opacity: 0; }

@media (max-width: 760px) {
  .hj-top { padding-top: 92px; gap: 14px; }
  .hero--journey .hero-figures .figure { padding: 0 12px; }
  .hj-scene { min-height: 320px; }
  .hj-card { max-width: 230px; padding: 8px 10px; }
  .hj-label { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .hj-leg, .hj-arm, .hj-walker > use, .hj-wave, .hj-halo, .hj-cap, .hj-confetti i { animation: none !important; }
  .is-graduated .hj-cap { opacity: 1; }
}

/* قائمة المحطات لقارئ الشاشة وحده */
.hj-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* سهم «اكتشف المزيد» يشير إلى الأمام في الاتجاهين */
[dir="ltr"] .hero-ctas .btn-link svg { transform: scaleX(-1); }

/* ==========================================================
   الخدمات (02): قصّة متحركة — قائمة قصيرة ومسرح ثابت بجانبها
   ========================================================== */
.svx { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }

/* القائمة: كل خدمة تأخذ مسافة تمرير، والنشطة تكبر وتُضاء */
.svx-list { list-style: none; margin: 0; padding: 0; position: relative; }
.svx-list::before {
  content: ""; position: absolute; inset-block: 14vh; inset-inline-start: 27px; width: 2px;
  background: linear-gradient(var(--rule), var(--rule)) no-repeat; border-radius: 2px;
}
.svx-item { min-height: 44vh; display: flex; align-items: center; }
.svx-item:first-child { min-height: 34vh; align-items: flex-start; padding-top: 6vh; }
.svx-item:last-child { min-height: 52vh; }
.svx-btn {
  display: grid; grid-template-columns: auto auto 1fr; align-items: start; gap: 4px 14px;
  width: 100%; padding: 0; border: 0; background: none; text-align: start; font: inherit; color: inherit; cursor: pointer;
  opacity: .34; transform: scale(.97); transform-origin: right center;
  transition: opacity .45s var(--ease-expo), transform .45s var(--ease-expo);
}
[dir="ltr"] .svx-btn { transform-origin: left center; }
.svx-item.is-active .svx-btn, .svx-btn:hover, .svx-btn:focus-visible { opacity: 1; transform: none; outline: 0; }
.svx-btn:focus-visible .svx-ico { box-shadow: 0 0 0 3px var(--accent-soft); }
.svx-num { grid-row: span 2; width: 0; overflow: hidden; } /* للترتيب الصوتي — الرقم مرئي في الأيقونة */
.svx-ico {
  position: relative; z-index: 1; grid-row: span 2;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px;
  border: 1px solid var(--rule); background: var(--paper-raised); color: var(--ink-mute);
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, box-shadow .45s ease;
}
.svx-ico svg { width: 24px; height: 24px; }
.svx-item.is-active .svx-ico { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 16px 32px -14px rgba(37, 99, 235, .7); }
.svx-item.is-past .svx-ico { color: var(--accent); border-color: var(--brand-200); }
.svx-text { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.svx-text b { font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.7rem); font-weight: 800; line-height: 1.35; color: var(--ink); }
.svx-text span { font-size: 15px; line-height: 1.8; color: var(--ink-mute); max-width: 40ch; }

/* المسرح: ثابت أثناء التمرير، بأسلوب الهيرو */
.svx-stage-wrap { position: sticky; top: calc(50vh - 250px); }
.svx-stage {
  position: relative; height: 500px; overflow: hidden;
  border: 1px solid var(--rule); border-radius: 28px;
  background:
    radial-gradient(70% 60% at 80% 10%, rgba(37, 99, 235, .10), transparent 70%),
    radial-gradient(60% 50% at 10% 100%, rgba(124, 58, 237, .08), transparent 70%),
    var(--paper-raised);
  box-shadow: 0 40px 80px -48px rgba(15, 23, 42, .35);
}
.svx-stage::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(9, 9, 11, .1) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 45%, #000, transparent 85%); mask-image: radial-gradient(70% 70% at 50% 45%, #000, transparent 85%);
  opacity: .5;
}
.svx-glow { position: absolute; width: 60%; height: 60%; inset-inline-end: -10%; top: -10%; border-radius: 50%; background: rgba(96, 165, 250, .25); filter: blur(70px); animation: aurora-b 18s ease-in-out infinite alternate; }

.svx-scene {
  position: absolute; inset: 0; padding: 30px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.98);
  transition: opacity .5s var(--ease-expo), transform .5s var(--ease-expo), visibility 0s .5s;
}
.svx-scene.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .55s var(--ease-expo) .1s, transform .55s var(--ease-expo) .1s, visibility 0s; }

/* قطع مشتركة */
.sx-card {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1px solid rgba(9, 9, 11, .07); border-radius: 16px;
  background: rgba(255, 255, 255, .95); box-shadow: 0 18px 40px -24px rgba(15, 23, 42, .35);
}
.sx-card b { display: block; font-size: 14px; color: var(--ink); }
.sx-card small { display: block; font-size: 12px; color: var(--ink-mute); }
.sx-av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #0d9488; color: #fff; font-size: 12px; font-weight: 800; }
.sx-av.is-sup { background: #1e3a8a; }
.sx-av.is-2 { background: #b45309; }
.sx-chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-deep, var(--accent)); font-size: 12.5px; font-weight: 700; }
.sx-chip.is-strong { background: #ecfdf5; color: #047857; }
.sx-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sx-people { width: min(100%, 380px); height: auto; overflow: visible; }

/* ظهور العناصر داخل المشهد: يتأخّر كلٌّ بـ --d */
.sx-in { opacity: 0; transform: translateY(10px); }
.is-active .sx-in { animation: sx-in .55s var(--ease-expo) forwards; animation-delay: var(--d, 0s); }
@keyframes sx-in { to { opacity: 1; transform: none; } }
.sx-pop { opacity: 0; }
.is-active .sx-pop { animation: sx-pop .6s cubic-bezier(.34, 1.56, .64, 1) forwards; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes sx-pop { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }

/* ١) الفريق */
.sx-top { min-width: min(100%, 330px); }
.sx-seats { margin-inline-start: auto; text-align: center; padding: 4px 10px; border-radius: 12px; background: var(--accent-soft); }
.sx-seats b { font-size: 20px; color: var(--accent); font-variant-numeric: tabular-nums; }
.sx-seats small { font-size: 11px; }
.sx-alert { gap: 10px; background: #fffbeb; border-color: #fde68a; font-size: 13px; color: #92400e; font-weight: 600; }
.sx-alert-ico { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #f59e0b; color: #fff; font-weight: 900; }

/* ٢) التسليم والمراجعة */
.svx-scene[data-scene="1"] .sx-people { margin-top: 70px; }
.sx-file {
  position: absolute; top: 46%; inset-inline-start: 18%;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: #fff; border: 1px solid rgba(9, 9, 11, .08); box-shadow: 0 16px 30px -18px rgba(15, 23, 42, .45);
}
.sx-file b { font-size: 13px; } .sx-file small { font-size: 11px; color: var(--ink-mute); }
.sx-file-ext { display: grid; place-items: center; width: 34px; height: 38px; border-radius: 8px; background: #fff1f2; color: #be123c; font-size: 10px; font-weight: 900; }
.is-active .sx-file { animation: sx-fly 1.6s var(--ease-expo) .4s both; }
@keyframes sx-fly {
  0% { opacity: 0; transform: translate(0, 20px) scale(.9); }
  25% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 1; transform: translate(calc(var(--fly, -1) * 46%), -60px) scale(.9) rotate(-4deg); }
}
[dir="ltr"] .sx-file { --fly: 1; }
.sx-file { --fly: -1; }
.sx-stamp {
  position: absolute; top: 18%; inset-inline-end: 12%;
  padding: 8px 16px; border: 2.5px solid currentColor; border-radius: 10px;
  font-size: 16px; font-weight: 900; letter-spacing: .5px; background: rgba(255, 255, 255, .9);
  opacity: 0; transform: scale(1.8) rotate(-8deg);
}
.sx-stamp.is-warn { color: #d97706; }
.sx-stamp.is-ok { color: #059669; }
.is-active .sx-stamp.is-warn { animation: sx-stamp-warn 1.6s var(--ease-expo) 2s both; }
.is-active .sx-stamp.is-ok { animation: sx-stamp .5s var(--ease-expo) 3.5s both; }
@keyframes sx-stamp { to { opacity: 1; transform: scale(1) rotate(-8deg); } }
@keyframes sx-stamp-warn { 0% { opacity: 0; transform: scale(1.8) rotate(-8deg); } 25%, 75% { opacity: 1; transform: scale(1) rotate(-8deg); } 100% { opacity: 0; transform: scale(1) rotate(-8deg); } }
.sx-progress { position: absolute; bottom: 26px; inset-inline: 30px; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 13px; color: var(--ink-mute); }
.sx-progress b { font-size: 16px; color: var(--accent); font-variant-numeric: tabular-nums; }
.sx-progress i { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.sx-progress em { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #60a5fa); transition: width .9s var(--ease-expo) 3.6s; }
.is-active .sx-progress em { width: 60%; }

/* ٣) الخطة */
.sx-plan { flex-direction: column; align-items: stretch; width: min(100%, 380px); padding: 18px 20px; }
.sx-plan-title { font-size: 15px !important; margin-bottom: 6px; }
.sx-timeline { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 12px; }
.sx-timeline::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 6px; width: 2px; background: var(--brand-200); }
.sx-timeline li { position: relative; display: flex; align-items: center; gap: 10px; padding-inline-start: 22px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.sx-timeline li i { position: absolute; inset-inline-start: 0; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.sx-timeline li small { margin-inline-start: auto; font-size: 12px; font-weight: 600; color: var(--ink-mute); }
.sx-tpl { padding: 2px 7px; border-radius: 6px; background: #eff6ff; color: #1d4ed8; font-style: normal; font-size: 10px; font-weight: 900; }

/* ٤) النقاش */
.sx-chat { flex-direction: column; align-items: stretch; gap: 10px; width: min(100%, 380px); padding: 16px; }
.sx-chat-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.sx-lock { font-size: 11.5px; font-weight: 700; color: var(--ink-mute); }
.sx-msg { display: flex; align-items: flex-end; gap: 8px; }
.sx-msg p { margin: 0; padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: var(--paper-sunk); font-size: 13.5px; color: var(--ink); line-height: 1.6; }
[dir="rtl"] .sx-msg p { border-radius: 16px 16px 4px 16px; }
.sx-msg.is-mine { justify-content: flex-end; }
.sx-msg.is-mine p { background: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; }
[dir="rtl"] .sx-msg.is-mine p { border-radius: 16px 16px 16px 4px; }
.sx-mention { color: var(--accent); font-weight: 800; }
.sx-typing { display: inline-flex; gap: 4px; padding: 10px 14px; border-radius: 16px; background: var(--paper-sunk); align-self: flex-start; }
.sx-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mute); animation: sx-dot 1s ease-in-out infinite; }
.sx-typing i:nth-child(2) { animation-delay: .15s; } .sx-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sx-dot { 50% { transform: translateY(-4px); opacity: .5; } }

/* ٥) المناقشة والدرجة */
.sx-cal { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 50px; height: 54px; border-radius: 12px; background: var(--accent); color: #fff; }
.sx-cal b { color: #fff !important; font-size: 20px !important; line-height: 1; }
.sx-cal small { color: rgba(255, 255, 255, .85) !important; font-size: 10px !important; }
.sx-grade { flex-direction: column; gap: 4px; padding: 14px 26px; }
.sx-grade b { font-size: 40px !important; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.sx-grade b small { display: inline !important; font-size: 15px !important; }
.sx-grade-tag { padding: 3px 12px; border-radius: 99px; background: #ecfdf5; color: #047857; font-size: 12px; font-weight: 800; opacity: 0; }
.is-active .sx-grade-tag { animation: sx-in .5s var(--ease-expo) 2.3s forwards; }

/* ٦) الاستكشاف */
.sx-search { width: min(100%, 360px); gap: 10px; font-size: 15px; font-weight: 700; }
.sx-search svg { width: 18px; height: 18px; color: var(--ink-mute); }
.sx-caret { width: 2px; height: 18px; background: var(--accent); animation: sx-blink 1s steps(2) infinite; }
@keyframes sx-blink { 50% { opacity: 0; } }
.sx-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(100%, 380px); }
.sx-proj { padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid rgba(9, 9, 11, .07); box-shadow: 0 10px 24px -18px rgba(15, 23, 42, .4); transition: opacity .5s ease, transform .5s var(--ease-expo), border-color .5s ease; }
.sx-proj b { display: block; font-size: 13px; color: var(--ink); }
.sx-proj small { font-size: 11.5px; color: var(--ink-mute); }
.is-typed .sx-proj.is-miss { opacity: .25; transform: scale(.95); }
.is-typed .sx-proj.is-hit { border-color: var(--accent); box-shadow: 0 14px 30px -18px rgba(37, 99, 235, .6); }

/* مؤشّر النقاط */
.svx-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.svx-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--rule-strong); transition: width .35s var(--ease-expo), background-color .35s ease; }
.svx-dots i.is-on { width: 22px; background: var(--accent); }
.svx-scene[data-scene="1"] ~ .svx-dots { bottom: 8px; }

/* الجوال: المسرح يثبت أعلى الشاشة، والقائمة تمرّ تحته */
@media (max-width: 900px) {
  .svx { grid-template-columns: 1fr; gap: 0; }
  .svx-stage-wrap { order: -1; top: 68px; z-index: 3; padding-bottom: 8px; background: linear-gradient(var(--paper) 85%, transparent); }
  .svx-stage { height: 330px; border-radius: 22px; }
  .svx-scene { padding: 18px; gap: 10px; transform-origin: center; }
  .svx-scene > * { scale: .86; }
  .svx-list::before { display: none; }
  .svx-item, .svx-item:first-child, .svx-item:last-child { min-height: 46vh; align-items: center; padding-top: 0; }
  .svx-ico { width: 46px; height: 46px; border-radius: 14px; }
  .svx-text span { font-size: 14px; }
}
/* بلا JavaScript: القائمة كاملة مقروءة */
.svx:not(.is-enhanced) .svx-btn { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .svx-scene, .svx-btn, .sx-progress em { transition: none; }
  .sx-in, .sx-pop, .sx-grade-tag { opacity: 1; transform: none; animation: none !important; }
  .is-active .sx-stamp.is-ok { animation: none; opacity: 1; transform: scale(1) rotate(-8deg); }
  .is-active .sx-stamp.is-warn { animation: none; }
  .is-active .sx-file { animation: none; opacity: 1; }
  .svx-glow, .sx-typing i, .sx-caret { animation: none; }
}

.sx-file-text { display: flex; flex-direction: column; }

/* ==========================================================
   المميزات (03): محور حول جهاز — بروح الهيرو
   ========================================================== */
.fh {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center; gap: 28px; position: relative;
}
.fh-pills { display: contents; list-style: none; margin: 0; padding: 0; }
.fh-pill { grid-row: auto; }
.fh-pill.is-a { grid-column: 1; }
.fh-pill.is-b { grid-column: 3; }
.fh-pill:nth-child(1), .fh-pill:nth-child(4) { grid-row: 1; }
.fh-pill:nth-child(2), .fh-pill:nth-child(5) { grid-row: 2; }
.fh-pill:nth-child(3), .fh-pill:nth-child(6) { grid-row: 3; }
.fh-pill button {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--rule); border-radius: 18px;
  background: var(--paper-raised); color: inherit; font: inherit; text-align: start; cursor: pointer;
  transition: border-color .35s ease, box-shadow .35s ease, transform .35s var(--ease-expo), background-color .35s ease;
}
.fh-pill button:hover, .fh-pill button:focus-visible { border-color: var(--brand-200); outline: 0; }
.fh-pill.is-on button { border-color: var(--accent); background: #fff; box-shadow: 0 18px 40px -24px rgba(37, 99, 235, .55); transform: translateX(var(--nudge, -6px)); }
[dir="ltr"] .fh-pill.is-a.is-on button { --nudge: 6px; }
[dir="rtl"] .fh-pill.is-a.is-on button { --nudge: -6px; }
[dir="rtl"] .fh-pill.is-b.is-on button { --nudge: 6px; }
[dir="ltr"] .fh-pill.is-b.is-on button { --nudge: -6px; }
.fh-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--paper-sunk); color: var(--ink-mute); transition: background-color .35s ease, color .35s ease; }
.fh-ico svg { width: 21px; height: 21px; }
.fh-pill.is-on .fh-ico { background: var(--accent); color: #fff; }
.fh-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fh-txt b { font-family: var(--font-display); font-size: 15.5px; font-weight: 800; color: var(--ink); }
.fh-txt small { font-size: 13px; color: var(--ink-mute); }

/* الجهاز */
.fh-device { grid-column: 2; grid-row: 1 / span 3; position: relative; padding-bottom: 26px; }
.fh-screen {
  position: relative; aspect-ratio: 16 / 11; overflow: hidden;
  border: 10px solid #0f172a; border-radius: 22px;
  background:
    radial-gradient(70% 60% at 80% 0%, rgba(37, 99, 235, .12), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(124, 58, 237, .08), transparent 70%),
    #f8fafc;
  box-shadow: 0 50px 90px -50px rgba(15, 23, 42, .55);
}
.fh-bar { display: flex; align-items: center; gap: 5px; padding: 8px 12px; background: rgba(255, 255, 255, .8); border-bottom: 1px solid var(--rule); font-size: 11px; color: var(--ink-mute); }
.fh-bar i { width: 8px; height: 8px; border-radius: 50%; background: #e2e8f0; }
.fh-bar i:nth-child(1) { background: #fda4af; } .fh-bar i:nth-child(2) { background: #fde68a; } .fh-bar i:nth-child(3) { background: #86efac; }
.fh-bar span { margin-inline-start: auto; direction: ltr; }
.fh-base { height: 14px; margin: -2px 6% 0; border-radius: 0 0 16px 16px; background: linear-gradient(#cbd5e1, #94a3b8); }
.fh-view {
  position: absolute; inset: 40px 0 0; display: grid; place-items: center; padding: 22px;
  opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .45s var(--ease-expo), transform .45s var(--ease-expo);
}
.fh-view.is-on { opacity: 1; transform: none; }
.fh-view .fx-proof { width: min(100%, 340px); transform: scale(1.12); }
.fh-buddy { position: absolute; bottom: 4px; inset-inline-start: -46px; width: 74px; height: 116px; overflow: visible; animation: hj-bob 1.6s ease-in-out infinite alternate; }
[dir="rtl"] .fh-buddy { transform: scaleX(-1); }

@media (max-width: 980px) {
  .fh { grid-template-columns: 1fr; gap: 18px; }
  .fh-device { grid-column: 1; grid-row: 1; max-width: 520px; width: 100%; margin: 0 auto 10px; }
  .fh-pills { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; grid-row: 2; }
  .fh-pill { flex: 0 0 74%; }
  .fh-pill.is-on button { transform: none; }
  .fh-buddy { display: none; }
  .fh-view .fx-proof { transform: none; }
}

/* ==========================================================
   كيف يعمل (04): درج يصعده طالب
   ========================================================== */
.st { position: relative; padding-top: 40px; }
.st-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 14px; }
/* الدرجات تقف على خطّ واحد (الصف الأول) والشرح تحتها (الثاني) — الطالب فوق الدرجة لا فوق النصّ */
.st-steps { grid-template-rows: auto auto; row-gap: 18px; }
.st-step { display: contents; }
.st-block { grid-row: 1; align-self: end; }
.st-copy { grid-row: 2; align-self: start; }
.st-copy { display: flex; flex-direction: column; gap: 4px; padding-inline: 6px; opacity: .45; transform: translateY(8px); transition: opacity .45s ease, transform .45s var(--ease-expo); }
.st-step.is-on .st-copy { opacity: 1; transform: none; }
.st-num { font-family: var(--font-display); font-size: 13px; font-weight: 800; color: var(--ink-mute); }
.st-step.is-on .st-num { color: var(--accent); }
.st-copy b { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.4; }
.st-copy small { font-size: 13.5px; line-height: 1.7; color: var(--ink-mute); }
.st-block {
  display: block; height: calc(60px + var(--k) * 46px);
  border-radius: 16px 16px 6px 6px; border: 1px solid var(--rule);
  background: linear-gradient(var(--paper-raised), var(--paper-sunk));
  transition: background .5s ease, border-color .5s ease, box-shadow .5s ease;
}
.st-step.is-on .st-block { border-color: var(--brand-200); background: linear-gradient(#eff6ff, #dbeafe); }
.st-step.is-now .st-block { box-shadow: 0 20px 40px -24px rgba(37, 99, 235, .7); border-color: var(--accent); }
.st-climber { position: absolute; top: 0; left: 0; width: 70px; height: 122px; pointer-events: none; transition: transform .52s cubic-bezier(.3, 1.4, .5, 1); }
.st-climber svg { width: 100%; height: 100%; overflow: visible; }
[dir="rtl"] .st-climber svg { transform: scaleX(-1); }
.st.no-move .st-climber { transition: none; }
.st.is-hopping .st-body { animation: st-hop .52s ease; }
@keyframes st-hop { 40% { transform: translateY(-16px); } }
.st-cap { opacity: 0; transform-box: fill-box; transform-origin: center; }
.st.is-top .st-cap { animation: hj-toss 1.4s cubic-bezier(.2, .7, .3, 1) forwards; }
@media (max-width: 760px) {
  .st-steps { gap: 8px; row-gap: 12px; }
  .st-copy b { font-size: 14px; }
  .st-copy small { display: none; }
  .st-block { height: calc(40px + var(--k) * 22px); }
  .st-climber { width: 52px; height: 92px; }
}

/* ==========================================================
   لماذا تخرُّج (07): قبل/بعد بشريط سحب
   ========================================================== */
.cmp {
  position: relative; height: 470px; overflow: hidden; touch-action: pan-y;
  border: 1px solid var(--rule); border-radius: 28px; background: var(--paper-raised);
  box-shadow: 0 40px 80px -50px rgba(15, 23, 42, .35);
  user-select: none;
}
.cmp-side { position: absolute; inset: 0; }
.cmp-side.is-before { background: repeating-linear-gradient(135deg, #f1f5f9 0 14px, #eef2f7 14px 28px); filter: saturate(.7); }
.cmp-side.is-after {
  background: radial-gradient(70% 60% at 20% 10%, rgba(37, 99, 235, .1), transparent 70%), #fff;
  clip-path: inset(0 var(--pos) 0 0);
}
[dir="ltr"] .cmp-side.is-after { clip-path: inset(0 0 0 var(--pos)); }
.cmp.is-auto .cmp-side.is-after { transition: clip-path 1.6s var(--ease-expo); }
.cmp.is-auto .cmp-handle { transition: inset-inline-start 1.6s var(--ease-expo); }
.cmp-tag { position: absolute; top: 18px; inset-inline-start: 20px; z-index: 2; padding: 5px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--rule); font-size: 13px; font-weight: 800; color: var(--ink-mute); }
.cmp-tag.is-after { inset-inline-start: auto; inset-inline-end: 20px; background: var(--accent); border-color: var(--accent); color: #fff; }

/* الفوضى */
.cmp-mess { position: absolute; inset: 60px 20px 20px; }
.mess {
  position: absolute; inset-inline-start: var(--x); top: var(--y);
  display: inline-flex; align-items: center; gap: 6px; max-width: 46%;
  padding: 9px 13px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0;
  font-size: 13px; color: #475569; box-shadow: 0 10px 22px -14px rgba(15, 23, 42, .4);
  transform: rotate(var(--r)); animation: mess-float 4s ease-in-out infinite alternate;
}
.mess:nth-child(2n) { animation-delay: -1.3s; } .mess:nth-child(3n) { animation-delay: -2.6s; }
.mess.is-wa { background: #ecfdf5; border-color: #bbf7d0; }
.mess.is-red { background: #fff1f2; border-color: #fecdd3; color: #be123c; font-weight: 800; }
.mess.is-file { font-family: ui-monospace, monospace; font-size: 12px; }
.mess.is-paper { background: #fffbeb; border-color: #fde68a; }
@keyframes mess-float { to { transform: rotate(calc(var(--r) * -1)) translateY(-5px); } }

/* المرتّب */
.cmp-grid { list-style: none; margin: 0; position: absolute; inset: 64px 24px 24px; inset-inline-start: calc(14% + 22px); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: center; }
.cmp-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--rule); box-shadow: 0 14px 30px -22px rgba(37, 99, 235, .5); }
.cmp-card b { display: block; font-family: var(--font-display); font-size: 14.5px; color: var(--ink); }
.cmp-card small { display: block; font-size: 12.5px; line-height: 1.7; color: var(--ink-mute); }
.cmp-check { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; }
.cmp-check svg { width: 14px; height: 14px; }

/* المقبض */
.cmp-handle { position: absolute; top: 0; bottom: 0; inset-inline-start: var(--pos); z-index: 3; width: 0; pointer-events: none; }
.cmp-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.cmp-handle span { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 12px 26px -10px rgba(37, 99, 235, .8); }
.cmp-handle span svg { width: 22px; height: 22px; }
.cmp-range { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cmp-range:focus-visible ~ .cmp-handle span, .cmp:focus-within .cmp-handle span { box-shadow: 0 0 0 4px rgba(37, 99, 235, .3); }

/* الجوال: لا مساحة لشريط سحب — «قبل» شريط فوضى مختصر فوق، و«مع تخرُّج» تحته كاملاً */
@media (max-width: 760px) {
  .cmp { height: auto; }
  .cmp-side { position: relative; }
  .cmp-side.is-before { height: 240px; }
  .cmp-side.is-after, [dir="ltr"] .cmp-side.is-after { clip-path: none; padding: 54px 14px 14px; }
  .cmp-grid { position: static; grid-template-columns: 1fr; gap: 8px; }
  .cmp-card { padding: 10px 12px; }
  .cmp-tag.is-after { top: 14px; }
  .mess { max-width: 74%; font-size: 12px; }
  .cmp-handle, .cmp-range { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fh-pill button, .fh-view, .st-copy, .st-climber, .cmp-side.is-after { transition: none !important; }
  .mess, .fh-buddy, .st-cap { animation: none !important; }
  .st.is-top .st-cap { opacity: 1; }
}

/* ==========================================================
   المشاريع المنجزة (06): معرض ملصقات متحرك
   ========================================================== */
.pz-stats { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 26px; }
.pz-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 20px; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper-raised); }
.pz-stat b { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pz-stat span { font-size: 12.5px; color: var(--ink-mute); }
.pz-stat.is-accent { background: var(--accent); border-color: var(--accent); }
.pz-stat.is-accent b, .pz-stat.is-accent span { color: #fff; }
.pz-grads { margin-inline-start: auto; width: 170px; height: 112px; overflow: visible; }
.pz-cap { transform-box: fill-box; transform-origin: center; animation: pz-cap 3.2s cubic-bezier(.2, .7, .3, 1) infinite; }
.pz-cap.is-2 { animation-delay: .2s; } .pz-cap.is-3 { animation-delay: .4s; }
@keyframes pz-cap { 0%, 60%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-34px) rotate(200deg); } }

/* الشريط: نسختان متتاليتان، والحركة نصف عرضه فتتّصل بلا قفزة */
.pz-wrap { position: relative; overflow: hidden; margin-inline: calc(50% - 50vw); padding-block: 10px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.pz-track { display: flex; gap: 18px; width: max-content; animation: pz-scroll 60s linear infinite; }
[dir="rtl"] .pz-track { animation-name: pz-scroll-rtl; }
.pz-wrap:hover .pz-track, .pz-wrap:focus-within .pz-track { animation-play-state: paused; }
@keyframes pz-scroll { to { transform: translateX(-50%); } }
@keyframes pz-scroll-rtl { to { transform: translateX(50%); } }

.pz-card {
  flex: none; width: 290px; overflow: hidden;
  border: 1px solid var(--rule); border-radius: 22px; background: #fff;
  box-shadow: 0 24px 50px -36px rgba(15, 23, 42, .5);
  transition: transform .35s var(--ease-expo), box-shadow .35s ease;
}
.pz-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 30px 60px -34px rgba(15, 23, 42, .55); }
.pz-cover {
  position: relative; height: 150px; display: grid; place-items: center;
  background:
    radial-gradient(60% 70% at 80% 10%, hsla(var(--h), 90%, 75%, .9), transparent 70%),
    linear-gradient(135deg, hsl(var(--h), 70%, 52%), hsl(calc(var(--h) + 40), 75%, 42%));
  color: #fff;
}
.pz-cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.2px); background-size: 16px 16px; opacity: .6; }
.pz-glyph { position: relative; z-index: 1; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.pz-glyph svg { width: 40px; height: 40px; }
.pz-type { position: absolute; z-index: 1; top: 12px; inset-inline-start: 12px; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .22); font-size: 11.5px; font-weight: 700; }
.pz-done { position: absolute; z-index: 1; bottom: 12px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; background: #fff; color: #047857; font-size: 11.5px; font-weight: 800; }
.pz-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; }
.pz-body h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 800; line-height: 1.5; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.pz-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--ink-mute); }
.pz-steps { display: inline-flex; gap: 3px; }
.pz-steps i { width: 10px; height: 4px; border-radius: 2px; background: hsl(var(--h), 70%, 52%); }
.pz-sem { margin-inline-start: auto; }

/* ==========================================================
   الأقسام والكليات (09): دورة الفصل يمشيها المسؤول
   ========================================================== */
.ds { position: relative; margin-top: 46px; padding-top: 120px; }
.ds-rail { position: absolute; top: 141px; inset-inline: 16.66%; height: 4px; border-radius: 99px; background: var(--rule); }
.ds-fill { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #7c3aed); transition: width 1.1s var(--ease-expo); }
.ds.no-move .ds-fill, .ds.no-move .ds-walker { transition: none; }
.ds-stations { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ds-st { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ds-node {
  position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; border: 2px solid var(--rule-strong); color: var(--ink-mute);
  transition: background-color .4s ease, border-color .4s ease, color .4s ease, box-shadow .4s ease;
}
.ds-node svg { width: 21px; height: 21px; }
.ds-st.is-on .ds-node { background: var(--accent); border-color: var(--accent); color: #fff; }
.ds-st.is-now .ds-node { box-shadow: 0 0 0 7px var(--accent-soft); }
.ds-st small { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--accent); }
.ds-st h3 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--ink); }
.ds-items { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: min(100%, 320px); }
.ds-items li {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px;
  background: var(--paper-raised); border: 1px solid var(--rule); text-align: start;
  opacity: .5; transform: translateY(8px); transition: opacity .5s ease, transform .5s var(--ease-expo), border-color .5s ease, box-shadow .5s ease;
}
.ds-items li:nth-child(2) { transition-delay: .12s; }
.ds-st.is-on .ds-items li { opacity: 1; transform: none; }
.ds-st.is-now .ds-items li { border-color: var(--brand-200); box-shadow: 0 14px 30px -22px rgba(37, 99, 235, .55); }
.ds-items b { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.ds-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.ds-ico svg { width: 16px; height: 16px; }
.ds-walker { position: absolute; top: 0; left: 0; width: 64px; height: 106px; pointer-events: none; transition: transform 1.1s var(--ease-expo); z-index: 2; }
.ds-walker svg { width: 100%; height: 100%; overflow: visible; }
[dir="rtl"] .ds-walker svg { transform: scaleX(-1); }
.ds.is-walking .hj-leg.is-a { animation: hj-step .38s ease-in-out infinite alternate; }
.ds.is-walking .hj-leg.is-b { animation: hj-step .38s ease-in-out infinite alternate-reverse; }
.ds.is-walking .hj-arm { animation: hj-step .38s ease-in-out infinite alternate-reverse; }
@media (max-width: 860px) {
  .ds { padding-top: 0; margin-top: 30px; }
  .ds-rail, .ds-walker { display: none; }
  .ds-stations { grid-template-columns: 1fr; gap: 30px; }
  .ds-items li { opacity: 1; transform: none; }
  .ds-st .ds-node { background: var(--accent); border-color: var(--accent); color: #fff; }
}

/* ==========================================================
   شخصيات في الأقسام الباقية
   ========================================================== */

/* عن المنصة (01): الأدوار الثلاثة فوق اللوحة */
.about-panel { position: relative; overflow: visible; margin-top: 86px; }
.ab-crowd { position: absolute; top: -104px; inset-inline-end: 26px; width: 190px; height: 106px; overflow: visible; }
[dir="rtl"] .ab-crowd { transform: scaleX(-1); }
.about-panel.visible .ab-crowd use { animation: sx-pop .6s cubic-bezier(.34, 1.56, .64, 1) both; transform-box: fill-box; transform-origin: 50% 100%; }
.about-panel.visible .ab-crowd use:nth-child(2) { animation-delay: .15s; }
.about-panel.visible .ab-crowd use:nth-child(3) { animation-delay: .3s; }

/* الأسئلة (08): طالب يسأل */
.fq-ask { position: relative; overflow: visible; margin-top: 104px; }
.fq-person { position: absolute; top: -96px; inset-inline-end: 22px; width: 56px; height: 98px; }
.fq-person svg { width: 100%; height: 100%; overflow: visible; }
[dir="rtl"] .fq-person svg { transform: scaleX(-1); }
.fq-person i { position: absolute; inset-inline-start: -30px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; top: 6px; background: var(--accent); color: #fff; font-style: normal; font-weight: 900; animation: fq-q 2.4s ease-in-out infinite; }
@keyframes fq-q { 50% { transform: translateY(-5px) rotate(-6deg); } }

/* التواصل (10): المسؤول يرحّب */
.ct-person { display: flex; align-items: flex-end; gap: 10px; margin: auto 0 16px; }
.ct-person svg { flex: none; width: 60px; height: 96px; overflow: visible; }
[dir="rtl"] .ct-person svg { transform: scaleX(-1); }
.ct-bubble { margin-bottom: 52px; padding: 9px 14px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--rule); box-shadow: 0 12px 26px -18px rgba(15, 23, 42, .4); font-size: 13px; font-weight: 700; color: var(--ink); animation: fq-q 3s ease-in-out infinite; }
[dir="rtl"] .ct-bubble { border-radius: 16px 16px 4px 16px; }

@media (max-width: 760px) {
  .pz-grads { display: none; }
  .pz-card { width: 240px; }
  .pz-cover { height: 120px; }
  .about-panel { margin-top: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .pz-track { animation: none; }
  .pz-wrap { overflow-x: auto; }
  .pz-cap, .fq-person i, .ct-bubble, .ab-crowd use { animation: none !important; }
  .ds-fill, .ds-walker, .ds-items li { transition: none; }
}
