/* =====================================================================
   التصميم الجديد «نقاء» (معتمد ومفعّل للجميع من ١ نوفمبر ٢٠٢٦؛ ?dv2=0 يرجّع القديم على الجهاز)
   مستوحى من واجهة «الحرم الآن»: خلفية فاتحة مائلة للنعناعي، بطاقات بيضاء
   بحواف كبيرة وظل ضبابي ناعم بدل الحدود الرمادية، أخضر هادي للمختار،
   ومسافات أوسع. كل القواعد تحت html.dv2 عشان تنطفي وتشتغل بكلاس واحد.
   التوثيق الكامل: docs/DESIGN-SYSTEM.md
   ===================================================================== */
html.dv2 {
  --dv-bg-top: #eaf1ee;
  --dv-bg: #f4f7f6;
  --dv-card: #ffffff;
  --dv-edge: rgba(16, 48, 42, 0.06);
  --dv-sep: rgba(16, 48, 42, 0.07);
  --dv-shadow: 0 1px 2px rgba(16, 48, 42, 0.04), 0 10px 28px -10px rgba(16, 48, 42, 0.14);
  --dv-shadow-sm: 0 1px 2px rgba(16, 48, 42, 0.05), 0 4px 14px -6px rgba(16, 48, 42, 0.12);
  --dv-accent: #0d4f3c;
  --dv-accent-ink: #ffffff;
  --dv-chip: #eceff0;
  --dv-chip-ink: #3c4a47;
  --dv-cream: #fbf7ee;
  --dv-cream-edge: #e2cf9f;
  --dv-r-card: 22px;
  --dv-r-row: 16px;
  --dv-r-ctl: 14px;
}
html.dv2[data-theme="dark"] {
  --dv-bg-top: #0f1d1a;
  --dv-bg: #0b1513;
  --dv-card: #14221f;
  --dv-edge: rgba(255, 255, 255, 0.06);
  --dv-sep: rgba(255, 255, 255, 0.07);
  --dv-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -10px rgba(0, 0, 0, 0.55);
  --dv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px -6px rgba(0, 0, 0, 0.5);
  --dv-accent: #1f7a5c;
  --dv-accent-ink: #ffffff;
  --dv-chip: #1c2d29;
  --dv-chip-ink: #b9cec7;
  --dv-cream: #221f15;
  --dv-cream-edge: #5d4f2a;
}

/* المتغيرات العامة للموقع: الخلفية رمادي فاتح مائل للبياض، والحدود شبه شفافة
   (كثير من القواعد القديمة تستخدم var(--line) و var(--bg) مع !important، فتغييرها هنا يوصل لكل مكان) */
html.dv2.ds3[data-theme="light"],
html.dv2.ds3:not([data-theme]) {
  --bg: #f3f6f5;
  --line: rgba(16, 48, 42, 0.08);
  --accent-2: #e8efec;
}
html.dv2.ds3[data-theme="dark"] {
  --bg: #0b1513;
  --card: #14221f;
  --line: rgba(255, 255, 255, 0.07);
}
/* الحقول تبقى حدودها واضحة عشان الطالب يعرف وين يكتب */
html.dv2 body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.dv2 body select,
html.dv2 body textarea {
  border-color: rgba(16, 48, 42, 0.16);
}
html.dv2[data-theme="dark"] body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.dv2[data-theme="dark"] body select,
html.dv2[data-theme="dark"] body textarea {
  border-color: rgba(255, 255, 255, 0.16);
}

/* ١) الخلفية: فاتحة مائلة للنعناعي، تتدرج شوي من فوق */
html.dv2 body {
  background: linear-gradient(180deg, var(--dv-bg-top) 0, var(--dv-bg) 360px) var(--dv-bg);
  background-attachment: scroll;
}
html.dv2 body .wrap,
html.dv2 body #pT2,
html.dv2 body #tBody {
  background: transparent;
}

