/* OMSB Selection Exam — الصفحة الرئيسية العامة.
 *
 * **مستقلّةٌ عن `styles.css` عمداً.** ذاك ملفُّ التطبيق (٢٤٤٦ سطراً) ولا
 * يحتاجه زائرٌ لم يدخل بعد. فالرموزُ تُعاد هنا بقيمها نفسِها من
 * `docs/design-tokens.md` — أزرقٌ مُطفأٌ إشباعُه لا يتجاوز ٤٨٪، وذهبُ
 * الشعار للتمييز لا للمساحات.
 *
 * **والسمةُ تتبع `theme-boot.js`** — هو يضع `.theme-dark`/`.theme-light`
 * على الجذر قبل الرسم، فلا تومض الصفحةُ بيضاءَ قبل الداكن.
 */

:root {
  --blue-950: hsl(208 42% 11%);
  --blue-900: hsl(208 40% 16%);
  --blue-800: hsl(208 38% 26%);
  --blue-700: hsl(207 42% 36%);
  --blue-600: hsl(206 44% 46%);
  --blue-400: hsl(206 42% 62%);
  --blue-200: hsl(205 38% 82%);
  --blue-100: hsl(205 36% 91%);
  --gold-600: hsl(40 48% 44%);
  --gold-500: hsl(40 48% 52%);
  --gold-400: hsl(40 46% 65%);

  --bg: #FCFBF7;
  --surface: hsl(0 0% 100%);
  --border: var(--blue-200);
  --text: var(--blue-950);
  --muted: hsl(206 16% 42%);
  --accent: var(--blue-700);
  --on-accent: hsl(205 40% 97%);
  --nav-bg: rgb(252 251 247 / 0.82);
  --ring-line: var(--blue-200);
  --node-bg: hsl(0 0% 100%);

  --radius: 0.625rem;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-ui: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --gutter: clamp(1rem, 5vw, 4rem);
}

/* **IBM Plex مستضافةٌ عندنا لا من fonts.googleapis.com (٢٠٢٦-٠٩-١٩).**
 * نفسُ ملفّات `styles.css` تحت `/fonts/` — هذه الصفحةُ لا تحمّل ذلك
 * الملفّ (سطرٌ ١ أعلاه)، فتُعاد الأوزانُ التي تحتاجها هنا بإعلانها
 * الخاصّ. راجع `tools/build_text_fonts.py` لسبب الاستضافة وأصل الوزن. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-serif-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.theme-dark {
  --bg: #101C25;
  --surface: hsl(208 34% 14%);
  --border: hsl(208 28% 26%);
  --text: hsl(205 36% 93%);
  --muted: hsl(205 20% 68%);
  --accent: var(--blue-400);
  --on-accent: var(--blue-950);
  --nav-bg: rgb(16 28 37 / 0.82);
  --ring-line: hsl(208 28% 26%);
  --node-bg: hsl(208 34% 18%);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; }

.wrap { max-width: 68rem; margin-inline: auto; padding-inline: var(--gutter); }

/* ───────────────────────── الشريط العلويّ ───────────────────────── */
/* يبدأ شفّافاً بلا حدٍّ، ويتجسّد بمقدار التمرير — يقوده `landing.js`. */

#nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem var(--gutter);
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
}
#nav.is-on { opacity: 1; pointer-events: auto; border-bottom-color: var(--border); }
#nav .brand { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
/* موضعُ الشعارِ الطائر حين يحلّ — يُحفظ فارغاً بمقاسه فلا يقفز النصّ */
/* **الخانةُ بنسبة الرسم لا مربّعة.** الشعارُ أعرضُ من ارتفاعه
   (‏٨٥٨:٧١٩)، ومربّعٌ يحشره فيبدو مكتنزاً على نفسه. */
#nav .slot { width: 41px; aspect-ratio: 858 / 719; flex: none; }
#nav .brand b { font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; white-space: nowrap; }
#nav .spacer { flex: 1; }
#nav .links { display: flex; align-items: center; gap: 0.5rem; }

