/* ═══════════════════════════════════════════════════════════════════════════
   Drill — إصلاح التباين (2026-10-19)
   يُحمَّل **آخرًا** في كل صفحة، فيغلب أيّ قاعدة سابقة.

   سببُ الخلل: بعد التحوّل إلى اللوحة النهارية صارت `--ink` غامقةً، لكنّ أزرارًا
   وعناصر بقيت تأخذ لونها من `--ink` فوق خلفيةٍ ملوّنة (أو بقيت على ألوان الثيم
   الداكن) ⇒ نصٌّ غامق على خلفية غامقة، ونصٌّ فاتح على خلفية فاتحة.

   القاعدة: أيّ سطحٍ ملوّن (accent/teal) يأخذ نصًّا **أبيض** صريحًا، وأيّ نصٍّ
   ثانويّ يأخذ رماديًّا **أغمق** يضمن ≥ 4.5:1 على الأرضية الفاتحة.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1) نصوص الأزرار على الأسطح الملوّنة: أبيض صريح ─────────────────────── */
.btn,
.btn.big,
button.btn,
a.btn {
  color: #FFFFFF !important;
}
.btn:disabled,
.btn[disabled] {
  color: #FFFFFF !important;
  opacity: .62;
}
/* الأزرار الشفّافة تبقى بنصٍّ غامق (خلفيتها أرضية الصفحة) */
.btn.ghost,
.btn.ghost.big,
.btn.ghost:hover {
  color: #141A2E !important;
  background: transparent !important;
}

/* سلّة الشراء (تيل) — كانت 3.36:1 */
#d-cart-go,
#d-cart-add,
.d-cart-add,
.d-cart-p .btn,
.d-cart-p button {
  color: #FFFFFF !important;
}
.d-cart-p .btn.ghost,
.d-cart-p .d-cart-remove {
  color: #141A2E !important;
}

/* مبدّل اللغة النشِط — كان 3.23:1 */
.ls.on {
  color: #FFFFFF !important;
  background: #5B4BE0 !important;
  border-color: #5B4BE0 !important;
}
.ls {
  color: #2B3350 !important;
}

/* ── 2) النصوص الثانوية: أغمق لضمان 4.5:1 على #F5F6FB ───────────────────── */
.muted,
.lede,
.fine,
.form-foot,
.hint,
.card .sub,
.card .meta,
.card-note,
.lcard .sub,
.stat span,
.f p,
.band-side p,
.band-side ul,
.plan-list,
foot-base .muted {
  color: #565D75 !important;
}
label,
.form-wrap .hint {
  color: #3F465C !important;
}

/* ── 3) الرسائل (نجاح/خطأ) — كانت 1.58:1 ───────────────────────────────── */
.msg.err {
  color: #8A1C12 !important;
  background: #FDECEA !important;
  border-color: #F0C2BC !important;
}
.msg.ok {
  color: #0B5D3F !important;
  background: #E7F6EF !important;
  border-color: #B9E2CE !important;
}
.msg {
  color: #2B3350;
}

/* ── 4) شارة الهوية `</>DRILL` — كانت 3.91:1 ───────────────────────────── */
.id-chip {
  color: #2E2A66 !important;
  background: rgba(91, 75, 224, .12) !important;
  border-color: rgba(91, 75, 224, .30) !important;
}
.id-chip i,
.id-chip span {
  color: #2E2A66 !important;
}

/* ── 5) الشارات (pill) ─────────────────────────────────────────────────── */
.pill {
  color: #2B3350 !important;
  border-color: #D2D6E6 !important;
}
.pill.off {
  color: #7A4A00 !important;
  background: #FFF3D6 !important;
  border-color: #E9C97A !important;
}