/* ٢+٣) البطاقات: أبيض صافي، حواف كبيرة، ظل ضبابي بدل الحد الرمادي */
html.dv2 body .t2list2,
html.dv2 body .t3hList,
html.dv2 body .t2p,
html.dv2 body .t2grp,
html.dv2 body .t2tile,
html.dv2 body .t2wide,
html.dv2 body .t3hK,
html.dv2 body .qedList,
html.dv2 body .qedRep,
html.dv2 body p.card,
html.dv2 body div.card,
html.dv2 body details.chapter-details,
html.dv2 body .lcard {
  background: var(--dv-card);
  border: 1px solid var(--dv-edge);
  border-radius: var(--dv-r-card);
  box-shadow: var(--dv-shadow);
}
html.dv2 body .lcard,
html.dv2 body .t3hK,
html.dv2 body .t2tile {
  border-radius: 20px;
  box-shadow: var(--dv-shadow-sm);
}
/* بطاقة مميزة (اختبار الفصل): كريمي بحد ذهبي رفيع مثل «الأنسب الآن» */
html.dv2 body .lcard.exam,
html.dv2 body :is(#home, #extraCards) .lcard.exam {
  background: var(--dv-cream);
  border-color: var(--dv-cream-edge);
}
/* الصفوف داخل القوائم: فاصل خفيف جدًا بدل الخط الرمادي */
html.dv2 body .t2lr,
html.dv2 body .t3hR,
html.dv2 body .qedRow {
  border-color: var(--dv-sep);
}
html.dv2 body .t2list2 > :last-child,
html.dv2 body .t3hList > :last-child {
  border-bottom-color: transparent;
}

/* ٤) مسافات أوسع */
html.dv2 body .t3hH {
  margin-top: 30px;
  margin-bottom: 12px;
}
html.dv2 body .t3hKs {
  gap: 12px;
}
html.dv2 body .t2p {
  padding: 18px;
}
html.dv2 body .t2list2,
html.dv2 body .t3hList {
  margin-bottom: 18px;
}
html.dv2 body .t2lr,
html.dv2 body .t3hR {
  padding-block: 14px;
}

/* ٥) الشعب والفلاتر: مستطيلات كاملة الاستدارة، رمادي خفيف وأخضر هادي للمختار */
html.dv2 body .t2chips button {
  border: 0;
  border-radius: 999px;
  background: var(--dv-chip);
  color: var(--dv-chip-ink);
  box-shadow: none;
}
html.dv2 body .t2chips button.on {
  background: var(--dv-accent);
  color: var(--dv-accent-ink);
  box-shadow: var(--dv-shadow-sm);
}
/* التبويبات (المقرر|التحصيلي، تبويبات الأقسام، الفلاتر): حاوية بيضاء والمختار أخضر بالعرض */
html.dv2 body .t2mode,
html.dv2 body .t2sub,
html.dv2 body .t2cSeg {
  background: var(--dv-card);
  border: 1px solid var(--dv-edge);
  border-radius: 999px;
  box-shadow: var(--dv-shadow-sm);
  padding: 5px;
}
html.dv2 body .t2mode button,
html.dv2 body .t2sub button,
html.dv2 body .t2cSeg button {
  border-radius: 999px;
}
html.dv2 body .t2mode button.on,
html.dv2 body .t2sub button.on,
html.dv2 body .t2cSeg button.on {
  background: var(--dv-accent);
  color: var(--dv-accent-ink);
}
html.dv2 body.t2tah .t2mode button.on {
  background: #e0a100;
  color: #2b1d00;
}
/* البحث والحقول */
html.dv2 body .t2srch,
html.dv2 body .t2cmd input {
  background: var(--dv-card);
  border: 1px solid var(--dv-edge);
  border-radius: 999px;
  box-shadow: var(--dv-shadow-sm);
}

/* البطاقات اللي تطلع من الأسفل: حواف أكبر */
html.dv2 body .sheet-shell.bottom-sheet {
  border-radius: 28px 28px 0 0;
}

/* القواعد القديمة للشعب فيها !important على var(--card)/var(--line)/var(--fg)،
   فنغيّر المتغيرات نفسها داخل الزر بدل ما نزيد !important */
html.dv2 body .t2chips button,
html.dv2 body .t2chp button {
  --card: var(--dv-chip);
  --line: transparent;
  --fg: var(--dv-chip-ink);
}
html.dv2 body .t2chips button.on,
html.dv2 body .t2chp button.on {
  --accent: var(--dv-accent);
}