/* ───────────────────────── الأزرار ───────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.3rem; border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn:hover { transform: translateY(-1px); }
.btn-primary:hover { background: var(--blue-600); }
.theme-dark .btn-primary:hover { background: var(--blue-200); }
.btn-ghost:hover { border-color: var(--accent); }
.btn:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.btn[aria-disabled='true'] { opacity: 0.55; cursor: default; }
.btn[aria-disabled='true']:hover { transform: none; }
#nav .btn { padding: 0.45rem 0.95rem; font-size: 0.875rem; }
/* **الزرُّ لا يُكسَر سطرين.** رأيتُ في الفحص على عرضٍ ٣٣٩px أنّ «Sign in»
 * انكسر سطرين فتضخّم الزرُّ وركب على اسم المنصّة. فالنصُّ لا يُلفّ،
 * والاسمُ يُخفى حين لا يبقى له موضعٌ — الأزرارُ أنفعُ من اسمٍ مكرَّرٍ
 * الشعارُ يدلّ عليه. */
.btn { white-space: nowrap; }
@media (max-width: 27rem) {
  #nav .brand b { display: none; }
  #nav { gap: 0.4rem; padding-inline: 0.75rem; }
  #nav .btn { padding: 0.4rem 0.7rem; font-size: 0.82rem; }
}

/* ───────────────────────── ١. الواجهة ───────────────────────── */

#hero {
  position: relative;               /* مرجعُ `.scroll-hint` — بلا هذا تعلّق بالمستند */
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  padding: 4.5rem var(--gutter) 5rem;
}
#hero .inner { max-width: 42rem; }

/* الشعارُ الطائر: ثابتٌ في الإطار، يقوده التمريرُ من الوسط إلى الشريط.
   و`will-change` لأنّ التحويلَ يجري في كلّ إطارِ تمرير. */
/* **طبقةُ الشعار الطائر تملأ الشاشة، ولا تكون صندوقاً ٣٠٠px.**
 *
 * القطعُ تسافر عبر الصفحة كلِّها في أثناء التفكّك، وصندوقٌ صغيرٌ يعني
 * منفذَ SVG صغيراً — **فتُقتطع القطعُ عند حافّته**. وقِيس: مستطيلُ
 * اختبارٍ خارج الإطار يُحسب موضعُه داخل الشاشة ولا يُرسم، و`overflow:
 * visible` لا يرفع قصَّ منفذ الـSVG، وتوسيعُ الإطار وحدَه لا يكفي.
 * فالمنفذُ صار الشاشةَ نفسَها — ولا تستطيع قطعةٌ أن تخرج منه.
 */
#flyLogo {
  position: fixed; inset: 0; z-index: 45;
  pointer-events: none;
}
#flyLogo svg { width: 100%; height: 100%; display: block; }
#flyStage { will-change: transform; }
/* مكانٌ محفوظٌ في الواجهة بمقاس الشعار — الشعارُ نفسُه ثابتٌ فوقه */
/* **يُقاس بالارتفاع كما يُقاس بالعرض.** شاشةٌ عريضةٌ قصيرةٌ (حاسوبٌ
 * محمولٌ أو هاتفٌ مستلقٍ) كانت تُبقي الشعارَ ٣٠٠px فيدفع العنوانَ
 * والأزرارَ تحت الطيّة — ورأيتُه في الفحص على ٦٨٤px. */
/* والسقفُ الرأسيُّ رُفع من ٣٢svh إلى ٤٦: الإطارُ صار كلُّه رسماً،
   فلم يعد الارتفاعُ يُقاس بفراغ. وفي الوضع العَرْضيّ يُرى الفرق. */
/* **وثلاثةُ سقوفٍ لا اثنان، وكلٌّ لحالٍ.** لمّا ضُيّق الإطارُ صار
   كلُّه رسماً، فنفسُ الأرقام تُنتج شعاراً أكبرَ بنحو الضعف — فجاء
   ضخماً في الوضع الطوليّ يزاحم العنوان. فالعرضُ يحكم الطوليَّ
   (‏٤٤vw)، والارتفاعُ يحكم العَرْضيَّ (‏٣٨svh)، والسقفُ المطلقُ
   يمنع التضخّمَ على الشاشات الكبيرة. */