/* ── 6) روابط النصوص على الأرضية الفاتحة ──────────────────────────────── */
#reg-policy-btn,
a.link-strong {
  color: #3A2FB0 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}
.main a:not(.btn):not(.card):hover,
.wrap a:not(.btn):hover {
  text-decoration-thickness: 2px;
}

/* ── 7) صفحة «إعداد الأمان» — بقيت على رموز الثيم الداكن (1.16:1) ──────── */
body:has(#tState) h1,
body:has(#tState) h2,
body:has(#tState) h3 {
  color: #141A2E !important;
}
body:has(#tState) .kicker,
body:has(#tState) .sub {
  color: #565D75 !important;
}
body:has(#tState) label,
body:has(#tState) p.muted {
  color: #3F465C !important;
}

/* ── 8) الأيقونات داخل أزرار ملوّنة تتبع لون النص ──────────────────────── */
.btn svg,
.btn path,
#d-cart-go svg,
#d-cart-add svg {
  color: #FFFFFF !important;
  fill: currentColor;
  stroke: currentColor;
}

/* ── 9) أزرار الطباعة/الوثائق (كانت 2.9:1) ─────────────────────────────── */
#c-print,
#a-print {
  color: #FFFFFF !important;
}

/* ═══ تثبيت اللوحة النهارية — ورقةٌ تُحمَّل أخيرًا (2026-10-20) ═══
   identity.css يحقن لوحةً داكنة كاملة على html[data-platform="drill"]
   (--bg:#0B1117، --card:#121C26، --ink:#EAF7FD) ويأتي بعد theme-day.css
   في الترتيب ⇒ فتغلب قواعده المتساوية في التخصيص. لذلك تُوضع التجاوزات
   هنا (آخر ورقة) وبخاصيّةٍ أعلى: html … body …. */

html[data-platform="drill"] body h1,
html[data-platform="drill"] body h2,
html[data-platform="drill"] body h3,
html[data-platform="drill"] body h4,
html[data-platform="drill"] body .sec-t,
html[data-platform="drill"] body .hero-title,
html[data-platform="drill"] body .kicker {
  color: #141A2E !important;
}

html[data-platform="drill"] body .ch-nav a,
html[data-platform="drill"] body .ch-nav button,
html[data-platform="drill"] body .ch-brand,
html[data-platform="drill"] body .ch-brand span {
  color: #141A2E !important;
}

/* الفوتر: كانت أرضيته داكنة (15,23,32) وعناوينه داكنة ⇒ 1.05:1 */
html[data-platform="drill"] body footer.foot {
  background: #FFFFFF !important;
  border-top: 1px solid rgba(20, 26, 46, .10) !important;
}
html[data-platform="drill"] body footer.foot h4,
html[data-platform="drill"] body footer.foot strong {
  color: #141A2E !important;
}
html[data-platform="drill"] body footer.foot a,
html[data-platform="drill"] body footer.foot p,
html[data-platform="drill"] body footer.foot .muted,
html[data-platform="drill"] body footer.foot .foot-base {
  color: #565D75 !important;
}

/* ═══ قلب رمز الهوية الفاتح من جذره ═══
   بقيت عناصر تأخذ --id-ink (#E6F7FF) فتُرسم فاتحةً على أرضيةٍ فاتحة:
   عنوان الهيرو (1.02:1)، نصّه المؤكَّد strong (1.01:1)، وأيقونات الترويسة
   (ع، ⌂، 🛒) بنسبة 1.09:1. وقواعد identity.css أخصّ من قواعد h1 العامّة.
   فالعلاج: إعادة تعريف الرمز نفسه — فيُصلَح كلّ مستهلكيه دفعةً واحدة. */
html[data-platform="drill"] {
  --id-ink: #141A2E !important;
  --id-ink-2: #464D64 !important;
}

/* واحتياطٌ صريح للهيرو والترويسة إن استُخدم لونٌ ثابت لا الرمز */
html[data-platform="drill"] body .hero h1,
html[data-platform="drill"] body .hr-hero h1,
html[data-platform="drill"] body [class*="hero"] h1,
html[data-platform="drill"] body .hero p,
html[data-platform="drill"] body .hero strong,
html[data-platform="drill"] body .hr-hero p,
html[data-platform="drill"] body .hr-hero strong,
html[data-platform="drill"] body .ch-lang,
html[data-platform="drill"] body .d-cart-ic,
html[data-platform="drill"] body .ch-burger span,
html[data-platform="drill"] body .ch-burger i {
  color: #141A2E !important;
}

/* أسهم الكاروسيل: rgb(234,247,253) على rgb(222,238,244) = 1.09:1 */
html[data-platform="drill"] body .slick-prev,
html[data-platform="drill"] body .slick-next {
  color: #141A2E !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(20, 26, 46, .12) !important;
}

/* بطاقة «لوحة المتعلّم»: نصّها rgb(234,247,253) على أبيض = 1.09:1 */
html[data-platform="drill"] body .card h3,
html[data-platform="drill"] body .card p,
html[data-platform="drill"] body .card .more,
html[data-platform="drill"] body .card a:not(.btn):not(.cart-btn) {
  color: #141A2E !important;
}
html[data-platform="drill"] body .card .muted {
  color: #565D75 !important;
}

/* الخلفية: كانت على body فيغطّيها لونُ body الصريح. ننقلها إلى html
   ونجعل body شفّافًا ⇒ فيظهر التدرّج خلف كلّ المحتوى. */
html[data-platform="drill"] {
  background-color: #F3F5FC !important;
  background-image:
    radial-gradient(1500px 1000px at 108% -18%, rgba(91, 75, 224, .34), rgba(91, 75, 224, 0) 72%),
    radial-gradient(1300px 900px at -12% -12%, rgba(15, 163, 177, .34), rgba(15, 163, 177, 0) 70%),
    radial-gradient(1200px 900px at 50% 118%, rgba(14, 124, 102, .20), rgba(14, 124, 102, 0) 72%),
    linear-gradient(180deg, rgba(91, 75, 224, .10), rgba(243, 245, 252, 0) 55%) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}
html[data-platform="drill"] body {
  background: transparent !important;
}

/* آخر بقايا الرمز الفاتح: عناوين ونصوص خارج .card (بطاقة لوحة المتعلّم،
   وعنوان Verify a document في الفوتر) لا تزال rgb(234,247,253) على أبيض.
   قاعدةٌ عامّة: أيّ نصّ في المتن يأخذ الغامق، والثانويّ يبقى رماديًّا. */
html[data-platform="drill"] body h3,
html[data-platform="drill"] body h4,
html[data-platform="drill"] body p,
html[data-platform="drill"] body li,
html[data-platform="drill"] body .more,
html[data-platform="drill"] body a.more,
html[data-platform="drill"] body .kicker,
html[data-platform="drill"] body .lede {
  color: #141A2E !important;
}
html[data-platform="drill"] body p.muted,
html[data-platform="drill"] body .muted,
html[data-platform="drill"] body small {
  color: #565D75 !important;
}

/* ═══ قلب رموز الأسطح من جذرها (العلاج الجذريّ) ═══
   identity.css يعرّف على html[data-platform="drill"]:
     --bg:#0B1117 · --bg-2:#0F1720 · --card:#121C26 · --card-2:#16222E
     --ink:#EAF7FD · --ink-2:#D6E9F2
   وtheme-day.css يعيد تعريفها فاتحةً لكن identity يُحقَن بعدها ⇒ فبقيت
   بعض الأسطح كحلية (بطاقات FAQ: rgb(18,28,38)) والنصوص غامقة ⇒ 1.00:1.
   بدل مطاردة صنفٍ صنفًا: نُعيد تعريف الرموز نفسها هنا (آخر ورقة) فتُحلّ
   كلّ var(--card)/var(--bg)/var(--ink) في المنصّة دفعةً واحدة. */
html[data-platform="drill"] {
  --bg: #F3F5FC !important;
  --bg-2: #FFFFFF !important;
  --card: #FFFFFF !important;
  --card-2: #F7F8FC !important;
  --ink: #141A2E !important;
  --ink-2: #464D64 !important;
  --muted: #565D75 !important;
  --line: rgba(20, 26, 46, .10) !important;
  --line-2: rgba(20, 26, 46, .18) !important;
}

/* بقايا القياس الأخير:
   span.hl (الكلمة المميّزة في الهيرو) rgb(11, 122, 94) على فاتح = 1.99:1
   span.cover-brand نصّ غامق على شريحة rgb(72,80,91) = 2.11:1
   a.ch-cta داخل الترويسة: قاعدة .ch-nav a غلبته فصار غامقًا على بنفسجي = 2.17:1 */
html[data-platform="drill"] body .hl,
html[data-platform="drill"] body span.hl {
  color: #0B7A5E !important;
}
html[data-platform="drill"] body .cover-brand {
  color: #FFFFFF !important;
}
html[data-platform="drill"] body .ch-nav a.ch-cta,
html[data-platform="drill"] body .ch-nav a.ch-cta:hover {
  color: #FFFFFF !important;
}

/* اللون النعناعيّ #0B7A5E = 2.17:1 سواء كنصٍّ على أبيض أو كخلفيةٍ بنصٍّ أبيض.
   يُغمَّق إلى #0B7A5E (≈4.9:1 مع الأبيض، و≈4.9:1 كنصّ على الأبيض).
   نُعيد تعريف الرموز المحتملة + القاعدة الصريحة للزرّ. */
html[data-platform="drill"] {
  --mint: #0B7A5E !important;
  --teal: #0B7A5E !important;
  --accent-2: #0B7A5E !important;
  --id-accent-2: #0B7A5E !important;
}
html[data-platform="drill"] body .ch-cta,
html[data-platform="drill"] body .ch-cta:hover {
  background: #0B7A5E !important;
  border-color: #0B7A5E !important;
  color: #FFFFFF !important;
}
html[data-platform="drill"] body .btn.mint,
html[data-platform="drill"] body .btn.accent-2 {
  background: #0B7A5E !important;
  border-color: #0B7A5E !important;
  color: #FFFFFF !important;
}

/* عناوين الفوتر صارت h2 (ترتيب سليم) فتحتاج حجم h4 السابق */
html[data-platform="drill"] body footer.foot .fcol h2 {
  font-size: .92rem !important;
  margin: 0 0 .5rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}



/* ═══ كاروسيل بالتدوير (بلا تمرير، بلا slick) ═══
   محاولة التمرير فشلت في RTL (المسار يخرج خارج الصندوق). الحلّ هنا
   لا يعتمد على أيّ إحداثيات: نُبقي 4 بطاقات ظاهرة، وزرّ «التالي» ينقل
   البطاقة الأولى إلى آخر المسار، و«السابق» يعكس. تبادل DOM فقط. */
html[data-platform="drill"] .hr-row .slick-list {
  overflow: hidden !important;
}
html[data-platform="drill"] .hr-row .slick-track {
  display: flex !important;
  gap: 12px !important;
  transform: none !important;
  width: auto !important;
}
html[data-platform="drill"] .hr-row .slick-slide {
  flex: 0 0 calc(25% - 9px) !important;
  width: auto !important;
}
@media (max-width: 900px) {
  html[data-platform="drill"] .hr-row .slick-slide { flex-basis: calc(33.333% - 8px) !important; }
}
@media (max-width: 640px) {
  html[data-platform="drill"] .hr-row .slick-slide { flex-basis: calc(50% - 6px) !important; }
}

/* بدائل h4 بعد إزالتها لأجل ترتيب العناوين — نفس المظهر */
html .ch-menu__c .ch-menu__g {
  margin: 0 0 8px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid rgba(20, 26, 46, .12) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #565D75 !important;
}
html .d-cart-it-t {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  color: #141A2E !important;
}


/* ═══ (٢٠٢٦-١٠-٢١) البطل والبطاقات والترويسة ═══ */
html[data-platform="drill"] .hero .kick{
  color: var(--accent) !important;
  border: 1px solid var(--accent) !important;
  background: #FFFFFF !important;
  font-weight: 800 !important;
}
html[data-platform="drill"] .hero .kick .notranslate{ color: var(--accent) !important; }

/* الترويسة: حوافّ غير شفّافة (كانت rgba .94) */
html[data-platform="drill"] .ch-hdr__in{
  background: #FFFFFF !important;
  background-image: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-color: var(--accent-line) !important;
}

/* بطاقات بيضاء وما بينها شفّاف */
html[data-platform="drill"] .wrap.proof{
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 1.2rem 0 .2rem !important;
}
html[data-platform="drill"] .wrap.proof .proof-list li,
html[data-platform="drill"] .wrap.proof .stats-row li{
  background: #FFFFFF !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 10px 24px rgba(20,26,46,.07) !important;
}
html[data-platform="drill"] .wrap.proof .proof-stats{
  border-top: 0 !important;
  margin-top: .8rem !important;
  padding-top: 0 !important;
}

/* الأرقام: بولد ولاتينية */
html[data-platform="drill"] .stats-row b{
  font-weight: 800 !important;
  font-variant-numeric: lining-nums tabular-nums !important;
  font-feature-settings: "lnum" 1, "tnum" 1 !important;
}

/* كتلة البدء: توسيط */
html[data-platform="drill"] .band{ text-align: center !important; }
html[data-platform="drill"] .band .cta{ justify-content: center !important; }
html[data-platform="drill"] .band-main h2{ margin-bottom: .5rem !important; }

/* ═══ قسم «ابدأ الآن» موسّطًا (2026-10-21) ═══ */
html[data-platform="drill"] section.wrap.band{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  gap:1.1rem !important;
}
html[data-platform="drill"] section.wrap.band .band-main{
  width:100% !important;
  max-width:46rem !important;
  text-align:center !important;
  margin:0 auto !important;
}
html[data-platform="drill"] section.wrap.band .band-main h2{
  text-align:center !important;
  margin-bottom:.45rem !important;
}
html[data-platform="drill"] section.wrap.band .band-main p{
  text-align:center !important;
  margin-inline:auto !important;
}
html[data-platform="drill"] section.wrap.band .cta{
  justify-content:center !important;
  flex-wrap:wrap !important;
  width:100% !important;
}

html[data-platform="drill"] section.wrap.band{
  margin-left:auto !important;
  margin-right:auto !important;
  margin-top:1rem !important;
  margin-bottom:2.6rem !important;
  width:auto !important;
  max-width:1120px !important;
}

/* ═══ قائمة الهيدر: لوحة بيضاء ونصوص داكنة (2026-10-21) ═══
   كانت اللوحة سوداء والنصوص داكنة ⇒ تباين 1.06:1. */
html[data-platform="drill"] .ch-menu{
  background:#FFFFFF !important;
  background-image:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  border:1px solid #DCE9E4 !important;
  box-shadow:0 20px 44px rgba(20,26,46,.16) !important;
}
html[data-platform="drill"] .ch-menu__g{
  color:#4E665E !important;
  letter-spacing:.01em !important;
}
html[data-platform="drill"] .ch-menu a{
  color:#14241F !important;
  border-radius:10px !important;
}
html[data-platform="drill"] .ch-menu__note{
  color:#5C7068 !important;
}
html[data-platform="drill"] .ch-menu a:hover,
html[data-platform="drill"] .ch-menu a:focus-visible{
  background:#EFF7F4 !important;
  color:#0B7A5E !important;
}
html[data-platform="drill"] .ch-menu a[aria-current="page"],
html[data-platform="drill"] .ch-menu a.on{
  color:#0B7A5E !important;
  font-weight:700 !important;
}




/* العنوان في الإنجليزية: العلامة أوّلًا من اليسار */
html[lang="en"] .hero h1{
  direction:ltr !important;
  unicode-bidi:isolate !important;
}
html[lang="en"] .hero h1 .hl{ margin-inline-end:.15em; }








/* ═══ مسحة القياس + تكبير العلامة (2026-10-21) ═══ */
html[data-platform="drill"] .hero h1 .hl{
  font-size:1.18em;
  line-height:1;
  letter-spacing:-.01em;
  background-image:linear-gradient(100deg,
    #0B7A5E 0%, #0B7A5E 28%,
    #2BC79C 44%, #0FA97C 50%, #2BC79C 56%,
    #0B7A5E 72%, #0B7A5E 100%);
  background-size:200% 100%;
  background-position:0 0;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  -webkit-text-fill-color:transparent;
  text-shadow:none;
}
html[data-platform="drill"] .hero h1 .hl.sweep,
html[data-platform="drill"] .hero h1 .hl:hover{
  animation:drillSweep 1.05s cubic-bezier(.22,.68,.25,1) 1 both;
}
@keyframes drillSweep{
  0%{ background-position:100% 0; }
  100%{ background-position:0 0; }
}
@media (prefers-reduced-motion: reduce){
  html[data-platform="drill"] .hero h1 .hl.sweep,
  html[data-platform="drill"] .hero h1 .hl:hover{ animation:none; }
}


/* ═══ أيقونة السلة (2026-10-21) ═══ */
html[data-platform="drill"] .d-cart-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
html[data-platform="drill"] .d-cart-ic{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
}
html[data-platform="drill"] .d-cart-svg{
  width:21px;height:21px;
  display:block;
  color:currentColor;
}
html[data-platform="drill"] .d-cart-btn:hover .d-cart-svg{ color:#0B7A5E; }

/* ═══ عناوين بطاقات المسارات: قصّ بثلاث نقاط بدل قطع حاد (2026-10-21) ═══ */
html[data-platform="drill"] article.card > h3{
  display:-webkit-box !important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  line-clamp:3;
  overflow:hidden;
  height:auto !important;
  max-height:none !important;
  text-overflow:ellipsis;
  white-space:normal;
}
@media (max-width:560px){
  html[data-platform="drill"] article.card > h3{ -webkit-line-clamp:4; line-clamp:4; }
}

/* توحيد لون Drill مع صفحة dr التسويقية */
html[data-platform="drill"]{--id-accent:#B45309 !important;--accent:#B45309 !important;--accent-2:#B45309 !important;--accent-hover:#C2703A !important}
html[data-platform="drill"] .btn[type=submit]{background:#B45309 !important;border-color:#B45309 !important;color:#fff !important}


/* ═══ 2026-10-30 · إزالة إرث الليل من الأزرار ═══
   القاعدة العامة في أعلى الملف تُلبس كلَّ زرٍّ نصًّا أبيض، وهي صحيحة فقط لزرٍّ
   له تعبئة ملوّنة. الزرّ الأساسيّ هنا بلا تعبئة ⇒ أبيض على شبه أبيض = 1.09:1.
   نُعيد له تعبئةً عنبرية داكنة (‎#B45309‎) تضمن 4.5:1 مع النصّ الأبيض. */
html[data-platform="drill"] .btn.big:not(.ghost),
html[data-platform="drill"] a.btn.big:not(.ghost),
html[data-platform="drill"] .btn:not(.ghost).solid {
  background: #B45309 !important;
  border-color: #B45309 !important;
  color: #FFFFFF !important;
}
html[data-platform="drill"] .btn.big:not(.ghost):hover,
html[data-platform="drill"] a.btn.big:not(.ghost):hover {
  background: #92400E !important;
  border-color: #92400E !important;
}


/* 2026-10-30 · الشبح: النصّ العنبري الفاتح #B45309 على أبيض = 3.19:1.
   نُغمّقه إلى #B45309 (نفس زوج التعبئة الأساسيّ) = 5.02:1، فيبقى الهوية بلا فقد. */
html[data-platform="drill"] .btn.ghost,
html[data-platform="drill"] .btn.ghost.big,
html[data-platform="drill"] a.btn.ghost,
html[data-platform="drill"] a.btn.big.ghost {
  color: #B45309 !important;
  background: #FFFFFF !important;
  border-color: #C2703A !important;
}
html[data-platform="drill"] .btn.ghost:hover,
html[data-platform="drill"] .btn.ghost.big:hover {
  color: #FFFFFF !important;
  background: #B45309 !important;
  border-color: #B45309 !important;
}
