/* =================================================================
   home.css: الرئيسية فقط (16 أكتوبر)
   - خلفية هادئة ثابتة من هوية نواة بدل الحركة المستمرة خلف النص
   - معاينة الافتتاحية: صورة ثابتة، ومجسم بطلب صريح في المساحة نفسها، بحالاتها الخمس
   - سطر «اتجاهات أخرى»، ودعوة الطلب الأخيرة (بطاقة «تعرّف إلى نواة بالحركة» انتقلت إلى styles.css مع العرض إلى about)
   ================================================================= */

/* ---------- الخلفية: تدرج ثابت خافت، لا طبقة متحركة ---------- */
body.home {
  /* 22 أكتوبر (خطة «نواة الحيّة»): لون واحد مسطّح؛ الوهج يبقى في نواة الشعار وحدها */
  background: var(--bg);
}

/* ---------- الافتتاحية ---------- */
.home .hero-copy .lead { max-width: 52ch; text-wrap: balance; } /* الجزء 1.2: الوصف القصير لا ينكسر بين «نصمّم» و«الموقع» */
.home .hero-actions .hero-reply { flex-basis: 100%; margin-top: 0; } /* 11 نوفمبر: وعد الرد في سطر تحت الزرين */

.hp { display: grid; gap: 14px; width: 100%; max-width: 640px; min-width: 0; }
.hp > * { min-width: 0; }

/* اختيار النموذج: لَبِنة افتراضيًا والمستشفى بديلًا */
.hp-tabs { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.03); width: fit-content; max-width: 100%; }
.hp-tab {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}
.hp-tab:hover { color: var(--text); }
.hp-tab[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(61, 220, 151, 0.45); }