#heroLogoSlot { width: min(240px, 44vw, 38svh); aspect-ratio: 858 / 719;
  margin: 0 auto 0.7rem; }

#hero h1 {
  font-size: clamp(2rem, 6.2vw, 3.6rem);
  letter-spacing: -0.02em;
  margin-block: 0.5rem 0.8rem;
}
@media (max-height: 760px) {
  #hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
  #hero .cta-row { margin-top: 1.1rem; }
  #hero .note { margin-top: 0.6rem; }
}
#hero h1 .w { display: inline-block; }
#hero .lede { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.2rem); max-width: 34rem; margin-inline: auto; }
#hero .cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 1.6rem; }
#hero .note { margin-top: 0.9rem; font-size: 0.82rem; color: var(--muted); }

.scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%; translate: -50% 0;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
}
.scroll-hint i { display: block; width: 1px; height: 2rem; background: currentColor; opacity: 0.4; }

/* ───────────────────────── ٢. الأرقام ───────────────────────── */

#numbers { padding: 1rem var(--gutter) 5rem; }
#numbers ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1.4rem; list-style: none; margin: 0; padding: 0; text-align: center; }
#numbers .n { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1; }
#numbers .k { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.04em; margin-top: 0.4rem; }

/* ──────────────────── ٣. الخطواتُ الأربع ────────────────────
 *
 * حلَّت محلَّ المدار (قرارُ ٢٠٢٦-٠٩-١٨). والمدارُ كان يجيب «ما
 * الموجود»، وهذه تجيب **«كيف أنجح»** — وهو سؤالُ من يفكّر في الدفع.
 * وكلُّ خطوةٍ تسمّي صفحةً موجودةً فعلاً في المنصّة، ونصُّها من ألفاظ
 * الواجهة نفسِها لا من اختراعٍ تسويقيّ.
 *
 * **والنماذجُ تجريدٌ صادقٌ لا نصٌّ حقيقيّ**: شكلُ الشاشة وسلوكُها بلا
 * محتواها — فنصُّ الأسئلة هو المنتجُ المدفوع، ونشرُه هنا يعطيه مجّاناً.
 */

.steps-head { padding-block: 5rem 0; text-align: center; }
.steps-head h2 { font-size: clamp(1.6rem, 4.4vw, 2.5rem); }
.steps-head p { color: var(--muted); margin-top: 0.6rem; max-width: 34rem; margin-inline: auto; }

/* **إزاحةُ الدخول تُقصّ ولا تُمدّد الصفحة.** كلُّ خطوةٍ تدخل من جهتها
 * بإزاحةٍ أفقيّةٍ ٢٨px، وتلك الإزاحةُ تُنشئ فيضاً أفقيّاً لحظةَ الحركة —
 * قِيس: ١١px. و`clip` تقصّه بلا أن تُنشئ حاويةَ تمرير (بخلاف `hidden`)،
 * ولا تثبيتَ في هذا القسم فلا تكسر شيئاً. */
#steps { overflow-x: clip; }
.steps { display: grid; gap: clamp(3.5rem, 9vh, 7rem); padding-block: 3rem 5rem; }
.step { display: grid; gap: 1.6rem; align-items: center; }

/* **التبديلُ بين الجهتين** — «كل مرة تلف في جهة». ولا يُبدَّل إلا حين
 * يكون للجهتين معنًى: تحت ٥٤rem الصفُّ واحدٌ فالنصُّ فوق النموذج دائماً. */
@media (min-width: 54rem) {
  .step { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
  .step:nth-child(even) .step-text { order: 2; }
}

.step-num {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.6rem); line-height: 1;
  color: var(--gold-500);
  -webkit-text-stroke: 1.5px var(--gold-500);
  margin-bottom: 0.15rem;
}
/* الرقمُ مفرَّغٌ حيث يُدعم التفريغ — وإلا بقي ذهباً مصمتاً، وهو مقبول */
@supports (-webkit-text-stroke: 1px red) {
  .step-num { color: transparent; }
}

