/* ======================================================================
   بناة فلسطين — نظام التصميم المشترك (px-)
   مكوّنات مستخرجة من الرئيسية لتتكلّم بها الصفحات الداخلية اللغة نفسها.
   يُحمَّل في كل صفحة بعد pages.css (عبر build.mjs)، وسلوكه في js/system.js.
   الدليل: tools/COMPONENTS.md · العرض الحي: system.html
     .px-hero (+ --short / --cream) · .px-marquee · .px-bricks · .px-story
     .px-giant · .px-close · .px-stat-row
   القواعد: المحتوى ظاهر بلا JS، لا حركة تُخفي شيئًا أكثر من ثانية، وتقليل الحركة محترم.
   ====================================================================== */
:root {
  --px-mega: clamp(46px, calc(18px + 5.6vw), 104px);
  --px-hero-h: clamp(40px, calc(16px + 4.6vw), 92px);
  --px-giant: clamp(80px, calc(30px + 8vw), 156px);
  --px-poster: clamp(40px, calc(16px + 3.2vw), 68px);
  --px-ink: #17110f;
  --px-red-d: #a11d26;
  --px-sand-2: #e3d8c2;
  --px-paper: #fbf8f1;
  --px-muted: #6d625a;
  --px-line: rgba(23, 17, 15, .14);
  --px-sh-3: 0 30px 60px -24px rgba(23, 17, 15, .45);
  --px-ease: cubic-bezier(.2, .8, .1, 1);
  --px-band: url("../assets/tatreez/hero-cloth.svg");
  /* نجمة التطريز 9×9 بأربعة ألوان */
  --px-star-cream: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' fill='%23f6efe2'%3E%3Cpath d='M4 0h1v1H4zM3 1h3v1H3zM2 2h2v1H2zm3 0h2v1H5zM1 3h2v1H1zm3 0h1v1H4zm2 0h2v1H6zM0 4h2v1H0zm3 0h3v1H3zm4 0h2v1H7zM1 5h2v1H1zm3 0h1v1H4zm2 0h2v1H6zM2 6h2v1H2zm3 0h2v1H5zM3 7h3v1H3zM4 8h1v1H4z'/%3E%3C/svg%3E");
  --px-star-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' fill='%23c4252f'%3E%3Cpath d='M4 0h1v1H4zM3 1h3v1H3zM2 2h2v1H2zm3 0h2v1H5zM1 3h2v1H1zm3 0h1v1H4zm2 0h2v1H6zM0 4h2v1H0zm3 0h3v1H3zm4 0h2v1H7zM1 5h2v1H1zm3 0h1v1H4zm2 0h2v1H6zM2 6h2v1H2zm3 0h2v1H5zM3 7h3v1H3zM4 8h1v1H4z'/%3E%3C/svg%3E");
  --px-star-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' fill='%2317110f'%3E%3Cpath d='M4 0h1v1H4zM3 1h3v1H3zM2 2h2v1H2zm3 0h2v1H5zM1 3h2v1H1zm3 0h1v1H4zm2 0h2v1H6zM0 4h2v1H0zm3 0h3v1H3zm4 0h2v1H7zM1 5h2v1H1zm3 0h1v1H4zm2 0h2v1H6zM2 6h2v1H2zm3 0h2v1H5zM3 7h3v1H3zM4 8h1v1H4z'/%3E%3C/svg%3E");
  --px-star-olive: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' fill='%23c9d29c'%3E%3Cpath d='M4 0h1v1H4zM3 1h3v1H3zM2 2h2v1H2zm3 0h2v1H5zM1 3h2v1H1zm3 0h1v1H4zm2 0h2v1H6zM0 4h2v1H0zm3 0h3v1H3zm4 0h2v1H7zM1 5h2v1H1zm3 0h1v1H4zm2 0h2v1H6zM2 6h2v1H2zm3 0h2v1H5zM3 7h3v1H3zM4 8h1v1H4z'/%3E%3C/svg%3E");
}

