/* ============================================================
   إتقان — النسخة المؤسسية (institutional.html)
   أقسام «إثبات»: عنوان من شطرين + نقاط بشريط تقدم + لوحة تتبدل حالتها.
   اللوحة: لوحة الألوان المعتمدة — حجر/ورق/جرافيت، والطيني (#8A5447)
   مؤشر النقطة النشطة فقط (سقف ≤٣٪ كما في وثيقة الأقسام).
   ============================================================ */

/* ——— غلاف القسم ——— */
.inst-section { padding-block: 104px 96px; position: relative; }
.inst-section.is-light { background: var(--ground); }
.inst-section.is-dark { background: var(--ink); color: var(--paper-on-dark); }
.inst-section.is-dark .section-divider { display: none; }

.inst-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 72px; align-items: center;
}
/* الافتراضي: النص يمين (أول عمود في RTL). المعكوس: اللوحة يمين */
.inst-layout.is-flipped .inst-text { order: 2; }
.inst-layout.is-flipped .inst-panel-wrap { order: 1; }

/* ——— العنوان من شطرين ——— */
.inst-h {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.28; margin: 0 0 34px;
  font-weight: 700; text-wrap: balance;
}
.inst-h .inst-h-alt { color: var(--muted); font-weight: 400; }
.is-dark .inst-h .inst-h-alt { color: var(--muted-on-dark); }
.is-dark .eyebrow { color: #A9C1B6; }

/* ——— النقاط + شريط التقدم ——— */
.inst-points { display: flex; flex-direction: column; }

.inst-point-head {
  display: flex; align-items: center; gap: 14px;
  width: 100%; background: none; border: none; cursor: pointer;
  font: inherit; text-align: start; padding: 14px 2px; color: inherit;
}
.inst-dot {
  flex: none; width: 11px; height: 11px; border-radius: 50%;
  background: var(--line-strong); opacity: .55;
  transition: background-color 240ms ease, opacity 240ms ease, box-shadow 240ms ease;
}
.inst-point-title {
  font-size: 17.5px; font-weight: 600; line-height: 1.5;
  color: var(--muted); transition: color 240ms ease;
}
.is-dark .inst-point-title { color: var(--muted-on-dark); }

.inst-point.is-active .inst-dot {
  background: var(--clay); opacity: 1;
  box-shadow: 0 0 0 5px var(--clay-tint);
}
.inst-point.is-active .inst-point-title { color: var(--ink); }
.is-dark .inst-point.is-active .inst-point-title { color: var(--paper-on-dark); }

.inst-point-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 240ms var(--ease-settle);
}
.inst-point-body > p {
  overflow: hidden; margin: 0; min-height: 0;
  padding-inline-start: 25px;
  font-size: 15.5px; line-height: 1.8; color: var(--muted);
  opacity: 0; transition: opacity 240ms ease 60ms, padding 240ms var(--ease-settle);
}
.is-dark .inst-point-body > p { color: var(--muted-on-dark); }
.inst-point.is-active .inst-point-body { grid-template-rows: 1fr; }
.inst-point.is-active .inst-point-body > p { opacity: 1; padding-bottom: 10px; }