/* **اسمُ القسم هو العنوان، والجملةُ شرحُه.**
 *
 * كان الاسمُ الذهبيُّ (`Subject Diagnostic`) سطراً صغيراً تحت الجملة —
 * ‏٠٫٧٢rem بأحرفٍ كبيرةٍ متباعدة، يُقرأ وسماً لا عنواناً. والقارئُ يمسح
 * الصفحةَ بعينه فيرى رقماً ثمّ جملةً، **ولا يعرف أيَّ شاشةٍ يصف الرقم**.
 * رآها المشرفُ في الجوّال: «أرى من الأفضل تكبير الخطّ وتقريبه من الرقم،
 * كأن يكون هو العنوان والباقي شرحه».
 *
 * فصعد فوقَ الجملة ولاصقَ الرقم، وكبُر بخطّ العناوين. والجملةُ نزلت
 * رتبةً فصارت سطرَ شرحٍ لا عنواناً ينافسه — **فالرتبةُ تُقرأ من الحجم
 * قبل أن تُقرأ من الترتيب.** */
.step-where {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.45rem, 4.4vw, 2.2rem); line-height: 1.15;
  letter-spacing: 0; text-transform: none; color: var(--gold-600);
}
.theme-dark .step-where { color: var(--gold-400); }
.step-text h3 {
  font-size: clamp(1rem, 2.5vw, 1.18rem); font-weight: 600;
  line-height: 1.4; margin-top: 0.5rem;
}
.step-text > p:last-child { color: var(--muted); margin-top: 0.55rem; }

/* ── إطارُ النموذج ── */
/* **البطاقةُ محدودةٌ ويحكمها محتواها.** كانت `aspect-ratio: 4/3` بلا حدٍّ
 * أقصى، فعلى شاشةٍ عريضةٍ صارت نحوَ ٧٠٠×٤٨٠ — فسبح المحتوى في فراغٍ،
 * وتضخّم خطُّ الخطوةِ الرابعة حتى خالف بقيّةَ العرض. فصار لها سقفٌ
 * وارتفاعٌ أدنى، والباقي من محتواها. */
.step-art { display: grid; }
.frame {
  position: relative; overflow: hidden;
  width: 100%; max-width: 25rem; justify-self: center;
  min-height: 13.5rem;
  border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5);
  background: var(--surface);
  display: grid; align-content: center; gap: 0.65rem;
  padding: clamp(0.9rem, 2.4vw, 1.25rem);
}
.art-tag {
  margin-top: 0.15rem; text-align: center;
  font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); opacity: 0.75;
}

/* النماذجُ تحمل نصّاً مقروءاً لا أشكالاً مجرّدة. قِيس على من لم يرَ
 * المنصّةَ من قبل: مربّعٌ فيه أعمدةٌ بلا أسماءَ لا يقول شيئاً — والحكمُ
 * عليه بعينِ من يعرف الموقعَ حكمٌ خاطئ. **والسؤالُ التوضيحيُّ موسومٌ
 * صراحةً أنه ليس من البنك**، فلا يُفهم أنه مادّةٌ مدفوعةٌ كُشفت. */

.art-head {
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}

/* ١ — التشخيص: أعمدةُ المواد بأسمائها، وأضعفُها موسومٌ ذهباً */
.bars { display: flex; align-items: flex-end; gap: clamp(0.25rem, 1.2vw, 0.5rem); height: 72%; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; gap: 0.3rem; min-width: 0; }
.col {
  width: 100%; height: var(--h); border-radius: 5px 5px 0 0;
  background: var(--blue-400); transform-origin: 50% 100%;
}
.theme-dark .col { background: var(--blue-600); }
.bar em {
  font-style: normal; font-size: clamp(0.48rem, 1.5vw, 0.6rem);
  color: var(--muted); text-align: center; line-height: 1.2;
}
.bar.weak .col { background: var(--gold-500); }
.bar.weak em { color: var(--gold-600); font-weight: 600; }
.theme-dark .bar.weak em { color: var(--gold-400); }