/* مساحة المعاينة: أبعاد محجوزة من البداية، فلا يقفز شيء عند التحميل أو التبديل */
.hp-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: #E6E1D6;
  isolation: isolate;
}
.hp[data-model="hospital"] .hp-stage { background: #E3ECEA; }
.hp[data-model="company"] .hp-stage { background: #0A6F80; } /* لون ركن خلف مكيفه وصوره */
.hp-poster, .hp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-poster[hidden] { display: none; }
.hp-host { position: absolute; inset: 0; z-index: 1; }
.hp-host canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.hp-host canvas:active { cursor: grabbing; }
.hp-host:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
/* طبقة الانتقال في محرك لَبِنة (تُستعمل داخل البيت؛ تبقى شفافة هنا) */
.hp-host .hs-fade { position: absolute; inset: 0; background: #E9E3D8; opacity: 0; pointer-events: none; }

.hp-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  inset-inline-start: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(11, 16, 34, 0.82);
  color: #F2F3F5;
  font-size: var(--fs-small);
  font-weight: 500;
}

/* الألواح: لكل حالة لوحها، ولا يظهر إلا لوح الحالة الحالية */
.hp-p-preview, .hp-p-loading, .hp-p-ready, .hp-p-failed, .hp-p-photos { display: none !important; }
.hp-stage[data-state="preview"] .hp-p-preview,
.hp-stage[data-state="loading"] .hp-p-loading,
.hp-stage[data-state="failed"] .hp-p-failed { display: grid !important; }
.hp-stage[data-state="ready"] .hp-p-ready,
.hp-stage[data-state="photos"] .hp-p-photos { display: flex !important; }
.hp-stage[data-state="ready"] .hp-badge, .hp-stage[data-state="photos"] .hp-badge { display: none; }

.hp-panel { position: absolute; z-index: 2; color: #F2F3F5; }
/* أ) معاينة (23 أكتوبر بعد النقد، v29): صورة الموقع كاملة بلا شريط يغطيها، وزر المجسم حبة صغيرة في الزاوية السفلية
   قرب الصورة التي يجسّمها (يسار الشاشة في المواقع الأربعة). الشرح (hp-lead) وصف للزر لقارئ الشاشة فقط */
.hp-p-preview {
  inset-inline-end: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  justify-items: end;
  gap: 6px;
}
.hp-lead { margin: 0; font-size: var(--fs-body); line-height: 1.6; color: #E4E7EB; }
.hp-try { min-height: 40px; padding: 0 14px 0 16px; gap: 8px; font-size: var(--fs-small); font-weight: 600; white-space: nowrap; }
.hp-try [data-icon] { width: 18px; height: 18px; }
@media (hover: none) { .hp-try { min-height: 44px; } }
.hp-size { max-width: 30ch; margin: 0; padding: 6px 10px; border-radius: 10px; background: rgba(11, 16, 34, 0.88); font-size: var(--fs-small); line-height: 1.5; color: #C9CED6; }
/* ب) التحميل: حالة نصية في المساحة نفسها والصورة باقية */
.hp-p-loading {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: rgba(11, 16, 34, 0.86);
  font-size: var(--fs-body);
  white-space: nowrap;
}
/* ج) جاهز: تلميح أعلى، وأزرار التحكم أسفل */
.hp-hint {
  position: absolute;
  z-index: 2;
  top: 12px;
  inset-inline: 12px;
  justify-content: center;
  margin: 0;
  pointer-events: none;
}
.hp-hint::before { content: none; }
.hp-stage[data-state="ready"] .hp-hint { display: block !important; width: fit-content; margin-inline: auto; padding: 6px 14px; border-radius: var(--radius-pill); background: rgba(11, 16, 34, 0.8); color: #F2F3F5; font-size: var(--fs-small); text-align: center; }
.hp-controls, .hp-photos {
  position: absolute;
  z-index: 2;
  inset-inline: 10px;
  bottom: 10px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.hp-ctl {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(11, 16, 34, 0.84);
  color: #F2F3F5;
  font: inherit;
  font-size: var(--fs-small);
  cursor: pointer;
}
.hp-ctl:hover { background: rgba(26, 35, 70, 0.92); }
.hp-ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hp-ctl-text { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; }
.hp-ctl-text svg { width: 18px; height: 18px; }
/* الشاشة الضيقة: الأزرار كلها أيقونات بأسماء مقروءة لقارئ الشاشة، فتبقى في صف واحد أسفل الصورة ولا تغطي المجسم */
@media (max-width: 560px) {
  .hp-controls { flex-wrap: nowrap; gap: 6px; }
  .hp-ctl-text { padding: 0; width: 44px; justify-content: center; }
  .hp-ctl-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.hp-count { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-pill); background: rgba(11, 16, 34, 0.84); color: #F2F3F5; font-size: var(--fs-small); }
/* د) تعذر التشغيل: تفسير وخياران فوق الصورة المعتمة */
.hp-p-failed {
  inset: 0;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  background: rgba(8, 12, 27, 0.8);
}
.hp-fail-t { margin: 0; max-width: 34ch; font-size: var(--fs-body); line-height: 1.6; }
.hp-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* 18 أكتوبر: أول شاشة صورة وزر «جرّب المجسم» فقط. اختيار النموذج والتوضيح والروابط تظهر بعد أول تشغيل (is-engaged من home-preview.js)
   وتحت المعاينة، فلا تزيح المجسم وهو يتحرك */
.hp-tabs { order: 1; }
.hp-note { order: 2; }
.hp-actions { order: 3; }
/* 21 أكتوبر: التبويبات ظاهرة من البداية (مسرح النماذج)، والتوضيح والروابط بعد أول تشغيل كما كانت */
.hp:not(.is-engaged) :is(.hp-note, .hp-actions) { display: none; }
.hp.is-engaged :is(.hp-note, .hp-actions) { animation: hp-in 0.32s var(--ease-out) both; }
@keyframes hp-in { from { opacity: 0; transform: translateY(6px); } }

.hp-note { margin: 0; color: var(--text-2); font-size: var(--fs-small); line-height: 1.7; }
.hp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.hp-actions .text-link { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 899px) {
  /* الجوال: الافتتاحية بارتفاع محتواها بدل ملء الشاشة وتوسيطه، فتظهر المعاينة أبكر (الخط والأهداف والترتيب كما هي) */
  .home .hero-grid { min-height: 0; align-items: start; padding-block: 20px 12px; gap: 28px; }
  .hp { margin-inline: auto; }
  .hp-tabs { width: 100%; }
  .hp-tab { flex: 1 1 0; padding: 0 10px; }
  .hp-stage { aspect-ratio: 4 / 3; }
}
/* v29: شارة «معاينة» فوق صورة الموقع غطّت شعاره أعلى الشاشة، وغطّت أزرار لَبِنة أسفلها، فلا تظهر مع صورة الموقع:
   شريط الموقع نفسه يقول «نموذج تجريبي من نواة»، والتوضيح تحت التبويبات كذلك. تبقى في التحميل وتعذّر التشغيل */
.hp-stage[data-state="preview"] .hp-badge { display: none; }
/* الجوال: الحبة أقرب للزاوية، والتوضيح تحت المعاينة (hp-note) */
@media (max-width: 480px) {
  .hp-p-preview { inset-inline-end: 8px; bottom: 8px; max-width: calc(100% - 16px); }  .hp-try { padding: 0 12px 0 14px; }
}

/* ---------- النماذج: اتجاهات أخرى ---------- */
.home-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 28px; }
.home-more-t { margin: 0; color: var(--text-2); }
.home-more-list { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; padding: 0; list-style: none; }
.home-more-list a { display: inline-flex; align-items: center; min-height: 44px; }

/* بطاقات النماذج البارزة: زر فتح النموذج ورابط ثانوي ورابط الطلب */
.home .sample-actions { gap: 8px 18px; }
.home .sample-actions .text-link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- الدعوة الأخيرة: الطلب أولًا، وواتساب سؤال ثانوي ---------- */
.cta-ask { margin-top: 16px; color: var(--text-2); }
.cta-ask .text-link { display: inline-flex; align-items: center; min-height: 44px; }

/* تقليل الحركة: لا انتقالات في عناصر الافتتاحية الجديدة */
@media (prefers-reduced-motion: reduce) {
  .hp-tab, .hp-ctl { transition: none; }
  .hp.is-engaged :is(.hp-note, .hp-actions) { animation: none; }
}

/* =================================================================
   مسرح النماذج (21 أكتوبر): الشغل نفسه هو أول ما يراه الزائر
   - المسرح أكبر عنصر في أول شاشة، وتحته ثلاثة تبويبات بالاسم وما يجرّبه الزائر فيها
   - لحظة حركة واحدة عند فتح الصفحة: النص يصعد قليلًا، والمسرح ينفتح من الوسط وصورته تستقر.
     بعدها لا حركة تلقائية في الرئيسية (الأقسام تظهر كما هي، main.js)
   ================================================================= */
@media (min-width: 900px) {
  .home .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; } /* 22 أكتوبر: عمود النص أعرض قليلًا ليبقى العنوان سطرين */
  .home .hero-copy h1 { font-size: var(--fs-display); max-width: none; }
  .home .hero-visual.hp { max-width: 780px; justify-self: end; }
}
.home .hp-stage { border-radius: 22px; box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04); }
.hp[data-model="rand"] .hp-stage { background: #E9D6B4; }
.hp-rand { position: absolute; inset: 0; }
/* الزجاجة بلا تقريب: نخفي زري التقريب في رَنْد فقط */
.hp[data-model="rand"] [data-hp-ctl^="zoom"], .hp[data-model="company"] [data-hp-ctl^="zoom"] { display: none; }

/* التبويبات: ثلاث خانات بعرض المسرح، الاسم ثم سطر بما يجرّبه الزائر */
.home .hp-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* 23 أكتوبر: أربعة نماذج، ركن أولها */
  gap: 6px;
  width: 100%;
  padding: 5px;
  border-radius: 16px;
}
.home .hp-tab {
  display: grid;
  gap: 2px;
  align-content: center;
  justify-items: start;
  min-height: 58px;
  padding: 8px 14px;
  border-radius: 12px;
  text-align: start;
  white-space: normal;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.home .hp-tab b { font-size: 0.98rem; font-weight: 700; color: inherit; }
.home .hp-tab span { font-size: 0.8rem; line-height: 1.4; color: var(--text-2); }
.home .hp-tab[aria-pressed="true"] span { color: #C9D2CD; }
@media (max-width: 599px) { .home .hp-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* الجوال: صفّان من اثنين */
.hp-poster { transition: opacity 0.22s var(--ease-out); }
.hp.is-switching .hp-poster { opacity: 0.35; }
@media (max-width: 480px) {
  .home .hp-tab { padding: 8px 10px; min-height: 56px; }
  .home .hp-tab b { font-size: 0.92rem; }
  .home .hp-tab span { font-size: 0.74rem; }
}

/* لحظة الافتتاح الوحيدة */
@media (prefers-reduced-motion: no-preference) {
  .home .hero-copy > * { animation: hero-rise 0.7s var(--ease-out) both; }
  .home .hero-copy > :nth-child(2) { animation-delay: 0.05s; }
  .home .hero-copy > :nth-child(3) { animation-delay: 0.1s; }
  .home .hero-copy > :nth-child(4) { animation-delay: 0.15s; }
  .home .hero-copy > :nth-child(5) { animation-delay: 0.2s; }
  .home .hero-copy > :nth-child(6) { animation-delay: 0.25s; }
  .home .hp-stage { animation: stage-open 1.05s cubic-bezier(0.2, 0.7, 0.1, 1) 0.1s both; }
  /* المرحلة 4 (البند 18): الصورة تستقر مع فتح الشاشة. 23 أكتوبر بعد النقد (v29): بلا اقتراب الكاميرا بعدها،
     فالصورة الأولى صارت صفحة موقع، والاقتراب كان يقص قائمتها وحوافها */
  .home .hp-stage .hp-poster { animation: poster-settle 1.6s cubic-bezier(0.2, 0.7, 0.1, 1) 0.1s both; }
  .home .hp-tabs { animation: hero-rise 0.6s var(--ease-out) 0.55s both; }
}
@keyframes hero-rise { from { opacity: 0.25; transform: translateY(12px); } }
@keyframes stage-open { from { clip-path: inset(9% 7% 9% 7% round 30px); } to { clip-path: inset(0 0 0 0); } }
@keyframes poster-settle { from { transform: scale(1.09); } }

/* الجوال: سطر الطمأنة تحت السعر دائمًا، فلا يقفز بين سطر وسطرين عند وصول الخط (قياس 21 أكتوبر: إزاحة 0.084) */
@media (max-width: 899px) {
  .home .hero-offer span { flex-basis: 100%; }
}

/* ---------- «مدار»: المدار حول المسرح (21 أكتوبر، البند 13) ----------
   العنصر المميز الوحيد في الهوية: مدار رفيع مائل من شكل شعار نواة، ونواة صغيرة مضيئة عليه.
   زخرفة ثابتة بلا حركة، خلف المسرح، ولا تلتقط النقر */
.home .hero-visual.hp { position: relative; isolation: isolate; }
.home .hero-visual.hp::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -13% -9% 17% -9%;
  border: 1.5px solid rgba(61, 220, 151, 0.32);
  border-radius: 50%;
  transform: rotate(-9deg);
  pointer-events: none;
}
.home .hero-visual.hp::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -7.3%;
  top: 52%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #8CF5C6 45%, #3DDC97);
  box-shadow: 0 0 18px 6px rgba(61, 220, 151, 0.35);
  pointer-events: none;
}
.home .hp-stage { box-shadow: 0 50px 120px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(170, 185, 255, 0.08); }
/* الجوال: مدار أضيق داخل حدود الشاشة (الافتتاحية تقص ما يخرج عنها) */
@media (max-width: 899px) {
  .home .hero-visual.hp::before { inset: -6% -5% 20% -5%; }
  .home .hero-visual.hp::after { left: -3.5%; top: 46%; width: 11px; height: 11px; }
}

/* ---------- 22 أكتوبر (خطة «نواة الحيّة»، المرحلة 1) ----------
   - التوضيح «نموذج تجريبي… المجسم إضافة» ظاهر من البداية: الزائر يعرف أن المجسم إضافة قبل أن يشغّله
   - مكان الروابط محجوز من البداية، فلا يقفز المسرح 48px عند التشغيل
   - «جرّب المجسم» ثانوي: زر أساسي واحد في أول شاشة («اطلب عرضًا»)
   - الجوال: العنوان، ثم المسرح والتبويبات، ثم التمهيد والسعر والأزرار. أقوى ما عندنا قبل أن يمرر الزائر
     23 أكتوبر بعد النقد (v29): العكس. العنوان ثم التمهيد والسعر والزر والمدة، ثم الجهاز: كان الزر عند 987px تحت أول شاشة،
     والزائر يرى جهازًا قبل أن يعرف لمن الموقع وماذا بعده */
.hp:not(.is-engaged) .hp-note { display: block; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 1.3، قرار صاحب الموقع): «فتح النموذج الكامل» و«اطلب موقعًا مماثلًا» ظاهران من البداية.
   كانا يظهران بعد تشغيل المجسم فقط ومكانهما فارغ، وأغلب الزوار لا يشغّلونه فلا يرون الطريق إلى الموقع الحي.
   وصورة الموقع نفسها تفتحه ما دامت صورة (home-preview.js) */
.hp:not(.is-engaged) .hp-actions { display: flex; }
.hp.is-engaged :is(.hp-note, .hp-actions) { animation: none; }
.hp-stage[data-state="preview"] :is(.hp-poster, .hp-host) { cursor: pointer; }
/* حبة المجسم فوق صورة مزدحمة: مادة داكنة شبه شفافة (تباين النص نحو 9:1 حتى فوق الأبيض)، واستجابة فورية عند الضغط */
.hp-try.btn-ghost { background: rgba(11, 16, 34, 0.78); color: #F2F3F5; border-color: rgba(238, 241, 250, 0.32); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.7); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); transition: transform 0.1s ease-out, background 0.2s, border-color 0.2s; }
.hp-try.btn-ghost:hover { background: rgba(11, 16, 34, 0.9); border-color: var(--accent); }
.hp-try.btn-ghost:active { transform: scale(0.97); }
@media (prefers-reduced-transparency: reduce) { .hp-try.btn-ghost { background: #0B1022; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (hover: none) { .hp-hint-keys { display: none; } }
@media (max-width: 899px) {
  .home .hero-copy { display: contents; }
  .home .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .home .hero-copy h1 { order: 1; margin-bottom: 18px; }
  .home .hero-copy .lead { order: 2; }
  .home .hero-offer { order: 3; }
  .home .hero-actions { order: 4; }
  /* 11 نوفمبر: وعد الرد بين الزر الرئيسي ورابط «موقع أو تطبيق؟» */
  .home .hero-actions .hero-reply { order: 1; margin: 6px 0 0; }
  .home .hero-actions .btn-ghost { order: 2; }
  .home .hero-visual.hp { order: 6; margin-top: 32px; }

}
/* حلقة المدار تمر خلف التبويبات لا عبرها */
.home .hp-tabs { background: var(--surface); }

/* =================================================================
   22 أكتوبر (خطة «نواة الحيّة»، المرحلة 2): الرئيسية فصول بألوان النماذج
   - كل فصل حقل لون واحد من الأرض للسقف، والفصول ملاصقة بلا فواصل
   - الألوان من ملفات النماذج نفسها (مجلد demos ومشروع contracting-site)، وكل جمع نص مع أرضية ≥ 4.5:1
   - العناوين تبدأ من الحافة نفسها في كل فصل، والجهاز في الجهة الأخرى
   ================================================================= */
.ch {
  --ch-bg: var(--bg); --ch-ink: var(--text); --ch-ink-2: var(--text-2);
  --ch-accent: var(--accent); --ch-on-accent: var(--on-accent); --ch-tag: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow-x: clip; /* قاعدة اللابتوب أعرض من الشاشة قليلًا: لا تمرير أفقي في الجوال */
  background: var(--ch-bg);
  color: var(--ch-ink);
  padding-block: clamp(72px, 10vw, 128px);
}
@media (min-width: 900px) { .ch { min-height: 90svh; display: grid; align-items: center; } }
.has-intro main .ch { content-visibility: auto; contain-intrinsic-size: auto 900px; } /* 28 أكتوبر: الفصول داخل غلاف شريط الفصول (.ch-run) في صفحة النماذج */

/* ركن: فيروزي عميق والنص أبيض (5.8:1، والوسم 4.8:1) */
.ch--rukn { --ch-bg: #0A6F80; --ch-ink: #FFFFFF; --ch-ink-2: #DDF0F2; --ch-accent: #FFFFFF; --ch-on-accent: #064C58; --ch-tag: rgba(255, 255, 255, 0.1); }
/* المستشفى: أبيض طبي وكحلي وفيروزي (الحبر الثانوي 7.2:1، الزر 5.1:1) */
.ch--hospital { --ch-bg: #F4F7F7; --ch-ink: #0F2233; --ch-ink-2: #3D5563; --ch-accent: #0B7A7A; --ch-on-accent: #FFFFFF; --ch-tag: #E3EEEE; color-scheme: light; }
/* رَنْد: بني العطر والورق والرمل (10:1) */
.ch--rand { --ch-bg: #2A1D14; --ch-ink: #F3EEE4; --ch-ink-2: #D9CDB8; --ch-accent: #E9D6B4; --ch-on-accent: #2A1D14; --ch-tag: rgba(233, 214, 180, 0.14); }
/* لَبِنة: رمل وحبر وصدأ (الزر 7.1:1) */
.ch--rikaz { --ch-bg: #F4F2EE; --ch-ink: #1D1B18; --ch-ink-2: #4E4840; --ch-accent: #8A4524; --ch-on-accent: #FFFFFF; --ch-tag: #E9E4DC; color-scheme: light; }

.ch-grid { display: grid; gap: clamp(36px, 5vw, 72px); align-items: center; width: 100%; }
@media (min-width: 900px) {
  .ch--laptop .ch-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
  .ch--laptop .ch-title { max-width: none; }
  .ch--phone .ch-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.ch-title { font-family: var(--font-display); font-size: var(--fs-display); font-weight: 700; line-height: 1.18; color: var(--ch-ink); max-width: 14ch; text-wrap: balance; }
.ch-lead { margin-top: 22px; max-width: 34rem; color: var(--ch-ink-2); font-size: var(--fs-sub); line-height: 1.75; }
/* ما في النموذج: الأساس والخيار والإضافة بوسم صغير، بلا خطوط فاصلة */
.ch-scope { display: grid; gap: 10px; max-width: 34rem; margin: 28px 0 0; padding: 0; list-style: none; }
.ch-scope li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: var(--fs-body); line-height: 1.6; }
.ch-tag { flex: none; padding: 2px 12px; border-radius: var(--radius-pill); background: var(--ch-tag); color: var(--ch-ink); font-size: var(--fs-small); font-weight: 500; }
.ch-tag--base { background: var(--ch-ink); color: var(--ch-bg); }
/* 23 أكتوبر: «إضافة» بسعر مستقل فتأخذ شكلًا مختلفًا عن «خيار»: إطار بلا خلفية */
.ch-tag--add { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.ch-legend { margin-top: 22px; max-width: 34rem; color: var(--ch-ink-2); font-size: var(--fs-small); line-height: 2.2; }
.ch-legend .ch-tag { padding-block: 1px; }
.ch-price { margin-top: 24px; color: var(--ch-ink-2); font-size: var(--fs-body); }
.ch-price strong { color: var(--ch-ink); font-family: var(--font-display); font-size: var(--fs-sub); font-weight: 700; font-variant-numeric: tabular-nums; }
.ch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 32px; }
.ch .ch-btn { background: var(--ch-accent); color: var(--ch-on-accent); }
.ch .ch-btn:hover { background: color-mix(in srgb, var(--ch-accent) 86%, var(--ch-ink)); }
.ch-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ch-ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.ch-link:hover { text-decoration-thickness: 2px; }
.ch :focus-visible { outline-color: var(--ch-ink); }

/* الجهاز: الموقع كما يراه عميله. الإطار مرسوم بالكود، والصورة لقطة من النموذج نفسه */
.ch-device { margin: 0; min-width: 0; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 2.6، طلب صاحب الموقع): لوحة رذاذ العطر فوق جهاز رَنْد (chapters.js)، بلا لمس،
   وأعرض من الجهاز ليتسع الرذاذ حوله. الفصل يقص ما يخرج أفقيًا (.ch overflow-x: clip) */
.ch--rand .ch-device { position: relative; }
.ch-mist { position: absolute; z-index: 5; left: -40%; top: -30%; width: 180%; max-width: none; height: 140%; pointer-events: none; }
.ch-screen { display: block; overflow: hidden; background: #0E1116; }
.ch-screen img { display: block; width: 100%; height: auto; }
.ch-laptop .ch-screen {
  border: clamp(6px, 0.8vw, 11px) solid #0E1116;
  border-bottom-width: clamp(12px, 1.6vw, 20px);
  border-radius: 14px 14px 4px 4px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.55);
}
.ch-laptop .ch-screen img { aspect-ratio: 16 / 10; }
/* قاعدة اللابتوب: شريط أعرض قليلًا من الشاشة */
.ch-base { display: block; height: 12px; margin-inline: -5%; border-radius: 0 0 14px 14px; background: #B9BFC9; box-shadow: inset 0 -3px 0 #9097A3; }
.ch-phone .ch-screen {
  width: min(300px, 64vw);
  margin-inline: auto;
  border: 9px solid #0E1116;
  border-radius: 42px;
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.6);
}
.ch-phone .ch-screen img { aspect-ratio: 600 / 1298; border-radius: 33px; }
.ch-cap { margin-top: 26px; color: var(--ch-ink-2); font-size: var(--fs-small); text-align: center; }
.ch-phone .ch-cap { margin-top: 18px; }

/* الجوال: النص ثم الجهاز، والأزرار بعرض مريح */
@media (max-width: 899px) {
  .ch-title { max-width: 16ch; }
  .ch-scope li { justify-content: flex-start; }
  .ch-scope li > span:first-child { flex: 1; }
}

/* قسم «موقع أو تطبيق؟» بعد الفصول: البطاقتان بلا أيقونات في مربعات */
.need-more { margin-top: 26px; max-width: 46rem; color: var(--text-2); line-height: 1.9; }

/* الترويسة تأخذ لون الفصل الذي تحتها (chapters.js يكتب <html data-ch>). القائمة المنسدلة في الجوال تبقى بلونها */
.site-header { transition: border-color 0.3s, background-color 0.3s; }
.site-header .brand { color: var(--hd-ink, var(--text)); transition: color 0.3s; }
.site-header .brand-mark { color: var(--hd-mark, var(--accent)); transition: color 0.3s; }
.site-header .menu-btn { color: var(--hd-ink, var(--text)); border-color: var(--hd-line, var(--line-strong)); transition: color 0.3s, border-color 0.3s; }
.site-header.is-scrolled { border-bottom-color: var(--hd-line-soft, var(--line)); }
@media (min-width: 861px) {
  .site-header .nav-links a:not(.btn) { color: var(--hd-ink-2, var(--text-2)); }
  .site-header .nav-links a:not(.btn):hover, .site-header .nav-links a[aria-current="page"] { color: var(--hd-ink, var(--text)); }
}
html[data-ch="rukn"] .site-header { --hd-ink: #FFFFFF; --hd-ink-2: #DDF0F2; --hd-line: rgba(255, 255, 255, 0.4); --hd-line-soft: rgba(255, 255, 255, 0.2); background: rgba(10, 111, 128, 0.86); }
html[data-ch="hospital"] .site-header { --hd-ink: #0F2233; --hd-ink-2: #3D5563; --hd-mark: #0B7A7A; --hd-line: #C5D3D5; --hd-line-soft: #DCE5E6; background: rgba(244, 247, 247, 0.86); }
html[data-ch="rand"] .site-header { --hd-ink: #F3EEE4; --hd-ink-2: #D9CDB8; --hd-line: rgba(233, 214, 180, 0.4); --hd-line-soft: rgba(233, 214, 180, 0.2); background: rgba(42, 29, 20, 0.88); }
html[data-ch="rikaz"] .site-header { --hd-ink: #1D1B18; --hd-ink-2: #4E4840; --hd-mark: #8A4524; --hd-line: #B9B1A4; --hd-line-soft: #DCD6CC; background: rgba(244, 242, 238, 0.88); }
html[data-ch="hospital"] .site-header .nav-links a:not(.btn):hover, html[data-ch="rikaz"] .site-header .nav-links a:not(.btn):hover { background: rgba(0, 0, 0, 0.05); }

@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header .brand, .site-header .brand-mark, .site-header .menu-btn { transition: none; }
}

/* =================================================================
   22 أكتوبر (المرحلة 3): مشهد «من الصفحة إلى واتساب» ودخول الفصول
   ================================================================= */
.flow { padding-block: clamp(80px, 11vw, 140px); background: var(--bg); }
.flow-head { max-width: 40rem; }
.flow-title { font-family: var(--font-display); font-size: var(--fs-display); font-weight: 700; line-height: 1.18; text-wrap: balance; }
.flow-lead { margin-top: 20px; color: var(--text-2); font-size: var(--fs-sub); line-height: 1.75; }
.flow-grid { display: grid; gap: 40px; margin-top: clamp(40px, 6vw, 72px); }
.flow-steps { display: grid; gap: 48px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.flow-step { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-content: center; }
.flow-step > :not(.flow-n) { grid-column: 2; }
.flow-n { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font-family: var(--font-display); font-size: var(--fs-sub); font-weight: 700; }
.flow-step h3 { font-size: var(--fs-sub); line-height: 1.4; }
.flow-step > p { color: var(--text-2); font-size: var(--fs-body); line-height: 1.8; max-width: 30rem; }
.flow-shot { margin: 18px 0 0; }
/* الجوال المرسوم: إطار داكن بزوايا 40px، وكل حالة طبقة فوق الأخرى */
.flow-phone { position: relative; width: 240px; aspect-ratio: 600 / 1298; overflow: hidden; border: 8px solid #05070F; border-radius: 38px; background: #F5F8FA; box-shadow: 0 0 0 1px rgba(170, 185, 255, 0.18), 0 40px 80px -40px rgba(0, 0, 0, 0.7); }
.flow-phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* الحالة الرابعة: الرسالة كما تصل صاحب النشاط (رسم توضيحي، لا شعار ولا واجهة تطبيق بعينه) */
.flow-chat { display: flex; flex-direction: column; height: 100%; padding: 14px 12px; background: #EEF3EF; color: #13201A; font-size: 12.5px; line-height: 1.7; text-align: right; }
.flow-chat-top { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 4px 12px; border-bottom: 1px solid #D6E0DA; }
.flow-chat-top b { font-size: 14px; }
.flow-chat-top span { color: #4A5A52; font-size: 11px; }
.flow-bubble { align-self: flex-start; margin-top: 14px; max-width: 92%; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: #FFFFFF; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); }
.flow-bubble p + p { margin-top: 2px; }
.flow-chat-note { margin-top: auto; color: #4A5A52; font-size: 11px; text-align: center; }
.flow-stage { display: none; }
/* 23 أكتوبر (بعد إعادة التقييم): على الجوال كان المشهد قرابة 3,000 بكسل لأربع خطوات. الخطوات الثلاث الأولى صورتها مصغّرة بجانب النص،
   والرابعة (الرسالة كما تصل) تبقى بحجمها لأن نصها يُقرأ */
@media (max-width: 899px) {
  .flow-steps { gap: 36px; }
  .flow-step:not([data-flow="4"]) { grid-template-columns: auto minmax(0, 1fr) 30%; }
  .flow-step:not([data-flow="4"]) > .flow-shot { grid-column: 3; grid-row: 1 / span 3; align-self: start; margin: 0; }
  .flow-step:not([data-flow="4"]) .flow-phone { width: 100%; border-width: 5px; border-radius: 22px; }
}

@media (min-width: 900px) {
  .flow-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; }
  /* مسافة قبل أول خطوة وبعد آخرها: كل خطوة تصل وسط الشاشة والجوال ثابت كاملًا في مكانه */
  .flow-steps { gap: 0; padding-block: 18vh 28vh; }
  .flow-step { min-height: 50vh; }
  .flow-shot { display: none; }
  .flow-stage { display: grid; place-items: center; position: sticky; top: calc(var(--header-h) + 4vh); height: calc(92vh - var(--header-h)); }
  .flow-stage .flow-phone { width: min(340px, 38vh); }
  /* الخطوات هي القصة: عنوان كل خطوة بحجم العناوين، والشرح بحجم التمهيد */
  .flow-step h3 { font-size: var(--fs-title); line-height: 1.25; }
  .flow-step > p { font-size: var(--fs-sub); margin-top: 6px; }
  .flow-n { width: 52px; height: 52px; }
  .flow-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s var(--ease-out); }
  .flow-layer.is-on { opacity: 1; }
  /* الخطوة الحالية بلون النص الكامل، والبقية أخفت باللون لا بالشفافية: تبقى مقروءة (6.4:1 على الأقل) */
  .flow.is-live .flow-step > :is(h3, p) { transition: color 0.35s var(--ease-out); }
  .flow.is-live .flow-step:not(.is-on) h3 { color: var(--text-2); }
  .flow.is-live .flow-step:not(.is-on) > p { color: var(--text-3); }
  .flow.is-live .flow-step.is-on .flow-n { background: var(--accent); color: var(--on-accent); }
}

/* دخول الفصل: مرة واحدة حين يصل الزائر. قبلها مخفي فقط إن كان السكربت يعمل (html.ch-enter) */
.ch-title .w { display: inline-block; }
.ch-enter .ch:not(.is-in) :is(.ch-title .w, .ch-lead, .ch-legend, .ch-scope, .ch-price, .ch-actions, .ch-device) { opacity: 0; }
.ch-enter .ch.is-in .ch-title .w { animation: ch-word 0.7s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
.ch-enter .ch.is-in :is(.ch-lead, .ch-legend, .ch-scope, .ch-price, .ch-actions) { animation: ch-up 0.7s var(--ease-out) both; animation-delay: calc(var(--n, 4) * 60ms + 90ms); }
.ch-enter .ch.is-in :is(.ch-scope, .ch-price) { animation-delay: calc(var(--n, 4) * 60ms + 180ms); }
.ch-enter .ch.is-in .ch-actions { animation-delay: calc(var(--n, 4) * 60ms + 270ms); }
.ch-enter .ch.is-in .ch-device { animation: ch-device 0.9s var(--ease-out) both; animation-delay: 120ms; }
@keyframes ch-word { from { opacity: 0; transform: translateY(0.35em); } }
@keyframes ch-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes ch-device { from { opacity: 0; transform: translateY(24px) scale(0.98); } }

@media (prefers-reduced-motion: reduce) {
  .flow-layer, .flow.is-live .flow-step > :is(h3, p) { transition: none; }
}

/* الرسالة المرسومة بمقاس لقطات الجوال نفسها: كل المقاسات نسبة من عرض الجوال (جوال 390px)، فتصغر مع الإطار كما تصغر اللقطات */
@supports (container-type: inline-size) {
  .flow-phone { container-type: inline-size; }
  .flow-chat { padding: 4.6cqw 3.6cqw; font-size: 3.85cqw; }
  .flow-chat-top { padding: 1cqw 1cqw 3.6cqw; }
  .flow-chat-top b { font-size: 4.4cqw; }
  .flow-chat-top span, .flow-chat-note { font-size: 3.2cqw; }
  .flow-bubble { margin-top: 4cqw; padding: 3cqw 3.6cqw; border-radius: 4cqw 4cqw 4cqw 1.2cqw; }
}

/* 23 أكتوبر: شُيل «الانتقال الحر» بين الفصول (الالتصاق والتعتيم) بطلب صاحب الموقع؛ الفصول في صفحة النماذج تحت بعضها */

/* =================================================================
   22 أكتوبر (المرحلة 5): «اكتب اسم نشاطك» (chapters.js)
   ================================================================= */
@font-face { font-family: "Readex Pro"; src: url("../fonts/readex-arabic.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }

/* الاسم مكان اسم العلامة في لقطة كل نموذج: الموضع والخط واللون والخلفية من النموذج نفسه بمقاس اللقطة،
   والمقاسات نسبة من عرض اللقطة (cqw) فتصغر معها. الخلفية بلون الترويسة تغطي الاسم الأصلي
   28 أكتوبر: أُعيد تصوير اللقطات بشريط النماذج الحالي، وضُبط top هنا وفي .try-brand بمطابقة مكان الشعار بين اللقطة القديمة والجديدة */
.ch-screen { position: relative; container-type: inline-size; }
.ch-brand, .ch-engrave { position: absolute; display: flex; align-items: center; overflow: hidden; white-space: nowrap; pointer-events: none; line-height: 1; }
.ch-brand[hidden], .ch-engrave[hidden] { display: none; }
.ch--rukn .ch-brand { right: 9.69%; top: 7.3%; height: 3.4%; min-width: 2.7%; max-width: 20%; padding-inline-end: 0.4cqw; background: #FFFFFF; color: #0F1E2B; font: 600 1.4cqw/1 "Readex Pro", "IBM Plex Sans Arabic", sans-serif; }
.ch--hospital .ch-brand { right: 8.13%; top: 9.22%; height: 3.9%; min-width: 8.3%; max-width: 24%; padding-inline-end: 0.4cqw; background: #FEFEFE; color: #0F2233; font: 600 1.44cqw/1 "IBM Plex Sans Arabic", sans-serif; }
.ch--rand .ch-brand { right: 5.13%; top: 5.95%; height: 5.9%; min-width: 10.3%; max-width: 46%; padding-inline-end: 1cqw; background: #EDEDE7; color: #2A1D14; font: 700 8.2cqw/1 "Aref Ruqaa", serif; }
.ch--rikaz .ch-brand { right: 13.33%; top: 7.8%; height: 4.1%; min-width: 7%; max-width: 40%; padding-inline-end: 1cqw; background: #F4F2EE; color: #1D1B18; font: 600 5.38cqw/1 "IBM Plex Sans Arabic", sans-serif; }
/* زجاجة رَنْد: مكان كلمة النقش على الملصق الذهبي، بلون النقش الفاتح */
.ch-engrave {
  left: 46%;
  top: 40.45%;
  height: 1.9%;
  min-width: 7.6%;
  max-width: 30%;
  padding-inline: 1cqw;
  justify-content: center;
  transform: translateX(-50%);
  border-radius: 1cqw;
  background: #DCBC74;
  box-shadow: 0 0 1.4cqw 0.8cqw #DCBC74;
  color: rgba(255, 252, 240, 0.95);
  text-shadow: 0 0.25cqw 0 rgba(140, 100, 30, 0.35);
  font: 700 3.7cqw/1 "Aref Ruqaa", serif;
}

/* =================================================================
   22 أكتوبر (المرحلة 4): لقطة من النموذج نفسه بجانب كل جهاز (chapters.js)
   بطاقة 16:10 بإطار بلون الفصل كأنها مقصوصة منه، ووسم الإضافة أو الخيار عليها.
   23 أكتوبر (بعد إعادة التقييم): تحت الجهاز في جهته الخارجية، تلمس حافته السفلى فقط ولا تغطي شاشته (الموقع هو الأساس).
   بلا JS أو مع «تقليل الحركة» أو توفير البيانات: الصورة الأولى فقط
   ================================================================= */
.ch-clip { position: relative; z-index: 2; width: 46%; margin: -22px 0 0; margin-inline-start: auto; }
.ch-phone .ch-clip { width: min(260px, 60%); margin-top: -14px; }
.ch-clip video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 4px solid var(--ch-bg);
  border-radius: 16px;
  background: #0E1116;
  box-shadow: 0 28px 56px -24px rgba(0, 0, 0, 0.6);
}
.ch-clip-cap {
  position: absolute;
  inset-inline-start: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  background: rgba(5, 7, 15, 0.74);
  color: #FFFFFF;
  font-size: var(--fs-small);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-clip-cap .ch-tag { padding: 0 10px; background: #FFFFFF; color: #0B1022; font-weight: 700; }
.ch-clip-cap .ch-tag--add { background: transparent; color: #FFFFFF; box-shadow: inset 0 0 0 1.5px #FFFFFF; }
.ch-clip-btn {
  position: absolute;
  inset-inline-end: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(5, 7, 15, 0.74);
  color: #FFFFFF;
  cursor: pointer;
}
.ch-clip-btn::before { content: ""; position: absolute; inset: -4px; } /* منطقة اللمس 44 بكسل */
.ch-clip-btn[hidden] { display: none; }
.ch-clip-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ch-clip-btn .i-play { fill: currentColor; stroke: none; }
.ch-clip-btn:not([data-paused]) .i-play, .ch-clip-btn[data-paused] .i-pause { display: none; }
.ch-clip-btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 2.3، قرار صاحب الموقع، فصل ركن، ثم 2.5 لَبِنة و2.6 رَنْد و2.7 المستشفى، فصارت للفصول الأربعة):
   - زر اللقطة ظاهر بحجم 44 نفسه لا بمساحة لمس مخفية فقط
   - على الجوال الجهاز ولقطته بعد العنوان والوصف، ثم ما يشمله والسعر والزر: يرى الموقع قبل أن يقرأ تفاصيله */
.ch .ch-clip-btn { width: 44px; height: 44px; }
.ch .ch-clip-btn::before { inset: 0; }
.ch .ch-clip-btn svg { width: 18px; height: 18px; }
@media (max-width: 899px) {
  .ch .ch-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .ch .ch-copy { display: contents; }
  .ch .ch-device { order: 3; margin-top: 32px; }
  .ch :is(.ch-legend, .ch-scope, .ch-price, .ch-actions) { order: 4; }
  .ch--rukn .ch-legend { margin-top: 32px; }
  .ch:not(.ch--rukn) .ch-scope { margin-top: 32px; } /* بلا دليل الوسوم، فالمسافة على ما يشمله */
}
@media (max-width: 899px) {
  .ch-clip { width: 60%; }
  .ch-phone .ch-clip { width: 64%; }
  .ch-clip-cap { inset-inline-start: 8px; bottom: 8px; max-width: calc(100% - 16px); }
  .ch-clip-btn { inset-inline-end: 8px; top: 8px; }
}
/* الجوال الصغير: البطاقة أضيق من سطر التعليق، فينزل التعليق تحت اللقطة ويلتف بدل أن يُقص */
@media (max-width: 480px) {
  .ch-clip-cap { position: static; margin-top: 6px; max-width: none; padding: 6px 10px 6px 6px; border-radius: 14px; white-space: normal; }
  .ch-clip-cap .ch-tag { white-space: nowrap; }
}

/* =================================================================
   23 أكتوبر (بعد إعادة التقييم): فصل الختام (#need)
   «موقع أو تطبيق؟» والدعوة ورسالة واتساب باسم الزائر في شبكة واحدة، ثم «كيف نعمل» والأسئلة، وحلقات النواة خلفها (main.js).
   يرث .cta-band للحلقات فقط، فنلغي توسيطه وهوامش فقراته
   ================================================================= */
.close.cta-band { text-align: start; border-top: 0; padding-block: clamp(80px, 11vw, 140px) clamp(140px, 18vw, 240px); }
.close p { margin: 0; max-width: none; color: inherit; }
.close .actions { justify-content: flex-start; }
.close-grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (min-width: 900px) { .close-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.close .close-title { margin: 0; max-width: 14ch; font-family: var(--font-display); font-size: var(--fs-display); font-weight: 700; line-height: 1.18; text-wrap: balance; }
.close .close-lead { margin-top: 20px; max-width: 36rem; color: var(--text-2); font-size: var(--fs-sub); line-height: 1.75; }
.close .home-need { margin-top: 32px; }
.close .need-more { margin-top: 22px; max-width: 40rem; color: var(--text-2); line-height: 1.9; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 1.7، قرار صاحب الموقع): الفقرة بروابطها الثلاثة صارت بعد الزر والطمأنة وسطر واتساب، بخط أصغر */
.close .cta-ask + .need-more { margin-top: 10px; font-size: var(--fs-small); line-height: 1.8; }
/* ورابط «أجب عن 3 أسئلة» لا ينقسم بين سطرين، والبطاقتان بسهم بعد اسميهما يقول إنهما تُضغطان (على الجوال لا مؤشر يكشف ذلك) */
.plan-link .text-link { white-space: nowrap; }
.hn-card b::after { content: ""; display: inline-block; width: 0.4em; height: 0.4em; margin-inline-start: 0.55em; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateY(-0.1em) rotate(45deg); transition: translate 0.2s var(--ease-out); }
.hn-card:hover b::after { translate: -3px 0; }
@media (prefers-reduced-motion: reduce) { .hn-card b::after { transition: none; } .hn-card:hover b::after { translate: none; } }
.close .close-actions { margin-top: 32px; }
.close .cta-ask { margin-top: 14px; color: var(--text-2); }
/* v32: التوثيق تحت زر الطلب، بلون النص الثانوي ودرع نعناعي صغير؛ يظهر بعد تركيب الختم الرسمي فقط (main.js) */
.close-verified { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 14px; color: var(--text-2); font-size: var(--fs-small); }
.close-verified [data-icon] { flex: none; width: 18px; height: 18px; color: var(--accent); }
.close-verified .text-link { display: inline-flex; align-items: center; min-height: 44px; margin-inline-start: 4px; }
/* رسالة واتساب كما تصلنا: الجوال المرسوم نفسه في مشهد «من الصفحة إلى واتساب»، والرسالة صادرة من الزائر */
.close-msg { margin: 0; }
.close-msg .iphone { width: min(280px, 72vw); margin-inline: auto; }
@media (min-width: 900px) { .close-msg .iphone { width: min(330px, 100%); } }
.close-chat { background: #EEF3EF; }
.close-bubble { align-self: flex-end; margin-top: auto; background: #D6F5E6; border-radius: 14px 14px 4px 14px; }
.close .close-cap { max-width: 300px; margin: 16px auto 0; color: var(--text-2); font-size: var(--fs-small); line-height: 1.7; text-align: center; }
@supports (container-type: inline-size) { .close-bubble { border-radius: 4cqw 4cqw 1.2cqw 4cqw; } }
/* كيف نعمل: أربع خطوات في صف واحد على الكمبيوتر، بلا خط زمني مزخرف */
.close-how, .close-faq { margin-top: clamp(72px, 9vw, 120px); }
.close-h { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; line-height: 1.25; }
.close .close-sub { margin-top: 10px; color: var(--text-2); }
.close .close-link { margin-top: 20px; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 1.8، قرار صاحب الموقع): «من الاتفاق إلى الإطلاق» طريق واحد
   - الكمبيوتر: خط يربط دوائر الأرقام، يمتلئ بالنعناعي مع التمرير، وكل رقم يصله الخط يضيء (chapters.js يكتب --fill وis-on)
   - الجوال: بطاقة واحدة تُسحب يمينًا ويسارًا بدل أربع تحت بعضها، وفوقها شريط الأرقام نفسه يمتلئ مع السحب ويُضغط للانتقال
   «تقليل الحركة»: الخط كامل والأرقام مضيئة. بلا JavaScript: القائمة كما كانت */
/* .close-steps انتقلت إلى styles.css (الجزء 5.2) لتخدم صفحة «كيف نعمل» أيضًا */
.close .faq-list { margin-top: 24px; }
.close-faq .actions { margin-top: 20px; gap: 12px 28px; }

/* =================================================================
   23 أكتوبر (مقترح الرئيسية الجديدة، الاتجاه أ): «موقعك قبل أن تطلبه» (chapters.js)
   عنوان القسم حقل كبير، وأزرار النوع، ثم الطلب كما يصل على واتساب وموقع بنموذج يناسب النشاط.
   الجوال: الحقل ثم الأزرار ثم الرسالة مباشرة (تبقى فوق لوحة المفاتيح) ثم الجوال ثم الزر
   ================================================================= */
.try { padding-block: clamp(80px, 11vw, 140px); background: var(--bg); }
.try-grid { display: grid; gap: 28px; grid-template-areas: "copy" "out" "foot"; }
@media (min-width: 900px) {
  .try-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); grid-template-areas: "copy out" "foot out"; column-gap: 56px; align-items: start; }
}
.try-copy { grid-area: copy; }
.try-out { grid-area: out; }
.try-foot { grid-area: foot; }
.try-t { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; line-height: 1.3; color: var(--text); }
.try-t label { cursor: text; }
/* 23 أكتوبر بعد v26: الحقل صندوق كتابة واضح (صاحب الموقع لم ينتبه أنه حقل): إطار نعناعي، وخلفية سطح، وأيقونة قلم،
   وتعليمات تحته، ونبضتان هادئتان في الإطار حين يصل الزائر للقسم */
.try-field { position: relative; display: flex; align-items: center; margin-top: 16px; border: 2px solid var(--accent); border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 6px rgba(61, 220, 151, 0.08); transition: box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out); cursor: text; }
.try-field:hover { box-shadow: 0 0 0 6px rgba(61, 220, 151, 0.16); }
.try-field:focus-within { border-color: var(--accent-hover); box-shadow: 0 0 0 6px rgba(61, 220, 151, 0.26); }
.try-pen { flex: none; width: 26px; height: 26px; margin-inline: 18px 0; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.try-input { display: block; width: 100%; min-width: 0; padding: 18px 12px 18px 20px; border: 0; border-radius: 18px; background: transparent; color: var(--text); font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; line-height: 1.3; caret-color: var(--accent); }
.try-input::placeholder { color: var(--text-2); opacity: 1; font-weight: 500; }
.try-input:focus, .try-input:focus-visible { outline: none; }
.try-help { margin-top: 10px; color: var(--text-2); font-size: var(--fs-small); line-height: 1.7; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 1.4، قرار صاحب الموقع): على الجوال الجهاز الذي يظهر فيه الاسم بعيد تحت لوحة المفاتيح،
   فيتحول سطر الشرح إلى تأكيد بالاسم وزر «شاهده» ينقل إلى النتيجة (chapters.js). الكمبيوتر يرى النتيجة بجانب الخانة فيبقى كما هو */
.try-done { display: none; }
@media (max-width: 899px) {
  .try.has-name .try-help { display: none; }
  .try.has-name .try-done { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 6px; color: var(--text); font-size: var(--fs-small); line-height: 1.7; }
  .try-done b { font-weight: 700; }
  .try-see { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: transparent; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .try-see [data-icon] { width: 18px; height: 18px; }
  .try-see:active { scale: 0.96; }
}
.try-types-l { margin-top: 22px; color: var(--text); font-size: var(--fs-small); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .try.is-live .try-field:not(:focus-within) { animation: field-call 1.4s ease-out 0.3s 2; }
}
@keyframes field-call { 50% { box-shadow: 0 0 0 10px rgba(61, 220, 151, 0.3); } }
.try-types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.try-type { min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out); }
.try-type:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--text) 12%); }
.try-type[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.try-type:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.try-type:active { transform: scale(0.97); }
/* النتيجة: اللوحة (ما يصل صاحب النشاط) والجوال (موقعه). الجوال آيفون 17 أدناه */
.try-out { display: grid; grid-template-columns: 1fr; gap: 16px; }
.try-site { width: min(260px, 68vw); margin: 8px auto 0; }
.try-note { color: var(--text-2); font-size: var(--fs-small); line-height: 1.7; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 1.5، قرار صاحب الموقع): على الجوال موقعه أولًا، ثم ما يصله، ثم زر الطلب.
   و«تم» في الجزء 1.4 تنزل إلى الجوال فلا تفوت الزائرَ لوحةٌ فوقه. الكمبيوتر كما هو (الجوال بجانب اللوحة) */
@media (max-width: 899px) { .try-site { order: -1; margin: 0 auto 8px; } }
@media (min-width: 900px) {
  .try-out { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "panel site" "note site"; column-gap: 24px; row-gap: 12px; align-items: start; }
  .try-panel { grid-area: panel; }
  .try-note { grid-area: note; }
  .try-site { grid-area: site; width: 100%; margin: 0; }
}
/* اسم النشاط مكان اسم العلامة: المواضع مقيسة من اللقطات نفسها (23 أكتوبر)، والمقاسات نسبة من عرض الصفحة */
.ip-page { position: relative; aspect-ratio: 600 / 1298; container-type: inline-size; }
.ip-page img { display: block; width: 100%; height: 100%; object-fit: fill; } /* لقطة المستشفى 540×1140: فرق 2% في النسبة، فتُملأ بلا قص كي تبقى مواضع الاسم صحيحة */
.try-brand { position: absolute; display: flex; align-items: center; overflow: hidden; white-space: nowrap; pointer-events: none; line-height: 1; padding-inline-end: 0.8cqw; }
.try:is([data-type="company"], [data-type="other"]) .try-brand { right: 15%; top: 7.32%; height: 4.55%; min-width: 20%; max-width: 62%; background: #FFFFFF; color: #0F1E2B; font: 700 4.6cqw/1 "Readex Pro", "IBM Plex Sans Arabic", sans-serif; }
.try[data-type="hospital"] .try-brand { right: 15.9%; top: 8.4%; height: 2.7%; min-width: 24.5%; max-width: 62%; background: #FEFEFE; color: #0F2233; font: 600 4cqw/1 "IBM Plex Sans Arabic", sans-serif; }
.try[data-type="rand"] .try-brand { right: 5.13%; top: 5.95%; height: 5.9%; min-width: 10.3%; max-width: 46%; background: #EDEDE7; color: #2A1D14; font: 700 8.2cqw/1 "Aref Ruqaa", serif; }
.try[data-type="contracting"] .try-brand { right: 13.33%; top: 7.8%; height: 4.1%; min-width: 7%; max-width: 40%; background: #F4F2EE; color: #1D1B18; font: 600 5.38cqw/1 "IBM Plex Sans Arabic", sans-serif; }
/* شريط الحالة بلون أعلى كل لقطة (مقيس منها)، فيبدو المتصفح ممتدًا تحته */
.try[data-type="hospital"] .iphone { --ip-top: #102232; }
.try:is([data-type="company"], [data-type="other"]) .iphone { --ip-top: #101D2B; }
.try[data-type="rand"] .iphone { --ip-top: #291D13; }
.try[data-type="contracting"] .iphone { --ip-top: #2C2823; }

/* ---------- لوحات ما يصل صاحب النشاط (مثال توضيحي)، كل نوع بأداته: محادثة، جدول، حجوزات، طلبات، تقويم ----------
   أجزاء واجهة حقيقية الشكل: حدودها وجداولها من طبيعتها. بلا شعارات تطبيقات */
.try-panel { display: grid; gap: 12px; }
.tp { overflow: hidden; border-radius: 18px; background: #F4F7F6; color: #13201A; font-size: var(--fs-small); line-height: 1.6; }
.tp-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 12px 16px; background: #E6EDEA; }
.tp-bar b { font-size: var(--fs-body); }
.tp-bar span { color: #4A5A52; }
.tp--chat { padding-bottom: 14px; }
.tp--chat .tp-bubble { margin: 12px 14px 0; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #FFFFFF; font-size: var(--fs-body); line-height: 1.7; }
.tp-bubble [data-try-name] { font-weight: 700; }
.sheet { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sheet :is(th, td) { padding: 8px 12px; border-bottom: 1px solid #DCE4E0; text-align: start; vertical-align: top; }
.sheet :is(th, td):is(:first-child, :last-child) { white-space: nowrap; }
.sheet th { color: #4A5A52; font-weight: 500; background: #EEF3F1; }
.sheet tr:last-child td { border-bottom: 0; }
.tp--sheet { overflow-x: auto; }
/* 11 نوفمبر (تقييم-شامل-للموقع 5.3): رسالة الطلب وجدول المواعيد في لوحة واحدة. العنوان الثاني أخف من شريط اللوحة، فيُقرأ تابعًا للرسالة */
.tp--flow { padding-bottom: 0; overflow-x: auto; }
.tp-sub { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; margin: 14px 0 0; padding: 9px 16px; border-top: 1px solid #DCE4E0; background: #EEF3F1; }
.tp-sub b { font-size: var(--fs-small); }
.tp-sub span { color: #4A5A52; }
.tp--flow .sheet th { background: transparent; }
.slots, .orders, .cal { margin: 0; padding: 6px 0; list-style: none; }
.slots li, .orders li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 16px; }
.slots time, .orders b { font-weight: 700; font-variant-numeric: tabular-nums; }
.slots em, .orders em { padding: 1px 10px; border-radius: 999px; background: #E6EDEA; color: #33443B; font-style: normal; font-size: 0.8125rem; white-space: nowrap; }
.cal li { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 12px; align-items: start; min-height: 44px; padding: 8px 16px; }
.cal li > span { color: #4A5A52; padding-top: 6px; }
.cal-ev { padding: 6px 12px; border-radius: 10px; background: #E6EDEA; }
.cal-ev b { margin-inline-end: 6px; }
.tp .is-new { background: rgba(61, 220, 151, 0.18); }
.tp .is-new em { background: #3DDC97; color: #062A1C; font-weight: 700; }
.cal .cal-ev.is-new { background: rgba(61, 220, 151, 0.28); }
.auto-steps { display: grid; gap: 4px; margin: 0; padding: 10px 16px 14px; list-style: none; background: #EEF3F1; }
.auto-steps li { display: flex; align-items: center; gap: 8px; }
.auto-steps li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #3DDC97 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23062A1C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
/* «كأنه مؤتمت»: حين يصل الزائر للقسم أو يبدّل النوع، تصل الرسالة، ثم يدخل الصف الجديد، ثم تكتمل الخطوات واحدة بعد الأخرى.
   حركة بلا ارتداد (apple-design: damping 1)، مرة واحدة لكل تبديل. مع «تقليل الحركة» يظهر كل شيء مباشرة */
@media (prefers-reduced-motion: no-preference) {
  .try.is-live .tp { animation: tp-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .try.is-live .tp + .tp { animation-delay: 0.35s; }
  .try.is-live .tp .is-new { animation: tp-new 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s both, tp-flash 1.6s ease-out 0.7s both; }
  .try.is-live .auto-steps li { animation: tp-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(1.1s + var(--i, 0) * 0.22s); }
}
@keyframes tp-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes tp-new { from { opacity: 0; transform: translateY(-6px); } }
@keyframes tp-flash { from { background-color: rgba(61, 220, 151, 0.55); } }

/* ---------- آيفون 17 مرسوم بالكود (23 أكتوبر) ----------
   المقاسات من الجهاز نفسه: 71.5 × 149.6 مم، وشاشة 6.3 بوصة بزوايا نحو 9 مم، وإطار ألمنيوم، وحافة سوداء رفيعة،
   والجزيرة 31% من عرض الشاشة. الأزرار: الإجراء والصوت يسارًا، والجانبي وزر الكاميرا يمينًا. بلا صور من آبل.
   النِّسب المئوية في border-radius: الأفقية من العرض والعمودية من الارتفاع، فتبقى الزاوية دائرية */
.iphone { --ip-top: #101D2B; position: relative; width: 100%; aspect-ratio: 71.5 / 149.6; padding: 1.15%; border-radius: 16.2% / 7.75%; background: #3B3B3E; box-shadow: inset 0 0 0 0.6px rgba(255, 255, 255, 0.4), inset 0 0 0 2.4px #232325, 0 40px 80px -36px rgba(0, 0, 0, 0.75); }
.ip-glass { height: 100%; padding: 2.3%; border-radius: 15.3% / 7.3%; background: #050506; }
.ip-display { position: relative; height: 100%; overflow: hidden; border-radius: 13.6% / 6.3%; background: var(--ip-top); container-type: inline-size; }
/* شريط الحالة 54 نقطة من 402 (13.5% من عرض الشاشة)، والوقت يمينًا والرموز يسارًا كما في iOS بالعربية */
.ip-status { display: flex; align-items: center; justify-content: space-between; height: 13.5cqw; padding: 0 9cqw; background: var(--ip-top); color: #FFFFFF; }
.ip-time { font: 600 4.3cqw/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -0.01em; }
.ip-island { position: absolute; top: 2.9cqw; left: 50%; width: 31.3cqw; height: 9.2cqw; margin-left: -15.65cqw; border-radius: 99px; background: #000000; }
.ip-icons { display: flex; align-items: center; gap: 1.4cqw; }
.ip-icons svg { display: block; height: 2.9cqw; width: auto; fill: currentColor; }
.ip-icons svg:last-child { height: 3.1cqw; }
.ip-home { position: absolute; bottom: 2.2cqw; left: 50%; width: 34cqw; height: 1.25cqw; margin-left: -17cqw; border-radius: 99px; background: rgba(0, 0, 0, 0.82); }
.ip-btn { position: absolute; width: 1.2%; border-radius: 2px; background: #2E2E31; box-shadow: inset 0 0 0 0.6px rgba(255, 255, 255, 0.25); }
.ip-action { left: -0.9%; top: 18.6%; height: 4.4%; }
.ip-volup { left: -0.9%; top: 26.6%; height: 7%; }
.ip-voldown { left: -0.9%; top: 35.2%; height: 7%; }
.ip-side { right: -0.9%; top: 28.8%; height: 10.6%; }
.ip-cam { right: -0.45%; top: 58%; height: 8.6%; width: 0.8%; background: #26262A; }
/* جوال فصل الختام: محادثة واتساب الداكنة كما في صورة صاحب الموقع (23 أكتوبر بعد v26)، مرسومة بالكود بلا نسخ للصورة:
   الألوان مقيسة منها (الخلفية #0A0A0A، والفقاعة #134D37، والميكروفون #21C062)، والاسم «نواة» مكان الرقم، وخلفية برسوم خطية خفيفة */
.close-phone, .flow-wa { --ip-top: #111111; }
.close-phone .ip-status, .flow-wa .ip-status { color: #F1EFF0; }
.close-phone .ip-home, .flow-wa .ip-home { background: rgba(255, 255, 255, 0.85); }
.ip-time small { display: block; margin-top: 0.6cqw; font-size: 2.8cqw; font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.ip-page--wa { aspect-ratio: auto; height: calc(100% - 13.5cqw); }
.wa { display: flex; flex-direction: column; height: 100%; background: #0A0A0A url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='120'%20viewBox='0%200%20120%20120'%20fill='none'%20stroke='white'%20stroke-opacity='.07'%20stroke-width='1.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='20'%20cy='22'%20r='9'/%3E%3Cpath%20d='M60%2012l4%208%209%201-7%206%202%209-8-5-8%205%202-9-7-6%209-1z'/%3E%3Crect%20x='88'%20y='14'%20width='18'%20height='13'%20rx='3'/%3E%3Cpath%20d='M91%2019h12'/%3E%3Cpath%20d='M12%2072c6-8%2014-8%2020%200'/%3E%3Cpath%20d='M50%2062h22v16H50zM50%2068h22'/%3E%3Ccircle%20cx='98'%20cy='68'%20r='6'/%3E%3Cpath%20d='M92%2080l12-12'/%3E%3Cpath%20d='M16%20104l10-9%2010%209'/%3E%3Cpath%20d='M58%2098a8%208%200%201%200%2016%200'/%3E%3Cpath%20d='M94%2096l8%2010%208-10'/%3E%3C/svg%3E") repeat; background-size: 42cqw; color: #F1EFF0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.wa-top { display: flex; align-items: center; gap: 2.6cqw; padding: 2cqw 4cqw 3cqw; background: #111111; }
.wa-back { flex: none; width: 3cqw; height: 5cqw; fill: none; stroke: #F1EFF0; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wa-avatar svg { display: block; width: 9.5cqw; height: 9.5cqw; }
.wa-name { flex: 1; font-family: var(--font-body); font-size: 4.6cqw; font-weight: 700; text-align: left; }
.wa-call { display: flex; align-items: center; gap: 1cqw; }
.wa-call svg { width: 6cqw; height: 6cqw; fill: none; stroke: #F1EFF0; stroke-width: 1.6; stroke-linejoin: round; }
.wa-call .wa-chev { width: 2.6cqw; height: 2cqw; stroke-width: 1.8; stroke-linecap: round; }
.wa-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 3cqw; min-height: 0; padding: 3cqw 3cqw 2.4cqw; overflow: hidden; }
.wa-day { align-self: center; padding: 1cqw 3.4cqw; border-radius: 2.4cqw; background: #171717; font-size: 3.2cqw; font-weight: 600; }
.wa-out { align-self: flex-end; max-width: 88%; padding: 2.6cqw 3.4cqw 1.6cqw; border-radius: 3.6cqw 3.6cqw 0.8cqw 3.6cqw; background: #134D37; font-family: var(--font-body); font-size: 3.9cqw; line-height: 1.5; text-align: right; }
.wa-out > * + * { margin-top: 2cqw; }
.wa-out .wa-b { font-weight: 700; }
.wa-out ul { margin-bottom: 0; padding-inline-start: 4.5cqw; list-style: disc; }
.wa-out ul + p, .wa-out p + ul { margin-top: 0.6cqw; }
.wa-meta { display: flex; justify-content: flex-end; align-items: center; gap: 1cqw; margin-top: 1.4cqw; color: rgba(241, 239, 240, 0.7); /* نقد 23 أكتوبر: 0.62 كان 4.3:1 على الفقاعة، و0.7 = 5.1:1 */ font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 2.8cqw; }
.wa-meta svg { width: 3.8cqw; height: 2.3cqw; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wa-bar { display: flex; align-items: center; gap: 3cqw; padding: 2.4cqw 3.4cqw 8cqw; background: #101010; }
.wa-bar > svg { flex: none; width: 6.4cqw; height: 6.4cqw; fill: none; stroke: #F1EFF0; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wa-input { flex: 1; display: flex; justify-content: flex-end; align-items: center; height: 8.4cqw; padding-inline: 2.6cqw; border-radius: 4.2cqw; background: #282828; }
.wa-input svg { width: 5cqw; height: 5cqw; fill: none; stroke: #F1EFF0; stroke-width: 1.5; stroke-linejoin: round; }
.wa-mic { flex: none; display: grid; place-items: center; width: 9.4cqw; height: 9.4cqw; border-radius: 50%; background: #21C062; }
.wa-mic svg { width: 5cqw; height: 5cqw; fill: none; stroke: #060700; stroke-width: 1.9; stroke-linecap: round; }
.try-foot .try-cap { color: var(--text-2); }
.try-foot .actions { margin-top: 18px; }

/* =================================================================
   23 أكتوبر بعد v25: العرض المكتوب مكان سطر السعر. ورقة فاتحة على النيلي، باسم الزائر ونوع نشاطه (chapters.js)
   ================================================================= */
.offer { padding-block: 0 clamp(80px, 11vw, 140px); background: var(--bg); }
.offer-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .offer-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; } }
.offer-t { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; line-height: 1.25; }
.offer-lead { margin-top: 14px; color: var(--text-2); font-size: var(--fs-sub); line-height: 1.75; max-width: 34rem; }
.offer-more { margin-top: 20px; }
.offer-doc { margin: 0; padding: clamp(20px, 3vw, 32px); border-radius: 20px; background: #F7F8F4; color: #15181F; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7); }
.doc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; }
.doc-head b { font-family: var(--font-display); font-size: var(--fs-sub); font-weight: 700; }
.doc-head span { color: #4C5363; font-weight: 700; }
.doc-to { color: #4C5363; }
.doc-to [data-try-name] { color: #15181F; font-weight: 700; }
.doc-rows { display: grid; gap: 0; margin: 14px 0 0; }
.doc-rows > div { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid #E3E5DE; }
.doc-rows dt { color: #4C5363; }
.doc-rows dd { margin: 0; line-height: 1.6; }
.doc-total dd { font-family: var(--font-display); font-size: var(--fs-sub); font-weight: 700; font-variant-numeric: tabular-nums; }
.doc-note { margin-top: 12px; color: #4C5363; font-size: var(--fs-small); }

/* =================================================================
   23 أكتوبر بعد v26: المسرح داخل ماك بوك برو مرسوم بالكود
   النسب من ماك بوك برو 14: شاشة 3024×1964 (1.54)، وحافة سوداء رفيعة (أعرض قليلًا من الأسفل)، ونتوء الكاميرا وسط أعلى الشاشة
   (6.6% من عرضها)، وغطاء ألمنيوم فضي، وقاعدة أعرض قليلًا بتجويف الفتح في وسط حافتها. بلا شعار ولا صور من آبل
   ================================================================= */
.macbook { position: relative; width: 100%; }
.mb-lid { padding: 0.55%; border-radius: clamp(10px, 1.8vw, 20px) clamp(10px, 1.8vw, 20px) 4px 4px; background: #C9CCD2; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 50px 110px -50px rgba(0, 0, 0, 0.9); }
.mb-bezel { position: relative; padding: 1.5% 1.5% 2.4%; border-radius: clamp(8px, 1.6vw, 18px) clamp(8px, 1.6vw, 18px) 2px 2px; background: #060607; }
.mb-notch { position: absolute; z-index: 6; top: 1.4%; left: 50%; width: 6.4%; aspect-ratio: 3.1; margin-left: -3.2%; border-radius: 0 0 22% 22% / 0 0 45% 45%; background: #060607; pointer-events: none; }
.mb-cam { position: absolute; top: 34%; left: 50%; width: 15%; aspect-ratio: 1; margin-left: -7.5%; border-radius: 50%; background: #121A26; box-shadow: inset 0 0 0 1px rgba(120, 150, 200, 0.18), inset 0.5px 0.5px 0 rgba(160, 190, 255, 0.35); }
.home .macbook .hp-stage { aspect-ratio: 3024 / 1964; border: 0; border-radius: 0; box-shadow: none; }
.mb-base { position: relative; height: clamp(10px, 1.5vw, 16px); margin: 0 -3%; border-radius: 0 0 clamp(10px, 1.6vw, 18px) clamp(10px, 1.6vw, 18px) / 0 0 100% 100%; background: #C9CCD2; box-shadow: inset 0 2px 0 #E9EBEE, inset 0 -3px 0 #9DA1A9, 0 22px 30px -18px rgba(0, 0, 0, 0.85); }
.mb-scoop { position: absolute; top: 0; left: 50%; width: 13%; height: 46%; margin-left: -6.5%; border-radius: 0 0 10px 10px; background: #A7ABB3; }
@media (max-width: 899px) { .mb-base { margin: 0 -2%; } }

/* عرض السعر: التاريخ والجهة */
.doc-meta { display: grid; gap: 4px; margin: 2px 0 0; }
.doc-meta > div { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.doc-meta dt { color: #4C5363; }
.doc-meta dd { margin: 0; font-weight: 600; }
.doc-meta [data-offer="date"] span { white-space: nowrap; } /* الجزء 1.6: الميلادي والهجري لا ينكسر أحدهما من داخله */

/* =================================================================
   28 أكتوبر (المرحلة 4 من خطة-تحليل-ونقد-الموقع.md): الرئيسية على الجوال
   - البند أ: أول شاشة عنوان وسطر وزر وصورة الموقع. «موقع أو تطبيق؟» رابط تحت الزر (قرار v29 باقٍ)،
     ووعود العرض في سطر واحد. 30 أكتوبر (الجزء 1.2): المدة صارت وعدًا رابعًا فيه بدل سطرها تحت المعاينة
   - البند ب: جوال واتساب في الختام بارتفاع المحادثة والرسالة فقط، بلا خلفية فارغة فوقها
   الكمبيوتر كما هو ================================================================= */
@media (max-width: 899px) {
  .home .hero-offer span { font-size: var(--fs-small); }
  .home .hero-actions { flex-direction: column; align-items: flex-start; gap: 2px; }
  .home .hero-actions .btn-ghost { min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--accent); font-size: var(--fs-body); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
  .home .hero-actions .btn-ghost:active { transform: none; opacity: 0.7; }
  .home .hero-visual.hp { margin-top: 18px; }
  /* الشاشات القصيرة (سفاري على آيفون بشريطيه نحو 660px): مسافات أضيق فوق العنوان وبين الأسطر، فتبقى صورة الموقع في الشاشة الأولى */
  @media (max-height: 760px) {
    .home .hero { padding-top: 0; }
    .home .hero-grid { padding-top: 10px; }
    .home .hero-copy h1 { margin-bottom: 12px; }
    .home .hero-copy .lead { line-height: 1.65; }
    .home .hero-offer { margin-top: 10px; }
    .home .hero-actions { margin-top: 12px; }
    .home .hero-visual.hp { margin-top: 12px; }
  }
}
/* البند ب أُلغي بطلب صاحب الموقع (28 أكتوبر): جوال واتساب بطوله الكامل كجوال حقيقي، والفراغ ملأته محادثة كاملة (index.html) */
/* البند هـ (صفحة النماذج): شريط الفصول يثبت تحت الترويسة داخل غلاف الفصول فقط، بمادة الترويسة نفسها.
   كل اسم بنقطة لون فصله، والمضيء بلون الفصل الذي تحت الترويسة (html[data-ch] من chapters.js) */
.ch-run { position: relative; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 2.2، قرار صاحب الموقع): خط رفيع تحت الشريط يمتلئ من أول فصل إلى آخره،
   من اليمين كاتجاه القراءة (chapters.js يكتب --ch-p). «تقليل الحركة»: كامل ثابت */
.ch-bar::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: var(--accent); transform-origin: right center; scale: var(--ch-p, 0) 1; pointer-events: none; }
.ch-bar { position: sticky; top: var(--sticky-top, var(--header-h)); z-index: 40; background: rgba(11, 16, 34, 0.78); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border-bottom: 1px solid var(--line); }
.ch-bar-in { display: flex; gap: 6px; padding-block: 8px; overflow-x: auto; scrollbar-width: none; }
.ch-bar-in::-webkit-scrollbar { display: none; }
.ch-bar a { --dot: var(--accent); flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: max-content; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-2); font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.1s var(--ease-out); }
.ch-bar a i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.ch-bar a:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.ch-bar a:active { transform: scale(0.96); }
.ch-bar a[data-ch="rukn"] { --dot: #0A6F80; --on: #0A6F80; --on-ink: #FFFFFF; }
.ch-bar a[data-ch="hospital"] { --dot: #0B7A7A; --on: #F4F7F7; --on-ink: #0F2233; }
.ch-bar a[data-ch="rand"] { --dot: #E9D6B4; --on: #2A1D14; --on-ink: #F3EEE4; }
.ch-bar a[data-ch="rikaz"] { --dot: #8A4524; --on: #F4F2EE; --on-ink: #1D1B18; }
:is(html[data-ch="rukn"] .ch-bar a[data-ch="rukn"], html[data-ch="hospital"] .ch-bar a[data-ch="hospital"], html[data-ch="rand"] .ch-bar a[data-ch="rand"], html[data-ch="rikaz"] .ch-bar a[data-ch="rikaz"]) { background: var(--on); border-color: var(--on); color: var(--on-ink); }
html:has(.ch-bar) { scroll-padding-top: calc(var(--header-h) + 76px); }
/* مشهد الطلب داخل غلاف الفصول: جواله الثابت يبدأ تحت شريط الفصول لا خلفه (الشريط نحو 61px) */
@media (min-width: 900px) { .ch-run .flow-stage { top: calc(var(--header-h) + 61px + 3vh); height: calc(94vh - var(--header-h) - 61px); } }
@media (prefers-reduced-transparency: reduce) { .ch-bar { background: #0B1022; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { .ch-bar a { transition: none; } .ch-bar a:active { transform: none; } }

/* البند د (صفحة النماذج): رف «جرّب بنفسك»، ثلاث بطاقات تفتح كل واحدة تجربتها. على الجوال صف أفقي مدمج (صورة وجانبها النص) */
.try-shelf { padding-top: 0; }
.shelf { display: grid; gap: 14px; }
@media (min-width: 760px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shelf-tile { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: border-color 0.2s, transform 0.1s var(--ease-out); }
/* 28 أكتوبر (طلب صاحب الموقع): مسرح كل بطاقة جوال واقعي يطلع من أسفلها، وفي شاشته لقطة مقرّبة لأهم لحظة في التجربة،
   على أرضية بلون التجربة (ذهبي الساعات، ونعناعي الأتمتة، ونيلي الدليل) */
.shelf-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; isolation: isolate; background: radial-gradient(70% 90% at 50% 100%, var(--glow, rgba(170, 185, 255, 0.16)), transparent 70%), linear-gradient(180deg, #0E1530, #0B1022); }
.shelf-tile--builder { --glow: rgba(214, 186, 128, 0.3); }
.shelf-tile--automation { --glow: rgba(170, 185, 255, 0.2); } /* 11 نوفمبر: كان نعناعيًا؛ التوهج النعناعي للشعار والزر والختام فقط */
.shelf-tile--assistant { --glow: rgba(120, 140, 255, 0.28); }
.shelf-phone { --t: 0.7px; --ry: -14deg; --rx: 8deg; position: absolute; left: 50%; top: 11%; width: 44%; margin-left: -22%; }
.shelf-phone .ip-page img { object-fit: cover; object-position: top; }
.shelf-tile--builder .shelf-phone { --ip-top: #1F1612; } /* شريط الحالة بلون أعلى اللقطة */
.shelf-tile--automation .shelf-phone { --ip-top: #0C132C; }
.shelf-tile--assistant .shelf-phone { --ip-top: #0D1529; }
@media (max-width: 759px) { .shelf-stage { aspect-ratio: 16 / 9; } .shelf-phone { width: 38%; margin-left: -19%; top: 12%; } }
.shelf-body { display: grid; align-content: start; gap: 6px; padding: 14px 16px 16px; }
.shelf-body b { font-family: var(--font-display); font-size: var(--fs-sub); line-height: 1.4; }
.shelf-body > span:not(.shelf-go) { color: var(--text-2); font-size: var(--fs-small); line-height: 1.7; }
.shelf-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--accent); font-weight: 600; }
.shelf-go [data-icon] { width: 18px; height: 18px; }
.shelf-tile:hover { border-color: var(--accent); }
.shelf-tile:active { transform: scale(0.985); }
/* الجوال: البطاقات تحت بعض كالكمبيوتر، فيبقى الجوال في المسرح كبيرًا ومقروءًا */
@media (prefers-reduced-motion: reduce) { .shelf-tile:active { transform: none; } }

/* البند ك: «أكمل طلبك» شريط هادئ أعلى الرئيسية لمن بدأ طلبًا ولم يرسله، يُغلق بـ× */
.order-resume { padding-top: 14px; }
.order-resume[hidden] { display: none; }
.resume-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; padding: 10px 8px 10px 14px; border: 1px solid rgba(61, 220, 151, 0.45); border-radius: 16px; background: var(--surface); }
.resume-card > [data-icon] { width: 22px; height: 22px; color: var(--accent); }
.resume-card p { display: grid; gap: 2px; margin: 0; }
.resume-card p span { color: var(--text-2); font-size: var(--fs-small); line-height: 1.6; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 1.10، قرار صاحب الموقع): على الجوال «أكمل طلبك» شريط رفيع فوق الشريط السفلي
   بدل بطاقة فوق العنوان، فالشاشة الأولى كاملة والتذكير تحت الإبهام حتى يُغلق بـ×. يغيب مع لوحة المفاتيح كما يغيب الشريط */
.resume-card .resume-mini { display: none; }
@media (max-width: 860px) {
  /* 11 نوفمبر (تقييم-شامل-للموقع، بموافقة صاحب الموقع): بلا شريط ثانٍ فوق الشريط السفلي (كانا معًا نحو 150px من الشاشة).
     زر الشريط السفلي نفسه يصير «أكمل طلبك» حين يوجد طلب لم يكتمل (main.js)، وبطاقة التذكير تبقى للكمبيوتر */
  .has-dock .order-resume { display: none; }
}
@keyframes resume-up { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .order-resume { animation: none !important; } }
.resume-x { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.2s, transform 0.1s var(--ease-out); }
.resume-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.resume-x:active { transform: scale(0.92); }
.resume-x [data-icon] { width: 18px; height: 18px; }
@media (max-width: 599px) {
  .resume-card { grid-template-columns: auto minmax(0, 1fr) auto; }
  .resume-card .btn { grid-column: 2; grid-row: 2; justify-self: start; }
  .resume-x { grid-column: 3; grid-row: 1; }
}

/* =================================================================
   28 أكتوبر (بعد المرحلة 4، طلب صاحب الموقع): جوال واقعي بعمق ثلاثي الأبعاد، بالكود وحده بلا WebGL ولا صور
   - إطار تيتانيوم داكن بحافة لامعة، وسماكة ظاهرة على جانبه (طبقات ظل بشكل الجوال نفسه، --t لكل مقاس)، وزجاج بانعكاس خفيف
     يتحرك مع الميل، وكاميرا في الجزيرة الديناميكية، وأزرار جانبية معدنية
   - وقفة مائلة قليلًا، ويميل مع التمرير، وعلى الكمبيوتر مع المؤشر حين يكون فوقه، بنابض مخمّد بلا ارتداد (chapters.js يكتب --tx و--ty).
     «تقليل الحركة»: الوقفة نفسها بلا ميل متحرك
   - الأماكن: «اكتب اسم نشاطك» وختام واتساب في الرئيسية، وفصلا رَنْد ولَبِنة ومشهد الطلب ورف «جرّب بنفسك» في النماذج
   ================================================================= */
.iphone, .flow-phone {
  --ry: -12deg; --rx: 5deg; --tx: 0deg; --ty: 0deg; --t: 1px;
  --edge: calc(var(--t) * 1) 0 0 #5a5c62, calc(var(--t) * 2) 0 0 #3d3f44, calc(var(--t) * 3) 0 0 #333438, calc(var(--t) * 4) 0 0 #2d2e32,
    calc(var(--t) * 5) 0 0 #28292d, calc(var(--t) * 6) 0 0 #232428, calc(var(--t) * 7) calc(var(--t) * 0.6) 0 #1c1d20;
  transform: perspective(1600px) rotateY(calc(var(--ry) + var(--ty))) rotateX(calc(var(--rx) + var(--tx)));
  transform-origin: 50% 50%;
  /* الإسقاط المستوي للميل نفسه (بلا perspective): x' = x·cos(a) + y·sin(a)·sin(b)، y' = y·cos(b). تحويل ثنائي الأبعاد لا يدخل عمق الصفحة */
  --fa: calc(var(--ry) + var(--ty)); --fb: calc(var(--rx) + var(--tx));
  --flat: matrix(cos(var(--fa)), 0, calc(sin(var(--fa)) * sin(var(--fb))), cos(var(--fb)), 0, 0);
}
/* محرك سفاري: بلا عمق حقيقي (كان الجوال يخترق الترويسة والشريط السفلي وشريط الفصول بقطع مائل على آيفون).
   الحافة الجانبية واللمعة والظل والميل مع المؤشر والتمرير باقية. @supports لأول رسم في سفاري، وhtml.no3d من main.js لبقية محركه */
@supports (-webkit-touch-callout: none) or (font: -apple-system-body) { .iphone, .flow-phone { transform: var(--flat); } }
html.no3d .iphone, html.no3d .flow-phone { transform: var(--flat); }
.iphone {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, 0) 80%, rgba(255, 255, 255, 0.2) 100%),
    linear-gradient(90deg, #222327 0%, #5e6066 4%, #303135 12%, #2a2b2f 50%, #303135 88%, #5e6066 96%, #222327 100%);
  box-shadow:
    inset 0 0 0 0.7px rgba(255, 255, 255, 0.6),
    inset 0 0 0 2px #151619,
    inset 0 1.5px 1px -0.5px rgba(255, 255, 255, 0.5),
    var(--edge),
    0 60px 90px -50px rgba(0, 0, 0, 0.85),
    0 24px 36px -24px rgba(0, 0, 0, 0.6);
}
.ip-glass { box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1); }
.ip-display::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
  background: linear-gradient(calc(122deg + var(--ty) * 3), rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 22%, rgba(255, 255, 255, 0) 38%); }
.ip-island::after { content: ""; position: absolute; top: 50%; right: 15%; width: 3.3cqw; height: 3.3cqw; margin-top: -1.65cqw; border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #5a6c96 0, #1a2340 34%, #05060a 72%); box-shadow: inset 0 0 0 0.45cqw #121316; }
.ip-btn { background: linear-gradient(90deg, #1a1b1e, #707278 50%, #1f2023); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.3), 0 0 2px rgba(0, 0, 0, 0.5); }
.ip-cam { background: linear-gradient(90deg, #151618, #45474c 50%, #18191b); }
/* مشهد الطلب في النماذج (.flow-phone صورة داخل إطار): الإطار حلقات معدنية حوله، والجزيرة فوق اللقطة */
.flow-phone {
  --t: 0.8px;
  border: 0;
  border-radius: 34px;
  box-shadow:
    0 0 0 3px #050506,
    0 0 0 3.6px #74767c,
    0 0 0 6.6px #2d2e32,
    0 0 0 7.2px #5c5e64,
    var(--edge),
    0 50px 80px -44px rgba(0, 0, 0, 0.85);
  overflow: visible;
}
.flow-phone > img, .flow-phone > .flow-chat, .flow-phone > .flow-layer, .flow-phone > .flow-layer > img { border-radius: 34px; overflow: hidden; }
/* آخر حالة في مشهد الطلب: رد صاحب النشاط بموعد مباشرة (كما يقول نص الخطوة)، ثم جواب العميل، بدل فراغ تحت الرسالة */
.flow-bubble--me { align-self: flex-end; margin-top: 10px; border-radius: 14px 14px 4px 14px; background: #D9F4E6; }
.flow-bubble--me + .flow-bubble { margin-top: 10px; }
.flow-phone::before { content: ""; position: absolute; z-index: 3; top: 2.6%; left: 50%; width: 30%; height: 3.4%; margin-left: -15%; border-radius: 99px; background: #000; pointer-events: none; }
.flow-phone::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
  background: linear-gradient(calc(122deg + var(--ty) * 3), rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 22%, rgba(255, 255, 255, 0) 38%); }
@media (max-width: 899px) {
  .flow-step:not([data-flow="4"]) .flow-phone { border-width: 0; border-radius: 20px; --t: 0.5px; }
  .flow-step:not([data-flow="4"]) .flow-phone > * { border-radius: 20px; }
}
/* الأصغر حجمًا سماكته أقل، والكبير في الختام أوضح */
.close-msg .iphone { --t: 1.1px; }
/* 28 أكتوبر: الخطوة الرابعة في مشهد الطلب على الجوال: الآيفون الواقعي بمحادثة واتساب، بعرض عمود النص وحدّ 300px، وسطر «مثال توضيحي» تحته */
.flow-shot--wa .flow-wa { width: min(100%, 300px); }
.flow-wa-note { width: min(100%, 300px); margin-top: 14px; color: var(--text-2); font-size: var(--fs-small); text-align: center; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 2.4، قرار صاحب الموقع): جوالات المشهد كلها الآيفون الواقعي نفسه.
   شريط الحالة بلون أعلى اللقطة: داكن للخطوة الأولى، وأبيض للثانية والثالثة، وجوال الكمبيوتر يتبع الطبقة الظاهرة */
.flow-ip { --ip-top: #101D2B; }
.flow-ip--light, .flow-ip--stage:not(:has([data-flow-layer="1"].is-on)) { --ip-top: #FFFFFF; }
.flow-ip--light .ip-status, .flow-ip--stage:not(:has([data-flow-layer="1"].is-on)) .ip-status { color: #0F1E2B; }
.flow-ip--stage .ip-status, .flow-ip--stage .ip-display { transition: background-color 0.45s var(--ease-out), color 0.45s var(--ease-out); }
.flow-layers { overflow: hidden; }
.flow-shot .flow-ip { width: 100%; }
@media (min-width: 900px) { .flow-stage .flow-ip { width: min(320px, 34vh); } }
/* وعلى الجوال الخطوات الأربع بطاقة واحدة تُسحب يمينًا ويسارًا، وفوقها شريط الأرقام كخطوات الرئيسية (chapters.js)، بجوال يُقرأ */
@media (max-width: 899px) {
  .js .flow-grid { gap: 0; }
  .js .flow .steps-nav { margin-top: 0; }
  .js .flow-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; margin: 16px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .js .flow-steps::-webkit-scrollbar { display: none; }
  .js .flow-steps:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .js .flow-step, .js .flow-step:not([data-flow="4"]) { display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-card); background: var(--surface); }
  .js .flow-step .flow-n { display: none; }
  .js .flow-step > .flow-shot, .js .flow-step:not([data-flow="4"]) > .flow-shot { align-self: center; width: min(210px, 60vw); margin: 0; padding-top: 14px; }
  .js .flow-shot--wa .flow-wa, .js .flow-shot--wa .flow-wa-note { width: 100%; }
  /* 30 أكتوبر (الجزء 2.8، قرار صاحب الموقع): «النماذج الأربعة» بطاقة واحدة تُسحب، وفوقها أسماء النماذج بدل الأرقام */
  .js .samples-grid { grid-auto-flow: column; grid-auto-columns: 86%; grid-template-columns: none; gap: 12px; margin: 16px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .js .samples-grid::-webkit-scrollbar { display: none; }
  .js .samples-grid:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .js .samples-grid > .sample-card { scroll-snap-align: start; grid-template-rows: auto 1fr; } /* البطاقات بطول أطولها: الفراغ للنص لا تحت الصورة */
  .js .samples-section .steps-nav { margin-top: 20px; }
  /* الجزء 2.9: رف «جرّب بنفسك» كذلك، بطاقة تُسحب وفوقها «متجرك / طلباتك / الأسئلة» */
  .js .shelf { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; gap: 12px; margin: 16px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .js .shelf::-webkit-scrollbar { display: none; }
  .js .shelf:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .js .shelf > .shelf-tile { scroll-snap-align: start; }
  .js .try-shelf .steps-nav { margin-top: 20px; }
}
/* محادثة واتساب كاملة: رسائل نواة الواردة يسارًا بلون فقاعة الوارد الداكنة، والرسائل متلاصقة كما في التطبيق */
.wa-in { align-self: flex-start; max-width: 84%; padding: 2.4cqw 3.4cqw 1.6cqw; border-radius: 3.6cqw 3.6cqw 3.6cqw 0.8cqw; background: #202C33; font-family: var(--font-body); font-size: 3.9cqw; line-height: 1.5; text-align: right; }
.wa-body > .wa-in + .wa-in { margin-top: -1.6cqw; }
.wa-body > .wa-out + .wa-out { margin-top: -1.6cqw; }
.close-msg .wa-body { gap: 2.4cqw; }
.try-site .iphone { --t: 1px; }
/* فصلا رَنْد ولَبِنة في النماذج: اللقطة داخل الجوال الواقعي بدل الإطار الداكن، ومواضع الاسم كما هي (اللقطة بنسبتها 600:1298) */
.ch-phone .ch-iphone { width: min(300px, 64vw); margin-inline: auto; }
.ch-phone .ch-iphone .ch-screen { width: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.ch-phone .ch-iphone .ch-screen img { aspect-ratio: 600 / 1298; border-radius: 0; }
/* 30 أكتوبر (خطة-التطوير-حبة-حبة.md، الجزء 1.7، طلب صاحب الموقع): كل الجوالات
   - الشاشة مطفأة حتى يصلها الزائر، ثم تضيء كآيفون حين يُرفع (طبقة الزجاج تسودّ ثم تنقشع)
   - يصعد الجوال ويعتدل مع التمرير: أخفض وأصغر قليلًا ومائل للخلف، ويبلغ وقفته قرب وسط الشاشة (chapters.js يكتب --rise-y و--rise-s،
     والميل للخلف يُضاف إلى --tx فيعمل في الإسقاط المستوي لسفاري أيضًا)
   - جوالات واتساب: الرسائل تصل واحدة واحدة، ورد نواة بعد «يكتب…»
   «تقليل الحركة» أو بلا JavaScript: الشاشة مضيئة والرسائل كاملة والوقفة كما كانت */
.iphone, .flow-phone { translate: 0 var(--rise-y, 0px); scale: var(--rise-s, 1); }
.ip-display::after, .flow-phone::after { transition: box-shadow 0.9s cubic-bezier(0.3, 0.6, 0.2, 1); }
.iphone.is-asleep .ip-display::after, .flow-phone.is-asleep::after { box-shadow: inset 0 0 0 100vmax #030304; }
.wa-body > .is-later { display: none; }
.wa-body > .is-new { animation: wa-pop 0.34s var(--ease-out) both; }
@keyframes wa-pop { from { opacity: 0; transform: translateY(2cqw) scale(0.96); } }
.wa-typing { align-self: flex-start; display: inline-flex; align-items: center; gap: 1.1cqw; margin: 0; padding: 3.2cqw 3.8cqw; border-radius: 3.6cqw 3.6cqw 3.6cqw 0.8cqw; background: #202C33; animation: wa-pop 0.24s var(--ease-out) both; }
.wa-typing span { width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: #8696A0; animation: wa-dot 1s ease-in-out infinite; }
.wa-typing span:nth-child(2) { animation-delay: 0.15s; }
.wa-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes wa-dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-0.8cqw); } }
.ch--rand .ch-iphone { --ip-top: #291D13; } /* لون شريط «نموذج توضيحي» أعلى اللقطة نفسها */
.ch--rikaz .ch-iphone { --ip-top: #2C2823; }
@media (prefers-reduced-motion: reduce) { .iphone, .flow-phone { --tx: 0deg !important; --ty: 0deg !important; } }