/* الخط الفاصل = شريط تقدّم يمتلئ من اليمين */
.inst-divider {
  display: block; height: 1.5px; background: var(--line);
  position: relative; overflow: hidden; border-radius: 2px;
}
.is-dark .inst-divider { background: var(--line-on-dark); }
.inst-bar {
  position: absolute; inset: 0; display: block;
  background: var(--line-strong); transform: scaleX(0); transform-origin: right;
}
.inst-point.is-active .inst-bar { background: var(--sage); }
/* ساعة واحدة: مدة الشريط = مدة مقطع النقطة (--pdur يضبطها المحرك) */
.inst-points.is-auto .inst-point.is-active .inst-bar {
  animation: inst-progress var(--pdur, 6s) linear forwards;
}
.inst-points.is-paused .inst-bar { animation-play-state: paused; }
.inst-points:not(.is-auto) .inst-point.is-active .inst-bar { transform: scaleX(1); }
@keyframes inst-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ——— سطر الإثبات والأزرار ——— */
.inst-proof {
  margin: 26px 0 0; font-size: 13.5px; color: var(--muted);
  padding-top: 16px; border-top: 1px solid var(--line);
  max-width: 34rem;
}
.is-dark .inst-proof { color: var(--muted-on-dark); border-top-color: var(--line-on-dark); }
.inst-proof bdi { font-weight: 600; }
.inst-proof-honest { font-style: normal; }
.inst-cta { margin-top: 26px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.inst-secondary {
  color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 3px;
  transition: color 160ms ease, border-color 160ms ease;
}
.inst-secondary:hover { color: var(--ink); border-color: var(--ink); }
.is-dark .inst-secondary { color: var(--muted-on-dark); }
.is-dark .inst-secondary:hover { color: var(--paper-on-dark); }
/* الزر الأساسي ينقلب على الأقسام الداكنة (جرافيت على جرافيت يختفي) */
.is-dark .inst-cta .btn-primary {
  background: var(--ground); color: var(--ink); border-color: var(--ground);
}
.is-dark .inst-cta .btn-primary:hover {
  background: #ECEAE4; border-color: #ECEAE4; color: var(--ink);
  box-shadow: 0 10px 22px -8px rgba(0,0,0,.5);
}

.inst-panel-wrap { min-width: 0; }

/* ============================================================
   مبدّل اللغة AR/EN — مكوّن مشترك بين institutional.html
   وinstitutional-en.html (يقف بجوار زر الحجز في الترويسة)
   ============================================================ */
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; line-height: 1;
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 8px 14px; white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.lang-switch:hover { color: var(--ink); border-color: var(--ink); background: var(--surface); }
.lang-switch:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.header-action .lang-switch { margin-inline-end: 14px; }
/* داخل قائمة الجوال تتغلب قواعد القائمة على .lang-switch — نرفع النوعية */
.mobile-menu nav a.lang-switch {
  display: inline-flex; margin-top: 12px; width: fit-content;
  color: var(--muted); font-size: 13px; font-weight: 600;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 8px 14px;
}
.mobile-menu nav a.lang-switch:hover { color: var(--ink); border-color: var(--ink); background: var(--surface); }

/* ============================================================
   شرائط الأسماء
   ============================================================ */
.inst-names {
  margin-top: 54px; display: flex; flex-wrap: wrap; gap: 9px 10px;
  justify-content: center;
}
.inst-names span {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
  background: var(--surface);
}
.inst-names-note { margin: 12px 0 0; text-align: center; font-size: 11px; color: var(--muted); }

/* ============================================================
   استجابة
   ============================================================ */
@media (max-width: 1024px) {
  .inst-layout { gap: 44px; }
}

@media (max-width: 880px) {
  .inst-section { padding-block: 72px 64px; }
  .inst-layout { grid-template-columns: 1fr; gap: 34px; }
  .inst-layout .inst-panel-wrap { order: -1; }
  .inst-layout.is-flipped .inst-text { order: 2; }
  .inst-layout.is-flipped .inst-panel-wrap { order: -1; }
  .inst-h { font-size: clamp(26px, 7vw, 34px); }
  .inst-divider { height: 1px; }
}

/* ============================================================
   الحركة المخفَّضة — كل النقاط مفتوحة، اللوحة على الحالة الأولى
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .inst-point-body { grid-template-rows: 1fr !important; }
  .inst-point-body > p { opacity: 1 !important; }
  .inst-bar { animation: none !important; transform: scaleX(1) !important; }
}

/* تمهيد قسم الأرقام وسطر مصادره */
.inst-value-lead {
  margin: -16px 0 42px; font-size: 16.5px; line-height: 1.85;
  color: var(--muted); max-width: 40rem;
}

/* ============================================================
   v2 (٠٢-١٠-٢٠٢٦) — نصوص docs/site-copy-v2-2026-10-02.md
   الهيرو النصي · كيف يعمل · شريط الأرقام · فواصل الجزأين · الختام
   ============================================================ */

/* ——— الهيرو: العبارة ثم العنوان والنص والزرّان وسطر الثقة ——— */
.hero-section.has-copy { padding-block-start: 64px; }
.hero-copy {
  display: grid; justify-items: center; text-align: center;
  margin-top: 6px; padding-bottom: 60px;
}
.hero-tagline {
  margin: 0 0 22px;
  font-family: 'Amiri', serif; font-size: clamp(19px, 1.9vw, 24px); font-weight: 700;
  line-height: 1.6; color: var(--ink);
}
.hero-tagline span { color: var(--muted); font-weight: 400; }
.hero-copy .hero-heading { max-width: 15em; margin-bottom: 22px; }
.hero-copy .hero-lead { max-width: 39rem; margin-bottom: 32px; font-size: 18px; }
.hero-copy .hero-actions { justify-content: center; }
.hero-copy .btn-secondary svg { flex: none; }
.hero-trust {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.hero-trust li { display: inline-flex; align-items: center; gap: 9px; }
.hero-trust li::before {
  content: ""; width: 6px; height: 6px; flex: none;
  background: var(--sage); transform: rotate(45deg);
}

/* ——— كيف يعمل: ثلاثة أفعال + مشغّل الفيلم ——— */
.ihow { padding-block-start: 88px; }
.ihow .inst-layout { align-items: start; }
.ihow-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ihow-step {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.ihow-step:last-child { border-bottom: 1px solid var(--line); }
.ihow-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700; color: var(--sage-deep);
  background: var(--sage-tint); border: 1px solid rgba(64,91,80,.28);
}
.ihow-verb { margin: 0 0 4px; font-size: 24px; line-height: 1.4; font-weight: 700; }
.ihow-step p { margin: 0; font-size: 15.5px; line-height: 1.8; color: var(--muted); max-width: 30rem; }
.ihow .inst-proof { border-top: 0; padding-top: 0; margin-top: 20px; font-weight: 600; color: var(--ink); }

.ihow-film { margin: 0; position: sticky; top: 96px; }
.ihow-player {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--ink); box-shadow: var(--shadow-lift);
  border: 1px solid var(--line);
}
.ihow-player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--surface2); }
.ihow-play {
  position: absolute; inset: 0; margin: auto;
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--ink); color: var(--ground); border: 0;
  box-shadow: 0 0 0 10px rgba(246,245,242,.55), 0 18px 36px -12px rgba(43,42,38,.5);
  transition: transform 200ms var(--ease-settle), box-shadow 200ms ease;
}
.ihow-play svg { margin-inline-start: -3px; }
.ihow-play:hover { transform: scale(1.06); }
.ihow-play:focus-visible { outline: 2px solid var(--sage); outline-offset: 12px; }
.ihow-player.is-playing .ihow-play { display: none; }
.ihow-cap { margin-top: 14px; font-size: 13.5px; line-height: 1.75; color: var(--muted); }
.ihow-cap b { display: block; color: var(--ink); font-weight: 700; }