/* ٢ و٤ — صفوفٌ بأسماءِ مواضيعَ وصفحاتِها */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.rows.tight { gap: 0.4rem; }
.rows li { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.rows em {
  font-style: normal; flex: 1; min-width: 0;
  font-size: clamp(0.58rem, 2vw, 0.72rem); color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--blue-200); flex: none; }
.theme-dark .dot { background: hsl(208 28% 32%); }
.dot.miss { background: hsl(4 56% 46%); }
.dot.weakdot { background: var(--gold-500); }
.chip {
  flex: none; font-size: 0.54rem; letter-spacing: 0.06em; font-weight: 600;
  color: var(--gold-600); border: 1px solid var(--gold-400);
  border-radius: 99px; padding: 0.05rem 0.4rem;
}
.theme-dark .chip { color: var(--gold-400); }
.chip.pale { color: var(--muted); border-color: var(--border); }

/* ٣ — وضعُ الدراسة: سؤالٌ توضيحيٌّ موسوم، والحكمُ في الحال، ومعه الصفحة */
.qa { display: grid; gap: 0.5rem; }
/* **السطرُ التعريفيُّ ليس من السؤال، فلا يلبس ثوبَه.** كان بلونِ النصّ
 * ووزنِه وإطارٍ حوله، فبدا جزءاً من المتن. فصار أصغرَ وأخفَّ وبلا إطار،
 * والسؤالُ أثقلَ وأدكنَ — فيُعرف الفرقُ بالنظرة الأولى. */
.demo-tag {
  justify-self: start; font-size: 0.5rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 500;
  color: var(--muted); opacity: 0.62;
}
.stem-text {
  font-size: clamp(0.66rem, 2.2vw, 0.8rem); line-height: 1.5;
  color: var(--text); font-weight: 600; margin-top: -0.15rem;
}
.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.opts li {
  display: flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--border); border-radius: 99px;
  padding: 0.3rem 0.7rem;
}
.opts em {
  font-style: normal; flex: 1; min-width: 0;
  font-size: clamp(0.58rem, 2vw, 0.72rem); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.opts s { text-decoration: none; font-size: 0.72rem; font-weight: 700; flex: none; }
.opts li.good { border-color: hsl(158 46% 34%); }
.opts li.good em { color: var(--text); font-weight: 600; }
.opts li.good s { color: hsl(158 46% 34%); }
.opts li.bad { border-color: hsl(4 56% 46%); }
.opts li.bad s { color: hsl(4 56% 46%); }
.page-slip {
  padding: 0.4rem 0.6rem; border-inline-start: 2px solid var(--gold-500);
  background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0;
}
.page-slip em {
  font-style: normal; font-size: clamp(0.5rem, 1.6vw, 0.64rem); color: var(--muted);
}

/* ٣ — المنهجُ مكتوباً: ما يُقرأ الآن، ونصُّه تحته بعنوانينِ وسطرٍ مُبرَز */
.note {
  display: grid; gap: 0.32rem; padding: 0.6rem 0.7rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg);
}
.note-h {
  font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-600); font-weight: 700; margin-top: 0.18rem;
}
.theme-dark .note-h { color: var(--gold-400); }
.note i { display: block; height: 0.42rem; border-radius: 99px; background: var(--blue-100); }
.theme-dark .note i { background: hsl(208 28% 26%); }
.note i.hl { background: var(--gold-400); }

/* ٤ — الخطّة: خطٌّ يُرسم، ثمّ يصعد الأضعفُ إلى الأعلى */
.spark { width: 100%; height: 3.1rem; color: var(--gold-500); }
.theme-dark .spark { color: var(--gold-400); }
.art-plan .frame { gap: 0.9rem; }

