/* بسيط المعلم: the official site, in the app's own look (Thmanyah, orange,
   pastel tiles with a deeper "lip", notebook paper for the teacher's page). */
@font-face { font-family: Thmanyah; font-weight: 400; src: url(assets/fonts/thmanyahsans-Regular.otf) format("opentype"); font-display: swap; }
@font-face { font-family: Thmanyah; font-weight: 500; src: url(assets/fonts/thmanyahsans-Medium.otf) format("opentype"); font-display: swap; }
@font-face { font-family: Thmanyah; font-weight: 700; src: url(assets/fonts/thmanyahsans-Bold.otf) format("opentype"); font-display: swap; }
@font-face { font-family: Thmanyah; font-weight: 900; src: url(assets/fonts/thmanyahsans-Black.otf) format("opentype"); font-display: swap; }

:root {
  --paper: #FFF9F3;
  --white: #fff;
  --ink: #1B1B1F;
  --ink2: #5F636E;
  --line: #ECE6DE;
  --or: #F2600C;
  --orD: #C94A0A;
  --orSoft: #FFEDE0;
  --note: #FFE58A;
  --noteD: #E3C354;
  --mint: #E4F5EB;
  --mintD: #1FA463;
  --sky: #E9EFFF;
  --skyD: #4A66D9;
  --lav: #F0ECFF;
  --lavD: #7C68D8;
  --peach: #FFEBDD;
  --red: #E23D3D;
  --r-card: 22px;
  --r-btn: 18px;
  --wrap: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Thmanyah, -apple-system, "Segoe UI", Tahoma, sans-serif; font-weight: 500; font-size: 18px; line-height: 1.75; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }
a { color: inherit; }
h1, h2, h3 { font-weight: 900; line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(32px, 5vw, 52px); }
h3 { font-size: 24px; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink2); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 50; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--skyD); outline-offset: 3px; border-radius: 8px; }