/* ——— المنصات المتاحة ——— */
.iplat {
  margin-top: 72px; padding: 22px 26px;
  display: flex; align-items: center; gap: 18px 34px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.iplat-label { margin: 0; flex: none; font-size: 13px; font-weight: 700; color: var(--sage-deep); }
.iplat-list {
  list-style: none; margin: 0; padding: 0; flex: 1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 22px;
}
.iplat-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.iplat-item svg { flex: none; color: var(--ink); }
.iplat-item span { display: flex; flex-direction: column; min-width: 0; }
.iplat-item b { font-size: 14.5px; font-weight: 700; line-height: 1.5; }
.iplat-item i { font-style: normal; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* ——— شريط الأرقام (داكن) ——— */
.inum-section { padding-block: 88px 80px; }
.inum-section .inst-h { max-width: 46rem; margin-bottom: 14px; }
.inum-section .inst-value-lead { margin: 0 0 46px; color: var(--muted-on-dark); }
.inum-grid {
  margin: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-on-dark);
}
.inum { padding: 26px 24px 4px 24px; border-inline-start: 1px solid var(--line-on-dark); }
.inum:first-child { border-inline-start: 0; padding-inline-start: 0; }
.inum dt {
  font-family: 'Amiri', serif; font-weight: 700; line-height: 1.15;
  font-size: clamp(42px, 4.8vw, 64px); color: var(--paper-on-dark);
}
.inum dt small { font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: .3em; font-weight: 600; color: var(--muted-on-dark); }
.inum dd { margin: 10px 0 0; font-size: 15px; line-height: 1.8; color: var(--muted-on-dark); }
.inum-src { display: block; margin-top: 10px; font-size: 11.5px; font-weight: 600; color: #A9C1B6; }
.inum-note { margin: 34px 0 0; font-size: 11.5px; color: var(--muted-on-dark); }

/* ——— فاصل الجزأين: «تفوّقٌ في اليوم» · «منجمٌ للغد» ——— */
.inst-part {
  display: flex; align-items: center; gap: 18px;
  margin: 0 0 64px;
  font-family: 'Amiri', serif; font-size: clamp(20px, 2.1vw, 26px); font-weight: 700;
  color: var(--sage-deep);
}
.inst-part span { flex: none; display: inline-flex; align-items: center; gap: 12px; }
.inst-part span::before {
  content: ""; width: 9px; height: 9px; flex: none;
  background: var(--sage); transform: rotate(45deg);
}
.inst-part::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.is-dark .inst-part { color: #A9C1B6; }
.is-dark .inst-part span::before { background: #A9C1B6; }
.is-dark .inst-part::after { background: var(--line-on-dark); }

/* سطرا البرهان المتتاليان: الثاني بلا خط علوي */
.inst-proof + .inst-proof { margin-top: 10px; padding-top: 0; border-top: 0; }

/* ——— الختام ——— */
.inst-close { padding-block: 96px 112px; }
.iclose {
  border-radius: var(--r-xl); background: var(--surface2);
  padding: clamp(40px, 6vw, 84px) clamp(24px, 6vw, 84px);
  display: grid; justify-items: center; text-align: center;
  box-shadow: var(--shadow-card);
}
.iclose .inst-h { margin-bottom: 18px; font-size: clamp(30px, 4vw, 50px); }
.iclose-lead { margin: 0; max-width: 34rem; font-size: 17px; line-height: 1.85; color: var(--muted); }
.iclose .inst-cta { justify-content: center; margin-top: 30px; }
.iclose-sign {
  margin: 44px 0 0; padding-top: 24px; border-top: 1px solid var(--line-strong);
  font-family: 'Amiri', serif; font-size: clamp(18px, 1.8vw, 22px); font-weight: 700; color: var(--ink);
}

@media (max-width: 1024px) {
  .iplat { flex-direction: column; align-items: stretch; }
  .iplat-list { grid-template-columns: 1fr 1fr; }
  .inum-grid { grid-template-columns: 1fr 1fr; }
  .inum:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .inum:nth-child(n+3) { border-top: 1px solid var(--line-on-dark); margin-top: 22px; }
}
@media (max-width: 880px) {
  .hero-copy { padding-bottom: 44px; }
  .hero-copy .hero-lead { font-size: 16.5px; }
  .ihow { padding-block-start: 64px; }
  .ihow-film { position: static; }
  .ihow .inst-layout .inst-panel-wrap { order: 2; }
  .iplat { margin-top: 48px; padding: 20px; }
  .inum-section { padding-block: 64px 56px; }
  .inst-part { margin-bottom: 40px; }
  .inst-close { padding-block: 64px 72px; }
}
@media (max-width: 560px) {
  .iplat-list { grid-template-columns: 1fr; }
  .inum-grid { grid-template-columns: 1fr; }
  .inum, .inum:nth-child(3) { border-inline-start: 0; padding-inline: 0; }
  .inum:nth-child(n+2) { border-top: 1px solid var(--line-on-dark); margin-top: 18px; }
  .hero-copy .hero-actions .btn { width: 100%; }
}

/* ============================================================
   v3 (٠٢-١٠-٢٠٢٦) — المرحلة الثالثة: الحركة والتصميم
   المبدأ: لا يتحرك في الصفحة إلا المنتج نفسه. اللوحات التخطيطية
   استُبدلت بمقاطع من فيلم «مهمة حقيقية» (assets/film/clips)،
   وشريط التقدّم يسير بمدة المقطع. لحظة منسّقة واحدة: تحميل الهيرو.
   ============================================================ */

/* ——— المسرح: نافذة واحدة تتبدّل طبقاتها مع النقاط ——— */
.istage {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 1280 / 662;
  border-radius: 16px; border: 1px solid var(--line);
  background: #F6F3EC;                     /* ورق الفيلم نفسه، فتذوب اللقطات الواسعة في الإطار */
  box-shadow: var(--shadow-lift);
}
.is-dark .istage { border-color: rgba(243,241,236,.16); box-shadow: 0 36px 70px -36px rgba(0,0,0,.75); }
.istage-layer {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 380ms ease, visibility 0s linear 380ms;
}
.istage-layer.is-on { opacity: 1; visibility: visible; z-index: 1; transition: opacity 380ms ease; }
.istage-layer video { display: block; width: 100%; height: 100%; object-fit: cover; background: #F6F3EC; }
.istage-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.is-dark .istage-note { color: var(--muted-on-dark); }

/* ——— القسم المنقسم بمسرح: النص ٥ والمسرح ٧ ——— */
.inst-layout.has-stage { grid-template-columns: 5fr 7fr; gap: 60px; }
.inst-layout.has-stage.is-flipped { grid-template-columns: 7fr 5fr; }

/* ——— العرض الكامل: العنوان والزر ← المسرح بعرض الحاوية ← النقاط في صف ——— */
.inst-theater { display: grid; gap: 38px; }
.it-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.it-head .inst-h { margin: 0; max-width: 19em; }
.it-head .inst-cta { margin: 0; flex: none; padding-bottom: 8px; }
.it-foot .inst-proof { margin-top: 0; }

.inst-points.is-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 36px; }
.inst-points.is-row .inst-point { display: flex; flex-direction: column; }
.inst-points.is-row .inst-divider { order: -1; height: 2px; }
.inst-points.is-row .inst-dot { display: none; }
.inst-points.is-row .inst-point-head { padding: 20px 0 8px; align-items: flex-start; }
.inst-points.is-row .inst-point-body { grid-template-rows: 1fr; }
.inst-points.is-row .inst-point-body > p { opacity: 1; padding-inline-start: 0; padding-bottom: 0; max-width: none; }

/* ——— كيف يعمل: رابط فصل الفيلم تحت كل فعل ——— */
.ihow-jump {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  background: none; border: 0; padding: 0 0 2px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  transition: color 160ms ease, border-color 160ms ease;
}
.ihow-jump:hover { color: var(--ink); border-color: var(--alif); }

/* ——— الهيرو: اللحظة المنسّقة الوحيدة في الصفحة ———
   العنوان لا ينتظر رسم الشعار؛ والعبارة توقّع حين تهبط الألف (٢٫٤ث). */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: hero-rise 820ms var(--ease-settle) both; }
  .hero-copy .hero-heading { animation-delay: 320ms; }
  .hero-copy .hero-lead { animation-delay: 460ms; }
  .hero-copy .hero-actions { animation-delay: 600ms; }
  .hero-copy .hero-trust { animation-delay: 740ms; }
  .hero-copy .hero-tagline { animation: hero-fade 900ms ease 2400ms both; }
}
@keyframes hero-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hero-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1024px) {
  .inst-layout.has-stage, .inst-layout.has-stage.is-flipped { gap: 40px; }
}
@media (max-width: 880px) {
  .inst-layout.has-stage, .inst-layout.has-stage.is-flipped { grid-template-columns: 1fr; gap: 30px; }
  .inst-theater { gap: 26px; }
  .it-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .it-head .inst-cta { padding-bottom: 0; }
  .inst-points.is-row { grid-template-columns: 1fr; }
  .inst-points.is-row .inst-point-head { padding-top: 16px; }
  .inst-points.is-row .inst-point { padding-bottom: 12px; }
  .istage { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .istage-layer { transition: none; }
}

/* ============================================================
   المشاهد المرسومة (.pv) — للأقسام التي لا لقطة لها في الفيلم.
   تُرسم بلغة واجهة المنتج نفسها (ورق الفيلم، بطاقات بيضاء، حبر
   كحلي، إطار برتقالي للعنصر المُشار إليه) داخل المسرح نفسه.
   كل المقاسات بوحدة --u = ١٪ من عرض المسرح، فيتحجّم المشهد
   كما تتحجّم المقاطع. عناصره تستقر بتتابع يروي النقطة (--i).
   ============================================================ */
.istage { --u: 6.4px; }
@supports (width: 1cqw) {
  .istage { container-type: inline-size; }
  .istage-layer { --u: 1cqw; }
}

.pv {
  position: absolute; inset: 0; display: grid; align-items: center;
  gap: calc(3 * var(--u)); padding: calc(4.2 * var(--u)) calc(5 * var(--u));
  color: #1C2B33; font-size: calc(2.1 * var(--u)); line-height: 1.5; text-align: start;
}
.pv p { margin: 0; }
.pv b { font-weight: 600; }
.pv em, .pv i { font-style: normal; }
.pv-col { display: flex; flex-direction: column; gap: calc(1.5 * var(--u)); min-width: 0; }
.pv-card {
  background: #fff; border: 1px solid #E3DFD5; border-radius: calc(1.9 * var(--u));
  padding: calc(2.4 * var(--u)) calc(2.6 * var(--u));
  box-shadow: 0 calc(1.8 * var(--u)) calc(3.8 * var(--u)) calc(-2.8 * var(--u)) rgba(28, 43, 51, .5);
}
.pv-k { font-size: calc(1.75 * var(--u)); font-weight: 600; color: #66727A; }
.pv-t { font-size: calc(2.5 * var(--u)); font-weight: 700; line-height: 1.35; }
.pv-ic { width: calc(2.6 * var(--u)); height: calc(2.6 * var(--u)); flex: none; color: #3B5878; }
.pv-arrow { width: calc(3.4 * var(--u)); height: calc(3.4 * var(--u)); flex: none; color: #9AA7AE; }
[dir="ltr"] .pv-arrow { transform: scaleX(-1); }

.pv-tag {
  display: inline-flex; align-items: center; gap: calc(0.9 * var(--u)); align-self: flex-start;
  border-radius: 999px; padding: calc(0.55 * var(--u)) calc(1.7 * var(--u));
  font-size: calc(1.75 * var(--u)); font-weight: 600; line-height: 1.5;
}
.pv-tag .pv-ic { width: calc(2 * var(--u)); height: calc(2 * var(--u)); color: currentColor; }
.pv-tag.is-ink { background: #1C2B33; color: #fff; }
.pv-tag.is-ok { background: #E2F0E7; color: #2F6B4F; }
.pv-tag.is-warn { background: #FBF1DC; color: #8A5A12; }
.pv-tag.is-line { border: 1px solid #D5D0C4; color: #4A565E; }

.pv-num {
  flex: none; width: calc(3.5 * var(--u)); height: calc(3.5 * var(--u)); border-radius: 50%;
  display: grid; place-items: center;
  background: #1C2B33; color: #fff; font-size: calc(1.75 * var(--u)); font-weight: 700;
}
.pv-step { display: flex; align-items: center; gap: calc(1.4 * var(--u)); }
.pv-ln { display: block; height: calc(1 * var(--u)); border-radius: calc(0.5 * var(--u)); background: #ECE8DF; }
.pv-ln.w60 { width: 60%; }
.pv-ln.w40 { width: 40%; }

/* لقطة خطوة: العنصر المُشار إليه داخل إطاره البرتقالي كما في المنتج */
.pv-shot {
  display: flex; flex-direction: column; align-items: center; gap: calc(1.3 * var(--u));
  background: #F7F5F0; border: 1px solid #E9E5DB; border-radius: calc(1.4 * var(--u)); padding: calc(1.8 * var(--u));
}
.pv-shot .pv-ln { width: 62%; align-self: flex-start; }
.pv-shot .pv-ln.w60 { width: 36%; }
.pv-hl { border: calc(0.3 * var(--u)) solid #E8703A; border-radius: calc(1.1 * var(--u)); padding: calc(0.5 * var(--u)); background: #FBE6DA; }
.pv-hl b {
  display: block; white-space: nowrap;
  background: #3B5878; color: #fff; border-radius: calc(0.8 * var(--u));
  padding: calc(0.8 * var(--u)) calc(2.6 * var(--u)); font-size: calc(1.9 * var(--u));
}
.pv-shot.is-field .pv-hl b { background: #fff; color: #1C2B33; border: 1px solid #D5D0C4; direction: ltr; }
.pv-shot.is-old { opacity: .6; }
.pv-shot.is-old .pv-hl { border-color: #B9B3A6; background: #EFECE5; }
.pv-shot.is-old .pv-hl b { background: #8A939A; text-decoration: line-through; }

/* ——— المنصات الوطنية ——— */
.pv-n1 { grid-template-columns: 1fr 1fr; }
.pv-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(1.3 * var(--u)); }
.pv-tile {
  display: grid; place-items: center; text-align: center;
  background: #fff; border: 1px solid #E3DFD5; border-radius: calc(1.4 * var(--u));
  padding: calc(2.3 * var(--u)) calc(0.6 * var(--u)); font-size: calc(1.9 * var(--u)); font-weight: 600; color: #66727A;
}
.pv-tile.is-on { border-color: #1C2B33; color: #1C2B33; box-shadow: 0 0 0 calc(0.35 * var(--u)) rgba(28, 43, 51, .12); }
.pv-n1 .pv-card { gap: 0; }
.pv-n1 .pv-k { padding-bottom: calc(1.2 * var(--u)); }
.pv-row { display: flex; align-items: center; gap: calc(1.4 * var(--u)); padding: calc(1.3 * var(--u)) 0; border-top: 1px solid #EEEAE1; }
.pv-n1 .pv-tag { margin-top: calc(1.2 * var(--u)); }

.pv-n2 .pv-card { gap: calc(2.2 * var(--u)); }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: calc(2 * var(--u)); }
.pv-head .pv-tag { align-self: center; }
.pv-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: calc(2 * var(--u)); }
.pv-pair .pv-arrow { align-self: center; }
.pv-fig { display: flex; flex-direction: column; gap: calc(1 * var(--u)); }

.pv-n3 { grid-template-columns: 1fr auto 1.2fr; }

/* ——— الإجراء الحي ——— */
.pv-l1 { grid-template-columns: 1fr 1.15fr; }
.pv-side { gap: calc(2 * var(--u)); }
.pv-note p { line-height: 1.65; }
.pv-l2 { justify-items: center; }
.pv-l2 .pv-card { width: 84%; gap: 0; }
.pv-l2 .pv-k { padding: 0 calc(1.4 * var(--u)) calc(1.4 * var(--u)); }
.pv-ver {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: calc(1.8 * var(--u));
  padding: calc(1.5 * var(--u)) calc(1.4 * var(--u)); border-top: 1px solid #EEEAE1; border-radius: calc(1.2 * var(--u));
}
.pv-ver em { color: #66727A; font-size: calc(1.8 * var(--u)); }
.pv-ver span { color: #4A565E; }
.pv-ver .pv-tag { align-self: center; }
.pv-ver.is-now { background: #F3EFE6; border-top-color: transparent; }
.pv-l3 { align-content: center; gap: calc(2.2 * var(--u)); }
.pv-l3 .pv-card { gap: 0; }
.pv-tr {
  display: grid; grid-template-columns: 2.3fr 1.1fr 1fr; gap: calc(1.5 * var(--u));
  padding: calc(1.5 * var(--u)) calc(1.4 * var(--u)); border-top: 1px solid #EEEAE1; border-radius: calc(1.2 * var(--u));
}
.pv-tr.is-head { border-top: 0; padding-top: 0; color: #66727A; font-size: calc(1.75 * var(--u)); font-weight: 600; }
.pv-tr.is-pick { background: #E2F0E7; border-top-color: transparent; font-weight: 600; }
.pv-l3 > .pv-tag { justify-self: start; }

/* ——— المنجم ——— */
.pv-m1 { grid-template-columns: 1fr 1.2fr; grid-template-rows: auto auto; align-content: center; align-items: stretch; gap: calc(2.4 * var(--u)); }
.pv-q {
  grid-column: 1 / -1; justify-self: start;
  background: #1C2B33; color: #fff; font-weight: 600;
  border-radius: calc(2 * var(--u)); padding: calc(1.1 * var(--u)) calc(2.4 * var(--u));
}
.pv-m1 .is-dim { background: transparent; box-shadow: none; border-style: dashed; color: #66727A; }
.pv-m1 .is-yours { border-color: #1C2B33; }
.pv-m1 .is-yours p { font-weight: 600; }
.pv-m2 { grid-template-columns: 1fr auto 1.3fr; }
.pv-record { gap: 0; }
.pv-record .pv-k { padding-bottom: calc(1.2 * var(--u)); }
.pv-rec {
  display: grid; grid-template-columns: 5.4em 1fr; gap: calc(1.4 * var(--u));
  padding: calc(0.95 * var(--u)) 0; border-top: 1px solid #EEEAE1; font-size: calc(1.9 * var(--u));
}
.pv-rec em { color: #66727A; font-weight: 600; }
.pv-m3 { grid-template-columns: 1fr 1.1fr 1fr; align-items: stretch; padding-block: calc(7 * var(--u)); }
.pv-m3 .pv-card { justify-content: center; align-items: center; text-align: center; }
.pv-m3 .pv-tag { align-self: center; }
.pv-m3 .pv-ic { width: calc(4 * var(--u)); height: calc(4 * var(--u)); }
.pv-lib { background: #1C2B33; border-color: #1C2B33; color: #fff; }
.pv-lib .pv-ic { color: #fff; }
.pv-lib span { color: rgba(255, 255, 255, .72); font-size: calc(1.8 * var(--u)); }
.pv-lane span:not(.pv-k):not(.pv-tag) { color: #4A565E; font-size: calc(1.8 * var(--u)); }
.pv-lane.is-future { background: transparent; box-shadow: none; border: calc(0.25 * var(--u)) dashed #9AA7AE; }

/* ——— السرّية ——— */
.pv-p2 { padding-top: calc(9 * var(--u)); }
.pv-zone {
  position: relative; display: flex; flex-direction: column; gap: calc(2.4 * var(--u));
  border: calc(0.25 * var(--u)) dashed #9AA7AE; border-radius: calc(2.6 * var(--u));
  padding: calc(5 * var(--u)) calc(3.6 * var(--u)) calc(3 * var(--u)); background: rgba(255, 255, 255, .5);
}
.pv-zone-label { position: absolute; top: calc(-1.9 * var(--u)); inset-inline-start: calc(3.2 * var(--u)); }
.pv-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(1.8 * var(--u)); }
.pv-okline { display: flex; align-items: center; gap: calc(1.1 * var(--u)); font-weight: 600; color: #2F6B4F; }
.pv-okline .pv-ic { color: currentColor; width: calc(2.2 * var(--u)); height: calc(2.2 * var(--u)); }
.pv-out {
  position: absolute; top: calc(3.8 * var(--u)); inset-inline-end: calc(5 * var(--u));
  display: inline-flex; align-items: center; gap: calc(1 * var(--u));
  font-size: calc(1.8 * var(--u)); font-weight: 600; color: #66727A;
}
.pv-out .pv-ic { color: currentColor; }
.pv-p3 { justify-items: center; }
.pv-sheet { grid-area: 1 / 1; width: 46%; gap: calc(1.4 * var(--u)); padding: calc(3.4 * var(--u)) calc(3.4 * var(--u)) calc(4 * var(--u)); }
.pv-sheet:not(.is-back) { position: relative; z-index: 1; }
.pv-sheet.is-back { transform: translate(-27%, 5%) rotate(-4deg); }
[dir="ltr"] .pv-sheet.is-back { transform: translate(27%, 5%) rotate(4deg); }
.pv-doc-title { font-family: 'Amiri', serif; font-size: calc(3.6 * var(--u)); font-weight: 700; line-height: 1.3; }
.pv-to { grid-area: 1 / 1; align-self: end; justify-self: center; position: relative; z-index: 2; }

/* ——— الحياة: عناصر المشهد تستقر بتتابع حين تُفعَّل طبقته ———
   قبل دخول المسرح الشاشة (is-armed بلا is-live) تبقى مخفية، فيبدأ
   المشهد حين يراه الزائر لا قبله. بلا جافاسكربت: كل شيء ظاهر. */
.istage.is-armed:not(.is-live) .pv [style*="--i"] { opacity: 0; }
.istage.is-live .istage-layer.is-on .pv [style*="--i"] {
  animation: pv-in 560ms var(--ease-settle) both;
  animation-delay: calc(var(--i) * 120ms + 180ms);
}
@keyframes pv-in { from { opacity: 0; translate: 0 calc(1.6 * var(--u)); } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .istage.is-armed:not(.is-live) .pv [style*="--i"] { opacity: 1; }
  .istage.is-live .istage-layer.is-on .pv [style*="--i"] { animation: none; }
}

/* >>> v4-pains */
/* ============================================================
   v5 — بطاقات التحديات (#inst-value)، تحت الهيرو مباشرة وعلى
   أرضيته الفاتحة: سؤال واحد، ثم ست بطاقات قصيرة — رمز، اسم
   التحدي، وسطر واحد. كل بطاقة رابط إلى شاشتها في challenges.html
   حيث الأرقام والشرح. (قواعد .inum-* أعلاه لم تعد مستعملة.)
   الرمز بلونين: الحبر للشيء، والمريمي للجزء الذي يعبّر عن الألم؛
   ولون الألف يظهر عند المرور فقط — جوابًا على فعل الزائر.
   ============================================================ */
.ipain-section { background: var(--ground); padding-block: 40px 36px; }
.ipain-q {
  margin: 0 0 34px; text-align: center; text-wrap: balance;
  font-family: 'Amiri', serif; font-weight: 700; font-size: clamp(25px, 2.5vw, 31px); line-height: 1.5; color: var(--ink);
}
.ipain-grid {
  list-style: none; margin: 0; padding: 0 0 16px;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
}
.ipain-grid > li { display: flex; min-width: 0; }
/* إيقاع: البطاقات الزوجية أدنى قليلًا، فلا يُقرأ الصف شريطًا من مستطيلات متطابقة */
.ipain-grid > li:nth-child(even) { transform: translateY(16px); }
.ipain {
  flex: 1; min-width: 0; display: grid; align-content: start;
  grid-template-columns: 1fr auto; grid-template-areas: "ic go" "t t"; row-gap: 22px;
  padding: 20px 18px 22px; border: 1px solid var(--line); border-radius: 18px;
  background: #fff; color: var(--ink); text-decoration: none;
  box-shadow: 0 1px 0 rgba(43,42,38,.04);
  transition: border-color 200ms ease, box-shadow 260ms var(--ease-settle), transform 260ms var(--ease-settle);
}
.ipain-ic {
  grid-area: ic; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  background: var(--sage-tint); color: var(--ink); transition: background-color 200ms ease;
}
.ipain-ic svg { display: block; width: 25px; height: 25px; stroke-width: 1.5; }
.ipain-ic .ac { stroke: #5F8876; stroke-width: 1.9; transition: stroke 200ms ease; }
.ipain:hover .ipain-ic, .ipain:focus-visible .ipain-ic { background: var(--alif-tint); }
.ipain > .chev {
  grid-area: go; align-self: start; width: 16px; height: 16px; margin-top: 2px;
  color: var(--line-strong); transition: color 200ms ease, transform 260ms var(--ease-settle);
}
.ipain-t { grid-area: t; min-width: 0; display: grid; gap: 6px; }
.ipain-name { font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.ipain-line { font-size: 13.5px; line-height: 1.7; color: var(--muted); text-wrap: balance; }
.ipain:hover, .ipain:focus-visible {
  border-color: var(--ink); transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(43,42,38,.06), 0 22px 36px -22px rgba(43,42,38,.42);
}
.ipain:hover .ac, .ipain:focus-visible .ac { stroke: var(--alif); }
.ipain:hover > .chev, .ipain:focus-visible > .chev { color: var(--alif); transform: translateX(-3px); }
[dir="ltr"] .ipain > .chev { transform: scaleX(-1); }
[dir="ltr"] .ipain:hover > .chev, [dir="ltr"] .ipain:focus-visible > .chev { transform: scaleX(-1) translateX(-3px); }
/* بطاقة الغد: محدّدة بخط متقطّع — ما لم يأتِ بعد */
.ipain.is-tomorrow { background: transparent; border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.ipain.is-tomorrow .ipain-ic { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.ipain.is-tomorrow:hover, .ipain.is-tomorrow:focus-visible { background: #fff; border-style: solid; }
@media (prefers-reduced-motion: reduce) {
  .ipain, .ipain > .chev { transition: none; }
  .ipain:hover, .ipain:focus-visible { transform: none; }
}
@media (max-width: 1100px) {
  .ipain-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 0; }
  .ipain-grid > li:nth-child(even) { transform: none; }
  .ipain { row-gap: 20px; }
}
@media (max-width: 880px) { .ipain-section { padding-block: 44px 28px; } }
/* الجوال: صفوف — الرمز، فالاسم وسطره، فالسهم */
@media (max-width: 640px) {
  .ipain-q { margin-bottom: 22px; }
  .ipain-grid { grid-template-columns: 1fr; gap: 8px; }
  .ipain {
    grid-template-columns: auto 1fr auto; grid-template-areas: "ic t go"; align-items: center; column-gap: 14px;
    padding: 14px 16px; border-radius: 14px;
  }
  .ipain-ic { width: 42px; height: 42px; border-radius: 12px; }
  .ipain-ic svg { width: 23px; height: 23px; }
  .ipain > .chev { align-self: center; margin-top: 0; }
  .ipain-t { gap: 1px; }
  .ipain-name { font-size: 16px; }
  .ipain:hover, .ipain:focus-visible { transform: none; }
}
/* <<< v4-pains */