/* ── فهرسُ الأقسام: «Everything inside» ──
 *
 * **سقطت أنماطُه مرّةً فظهرت القائمةُ خاماً**: نقاطٌ افتراضيةٌ، والاسمُ
 * ملتصقٌ بوصفه بلا فراغ — «CurriculumWritten notes». وقع ذلك حين
 * استُبدلت كتلةُ المدار بكتلة الخطوات فذهبت معها. فتُكتب هنا باسمٍ
 * يخصّها لا باسمٍ لقسمٍ حُذف.
 */
#inside { padding-block: 1rem 4rem; }
.inside-wrap { padding-block: 0; }
.inside-h {
  font-size: clamp(1.2rem, 3vw, 1.6rem); margin-bottom: 1.2rem; text-align: center;
}
.inside-list {
  list-style: none; margin: 0; padding: 0; width: 100%;
  display: grid; gap: 0.75rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.inside-list li {
  display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.6rem;
  align-items: baseline; font-size: 0.88rem; color: var(--muted);
  padding-inline-start: 0.9rem; position: relative;
}
/* نقطةٌ ذهبيةٌ من عندنا لا من المتصفّح */
.inside-list li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 0.55em;
  width: 0.36rem; height: 0.36rem; border-radius: 50%;
  background: var(--gold-500);
}
.inside-list b { color: var(--text); font-weight: 600; }


/* على الشاشة الضيّقة يسقط الوصفُ سطراً تحت الاسم فلا يزدحمان */
@media (max-width: 32rem) {
  .inside-list li { grid-template-columns: 1fr; }
}

/* ───────────────────────── ٤. الأقفال الثلاثة ───────────────────────── */

/* ───────────────────────── ٥. الاشتراك والتذييل ───────────────────────── */

#join { padding: 5rem var(--gutter) 4rem; text-align: center; }
#join h2 { font-size: clamp(1.6rem, 4.4vw, 2.5rem); }
#join .join-lede { color: var(--muted); margin: 0.7rem auto 0; max-width: 34rem; }

/* **ثلاثُ باقاتٍ بالمدّة وحدَها** (ق-١٠٠) — ولا فرقَ في الخصائص، فالمزايا
 * تُكتب مرّةً تحتها لا في كلّ بطاقةٍ ثلاثاً. **والسعرُ يُملأ من الخادم**،
 * والشرطةُ هي ما يبقى إن لم يصل — لا رقمٌ مكتوبٌ في الصفحة يكذب يوماً. */
.tiers {
  list-style: none; margin: 2.2rem auto 0; padding: 0; max-width: 58rem;
  display: grid; gap: 1rem; grid-template-columns: 1fr;
}
@media (min-width: 46rem) { .tiers { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }

.tier {
  position: relative; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.6);
  padding: 1.6rem 1.1rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tier:hover { transform: translateY(-3px); border-color: var(--blue-300, var(--accent)); }
.tier h3 { font-size: 1.15rem; letter-spacing: 0.01em; }
.tier-span { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tier-price {
  font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.1; color: var(--accent); margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.tier-per { font-size: 0.74rem; color: var(--muted); min-height: 1.1em; }
.tier-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }

/* المقصودةُ بالبيع تُميَّز بالذهب لا بالحجم — فالصفُّ يبقى مستقيماً */
.tier.is-featured { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgb(192 152 75 / 0.12); }
.tier.is-featured .tier-price { color: var(--gold-600); }
.theme-dark .tier.is-featured .tier-price { color: var(--gold-400); }
.tier-flag {
  position: absolute; top: -0.65rem; left: 50%; translate: -50% 0;
  background: var(--gold-500); color: hsl(40 48% 12%);
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  border-radius: 99px; padding: 0.18rem 0.7rem; white-space: nowrap;
}

.tier-common {
  list-style: none; margin: 1.6rem auto 0; padding: 0; max-width: 46rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; justify-content: center;
  font-size: 0.84rem; color: var(--muted);
}
.tier-common li { display: flex; align-items: center; gap: 0.4rem; }
.tier-common li::before {
  content: ''; width: 0.4rem; height: 0.4rem; border-radius: 50%;
  background: var(--gold-500); flex: none;
}

#join .cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 1.8rem; }
#join .closed { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }

footer { border-top: 1px solid var(--border); padding: 2rem var(--gutter) 3rem; }
footer .row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; max-width: 68rem; margin-inline: auto; font-size: 0.82rem; color: var(--muted); }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); text-decoration: underline; }
footer .legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }

.reveal { opacity: 0; }

/* **العنوانُ والشعارُ ينتظران الحركةَ لا يرتدّان معها** (٢٠٢٦-١٠-٠٨).
 * الحركةُ تُحمَّل بعد أوّل رسم (`landing-boot.js`)، فلو ظهرا فيه لأخفاهما
 * GSAP ثمّ أعادهما — ومضةٌ. فيُخفيان حتى يرفع `landing.js` الصنفَ في
 * المهمّة نفسِها التي يضبط فيها بدايةَ الحركة. والوصفُ تحتهما ظاهرٌ من
 * أوّل رسم: هو أكبرُ ما في الشاشة، وزمنُ ظهوره هو ما يقيسه LCP.
 * **ولو لم تصل الحركةُ قطّ** ظهرا وحدهما بعد ثلاث ثوانٍ — فالصفحةُ تُقرأ
 * بلا جافاسكربت كما كانت. */
.await-motion #hero h1,
.await-motion #flyLogo { opacity: 0; animation: md-show 0s linear 3s forwards; }
@keyframes md-show { to { opacity: 1; } }

/* ───────────────────────── تقليلُ الحركة ─────────────────────────
 * من طلبه يرى الصفحةَ كاملةً ساكنةً. وليس تنازلاً: بعضُ الناس تصيبهم
 * الحركةُ بدوار، وصفحةٌ لا تُقرأ إلا بالحركة صفحةٌ ناقصة. فكلُّ ما
 * يُخفيه الجافاسكربت يعود ظاهراً، والمدارُ يقف، والشعارُ لا يسافر.
 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; }
  .await-motion #hero h1, .await-motion #flyLogo { opacity: 1; animation: none; }
  #flyLogo { position: absolute; inset: 0; }
  #heroLogoSlot { display: none; }
  #nav { opacity: 1; pointer-events: auto; border-bottom-color: var(--border); position: sticky; }
  .scroll-hint { display: none; }
}

/* ── ما يُفتح اليوم — بطاقتان قبل الأسعار ── */
#today { padding: 4.5rem 0 1rem; }
.today-h { text-align: center; margin: 0 0 0.6rem; }
.today-lede {
  text-align: center; color: var(--muted); max-width: 33rem;
  margin: 0 auto 2.4rem; font-size: 0.95rem;
}
.today-cards {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  align-items: start;
}

/* البطاقةُ لها وزن: حافّةٌ ذهبيّةٌ علويّة، وظلٌّ يرفعها عن الورق */
.tcard {
  position: relative; background: var(--surface, #fff);
  border: 1px solid hsl(40 26% 86%); border-radius: 0.9rem;
  box-shadow: 0 1px 2px rgba(16,28,37,.04), 0 6px 20px rgba(16,28,37,.05);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
  overflow: hidden;
}
.tcard::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-400, #D9AE5F), var(--gold-600, #A8843A));
}
.tcard:hover { transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(16,28,37,.05), 0 14px 34px rgba(16,28,37,.09); }
.tcard[open] { border-color: hsl(40 40% 74%); }