/* =====================================================================
   الجولة ٢ (٣١ أكتوبر ٢٢:١٠، طلب المعلم: فروق أوضح، مسافات متناسقة،
   رأس الصفحة، وشريط سفلي عائم يصغر وقت التمرير)
   ===================================================================== */

/* مقياس المسافات الموحد: ٤ / ٨ / ١٢ / ١٦ / ٢٠ / ٢٨ */
html.dv2 {
  --dv-s1: 4px;
  --dv-s2: 8px;
  --dv-s3: 12px;
  --dv-s4: 16px;
  --dv-s5: 20px;
  --dv-s6: 28px;
}

/* ٦) رأس الصفحة: زجاجي شفاف يندمج مع الخلفية بدل الشريط البيج */
html.dv2 body aside.brand {
  background: color-mix(in srgb, var(--dv-bg-top) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 0;
  box-shadow: 0 1px 0 var(--dv-edge);
}
html.dv2 body aside.brand .blogo {
  border-radius: 12px;
  box-shadow: var(--dv-shadow-sm);
}
html.dv2 body:has(#teacher:not([hidden])) .brand h1::after {
  background: var(--dv-card);
  color: var(--dv-accent);
  border-radius: 999px;
  padding: 3px 12px;
  box-shadow: var(--dv-shadow-sm);
  margin-inline-start: 6px;
}
html.dv2 body.t2 #t2me {
  box-shadow: 0 0 0 3px var(--dv-card), var(--dv-shadow-sm);
}

/* ٧) عناوين الأقسام والصفحات: إيقاع ثابت */
html.dv2 body #pT2 .t2hd h2 {
  letter-spacing: -0.01em;
}
html.dv2 body .t3hH,
html.dv2 body .t3hHr {
  margin: var(--dv-s6) 0 var(--dv-s3);
}
html.dv2 body .t3hHr .t3hH {
  margin: 0;
}
html.dv2 body .t3hH {
  font-size: 1.15rem;
}
html.dv2 body .t3hHr .lnk {
  border-radius: 999px;
  padding-inline: 14px;
}

/* ٨) بطاقات الأرقام: أيقونة ملونة صغيرة فوق الرقم، ورقم أكبر */
html.dv2 body .t3hKs,
html.dv2 body .t3hKs.t3hKsm {
  gap: var(--dv-s3);
  margin-top: var(--dv-s4);
}
html.dv2 body .t3hKsm .t3hK {
  padding: var(--dv-s4) var(--dv-s3);
  gap: 6px;
}
html.dv2 body .t3hKsm .t3hK .ic {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
html.dv2 body .t3hKsm .t3hK b {
  font-size: 1.45rem;
  line-height: 1.2;
}

/* ٩) صفوف القوائم: ارتفاع واحد ومسافات داخلية واحدة */
html.dv2 body .t3hR,
html.dv2 body .t2lr {
  padding: 14px var(--dv-s4);
  gap: var(--dv-s3);
}
html.dv2 body .t3hR .ic {
  border-radius: 12px;
}

/* ١٠) الشريط السفلي (الجوال والتابلت): عائم بحواف مستديرة، ويصغر وقت التمرير */
@media (max-width: 1099px) {
  html.dv2 body.t2 {
    padding-bottom: 112px;
  }
  html.dv2 body.t2.bold .t2nav {
    left: 0;
    right: 0;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 24px);
    max-width: 560px;
    margin-inline: auto;
    padding: 6px;
    border-radius: 26px;
    box-shadow: 0 14px 36px -10px rgba(11, 58, 45, 0.55), 0 2px 6px rgba(11, 58, 45, 0.18);
    transition: max-width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), padding 0.35s, bottom 0.35s, border-radius 0.35s;
  }
  html.dv2 body.t2.bold .t2nav button {
    min-height: 58px;
    border-radius: 20px;
    transition: min-height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  /* وقت التمرير: يصغر لشريط أيقونات صغير في الوسط */
  html.dv2.dv-moving body.t2.bold .t2nav {
    max-width: 292px;
    padding: 4px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px;
  }
  html.dv2.dv-moving body.t2.bold .t2nav button {
    min-height: 0;
    height: 38px;
    overflow: hidden;
    justify-content: flex-start;
  }
  html.dv2.dv-moving body.t2.bold .t2nav button svg {
    flex: none;
    width: 20px;
    height: 20px;
    padding: 9px 11px;
  }
  /* زر «إجراء سريع» فوق الشريط العائم، ويصغر معه */
  html.dv2 body.t2 #bxFab {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), bottom 0.35s;
  }
  html.dv2.dv-moving body.t2 #bxFab {
    transform: scale(0.82);
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  html.dv2 body.t2.bold .t2nav,
  html.dv2 body.t2.bold .t2nav button,
  html.dv2 body.t2 #bxFab {
    transition: none;
  }
}

