:root {
  --bg: #f4f1fb;
  --card: #ffffff;
  --ink: #241b33;
  --muted: #6b6178;
  --accent: #7c3aed;
  --accent2: #ec4899;
  --line: #e7e1f2;
  --radius: 20px;
  --c-ar: #059669;
  --c-en: #0284c7;
  --c-hi: #d97706;
  --c-ge: #0d9488;
  --c-st: #7c3aed;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(600px 300px at 90% -50px, rgba(124, 58, 237, 0.10), transparent),
    radial-gradient(500px 260px at 0% 120px, rgba(236, 72, 153, 0.08), transparent);
  color: var(--ink);
  line-height: 1.75;
  font-size: 17px;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 0 16px 72px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── top nav ─────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(244, 241, 251, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 780px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { font-weight: 800; font-size: 20px; color: var(--ink); }
.brand span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 14px; font-size: 15px; }
.nav-links a { color: var(--muted); font-weight: 700; }

/* ── hero ────────────────────────────────── */
.hero-card {
  margin-top: 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, #6d28d9 0%, #a21caf 55%, #ea580c 130%);
  color: #fff;
  padding: 30px 22px 26px;
  text-align: center;
  box-shadow: 0 18px 40px -18px rgba(109, 40, 217, 0.55);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "📚";
  position: absolute; font-size: 90px; opacity: 0.14;
  top: -18px; inset-inline-start: -10px; transform: rotate(-12deg);
}
.hero-card h1 { font-size: 31px; line-height: 1.4; font-weight: 800; }
.hero-card .lead { color: rgba(255,255,255,0.88); margin-top: 10px; font-size: 16px; }

.countdown {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 20px 0 8px;
}
.countdown .cell {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
  border-radius: 16px;
  padding: 12px 4px; text-align: center; color: #fff;
}
.countdown .num { font-size: 25px; font-weight: 800; display: block; line-height: 1.2; }
.countdown .lbl { font-size: 12.5px; opacity: 0.85; }
.countdown-note { text-align: center; color: rgba(255,255,255,0.85); font-size: 13.5px; }

.hero-img {
  width: 100%; border-radius: 22px; margin-top: 16px; display: block;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px -16px rgba(36, 27, 51, 0.35);
}
.caption { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: center; }

/* ── sections ────────────────────────────── */
section { margin-top: 46px; }
h2.sec {
  font-size: 22px; font-weight: 800; margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px;
}
h2.sec::before {
  content: ""; width: 10px; height: 28px; border-radius: 6px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  display: inline-block;
}
.sec-sub { color: var(--muted); font-size: 15px; margin-bottom: 16px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 12px;
  box-shadow: 0 8px 22px -14px rgba(36, 27, 51, 0.18);
}

/* subjects grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.subj {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 22px;
  padding: 18px 12px; text-align: center; color: var(--ink);
  display: block; font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 8px 20px -14px rgba(36, 27, 51, 0.2);
}
.subj:hover { text-decoration: none; transform: translateY(-3px); }
.subj .tile {
  width: 58px; height: 58px; margin: 0 auto 8px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  color: #fff;
}
.subj small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 4px; }
.subj.c-ar { border-color: rgba(5,150,105,0.4); }  .subj.c-ar .tile { background: linear-gradient(135deg, #059669, #34d399); }
.subj.c-ar:hover { box-shadow: 0 14px 26px -12px rgba(5,150,105,0.5); }
.subj.c-en { border-color: rgba(2,132,199,0.4); }  .subj.c-en .tile { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.subj.c-en:hover { box-shadow: 0 14px 26px -12px rgba(2,132,199,0.5); }
.subj.c-hi { border-color: rgba(217,119,6,0.4); }  .subj.c-hi .tile { background: linear-gradient(135deg, #d97706, #fbbf24); }
.subj.c-hi:hover { box-shadow: 0 14px 26px -12px rgba(217,119,6,0.5); }
.subj.c-ge { border-color: rgba(13,148,136,0.4); } .subj.c-ge .tile { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.subj.c-ge:hover { box-shadow: 0 14px 26px -12px rgba(13,148,136,0.5); }
.subj.c-st { border-color: rgba(124,58,237,0.4); } .subj.c-st .tile { background: linear-gradient(135deg, #7c3aed, #c084fc); }
.subj.c-st:hover { box-shadow: 0 14px 26px -12px rgba(124,58,237,0.5); }

/* numbered plan rows */
.row {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px; margin-bottom: 10px;
  box-shadow: 0 6px 16px -12px rgba(36, 27, 51, 0.15);
}
.row .n {
  min-width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.row b { display: block; }
.row p { color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* link list */
.links a {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; color: var(--ink);
  box-shadow: 0 6px 16px -12px rgba(36, 27, 51, 0.15);
}
.links a:hover { border-color: var(--accent); text-decoration: none; }
.links a b { display: block; color: var(--accent); }
.links a span { color: var(--muted); font-size: 14.5px; }

/* callouts */
.note, .warn {
  border-radius: 16px; padding: 14px 16px; margin-top: 12px; font-size: 15px;
}
.note { background: #ecfdf3; border: 1px solid #b9e8cb; color: #14532d; }
.warn { background: #fef6e0; border: 1px solid #f3ddad; color: #713f12; }
.note b, .warn b { display: block; margin-bottom: 2px; }

/* subject page banner */
.subj-hero { margin-top: 22px; text-align: center; }
.subj-hero h1 { font-size: 29px; font-weight: 800; }
.subj-hero .lead { color: var(--muted); margin-top: 8px; font-size: 16px; }
.banner {
  width: 100%; border-radius: 22px; margin-top: 18px; display: block;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px -16px rgba(36, 27, 51, 0.35);
}

/* lessons */
.lesson {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px;
  box-shadow: 0 8px 22px -14px rgba(36, 27, 51, 0.18);
}
.lesson h3 { font-size: 18.5px; font-weight: 800; margin-bottom: 8px; }
.lesson ul { padding-inline-start: 20px; }
.lesson li { margin-bottom: 6px; }
.lesson li::marker { color: var(--accent2); }
.lesson.c-ar h3 { color: var(--c-ar); }
.lesson.c-en h3 { color: var(--c-en); }
.lesson.c-hi h3 { color: var(--c-hi); }
.lesson.c-ge h3 { color: var(--c-ge); }
.lesson.c-st h3 { color: var(--c-st); }
.badge {
  display: inline-block; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-size: 12.5px; font-weight: 700; border-radius: 20px; padding: 2px 12px; margin-bottom: 8px;
}
.badge.soon { background: #e5e0ef; color: var(--muted); }

/* facts list */
.facts { list-style: none; }
.facts li {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 2px; border-bottom: 1px dashed var(--line);
}
.facts li:last-child { border-bottom: 0; }
.facts b { color: var(--accent); }

/* footer */
footer { margin-top: 58px; text-align: center; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 20px; }

/* tips */
ol.tips { padding-inline-start: 22px; }
ol.tips li { margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; list-style-position: inside; box-shadow: 0 6px 16px -12px rgba(36, 27, 51, 0.15); }
ol.tips li::marker { color: var(--accent2); font-weight: 800; }
