/* ============================================================
   بطاقاتُ الاختيار — شاشةٌ واحدةٌ بأربعِ حالات: الصفُّ، الفرعُ، المادةُ، الدرس.
   منقولةٌ من index.html القديمِ ليَخدمَ نصُّها الشاشاتِ كلَّها بلا تكرار.
   ============================================================ */
html, body { height: auto; min-height: 100%; overflow: auto; }
.wrap { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 5vh 5vw 8vh; }
.top { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 3.2vh; }
.top h1 { font-size: clamp(1.6rem, 4.4vmin, 3rem); font-weight: 900; line-height: 1.25; }
.hello { color: var(--mut); font-size: clamp(.86rem, 1.8vmin, 1.08rem); line-height: 1.7; max-width: 62ch; }

/* صفّان متوازنان لوحدةٍ من أربعة دروس (٢+٢)، لا ثلاثةٌ ويتيم */
.cards3 { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(330px, 88vw), 1fr)); }
@media (min-width: 1100px) { .unit-4 .cards3 { grid-template-columns: repeat(2, 1fr); } }

.lcardx { background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 1.3rem 1.4rem;
  display: flex; flex-direction: column; gap: .75rem; position: relative; overflow: hidden;
  text-decoration: none; color: inherit; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0s); }
.lcardx::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px;
  background: linear-gradient(180deg, var(--ac), var(--ac2)); }
.lcardx:hover { transform: translateY(-4px); border-color: var(--ac);
  box-shadow: 0 16px 44px color-mix(in srgb, var(--ac) 18%, transparent); }
.lnum { font-family: var(--mono); font-size: clamp(1.8rem, 4.6vmin, 3rem); font-weight: 800;
  color: transparent; -webkit-text-stroke: 1.4px color-mix(in srgb, var(--ac) 85%, transparent); line-height: 1; }
/* شعارُ المادّةِ أو حرفُ الفرعِ مكانَ رقمِ الدرس */
.glyph { font-size: clamp(1.9rem, 4.8vmin, 2.9rem); line-height: 1; }
.glyph.ltrstroke { font-family: var(--mono); font-weight: 800; color: transparent;
  -webkit-text-stroke: 1.4px color-mix(in srgb, var(--ac) 85%, transparent); }
.lt2 { font-size: clamp(1.02rem, 2.3vmin, 1.4rem); font-weight: 800; line-height: 1.35; }
.ls2 { color: var(--mut); font-size: clamp(.8rem, 1.6vmin, .98rem); line-height: 1.65; }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .2rem; }
.tag { font-size: clamp(.68rem, 1.35vmin, .82rem); background: color-mix(in srgb, var(--ac) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ac) 30%, transparent); color: var(--ac);
  border-radius: 999px; padding: .2rem .62rem; font-weight: 600; }
.meta3 { display: flex; gap: .9rem; align-items: center; color: var(--mut2); font-size: .82rem;
  font-family: var(--mono); margin-top: auto; padding-top: .5rem; }
.go { margin-inline-start: auto; color: var(--ac); font-weight: 800; font-family: inherit; font-size: .9rem; }

/* بطاقةٌ لا محتوى لها بعدُ: تُرى ولا تُنقَر — فالطالبُ يرى الخريطةَ كاملةً */
.lcardx.soon { opacity: .46; cursor: default; filter: saturate(.5); }
.lcardx.soon:hover { transform: none; border-color: var(--line); box-shadow: none; }
.lcardx.soon .go { color: var(--mut2); }

/* فتاتُ الطريق: كلُّ الصفوفِ ← الصفُّ التاسعُ ← العلومُ والحياة */
.crumbs { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .88rem; }
.crumbs a, .crumbs span.here { text-decoration: none; display: inline-flex; align-items: center; gap: .45rem;
  padding: .34rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--glass);
  color: var(--mut); font-weight: 700; transition: color .18s ease, border-color .18s ease; }
.crumbs a:hover { color: var(--cyan); border-color: var(--cyan); }
.crumbs span.here { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); }
.crumbs i { color: var(--mut2); font-style: normal; }

.foot { margin-top: 4vh; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
  color: var(--mut2); font-size: .82rem; }
#bTheme { position: fixed; top: 14px; left: 14px; z-index: 40; }

/* عناوينُ التجميع: المرحلةُ، والفصلُ الدراسيُّ، والوحدة */
.stage + .stage, .unit + .unit { margin-top: 4.5vh; }
.term + .term { margin-top: 6.5vh; }
.stage-h { display: flex; align-items: center; gap: .9rem; margin-bottom: 2.6vh;
  font-size: clamp(1.3rem, 3.4vmin, 2rem); font-weight: 900; color: var(--cyan); }
.stage-h::after { content: ""; flex: 1; height: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--cyan) 65%, transparent), transparent); }
.stage-h small { color: var(--mut2); font-size: .5em; font-weight: 600; }
.term-h { display: flex; align-items: center; gap: .9rem; margin-bottom: 2.6vh;
  font-size: clamp(1.25rem, 3.2vmin, 1.9rem); font-weight: 900; color: var(--violet); }
.term-h::after { content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--violet) 55%, transparent), transparent); }
.term-h b { font-family: var(--mono); font-size: .62em; font-weight: 800; color: var(--violet);
  border: 1px solid color-mix(in srgb, var(--violet) 45%, transparent); border-radius: 999px; padding: .18rem .8rem; }
.term-h small { color: var(--mut2); font-size: .5em; font-weight: 600; }
.term-nav { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.term-nav a { text-decoration: none; font-size: clamp(.78rem, 1.6vmin, .95rem); font-weight: 700;
  color: var(--mut); background: var(--glass); border: 1px solid var(--line);
  border-radius: 999px; padding: .34rem .9rem; transition: color .18s ease, border-color .18s ease; }
.term-nav a:hover { color: var(--violet); border-color: var(--violet); }
.unit-h { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.4vh;
  font-size: clamp(1.1rem, 2.8vmin, 1.6rem); font-weight: 900; }
.unit-h span { color: var(--cyan); font-size: .72em; font-weight: 800;
  border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); border-radius: 999px; padding: .1rem .7rem; }
.unit-h small { color: var(--mut2); font-size: .55em; font-weight: 600; }