/* =====================================================================
   الجولة ٣ (٣١ أكتوبر، بعد جلسة النقد التفصيلي) — النسخة المرشحة للاعتماد
   ===================================================================== */

/* ١١) إيقاع الأقسام في لوحة المعلم: اللوحة نفسها flex بفراغ ١٦،
   فنضبط الهوامش عشان يصير بين القسم والقسم ٣٢ وبين العنوان ومحتواه ١٢ */
html.dv2 body #pT2 > .t3hList,
html.dv2 body #pT2 > .t2list2 {
  margin-bottom: 0;
}
html.dv2 body #pT2 > .t3hH,
html.dv2 body #pT2 > .t3hHr {
  margin: var(--dv-s4) 0 -4px;
}

/* ١٢) الذهبي للتحصيلي بس: بطاقة «درس الأسبوع» بدون الإطار الذهبي، وزر «لم ينهوا» أخضر */
html.dv2 body .t3lc.wk {
  box-shadow: var(--dv-shadow);
}
html.dv2 body .t3wkB {
  border-color: transparent;
  background: var(--dv-card);
  box-shadow: var(--dv-shadow-sm);
}
html.dv2 body .t3wkB.gold {
  background: var(--dv-accent);
  border-color: var(--dv-accent);
  color: var(--dv-accent-ink);
}
html.dv2 body.t2tah .t3wkB.gold {
  background: #e0a100;
  border-color: #e0a100;
  color: #2b1d00;
}

/* ١٣) بطاقات الأرقام: «لا يوجد» تصير ٠ (نفس شكل باقي الأرقام)، وأرقام بعرض ثابت */
html.dv2 body .t3hK .zero-note {
  font-size: 0;
}
html.dv2 body .t3hK .zero-note::after {
  content: "٠";
  font-size: 1.45rem;
}
html.dv2 body .t3hK b,
html.dv2 body .t2kp b,
html.dv2 body .t2sc .n {
  font-variant-numeric: tabular-nums;
}

/* ١٤) الشريط السفلي: المختار أيقونة بيضاء على الأخضر (الذهبي يبقى للتحصيلي) */
@media (max-width: 1099px) {
  html.dv2 body.t2.bold:not(.t2tah) .t2nav button.on svg {
    background: #fff;
    color: var(--dv-accent);
    stroke: var(--dv-accent);
  }
}
@media (min-width: 1100px) {
  html.dv2 body.t2.bold:not(.t2tah) .t2nav button.on {
    --c-gold-3: #fff;
  }
}

/* ١٥) الشبكات: لا تبقى بطاقة يتيمة في آخر سطر على الجوال */
@media (max-width: 559px) {
  html.dv2 body .t2scs > .t2sc:first-child:nth-last-child(odd),
  html.dv2 body .t2tiles > .t2tile:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* ١٦) التبويبات اللي ما تكفيها الشاشة: تلاشي ناعم من الطرف يوضح إن فيه زيادة (dv-ovf من design-v2.js) */
html.dv2 body .dv-ovf {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent);
}

/* ١٧) صندوق البلاغات/المفاتيح: العنوان بسطر، والحالة والزر تحته */
html.dv2 body .qedBoxH {
  align-items: center;
  gap: 6px 10px;
}
html.dv2 body .qedBoxH h3 {
  flex: 1 1 100%;
  font-size: 1.08rem;
}
html.dv2 body .qedBoxH .lnk {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.82rem;
}