/* ———— لبنات صغيرة مشتركة ———— */
.px-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 700 var(--fs-small, 14px)/1.4 var(--display); color: var(--ink); }
.px-eyebrow::before { content: ""; width: 12px; height: 12px; background: var(--red); flex: none; }
.px-eyebrow--light { color: #fff; }
.px-eyebrow--olive::before { background: var(--olive); }
.px-credit { position: absolute; z-index: 3; inset-inline-start: 16px; bottom: 12px; margin: 0; font: 500 11px/1.4 var(--text); color: rgba(255, 255, 255, .78); text-shadow: 0 1px 4px rgba(0, 0, 0, .6); direction: ltr; pointer-events: none; }
/* النبضة: حلقة ::after بـ transform/opacity (على المركّب) بدل box-shadow الذي يُعاد رسمه كل إطار */
.px-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.px-live::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--px-ring, rgba(196, 37, 47, .55)); animation: pxPing 1.8s infinite; }
@keyframes pxPing { 0% { transform: scale(1); opacity: 1; } 80%, 100% { transform: scale(3); opacity: 0; } }
/* الحركة الدائمة تتوقف خارج الشاشة (.px-off من js/system.js) وحين يُخفى التبويب */
.px-off, .px-off *, .px-off::before, .px-off::after, .px-off *::before, .px-off *::after,
.px-tab-hidden *, .px-tab-hidden *::before, .px-tab-hidden *::after { animation-play-state: paused !important; }
.px-bar { height: 8px; border-radius: 99px; background: rgba(23, 17, 15, .1); overflow: hidden; }
.px-bar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: var(--red); }
.px-btn-glass { color: #fff; background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.px-btn-glass:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* العنوان الحركي: كلمة كلمة من تحت. لا clip-path (نقطتا الياء تبقيان)، إزاحة صغيرة وشفافية فقط.
   CSS بحت، ويكتمل خلال ~1.1 ثانية مهما طال العنوان (التأخير مسقوف). */
.px-ln { display: block; }
.px-w { display: inline-block; vertical-align: top; padding-bottom: .12em; }
.px-w > span { display: inline-block; animation: pxRise .8s var(--px-ease) both; animation-delay: calc(min(var(--i, 0) * 70ms, 420ms) + 60ms); }
@keyframes pxRise { from { transform: translateY(.45em); opacity: 0; } }
.px-brick { display: inline-block; width: .18em; height: .18em; background: var(--red); margin-inline-start: .08em; vertical-align: .05em; animation: pxBrick .5s cubic-bezier(.3, 1.6, .5, 1) .62s both; }
@keyframes pxBrick { from { transform: translateY(-1.4em) scale(.4); } }

/* ======================================================================
   1. .px-hero — رأس الصفحة الداخلية السينمائي
   ====================================================================== */
.px-hero { position: relative; isolation: isolate; display: flex; overflow: hidden; color: #fff; background: var(--px-ink);
  min-height: clamp(560px, calc(86svh - 44px), 860px); border-radius: 0 0 var(--field-r, 40px) var(--field-r, 40px); }
main > .px-hero:first-child, main > :is(style, script, link):first-child + .px-hero { margin-top: calc(-1 * var(--nav-total, 76px)); margin-inline: 0; border-radius: 0 0 var(--field-r, 40px) var(--field-r, 40px); }
/* رأس قصير وسط الصفحة (لا تحت الشريط): حقل مستدير بهامش */
main > .px-hero:not(:first-child, :is(style, script, link):first-child + *) { margin: 12px; border-radius: var(--field-r, 40px); }
main > .px-hero:not(:first-child, :is(style, script, link):first-child + *) .px-hero__in { padding-top: clamp(44px, 6vw, 88px); }
.px-hero__ph { position: absolute; inset: 0; margin: 0; z-index: -1; }
.px-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(1.06); filter: saturate(.88) contrast(1.06) brightness(.94) sepia(.04); animation: pxKen 22s var(--ease, ease) both; }
@keyframes pxKen { from { transform: scale(1.13); } to { transform: scale(1.06); } }
.px-hero__ph::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(270deg, rgba(23, 17, 15, .9) 0%, rgba(23, 17, 15, .72) 36%, rgba(23, 17, 15, .2) 66%, rgba(23, 17, 15, .05) 82%),
              linear-gradient(0deg, rgba(23, 17, 15, .75) 0%, rgba(23, 17, 15, 0) 40%),
              linear-gradient(180deg, rgba(23, 17, 15, .55) 0%, rgba(23, 17, 15, 0) 26%); }
