/* ألوان المشروع مبنية على لون الشعار #02A2AE */
:root {
  --brand: #02a2ae;        /* لون الشعار */
  --brand-strong: #017c86; /* للنصوص والروابط على الخلفيات الفاتحة */
  --brand-deep: #024d54;   /* العناوين والتباين العالي */
  --brand-soft: #d9f1f3;   /* خلفيات العناصر الهادئة */
  --brand-wash: #eef8f9;   /* مساحات واسعة */

  --bg: #f8fcfc;
  --surface: #ffffff;
  --ink: #0f2a2d;
  --muted: #5b7579;
  --border: #d3e7e9;

  --shine: rgba(255, 255, 255, .85);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #02a2ae;
    --brand-strong: #3cc3cd;
    --brand-deep: #9fe3e8;
    --brand-soft: #0d3a3e;
    --brand-wash: #0a2629;

    --bg: #061b1d;
    --surface: #0b2427;
    --ink: #e4f4f5;
    --muted: #8fb0b3;
    --border: #16393d;

    --shine: rgba(190, 250, 255, .7);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }
/* السحب للتنقل بين الصفحات: لا تحديث بالسحب للأسفل، ولا رجوع المتصفح بالسحب الأفقي */
html, body { overscroll-behavior: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Amiri', serif;
  line-height: 1.7;
}

body.is-splashing { overflow: hidden; }

/* ===== شاشة البداية ===== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  pointer-events: auto;
}
.splash > * { grid-area: 1 / 1; }

/* الخلفية منفصلة حتى تتلاشى وحدها بينما ينتقل الشعار إلى رأس الصفحة */
.splash__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--brand) 14%, transparent) 0%, transparent 45%),
    var(--bg);
}

/* الشعار: أصغر من قبل */
.splash__mark {
  position: relative;
  width: min(52vw, 300px);
  aspect-ratio: 2000 / 1046;
  transform-origin: center;
  will-change: transform;
}

.splash__logo {
  display: block;
  width: 100%;
  height: auto;
  /* كشف ناعم من اليمين إلى اليسار كاتجاه الكتابة العربية */
  -webkit-mask-image: linear-gradient(to left, #000 40%, transparent 60%);
          mask-image: linear-gradient(to left, #000 40%, transparent 60%);
  -webkit-mask-size: 250% 100%;
          mask-size: 250% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: 0% 0;
          mask-position: 0% 0;
  filter: blur(6px);
  transform: translateY(10px) scale(.92);
  animation: write 1.5s var(--ease-out) .25s forwards;
}

/* لمعة تعبر الشعار بعد اكتماله، مقصوصة على شكل الخط نفسه */
.splash__shine {
  position: absolute;
  inset: 0;
  -webkit-mask: url(/assets/logo.webp) center / 100% 100% no-repeat;
          mask: url(/assets/logo.webp) center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 35%, var(--shine) 50%, transparent 65%) no-repeat;
  background-size: 300% 100%;
  background-position: 0% 0;
  opacity: 0;
  animation: shine 1s ease-in-out 1.55s forwards;
}

@keyframes write {
  to {
    -webkit-mask-position: 100% 0;
            mask-position: 100% 0;
    filter: blur(0);
    transform: none;
  }
}

@keyframes shine {
  0%   { opacity: 1; background-position: 0% 0; }
  100% { opacity: 1; background-position: 100% 0; }
}

/* ترتيب الطبقات: الخلفية ثم الشعار */
.splash__bg { z-index: 0; }
.splash__mark { z-index: 1; }

/* الخروج: تتلاشى الخلفية، وينتقل الشعار إلى مكانه في رأس الصفحة (في app.js) */
.splash.is-leaving { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .splash__logo, .splash__shine { animation: none; }
  .splash__logo { -webkit-mask: none; mask: none; filter: none; transform: none; }
}

/* ===== الموقع ===== */
.app { min-height: 100%; }

.site-header {
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* الشعار بحجم مريح للنظر: أصغر على الجوال، وأصغر منه في الجوال المقلوب بالعرض */
.site-header__logo { width: clamp(84px, 7vw + 56px, 108px); height: auto; }
/* يبقى مخفيًا حتى يصل إليه شعار شاشة البداية */
body.is-splashing .site-header__logo,
.splash ~ .app .site-header__logo { visibility: hidden; }

.site-main { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }

/* ===== صفحات العرض ===== */
/* كل ما يخص العرض هنا، تحت الرأس. الرأس وشاشة البداية لا يتغيران. */

:root {
  /* عرض المحتوى: ١٠٨٠ على الكمبيوتر، وعلى الأجهزة الأصغر عرض الشاشة مع هامش ١٦ إلى ٢٤ بكسل */
  --content-w: 1080px;
  --gutter: clamp(16px, 3vw, 24px);
  --gilt: #b8913a;          /* النجوم واللمسات الذهبية */
  --dawn: #e9d8ad;          /* وهج الفجر */
  --leaf: #5cc6cd;          /* الأوراق */
  --font-ar: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-en-display: 'EB Garamond', Georgia, serif;
  --font-en: 'EB Garamond', Georgia, serif;
  /* وزنان فقط في كل اللغات: للعناوين والأزرار، وللنص العادي */
  --w-head: 600;
  --w-body: 400;
  --font-ur: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
}
@media (prefers-color-scheme: dark) {
  :root { --gilt: #d2ae5c; --dawn: #3a3220; --leaf: #4fb9c0; }
}

.app { display: flex; flex-direction: column; min-height: 100%; }
/* كل صفحة تظهر كاملة في شاشة واحدة على أي جهاز، بلا تمرير:
   التطبيق بطول الشاشة تماما، والمسرح (البذرة أو الشجرة) يأخذ ما بقي من المساحة */
body:not(.is-splashing) .app { height: 100vh; height: 100dvh; }

/* الرأس ثابت في أعلى الشاشة أثناء التمرير والانتقال بين الصفحات */
.site-header { position: sticky; top: 0; z-index: 30; }
.site-header__home { display: block; line-height: 0; border-radius: 8px; }
.site-header__home:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }

/* الغلاف المشترك: لون الفجر يغطي الصفحات كلها تحت الرأس */
.pages {
  --font: var(--font-ar);
  --font-display: var(--font-ar);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: clip;          /* الصفحة المنزلقة لا تخرج فوق الرأس ولا تحت الموقع */
  font-family: var(--font);
  font-weight: var(--w-body);
  line-height: 1.7;
  background:
    radial-gradient(ellipse 70% 65% at 50% 74%, color-mix(in srgb, var(--dawn) 75%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 105% 100% at 50% 74%, color-mix(in srgb, var(--brand-soft) 70%, transparent) 0%, transparent 85%),
    var(--bg);
}
.pages[lang="en"] { --font: var(--font-en); --font-display: var(--font-en-display); }
.pages[lang="ur"] { --font: var(--font-ur); --font-display: var(--font-ur); }

/* الرأس: الشعار في أول السطر حسب اتجاه اللغة، ومفتاح اللغة في آخره */
/* خلفية الرأس بعرض الشاشة، أما الشعار ومفتاح اللغة فداخل عرض المحتوى نفسه */
.site-header { justify-content: space-between; align-items: center; gap: 16px; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px), (100% - var(--content-w)) / 2); }

/* مفتاح اللغة: شريط صغير من ثلاث خانات، والخانة المختارة ممتلئة */
.langbar {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--border); border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
}
.langbar button {
  min-width: 44px; height: 32px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font: var(--w-head) .88rem/1 var(--font-ar); color: var(--muted);
  background: none; border: 0; border-radius: 999px; cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.langbar button[data-lang="en"] { font-family: var(--font-en); letter-spacing: .06em; font-size: .9rem; }
.langbar button[data-lang="ur"] { font-family: var(--font-ur); font-size: .8rem; }
.langbar button:hover { color: var(--brand-strong); }
.langbar button[aria-pressed="true"] { color: #fff; background: var(--brand-strong); }
.langbar button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* الصفحة الواحدة */
.page {
  flex: 1;
  width: 100%;
  max-width: calc(var(--content-w) + 2 * var(--gutter));
  margin: 0 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* سطر طويل لا يوسع الصفحة عن الشاشة */
  gap: 8px;
  padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 24px max(var(--gutter), env(safe-area-inset-left, 0px));
}
.page[hidden] { display: none; }

@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-word { to { opacity: 1; transform: none; filter: none; } }

/* الأزرار المشتركة */
.btn-primary {
  font: inherit; font-family: var(--font-display); font-weight: var(--w-head); font-size: 1.15rem;
  color: var(--surface); background: var(--brand-strong); border: 0; border-radius: 999px;
  padding: 10px 34px; cursor: pointer; box-shadow: 0 6px 18px -8px rgba(1, 124, 134, .6);
  transition: transform .2s ease, background .2s ease;
}
.pages[lang="en"] .btn-primary { font-size: 1.3rem; }
.pages[lang="ur"] .btn-primary { font-size: 1rem; line-height: 2.4; padding-block: 4px 8px; }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.btn-ghost {
  font: inherit; font-size: .92rem; color: var(--brand-strong); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 18px; cursor: pointer; text-decoration: none;
}
.btn-ghost:hover { border-color: var(--brand); }
.btn-next { background: var(--brand-soft); font-weight: var(--w-head); }
.btn-icon { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.btn-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-icon .off, .btn-icon[aria-pressed="true"] .on { display: none; }
.btn-icon[aria-pressed="true"] .off { display: inline; }
.pages button:focus-visible, .pages a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* إشارة «تُتلى الآن» */

/* ===== الصفحة الأولى: اسم المبادرة، وعنوان قصير، وزر البدء ===== */
@font-face { font-family: 'DK IndoPak'; src: url('/fonts/digitalkhatt-indopak.otf') format('opentype'); font-display: swap; }

/* على الحاسوب: كل ما في الصفحة مجموعة واحدة في الوسط */
.gate { grid-template-rows: auto auto; align-content: center; gap: clamp(18px, 4.5vh, 40px); text-align: center; }
.gate__center { display: grid; justify-items: center; gap: 2px; min-width: 0; }

/* الزخرف: خطان ذهبيان، وبينهما زر الاستماع إلى البسملة */
.gate__orn { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; }
.gate__rule { width: 58px; height: 1.2px; background: var(--gilt); border-radius: 1px; }
.gate__voice { position: relative; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border: 1.2px solid var(--gilt); border-radius: 50%; background: var(--surface); color: var(--gilt-ink); cursor: pointer; transition: background .2s, color .2s; }
.gate__voice svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gate__voice:hover { background: color-mix(in srgb, var(--gilt) 14%, var(--surface)); }
/* أثناء التلاوة: الزر ممتلئ، وحلقة تتسع حوله بهدوء */
.gate__voice[aria-pressed="true"] { background: var(--gilt); color: #fff; }
.gate__voice[aria-pressed="true"]::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1.2px solid var(--gilt); animation: voice-ring 1.8s ease-out infinite; }
@keyframes voice-ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gate__voice[aria-pressed="true"]::after { animation: none; opacity: 0; } }
.gate__lead { margin: 0; max-width: 20ch; color: var(--brand-deep); text-wrap: balance; font-family: var(--font-display); font-weight: var(--w-head); font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); line-height: 1.5; }
.pages[lang="en"] .gate__lead { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.9rem); line-height: 1.15; }
.pages[lang="ur"] .gate__lead { font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.8rem); line-height: 2; }

.gate__actions { display: grid; justify-items: center; gap: 6px; }
.gate__start { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 56px; font-size: 1.25rem; text-decoration: none; }
.pages[lang="en"] .gate__start { font-size: 1.35rem; }
.pages[lang="ur"] .gate__start { font-size: 1.05rem; padding-block: 0 4px; }

/* الحركة: يظهر العنوان، ثم الزخرف، ثم الأزرار تباعا */
.gate__lead, .gate__orn, .gate__actions { opacity: 0; }
.gate.is-in .gate__lead { animation: gate-rise .9s var(--ease-out) .25s forwards; }
.gate.is-in .gate__orn { animation: page-fade .8s ease .8s forwards; }
.gate.is-in .gate__actions { animation: page-fade .8s ease 1s forwards; }
@keyframes gate-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .gate__lead, .gate__orn, .gate__actions { opacity: 1; animation: none !important; }
}

/* جوال أو جهاز لوحي قائم: العنوان في الوسط، والأزرار أسفل الشاشة قريبة من الإبهام */
@media (orientation: portrait) and (max-width: 900px) {
  .gate { grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; gap: 12px; }
  .gate__center { align-content: center; }
  .gate__actions { justify-items: stretch; }
  .gate__start { padding-inline: 16px; }
}