.tcard summary {
  cursor: pointer; list-style: none; padding: 1.5rem 1.5rem 1.3rem;
  display: grid; gap: 0.45rem;
}
.tcard summary::-webkit-details-marker { display: none; }
.tc-kicker {
  display: inline-flex; align-items: center; align-self: start;
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-600, #A8843A);
  background: hsl(40 48% 94%); border-radius: 999px; padding: 0.25rem 0.7rem;
}
.tc-title {
  font-family: var(--font-display, 'IBM Plex Serif', Georgia, serif);
  font-size: 1.45rem; font-weight: 600; line-height: 1.2;
  color: var(--gold-600, #A8843A); letter-spacing: -0.01em;
}
.tc-sub { font-size: 0.93rem; color: var(--muted); line-height: 1.65; }
.tcard summary::after {
  content: 'Read more'; justify-self: start; margin-top: 0.55rem;
  font-size: 0.8rem; font-weight: 600; color: var(--gold-600, #A8843A);
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.tcard[open] summary::after { content: 'Close'; }

.tc-body {
  padding: 0 1.5rem 1.5rem; font-size: 0.92rem; line-height: 1.78;
  color: var(--muted);
}
.tc-body p { margin: 0 0 0.9rem; }
.tc-body b { color: var(--text); font-weight: 600; }

/* الروابطُ داخل البطاقة لا خارجها */
.tc-links { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.2rem; }
.tc-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: hsl(40 44% 96%); border: 1px solid hsl(40 30% 84%);
  border-radius: 0.55rem; padding: 0.5rem 0.9rem;
  color: var(--text); text-decoration: none;
  font-size: 0.87rem; font-weight: 600;
  transition: border-color .15s ease, background .15s ease;
}
.tc-link:hover { background: hsl(40 48% 93%); border-color: var(--gold-500, #C0984B); }
/* **وفي الوضع الليليّ** — الخلفيّةُ أعلاه قشدةٌ ثابتة، والنصُّ `var(--text)` يتبع
   السمة، فصار في الليل نصٌّ فاتحٌ على خلفيّةٍ فاتحة لا يُقرأ منه حرف (رآه المشرف
   على الجوّال ٢٠٢٦-٠٩-٢٥). فالزرُّ يعلو سطحَ البطاقة درجةً ويحمل لونَ نصّ السمة. */
.theme-dark .tc-link { background: hsl(208 30% 19%); border-color: var(--border); color: var(--text); }
.theme-dark .tc-link:hover { background: hsl(208 30% 23%); border-color: var(--gold-400); }

@media (max-width: 30rem) {
  .tcard summary { padding: 1.25rem 1.2rem 1.1rem; }
  .tc-body { padding: 0 1.2rem 1.2rem; }
  .tc-title { font-size: 1.3rem; }
}

/* شارتا المنصّتين — **رسميّتان كما نزلتا من عندهما**، لا رسمٌ يحاكيهما.
   أوّلَ مرّةٍ وضعتُ علامةً أحاديّةَ اللون من simple-icons ثمّ ركّبتُها على
   مربّعٍ بنفسجيٍّ اخترتُ تدرّجَه من الذاكرة — فبانت مخالفةً لأيقونة
   التطبيق على الماك (رآها المشرف ٢٠٢٦-٠٩-٢٢). وشارةُ أبل من خدمة
   الشارات عندها، وشعارُ سبوتيفاي من أصول علامتها. ولا يُعدَّل فيهما
   لونٌ ولا نسبة: توضعان كما هما، وهذا شرطُ استعمالهما. */
.tc-badges {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.7rem 1rem; margin-top: 1.3rem;
}
.tc-badge {
  display: inline-flex; align-items: center; line-height: 0;
  border-radius: 0.45rem; transition: opacity .15s ease, transform .15s ease;
}
.tc-badge:hover { opacity: 0.85; transform: translateY(-1px); }
.tc-badge img { display: block; height: 2.45rem; width: auto; }
/* شعارُ سبوتيفاي أعرضُ بكثيرٍ من شارة أبل — يُوازَن بالارتفاع لا بالعرض */
.tc-badge-spotify img { height: 1.6rem; }

/* ── أين تجدنا — صفُّ الذيل ── */
.reach { display: inline-flex; align-items: center; gap: 0.15rem; }
.reach a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  color: var(--muted); transition: color .15s, background .15s;
}
.reach a:hover { color: var(--gold-600); background: var(--surface); }
.reach svg { width: 1.05rem; height: 1.05rem; display: block; }