.px-hero .px-credit { bottom: calc(clamp(34px, 3.4vw, 48px) + 10px); }
.px-hero__in { position: relative; z-index: 1; width: 100%; max-width: 1360px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 40px;
  padding: calc(var(--nav-total, 76px) + clamp(40px, 6vh, 72px)) clamp(20px, 3vw, 40px) calc(clamp(34px, 3.4vw, 48px) + clamp(36px, 5vh, 60px)); }
.px-hero:has(.px-hero__card) .px-hero__in { grid-template-columns: minmax(0, 1fr) 300px; }
.px-hero__copy { display: grid; justify-items: start; min-width: 0; }
.px-hero__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 18px; font: 500 var(--fs-micro, 13px)/1.5 var(--text); color: rgba(255, 255, 255, .78); }
.px-hero__crumbs a { padding-block: 12px; margin-block: -12px; }
.px-hero__crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.px-hero__crumbs [aria-hidden] { opacity: .55; }
.px-hero__crumbs [aria-current] { color: #fff; font-weight: 600; }
.px-hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 700 var(--fs-small, 14px)/1.4 var(--display); color: #fff; }
.px-hero__eyebrow::before { content: ""; width: 12px; height: 12px; background: var(--red); flex: none; }
.px-hero__h { margin: 0; max-width: 15em; font: 800 var(--px-hero-h)/1.22 var(--display); letter-spacing: -.012em; color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); text-wrap: balance; }
.px-hero__lead { margin: 16px 0 0; max-width: 34em; font-size: var(--fs-lead, 18px); line-height: 1.7; color: rgba(255, 255, 255, .88); }
.px-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.px-hero__band { position: absolute; z-index: 0; inset-inline: 0; bottom: 0; height: clamp(34px, 3.4vw, 48px); pointer-events: none;
  background: var(--px-band) center bottom / auto 100% repeat-x; -webkit-mask: linear-gradient(to bottom, transparent, #000 60%); mask: linear-gradient(to bottom, transparent, #000 60%); }
/* بطاقة الرقم العائمة (اختيارية) */
.px-hero__card { align-self: end; width: 300px; padding: 16px 18px; color: var(--ink); background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 18px; box-shadow: var(--px-sh-3); animation: pxFloat 9s ease-in-out infinite; }
@keyframes pxFloat { 50% { transform: translateY(-8px); } }
.px-hero__card-k { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 700 12px/1.4 var(--text); color: var(--px-muted); }
.px-hero__card-n { display: block; margin: 0; font: 800 clamp(40px, 3.6vw, 56px)/1.1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.px-hero__card-t { margin: 4px 0 0; font-size: var(--fs-small, 14px); line-height: 1.6; color: var(--ink-2); }
.px-hero__card .px-bar { margin-top: 12px; }

/* الرأس القصير لصفحات الخدمة (الأسئلة، الخصوصية، الشروط، التواصل): بلا صورة */
.px-hero--short { min-height: 0; }
.px-hero--short .px-hero__in { padding-top: calc(var(--nav-total, 76px) + clamp(44px, 6vw, 96px)); padding-bottom: calc(clamp(34px, 3.4vw, 48px) + clamp(40px, 5vw, 72px)); }
.px-hero--short .px-hero__h { font-size: clamp(40px, calc(18px + 4vw), 84px); max-width: 14em; }
.px-hero--short::before { content: ""; position: absolute; z-index: 0; top: 50%; inset-inline-end: clamp(-120px, -4vw, -20px); width: clamp(180px, 26vw, 380px); aspect-ratio: 1; translate: 0 -50%; background: var(--px-star-red) center/contain no-repeat; opacity: .14; pointer-events: none; }
.px-hero--cream { background: var(--cream); color: var(--ink); }
.px-hero--cream .px-hero__h { color: var(--ink); text-shadow: none; }
.px-hero--cream .px-hero__eyebrow { color: var(--ink); }
.px-hero--cream .px-hero__lead { color: var(--ink-2); }
.px-hero--cream .px-hero__crumbs { color: var(--ink-2); }
.px-hero--cream .px-hero__crumbs a:hover, .px-hero--cream .px-hero__crumbs [aria-current] { color: var(--ink); }
.px-hero--cream .px-hero__band { -webkit-mask: none; mask: none; }
.px-hero--cream::before { opacity: .12; }

/* ======================================================================
   2. .px-marquee — الشريط الأحمر المتحرّك
   ====================================================================== */
.px-marquee { --px-marquee-dur: 60s; display: flex; align-items: stretch; margin: 14px 12px 0; background: var(--red); color: var(--cream); border-radius: 999px; overflow: hidden; min-height: 76px; }
.px-marquee__k { flex: none; display: flex; align-items: center; gap: 10px; margin: 0; padding-inline: 26px 22px; background: var(--px-ink); font: 800 16px var(--display); color: #fff; position: relative; z-index: 1; }
.px-marquee__k .px-live { --px-ring: rgba(255, 255, 255, .5); background: #ff5a62; }
.px-marquee__k small { font: 600 11px var(--text); color: rgba(255, 255, 255, .62); }
.px-marquee__vp { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.px-marquee__track { display: flex; align-items: center; gap: 28px; width: max-content; padding-inline: 28px; animation: pxMarq var(--px-marquee-dur) linear infinite; }
.px-marquee:hover .px-marquee__track, .px-marquee:focus-within .px-marquee__track { animation-play-state: paused; }
@keyframes pxMarq { to { transform: translateX(50%); } }
[dir="ltr"] .px-marquee__track { animation-name: pxMarqL; }
@keyframes pxMarqL { to { transform: translateX(-50%); } }
.px-marquee__item { display: inline-flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.px-marquee__item b { font: 800 clamp(24px, 2.4vw, 36px)/1.3 var(--display); color: #fff; }
.px-marquee__item span, .px-marquee__item small { font: 500 14px var(--text); color: var(--cream); } /* كريمي صريح على الأحمر: 5:1 (الشفافية كانت تُنزله إلى 4.2) */
.px-marquee__item bdi { font-weight: 700; color: #fff; }
.px-marquee__star { width: 26px; height: 26px; flex: none; background: var(--px-star-cream) center/contain no-repeat; opacity: .9; }

/* ======================================================================
   3. .px-bricks — جدار الطوب (يولّده system.js من data-total / data-filled)
   ====================================================================== */
.px-bricks { --cols: 50; --cols-m: 25; --cols-s: 20; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 3px; }
.px-bricks b { display: block; aspect-ratio: 2.1 / 1; background: var(--px-sand-2); border-radius: 1px; }
.px-bricks b.on { background: var(--red); }
.px-bricks b.half { background: linear-gradient(to left, var(--red) 0 var(--f, 66%), var(--px-sand-2) var(--f, 66%)); }
[dir="ltr"] .px-bricks b.half { background: linear-gradient(to right, var(--red) 0 var(--f, 66%), var(--px-sand-2) var(--f, 66%)); }
.px-bricks.is-wait b.on, .px-bricks.is-wait b.half { background: #d9c3b4; }
.px-bricks b.on, .px-bricks b.half { transition: background-color .35s; transition-delay: calc(var(--d, 0) * 1ms); }
.px-bricks--dark b { background: rgba(246, 239, 226, .16); }
.px-bricks--dark.is-wait b.on, .px-bricks--dark.is-wait b.half { background: rgba(246, 239, 226, .3); }
.px-bricks-legend { display: flex; gap: 18px; margin: 0; font-size: var(--fs-small, 14px); color: var(--ink-2); }
.px-bricks-legend span { display: inline-flex; align-items: center; gap: 8px; }
.px-bricks-legend i { width: 18px; height: 9px; background: var(--px-sand-2); }
.px-bricks-legend i.on { background: var(--red); }

/* ======================================================================
   4. .px-story — قصة مثبّتة تُروى بالتمرير
   الحركة: CSS scroll-driven (view-timeline) حيث يدعمها المتصفح؛ وإلا يضبط system.js
   المتغيرات --p و--fade وفئة is-dim (IntersectionObserver + تمرير).
   ====================================================================== */
.px-story { --p: 0; --fade: 0; position: relative; height: 150vh; margin: clamp(40px, 4vw, 64px) 12px 0; view-timeline: --pxs block; view-timeline-inset: 0px; /* بلا scroll-padding: يطابق حساب JS */ }
.px-story__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; border-radius: var(--field-r, 40px); color: #fff; background: var(--px-ink); }
.px-story__ph { position: absolute; inset: 0; margin: 0; z-index: -1; }
.px-story__ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.px-story__a { transform: scale(calc(1 + var(--p) * .24)); }
.px-story__b { opacity: var(--fade); transform: scale(calc(1.1 - var(--fade) * .1)); }
.px-story__ph::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(270deg, rgba(23, 17, 15, .92) 0%, rgba(23, 17, 15, .74) 42%, rgba(23, 17, 15, .2) 76%, rgba(23, 17, 15, .1) 100%); }
.px-story__ph .px-credit, .px-story__ph figcaption { z-index: 2; }
.px-story__copy { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: 1360px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 56px); }
.px-story__lines { margin: 0; max-width: 21em; font: 800 clamp(28px, 3.4vw, 56px)/1.4 var(--display); letter-spacing: -.005em; }
.px-story__line { display: block; color: #fff; transition: color .45s, transform .45s var(--ease, ease); }
.px-story__line + .px-story__line { margin-top: .16em; }
.px-story__line.is-dim { color: rgba(255, 255, 255, .3); transform: translateX(-.2em); }
.px-story__line--end::after { content: ""; display: inline-block; width: .2em; height: .2em; margin-inline-start: .12em; background: var(--red); vertical-align: .04em; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .px-story__a { animation: pxStA linear both; animation-timeline: --pxs; animation-range: contain 0% contain 100%; }
    .px-story__b { animation: pxStB linear both; animation-timeline: --pxs; animation-range: contain 45% contain 60%; }
    .px-story__line { transition: none; animation: pxStL linear both; animation-timeline: --pxs; animation-range: contain calc(var(--at, 0) * 100% - 9%) contain calc(var(--at, 0) * 100% - 5%); }
  }
}
@keyframes pxStA { from { transform: scale(1); } to { transform: scale(1.24); } }
@keyframes pxStB { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: scale(1); } }
@keyframes pxStL { from { color: rgba(255, 255, 255, .3); transform: translateX(-.2em); } to { color: #fff; transform: none; } }

/* ======================================================================
   5. .px-giant — الرقم الضخم مع منتقي
   يأخذ لونه من الحاوية (currentColor). .px-giant--light على الخلفيات الفاتحة.
   ====================================================================== */
.px-giant { --pg-fg: var(--cream); --pg-sel: var(--px-ink); position: relative; color: var(--pg-fg); display: flex; flex-direction: column; justify-content: center; gap: 16px; min-width: 0; }
.px-giant--light { --pg-fg: var(--ink); --pg-sel: var(--cream); }
.px-giant__price { display: flex; align-items: flex-end; gap: 18px; margin: 0; padding-block: 6px 12px; border-block: 2.5px solid currentColor; }
.px-giant__n { font: 800 var(--px-giant)/.98 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.px-giant__n.tick { animation: pxTick .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pxTick { 40% { transform: scale(1.06); } }
.px-giant__per { padding-bottom: .5em; font: 700 var(--fs-h3, 20px)/1.4 var(--display); }
.px-giant__pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; }
.px-giant__pick button { min-height: 46px; border: 1.5px solid color-mix(in srgb, var(--pg-fg) 45%, transparent); border-radius: 12px; background: transparent; font: 700 15px var(--display); color: var(--pg-fg); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.px-giant__pick button:hover { border-color: var(--pg-fg); }
.px-giant__pick button[aria-checked="true"] { background: var(--pg-fg); border-color: var(--pg-fg); color: var(--pg-sel); }
.px-giant__note { margin: 0; font-size: var(--fs-small, 14px); opacity: .82; }
.px-giant__go { width: 100%; }

/* ======================================================================
   6. .px-close — الختام الأحمر مع نجمة تطريز تُبنى طوبة طوبة
   ====================================================================== */
.px-close { position: relative; overflow: hidden; margin: 0 12px; padding-block: clamp(56px, 6vw, 88px); background: var(--red); color: var(--cream); border-radius: var(--field-r, 40px); }
.px-close__star { position: absolute; top: 50%; inset-inline-end: -3%; width: min(52vw, 640px); aspect-ratio: 1; translate: 0 -50%; display: grid; grid-template-columns: repeat(9, 1fr); gap: 1.4%; padding: 6%; pointer-events: none; }
.px-close__star b { display: block; aspect-ratio: 1; }
.px-close__star b.on { background: rgba(23, 17, 15, .08); transition: background-color .4s; transition-delay: calc(var(--d) * 45ms); }
.px-close__star.is-in b.on { background: var(--px-red-d); }
.px-close__star.is-in b.on.hot { background: var(--px-ink); }
.px-close__in { position: relative; display: grid; gap: clamp(24px, 3vw, 40px); }
.px-close__h { margin: 0; font: 800 calc(var(--px-mega) * 1.25)/1.42 var(--display); letter-spacing: -.012em; }
.px-close__h span { display: block; }
.px-close__out { color: var(--px-ink); }
.px-close__p { margin: 0; max-width: 34em; font-size: var(--fs-lead, 18px); line-height: 1.7; color: var(--cream); } /* 5:1 على الأحمر */
.px-close__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.px-close .btn--cream { background: var(--cream); color: var(--px-ink); }
.px-close + * { margin-top: 0; }

/* ======================================================================
   7. .px-stat-row — أرقام كبيرة تعدّ عند الظهور
   ====================================================================== */
.px-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); margin: 0; border-top: 2.5px solid currentColor; }
.px-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; padding: 18px 0 6px; padding-inline-end: 22px; margin-inline-end: 22px; border-inline-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); min-width: 0; }
.px-stat:last-child { border-inline-end: 0; margin-inline-end: 0; }
.px-stat dd, .px-stat__n { margin: 0; font: 800 clamp(36px, 3.8vw, 64px)/1.05 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.px-stat dt { font-size: var(--fs-small, 14px); line-height: 1.5; opacity: .75; }
.px-stat__n { display: inline-block; direction: ltr; unicode-bidi: isolate; }

/* ======================================================================
   الشاشات المتوسطة والصغيرة
   ====================================================================== */
@media (max-width: 900px) {
  .px-hero:has(.px-hero__card) .px-hero__in { grid-template-columns: minmax(0, 1fr); }
  .px-hero__card { width: min(100%, 340px); animation: none; }
  .px-bricks { grid-template-columns: repeat(var(--cols-m), minmax(0, 1fr)); }
  .px-close__star { width: 80vw; inset-inline-end: -30%; opacity: .7; }
}
@media (max-width: 640px) {
  .px-hero { min-height: calc(92svh - 44px); }
  .px-hero--short { min-height: 0; }
  .px-hero__img { object-position: var(--pos-m, var(--pos, 50% 50%)); transform: scale(1.02); animation: none; }
  .px-hero__ph::after { background: linear-gradient(0deg, rgba(23, 17, 15, .94) 0%, rgba(23, 17, 15, .8) 44%, rgba(23, 17, 15, .12) 74%, rgba(23, 17, 15, .5) 100%); }
  .px-hero__in { padding-inline: 16px; padding-top: calc(var(--nav-total, 66px) + 96px); gap: 24px; }
  .px-hero--short .px-hero__in { padding-top: calc(var(--nav-total, 66px) + 40px); }
  .px-hero__h { font-size: clamp(36px, 10.4vw, 46px); }
  .px-hero--short .px-hero__h { font-size: clamp(36px, 10.4vw, 44px); }
  .px-hero__lead { font-size: 16px; }
  .px-hero__cta { display: grid; grid-template-columns: 1fr; width: 100%; gap: 10px; margin-top: 20px; }
  .px-hero__cta .btn { width: 100%; }
  .px-hero .px-credit { bottom: calc(clamp(34px, 3.4vw, 48px) + 8px); font-size: 10px; }
  .px-marquee { margin-inline: 8px; min-height: 60px; }
  .px-marquee__k { padding-inline: 16px 12px; font-size: 14px; }
  .px-marquee__k small { display: none; }
  .px-marquee__item b { font-size: 22px; }
  .px-bricks { gap: 2px; grid-template-columns: repeat(var(--cols-s), minmax(0, 1fr)); }
  .px-story, .px-close, main > .px-hero:not(:first-child, :is(style, script, link):first-child + *) { margin-inline: 8px; }
  main > .px-hero:not(:first-child, :is(style, script, link):first-child + *) .px-hero__in { padding-top: 40px; }
  .px-story { height: 160vh; }
  .px-story__ph::after { background: linear-gradient(0deg, rgba(23, 17, 15, .95) 0%, rgba(23, 17, 15, .82) 50%, rgba(23, 17, 15, .3) 82%, rgba(23, 17, 15, .2) 100%); }
  .px-story__copy { justify-content: flex-end; padding-bottom: 64px; }
  .px-story__lines { font-size: 27px; }
  .px-giant__price { gap: 12px; }
  .px-close { padding-block: 56px 64px; }
  .px-close__h { font-size: 56px; }
  .px-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .px-stat { padding-inline-end: 12px; margin-inline-end: 12px; }
  .px-stat:nth-child(2n) { border-inline-end: 0; margin-inline-end: 0; }
  .px-stat dd, .px-stat__n { font-size: clamp(28px, 8.4vw, 38px); }
}

/* ======================================================================
   حركة أقل: كل شيء ظاهر وثابت
   ====================================================================== */
@media (prefers-reduced-motion: reduce) {
  .px-w > span, .px-brick, .px-hero__img, .px-hero__card, .px-live, .px-live::after, .px-giant__n.tick { animation: none !important; }
  .px-marquee__vp { overflow-x: auto; -webkit-mask: none; mask: none; }
  .px-marquee__track { animation: none; }
  .px-bricks b, .px-close__star b, .px-story__line { transition: none !important; }
  .px-story { height: auto; }
  .px-story__pin { position: relative; height: auto; min-height: 100svh; }
  .px-story__copy { min-height: 100svh; }
  .px-story__line.is-dim { color: #fff; transform: none; }
}

/* ===== LTR (English): mirror direction-bound overlays and motion ===== */
html[dir="ltr"] .px-hero__ph::after { background: linear-gradient(90deg, rgba(23, 17, 15, .9) 0%, rgba(23, 17, 15, .72) 36%, rgba(23, 17, 15, .2) 66%, rgba(23, 17, 15, .05) 82%), linear-gradient(0deg, rgba(23, 17, 15, .75) 0%, rgba(23, 17, 15, 0) 40%), linear-gradient(180deg, rgba(23, 17, 15, .55) 0%, rgba(23, 17, 15, 0) 26%); }
html[dir="ltr"] .px-story__ph::after { background: linear-gradient(90deg, rgba(23, 17, 15, .92) 0%, rgba(23, 17, 15, .74) 42%, rgba(23, 17, 15, .2) 76%, rgba(23, 17, 15, .1) 100%); }
html[dir="ltr"] .px-story__line.is-dim { transform: translateX(.2em); }
html[dir="ltr"] .px-story__line { animation-name: pxStLr; }
@keyframes pxStLr { from { color: rgba(255, 255, 255, .3); transform: translateX(.2em); } to { color: #fff; transform: none; } }

/* ===== .px-need: «غزة اليوم بأرقام الأمم المتحدة» — أرقام موثّقة، لكل رقم مصدره وتاريخه ===== */
.px-need { padding-block: clamp(56px, 7vw, 104px); }
.px-need__head { max-width: 46rem; margin-bottom: clamp(28px, 3.4vw, 48px); }
.px-need__head .lead { margin-top: 10px; }
.px-need__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--px-ink); }
.px-need__i { display: grid; align-content: start; gap: 10px; padding: clamp(22px, 2.4vw, 34px) clamp(18px, 2vw, 28px) clamp(20px, 2.2vw, 30px); border-bottom: 1px solid var(--px-line); }
.px-need__i:not(:nth-child(3n + 1)) { border-inline-start: 1px solid var(--px-line); }
.px-need__n { font: 800 clamp(40px, calc(18px + 2.8vw), 68px)/1.05 var(--display); letter-spacing: -.02em; color: var(--red, #c4252f); unicode-bidi: isolate; justify-self: start; }
.px-need__i p { margin: 0; font-size: clamp(15.5px, 1.15vw, 17.5px); line-height: 1.7; color: var(--px-ink); text-wrap: pretty; }
.px-need__src { margin-top: auto; padding-top: 6px; font-size: 13px; line-height: 1.5; color: var(--px-muted); text-decoration: underline; text-decoration-color: var(--px-line); text-underline-offset: 3px; }
.px-need__src:hover { color: var(--red, #c4252f); text-decoration-color: currentColor; }
.px-need__cta { margin: clamp(26px, 3vw, 40px) 0 0; }
@media (max-width: 899px) {
  .px-need__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .px-need__i:not(:nth-child(3n + 1)) { border-inline-start: 0; }
  .px-need__i:nth-child(2n) { border-inline-start: 1px solid var(--px-line); }
}
@media (max-width: 520px) {
  .px-need__list { grid-template-columns: 1fr; }
  .px-need__i:nth-child(2n) { border-inline-start: 0; }
  .px-need__i { padding-inline: 0; }
  .px-need__cta .btn { width: 100%; }
}