/* ===== الشاشات السبع ===== */
/* كل شاشة: شريط الأقسام، ثم النص والصورة جنبا إلى جنب، ثم العداد والأزرار. تملأ الشاشة بلا تمرير */
:root { --gilt-ink: #8a6a22; --lead: #4d666a; --warm-bg: #fbf6ec; --warm-line: #e0c9a0; --warm-ink: #5e4a1c; }
@media (prefers-color-scheme: dark) {
  :root { --gilt-ink: #d2ae5c; --lead: #a9c5c8; --warm-bg: #241f14; --warm-line: #5a4a2c; --warm-ink: #e2cfa4; }
}

.scr { grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(8px, 2.2vh, 20px); padding-top: clamp(8px, 2vh, 16px); }

/* شريط الأقسام: ثلاثة فصول، في كل فصل ثلاثة أجزاء. ما مضى بلون الشعار، والحالي ذهبي، وما بقي باهت */
.scr__prog { min-width: 0; }
.scr__chs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 24px); }
.scr__ch { min-width: 0; display: grid; gap: 5px; align-content: start; }
.scr__chname { font-family: var(--font-ar); font-weight: var(--w-head); font-size: .78rem; line-height: 1.6; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.scr__ch.is-done .scr__chname { color: var(--brand-strong); }
.scr__ch.is-on .scr__chname { color: var(--gilt-ink); }
.pages[lang="en"] .scr__chname { font-family: var(--font-en); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.pages[lang="ur"] .scr__chname { font-family: var(--font-ur); font-size: .7rem; line-height: 2; }
.scr__segs { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.scr__seg { position: relative; display: block; height: 4px; border-radius: 4px; background: var(--border); transition: background-color .2s; }
/* مساحة ضغط أكبر من الخط الرفيع */
.scr__seg::after { content: ""; position: absolute; inset: -10px 0; }
.scr__segs .is-done .scr__seg { background: color-mix(in srgb, var(--brand) 60%, var(--surface)); }
.scr__segs .is-on .scr__seg { background: var(--gilt); }
.scr__seg:hover { background: var(--brand-strong); }
.scr__seg:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
/* اسم القسم يظهر فوق الجزء عند مرور المؤشر */
@media (hover: hover) {
  .scr__seg:hover::before { content: attr(data-name); position: absolute; top: 12px; right: 50%; transform: translateX(50%); z-index: 5; white-space: nowrap; padding: 1px 10px; border-radius: 6px; background: var(--brand-deep); color: var(--bg); font-family: var(--font-ar); font-weight: var(--w-head); font-size: .74rem; line-height: 1.8; pointer-events: none; }
  .pages[lang="en"] .scr__seg:hover::before { font-family: var(--font-en); font-size: .85rem; }
  .pages[lang="ur"] .scr__seg:hover::before { font-family: var(--font-ur); font-size: .68rem; line-height: 2.2; }
  .scr__segs .is-on .scr__seg:hover::before { display: none; }
}
.scr__now { margin: 0; font-family: var(--font-ar); font-weight: var(--w-head); font-size: .92rem; line-height: 1.7; color: var(--brand-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr__now span { margin-inline-start: 8px; font-weight: 400; font-size: .76rem; color: var(--muted); }
.pages[lang="en"] .scr__now { font-family: var(--font-en); font-size: 1rem; }
.pages[lang="ur"] .scr__now { font-family: var(--font-ur); font-size: .8rem; line-height: 2.1; }
@media (prefers-reduced-motion: reduce) { .scr__seg, .scr__chname { transition: none; } }

.scr__body { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 64px); align-items: center; }
.scr__text { display: grid; gap: clamp(6px, 1.4vh, 14px); align-content: center; min-width: 0; animation: page-fade .6s ease both; }
.scr__eyebrow { margin: 0; color: var(--gilt-ink); font-weight: var(--w-head); font-size: .95rem; }
.pages[lang="en"] .scr__eyebrow { letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; }
.pages[lang="ur"] .scr__eyebrow { font-size: .86rem; line-height: 2.1; }
.scr__title { margin: 0; color: var(--brand-deep); font-family: var(--font-display); font-weight: var(--w-head); font-size: clamp(1.4rem, 1.2rem + 1.3vw, 2.35rem); line-height: 1.5; text-wrap: balance; }
.pages[lang="en"] .scr__title { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.6rem); line-height: 1.2; }
.pages[lang="ur"] .scr__title { font-size: clamp(1.2rem, 1rem + 1.1vw, 1.95rem); line-height: 2.1; }
.scr__lead { margin: 0; color: var(--lead); font-size: clamp(.95rem, .9rem + .3vw, 1.12rem); line-height: 1.9; text-wrap: pretty; }
.pages[lang="en"] .scr__lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); line-height: 1.5; }
.pages[lang="ur"] .scr__lead { font-size: clamp(.86rem, .82rem + .25vw, 1rem); line-height: 2.25; }

.scr__chips { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.scr__chips li { font-size: .88rem; color: var(--brand-deep); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 14px; line-height: 1.6; }
.scr__chips--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scr__chips--grid li { border-radius: 10px; padding: 5px 12px; }
.pages[lang="ur"] .scr__chips li { font-size: .78rem; line-height: 2.1; padding-block: 1px 3px; }

.scr__stats { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scr__stats li { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px 14px; display: grid; }
.scr__stats strong { font-weight: var(--w-head); font-size: 1.2rem; line-height: 1.5; color: var(--brand-deep); }
.scr__stats span { font-size: .8rem; line-height: 1.5; color: var(--muted); }
.pages[lang="ur"] .scr__stats strong { font-size: 1rem; line-height: 2.1; }
.pages[lang="ur"] .scr__stats span { font-size: .72rem; line-height: 2; }

/* جانب الصورة */
.scr__fig { margin: 0; min-width: 0; min-height: 0; height: 100%; display: grid; place-items: center; animation: page-fade .8s ease .1s both; }

/* مكان صورة حقيقية لم تصل بعد: إطار منقط فيه وصف الصورة المطلوبة */
.ph {
  width: 100%; height: 100%; min-height: 0; overflow: hidden;
  display: grid; place-content: center; justify-items: center; gap: 8px; padding: 14px; text-align: center;
  border: 2px dashed color-mix(in srgb, var(--brand) 40%, var(--surface)); border-radius: 14px; background: var(--brand-wash);
  color: var(--brand-deep); font-size: .88rem; line-height: 1.7;
}
.ph svg { width: 30px; height: 30px; fill: none; stroke: var(--brand-strong); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ph strong { font-weight: var(--w-head); font-size: 1rem; }
.ph span { color: var(--lead); max-width: 26ch; }
.pages[lang="ur"] .ph { font-size: .78rem; line-height: 2.1; }
.ph--warm { border-color: var(--warm-line); background: var(--warm-bg); }
.ph--warm svg { stroke: var(--gilt-ink); }
.ph--warm span { color: var(--warm-ink); }
.ph--doc { width: auto; height: min(100%, 440px); aspect-ratio: 3 / 4; max-width: 100%; }
.ph--page { width: auto; aspect-ratio: 2 / 3; max-width: 100%; justify-self: center; border-radius: 6px; background: var(--surface); box-shadow: 0 14px 30px -22px rgba(2, 77, 84, .5); }
.ph--flat { border: 0; border-radius: 0; gap: 4px; padding: 8px; font-size: .74rem; line-height: 1.6; }
.ph--flat svg { width: 22px; height: 22px; }
.pages[lang="ur"] .ph--flat { font-size: .68rem; line-height: 1.9; }

/* صورتان متقابلتان: قبل وبعد، أو مصحف المدينة والنسخ الهندي */
/* صفحة المنهج: ثماني كلمات مفصولة، كل كلمة في بطاقة، بترتيبها في الآية من اليمين */
.words { width: 100%; height: min(100%, 400px); display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; place-items: stretch; }
.words__grid { list-style: none; margin: 0; padding: 0; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: clamp(8px, 1.2vw, 12px); counter-reset: w; }
.words__grid li { min-width: 0; min-height: 0; display: grid; }
.words__btn { position: relative; min-width: 0; min-height: 0; padding: 8px 14px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 24px -20px rgba(2, 77, 84, .5); cursor: zoom-in; transition: border-color .2s, transform .2s; }
.words__btn:hover { border-color: var(--gilt); transform: translateY(-2px); }
/* كل الكلمات بمقياس واحد: عرض الكلمة نسبة من عرض أطول كلمة (٤٤٥)، فلا تكبر القصيرة ولا تصغر الطويلة */
.words__btn img { display: block; width: calc(var(--w) / 445 * 86%); height: auto; max-height: 100%; object-fit: contain; }
/* رقم الكلمة في ترتيبها، صغير في زاوية البطاقة */
.words__grid li { counter-increment: w; }
.words__btn::before { content: counter(w, arabic-indic); position: absolute; top: 6px; inset-inline-start: 8px; font-family: var(--font-ar); font-size: .68rem; line-height: 1; color: var(--muted); }
.pages[lang="en"] .words__btn::before { content: counter(w); font-family: var(--font-en); }
.pages[lang="ur"] .words__btn::before { content: counter(w, persian); }
.words__note { margin: 0; text-align: center; font-size: .85rem; line-height: 1.6; color: var(--muted); }
.pages[lang="ur"] .words__note { font-size: .78rem; line-height: 2.1; }
/* الوضع الداكن: الحبر أسود في الصورة، فنقلبه فاتحا */
@media (prefers-color-scheme: dark) { .words__btn img { filter: invert(1) brightness(.92); } }
/* صفحة الحفظ الرقمي: كلمة مقسمة إلى أشكالها، والشكل المختار يتلون بالذهبي ويتغير المعرف معه */
.dig { container: dig / size; width: 100%; height: min(100%, 440px); display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 12px; place-items: stretch; }
.dig__word { position: relative; align-self: center; justify-self: center; width: min(100%, calc((100cqh - 110px) * 2.87)); aspect-ratio: 2000 / 697; }
.dig__shape { position: absolute; padding: 0; border: 0; background: var(--ink); -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat; cursor: pointer; transition: background-color .35s; }
.dig__word.is-live .dig__shape { background: color-mix(in srgb, var(--ink) 26%, var(--bg)); }
.dig__word .dig__shape.is-on { background: var(--gilt); }
.dig__shape:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.dig__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.dig__chip { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); font-family: var(--font-ar); font-weight: var(--w-head); font-size: .78rem; line-height: 1; display: grid; place-items: center; cursor: pointer; transition: background .25s, border-color .25s, color .25s; }
.pages[lang="en"] .dig__chip { font-family: var(--font-en); font-size: .9rem; }
.dig__chip:hover { border-color: var(--brand-strong); color: var(--brand-strong); }
.dig__chip.is-on { background: var(--gilt); border-color: var(--gilt); color: #fff; }
.dig__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; }
.dig__now { margin: 0; font-size: .92rem; line-height: 1.8; color: var(--ink); }
.dig__now b { color: var(--gilt-ink); font-weight: var(--w-head); }
.pages[lang="ur"] .dig__now { font-size: .82rem; line-height: 2.2; }
.dig__more { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--brand-strong); font: inherit; font-size: .82rem; line-height: 1.8; cursor: zoom-in; }
.dig__more:hover { border-color: var(--brand-strong); }
.dig__more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pages[lang="ur"] .dig__more { font-size: .74rem; line-height: 2.2; }
/* شريط المعرف: أربعة أجزاء، تحت كل جزء معناه */
.dig-id { display: grid; gap: 6px; margin-top: 2px; }
.dig-id__label { font-size: .8rem; line-height: 1.6; color: var(--muted); }
.dig-id__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dig-id__seg { min-width: 0; display: grid; gap: 1px; justify-items: center; padding: 7px 4px 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: center; }
.dig-id__seg code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-weight: 600; font-size: clamp(.95rem, .75rem + .7vw, 1.2rem); letter-spacing: .04em; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.dig-id__seg > span { direction: rtl; display: grid; font-size: .7rem; line-height: 1.5; color: var(--muted); }
.pages[lang="en"] .dig-id__seg > span { direction: ltr; font-size: .8rem; }
.pages[lang="ur"] .dig-id__seg > span { font-size: .64rem; line-height: 2; }
.dig-id__seg b { font-weight: var(--w-head); color: var(--ink); }
.dig-id__seg--shape { border-color: var(--gilt); background: color-mix(in srgb, var(--gilt) 10%, var(--surface)); }
.dig-id__seg--shape code { color: var(--gilt-ink); }
@media (prefers-reduced-motion: reduce) { .dig__shape, .dig__chip { transition: none; } }
.pair { width: 100%; height: min(100%, 400px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); place-items: stretch; }
.pair__item { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
/* صورتان حقيقيتان جنبا إلى جنب: كل صورة تملأ مكانها دون أن تخرج عنه */
.pair--shots .pair__item { justify-items: center; }
.pair--shots .shot__btn { height: 100%; max-height: none; max-width: 100%; }
/* صورة واحدة: عمود واحد بارتفاع أكبر */
.pair--one { grid-template-columns: minmax(0, 1fr); height: min(100%, 520px); }
.pair__label { text-align: center; font-weight: var(--w-head); font-size: .95rem; line-height: 1.5; color: var(--brand-strong); }
.pair__label--warm { color: var(--gilt-ink); }
.pair__label--muted { color: var(--muted); }
.pages[lang="ur"] .pair__label { font-size: .84rem; line-height: 2.1; }

/* الحفظ الرقمي: الكلمة ممسوحة ثم فيكتور، وتحتهما ما تعرفه التطبيقات عنها */

/* التطبيقات: إطار لكل جهاز، فيه مكان لقطة الشاشة. المقاسات بالنسبة لمساحة الصورة كلها */
/* صفحة التطبيقات: أربعة أجهزة مصغرة حية في صف، والضغط على أي منها يفتحه كبيرا (device-app.js) */
.devices { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 10px; place-items: stretch; }
.devices__row { display: flex; align-items: flex-end; justify-content: center; }
.device { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.device__box { position: relative; display: block; transition: transform .3s var(--ease-out); }
.device__box .mdev { position: absolute; top: 0; left: 0; transform-origin: 0 0; pointer-events: none; }
.device:hover .device__box { transform: translateY(-6px); }
.device:focus-visible { outline: none; }
.device:focus-visible .device__box { outline: 2px solid var(--brand); outline-offset: 6px; border-radius: 12px; }
.device__name { font-weight: var(--w-head); font-size: .9rem; line-height: 1.5; color: var(--brand-strong); }
.device:hover .device__name { color: var(--brand-deep); }
.pages[lang="en"] .device__name { font-size: 1rem; }
.pages[lang="ur"] .device__name { font-size: .8rem; line-height: 2; }
.devices__hint { text-align: center; font-size: .8rem; line-height: 1.6; color: var(--muted); }
.pages[lang="ur"] .devices__hint { font-size: .72rem; line-height: 2.1; }
@media (prefers-reduced-motion: reduce) { .device__box { transition: none; } }
/* نافذة الجهاز الكبير */
.mview { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(4, 22, 24, .94); color: #fff; overflow: hidden; }
.mview[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: page-fade .25s ease both; }
.mview::backdrop { background: rgba(4, 22, 24, .6); }
.mview__bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: max(12px, env(safe-area-inset-top)) 16px 8px; }
.mview__pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.mview__pick button { border: 0; background: none; color: rgba(255, 255, 255, .78); font-family: var(--font); font-weight: var(--w-head); font-size: .88rem; line-height: 1.6; padding: 6px 16px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.pages[lang="ur"] ~ .mview .mview__pick button, .mview:lang(ur) .mview__pick button { line-height: 2; }
.mview__pick button:hover { color: #fff; }
.mview__pick button[aria-pressed="true"] { background: #fff; color: var(--brand-deep); }
.mview__pick button:focus-visible, .mview__close:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mview__close { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.mview__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mview__stage { min-height: 0; display: grid; place-items: center; padding: 6px 16px; }
.mview__fit { position: relative; }
.mview__fit .mdev { position: absolute; top: 0; left: 0; transform-origin: 0 0; animation: page-fade .35s ease both; }
.mview__cap { margin: 0; padding: 4px 16px max(12px, env(safe-area-inset-bottom)); text-align: center; font-size: .85rem; line-height: 1.7; color: rgba(255, 255, 255, .72); }
@media (prefers-reduced-motion: reduce) { .mview[open], .mview__fit .mdev { animation: none; } }

/* الرحلة: النص فوق، والمحطات السبع صفا واحدا تحته */
.scr--wide .scr__body { grid-template-columns: minmax(0, 1fr); align-content: center; gap: clamp(14px, 4vh, 34px); }
.scr--wide .scr__text { max-width: 780px; }

/* رابط حاسبة العائلة تحت نص اغرس */
.scr__more { justify-self: start; font-size: .9rem; font-weight: var(--w-head); color: var(--brand-strong); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--brand-soft); }
.scr__more:hover { text-decoration-color: currentColor; }
.pages[lang="ur"] .scr__more { font-size: .78rem; line-height: 2.1; }
/* رابط حاسبة المساهمة في شاشة اغرس: زر بارز بأيقونة، ونبضة هادئة تلفت النظر */
@media (max-height: 520px) and (orientation: landscape) { .scr__more { font-size: .78rem; line-height: 1.5; } .pages[lang="ur"] .scr__more { font-size: .66rem; line-height: 1.9; } }
/* اغرس: ست بطاقات للمجالات، يختار الزائر واحدا فينتقل معه إلى النموذج. المكتمل والطباعة مقفلان */
.units { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: center; place-items: stretch; height: auto; }
.unit {
  font: inherit; color: var(--ink); text-align: start; cursor: pointer;
  display: grid; gap: 2px; align-content: start; padding: clamp(8px, 1.8vh, 16px) 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.unit:hover:not(:disabled) { border-color: var(--brand); }
.unit:disabled { cursor: default; background: var(--surface); border-style: dashed; }
.unit:disabled .unit__title, .unit:disabled .unit__count { color: var(--muted); }
.unit__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.unit__pill { flex: none; font-size: .72rem; line-height: 1.6; padding: 0 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.pages[lang="ur"] .unit__pill { font-size: .64rem; line-height: 2; }
/* «لاحقا» على بطاقة الطباعة: أحمر هادئ */
.unit .unit__pill--later { color: #b3261e; border-color: #e7b4ae; background: #fdf1ef; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .unit .unit__pill--later { color: #f0a59b; border-color: #6b2a24; background: #2a1513; } }
:root[data-theme="dark"] .unit .unit__pill--later { color: #f0a59b; border-color: #6b2a24; background: #2a1513; }
/* طباعة المصحف: لون ذهبي دافئ يميزها مرحلة قادمة */
.unit.unit--later { background: #fbf5e6; border-color: #dcc58f; }
.unit.unit--later .unit__title { color: #8a6a24; }
.unit.unit--later .unit__count, .unit.unit--later .unit__note { color: #9a7d45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .unit.unit--later { background: #1f1a0f; border-color: #5c4b25; } :root:not([data-theme="light"]) .unit.unit--later .unit__title { color: #dcc07e; } :root:not([data-theme="light"]) .unit.unit--later .unit__count, :root:not([data-theme="light"]) .unit.unit--later .unit__note { color: #b9a274; } }
:root[data-theme="dark"] .unit.unit--later { background: #1f1a0f; border-color: #5c4b25; }
:root[data-theme="dark"] .unit.unit--later .unit__title { color: #dcc07e; }
:root[data-theme="dark"] .unit.unit--later .unit__count, :root[data-theme="dark"] .unit.unit--later .unit__note { color: #b9a274; }
.unit[aria-pressed="true"] { border-color: var(--brand-strong); box-shadow: inset 0 0 0 1px var(--brand-strong); background: var(--brand-wash); }
.unit__title { font-family: var(--font-display); font-weight: var(--w-head); font-size: 1.2rem; line-height: 1.5; color: var(--gilt); }
.pages[lang="en"] .unit__title { font-family: var(--font-en); font-size: 1.35rem; }
.pages[lang="ur"] .unit__title { font-family: var(--font-ur); font-size: 1.05rem; line-height: 2; }
.unit__count { font-weight: var(--w-head); font-size: 1rem; line-height: 1.5; color: var(--brand-deep); }
.unit__note { font-size: .82rem; line-height: 1.5; color: var(--muted); }
.pages[lang="ur"] .unit__count { font-size: .92rem; line-height: 2; }
.pages[lang="ur"] .unit__note { font-size: .72rem; line-height: 2; }
/* جوال قائم أو بالعرض: بطاقات أضيق، والوسم على حافة البطاقة */
@media (max-width: 520px), (max-height: 520px) and (orientation: landscape) {
  .unit { padding-inline: 10px; }
  .unit__head { gap: 4px; }
  .unit__title { white-space: nowrap; }
  .pages[lang="en"] .unit__title { white-space: normal; line-height: 1.15; }
  .unit .unit__title { font-size: 1.02rem; }
  .pages[lang="en"] .unit .unit__title { font-size: 1.12rem; }
  .pages[lang="ur"] .unit .unit__title { font-size: .92rem; }
  .unit__count { font-size: .86rem; }
  .pages[lang="ur"] .unit__count { font-size: .76rem; }
  /* الوسم يجلس على حافة البطاقة حتى لا يزاحم العنوان */
  .unit { position: relative; }
  .unit__pill { position: absolute; top: 0; inset-inline-end: 10px; transform: translateY(-50%); background: var(--bg, var(--surface)); font-size: .6rem; padding: 0 6px; }
  .pages[lang="ur"] .unit__pill { font-size: .56rem; }
}

/* الأسفل: العداد في جانب، وزرا السابق والتالي في الجانب الآخر */
.scr__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scr__count { font-size: .9rem; color: var(--muted); }
.pages[lang="ur"] .scr__count { font-size: .8rem; line-height: 2.1; }
.scr__btns { display: flex; align-items: center; gap: 10px; }
.scr__prev, .scr__next { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; white-space: nowrap; }
.scr__prev { padding: 0 22px; font-size: .95rem; }
.scr__next { padding-block: 0; font-size: 1.05rem; }
.pages[lang="en"] .scr__next { font-size: 1.2rem; }
.pages[lang="ur"] .scr__next { font-size: .95rem; padding-block: 0 4px; }
.pages[lang="ur"] .scr__prev { font-size: .85rem; line-height: 2.2; }

/* صورة حقيقية في جانب الصورة: تكبر قليلا عند المرور، وعليها علامة عدسة، والضغط يفتحها كاملة */
.shot { justify-items: center; }
.shot__btn {
  position: relative; min-height: 0; height: 100%; max-height: 460px; padding: 0; border: 0; background: none; cursor: zoom-in;
  display: block; border-radius: 6px; line-height: 0;
}
.shot__img {
  height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(2, 77, 84, .12), 0 18px 34px -20px rgba(2, 77, 84, .55);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.shot__btn:hover .shot__img { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(2, 77, 84, .12), 0 26px 40px -22px rgba(2, 77, 84, .6); }
.shot__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.shot__hint {
  position: absolute; inset-block-end: 10px; inset-inline-end: 10px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--brand-strong);
  box-shadow: 0 4px 12px -6px rgba(2, 77, 84, .5); transition: transform .25s ease;
}
.shot__hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.shot__btn:hover .shot__hint { transform: scale(1.08); }

/* عارض الصور بملء الشاشة */
.zoom {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(4, 22, 24, .94); color: #fff; overflow: hidden;
}
.zoom::backdrop { background: rgba(4, 22, 24, .6); }
.zoom[open] { animation: page-fade .25s ease both; }
.zoom__stage {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 12px 70px;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: zoom-in;
}
.zoom.is-zoomed .zoom__stage { cursor: grab; }
.zoom.is-zoomed .zoom__stage:active { cursor: grabbing; }
.zoom__img {
  /* zoom.js يضبط المقاس ليظهر كاملا داخل الشاشة، وهذا حد احتياطي */
  max-width: calc(100vw - 24px); max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px);
  object-fit: contain; display: block; border-radius: 4px;
  transform-origin: center; transition: transform .3s var(--ease-out); will-change: transform;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.zoom__img.is-moving { transition: none; }
.zoom[open] .zoom__img { animation: zoom-in .35s var(--ease-out) both; }
@keyframes zoom-in { from { opacity: 0; scale: .96; } to { opacity: 1; scale: 1; } }
.zoom__bar {
  position: absolute; inset-block-end: max(16px, env(safe-area-inset-bottom)); inset-inline: 0; margin-inline: auto; width: max-content;
  display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(8px);
}
.zoom__btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: #fff; transition: background-color .2s ease;
}
.zoom__btn:hover { background: rgba(255, 255, 255, .16); }
.zoom__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.zoom__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.zoom__close { background: rgba(255, 255, 255, .14); }
@media (prefers-reduced-motion: reduce) { .zoom__img { transition: none; } .zoom[open], .zoom[open] .zoom__img { animation: none; } }

/* جوال أو جهاز لوحي قائم: الصورة فوق، والنص تحتها، والأزرار بعرض الشاشة */
@media (orientation: portrait) and (max-width: 900px) {
  .scr { gap: 10px; }
  /* الجوال القائم: عمود الفصل ضيق، فيبقى اسم القسم وحده دون «٢ من ٣» */
  .scr__now span { display: none; }
  .scr__now { font-size: .84rem; }
  .scr__body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: clamp(10px, 2.4vh, 22px); align-items: stretch; }
  .scr__fig { order: -1; min-height: 110px; container: fig / size; }
  .shot { min-height: 170px; }
  .ph--doc { width: 100%; aspect-ratio: auto; }
  .scr__text { gap: 6px; align-content: end; }
  .scr__title { font-size: clamp(1.3rem, 4.2vw + .3rem, 2rem); }
  .pages[lang="en"] .scr__title { font-size: clamp(1.45rem, 4.6vw + .3rem, 2.2rem); }
  .pages[lang="ur"] .scr__title { font-size: clamp(1.05rem, 3.4vw + .25rem, 1.6rem); line-height: 2; }
  .scr__count { display: none; }
  .scr__btns { flex: 1; }
  .scr__prev { flex: 1; }
  .scr__next { flex: 2; padding-inline: 16px; }
  .pair, .dig { height: 100%; }
  .ph--doc { height: 100%; }
  .scr--wide .scr__body { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
  .scr--wide .scr__text { align-content: start; }
  .units { height: auto; align-self: center; container: none; gap: 8px; }
  .unit { padding: 10px 12px; gap: 0; align-content: center; }
  .unit__title { font-size: 1.15rem; }
  .dig { gap: 6px; }
  .dig__word { width: min(100%, calc((100cqh - 76px) * 2.87)); }
  .dig__chips { flex-wrap: nowrap; gap: 3px; }
  .dig__chip { width: 26px; height: 26px; font-size: .7rem; }
  .dig__foot { gap: 2px 10px; }
  .dig__now { font-size: .82rem; line-height: 1.6; }
  .dig__more { padding: 2px 10px; font-size: .74rem; }
}
/* جوال قائم قصير: نخفف ما ليس أساسيا */
@media (orientation: portrait) and (max-width: 900px) and (max-height: 760px) {
  .scr__chips, .scr__stats { display: none; }
  .scr__lead { font-size: .92rem; line-height: 1.8; }
  .units { gap: 6px; }
  .unit { padding-block: 6px; }
  .pages[lang="ur"] .scr__more { font-size: .7rem; line-height: 1.8; }
  .pages[lang="ur"] #give .scr__lead { font-size: .74rem; line-height: 1.95; }
  .pages[lang="en"] .scr__lead { font-size: 1rem; line-height: 1.45; }
  .pages[lang="ur"] .scr__lead { font-size: .8rem; line-height: 2.1; }
  .unit__note { display: none; }
  #digital .scr__fig { min-height: 150px; }
  .pages[lang="en"] #digital .scr__lead { font-size: .92rem; line-height: 1.35; }
  .dig-id__label { display: none; }
  .dig-id__seg { padding: 3px 2px 4px; gap: 0; }
  .dig-id__seg code { font-size: .9rem; }
  .dig-id__seg > span { display: block; font-size: .64rem; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dig-id__seg > span > span { display: none; }
  .pages[lang="ur"] .dig-id__seg > span { font-size: .58rem; line-height: 1.8; }
}

/* مكان الصورة إذا ضاق: يبقى الرمز والعنوان، ويختفي الوصف */
@container fig (max-height: 300px) { .ph--flat span { display: none; } }
@container fig (max-height: 210px) { .ph span { display: none; } }
@container fig (max-height: 120px) { .ph strong { display: none; } }

/* جوال مقلوب بالعرض: عمودان كالحاسوب، بخط أصغر */
@media (max-height: 520px) and (orientation: landscape) {
  .scr { gap: 6px; padding-top: 4px; }
  .scr__ch { gap: 2px; }
  .scr__chname { font-size: .66rem; line-height: 1.4; }
  .pages[lang="en"] .scr__chname { font-size: .7rem; }
  .pages[lang="ur"] .scr__chname { font-size: .58rem; line-height: 1.8; }
  .scr__seg { height: 3px; }
  .scr__now { font-size: .76rem; line-height: 1.5; }
  .pages[lang="en"] .scr__now { font-size: .84rem; }
  .pages[lang="ur"] .scr__now { font-size: .64rem; line-height: 1.9; }
  .scr__body { gap: 24px; align-items: stretch; }
  .scr__fig { container: fig / size; }
  .units { container: none; }
  .scr__text { gap: 2px; }
  .scr__eyebrow { font-size: .8rem; }
  .scr__title { font-size: 1.15rem; line-height: 1.45; }
  .pages[lang="en"] .scr__title { font-size: 1.3rem; }
  .pages[lang="ur"] .scr__title { font-size: .95rem; line-height: 1.95; }
  .scr__lead { font-size: .82rem; line-height: 1.65; }
  .pages[lang="en"] .scr__lead { font-size: .92rem; line-height: 1.35; }
  .pages[lang="ur"] .scr__lead { font-size: .72rem; line-height: 1.95; }
  .scr__chips, .scr__stats { display: none; }
  .pair__item { gap: 2px; }
  .pair__label { font-size: .8rem; }
  .ph { font-size: .74rem; line-height: 1.5; gap: 4px; padding: 8px; }
  .ph svg { width: 22px; height: 22px; }
  .scr--wide .scr__body { gap: 8px; }
  .units { gap: 6px; }
  .unit { padding: 6px 12px; gap: 0; }
  .unit__title { font-size: .98rem; line-height: 1.45; }
  .unit__count { font-size: .9rem; }
  .unit__note { display: none; }
  .scr__prev, .scr__next { min-height: 36px; }
  .scr__next { font-size: .95rem; }
  /* الحفظ الرقمي بالعرض: معرف مضغوط، وأرقام الأشكال في سطر واحد */
  .dig { gap: 6px; }
  .dig__word { width: min(100%, calc((100cqh - 70px) * 2.87)); }
  .dig__chips { flex-wrap: nowrap; gap: 3px; }
  .dig__chip { width: 22px; height: 22px; font-size: .62rem; border-width: 1px; }
  .pages[lang="en"] .dig__chip { font-size: .7rem; }
  .dig__foot { gap: 2px 10px; }
  .dig__now { font-size: .76rem; line-height: 1.6; }
  .pages[lang="ur"] .dig__now { font-size: .66rem; line-height: 2; }
  .dig__more { padding: 1px 10px; font-size: .7rem; }
  .pages[lang="ur"] .dig__more { font-size: .62rem; }
  .dig-id { gap: 2px; margin-top: 0; }
  .dig-id__label { display: none; }
  .dig-id__row { gap: 4px; }
  .dig-id__seg { padding: 2px 2px 3px; border-radius: 8px; gap: 0; }
  .dig-id__seg code { font-size: .82rem; }
  .dig-id__seg > span { display: block; font-size: .6rem; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dig-id__seg > span > span { display: none; }
  .pages[lang="en"] .dig-id__seg > span { font-size: .66rem; }
  .pages[lang="ur"] .dig-id__seg > span { font-size: .56rem; line-height: 1.8; }
}

/* ===== نموذج الغرس ===== */
.plantp { align-content: center; }
.plantp__form, .plantp__done { width: min(100%, 560px); justify-self: center; display: grid; gap: clamp(6px, 1.6vh, 14px); animation: page-fade .6s ease both; }
.plantp__form[hidden], .plantp__done[hidden] { display: none; }
.plantp__head { display: grid; justify-items: center; gap: 0; text-align: center; }
.plantp__title { margin: 0; color: var(--brand-deep); font-family: var(--font-display); font-weight: var(--w-head); font-size: clamp(1.3rem, 3.4vh, 1.9rem); line-height: 1.5; }
.pages[lang="ur"] .plantp__title { font-size: clamp(1.1rem, 2.9vh, 1.6rem); line-height: 2.1; }
.plantp__set { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 4px; }
.plantp__set legend, .plantp__field > span { padding: 0; font-size: .85rem; font-weight: var(--w-head); color: var(--muted); line-height: 1.7; }
.pages[lang="ur"] .plantp__set legend, .pages[lang="ur"] .plantp__field > span { font-size: .76rem; line-height: 2.2; }
.plantp__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.plantp__form [hidden] { display: none !important; }
.plantp__opt { position: relative; cursor: pointer; }
.plantp__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.plantp__opt span {
  display: block; text-align: center; white-space: nowrap; font-size: .9rem; line-height: 1.7; color: var(--brand-deep);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.pages[lang="ur"] .plantp__opt span { font-size: .8rem; line-height: 2.1; padding-block: 1px 3px; }
.plantp__opt input:checked + span { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--surface); }
.plantp__opt input:focus-visible + span { outline: 2px solid var(--gilt); outline-offset: 2px; }
.plantp__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plantp__field { display: grid; gap: 2px; min-width: 0; transition: opacity .2s ease; }
.plantp__field.is-off { opacity: .45; }
.plantp__field input {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; line-height: 1.4;
}
.plantp__field input[dir="ltr"] { text-align: start; }
.pages[dir="rtl"] .plantp__field input[dir="ltr"] { text-align: right; }
.plantp__field input::placeholder { color: var(--muted); opacity: .7; }
.plantp__field input:focus { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 3px var(--brand-soft); }
.plantp__field input[aria-invalid="true"] { border-color: #c0573f; box-shadow: 0 0 0 3px rgba(192, 87, 63, .15); }
.plantp__check { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink); cursor: pointer; justify-self: start; }
.pages[lang="ur"] .plantp__check { font-size: .8rem; line-height: 2.2; }
.plantp__check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-strong); }
.plantp__hp { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; inset-inline-start: -9999px; }
.plantp__msg { margin: 0; min-height: 1.5em; font-size: .88rem; color: #b04a33; text-align: center; line-height: 1.5; }
.plantp__msg:empty { min-height: 0; }
.plantp__msg.is-note { color: var(--brand-deep) !important; font-size: 1.05rem; line-height: 1.8; }
.plantp__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.plantp__submit:disabled { opacity: .6; cursor: default; }
.plantp__privacy { margin: 0; text-align: center; font-size: .78rem; color: var(--muted); line-height: 1.6; }
.pages[lang="ur"] .plantp__privacy { font-size: .7rem; line-height: 2.1; }
.plantp__done { justify-items: center; text-align: center; }
.plantp__seed { width: clamp(90px, 18vh, 150px); height: auto; }
.plantp__seed line { stroke: var(--border); stroke-width: 1.5; stroke-linecap: round; }
.plantp__seed .stem { fill: none; stroke: var(--brand-deep); stroke-width: 3; stroke-linecap: round; }
.plantp__seed .leaf { fill: var(--leaf); }
.plantp__lead { margin: 0; max-width: 46ch; color: var(--muted); font-size: 1.05rem; }
.pages[lang="ur"] .plantp__lead { font-size: .95rem; line-height: 2.3; }
@media (max-width: 520px) {
  .plantp__opt span { padding-inline: 8px; font-size: .84rem; }
  .plantp__fields { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
/* جوال قصير: عنوان النموذج يكفي، ونقرب المسافات حتى يبقى كله في شاشة واحدة */
@media (max-height: 700px) {
  .plantp__form { gap: 4px; }
  .plantp__opts { gap: 4px; }
  .plantp__opt span { line-height: 1.55; padding-block: 3px; }
  .plantp__head .scr__eyebrow { display: none; }
  .plantp__set { gap: 2px; }
  .plantp__field { gap: 0; }
  .plantp__field input { padding-block: 7px; }
  .pages[lang="ur"] .plantp__set legend, .pages[lang="ur"] .plantp__field > span { line-height: 2; }
  .pages[lang="ur"] .plantp__opt span { font-size: .74rem; line-height: 1.75; padding-inline: 10px; }
  .pages[lang="ur"] .plantp__set legend, .pages[lang="ur"] .plantp__field > span { line-height: 1.8; }
  .plantp__privacy { font-size: .72rem; line-height: 1.5; }
  .pages[lang="ur"] .plantp__privacy { font-size: .66rem; line-height: 1.9; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .plantp__msg { color: #e59a85; }
}

@media (max-height: 520px) {
  /* رأس أنحف في الشاشات القصيرة، حتى يبقى للمحتوى مكان */
  .site-header { padding-block: 6px; }
  .site-header__logo { width: 76px; }
  .page { gap: 4px; padding-top: 2px; padding-bottom: 8px; }
  .gate { gap: 10px; }
  .gate__orn { margin-top: 4px; }
  .gate__voice { width: 34px; height: 34px; }
  .gate__voice svg { width: 17px; height: 17px; }
  .gate__lead { font-size: 1.9rem; line-height: 1.4; max-width: none; }
  .pages[lang="en"] .gate__lead { font-size: 2.1rem; line-height: 1.1; max-width: none; }
  .pages[lang="ur"] .gate__lead { font-size: 1.5rem; line-height: 1.9; }
  .gate__actions { gap: 2px; }
  .gate__start { min-height: 40px; font-size: 1.05rem; }
}

@media (max-height: 520px) {
  .plantp__form { gap: 4px; }
  .plantp__title { font-size: 1.1rem; line-height: 1.4; }
  .plantp__head .scr__eyebrow { display: none; }
  .plantp__field input { padding: 5px 10px; }
  .plantp__opt span { line-height: 1.5; padding-block: 2px; }
  .plantp__privacy { font-size: .7rem; }
}
/* نموذج الغرس في جوال مقلوب بالعرض: الاختيارات في جانب، والحقول في الجانب الآخر */
@media (max-height: 520px) and (orientation: landscape) {
  .plantp__form { width: min(100%, 800px); grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 4px; align-items: start; }
  .plantp__head { grid-column: 1 / -1; grid-row: 1; }
  .plantp__fields { grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; }
  .plantp__check { grid-column: 1 / -1; grid-row: 4; }
  .plantp__msg { grid-column: 1 / -1; grid-row: 5; }
  .plantp__actions { grid-column: 1 / -1; grid-row: 6; }
  .plantp__privacy { grid-column: 1 / -1; grid-row: 7; }
  .plantp .btn-primary { font-size: 1rem; padding: 4px 26px; }
  .pages[lang="ur"] .plantp .btn-primary { font-size: .9rem; line-height: 2.1; padding-block: 1px 5px; }
}

/* ===== حاسبة المساهمة (calculator.js): الاختيارات في جانب، والمبلغ وتوزيعه في الجانب الآخر ===== */
.calc__lead { margin: 0; font-size: .92rem; line-height: 1.7; color: var(--muted); }
.pages[lang="ur"] .calc__lead { font-size: .8rem; line-height: 2.1; }
.calc__raised { display: grid; justify-items: center; gap: 2px; width: min(100%, 420px); margin-top: 4px; }
.calc__meter { width: 100%; height: 6px; border-radius: 999px; background: var(--brand-wash); border: 1px solid var(--border); overflow: hidden; }
.calc__meter i { display: block; height: 100%; width: 0; min-width: 4px; background: linear-gradient(90deg, var(--gilt), #d4b46a); border-radius: inherit; }
.calc__raised span { font-size: .78rem; font-weight: var(--w-head); color: #8a6a24; line-height: 1.5; }
.pages[lang="ur"] .calc__raised span { font-size: .68rem; line-height: 1.9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .calc__raised span { color: #dcc07e; } }
:root[data-theme="dark"] .calc__raised span { color: #dcc07e; }
/* الشاشات الصغيرة: سطر ما جمع يغني عن سطر التكلفة، لأنه يذكر الهدف كاملا */
@media (max-width: 520px), (max-height: 700px) {
  .calc__raised { margin-top: 0; }
}
.calc__ctl { display: grid; gap: clamp(6px, 1.4vh, 12px); align-content: start; min-width: 0; }
/* العملة أعلى صندوق المبلغ: أزرار صغيرة متوسطة فوق الرقم الذي تغيره */
.calc__curs { justify-content: center; gap: 4px; margin-bottom: 2px; }
.calc__curs .plantp__opt span { font-size: .74rem; line-height: 1.5; padding: 1px 10px; }
.pages[lang="ur"] .calc__curs .plantp__opt span { font-size: .66rem; line-height: 1.8; padding-block: 0 2px; }
.calc__modes { display: flex; flex-wrap: nowrap; }
.calc__modes .plantp__opt { flex: 1 1 auto; display: grid; }
.calc__modes .plantp__opt span { text-align: center; padding-inline: 4px; white-space: nowrap; }
.calc__in { min-height: 40px; display: grid; align-items: center; }
.calc__step { justify-self: start; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); overflow: hidden; }
.calc__btn { font: inherit; font-size: 1.2rem; line-height: 1; width: 42px; height: 38px; border: 0; background: var(--brand-wash); color: var(--brand-deep); cursor: pointer; }
.calc__btn:hover:not(:disabled) { background: var(--brand-soft); }
.calc__btn:disabled { opacity: .35; cursor: default; }
.calc__btn:focus-visible { outline: 2px solid var(--gilt); outline-offset: -2px; }
.calc__n { width: 5.5em; border: 0; background: transparent; text-align: center; font: inherit; font-weight: var(--w-head); font-size: 1.1rem; color: var(--brand-deep); font-variant-numeric: tabular-nums; padding: 0; }
.calc__n:focus { outline: none; background: var(--brand-wash); }
.calc__select, .calc__amount input, .calc__ruhname { min-width: 0; font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; line-height: 1.5; }
.calc__select { width: 100%; }
.calc__select:focus, .calc__amount input:focus, .calc__ruhname:focus { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 3px var(--brand-soft); }
.calc__amount { display: flex; align-items: center; gap: 10px; justify-self: start; font-size: .95rem; color: var(--muted); }
.calc__amount input { width: 8em; font-weight: var(--w-head); color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.calc__ruh { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.calc__ruhname { flex: 1 1 160px; padding-block: 4px; font-size: .92rem; }
.calc__sum { display: grid; justify-items: center; align-content: center; gap: 0; text-align: center; min-width: 0; padding: clamp(8px, 1.8vh, 16px) 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.calc__total { font-family: var(--font-display); font-weight: var(--w-head); font-size: clamp(1.7rem, 5vh, 2.6rem); line-height: 1.35; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.pages[lang="ur"] .calc__total { line-height: 1.9; font-size: clamp(1.4rem, 4vh, 2.1rem); }
.calc__how { font-size: .9rem; line-height: 1.7; color: var(--muted); }
.pages[lang="ur"] .calc__how { font-size: .78rem; line-height: 2.1; }
.calc__for { font-family: var(--font-display); font-size: .98rem; line-height: 1.6; color: var(--gilt); }
.pages[lang="ur"] .calc__for { font-size: .86rem; line-height: 2; }
.calc__split { margin: clamp(4px, 1.2vh, 10px) 0 4px; font-size: .8rem; font-weight: var(--w-head); color: var(--muted); line-height: 1.6; }
.pages[lang="ur"] .calc__split { font-size: .72rem; line-height: 2; }
.calc__bar { display: flex; width: 100%; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; }
.calc__seg { display: block; flex-basis: 0; }
.calc__seg--0 { --c: var(--brand-deep); } .calc__seg--1 { --c: var(--brand-strong); } .calc__seg--2 { --c: var(--brand); }
.calc__seg--3 { --c: var(--leaf); } .calc__seg--4 { --c: var(--gilt); } .calc__seg--5 { --c: var(--dawn); }
.calc__bar .calc__seg { background: var(--c); }
.calc__key { list-style: none; margin: 6px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; text-align: start; }
.calc__key li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; align-items: baseline; font-size: .78rem; line-height: 1.5; min-width: 0; }
.calc__key li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); grid-row: 1 / span 2; align-self: center; }
.calc__key span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc__key b { font-weight: var(--w-head); color: var(--ink); font-variant-numeric: tabular-nums; }
.pages[lang="ur"] .calc__key li { font-size: .68rem; line-height: 1.9; }
@media (min-width: 900px) and (min-height: 521px) {
}
@media (max-width: 520px) {
  .calc__modes { gap: 4px; }
  .calc__modes .plantp__opt span { font-size: .8rem; padding-inline: 2px; }
  .calc__key { gap: 2px 8px; }
}
@media (max-height: 700px) {
  .calc__btn { height: 32px; width: 38px; }
  .calc__in { min-height: 34px; }
  .calc__select, .calc__amount input { padding-block: 3px; }
  .calc__ruhname { padding-block: 2px; }
  .calc__lead { font-size: .82rem; line-height: 1.55; }
  .calc__sum { padding-block: 6px; }
  .calc__total { font-size: 1.6rem; line-height: 1.3; }
  .calc__for { font-size: .88rem; line-height: 1.5; }
  .calc__how { font-size: .8rem; line-height: 1.5; }
  .calc__split { margin-top: 2px; }
  .calc__key li { font-size: .72rem; line-height: 1.35; }
  .pages[lang="ur"] .calc__key li { font-size: .62rem; line-height: 1.65; }
  .pages[lang="ur"] .calc__total { line-height: 1.7; }
  .pages[lang="ur"] .calc__lead, .pages[lang="ur"] .calc__how { line-height: 1.9; }
}
@media (max-width: 520px) and (max-height: 700px) {
  .calc__ctl { gap: 4px; }
  .calc__sum { padding-block: 4px; }
  .calc__split { margin-block: 0 2px; }
  .pages[lang="ur"] .calc__for { line-height: 1.8; }
  .pages[lang="ur"] .calc__curs .plantp__opt span { line-height: 1.5; padding-block: 0; }
  .calc__curs { margin-bottom: 0; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .calc__lead { font-size: .74rem; line-height: 1.4; }
  .calc__total { font-size: 1.4rem; line-height: 1.25; }
  .pages[lang="ur"] .calc__total { font-size: 1.15rem; line-height: 1.8; }
  .calc__how { font-size: .74rem; line-height: 1.45; }
  .calc__key li { font-size: .66rem; line-height: 1.3; }
  .calc__curs .plantp__opt span { font-size: .64rem; line-height: 1.35; padding-block: 0; }
  .calc__curs { margin-bottom: 0; }
  .pages[lang="ur"] .calc__curs .plantp__opt span { font-size: .58rem; line-height: 1.45; }
  .pages[lang="ur"] .calc__split { margin-block: 0; line-height: 1.7; }
  .pages[lang="ur"] .calc__key li { font-size: .6rem; line-height: 1.55; }
  .pages[lang="ur"] .calc__total { line-height: 1.6; }
  .pages[lang="ur"] .calc__lead, .pages[lang="ur"] .calc__how { font-size: .7rem; line-height: 1.6; }
  .calc__raised { gap: 0; }
  .calc__meter { height: 4px; }
  .calc__raised span { font-size: .7rem; line-height: 1.4; }
  .pages[lang="ur"] .calc__raised span { font-size: .62rem; line-height: 1.5; }
  .pages[lang="ur"] .calc__curs .plantp__opt span { line-height: 1.35; }
  .calc__btn { height: 28px; }
}
/* نموذج الغرس: ملخص ما اختاره الزائر، وزر الدفع بجانبه */
.plantp__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; }
.plantp__share { flex: 1 1 220px; white-space: pre-line; margin: 0; padding: 8px 14px; border-radius: 12px; background: var(--brand-wash); color: var(--brand-deep); font-size: .92rem; line-height: 1.7; text-align: center; }
.pages[lang="ur"] .plantp__share { font-size: .8rem; line-height: 2.1; }
.btn-pay { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 20px; border-radius: 999px; background: #8a6a24; color: #fff; font: inherit; font-size: 1rem; font-weight: var(--w-head); line-height: 1.5; text-decoration: none; box-shadow: 0 6px 16px -8px rgba(138, 106, 36, .7); transition: background .2s ease, transform .2s ease; }
.btn-pay:hover { background: #6f5419; transform: translateY(-1px); }
.btn-pay:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 3px; }
.btn-pay svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-pay[hidden] { display: none; }
.pages[lang="ur"] .btn-pay { font-size: .86rem; line-height: 2.1; padding-block: 4px 7px; }
/* الجهتان القائمتان على المشروع: أسفل النموذج ورسالة الشكر */
.plantp__orgs { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 28px); margin-top: clamp(4px, 1.4vh, 14px); padding-top: clamp(6px, 1.4vh, 12px); border-top: 1px solid var(--border); width: min(100%, 560px); justify-self: center; }
.plantp__orgs span { font-size: .78rem; font-weight: var(--w-head); color: var(--muted); }
.pages[lang="ur"] .plantp__orgs span { font-size: .7rem; line-height: 2; }
.plantp__org { height: clamp(60px, 12vh, 116px); width: auto; display: block; }
@media (max-height: 700px) {
  .plantp__share { padding-block: 4px; font-size: .84rem; line-height: 1.55; }
  .btn-pay { padding-block: 5px; font-size: .92rem; }
  .plantp__org { height: 56px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .plantp__share { padding-block: 3px; font-size: .78rem; }
  .btn-pay { padding: 3px 14px; font-size: .84rem; }
  .plantp__orgs { margin-top: 2px; padding-top: 3px; }
  .plantp__org { height: 40px; }
  .pages[lang="ur"] .plantp__share { line-height: 1.75; }
  .pages[lang="ur"] .plantp__orgs span { line-height: 1.6; }
  .pages[lang="ur"] .plantp__org { height: 36px; }
  .pages[lang="ur"] .btn-pay { line-height: 1.8; padding-block: 2px 4px; }
}

/* ===== الرحلة: الشمسة (journey.js) ===== */
.jmedal { container: jm / size; }
.jmedal__svg { width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); max-width: 470px; max-height: 470px; display: block; overflow: visible; }
.jmedal .ray { stroke: color-mix(in srgb, var(--brand) 70%, transparent); stroke-width: 1.3; stroke-linecap: round; }
.jmedal .ray--g { stroke: var(--gilt); }
.jmedal .rim { fill: none; stroke: color-mix(in srgb, var(--gilt) 55%, transparent); stroke-width: 1.1; }
.jmedal .core { fill: color-mix(in srgb, var(--gilt) 5%, var(--surface)); stroke: var(--gilt); stroke-width: 1.5; }
.jmedal .core2 { fill: none; stroke: color-mix(in srgb, var(--gilt) 60%, transparent); stroke-width: 1; stroke-dasharray: 2 4; }
.pet { cursor: pointer; outline: none; }
.pet path { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; transition: fill .35s, stroke .35s; }
.pet.done path { fill: var(--brand-soft); stroke: color-mix(in srgb, var(--brand) 55%, var(--surface)); }
.pet.here path { fill: var(--gilt); stroke: var(--gilt); }
.pet.sel path { stroke: var(--brand-deep); stroke-width: 2.5; }
.pet.here.sel path { stroke: var(--gilt-ink); }
.pet:hover path { stroke: var(--brand-strong); }
.pet:focus-visible path { stroke: var(--brand); stroke-width: 3; }
.jmedal text { font-family: var(--font); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.pet .n { font-weight: var(--w-head); font-size: 14px; fill: var(--muted); }
.pet.done .n { fill: var(--brand-deep); }
.pet.here .n { fill: #fff; }
.pet .l { font-family: var(--font-display); font-weight: var(--w-head); font-size: 15px; fill: var(--muted); }
.pet.done .l { fill: var(--brand-deep); }
.pet.here .l { fill: #fff; }
.jmedal .c-s { font-weight: var(--w-head); font-size: 12px; fill: var(--gilt-ink); }
.jmedal .c-n { font-family: var(--font-display); font-weight: var(--w-head); font-size: 44px; fill: var(--gilt-ink); }
.jmedal .c-t { font-family: var(--font-display); font-weight: var(--w-head); font-size: 20px; fill: var(--brand-deep); }
.jmedal .c-of { font-size: 11px; fill: var(--muted); }
.pages[lang="en"] .pet .l { font-size: 16px; }
.pages[lang="en"] .jmedal .c-t { font-size: 23px; }

.jdet { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 14px; margin-top: 4px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; max-width: 460px; }
.jdet__n { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); font-weight: var(--w-head); font-size: 1.15rem; line-height: 1; }
.jdet.is-here .jdet__n { background: var(--gilt); color: #fff; }
.jdet__t { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-family: var(--font-display); font-weight: var(--w-head); font-size: 1.05rem; line-height: 1.5; color: var(--brand-deep); }
.jdet__s { font-family: var(--font); font-size: .72rem; line-height: 1.8; padding: 0 9px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.jdet.is-here .jdet__s { background: color-mix(in srgb, var(--gilt) 16%, var(--surface)); color: var(--gilt-ink); }
.jdet.is-done .jdet__s { background: var(--brand-soft); color: var(--brand-strong); }
.jdet__d { font-size: .88rem; line-height: 1.6; color: var(--lead); }
.pages[lang="en"] .jdet__t { font-size: 1.2rem; }
.pages[lang="en"] .jdet__d { font-size: .98rem; }
@media (orientation: portrait) and (max-width: 900px) {
  .jdet { padding: 8px 12px; gap: 0 10px; }
  .jdet__n { width: 36px; height: 36px; font-size: 1rem; }
  .jdet__d { font-size: .8rem; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .jdet { padding: 6px 10px; gap: 0 10px; }
  .jdet__n { width: 32px; height: 32px; font-size: .9rem; }
  .jdet__d { font-size: .76rem; line-height: 1.4; }
}
.pages[lang="ur"] .jmedal .c-n { font-size: 38px; }
.pages[lang="ur"] .jmedal .c-t { font-size: 18px; }

/* ===== جرب المصحف (tryit.js) ===== */
#try .scr__body { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
.tp-grp { display: grid; gap: 6px; margin-top: 2px; }
.tp-grp__t { font-size: .78rem; font-weight: var(--w-head); color: var(--muted); }
.tp-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); max-width: 470px; }
.tp-acts button { border: 0; background: none; border-radius: 10px; padding: 7px 6px; cursor: pointer; display: grid; justify-items: center; gap: 2px; color: var(--muted); font: inherit; transition: background-color .2s, color .2s; }
.tp-acts svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tp-acts span { font-weight: var(--w-head); font-size: .8rem; line-height: 1.5; }
.tp-acts button:hover { color: var(--brand-deep); }
.tp-acts button[aria-pressed="true"] { background: var(--brand-strong); color: var(--surface); }
.tp-desc { margin: 0; font-size: .82rem; line-height: 1.7; color: var(--lead); max-width: 470px; min-height: 3.4em; }
.tp-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-width: 470px; }
.tp-tool { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 10px; align-items: center; text-align: start; padding: 7px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: inherit; transition: border-color .2s; }
.tp-tool:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); }
.tp-tool[aria-pressed="true"] { border-color: var(--gilt); box-shadow: inset 0 0 0 1px var(--gilt); }
.tp-tool__ic { grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); }
.tp-tool[aria-pressed="true"] .tp-tool__ic { background: var(--gilt); color: #fff; }
.tp-tool__ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tp-tool__t { font-weight: var(--w-head); font-size: .84rem; line-height: 1.45; color: var(--brand-deep); }
.tp-tool__d { font-size: .7rem; line-height: 1.45; color: var(--muted); }
.tp-paper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.tp-sw { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--border); background: var(--sw); cursor: pointer; position: relative; }
.tp-sw::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--swi); opacity: .85; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tp-sw[aria-pressed="true"] { border-color: var(--brand-strong); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand-strong); }
.tp-acts button:focus-visible, .tp-tool:focus-visible, .tp-sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pages[lang="en"] .tp-acts span, .pages[lang="en"] .tp-tool__t { font-size: .9rem; }
.pages[lang="en"] .tp-desc { font-size: .9rem; line-height: 1.45; }
.pages[lang="en"] .tp-tool__d { font-size: .78rem; line-height: 1.3; }
.pages[lang="ur"] .tp-acts span, .pages[lang="ur"] .tp-tool__t { font-size: .74rem; line-height: 2; }
.pages[lang="ur"] .tp-desc { font-size: .72rem; line-height: 2.1; }
.pages[lang="ur"] .tp-tool__d { font-size: .62rem; line-height: 1.9; }
.pages[lang="ur"] .tp-grp__t, .pages[lang="ur"] .tp-paper { font-size: .68rem; line-height: 2; }

/* الصفحة: تملأ ارتفاع مكانها بنسبة صفحة المصحف */
.tp-fig { container: tpfig / size; display: grid; place-items: center; }
.tp-page { --paper: #fffdf6; --pink: #1b1b1b; --pline: #2a3b3d; --phi: #017c86; --pgold: #a8741a; --pdim: rgba(255, 253, 246, .74);
  position: relative; height: min(100cqh, 150cqw); aspect-ratio: 1024 / 1536; border-radius: 6px; background: var(--paper);
  box-shadow: 0 1px 0 var(--border), 0 18px 40px -24px rgba(2, 77, 84, .45); transition: background-color .4s; }
.tp-page[data-paper="white"] { --paper: #ffffff; --pink: #000; --pline: #222; --pdim: rgba(255, 255, 255, .76); }
.tp-page[data-paper="sepia"] { --paper: #f1e3c4; --pink: #3a2a14; --pline: #6b5330; --pdim: rgba(241, 227, 196, .76); }
.tp-page[data-paper="night"] { --paper: #10181a; --pink: #e8e2d0; --pline: #6f8c8f; --phi: #5fd3db; --pgold: #e2bd6a; --pdim: rgba(16, 24, 26, .74); }
.tp-page.is-loupe { touch-action: none; }
.tp-svg { width: 100%; height: 100%; display: block; }
.tp-frame { fill: var(--pline); fill-rule: evenodd; transition: fill .4s; }
.tp-w { cursor: pointer; outline: none; }
.tp-w path { fill: var(--pink); transition: fill .15s; }
.tp-hit { fill: transparent; transition: fill .15s; }
.tp-m path { fill: var(--pgold); }
.tp-w:hover path, .tp-w:focus-visible path, .tp-w.tp-ay path, .tp-w.tp-rd path { fill: var(--phi); }
.tp-w:focus-visible .tp-hit { fill: color-mix(in srgb, var(--phi) 14%, transparent); }
.tp-w.tp-on path, .tp-w.tp-rep path { fill: var(--pgold); }
.tp-w.tp-ay .tp-hit, .tp-w.tp-rd .tp-hit { fill: color-mix(in srgb, var(--phi) 13%, transparent); }
.tp-w.tp-rep .tp-hit { fill: color-mix(in srgb, var(--pgold) 20%, transparent); }
.tp-w.tp-past path { fill: color-mix(in srgb, var(--pink) 42%, var(--paper)); }
.is-xray .tp-w path, .is-xray .tp-frame { fill: none; stroke: var(--phi); stroke-width: 1; vector-effect: non-scaling-stroke; }
.is-xray .tp-m path { stroke: var(--pgold); }
.tp-dim { fill: var(--pdim); pointer-events: none; }
.tp-rl { fill: none; stroke: var(--pgold); stroke-width: 2; pointer-events: none; }
.tp-loupe { position: absolute; width: 190px; height: 190px; border-radius: 50%; overflow: hidden; pointer-events: none; border: 3px solid var(--gilt); background: var(--paper); box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45); transform: translate(-50%, -50%); z-index: 3; }
.tp-loupe svg { width: 100%; height: 100%; display: block; }
.tp-loupe rect { fill: var(--paper); }
.tp-status { position: absolute; inset-inline: 8px; bottom: 8px; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--border); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45); font-size: .8rem; line-height: 1.6; }
.pages[lang="ur"] .tp-status { font-size: .7rem; line-height: 2.1; }
.tp-st__w { height: 30px; flex: none; }
.tp-st__w svg { height: 100%; width: auto; display: block; }
.tp-st__w path { fill: var(--gilt-ink); }
.tp-st__btn { margin-inline-start: auto; flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--brand-deep); border-radius: 999px; padding: 3px 12px; font: inherit; font-weight: var(--w-head); cursor: pointer; white-space: nowrap; }
.tp-st__btn:hover { border-color: var(--brand-strong); }

/* نافذتا الكلمة والآية */
.tp-dlg { width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); font-family: var(--font); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); overflow: auto; }
.tp-dlg--ayah { width: min(760px, calc(100vw - 32px)); }
.tp-dlg[open] { animation: page-fade .25s ease both; }
.tp-dlg::backdrop { background: rgba(4, 22, 24, .55); }
.tp-dlg:lang(ur) { --font: var(--font-ur); }
.tp-dlg:lang(en) { --font: var(--font-en); }
.tp-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.tp-bar > div:first-child, .tp-bar > div:nth-child(2) { min-width: 0; }
.tp-bar__t { font-weight: var(--w-head); color: var(--brand-deep); font-size: 1rem; line-height: 1.5; }
.tp-bar__s { font-size: .78rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tp-bar__s code { font-family: var(--font-ar); font-weight: var(--w-head); direction: ltr; unicode-bidi: isolate; color: var(--gilt-ink); background: color-mix(in srgb, var(--gilt) 16%, var(--surface)); padding: 0 10px; border-radius: 999px; }
.tp-bar__end { margin-inline-start: auto; display: flex; gap: 6px; }
.tp-dlg--word .tp-x[data-close] { margin-inline-start: auto; }
.tp-x { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.tp-x[disabled] { opacity: .35; cursor: default; }
.tp-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tp-body { padding: 16px 18px 18px; display: grid; gap: 12px; }
.tp-big { background: #fffdf6; border-radius: 14px; border: 1px solid var(--border); height: clamp(140px, 30vh, 240px); display: grid; place-items: center; padding: 14px; overflow: hidden; }
.tp-big svg { width: 100%; height: 100%; transition: transform .1s; }
.tp-big path { fill: #1b1b1b; }
.tp-zoom { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); }
.tp-zoom input { flex: 1; accent-color: var(--brand-strong); }
.tp-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-btn { border: 1px solid var(--border); background: var(--surface); color: var(--brand-deep); border-radius: 999px; padding: 5px 14px; font: inherit; font-weight: var(--w-head); font-size: .84rem; cursor: pointer; white-space: nowrap; }
.tp-btn:hover { border-color: var(--brand-strong); }
.tp-btn[disabled] { opacity: .4; cursor: default; }
.tp-btn--main { margin-inline-start: auto; background: var(--brand-strong); border-color: var(--brand-strong); color: var(--surface); }
.tp-btn--main:hover { background: var(--brand-deep); }
.tp-x:focus-visible, .tp-btn:focus-visible, .tp-st__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tp-ayah { background: #fffdf6; border: 1px solid color-mix(in srgb, var(--gilt) 45%, transparent); border-radius: 16px; padding: 14px 16px; display: flex; flex-wrap: wrap; flex-direction: row-reverse; justify-content: center; align-items: center; gap: 2px 10px; direction: ltr; }
.tp-ayah svg { height: 48px; width: auto; display: block; overflow: visible; }
.tp-ayah path { fill: #1b1b1b; }
.tp-ayah .tp-mk path { fill: #a8741a; }
.tp-part { margin: -4px 0 0; text-align: center; font-size: .78rem; color: var(--muted); }
.tp-tr { display: grid; gap: 4px; }
.tp-tr__l { font-size: .78rem; font-weight: var(--w-head); color: var(--gilt-ink); }
.tp-tr p { margin: 0; font-family: var(--font-ur); font-size: 1.1rem; line-height: 2.5; text-align: right; }
.tp-tr small { font-size: .74rem; color: var(--muted); }

/* الجوال الطولي: الصفحة في الأعلى، والأدوات أيقونات في صفين تحتها */
@media (orientation: portrait) and (max-width: 900px) {
  #try .scr__body { grid-template-columns: minmax(0, 1fr); }
  #try .scr__lead, #try .tp-desc, #try .tp-grp__t, #try .tp-tool__d, #try .tp-paper > span { display: none; }
  #try .tp-grp { margin: 0; gap: 6px; }
  #try .tp-acts { max-width: none; }
  #try .tp-acts button { grid-auto-flow: column; justify-content: center; align-items: center; gap: 6px; padding: 6px; }
  #try .tp-acts svg { width: 18px; height: 18px; }
  #try .tp-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
  #try .tp-tool { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 5px 4px; gap: 2px; }
  #try .tp-tool__ic { grid-row: auto; width: 28px; height: 28px; }
  #try .tp-tool__t { font-size: .68rem; line-height: 1.35; }
  .pages[lang="ur"] #try .tp-tool__t { font-size: .6rem; line-height: 1.8; }
  .pages[lang="en"] #try .tp-tool__t { font-size: .74rem; line-height: 1.2; }
  #try .tp-paper { justify-content: center; }
  #try .tp-grp:last-child { display: grid; gap: 6px; }
  .tp-loupe { width: 140px; height: 140px; }
  .tp-ayah svg { height: 36px; }
  .tp-tr p { font-size: .98rem; }
}
/* شاشات الحاسوب القصيرة: إخفاء الأوصاف الثانوية */
@media (orientation: landscape) and (max-height: 820px) and (min-height: 521px) {
  #try .tp-tool__d, #try .tp-grp__t { display: none; }
  #try .tp-tool { padding: 5px 10px; }
  #try .tp-tool__ic { grid-row: auto; width: 28px; height: 28px; }
  #try .tp-acts button { padding: 5px 6px; }
  .pages[lang="ur"] #try .scr__lead { line-height: 1.9; }
}
/* الجوال بالعرض: الأدوات أيقونات بلا وصف */
@media (max-height: 520px) and (orientation: landscape) {
  #try .scr__lead, #try .tp-desc, #try .tp-grp__t, #try .tp-tool__d { display: none; }
  #try .tp-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #try .tp-tool { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 4px; }
  #try .tp-tool__ic { grid-row: auto; width: 26px; height: 26px; }
  #try .tp-tool__t { font-size: .64rem; line-height: 1.3; }
  #try .tp-acts button { grid-auto-flow: column; justify-content: center; align-items: center; gap: 6px; padding: 4px; }
  #try .tp-acts svg { width: 16px; height: 16px; }
  .tp-loupe { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) { .tp-w path, .tp-hit, .tp-page, .tp-frame, .tp-big svg { transition: none; } .tp-dlg[open] { animation: none; } }
.tp-status[hidden], .tp-loupe[hidden] { display: none; }

/* ===== مسيرة المصحف (progress.js) ===== */
/* شاشة من شاشات العرض: شريط الأقسام، ثم العنوان والأرقام، ثم قائمة المراحل وبجانبها اللوحة، ثم العداد والأزرار */
.prg { display: flex; flex-direction: column; justify-content: center; gap: clamp(8px, 1.8vh, 16px); }
.prg > * { flex: none; }
/* اللوحة مثال مصغر: لا تملأ الشاشات الطويلة */
.prg > .prg__demo { flex: 1 1 0; max-height: 540px; }
.prg__head { display: grid; gap: 2px; }
.prg__head .scr__eyebrow { margin: 0; }
.prg__title { margin: 0; color: var(--brand-deep); font-family: var(--font-display); font-weight: var(--w-head); font-size: clamp(1.2rem, 3.2vh, 1.6rem); line-height: 1.5; }
.pages[lang="en"] .prg__title { font-size: clamp(1.4rem, 3.8vh, 1.9rem); line-height: 1.2; }
.pages[lang="ur"] .prg__title { font-size: clamp(1.05rem, 2.8vh, 1.4rem); line-height: 2.1; }
.prg__lead { margin: 0; font-size: .92rem; color: var(--lead); line-height: 1.75; }
.pages[lang="en"] .prg__lead { font-size: 1.02rem; line-height: 1.45; }
.pages[lang="ur"] .prg__lead { font-size: .78rem; line-height: 2.2; }

/* إطار اللوحة: شارة «لوحة مثال» والأرقام في شريط علوي */
.prg__demo { min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 22px; background: color-mix(in srgb, var(--brand-soft) 40%, var(--surface)); }
.prg__demo > * { flex: none; }
.prg__demo > .prg__body { flex: 1 1 0; }
.prg__dbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 0 6px; }
.prg__badge { font-size: .72rem; font-weight: var(--w-head); color: var(--gilt-ink); background: color-mix(in srgb, var(--gilt) 16%, var(--surface)); border-radius: 999px; padding: 0 10px; line-height: 1.9; }
.pages[lang="ur"] .prg__badge { font-size: .62rem; line-height: 2.2; }
.prg__kpis { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; }
.prg__kpi { display: inline-flex; align-items: baseline; gap: 5px; line-height: 1.5; }
.prg__kpi b { font-family: var(--font-ar); font-size: 1.05rem; font-weight: var(--w-head); color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.pages[lang="en"] .prg__kpi b { font-family: var(--font-en); }
.prg__kpi span { font-size: .74rem; color: var(--muted); }
.prg__kpi--fund b { color: var(--gilt); }
.pages[lang="ur"] .prg__kpi span { font-size: .62rem; line-height: 2; }
.prg__upd { margin: 0; font-size: .7rem; color: var(--muted); line-height: 1.5; }
.pages[lang="ur"] .prg__upd { font-size: .6rem; line-height: 2; }

/* تبويبا الجوال: المراحل والصفحات */
.prg__tabs { display: none; gap: 4px; padding: 4px; border-radius: 12px; background: var(--brand-soft); }
.prg__tabs button { flex: 1; border: 0; border-radius: 9px; padding: 4px; background: none; color: var(--brand-deep); font: inherit; font-weight: var(--w-head); font-size: .85rem; cursor: pointer; }
.pages[lang="ur"] .prg__tabs button { font-size: .72rem; line-height: 2; padding: 0 4px; }
.prg__tabs button[aria-pressed="true"] { background: var(--surface); }

.prg__body { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: clamp(10px, 1.6vw, 18px); min-height: 0; }
.prg__card { min-height: 0; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }

/* قائمة المراحل: أشرطة على مقياس واحد، وهي التنقل نفسه */
.prg__list { padding: clamp(4px, 1vh, 10px); display: grid; align-content: space-evenly; gap: 0; }
.prg__grp { margin: 0; padding: clamp(2px, .6vh, 6px) 8px 0; font-size: .7rem; font-weight: var(--w-head); color: var(--muted); line-height: 1.5; }
.pages[lang="ur"] .prg__grp { font-size: .6rem; line-height: 2; }
/* كل مرحلة في سطر واحد: الاسم ثم الشريط ثم الرقم */
.prg__row { width: 100%; border: 0; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(56px, .7fr) auto; gap: 10px; align-items: center; padding: clamp(2px, .5vh, 5px) 8px; border-radius: 12px; transition: background .2s; }
.prg__row:hover { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.prg__row[aria-pressed="true"] { background: var(--brand-soft); }
.prg__row[aria-pressed="true"]::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--brand-strong); }
.prg__row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.prg__ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); }
.prg__row[aria-pressed="true"] .prg__ic { background: var(--surface); }
.prg__row[data-done] .prg__ic { background: var(--gilt); color: #fff; }
.prg__ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.prg__sn { font-size: .86rem; font-weight: var(--w-head); line-height: 1.5; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pages[lang="en"] .prg__sn { font-size: .95rem; line-height: 1.3; }
.pages[lang="ur"] .prg__sn { font-size: .72rem; line-height: 2; }
.prg__sv { grid-column: 4; grid-row: 1; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.5; }
.prg__sv b { color: var(--brand-deep); font-weight: var(--w-head); font-size: .88rem; }
.pages[lang="ur"] .prg__sv { font-size: .64rem; line-height: 2; }
.prg__bar { grid-column: 3; grid-row: 1; height: 6px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.prg__row[aria-pressed="true"] .prg__bar { background: var(--surface); }
.prg__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width .8s ease; }
.prg__row[data-done] .prg__bar i { background: var(--gilt); }

/* اللوحة: تبويبان، المرحلة والصفحات */
.prg__panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.prg__ptabs { display: flex; gap: 4px; padding: 8px 14px 0; border-bottom: 1px solid var(--border); }
.prg__ptabs button { border: 0; background: none; padding: 4px 14px 6px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-weight: var(--w-head); font-size: .88rem; cursor: pointer; }
.pages[lang="ur"] .prg__ptabs button { font-size: .74rem; line-height: 2; }
.prg__ptabs button[aria-pressed="true"] { color: var(--brand-deep); border-bottom-color: var(--brand-strong); }
.prg__view { min-height: 0; overflow: hidden; padding: clamp(8px, 1.6vh, 14px); display: flex; flex-direction: column; gap: clamp(6px, 1.3vh, 12px); }
.prg__view > * { flex: none; }
.prg__back { display: none; align-self: start; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 0 14px; color: var(--brand-strong); font: inherit; font-size: .8rem; font-weight: var(--w-head); line-height: 1.9; cursor: pointer; }
.prg__back.is-on { display: inline-block; }
.prg__back::before { content: "→"; display: inline-block; margin-inline-end: 6px; }
.pages[lang="en"] .prg__back::before { content: "←"; }
.pages[lang="ur"] .prg__back { font-size: .68rem; line-height: 2.2; }

/* تفاصيل المرحلة */
.prg__h { margin: 0; color: var(--brand-deep); font-family: var(--font-display); font-weight: var(--w-head); font-size: 1.05rem; line-height: 1.5; }
.pages[lang="en"] .prg__h { font-size: 1.2rem; line-height: 1.25; }
.pages[lang="ur"] .prg__h { font-size: .88rem; line-height: 2.1; }
.prg__dhead { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.prg__who { font-size: .76rem; font-weight: var(--w-head); color: var(--gilt-ink); }
.pages[lang="ur"] .prg__who { font-size: .66rem; line-height: 2; }
.prg__desc { margin: 0; font-size: .88rem; color: var(--lead); line-height: 1.7; }
.pages[lang="en"] .prg__desc { font-size: .97rem; line-height: 1.4; }
.pages[lang="ur"] .prg__desc { font-size: .74rem; line-height: 2.1; }
.prg__pill { flex: none; font-size: .72rem; font-weight: var(--w-head); padding: 0 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); white-space: nowrap; line-height: 1.8; }
.prg__pill.is-done { background: var(--brand-strong); color: var(--surface); }
.prg__pill.is-wait { background: color-mix(in srgb, var(--muted) 14%, var(--surface)); color: var(--muted); }
.prg__pill.is-now { background: color-mix(in srgb, var(--gilt) 18%, var(--surface)); color: var(--gilt-ink); }
.pages[lang="ur"] .prg__pill { font-size: .62rem; line-height: 2.2; }
.prg__view > .prg__dmain { flex: 1 1 0; }
.prg__dmain { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: minmax(0, 1fr); gap: 16px; align-items: start; }
.prg__stats { display: grid; gap: clamp(6px, 1.1vh, 10px); align-content: start; min-width: 0; min-height: 0; }
.prg__big { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.prg__big b { font-family: var(--font-ar); font-size: clamp(1.3rem, 3.6vh, 1.8rem); font-weight: var(--w-head); color: var(--brand-deep); line-height: 1.2; font-variant-numeric: tabular-nums; }
.pages[lang="en"] .prg__big b { font-family: var(--font-en); }
.prg__big span { font-size: .82rem; color: var(--muted); }
.pages[lang="ur"] .prg__big span { font-size: .68rem; line-height: 2; }
.prg__meter { display: block; height: 8px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.prg__meter i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: inherit; transition: width .7s ease; }
.prg__meter.is-full i { background: var(--gilt); }
.prg__minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.prg__mini { border: 1px solid var(--border); border-radius: 12px; padding: 4px 10px; display: grid; line-height: 1.4; }
.prg__mini b { font-family: var(--font-ar); font-size: 1.05rem; font-weight: var(--w-head); color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.pages[lang="en"] .prg__mini b { font-family: var(--font-en); }
.prg__mini span { font-size: .72rem; color: var(--muted); }
.pages[lang="ur"] .prg__mini span { font-size: .62rem; line-height: 2; }
.prg__items { display: grid; gap: 6px; }
.prg__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-size: .82rem; line-height: 1.5; }
.pages[lang="en"] .prg__item { font-size: .92rem; line-height: 1.25; }
.pages[lang="ur"] .prg__item { font-size: .68rem; line-height: 2; }
.prg__item .prg__meter { grid-column: 1 / -1; height: 5px; }
.prg__spark svg { width: 100%; height: clamp(36px, 7vh, 64px); display: block; }
.prg__spark .a { fill: color-mix(in srgb, var(--brand) 16%, transparent); }
.prg__spark .l { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.prg__spark .g { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.prg__spark .e { fill: var(--brand-strong); }
.prg__slb { display: flex; justify-content: space-between; gap: 8px; font-size: .68rem; color: var(--muted); line-height: 1.6; }
.prg__slb span:nth-child(2) { font-family: var(--font); }
.pages[lang="ur"] .prg__slb { font-size: .6rem; line-height: 2; }

/* كلمة «رحيما» كما تبدو في المرحلة: على ورق فاتح في الوضعين */
.prg__word { margin: 0; width: 100%; aspect-ratio: 16 / 11; max-height: 100%; min-height: 0; border-radius: 14px; background: #fffdf6; border: 1px solid var(--border); overflow: hidden; }
.prg__word svg { width: 100%; height: 100%; display: block; }
.prg__word .w-ink { fill: #1b1b1b; }
.prg__word .w-ghost { fill: #1b1b1b; opacity: .1; }
.prg__word .w-ghost--soft { opacity: .26; }
.prg__word .w-line { stroke: #b8913a; stroke-width: .6; fill: none; }
.prg__word .w-mark { stroke: #b8913a; stroke-width: 1.6; fill: none; vector-effect: non-scaling-stroke; }
.prg__word .w-node { fill: #017c86; }
.prg__word .w-handle { stroke: #017c86; stroke-width: .7; }
.prg__word .w-l1 { fill: none; stroke: #4fb2b9; stroke-width: 1; vector-effect: non-scaling-stroke; }
.prg__word .w-l2 { fill: none; stroke: #b8913a; stroke-width: 1; vector-effect: non-scaling-stroke; }
.prg__word .w-l3 { fill: rgba(2, 162, 174, .16); stroke: #017c86; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.prg__word .w-box { fill: none; stroke: #02a2ae; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.prg__word .w-code { fill: #8a6a22; font-family: var(--font-en); font-size: 9px; font-weight: 600; }
.prg__word .w-tr { fill: #5b7579; font-family: var(--font-ur), var(--font-en); font-size: 8px; }
.prg__word .w-phone { fill: #fff; stroke: #024d54; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.prg__word .w-sheet { fill: #fff; stroke: #d3e7e9; stroke-width: 1; vector-effect: non-scaling-stroke; }
.prg__word .w-crop { stroke: #0f2a2d; stroke-width: .8; vector-effect: non-scaling-stroke; }


/* الصفحات: ثلاثون بطاقة للأجزاء، والجزء المفتوح بصفحاته */
.prg__phead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.prg__find { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: var(--w-head); color: var(--brand-deep); white-space: nowrap; }
.pages[lang="ur"] .prg__find { font-size: .7rem; }
.prg__find input { width: 4.6em; font: inherit; font-family: var(--font-ar); font-weight: 400; font-size: .9rem; padding: 1px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); text-align: center; }
.pages[lang="en"] .prg__find input { font-family: var(--font-en); }
.prg__find input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.prg__note { margin: 0; font-size: .76rem; color: var(--muted); line-height: 1.6; }
.pages[lang="en"] .prg__note { font-size: .86rem; line-height: 1.35; }
.pages[lang="ur"] .prg__note { font-size: .64rem; line-height: 2; }
.prg__juz { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(4px, .9vh, 8px); }
.prg__jz { min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; padding: clamp(3px, .8vh, 7px) 7px clamp(5px, .9vh, 8px); cursor: pointer; display: grid; gap: clamp(2px, .6vh, 5px); text-align: start; transition: border-color .2s, transform .2s; }
.prg__jz:hover { border-color: var(--brand); transform: translateY(-1px); }
.prg__jz:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.prg__jt { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.prg__jt b { font-family: var(--font-ar); font-size: 1.1rem; font-weight: var(--w-head); color: var(--brand-deep); line-height: 1.3; }
.pages[lang="en"] .prg__jt b { font-family: var(--font-en); }
.prg__jt span { font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.prg__stack { display: flex; height: 7px; border-radius: 999px; overflow: hidden; gap: 1px; }
.prg__stack i { display: block; height: 100%; }
.prg .s1 { fill: #ece5d2; background: #ece5d2; }
.prg .s2 { fill: #c9e6e3; background: #c9e6e3; }
.prg .s3 { fill: #8fcfd2; background: #8fcfd2; }
.prg .s4 { fill: #4fb2b9; background: #4fb2b9; }
.prg .s5 { fill: #1d8d96; background: #1d8d96; }
.prg .s6 { fill: var(--gilt); background: var(--gilt); }
@media (prefers-color-scheme: dark) {
  .prg .s1 { fill: #213638; background: #213638; } .prg .s2 { fill: #164a4f; background: #164a4f; }
  .prg .s3 { fill: #156a72; background: #156a72; } .prg .s4 { fill: #1a8c95; background: #1a8c95; }
  .prg .s5 { fill: #3cc3cd; background: #3cc3cd; }
  .prg__pg.s5 { color: #062a2d; }
}
.prg__legend { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .72rem; color: var(--muted); line-height: 1.6; }
.prg__legend span { display: inline-flex; align-items: center; gap: 5px; }
.prg__legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pages[lang="ur"] .prg__legend { font-size: .6rem; line-height: 2; }
.prg__drill { display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 12px); }
.prg__pgrid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.prg__pg { border: 0; border-radius: 10px; padding: clamp(5px, 1.2vh, 10px) 2px; cursor: pointer; font: inherit; line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--brand-deep); }
.prg__pg b { font-family: var(--font-ar); font-size: .95rem; font-weight: var(--w-head); }
.pages[lang="en"] .prg__pg b { font-family: var(--font-en); }
.prg__pg.s4, .prg__pg.s5, .prg__pg.s6 { color: #fff; }
.prg__pg[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.prg__pg:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.prg__steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.prg__step { display: grid; justify-items: center; gap: 2px; font-size: .74rem; color: var(--muted); text-align: center; line-height: 1.4; }
.pages[lang="ur"] .prg__step { font-size: .6rem; line-height: 2; }
.prg__step i { width: 100%; height: 6px; border-radius: 999px; background: var(--border); }
.prg__step.ok { color: var(--brand-deep); font-weight: var(--w-head); }
.prg__step.ok i { background: var(--brand); }
.prg__step.next { color: var(--gilt-ink); font-weight: var(--w-head); }
.prg__step.next i { background: repeating-linear-gradient(90deg, var(--gilt) 0 6px, transparent 6px 10px); }
.prg__ptext { margin: 0; font-size: .86rem; color: var(--lead); line-height: 1.6; }
.prg__ptext b { color: var(--brand-deep); font-weight: var(--w-head); }
.pages[lang="en"] .prg__ptext { font-size: .95rem; line-height: 1.35; }
.pages[lang="ur"] .prg__ptext { font-size: .7rem; line-height: 2.1; }

/* الشاشات القصيرة: إخفاء الوصف */
@media (max-height: 760px) { .prg__desc { display: none; } }
/* شاشات الحاسوب القصيرة */
@media (orientation: landscape) and (max-height: 820px) and (min-height: 521px) {
  .prg__head .scr__eyebrow { display: none; }
  .prg__items { gap: 3px; }
  .prg__item .prg__meter { display: none; }
}

/* الشاشات القصيرة والجوال الطولي: عناوين المجموعات خطوط فاصلة رفيعة */
@media (orientation: landscape) and (max-height: 820px) and (min-height: 521px), (orientation: portrait) and (max-width: 900px) {
  .prg__grp { height: 1px; padding: 0; margin: 3px 8px; overflow: hidden; color: transparent; background: var(--border); }
  .prg__grp:first-child { display: none; }
  .prg__row { grid-template-columns: 22px minmax(0, 1fr) minmax(56px, .7fr) auto; }
  .prg__ic { width: 22px; height: 22px; }
  .prg__ic svg { width: 13px; height: 13px; }
  .pages[lang="ur"] .prg__sn { line-height: 1.75; }
  .pages[lang="ur"] .prg__sv { line-height: 1.75; }
  .prg__drill ~ .prg__legend { display: none; }
  .prg__pg { padding-block: 5px; }
}
/* الجوال الطولي: تبويبان، والضغط على مرحلة يفتح تفاصيلها */
@media (orientation: portrait) and (max-width: 900px) {
  .prg__head .scr__eyebrow, .prg__upd { display: none; }
  .prg__demo { padding: 6px; gap: 6px; border-radius: 18px; }
  .prg__kpis { display: none; }
  .pages[lang="en"] .prg__title { font-size: 1.4rem; }
  .prg__tabs { display: flex; }
  .prg__ptabs { display: none; }
  .prg__panel { grid-template-rows: minmax(0, 1fr); }
  .prg__back { display: inline-block; }
  .prg__body { grid-template-columns: minmax(0, 1fr); }
  .prg__body[data-view="list"] .prg__panel, .prg__body[data-view="panel"] .prg__list { display: none; }
  .prg:has(.prg__body[data-view="panel"]) :is(.prg__head, .prg__kpis) { display: none; }
  .prg__view[data-tab="pages"] .prg__back[data-back="list"] { display: none; }
  .prg__desc { display: none; }
  .prg__dmain { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
  .prg__word { justify-self: center; width: auto; height: 100%; max-width: 100%; }
  .prg__item .prg__meter { display: none; }
  .prg__items { gap: 2px; }
  .prg__juz { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .prg__jz { padding: 2px 5px 5px; gap: 3px; }
  .prg__jt { flex-direction: column; align-items: start; gap: 0; }
  .prg__jt b { font-size: .95rem; line-height: 1.25; }
  .prg__pgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .prg__pg { padding: 6px 2px; }
  .prg__view > .prg__note { display: none; }
}
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px) {
  .prg__lead, .prg__kpis { display: none; }
  .prg__spark, .prg__view.is-list .prg__word, .prg__note, .prg__legend { display: none; }
  .prg__step { font-size: .66rem; }
  .prg__drill { gap: 6px; }
  .prg__pg { padding: 4px 2px; }
  .prg__view[data-tab="pages"]:not(.is-drill) .prg__phead .prg__h { display: none; }
  .prg__pgrid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
  .prg__pg b { font-size: .78rem; }
  .prg__jt span { display: none; }
  .prg__row { padding-block: 1px; }
  .prg__jz { padding: 2px 5px 5px; gap: 3px; }
  .prg__juz { gap: 4px; }
  .prg__jt b { font-size: .92rem; line-height: 1.25; }
}

/* الجوال بالعرض: القائمة في ثلاثة أعمدة، والأجزاء في عشرة */
@media (max-height: 520px) and (orientation: landscape) {
  .prg { gap: 6px; padding-top: 6px; }
  .prg__head { display: none; }
  .prg__tabs { display: flex; padding: 3px; }
  .prg__tabs button { padding: 0 4px; }
  .prg__demo { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 4px 10px; padding: 4px; border-radius: 16px; }
  .prg__dbar { padding: 0 4px; }
  .prg__kpis { display: none; }
  .prg__demo > .prg__body { grid-column: 1 / -1; }
  .prg__ptabs { display: none; }
  .prg__panel { grid-template-rows: minmax(0, 1fr); }
  .prg__back { display: inline-block; }
  .prg__view[data-tab="pages"] .prg__back[data-back="list"] { display: none; }
  .prg__body { grid-template-columns: minmax(0, 1fr); }
  .prg__body[data-view="list"] .prg__panel, .prg__body[data-view="panel"] .prg__list { display: none; }
  .prg__list { grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: center; gap: 4px 8px; padding: 8px; }
  .prg__grp { display: none; }
  .prg__view { padding: 6px 12px; gap: 4px; }
  .prg__desc, .prg__spark, .prg__note, .prg__legend, .prg__who { display: none; }
  .prg__view.is-list .prg__word, .prg__view.is-list .prg__stats > .prg__meter { display: none; }
  .prg__view.is-list .prg__dmain { grid-template-columns: minmax(0, 1fr); }
  .prg__dmain { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: stretch; }
  .prg__word { width: auto; height: 100%; justify-self: center; }
  .prg__big b { font-size: 1.3rem; }
  .prg__items { display: flex; flex-wrap: wrap; gap: 3px 12px; }
  .prg__item { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; line-height: 1.6; }
  .pages[lang="ur"] .prg__item { font-size: .6rem; line-height: 2; }
  .prg__item .prg__meter { display: none; }
  .prg__dhead .prg__h { font-size: .92rem; }
  .prg__jz { padding: 2px 6px 4px; gap: 2px; }
  .prg__jt b { font-size: .95rem; }
  .prg__pg { padding: 4px 2px; }
  /* الجزء المفتوح: الصفحات يمينا، ومراحل الصفحة المختارة بجانبها */
  .prg__drill { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-auto-rows: auto; align-items: start; gap: 6px 14px; }
  .prg__drill > .prg__pgrid { grid-column: 1; grid-row: 1 / span 3; }
  .prg__drill > :not(.prg__pgrid) { grid-column: 2; }
  .prg__drill .prg__back { justify-self: start; }
  .prg__pgrid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
  .prg__phead .prg__h { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) { .prg__bar i, .prg__meter i, .prg__jz, .prg__row { transition: none; } }
/* أزرار شاشة الشكر بعد الغرس: لا تتبع ترتيب أزرار النموذج */
.plantp__done .plantp__actions { grid-column: auto; grid-row: auto; }
.plantp__orglink { display: inline-flex; border-radius: 10px; transition: opacity .2s; }
.plantp__orglink:hover { opacity: .8; }
.plantp__orglink:focus-visible { outline: 2px solid var(--brand-strong, #017c86); outline-offset: 4px; }

/* ===== آخر الرحلة (/supervision): الجهتان المشرفتان على المشروع ===== */
.orgsp { justify-items: center; }
.orgsp__wrap { width: min(100%, 720px); display: grid; justify-items: center; gap: clamp(14px, 3.4vh, 34px); text-align: center; animation: page-fade .6s ease both; }
.orgsp__lead { margin: 0; max-width: 30ch; font-family: var(--font-display); font-weight: var(--w-head); font-size: clamp(1.25rem, 2.6vw, 1.85rem); line-height: 1.7; color: var(--brand-deep); text-wrap: balance; }
.pages[lang="en"] .orgsp__lead { max-width: 34ch; line-height: 1.45; }
.pages[lang="ur"] .orgsp__lead { font-size: clamp(1.05rem, 2.2vw, 1.5rem); line-height: 2.2; }
.orgsp__by { margin: 0; width: min(100%, 420px); display: flex; align-items: center; gap: 14px; color: var(--gilt, #b8913a); font-size: .9rem; font-weight: var(--w-head); }
.orgsp__by::before, .orgsp__by::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor); opacity: .55; }
.orgsp__by::after { transform: scaleX(-1); }
.pages[lang="ur"] .orgsp__by { line-height: 2; font-size: .82rem; }
.orgsp__logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 3vw, 28px); width: min(100%, 600px); }
.orgsp__card { margin: 0; display: grid; place-items: center; aspect-ratio: 5 / 4; padding: clamp(14px, 3vh, 28px); border-radius: 22px; background: color-mix(in srgb, var(--surface, #fff) 82%, transparent); border: 1px solid var(--border); box-shadow: 0 10px 30px -18px rgb(2 77 84 / .35); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.orgsp__card img { max-width: 100%; max-height: 100%; width: auto; height: clamp(90px, 20vh, 190px); object-fit: contain; display: block; }
.orgsp__card--link:hover { transform: translateY(-3px); border-color: var(--gilt, #b8913a); box-shadow: 0 16px 36px -18px rgb(2 77 84 / .45); }
.orgsp__card--link:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 4px; }
@media (max-width: 480px) {
  .orgsp__card { border-radius: 16px; padding: 12px; }
  .orgsp__card img { height: clamp(80px, 16vh, 130px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .orgsp__wrap { gap: 8px; }
  .orgsp__lead { font-size: 1.05rem; line-height: 1.6; max-width: 46ch; }
  .pages[lang="ur"] .orgsp__lead { font-size: .95rem; line-height: 2; }
  .orgsp__logos { width: min(100%, 440px); }
  .orgsp__card { aspect-ratio: auto; padding: 8px; }
  .orgsp__card img { height: 110px; }
}

/* رابط البحث كاملا تحت الغلاف في صفحة «لماذا» */
#why .scr__fig { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(6px, 1.4vh, 14px); }
#why .shot__btn { flex: 0 1 460px; height: auto; min-height: 0; max-height: 460px; }
#why .shot__doc { flex: none; }
.shot__doc a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--brand-strong); font-weight: var(--w-head); font-size: .92rem; line-height: 1.6; text-decoration: none; box-shadow: 0 6px 16px -12px rgb(2 77 84 / .5); transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.shot__doc a:hover { border-color: var(--brand-strong); background: var(--brand-wash, #eef8f9); transform: translateY(-1px); }
.shot__doc a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.shot__doc svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shot__doc small { font-size: .68rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); border-inline-start: 1px solid var(--border); padding-inline-start: 8px; font-family: var(--font-en, inherit); }
.pages[lang="ur"] .shot__doc a { font-size: .82rem; line-height: 2; padding-block: 3px 6px; }
@media (max-height: 520px) and (orientation: landscape) { .shot__doc a { padding: 2px 12px; font-size: .8rem; } }
@media (orientation: portrait) and (max-width: 900px) { .shot__doc a { padding-block: 4px; font-size: .84rem; } }
.orgsp__wa { display: inline-flex; align-items: center; gap: 10px; padding: 8px 20px 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface, #fff) 85%, transparent); color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.6; box-shadow: 0 8px 20px -14px rgb(2 77 84 / .45); transition: border-color .2s ease, transform .2s ease; }
.orgsp__wa:hover { border-color: #25d366; transform: translateY(-1px); }
.orgsp__wa:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 3px; }
.orgsp__wa svg { width: 22px; height: 22px; flex: none; fill: #25d366; }
.orgsp__wa span { color: var(--muted); font-weight: var(--w-head); }
.orgsp__wa bdi { font-family: var(--font-en, inherit); font-weight: 600; color: var(--brand-deep); letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pages[lang="ur"] .orgsp__wa { font-size: .85rem; line-height: 2; padding-block: 4px 7px; }
@media (max-height: 520px) and (orientation: landscape) { .orgsp__wa { padding: 3px 14px; font-size: .82rem; } .orgsp__wa svg { width: 18px; height: 18px; } }
.orgsp__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: clamp(0px, 1vh, 8px); }
/* سطر الفاتورة تحت زر «اغرس مساهمتك» */
.calc__receipt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; }
.calc__wa { display: inline-flex; align-items: center; gap: 6px; padding: 1px 12px 1px 10px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--brand-deep); text-decoration: none; font-weight: 600; transition: border-color .2s ease; }
.calc__wa:hover { border-color: #25d366; }
.calc__wa:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 2px; }
.calc__wa-ic { width: 16px; height: 16px; flex: none; fill: #25d366; }
.calc__wa bdi { font-family: var(--font-en, inherit); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ===== صفحة المساهمة (/contribute): الشرح والخطوات في جانب، وبطاقة الدفع في الجانب الآخر ===== */
.payp { grid-template-rows: minmax(0, 1fr) auto; gap: clamp(8px, 2vh, 18px); padding-top: clamp(10px, 3vh, 28px); }
.payp__wrap { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 64px); align-items: center; animation: page-fade .6s ease both; }
.payp__intro { display: grid; gap: clamp(8px, 1.6vh, 14px); align-content: center; }
.payp__title { margin: 0; color: var(--brand-deep); font-family: var(--font-display); font-weight: var(--w-head); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.45; text-wrap: balance; }
.pages[lang="en"] .payp__title { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.7rem); line-height: 1.2; }
.pages[lang="ur"] .payp__title { font-size: clamp(1.25rem, 1rem + 1.1vw, 1.95rem); line-height: 2.1; }
.payp__lead { margin: 0; color: var(--lead, var(--muted)); font-size: clamp(.95rem, .9rem + .3vw, 1.1rem); line-height: 1.9; text-wrap: pretty; max-width: 46ch; }
.pages[lang="en"] .payp__lead { font-size: clamp(1.02rem, 1rem + .3vw, 1.2rem); line-height: 1.5; }
.pages[lang="ur"] .payp__lead { font-size: clamp(.86rem, .82rem + .25vw, 1rem); line-height: 2.25; }

/* الخطوات الثلاث: أرقام في دوائر يصلها خط */
.payp__steps { list-style: none; margin: clamp(2px, 1vh, 10px) 0 0; padding: 0; display: grid; gap: clamp(6px, 1.4vh, 12px); position: relative; }
.payp__steps::before { content: ''; position: absolute; inset-block: 18px; inset-inline-start: 17px; width: 1px; background: linear-gradient(var(--gilt), color-mix(in srgb, var(--gilt) 20%, transparent)); }
.payp__steps li { display: flex; align-items: center; gap: 14px; position: relative; }
.payp__steps b { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid color-mix(in srgb, var(--gilt) 60%, transparent); color: #8a6a24; font-weight: var(--w-head); font-size: .95rem; box-shadow: 0 4px 12px -8px rgb(138 106 36 / .6); }
.payp__steps li > span { display: grid; line-height: 1.5; }
.payp__steps strong { color: var(--brand-deep); font-weight: var(--w-head); font-size: 1rem; }
.payp__steps small { color: var(--muted); font-size: .84rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pages[lang="ur"] .payp__steps strong { font-size: .9rem; line-height: 2; }
.pages[lang="ur"] .payp__steps small { font-size: .76rem; line-height: 2; }
.payp__wa { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px 0 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--brand-deep); text-decoration: none; font-weight: 600; line-height: 1.7; transition: border-color .2s ease; }
.payp__wa:hover { border-color: #25d366; }
.payp__wa:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 2px; }
.payp__wa svg { width: 15px; height: 15px; fill: #25d366; flex: none; }
.payp__wa bdi { font-family: var(--font-en, inherit); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .82rem; }

/* بطاقة الدفع: ورق كريمي بإطار ذهبي رفيع وزخرفة هندسية خفيفة في الزاويتين */
.payp__card {
  position: relative; overflow: hidden; isolation: isolate; justify-self: center; width: min(100%, 440px);
  display: grid; justify-items: center; text-align: center; gap: clamp(4px, 1vh, 10px);
  padding: clamp(18px, 3.4vh, 34px) clamp(18px, 3vw, 34px);
  border-radius: 26px; border: 1px solid color-mix(in srgb, var(--gilt) 45%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 96%, #f6ecd4) 0%, color-mix(in srgb, var(--surface) 88%, #f1e3bf) 100%);
  box-shadow: 0 1px 0 rgb(255 255 255 / .6) inset, 0 30px 60px -36px rgb(2 77 84 / .55), 0 10px 24px -18px rgb(138 106 36 / .45);
}
.payp__card::after { content: ''; position: absolute; inset: 8px; border-radius: 19px; border: 1px solid color-mix(in srgb, var(--gilt) 22%, transparent); pointer-events: none; z-index: -1; }
.payp__orn { position: absolute; width: 170px; height: 170px; z-index: -1; opacity: .28; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23b8913a' stroke-width='.8'%3E%3Crect x='25' y='25' width='50' height='50'/%3E%3Crect x='25' y='25' width='50' height='50' transform='rotate(45 50 50)'/%3E%3Ccircle cx='50' cy='50' r='14'/%3E%3Crect x='5' y='5' width='90' height='90' opacity='.5'/%3E%3Crect x='5' y='5' width='90' height='90' transform='rotate(45 50 50)' opacity='.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.payp__orn--a { inset-block-start: -85px; inset-inline-end: -85px; }
.payp__orn--b { inset-block-end: -85px; inset-inline-start: -85px; }
.payp__chosen { margin: 0; font-size: .8rem; font-weight: var(--w-head); color: var(--brand-strong); background: var(--brand-wash); border: 1px solid var(--border); border-radius: 999px; padding: 2px 14px; line-height: 1.7; }
.payp__label { margin: 0; font-size: .85rem; font-weight: var(--w-head); color: #8a6a24; letter-spacing: .02em; }
.payp__price { margin: 0; display: grid; justify-items: center; line-height: 1.2; }
.payp__gbp { font-family: var(--font-display); font-weight: var(--w-head); color: var(--brand-deep); font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); line-height: 1.3; font-variant-numeric: tabular-nums; }
.payp__price::after { content: ''; width: 56px; height: 1px; margin-top: clamp(6px, 1.2vh, 12px); background: linear-gradient(90deg, transparent, var(--gilt), transparent); }
.payp__cost { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.6; max-width: 40ch; }
.pages[lang="ur"] .payp__label { line-height: 2; font-size: .8rem; }
.pages[lang="ur"] .payp__cost { font-size: .72rem; line-height: 2; }
.payp__raised { width: 100%; display: grid; gap: 4px; }
.payp__raised[hidden] { display: none; }
.payp__meter { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--gilt) 14%, transparent); overflow: hidden; }
.payp__meter i { display: block; height: 100%; width: 0; min-width: 4px; background: linear-gradient(90deg, var(--gilt), #d4b46a); border-radius: inherit; transition: width .8s var(--ease-out, ease); }
.payp__raised span { font-size: .76rem; color: #8a6a24; font-weight: var(--w-head); line-height: 1.5; }
.payp__go { width: 100%; margin-top: clamp(4px, 1.2vh, 12px); padding-block: 12px; font-size: 1.08rem; border-radius: 16px; background: linear-gradient(180deg, #9a7a30, #7d5f1f); box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset, 0 14px 28px -14px rgb(125 95 31 / .9); }
.payp__go:hover { background: linear-gradient(180deg, #8a6a24, #6a4f16); transform: translateY(-2px); }
.payp__go .payp__ext { width: 16px; height: 16px; opacity: .75; }
.pages[lang="ur"] .payp__go { font-size: .92rem; line-height: 2; padding-block: 8px 10px; }
.payp__secure { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--muted); line-height: 1.6; }
.payp__secure svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--brand-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pages[lang="ur"] .payp__secure { font-size: .68rem; line-height: 2; }
.payp__foot { display: flex; justify-content: flex-end; gap: 10px; }
.payp__foot a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.pages[lang="ur"] .payp__eurbig { line-height: 1.7; }

/* جوال أو جهاز لوحي قائم: البطاقة أولا ثم الخطوات، والشرح مختصر */
@media (orientation: portrait) and (max-width: 900px) {
  .payp { padding-top: 6px; gap: 10px; }
  .payp__wrap { grid-template-columns: minmax(0, 1fr); gap: clamp(10px, 2.2vh, 20px); align-content: center; }
  .payp__intro { gap: 6px; text-align: center; justify-items: center; }
  .payp__lead { display: none; }
  .payp__title { font-size: clamp(1.25rem, 4vw + .3rem, 1.8rem); }
  .pages[lang="en"] .payp__title { font-size: clamp(1.4rem, 4.4vw + .3rem, 2rem); }
  .pages[lang="ur"] .payp__title { font-size: clamp(1rem, 3.4vw + .25rem, 1.5rem); line-height: 2; }
  .payp__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; width: 100%; }
  .payp__steps::before { inset-block: 17px auto; inset-inline: 16%; width: auto; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--gilt) 30%, transparent), var(--gilt), color-mix(in srgb, var(--gilt) 30%, transparent)); }
  .payp__steps li { flex-direction: column; gap: 4px; text-align: center; }
  .payp__steps li > span { justify-items: center; }
  .payp__steps strong { font-size: .85rem; }
  .payp__steps small { font-size: .72rem; justify-content: center; line-height: 1.4; }
  .pages[lang="ur"] .payp__steps strong { font-size: .76rem; line-height: 1.9; }
  .pages[lang="ur"] .payp__steps small { font-size: .64rem; line-height: 1.8; }
  .payp__side { order: -1; }
  .payp__card { padding: 14px 18px; border-radius: 22px; }
  .payp__foot .btn-ghost, .payp__foot .btn-primary { flex: 1; }
}
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px) {
  .payp__cost, .payp__secure { display: none; }
  .payp__eurbig { font-size: 1.8rem; }
  .payp__go { padding-block: 9px; }
  .payp__steps small .payp__wa bdi { font-size: .7rem; }
}
/* جوال مقلوب بالعرض */
@media (max-height: 520px) and (orientation: landscape) {
  .payp { padding-top: 4px; gap: 4px; }
  .payp__wrap { gap: 24px; }
  .payp__intro { gap: 4px; }
  .payp__title { font-size: 1.2rem; line-height: 1.4; }
  .pages[lang="ur"] .payp__title { font-size: 1rem; line-height: 1.9; }
  .payp__lead { display: none; }
  .payp__steps { gap: 4px; }
  .payp__steps b { width: 28px; height: 28px; font-size: .8rem; }
  .payp__steps::before { inset-inline-start: 13.5px; inset-block: 14px; }
  .payp__steps strong { font-size: .85rem; }
  .payp__steps small { font-size: .72rem; }
  .pages[lang="ur"] .payp__steps strong { font-size: .76rem; line-height: 1.8; }
  .pages[lang="ur"] .payp__steps small { font-size: .64rem; line-height: 1.7; }
  .payp__card { padding: 10px 18px; gap: 2px; border-radius: 18px; }
  .payp__card::after { inset: 5px; border-radius: 14px; }
  .payp__eurbig { font-size: 1.5rem; }
  .payp__cost, .payp__secure, .payp__price::after { display: none; }
  .payp__go { padding-block: 6px; font-size: .95rem; margin-top: 2px; }
  .pages[lang="ur"] .payp__go { padding-block: 3px 5px; font-size: .82rem; }
}

/* المساهمة: رابط الحاسبة فوق البطاقة، واختيار الآيات أو الصفحات وعددها داخلها */
.payp__side { display: grid; justify-items: center; gap: clamp(8px, 1.6vh, 14px); min-width: 0; }
.payp__calc { display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--brand-strong); font-weight: var(--w-head); font-size: .9rem; line-height: 1.7; text-decoration: none; box-shadow: 0 6px 16px -12px rgb(2 77 84 / .5); transition: border-color .2s ease, transform .2s ease; }
.payp__calc:hover { border-color: var(--brand-strong); transform: translateY(-1px); }
.payp__calc svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pages[lang="ur"] .payp__calc { font-size: .8rem; line-height: 2.1; padding-block: 3px 6px; }
.payp__pick { border: 0; margin: 0; padding: 0; min-width: 0; width: 100%; display: grid; justify-items: center; gap: 8px; }
.payp__pick legend { padding: 0; margin: 0 auto 8px; }
.payp__units { display: inline-flex; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--gilt) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gilt) 30%, transparent); }
.payp__units label { position: relative; cursor: pointer; }
.payp__units input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.payp__units span { display: block; padding: 3px 20px; border-radius: 999px; font-weight: var(--w-head); font-size: .9rem; color: #8a6a24; line-height: 1.7; transition: background .2s ease, color .2s ease; }
.payp__units input:checked + span { background: var(--surface); color: var(--brand-deep); box-shadow: 0 2px 8px -4px rgb(138 106 36 / .6); }
.payp__units input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.pages[lang="ur"] .payp__units span { font-size: .8rem; line-height: 2; }
.payp__count { display: inline-grid; grid-template-columns: 38px 88px 38px; align-items: center; gap: 6px; }
.payp__step { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--brand-strong); font: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; transition: border-color .2s ease; }
.payp__step:hover { border-color: var(--brand-strong); }
.payp__count input { width: 100%; text-align: center; font: inherit; font-family: var(--font-en, inherit); font-weight: 600; font-size: 1.15rem; color: var(--brand-deep); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 6px; font-variant-numeric: tabular-nums; }
.payp__count input:focus { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 3px var(--brand-soft, #d9f1f3); }
.payp__eurbig { font-family: var(--font-display); font-weight: var(--w-head); color: var(--brand-deep); font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.35; font-variant-numeric: tabular-nums; }
.payp__gbp { font-size: .88rem; color: var(--muted); font-weight: var(--w-head); }
.pages[lang="ur"] .payp__gbp { font-size: .78rem; line-height: 2; }
.payp__copied { margin: 0; font-size: .78rem; line-height: 1.6; color: #8a6a24; font-weight: var(--w-head); max-width: 36ch; }
.payp__copied.is-done { color: var(--brand-strong); }
.pages[lang="ur"] .payp__copied { font-size: .7rem; line-height: 2; }
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px) {
  .payp__pick { gap: 4px; }
  .payp__pick legend { margin-bottom: 4px; }
  .payp__step { width: 32px; height: 32px; }
  .payp__count { grid-template-columns: 32px 76px 32px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .payp__side { gap: 4px; }
  .payp__calc { padding: 1px 12px; font-size: .78rem; }
  .payp__pick { gap: 3px; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 10px; }
  .payp__pick legend { display: none; }
  .payp__step { width: 28px; height: 28px; font-size: 1rem; }
  .payp__count { grid-template-columns: 28px 64px 28px; gap: 4px; }
  .payp__count input { padding: 1px 4px; font-size: 1rem; }
  .payp__units span { padding: 1px 14px; font-size: .8rem; }
  .payp__copied { font-size: .7rem; line-height: 1.4; }
}
/* شاشات قصيرة: يبقى المبلغ باليورو كبيرا، وتختفي الزيادات. سطر النسخ يظهر بعد الضغط على الدفع */
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px) {
  #contribute .payp__intro > .scr__eyebrow, .payp__pick legend, .payp__gbp, .payp__price::after { display: none; }
  .payp__copied:not(.is-done) { display: none; }
  .payp__card { gap: 6px; padding-block: 12px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .payp__gbp { display: none; }
  .payp__copied:not(.is-done) { display: none; }
}
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px) { .pages[lang="ur"] .payp__card { gap: 3px; } .pages[lang="ur"] .payp__copied { line-height: 1.7; } }
/* المساهمة: أربع وحدات، والسورة أو المبلغ، والتوزيع، والإهداء */
.payp__units { flex-wrap: wrap; justify-content: center; }
.payp__units span { padding-inline: 14px; }
.payp__surah, .payp__amount { width: min(100%, 300px); }
.payp__surah { font: inherit; font-size: .92rem; color: var(--brand-deep); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 7px 12px; }
.payp__amount { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; }
.payp__amount:focus-within, .payp__surah:focus { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 3px var(--brand-soft, #d9f1f3); }
.payp__amount input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-family: var(--font-en, inherit); font-weight: 600; font-size: 1.15rem; color: var(--brand-deep); text-align: center; padding: 5px 0; outline: none; direction: ltr; }
.payp__amount span { color: var(--muted); font-weight: var(--w-head); font-size: .88rem; }
.payp__pick [hidden] { display: none !important; }
.payp__split { width: 100%; display: grid; gap: 4px; justify-items: center; }
.payp__bar { height: 6px; }
.payp__split span { font-size: .72rem; color: var(--muted); line-height: 1.5; }
.pages[lang="ur"] .payp__split span { font-size: .66rem; line-height: 1.9; }
.payp__ruh { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink); cursor: pointer; line-height: 1.6; }
.payp__ruh input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand-strong); }
.pages[lang="ur"] .payp__ruh { font-size: .76rem; line-height: 2; }
.payp__ruhname { width: min(100%, 300px); font: inherit; font-size: .9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px 12px; text-align: center; }
.payp__ruhname:focus { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 3px var(--brand-soft, #d9f1f3); }
.payp__ruhname[hidden] { display: none; }
.payp__go.is-off { opacity: .55; filter: saturate(.6); }
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px) {
  .payp__split span, .payp__cost { display: none; }
  .payp__units span { padding-inline: 10px; font-size: .82rem; }
  .payp__surah { padding-block: 5px; font-size: .85rem; }
  .payp__amount input { padding-block: 2px; }
  .payp__ruhname { padding-block: 4px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .payp__split span { display: none; }
  .payp__pick { grid-template-columns: minmax(0, 1fr); }
  .payp__surah { padding-block: 3px; font-size: .82rem; }
  .payp__amount input { padding-block: 0; font-size: 1rem; }
  .payp__ruh { font-size: .76rem; line-height: 1.4; }
  .payp__ruhname { padding-block: 2px; font-size: .82rem; }
}
/* الإهداء: الاسم بجانب الخيار في سطر واحد */
.payp__ruhrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; width: 100%; }
.payp__ruhrow .payp__ruhname { flex: 1 1 150px; width: auto; max-width: 220px; }
/* شاشات متوسطة الارتفاع: يختفي سعر الوحدة وعنوان الاختيار، ويبقى الحساب كاملا */
@media (min-width: 901px) and (max-height: 780px), (orientation: portrait) and (max-width: 900px) and (max-height: 900px) {
  .payp__cost, .payp__pick legend, .payp__price::after { display: none; }
  .payp__card { gap: 6px; }
  .pages[lang="ur"] .payp__card { gap: 3px; }
  .pages[lang="ur"] .payp__copied, .pages[lang="ur"] .payp__gbp { line-height: 1.75; }
}
@media (orientation: portrait) and (max-width: 900px) and (max-height: 900px) {
  .payp__secure { display: none; }
  #contribute .payp__intro > .scr__eyebrow { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .payp__split, .payp__raised { display: none; }
  .pages[lang="ur"] .payp__card { padding-block: 6px; }
  .pages[lang="ur"] .payp__ruh { line-height: 1.6; }
}
/* عند تفعيل الإهداء في الشاشات القصيرة: تختفي المقدمة لتتسع البطاقة */
@media (orientation: portrait) and (max-height: 700px), (max-height: 520px) and (orientation: landscape) {
  #contribute:has(input[name=ruh]:checked) .payp__lead { display: none; }
}
@media (max-width: 420px), (max-height: 520px) and (orientation: landscape) {
  .payp__ruhrow { flex-wrap: nowrap; }
  .payp__ruhrow .payp__ruh { flex: 0 1 auto; font-size: .82rem; line-height: 1.35; }
  .payp__ruhrow .payp__ruhname { flex: 1 1 0; min-width: 0; padding-block: 4px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .pages[lang="ur"] .payp__card { gap: 2px; }
  .pages[lang="ur"] .payp__copied { font-size: .78rem; line-height: 1.6; margin: 0; }
}
@media (max-height: 520px) and (orientation: landscape) { .pages[lang="ur"] .payp__card { padding-block: 3px; } }
/* عناوين الشعب الأردية الطويلة تلتف على سطرين في الجوال بدل أن تخرج من البطاقة */
@media (max-width: 520px), (max-height: 520px) and (orientation: landscape) {
  .pages[lang="ur"] .unit__title { white-space: normal; line-height: 1.75; }
}
/* خطوات المساهمة بالأردية في الجوال: أسطر متوازنة بلا كلمة يتيمة، ورقم واتساب داخل عموده */
@media (orientation: portrait) and (max-width: 900px) {
  .pages[lang="ur"] .payp__steps li > span { max-width: 100%; }
  .pages[lang="ur"] .payp__steps strong, .pages[lang="ur"] .payp__steps small { text-wrap: balance; }
  .pages[lang="ur"] .payp__steps strong { font-size: .7rem; line-height: 1.95; }
  .pages[lang="ur"] .payp__steps small { font-size: .6rem; }
  .pages[lang="ur"] .payp__steps small .payp__wa { max-width: 100%; padding-inline: 6px; gap: 3px; }
  .pages[lang="ur"] .payp__steps small .payp__wa bdi { font-size: .6rem; }
  .pages[lang="ur"] .payp__steps small .payp__wa svg { width: 12px; height: 12px; }
}
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px) {
  .pages[lang="ur"] .payp__steps strong { line-height: 1.75; }
  .pages[lang="ur"] .payp__steps small { line-height: 1.65; }
}
/* نافذة الأجهزة: لا تتجاوز عرض الشاشة، وفي الجوال تسحب الأجهزة الكبيرة لرؤية بقيتها */
.mview[open] { grid-template-columns: minmax(0, 1fr); }
.mview__stage.is-pan { place-items: start; overflow: auto; direction: ltr; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.mview__stage.is-pan .mview__fit { margin: auto; }