/* Buttons: the app's chunky orange with a deeper lip */
.btn { font-family: inherit; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 28px; border-radius: var(--r-btn); background: var(--or); color: #fff; font-weight: 900; font-size: 19px; text-decoration: none; box-shadow: 0 6px 0 var(--orD); transition: transform .12s, box-shadow .12s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--orD); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--orD); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 16px; box-shadow: 0 4px 0 var(--orD); }
.btn--ghost { background: var(--white); color: var(--ink); box-shadow: 0 6px 0 var(--line); border: 2px solid var(--line); }
.btn--ghost:hover { box-shadow: 0 8px 0 var(--line); }
.btn--light { background: var(--white); color: var(--ink); box-shadow: 0 6px 0 #00000033; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.is-scrolled { border-bottom-color: var(--line); }
.top__in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 22px; }
.brand img { width: 44px; height: 44px; }
.nav { display: flex; gap: 6px; margin-inline-start: auto; }
.nav a { text-decoration: none; font-weight: 700; font-size: 16px; padding: 8px 12px; border-radius: 12px; color: var(--ink2); }
.nav a:hover { background: var(--orSoft); color: var(--orD); }
@media (max-width: 900px) { .nav { display: none; } .top .btn--sm { margin-inline-start: auto; } }

/* Hero */
.hero { padding: 48px 0 72px; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#F2600C1F 2.5px, transparent 3px); background-size: 34px 34px; mask-image: linear-gradient(#000 40%, transparent); -webkit-mask-image: linear-gradient(#000 40%, transparent); pointer-events: none; }
.hero__in { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(46px, 7.4vw, 96px); line-height: 1.04; letter-spacing: -0.02em; }
.lead { font-size: clamp(19px, 2vw, 23px); color: var(--ink2); margin: 22px 0 32px; max-width: 30em; }
.stores { list-style: none; display: flex; gap: 18px; padding: 0; margin: 26px 0 0; font-size: 15px; color: var(--ink2); }
.stores li::before { content: "✓"; color: var(--mintD); font-weight: 900; margin-inline-end: 6px; }
.stores a { text-decoration: none; }
.stores a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .hero { padding: 24px 0 48px; }
  .hero__in { grid-template-columns: 1fr; gap: 34px; }
}

/* The notebook demo */
.demo { position: relative; padding-top: 150px; }
.demo__bust { position: absolute; z-index: 0; width: 230px; inset-inline-end: 34px; top: 0; filter: drop-shadow(0 10px 18px #1B1B1F22); }
.note { position: relative; z-index: 1; background: var(--white); border-radius: 30px; box-shadow: 0 10px 0 var(--line), 0 30px 60px #C94A0A1A; overflow: hidden; border: 2px solid var(--line); }
.note__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 2px solid var(--line); background: var(--white); position: relative; z-index: 2; }
.note__head img { width: 44px; height: 44px; border-radius: 50%; background: var(--orSoft); }
.note__head b { display: block; font-size: 19px; line-height: 1.3; }
.note__head small { color: var(--mintD); font-weight: 700; font-size: 14px; }
.note__page { height: 360px; overflow-y: auto; padding: 18px 26px 18px 22px; scroll-behavior: smooth;
  background:
    linear-gradient(to left, transparent 54px, #F6B9B9 54px, #F6B9B9 56px, transparent 56px),
    repeating-linear-gradient(#fff 0 33px, #E7EBF2 33px 34px);
  background-attachment: local; line-height: 34px; font-size: 17px; }
.note__page p { margin: 0 0 0; }
.q { display: inline-block; background: var(--note); box-shadow: 0 3px 0 var(--noteD); border-radius: 6px; padding: 0 12px; margin: 6px 0 10px; font-weight: 900; line-height: 1.9; transform: rotate(-.6deg); }
.a { margin-bottom: 8px; }
.a b { color: var(--orD); }
.a .src { display: inline-block; margin-top: 6px; font-size: 14px; color: var(--mintD); font-weight: 700; }
.typing { display: inline-flex; gap: 5px; padding: 10px 0; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: #C8CCD6; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.note__ask { border-top: 2px solid var(--line); padding: 14px 18px 18px; background: #FFFDF9; }
.note__hint { display: block; font-size: 14px; color: var(--ink2); font-weight: 700; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 15px; font-weight: 700; border: 2px solid var(--line); background: var(--white); color: var(--ink); padding: 6px 14px; border-radius: 999px; cursor: pointer; box-shadow: 0 3px 0 var(--line); transition: transform .1s; }
.chip:hover { border-color: var(--or); color: var(--orD); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.chip[aria-pressed="true"] { background: var(--orSoft); border-color: var(--or); color: var(--orD); box-shadow: 0 3px 0 #F7B48A; }
@media (max-width: 900px) {
  .demo { padding-top: 112px; }
  .demo__bust { width: 168px; inset-inline-end: 18px; }
  .note__page { height: 320px; }
}

/* Sections */
.sec { padding: 96px 0; }
.sec--tint { background: #FFF3E8; }
.sec__head { max-width: 760px; margin-bottom: 40px; }
.sec__head p { color: var(--ink2); font-size: 20px; margin-top: 14px; }
@media (max-width: 700px) { .sec { padding: 68px 0; } }

/* Subjects */
.gradepick { display: flex; flex-wrap: wrap; gap: 20px 40px; margin-bottom: 40px; }
.stage { display: grid; gap: 12px; align-content: start; }
.stage__name { font-weight: 900; font-size: 15px; color: var(--ink2); }
.stage__grades { display: flex; gap: 16px; }
.gcard { font: inherit; border: 0; background: none; padding: 0; cursor: pointer; width: 132px; text-align: center; color: var(--ink); }
.gcard__img { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; border: 3px solid var(--white); background: var(--white); box-shadow: 0 6px 0 var(--line), 0 12px 26px #1B1B1F14; transition: transform .2s, box-shadow .2s, filter .2s; filter: saturate(.7) brightness(.98); }
.gcard__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.gcard b { display: block; margin-top: 12px; font-size: 17px; line-height: 1.3; transition: color .2s; }
.gcard:hover .gcard__img { transform: translateY(-3px); filter: none; }
.gcard[aria-selected="true"] .gcard__img { border-color: var(--or); box-shadow: 0 6px 0 var(--orD), 0 18px 34px #F2600C38; transform: translateY(-5px) rotate(-2deg); filter: none; }
.gcard[aria-selected="true"] .gcard__img::after { content: "✓"; position: absolute; bottom: 8px; inset-inline-start: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--or); color: #fff; font-weight: 900; font-size: 16px; box-shadow: 0 3px 0 var(--orD); }
.gcard[aria-selected="true"] b { color: var(--orD); }
.shelf__title { font-size: clamp(24px, 3vw, 30px); margin: 0 0 4px; }
@media (max-width: 900px) {
  .gradepick { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 30px; padding: 8px 20px 16px; gap: 28px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .stage__grades { gap: 12px; }
  .gcard { width: 104px; scroll-snap-align: start; }
  .gcard b { font-size: 15px; }
}
.shelf { display: flex; gap: 22px; overflow-x: auto; cursor: grab; padding: 8px max(20px, calc((100vw - var(--wrap)) / 2 + 20px)) 28px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.subj { flex: none; width: 250px; scroll-snap-align: start; text-decoration: none; }
.subj__img { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 300 / 224; background: var(--white); box-shadow: 0 6px 0 #00000014, 0 14px 30px #00000012; border: 3px solid var(--white); }
.subj__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.subj:hover .subj__img img { transform: scale(1.04); }
.subj__part { position: absolute; top: 10px; inset-inline-end: 10px; background: var(--ink); color: #fff; font-weight: 900; font-size: 13px; padding: 2px 10px 4px; border-radius: 10px; transform: rotate(3deg); }
.subj b { display: block; font-size: 20px; margin-top: 14px; }
.subj small { color: var(--ink2); font-size: 15px; font-weight: 700; }
.shelf.is-swapping .subj { opacity: 0; transform: translateY(10px); }
.subj { transition: opacity .25s, transform .25s; }

/* Ways to study */
.ways { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: start; }
.ways__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.way { font: inherit; text-align: start; display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--r-card); border: 2px solid; cursor: pointer; color: var(--ink); transition: transform .12s; min-height: 98px; }
.way b { font-size: 20px; line-height: 1.3; }
.way span { font-size: 15px; color: var(--ink2); line-height: 1.5; }
.way:active { transform: translateY(3px); }
.way--mint { background: var(--mint); border-color: #BFE7CF; box-shadow: 0 5px 0 #BFE7CF; }
.way--sky { background: var(--sky); border-color: #C9D5FB; box-shadow: 0 5px 0 #C9D5FB; }
.way--lav { background: var(--lav); border-color: #D7CEFA; box-shadow: 0 5px 0 #D7CEFA; }
.way--peach { background: var(--peach); border-color: #FBCDAE; box-shadow: 0 5px 0 #FBCDAE; }
.way--note { background: #FFF6CF; border-color: #F3DC86; box-shadow: 0 5px 0 #F3DC86; }
.way[aria-selected="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.phone { margin: 0; position: sticky; top: 100px; }
.phone__scr { width: min(340px, 100%); margin: 0 auto; aspect-ratio: 390 / 875; border-radius: 46px; overflow: hidden; background: #fff; border: 12px solid var(--ink); box-shadow: 0 30px 60px #1B1B1F2E; }
.phone__scr img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .2s; }
.phone__scr img.is-fading { opacity: 0; }
.phone figcaption { text-align: center; color: var(--ink2); font-size: 16px; margin-top: 16px; min-height: 28px; }
.phone--tilt .phone__scr { transform: rotate(-3deg); }
@media (max-width: 900px) {
  .ways { grid-template-columns: 1fr; }
  .ways { gap: 22px; }
  .ways .phone { position: relative; top: 0; }
  .ways .phone__scr { width: 260px; }
  /* phones: the ways are one row above the screen, swiped sideways */
  .ways__list { display: flex; overflow-x: auto; gap: 10px; margin: 0 -20px; padding: 6px 20px 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .ways__list::-webkit-scrollbar { display: none; }
  .way { flex: none; min-height: 0; padding: 10px 18px 12px; white-space: nowrap; scroll-snap-align: start; }
  .way b { font-size: 17px; }
  .way span { display: none; }
}

/* Try a question */
.try { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.try__copy p { color: var(--ink2); font-size: 20px; margin-top: 16px; max-width: 30em; }
.try__card { background: var(--white); border: 2px solid var(--line); border-radius: 30px; padding: 30px 28px 26px; box-shadow: 0 8px 0 var(--line); text-align: center; position: relative; }
.try__face { width: 110px; height: 110px; margin: -84px auto 6px; transition: transform .25s; }
.try__face.is-pop { transform: scale(1.12) rotate(-4deg); }
.try__count { font-size: 14px; color: var(--ink2); font-weight: 700; }
.try__q { background: #FFF6CF; border: 2px solid #F3DC86; border-radius: 18px; padding: 18px; font-weight: 900; font-size: 24px; line-height: 1.5; margin: 12px 0 18px; }
.try__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tf { font: inherit; font-weight: 900; font-size: 22px; min-height: 76px; border-radius: 20px; border: 3px solid; cursor: pointer; transition: transform .1s; }
.tf--yes { background: var(--mint); border-color: var(--mintD); color: #117040; box-shadow: 0 6px 0 #117040; }
.tf--no { background: #FFECEC; border-color: var(--red); color: #A61B1B; box-shadow: 0 6px 0 #A61B1B; }
.tf:active { transform: translateY(4px); }
.tf:disabled { cursor: default; opacity: .45; }
.tf.is-picked { opacity: 1; outline: 4px solid var(--ink); outline-offset: 3px; }
.try__why { min-height: 56px; margin-top: 18px; font-size: 17px; line-height: 1.7; }
.try__why b.ok { color: var(--mintD); } .try__why b.no { color: var(--red); }
.link { font: inherit; font-weight: 900; color: var(--orD); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; padding: 6px; }
@media (max-width: 900px) { .try { grid-template-columns: 1fr; gap: 70px; } .try__copy { order: -1; } }
@media (max-width: 520px) { .try__q { font-size: 20px; padding: 14px; } .try__card { padding: 26px 18px 22px; } }

/* Exam trio */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tile { border-radius: 28px; padding: 26px 24px 0; border: 2px solid; overflow: hidden; display: flex; flex-direction: column; }
.tile p { color: var(--ink2); margin: 10px 0 22px; font-size: 17px; }
.tile > img { width: 78%; margin: auto auto -40px; border-radius: 30px 30px 0 0; border: 10px solid var(--ink); border-bottom: 0; aspect-ratio: 390 / 600; object-fit: cover; object-position: top; }
.tile--sky { background: var(--sky); border-color: #C9D5FB; }
.tile--note { background: #FFF6CF; border-color: #F3DC86; }
.tile--mint { background: var(--mint); border-color: #BFE7CF; padding-bottom: 20px; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; }
.badges img { width: 100%; filter: drop-shadow(0 6px 8px #11704026); }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; } .tile > img { width: 62%; } }

/* Parents */
.parents { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.parents__copy > p { color: var(--ink2); font-size: 20px; margin-top: 16px; }
.ticks { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; font-weight: 700; font-size: 19px; }
.ticks li::before { content: "✓"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--mintD); font-weight: 900; font-size: 15px; line-height: 1; transform: translateY(4px); }
.parents .phone { position: relative; top: 0; }
@media (max-width: 900px) { .parents { grid-template-columns: 1fr; } .parents .phone__scr { width: 260px; } }

/* Video */
.sec--ink { background: var(--ink); color: #fff; }
.film { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.film__copy p { color: #C9CBD3; font-size: 20px; margin-top: 14px; }
.film__frame { width: min(360px, 100%); border-radius: 34px; overflow: hidden; border: 10px solid #2C2C33; background: #000; }
.film__frame video { width: 100%; height: auto; display: block; aspect-ratio: 9 / 16; background: #000; }
@media (max-width: 900px) { .film { grid-template-columns: 1fr; } .film__frame { margin: 0 auto; width: min(320px, 100%); } }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--white); border: 2px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: 0 6px 0 var(--line); display: grid; gap: 6px; }
.steps li::before { content: counter(s, arabic-indic); width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--or); color: #fff; font-weight: 900; font-size: 24px; box-shadow: 0 4px 0 var(--orD); margin-bottom: 8px; }
.steps b { font-size: 22px; }
.steps span { color: var(--ink2); font-size: 17px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { max-width: 860px; }
.faq details { background: var(--white); border: 2px solid var(--line); border-radius: 20px; margin-bottom: 12px; box-shadow: 0 4px 0 var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 900; font-size: 20px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--orSoft); color: var(--orD); font-size: 24px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--ink2); }
.faq a { color: var(--orD); font-weight: 700; }

/* Final */
.final { background: var(--or); color: #fff; overflow: hidden; }
.final__in { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: end; padding-top: 50px; }
.final__in > img { width: 300px; margin-bottom: -2px; }
.final__in > div { padding-bottom: 60px; }
.final p { font-size: 21px; margin: 12px 0 26px; color: #FFE7D6; }
@media (max-width: 760px) { .final__in { grid-template-columns: 1fr; padding-top: 56px; } .final__in > img { width: 220px; order: 2; margin: 0 auto -2px; } .final__in > div { padding-bottom: 10px; } }

/* Footer */
.foot { background: var(--ink); color: #D9DAE0; padding: 40px 0 calc(26px + env(safe-area-inset-bottom)); font-size: 15px; }
.foot__top { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.foot .brand { color: #fff; font-size: 19px; }
.foot .brand img { width: 36px; height: 36px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot .social { margin-inline-start: auto; }
.foot__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #2E2E36; color: #9A9CA6; font-size: 14px; }
.foot__bottom a { color: #C9CBD3; direction: ltr; }
@media (max-width: 700px) { .foot .social { margin-inline-start: 0; width: 100%; } }

/* The one orchestrated entrance: the galaxy's copy rises while the camera flies in */
@media (prefers-reduced-motion: no-preference) {
  .js .galaxy__copy > * { animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
  .js .galaxy__copy > :nth-child(2) { animation-delay: .1s; } .js .galaxy__copy > :nth-child(3) { animation-delay: .2s; } .js .galaxy__copy > :nth-child(4) { animation-delay: 1.6s; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Galaxy hero ───────────────────────────────────────────────── */
:root { --space: #0D0B1F; --space2: #1A1338; --spaceInk: #ECEAF7; --spaceMuted: #B4B0CF; }
.galaxy { position: relative; margin-top: -72px; min-height: min(100svh, 900px); background:
    radial-gradient(60% 55% at 28% 52%, #F2600C33 0%, transparent 60%),
    radial-gradient(45% 40% at 75% 20%, #6D4BD844 0%, transparent 70%),
    radial-gradient(40% 35% at 10% 90%, #1E6BD833 0%, transparent 70%),
    linear-gradient(180deg, var(--space) 0%, var(--space2) 100%);
  color: var(--spaceInk); overflow: hidden; isolation: isolate; }
.galaxy::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; background: var(--paper); clip-path: ellipse(75% 100% at 50% 100%); z-index: 3; pointer-events: none; }
.galaxy__stage { position: absolute; inset: 0; z-index: 0; }
.galaxy__stage canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; touch-action: pan-y; }
.galaxy__labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.plabel { position: absolute; top: 0; left: 0; pointer-events: auto; font: inherit; font-weight: 900; font-size: 15px; color: #fff; background: #120F2ACC; border: 2px solid var(--c); border-radius: 999px; padding: 1px 12px 3px; white-space: nowrap; cursor: pointer; opacity: 0; transition: opacity .2s; }
.plabel:hover, .plabel:focus-visible { background: var(--c); }
.mlabel { position: absolute; top: 0; left: 0; font-weight: 900; font-size: 14px; color: var(--ink); background: var(--paper); border-radius: 12px; padding: 2px 10px 4px; white-space: nowrap; box-shadow: 0 4px 0 #0005; }
.galaxy__in { position: relative; z-index: 2; min-height: inherit; display: flex; align-items: center; pointer-events: none; padding-top: 110px; padding-bottom: 110px; }
.galaxy__copy { max-width: 540px; transition: opacity .35s, transform .35s; }
.galaxy__copy .cta, .galaxy__copy a { pointer-events: auto; }
.galaxy h1 { font-size: clamp(46px, 7vw, 94px); line-height: 1.04; letter-spacing: -0.02em; color: #fff; text-shadow: 0 4px 30px #0D0B1F; }
.galaxy .lead { color: var(--spaceMuted); text-shadow: 0 2px 16px #0D0B1F; }
.btn--glass { background: #FFFFFF14; color: #fff; border: 2px solid #FFFFFF40; box-shadow: 0 6px 0 #00000055; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--glass:hover { background: #FFFFFF22; box-shadow: 0 8px 0 #00000055; }
.galaxy__hint { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; font-size: 14px; font-weight: 700; color: var(--spaceMuted); }
.galaxy__hint span { border: 1.5px dashed #FFFFFF40; border-radius: 999px; padding: 3px 12px; }
.galaxy.no-gl .galaxy__hint { display: none; }
.galaxy.is-focused .galaxy__copy { opacity: 0; transform: translateX(30px); pointer-events: none; }
.galaxy.is-focused .galaxy__copy a { pointer-events: none; }
.galaxy__fallback { display: none; }
.galaxy.no-gl .galaxy__fallback { display: grid; grid-template-columns: repeat(3, 120px); gap: 18px; position: absolute; inset-inline-end: max(20px, calc((100vw - var(--wrap)) / 2 + 20px)); top: 50%; transform: translateY(-50%) rotate(-8deg); z-index: 1; }
.galaxy.no-gl .galaxy__fallback img { width: 120px; }
/* the planet card */
.pcard { position: absolute; z-index: 4; inset-inline-start: max(20px, calc((100vw - var(--wrap)) / 2 + 20px)); top: 50%; width: min(380px, calc(100% - 40px)); background: var(--white); color: var(--ink); border-radius: 28px; padding: 22px 24px 24px; box-shadow: 0 10px 0 #00000040, 0 30px 70px #00000066; transform: translateY(-46%) scale(.96); opacity: 0; transition: opacity .25s, transform .25s; }
.pcard.is-open { opacity: 1; transform: translateY(-50%) scale(1); }
.pcard img { width: 84px; height: 84px; margin: -64px 0 8px; filter: drop-shadow(0 8px 14px #0004); }
.pcard h2 { font-size: 30px; }
.pcard__lbl { color: var(--ink2); font-size: 15px; margin-top: 10px; font-weight: 700; }
.pcard__grades { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.pcard__grades li { background: var(--orSoft); color: var(--orD); font-weight: 900; font-size: 15px; border-radius: 12px; padding: 4px 12px 6px; }
.pcard__grades small { font-weight: 700; color: var(--ink2); }
.pcard__note { font-size: 15px; color: var(--ink2); line-height: 1.6; }
.pcard__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
@media (max-width: 820px) {
  .galaxy { min-height: 760px; }
  .galaxy__in { align-items: flex-start; padding-top: 96px; padding-bottom: 0; }
  .galaxy h1 { font-size: clamp(40px, 11vw, 56px); }
  .galaxy .lead { font-size: 17px; margin: 14px 0 20px; }
  .galaxy .btn { min-height: 50px; font-size: 17px; padding: 0 20px; }
  .galaxy__hint { position: absolute; bottom: 100px; inset-inline: 0; justify-content: center; }
  .pcard { top: auto; bottom: 16px; inset-inline: 12px; width: auto; transform: translateY(20px); }
  .pcard.is-open { transform: none; }
  .galaxy.is-focused .galaxy__copy { transform: translateY(-20px); }
  .galaxy.no-gl .galaxy__fallback { top: auto; bottom: 90px; inset-inline: 0; margin: 0 auto; width: max-content; grid-template-columns: repeat(3, 90px); transform: rotate(-6deg); }
  .galaxy.no-gl .galaxy__fallback img { width: 90px; }
}
/* the header over the galaxy */
.top.on-dark { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
.top.on-dark .brand { color: #fff; }
.top.on-dark .nav a { color: #D9D6EE; }
.top.on-dark .nav a:hover { background: #FFFFFF1A; color: #fff; }

/* the ask section (the notebook demo) */
.ask { padding-top: 40px; }
.ask h2 { font-size: clamp(36px, 5vw, 58px); }

/* the badge pit */
.pit { position: relative; height: 290px; margin-top: auto; border-radius: 20px; background: #FFFFFF66; overflow: hidden; }
.pit canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; cursor: grab; }
.pit.is-grabbing canvas { cursor: grabbing; }
.pit .badges { padding: 14px; }
.pit.is-live .badges { display: none; }
.pit__hint { font-size: 14px; color: #2E7D52; font-weight: 700; margin: 10px 0 0; text-align: center; }

/* store buttons (under «اسأله وشوف بنفسك») */
.storebtns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.storebtn { display: inline-flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 22px 8px 26px; border-radius: 18px; background: var(--ink); color: #fff; text-decoration: none; box-shadow: 0 6px 0 #00000040; transition: transform .12s, box-shadow .12s; }
.storebtn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #00000040; }
.storebtn:active { transform: translateY(4px); box-shadow: 0 2px 0 #00000040; }
.storebtn svg { width: 30px; height: 30px; flex: none; }
.storebtn span { display: grid; line-height: 1.15; font-weight: 900; font-size: 21px; direction: ltr; text-align: left; white-space: nowrap; }
.storebtn small { font-size: 13px; font-weight: 700; color: #C9CBD3; direction: rtl; text-align: right; }
@media (max-width: 420px) { .storebtn { flex: 1 1 0; gap: 8px; padding: 8px 12px; } .storebtn svg { width: 24px; height: 24px; } .storebtn span { font-size: 16px; } }

/* social accounts (footer) */
.social { display: flex; align-items: center; gap: 10px; }
.social span { color: #9A9CA6; font-size: 14px; font-weight: 700; margin-inline-end: 2px; }
.social__a { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #2A2A31; color: #fff; transition: background .15s, transform .15s; }
.social__a:hover { background: var(--or); transform: translateY(-2px); text-decoration: none; }
.social__a svg { width: 20px; height: 20px; }

/* the ask section on phones: the store buttons come after the notebook demo */
@media (max-width: 900px) {
  .ask .hero__in { gap: 0; }
  .ask .hero__copy { display: contents; }
  .ask .demo { order: 1; }
  .ask .storebtns { order: 2; margin-top: 40px; justify-content: center; }
}
/* strips that scroll sideways (a mouse can drag them too) */
.gradepick::-webkit-scrollbar { display: none; }
.is-dragging { cursor: grabbing; scroll-snap-type: none !important; user-select: none; }
.is-dragging img { pointer-events: none; }

/* A subject whose cover isn't made yet: the app's empty cover (sky + book). */
.subj__none { position: absolute; inset: 0; display: grid; place-items: center; background: var(--sky); color: #4A66D980; }
.subj__none svg { width: 54px; height: 54px; }