/* ١٨) البحث والترتيب في صفحة الطلاب: حبوب بيضاء بنفس الارتفاع */
html.dv2 body .t2fl #t2sq,
html.dv2 body .t2fl select,
html.dv2 body .t2fl .t2ck {
  min-height: 46px;
  border-radius: 999px;
  border-color: var(--dv-edge);
  background-color: var(--dv-card);
  box-shadow: var(--dv-shadow-sm);
}
html.dv2 body .t2fl #t2sq {
  flex: 1 1 100%;
  padding-inline: 18px;
}
html.dv2 body .t2fl .t2ck {
  padding-inline: 14px;
}
html.dv2 body .t2fl select,
html.dv2 body .t2fl .t2ck {
  flex: 1 1 0;
  min-width: 0;
}
html.dv2 body .t2fl .t2ck input {
  accent-color: var(--dv-accent);
}

/* ١٩) صفحة الطالب: بطاقات الاختبار بحد كريمي متصل بدل المتقطع، وبدون فراغات من الصناديق الفاضية */
html.dv2 body :is(#home, #extraCards) .lcard.exam {
  border-style: solid;
}
html.dv2 body #home > :empty {
  display: none;
}

/* ٢٠) لمسة الضغط والتركيز: كل زر يصغر شوي لما تضغطه، وحلقة تركيز خضراء واضحة للكيبورد */
html.dv2 body :is(.t2chips button, .t2sub button, .t2mode button, .t2tile, .t2wide, .t2sc, .t3hR, .lcard, .t3wkB, .t2nav button) {
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
html.dv2 body :is(.t2chips button, .t2sub button, .t2tile, .t2wide, .t2sc, .t3hR, .lcard, .t3wkB):active {
  transform: scale(0.97);
}
html.dv2 body :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--dv-accent);
  outline-offset: 2px;
}
html.dv2 ::selection {
  background: rgba(13, 79, 60, 0.18);
}
@media (prefers-reduced-motion: reduce) {
  html.dv2 body :is(.t2chips button, .t2sub button, .t2tile, .t2wide, .t2sc, .t3hR, .lcard, .t3wkB):active {
    transform: none;
  }
}

/* ٢٢) الليلي: الأخضر المختار أغمق شوي عشان النص الأبيض يقرأ (تباين ٥:١ بدل ٣:١) */
html.dv2[data-theme="dark"] body .t2sc.on {
  --accent: #155c47;
  border-color: transparent;
}
html.dv2 body :is(.t2sub, .t2cSeg, .t2mode) button.on {
  --accent: var(--dv-accent);
}

/* =====================================================================
   الجولة ٤ (٣١ أكتوبر ليلًا): صفحات الطالب
   ===================================================================== */

/* ٢٣) بطاقات الرئيسية الجديدة (خطة الأسبوع، الاختبار النهائي، لوحة الصدارة، المهام): أبيض بظل ناعم بدل الحد */
html.dv2 body.hm2 .h2W,
html.dv2 body .rank-strip {
  background: var(--dv-card);
  border-color: var(--dv-edge);
  border-radius: var(--dv-r-card);
  box-shadow: var(--dv-shadow);
}

/* ٢٤) خيارات الأسئلة: بطاقات بيضاء بحواف ١٦ وظل خفيف (الصح والغلط يبقون بألوانهم) */
html.dv2 body .challenge-options button:not(.ok):not(.no) {
  background: var(--dv-card);
  border-color: var(--dv-edge);
  box-shadow: var(--dv-shadow-sm);
}
html.dv2 body .challenge-options button {
  border-radius: var(--dv-r-row);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
html.dv2 body .challenge-options button:active {
  transform: scale(0.98);
}

/* ٢٥) شريط الطالب السفلي: عائم أبيض بحواف مستديرة (نفس فكرة شريط المعلم بلون فاتح) */
@media (max-width: 1099px) {
  html.dv2 body:not(.t2).hasNav {
    padding-bottom: 100px;
  }
  html.dv2 body:not(.t2) #bNav {
    inset-inline: 0;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 24px);
    max-width: 560px;
    margin-inline: auto;
    padding-block: 6px;
    border: 1px solid var(--dv-edge);
    border-radius: 26px;
    background: color-mix(in srgb, var(--dv-card) 92%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 14px 36px -12px rgba(16, 48, 42, 0.35), 0 2px 6px rgba(16, 48, 42, 0.08);
  }
  html.dv2[data-theme="dark"] body:not(.t2) #bNav {
    box-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
}

/* ٢٦) الليلي: بطاقة «كمّل من حيث وقفت» وبطاقة الفصل المختار كانت أخضر فاتح والنص الأبيض عليها باهت — أغمق شوي */
html.dv2[data-theme="dark"] body #contGo,
html.dv2[data-theme="dark"] body #h2car .cv.sel {
  --accent: #17644c;
  --g: #17644c;
}

/* ٢٧) بطاقة «خطة اليوم» (المرحلة ج١) بنفس شكل البطاقات */
html.dv2 body .planC {
  background: var(--dv-card);
  border-color: var(--dv-edge);
  border-radius: var(--dv-r-card);
  box-shadow: var(--dv-shadow);
}
html.dv2 body .planI {
  border-color: var(--dv-edge);
  box-shadow: var(--dv-shadow-sm);
  transition: transform 0.15s ease;
}
html.dv2 body .planI:active {
  transform: scale(0.98);
}
html.dv2 body .planTag,
html.dv2 body .planI .st,
html.dv2 body .planBar i {
  background-color: var(--dv-accent);
}
html.dv2 body .planI.ok .st {
  background: color-mix(in srgb, var(--dv-accent) 14%, transparent);
  color: var(--dv-accent);
}

/* ٢٨) حسابات الطلاب عند المعلم (الجوال): كل طالب «بطاقة طالب» بنفس روح البطاقة اللي تطلع للطالب أول ما يسجل
   (أخضر متدرج، خطوط ذهبية خفيفة على الطرف، الرمز بخانة ذهبية) — طلب المعلم ١ نوفمبر */
@media (max-width: 700px) {
  html.dv2 body #aTbl table.rt tr {
    --card: rgba(255, 255, 255, 0.1);
    --fg: #fff;
    --line: rgba(255, 255, 255, 0.16);
    --muted: rgba(220, 240, 232, 0.75);
    --accent-2: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    color: #fff;
    border: 0;
    border-radius: 24px;
    background: linear-gradient(150deg, #13664e, #093a2c);
    box-shadow: 0 14px 30px -14px rgba(9, 58, 44, 0.6);
    margin-bottom: 14px;
  }
  html.dv2 body #aTbl table.rt tr::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 56px;
    background: repeating-linear-gradient(170deg, transparent 0 14px, rgba(255, 209, 102, 0.16) 14px 17px);
    pointer-events: none;
  }
  html.dv2 body #aTbl table.rt td {
    position: relative;
  }
  html.dv2 body #aTbl table.rt .ai,
  html.dv2 body #aTbl table.rt select.ai {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
  }
  html.dv2 body #aTbl table.rt select.ai option {
    color: #10231e;
  }
  html.dv2 body #aTbl table.rt td:nth-child(2) .ai {
    background: transparent;
    border-color: transparent;
    font-size: 1.2rem;
    padding-inline: 4px;
  }
  html.dv2 body #aTbl table.rt td:nth-child(2) .ai:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
  }
  html.dv2 body #aTbl table.rt td:nth-child(5) .ai.code {
    background: #ffd166;
    border-color: #ffd166;
    color: #093a2c;
    font-family: ui-monospace, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.25em;
  }
  html.dv2 body #aTbl table.rt td:nth-child(5) [data-gen],
  html.dv2 body #aTbl table.rt td.account-actions [data-rw] {
    background: rgba(255, 255, 255, 0.12);
    border-color: transparent;
    color: #fff;
  }
  html.dv2 body #aTbl table.rt td:is(:nth-child(6), :nth-child(7), :nth-child(8)) {
    color: #fff;
  }
  html.dv2 body #aTbl table.rt td .sub {
    color: rgba(220, 240, 232, 0.75);
  }
  html.dv2 body #aTbl table.rt td.account-actions [data-save] {
    background: #fff;
    border-color: #fff;
    color: #0d4f3c;
    font-weight: 700;
  }
  html.dv2 body #aTbl table.rt td.account-actions [data-adel] {
    background: transparent;
    border-color: rgba(255, 170, 160, 0.55);
    color: #ffc9c2;
  }
  html.dv2 body #aTbl table.rt td:nth-child(1) input {
    accent-color: #ffd166;
  }
}

/* ٢٩) هيدر عائم (اعتماد المعلم ١ نوفمبر «عائم مع اختفاء»): بدون شريط — الشعار و«لوحة المعلم» والحساب فوق الصفحة،
   ووراهم تغبيش متدرّج (قوي عند حافة الشاشة ويخف لين يختفي). لما تنزل ينسحب لفوق ويبقى تغبيش خفيف عند الحافة، ويرجع إذا طلعت.
   الجوال بس (المعلم: aside.brand الثابت، الطالب: #hxBar اللي يطلع وقت التمرير). الاختفاء: كلاس dv-hide من design-v2.js.
   لون الهيدر القديم مثبّت بـ !important على var(--hxB) في app.css — نصفّر المتغير على الهيدر نفسه بس ونرجّعه لأولاده. */
@media (max-width: 1099px) {
  html.dv2 {
    --dv-hxb0: var(--hxB);
    --dv-float-tail: 34px;
  }
  html.dv2 body.t2 aside.brand,
  html.dv2 body.stuHd #hxBar.on {
    --hxB: transparent;
    --hxBr: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    border-bottom-color: transparent;
    isolation: isolate;
    overflow: visible;
    transition: transform 0.28s cubic-bezier(0.2, 0, 0, 1);
  }
  html.dv2 body.t2 aside.brand > *,
  html.dv2 body.stuHd #hxBar.on > * {
    --hxB: var(--dv-hxb0);
  }
  html.dv2 body.t2 aside.brand::before,
  html.dv2 body.t2 aside.brand::after,
  html.dv2 body.stuHd #hxBar.on::before,
  html.dv2 body.stuHd #hxBar.on::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: calc(100% + var(--dv-float-tail));
    z-index: -1;
    pointer-events: none;
  }
  html.dv2 body.t2 aside.brand::before,
  html.dv2 body.stuHd #hxBar.on::before {
    background: linear-gradient(to bottom, color-mix(in srgb, var(--dv-bg-top) 58%, transparent), color-mix(in srgb, var(--dv-bg-top) 40%, transparent) 60%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(1.8);
    backdrop-filter: blur(22px) saturate(1.8);
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 78%);
    mask-image: linear-gradient(to bottom, #000 45%, transparent 78%);
  }
  html.dv2 body.t2 aside.brand::after,
  html.dv2 body.stuHd #hxBar.on::after {
    -webkit-backdrop-filter: blur(6px) saturate(1.4);
    backdrop-filter: blur(6px) saturate(1.4);
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
    mask-image: linear-gradient(to bottom, #000 60%, transparent);
  }
  html.dv2.dv-hide body.t2 aside.brand,
  html.dv2.dv-hide body.stuHd #hxBar.on {
    transform: translateY(-100%);
  }
  /* وهو مسحوب: يبقى ذيل التغبيش عند حافة الشاشة (قوي فوق ويخف لتحت) */
  html.dv2.dv-hide body.t2 aside.brand::before,
  html.dv2.dv-hide body.stuHd #hxBar.on::before {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--dv-float-tail)), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - var(--dv-float-tail)), transparent);
  }
  html.dv2.dv-hide body.t2 aside.brand::after,
  html.dv2.dv-hide body.stuHd #hxBar.on::after {
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 0;
  }
}
@media (max-width: 1099px) and (prefers-reduced-motion: reduce) {
  html.dv2 body.t2 aside.brand,
  html.dv2 body.stuHd #hxBar.on {
    transition: none;
  }
}
