/* ATCODEX SCHOOL - learning programs: one long scroll story. Each .sc scene is taller than the screen; its .stage stays
   pinned while programs.js turns the scroll position into a 0..1 progress and moves the scene's pieces.
   Colours: the site's navy and gold everywhere; each program brings one identity colour (--c, --c2, --rgb) for details only. */
.xp { background: var(--bg); }
.xp main { overflow-x: clip; }
.sc { position: relative; height: var(--len, 300svh); }
.sc > .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.kicker { direction: ltr; }
.xp em { font-style: normal; background: linear-gradient(100deg, #8fdcff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* shared buttons: one gold action and one quiet outline, the same in every program */
.btn-gold { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 26px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #f7d58e, var(--gold2)); color: #1d1405; font: 800 16px Cairo, Arial, sans-serif; cursor: pointer;
  box-shadow: 0 12px 30px #e6a83f40; transition: transform .2s, box-shadow .2s; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 38px #e6a83f5c; }
.btn-gold svg { width: 20px; height: 20px; }
.btn-line { display: inline-flex; align-items: center; height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid #ffffff3a; color: #e3edfb;
  font-weight: 700; background: #ffffff08; transition: background .2s, border-color .2s; }
.btn-line:hover { background: #ffffff14; border-color: #ffffff66; }
.voice { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 18px 0 14px; border-radius: 999px; border: 1px solid #ffffff40;
  background: #0a1730b3; color: #fff; font: 700 14.5px Cairo, Arial, sans-serif; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
html[dir="rtl"] .voice { padding: 0 14px 0 18px; }
.voice:hover { background: #12264a; border-color: #ffffff80; }
.voice i { position: relative; width: 18px; height: 14px; display: inline-flex; align-items: flex-end; gap: 2px; }
.voice i::before, .voice i::after, .voice i { --b: linear-gradient(currentColor, currentColor); }
.voice i { background: var(--b) 0 100% / 3px 6px no-repeat, var(--b) 5px 100% / 3px 12px no-repeat, var(--b) 10px 100% / 3px 9px no-repeat, var(--b) 15px 100% / 3px 5px no-repeat; }
.voice.playing { border-color: var(--c, var(--gold)); }
.voice.playing i { animation: eq .5s ease-in-out infinite alternate; }
@keyframes eq { to { background-size: 3px 12px, 3px 5px, 3px 13px, 3px 9px; } }

/* side rail: the six worlds */
.rail { position: fixed; z-index: 30; inset-inline-end: 18px; top: 50%; display: flex; flex-direction: column; gap: 10px; transform: translate(0, -50%);
  opacity: 0; pointer-events: none; transition: opacity .5s; }
.rail.on { opacity: 1; pointer-events: auto; }
.rail-i { position: relative; display: block; width: 34px; height: 34px; border-radius: 11px; transition: transform .3s, box-shadow .3s, opacity .3s; }
.rail-i img { width: 100%; height: 100%; border-radius: inherit; }
.rail-i.on { transform: scale(1.18); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c), 0 0 22px var(--c); opacity: 1; }
.rail-i > span { position: absolute; top: 50%; inset-inline-end: 46px; transform: translateY(-50%); white-space: nowrap; padding: 4px 12px; border-radius: 999px;
  background: #0b1a36; border: 1px solid #ffffff1f; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.rail-i:hover > span, .rail-i:focus-visible > span { opacity: 1; }

/* the space behind the first three scenes: one fixed WebGL canvas (programs.js), so the opening, the verbs and the six
   worlds share one sky with no edge between them. Without WebGL each scene keeps its own CSS sky below. */
.cosmos { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1s ease; }
.cosmos.on { opacity: 1; }
.cosmos-on .sky { display: none; }
.cosmos-on .sc-verbs .stage, .cosmos-on .sc-worlds .stage { background: none; }
.xp .top { border-bottom-color: transparent; }

/* 1. opening sky */
.sc-open { --len: 250svh; }
.sky { position: absolute; inset: 0; background: radial-gradient(120% 75% at 50% 112%, #123a7a 0%, #0a2250 32%, #061632 55%, #030b1b 80%); }
.stars { position: absolute; inset: -30% -10%; will-change: transform; }
.stars.s1 { background-image: radial-gradient(1px 1px at 8% 12%, #fff 60%, #0000), radial-gradient(1px 1px at 23% 41%, #fff 60%, #0000), radial-gradient(1px 1px at 37% 8%, #fff 60%, #0000),
  radial-gradient(1px 1px at 52% 33%, #fff 60%, #0000), radial-gradient(1px 1px at 66% 14%, #fff 60%, #0000), radial-gradient(1px 1px at 79% 46%, #fff 60%, #0000),
  radial-gradient(1px 1px at 91% 21%, #fff 60%, #0000), radial-gradient(1px 1px at 14% 63%, #fff 60%, #0000), radial-gradient(1px 1px at 44% 71%, #fff 60%, #0000),
  radial-gradient(1px 1px at 71% 66%, #fff 60%, #0000), radial-gradient(1px 1px at 96% 77%, #fff 60%, #0000), radial-gradient(1px 1px at 3% 88%, #fff 60%, #0000);
  background-size: 420px 420px; opacity: .7; }
.stars.s2 { background-image: radial-gradient(1.6px 1.6px at 18% 27%, #dff1ff 60%, #0000), radial-gradient(1.6px 1.6px at 47% 52%, #fff 60%, #0000), radial-gradient(1.6px 1.6px at 83% 18%, #ffeccc 60%, #0000),
  radial-gradient(1.6px 1.6px at 62% 84%, #fff 60%, #0000), radial-gradient(1.6px 1.6px at 9% 72%, #dff1ff 60%, #0000); background-size: 640px 640px; opacity: .8; }
.stars.s3 { background-image: radial-gradient(2.4px 2.4px at 28% 18%, #fff 60%, #0000), radial-gradient(2.4px 2.4px at 76% 36%, #ffe2a8 60%, #0000), radial-gradient(2.4px 2.4px at 52% 76%, #cde8ff 60%, #0000);
  background-size: 900px 900px; animation: twinkle 3.2s ease-in-out infinite; }
.horizon { position: absolute; left: 50%; bottom: -78vmax; width: 150vmax; height: 100vmax; margin-left: -75vmax; border-radius: 50%;
  box-shadow: 0 -2px 0 #9fd0ff66, 0 -30px 120px #3f8cff40, inset 0 30px 120px #3f8cff26; will-change: transform; }
.open-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 6vw; will-change: transform, opacity; }
.open-in h1 { margin: 18px 0 10px; font-size: clamp(42px, 7.2vw, 112px); line-height: 1.15; font-weight: 900; letter-spacing: -1px; text-shadow: 0 10px 50px #0009; }
.open-in p { margin: 0; max-width: 820px; color: var(--soft); font-size: clamp(16px, 1.6vw, 21px); line-height: 2; }
.cue { position: absolute; left: 50%; bottom: 5vh; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.cue i { width: 2px; height: 46px; background: linear-gradient(var(--gold), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes twinkle { 50% { opacity: .35; } }

/* 2. verbs */
.sc-verbs { --len: 540svh; }
.sc-verbs .stage { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 5vw; padding: 0 max(6vw, 64px);
  background: radial-gradient(55% 65% at 30% 50%, #0d2a5c 0%, #061632 55%, #030b1b 100%); }
html[dir="ltr"] .sc-verbs .stage { background: radial-gradient(55% 65% at 70% 50%, #0d2a5c 0%, #061632 55%, #030b1b 100%); }
.verbs-lead { margin: 0 0 6px; font-size: clamp(20px, 2vw, 28px); font-weight: 600; color: var(--soft); }
.verbs-words { position: relative; height: clamp(230px, 38vh, 340px); }
.verb { position: absolute; inset: 0; opacity: 0; will-change: transform, opacity; }
.verb b { display: block; font-size: clamp(70px, 9.4vw, 160px); line-height: 1.12; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(100deg, #ffffff 25%, #ffe2a6 75%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.verb p { max-width: 34ch; margin: 6px 0 0; color: var(--soft); font-size: clamp(16px, 1.45vw, 20px); line-height: 1.95; text-wrap: pretty; }
.verbs-dots { display: flex; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.verbs-dots li { position: relative; width: 38px; height: 4px; border-radius: 4px; background: #ffffff22; overflow: hidden; }
.verbs-dots li::after { content: ''; position: absolute; inset: 0; background: var(--gold); transform: scaleX(var(--f, 0)); transform-origin: right; }
html[dir="ltr"] .verbs-dots li::after { transform-origin: left; }
.verbs-media { position: relative; height: min(70vh, 640px); }
/* the letter swarm has no frame: it is bigger than its place and fades out at its edges into the sky */
.swarm { position: absolute; left: -16%; top: -18%; width: 132%; height: 136%; pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent); }

/* 3. six worlds: they arrive one by one from deep space and orbit a core of light in 3D (programs.js) */
.sc-worlds { --len: 620svh; }
.orbit-fx { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.core { position: absolute; left: 50%; top: 58%; z-index: 200; width: 0; height: 0; pointer-events: none; opacity: 0; will-change: transform, opacity; }
.core::before { content: ''; position: absolute; left: -150px; top: -150px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 3.5%, #fff6dc 6%, #ffd98a 12%, #f3a93c5c 26%, #3f8cff24 46%, transparent 68%); }
.core > i { position: absolute; left: -270px; top: -270px; width: 540px; height: 540px; border-radius: 50%; mix-blend-mode: screen;
  background: repeating-conic-gradient(#ffe3a92e 0deg 1.1deg, transparent 1.1deg 12deg), repeating-conic-gradient(from 6deg, #9fd0ff1c 0deg .7deg, transparent .7deg 17deg);
  -webkit-mask-image: radial-gradient(circle, #000 0 6%, transparent 60%); mask-image: radial-gradient(circle, #000 0 6%, transparent 60%); animation: spin 90s linear infinite; }
.sc-worlds .stage { background: radial-gradient(50% 55% at 50% 58%, #0e2c63 0%, #061632 55%, #030b1b 100%); }
.worlds-head { position: absolute; top: 11vh; left: 0; right: 0; text-align: center; padding: 0 6vw; will-change: transform, opacity; }
.worlds-head h2 { margin: 14px 0 0; font-size: clamp(32px, 4.6vw, 70px); line-height: 1.25; font-weight: 900; }
.orbit { position: absolute; left: 50%; top: 58%; width: 0; height: 0; margin: 0; padding: 0; list-style: none; }
.w { position: absolute; left: 0; top: 0; width: clamp(74px, 7vw, 112px); text-align: center; will-change: transform, opacity; }
.w img { position: relative; z-index: 2; display: block; width: 100%; height: auto; border-radius: 27%; animation: bob 4.2s ease-in-out infinite alternate;
  box-shadow: 0 22px 50px #000a, 0 0 0 1px #ffffff26, 0 0 46px color-mix(in srgb, var(--c) 38%, transparent); }
.w:nth-child(2n) img { animation-delay: -1.6s; } .w:nth-child(3n) img { animation-delay: -2.8s; }
/* the light a world carries while it flies in and when it lands (--g, set by programs.js) */
.w::before { content: ''; position: absolute; z-index: 3; left: 0; top: 0; width: 100%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; opacity: var(--g, 0);
  background: radial-gradient(circle, #fff 0 6%, color-mix(in srgb, var(--c) 60%, #fff) 14%, color-mix(in srgb, var(--c) 40%, transparent) 34%, transparent 68%);
  transform: scale(2.2); mix-blend-mode: screen; }
/* each world floats on its own little island: a lit top and a rocky underside */
.w i.isle { position: relative; z-index: 1; display: block; width: 150%; margin: -16% -25% 0; aspect-ratio: 5 / 3.2; pointer-events: none; }
.w i.isle::before { content: ''; position: absolute; inset: 0 0 auto; height: 34%; border-radius: 50%;
  background: radial-gradient(70% 90% at 50% 30%, color-mix(in srgb, var(--c) 55%, #2f6d4a), #1d4a35 70%); box-shadow: inset 0 -4px 0 #0005, 0 0 30px color-mix(in srgb, var(--c) 30%, transparent); }
.w i.isle::after { content: ''; position: absolute; left: 7%; right: 7%; top: 17%; bottom: 0; z-index: -1;
  background: linear-gradient(#3b3a5a, #1a1d3a 55%, #0d1129); clip-path: polygon(0 0, 100% 0, 88% 34%, 74% 46%, 64% 74%, 52% 100%, 42% 78%, 30% 58%, 14% 40%); }
@keyframes bob { to { transform: translateY(-9px); } }
.w b { display: block; margin-top: 12px; font-size: clamp(13px, 1.1vw, 16px); white-space: nowrap; }
.w small { display: block; margin-top: 2px; font: 700 9px Arial, sans-serif; letter-spacing: 1.5px; color: var(--muted); direction: ltr; white-space: nowrap; }
/* takes the heading's place as Arabic comes to the front */
.worlds-next { position: absolute; left: 0; right: 0; top: 12vh; margin: 0; padding: 0 6vw; text-align: center; font-size: clamp(26px, 3.4vw, 52px); font-weight: 900; line-height: 1.3; color: #fff; opacity: 0; }

/* chapter base */
.ch { position: relative; }
.ch-kicker { display: inline-block; font: 800 12.5px Arial, sans-serif; letter-spacing: 3.5px; color: var(--c); direction: ltr; }
.ch-kicker > span[data-l="ar"] { font: 800 15px Cairo, Arial, sans-serif; letter-spacing: 0; }

/* portal: the program icon opens into the program itself */
/* the portal scene starts one screen early and pins over the end of the worlds scene, so the math icon hands over seamlessly */
.sc-portal { --len: 290svh; }
.sc-portal .stage { background: #030b1b; }
.sc-portal.join { margin-top: -100svh; }
.sc-portal.join .stage { background: transparent; }
.portal { position: absolute; inset: 0; clip-path: circle(var(--r, 0px) at 50% 58%); will-change: clip-path; }
.portal video { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1.25)); will-change: transform; }
.portal .shade { position: absolute; inset: 0; opacity: var(--sh, 0);
  background: linear-gradient(to top, #030b1bf7 0%, #030b1bc4 26%, #030b1b40 55%, #030b1b14 100%); }
.portal-icon { position: absolute; left: 50%; top: 58%; width: clamp(110px, 11vw, 168px); height: auto; border-radius: 27%; will-change: transform, opacity;
  transform: translate(-50%, -50%); box-shadow: 0 0 0 1px #ffffff2e, 0 0 90px rgb(var(--rgb) / .7); }
.ch-title { position: absolute; bottom: 9vh; inset-inline-start: max(6vw, 64px); max-width: 70vw; opacity: 0; will-change: transform, opacity; }
.ch-name { margin: 2px 0 6px; font-size: clamp(66px, 11.5vw, 200px); line-height: 1; font-weight: 900; letter-spacing: -2px; text-shadow: 0 14px 60px #000c; }
.ch-hook { margin: 0; font-size: clamp(20px, 2.5vw, 36px); font-weight: 800; color: var(--c2); text-shadow: 0 6px 30px #000c; }

/* intro: the program in a few lines, with its character */
.sc-intro { --len: 210svh; }
.sc-intro .stage { display: grid; align-items: center; background: radial-gradient(55% 70% at 72% 58%, rgb(var(--rgb) / .2), transparent 70%), #030b1b; }
html[dir="ltr"] .sc-intro .stage { background: radial-gradient(55% 70% at 28% 58%, rgb(var(--rgb) / .2), transparent 70%), #030b1b; }
.symbols { position: absolute; inset: 0; pointer-events: none; }
.symbols i { position: absolute; left: var(--x); top: var(--y); font: 900 calc(34px + 46px * var(--d)) / 1 Cairo, Arial, sans-serif; color: rgb(var(--rgb) / .07);
  transform: translateY(calc(var(--py, 0) * var(--d) * 1px)) rotate(calc(var(--py, 0) * var(--d) * .02deg)); will-change: transform; }
.intro-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 4vw; align-items: center; }
.intro-copy > * { will-change: transform, opacity; }
.ch-lead { margin: 12px 0 20px; font-size: clamp(18px, 1.6vw, 23px); line-height: 2.05; color: #e8f0fc; }
.ch-feats { display: grid; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.ch-feats li { position: relative; padding-inline-start: 22px; color: var(--soft); font-size: 16px; line-height: 1.8; }
.ch-feats li::before { content: ''; position: absolute; inset-inline-start: 2px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.levels { display: flex; flex-wrap: wrap; gap: 8px; direction: ltr; justify-content: flex-end; }
html[dir="ltr"] .levels { justify-content: flex-start; }
.levels span { padding: 5px 14px; border-radius: 999px; border: 1px solid #ffffff2a; background: #ffffff0a; font: 700 12px Arial, sans-serif; letter-spacing: .5px; color: #dbe7f7; }
.intro-lolly { position: relative; margin: 0; height: min(80vh, 680px); display: grid; place-items: end center; will-change: transform, opacity; }
.intro-lolly::before { content: ''; position: absolute; inset: auto 8% 2% 8%; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgb(var(--rgb) / .45), transparent); }
.lolly { position: relative; height: 100%; width: auto; filter: drop-shadow(0 30px 50px #000b); }
.bubble { position: absolute; z-index: 2; top: 7%; inset-inline-start: -6%; width: max-content; max-width: min(330px, 34vw); padding: 16px 20px 18px; border-radius: 24px;
  background: #fff; color: #0c2148; box-shadow: 0 24px 60px #0008; will-change: transform, opacity; }
.bubble::after { content: ''; position: absolute; bottom: -12px; inset-inline-end: 30px; border: 12px solid transparent; border-bottom: 0; border-top-color: #fff; }
.bubble .who { display: block; font-size: 13px; font-weight: 800; color: #3d6fd6; }
.bubble q { display: block; margin: 2px 0 12px; font-size: clamp(16px, 1.4vw, 19px); font-weight: 800; line-height: 1.7; quotes: none; }
.bubble .voice { color: #0c2148; background: #eef4ff; border-color: #c9dbff; backdrop-filter: none; height: 38px; }
.bubble .voice:hover { background: #e2ecff; }

/* skills: horizontal track of what the child learns */
.sc-skills { --len: 600svh; }
.sc-skills .stage { display: flex; flex-direction: column; justify-content: center; gap: 4vh; background: linear-gradient(#030b1b, #061632 60%, #030b1b); }
.skills-head h3 { margin: 8px 0 6px; font-size: clamp(32px, 4.2vw, 62px); line-height: 1.25; font-weight: 900; }
.skills-head p { margin: 0; max-width: 760px; color: var(--soft); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.9; }
.track { display: flex; gap: 26px; width: max-content; padding-inline: max(6vw, calc((100vw - 1220px) / 2)); will-change: transform; }
.skill { flex: none; width: clamp(290px, 29vw, 410px); padding: 16px 16px 20px; border-radius: 28px; background: linear-gradient(180deg, #0e2248, #08162f);
  border: 1px solid #ffffff17; box-shadow: 0 30px 70px #0008; will-change: transform; }
.skill h4 { margin: 16px 6px 6px; font-size: clamp(19px, 1.6vw, 23px); font-weight: 800; }
.skill p { margin: 0 6px 12px; color: var(--soft); font-size: 15.5px; line-height: 1.9; }
.skill .lv { margin: 0 6px; display: inline-block; font: 700 11px Arial, sans-serif; letter-spacing: .8px; color: var(--c3); direction: ltr; }
.art { position: relative; height: clamp(170px, 27vh, 250px); border-radius: 20px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(90% 90% at 50% 105%, rgb(var(--rgb) / .45), #0b1d42 72%); }
.art-shot { background: #fff; }
.art-shot img { width: 100%; height: 100%; object-fit: cover; }
.art-count { grid-template-columns: repeat(3, auto); align-items: end; justify-content: center; gap: 2%; padding-bottom: 8%; }
.art-count img { height: 52%; width: auto; filter: drop-shadow(0 10px 14px #0007); }
.art-count img:nth-child(2) { height: 60%; }
.art-count .nums { position: absolute; top: 9%; left: 0; right: 0; display: flex; justify-content: center; gap: 22%; direction: ltr; }
.art-count .nums b { font-size: 34px; font-weight: 900; color: var(--c2); text-shadow: 0 4px 14px #0008; }
.art-line img { position: absolute; height: 58%; width: auto; top: 6%; left: 50%; transform: translateX(-50%); filter: drop-shadow(0 10px 14px #0007); }
.art-line svg { position: absolute; left: 8%; right: 8%; bottom: 14%; width: 84%; stroke: #cfe0ff; stroke-width: 3; stroke-linecap: round; fill: none; }
.art-line .cmp { position: absolute; top: 9%; inset-inline-start: 8%; padding: 4px 12px; border-radius: 12px; background: #ffffff14; direction: ltr; }
.art-line .cmp b { font-size: 24px; font-weight: 900; color: var(--c2); }
.art-pos .pos-house { position: absolute; bottom: 8%; left: 50%; height: 50%; width: auto; transform: translateX(-50%); filter: drop-shadow(0 10px 14px #0007); }
.art-pos .pos-robot { position: absolute; bottom: 47%; left: 50%; height: 40%; width: auto; transform: translateX(-50%); filter: drop-shadow(0 8px 10px #0006); }
.art-pos .pos { position: absolute; top: 9%; inset-inline-start: 6%; display: flex; flex-direction: column; gap: 6px; }
.art-pos .pos b { padding: 3px 12px; border-radius: 12px; background: #ffffff14; color: var(--soft); font-size: 15px; font-weight: 800; }
.art-pos .pos b.on { background: var(--c2); color: #14244a; }
.art-clock svg { width: 58%; height: auto; overflow: visible; }
.art-clock .face { fill: #fdfbf4; stroke: var(--c); stroke-width: 8; }
.art-clock .ticks path { stroke: #16305f; stroke-width: 5; stroke-linecap: round; }
.art-clock .hh, .art-clock .mh { stroke: #16305f; stroke-linecap: round; transform-origin: 100px 100px; }
.art-clock .hh { stroke-width: 9; transform: rotate(var(--hh, 0deg)); } .art-clock .mh { stroke-width: 6; stroke: #e2574c; transform: rotate(var(--mh, 0deg)); }
.art-clock .pin { fill: #16305f; }
.art-clock .coin { position: absolute; bottom: 12%; inset-inline-end: 14%; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #e6a83f 70%); color: #6b4300; font: 900 24px Arial, sans-serif; box-shadow: 0 8px 16px #0007, inset 0 0 0 4px #f6cf73; }
.art-chart { grid-template-columns: auto auto; gap: 8%; }
.art-chart img { height: 60%; width: auto; filter: drop-shadow(0 10px 14px #0007); }
.art-chart .bars { display: flex; align-items: flex-end; gap: 8px; height: 58%; }
.art-chart .bars i { width: 20px; height: calc(var(--h) * 100%); border-radius: 6px 6px 3px 3px; background: linear-gradient(var(--c2), #f0a63a); transform-origin: bottom; transform: scaleY(var(--g, 1)); }
.art-chart .bars i:nth-child(even) { background: linear-gradient(#9cc4ff, var(--c)); }
.art-frac img { height: 64%; width: auto; filter: drop-shadow(0 10px 14px #0007); transform: rotate(var(--rot, 0deg)); }
.art-frac .fr { position: absolute; top: 8%; inset-inline-start: 7%; display: grid; grid-template-columns: auto auto; gap: 2px 14px; direction: ltr; }
.art-frac .fr b { font-size: 28px; font-weight: 900; color: var(--c2); line-height: 1.1; }
.track-bar { width: min(440px, 60vw); height: 3px; margin-inline-start: max(6vw, calc((100vw - 1220px) / 2)); border-radius: 3px; background: #ffffff1c; overflow: hidden; }
.track-bar b { display: block; height: 100%; background: var(--c); transform: scaleX(var(--f, 0)); transform-origin: right; }
html[dir="ltr"] .track-bar b { transform-origin: left; }

/* gallery: real moments from inside the program */
.sc-gallery { --len: 340svh; }
.sc-gallery .stage { display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; gap: 5vw; padding: 0 max(6vw, 64px); background: #030b1b; }
.gal-copy h3 { margin: 8px 0 12px; font-size: clamp(30px, 3.6vw, 56px); line-height: 1.3; font-weight: 900; }
.gal-copy p { margin: 0; color: var(--soft); font-size: clamp(16px, 1.35vw, 19px); line-height: 2; }
.gal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-self: start; }
.gal-col { display: flex; flex-direction: column; gap: 22px; will-change: transform; }
.tile { position: relative; margin: 0; aspect-ratio: 4 / 3.1; border-radius: 24px; overflow: hidden; background: #0b1730; box-shadow: 0 34px 80px #000a, 0 0 0 1px #ffffff1c; }
.tile video, .tile img { width: 100%; height: 100%; object-fit: cover; }
.tile figcaption { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; padding: 48px 18px 14px; background: linear-gradient(to top, #030b1bf0, #030b1b00);
  color: var(--soft); font-size: 14px; line-height: 1.6; }
.tile figcaption b { color: #fff; font-size: 18px; }
.zoom { position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #ffffff59; background: #030b1b99;
  cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.zoom::before, .zoom::after { content: ''; position: absolute; width: 10px; height: 10px; border: 2px solid #fff; }
.zoom::before { top: 11px; right: 11px; border-left: 0; border-bottom: 0; } .zoom::after { bottom: 11px; left: 11px; border-right: 0; border-top: 0; }
.zoom:hover { background: #12264acc; transform: scale(1.08); }

/* quote: a full screen moment with a real line from the program */
.sc-quote { --len: 240svh; }
.quote-media { position: absolute; inset: 0; }
.quote-media video { width: 100%; height: 100%; object-fit: cover; object-position: 82% 50%; transform: scale(var(--z, 1.18)); will-change: transform; }
.sc-quote .shade { position: absolute; inset: 0; background: linear-gradient(to top, #030b1b 3%, #030b1b9e 30%, #030b1b1a 60%, #030b1b40 100%), linear-gradient(to right, #030b1bb3, #030b1b00 55%); }
.quote { position: absolute; bottom: 11vh; left: max(6vw, 64px); max-width: min(980px, 84vw); margin: 0; will-change: transform, opacity; }
.quote p { margin: 0 0 18px; font-size: clamp(36px, 5.6vw, 92px); line-height: 1.25; font-weight: 900; letter-spacing: -1px; text-shadow: 0 10px 50px #000c; }
.quote footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; color: var(--soft); font-size: 16px; }

/* Math: the classroom with its robot teacher fills the scene behind the text */
.intro-scene { position: absolute; inset: 0; margin: 0; overflow: hidden; pointer-events: none; }
.intro-scene img { position: absolute; top: 0; left: 0; width: 64%; height: 100%; object-fit: cover; object-position: 58% 50%; opacity: 0;
  transform: scale(var(--z, 1.14)); transform-origin: 35% 50%; will-change: transform, opacity; }
html[dir="ltr"] .intro-scene img { left: auto; right: 0; transform-origin: 65% 50%; }
.intro-scene::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, #030b1b00 0%, #030b1b26 34%, #030b1bcc 56%, #030b1b 66%), linear-gradient(0deg, #030b1b 0%, #030b1b00 24%), linear-gradient(180deg, #030b1b 0%, #030b1b00 20%); }
html[dir="ltr"] .intro-scene::after {
  background: linear-gradient(270deg, #030b1b00 0%, #030b1b26 34%, #030b1bcc 56%, #030b1b 66%), linear-gradient(0deg, #030b1b 0%, #030b1b00 24%), linear-gradient(180deg, #030b1b 0%, #030b1b00 20%); }

/* the frame around every try-it */
.device { padding: 14px; border-radius: 34px; background: linear-gradient(160deg, #1b2f57, #0a1630); box-shadow: 0 60px 120px #000c, inset 0 0 0 1px #ffffff21, 0 0 80px rgb(var(--rgb) / .18); }

/* Math: Lolly explains multiplication and division beside the program's real screens */
.mdlesson { position: relative; padding: 16vh 0 12vh; background: radial-gradient(48% 60% at 30% 52%, rgb(var(--rgb) / .16), transparent 72%); }
html[dir="ltr"] .mdlesson { background: radial-gradient(48% 60% at 70% 52%, rgb(var(--rgb) / .16), transparent 72%); }
.mdlesson-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4vw; align-items: center; }
.md-copy h3 { margin: 8px 0 12px; font-size: clamp(32px, 3.8vw, 58px); line-height: 1.25; font-weight: 900; }
.md-copy > p { margin: 0 0 20px; color: var(--soft); font-size: clamp(16px, 1.35vw, 19px); line-height: 2; }
.md-tabs { display: inline-flex; gap: 6px; margin-bottom: 18px; padding: 5px; border-radius: 999px; background: #ffffff0d; border: 1px solid #ffffff1a; }
.md-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: #dfe9f8;
  font: 800 15px Cairo, Arial, sans-serif; cursor: pointer; transition: background .25s, color .25s; }
.md-tabs b { font-size: 21px; color: var(--c2); }
.md-tabs button[aria-selected="true"] { background: var(--c); color: #071a3a; }
.md-tabs button[aria-selected="true"] b { color: #071a3a; }
.md-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: md; }
.md-steps[hidden] { display: none; }
.md-steps li { position: relative; padding: 12px 16px; padding-inline-start: 54px; border-radius: 16px; border: 1px solid #ffffff14; background: #ffffff06; color: var(--soft);
  font-size: 16.5px; line-height: 1.8; opacity: .55; counter-increment: md; transition: opacity .4s, background .4s, border-color .4s, color .4s; }
.md-steps li::before { content: counter(md); position: absolute; inset-inline-start: 14px; top: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #ffffff14; color: #fff; font-weight: 800; transition: background .4s, color .4s; }
.md-steps li.on { opacity: 1; color: #fff; background: rgb(var(--rgb) / .12); border-color: rgb(var(--rgb) / .5); }
.md-steps li.on::before { background: var(--c); color: #071a3a; }
.md-steps .eq { margin-inline-start: 4px; color: var(--c2); font: 800 18px / 1 Cairo, Arial, sans-serif; white-space: nowrap; }
.md-stage { position: relative; padding: 0 0 17%; }
.md-screen { position: relative; margin: 0; aspect-ratio: 1600 / 854; border-radius: 22px; overflow: hidden; background: #fbf6ec;
  box-shadow: 0 50px 110px #000c, 0 0 0 10px #16294d, 0 0 0 11px #ffffff21, 0 0 80px rgb(var(--rgb) / .22); }
.md-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.md-screen video[hidden] { display: none; }
.md-lolly { position: absolute; z-index: 2; bottom: -2%; inset-inline-end: -8%; width: 26%; margin: 0; filter: drop-shadow(0 30px 40px #000b); }
.md-lolly > img { display: block; width: 100%; height: auto; }
/* the bubble sits under the screen, beside Lolly, with its tail pointing at her */
.md-lolly .bubble { top: auto; bottom: 8%; inset-inline-start: auto; inset-inline-end: 94%; width: max-content; max-width: min(360px, 30vw); }
.md-lolly .bubble::after { top: 50%; bottom: auto; left: -12px; right: auto; border: 12px solid transparent; border-left: 0; border-right-color: #fff; transform: translateY(-50%); }
html[dir="ltr"] .md-lolly .bubble::after { left: auto; right: -12px; border: 12px solid transparent; border-right: 0; border-left-color: #fff; }
.md-lolly .bubble q { margin-bottom: 0; }
.md-lolly .bubble q[hidden] { display: none; }

/* Math: shots of the program in the skill cards and the gallery, whole on the program's own cream */
.art-app { background: #fefaf3; }
.art-app img { object-fit: contain; }
.tile-app { aspect-ratio: 1100 / 687; background: #fefaf3; }

/* Math: the team contest, its story above a wide screen of the program */
.teams { position: relative; padding: 10vh 0 14vh; background: radial-gradient(52% 58% at 50% 72%, rgb(var(--rgb) / .15), transparent 72%); }
.teams-in { display: grid; gap: 38px; }
.teams-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4vw; align-items: center; }
.teams-copy > * { grid-column: 1; }
.teams-copy h3 { margin: 8px 0 12px; font-size: clamp(32px, 3.8vw, 58px); line-height: 1.25; font-weight: 900; }
.teams-copy > p { margin: 0; color: var(--soft); font-size: clamp(16px, 1.35vw, 19px); line-height: 2; }
.teams-copy .teams-feats { grid-column: 2; grid-row: 1 / span 3; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.teams-feats li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; border: 1px solid #ffffff14; background: #ffffff07; color: #e8f0fb;
  font-size: 16px; line-height: 1.75; }
.teams-feats b { flex: none; min-width: 74px; height: 42px; padding: 0 12px; border-radius: 13px; display: grid; place-items: center; background: rgb(var(--rgb) / .16);
  border: 1px solid rgb(var(--rgb) / .35); color: var(--c2); font: 800 17px/1 Cairo, Arial, sans-serif; direction: ltr; white-space: nowrap; }
.teams-screen { position: relative; margin: 0; aspect-ratio: 1600 / 645; border-radius: 22px; overflow: hidden; background: #fefaf3;
  box-shadow: 0 50px 110px #000c, 0 0 0 10px #16294d, 0 0 0 11px #ffffff21, 0 0 80px rgb(var(--rgb) / .22); }
.teams-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* numbers */
.stats { padding: 4vh 0 2vh; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { padding-top: 18px; border-top: 1px solid #ffffff22; }
.stat b { display: block; font-size: clamp(46px, 5.4vw, 84px); line-height: 1.1; font-weight: 900; color: #fff; direction: ltr; text-align: start; }
html[dir="rtl"] .stat b { text-align: right; }
.stat > span { color: var(--soft); font-size: 16px; line-height: 1.8; }

/* chapter end */
.ch-end { padding: 10vh 0 6vh; }
.ch-end-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 34px 40px; border-radius: 30px;
  background: linear-gradient(120deg, rgb(var(--rgb) / .16), #ffffff06 60%); border: 1px solid #ffffff1a; }
.ch-end-in h3 { margin: 0; font-size: clamp(26px, 2.8vw, 40px); font-weight: 900; }
.ch-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== ATCODEX SCIENCE ===== */
@font-face { font-family: AmiriQuran; src: url('/assets/programs/science/fonts/amiri-quran.woff2') format('woff2'); font-display: swap; }

/* the four guides instead of one character */
.intro-lolly.guides { height: auto; display: flex; flex-direction: column-reverse; align-items: center; justify-content: center; gap: 22px; }
.intro-lolly.guides::before { inset: auto 4% -4% 4%; }
.guide-row { display: grid; grid-template-columns: repeat(2, auto); gap: 14px 40px; align-items: end; }
.guide { display: flex; flex-direction: column; align-items: center; text-align: center; animation: bob 4.4s ease-in-out infinite alternate; }
.guide:nth-child(2) { animation-delay: -1.1s; } .guide:nth-child(3) { animation-delay: -2.2s; } .guide:nth-child(4) { animation-delay: -3.3s; }
.guide img { width: clamp(104px, 10vw, 158px); height: auto; filter: drop-shadow(0 18px 24px #0009); }
.guide b { margin-top: 4px; font-size: 19px; }
.guide small { color: var(--muted); font-size: 13px; }
.guides .bubble { position: relative; inset: auto; max-width: min(380px, 80vw); transform-origin: 50% 100%; }
.guides .bubble::after { inset-inline-end: auto; left: calc(50% - 12px); }

/* seven stations of a lesson */
.sc-steps { --len: 400svh; }
.sc-steps .stage { display: flex; flex-direction: column; justify-content: center; gap: 7vh; background: radial-gradient(60% 55% at 50% 64%, rgb(var(--rgb) / .14), transparent 70%), #030b1b; }
.steps-head h3 { margin: 8px 0 0; font-size: clamp(30px, 3.8vw, 58px); line-height: 1.25; font-weight: 900; }
.stations { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-block: 0; padding: 0; list-style: none; --f: 0; }
.stations::before, .stations::after { content: ''; position: absolute; top: 37px; left: 7%; right: 7%; height: 4px; border-radius: 4px; background: #ffffff1c; }
.stations::after { background: linear-gradient(270deg, var(--c), var(--c2)); transform: scaleX(var(--f)); transform-origin: right; }
html[dir="ltr"] .stations::after { background: linear-gradient(90deg, var(--c), var(--c2)); transform-origin: left; }
.st { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; opacity: .42; transition: opacity .45s; }
.st img { width: 78px; height: 78px; padding: 12px; border-radius: 50%; background: #0d1d3d; border: 2px solid #ffffff24; transition: transform .45s, border-color .45s, box-shadow .45s; }
.st b { font-size: clamp(15px, 1.25vw, 18px); }
.st p { margin: 0; max-width: 23ch; color: var(--soft); font-size: 14.5px; line-height: 1.85; opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .45s; }
.st.done { opacity: .78; }
.st.on { opacity: 1; }
.st.on img { transform: scale(1.22); border-color: var(--c); box-shadow: 0 0 0 6px rgb(var(--rgb) / .14), 0 0 34px rgb(var(--rgb) / .55); }
.st.on p { opacity: 1; transform: none; }

/* an island: its mood, its four key lessons in order, a picture for each */
.sc-island { --len: 580svh; }
.sc-island .stage { isolation: isolate; display: grid; grid-template-rows: auto 1fr; gap: 2vh; padding: 92px max(6vw, 64px) 5vh; }
.mood { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
[data-mood="lab"] .mood { background: radial-gradient(55% 60% at 30% 62%, #3b2c86 0%, #17123f 48%, #060a1e 100%); }
html[dir="ltr"] [data-mood="lab"] .mood { background: radial-gradient(55% 60% at 70% 62%, #3b2c86 0%, #17123f 48%, #060a1e 100%); }
[data-mood="space"] .mood { background: radial-gradient(40% 50% at 28% 60%, #2a2f7a 0%, #0c1240 45%, #03061a 100%); }
[data-mood="space"] .mood::before { content: ''; position: absolute; inset: 0; opacity: .8;
  background-image: radial-gradient(1.4px 1.4px at 10% 20%, #fff 60%, #0000), radial-gradient(1px 1px at 30% 70%, #fff 60%, #0000), radial-gradient(1.6px 1.6px at 55% 30%, #ffe9c2 60%, #0000),
  radial-gradient(1px 1px at 72% 82%, #fff 60%, #0000), radial-gradient(1.3px 1.3px at 88% 14%, #d9ecff 60%, #0000), radial-gradient(1px 1px at 46% 52%, #fff 60%, #0000);
  background-size: 360px 360px; animation: twinkle 4s ease-in-out infinite; }
[data-mood="geo"] .mood { background: radial-gradient(55% 60% at 28% 60%, #155f8c 0%, #0a3459 46%, #04162b 100%); }
[data-mood="geo"] .mood::before { content: ''; position: absolute; inset: 0; opacity: .14;
  background: repeating-linear-gradient(0deg, #9fd8ff 0 1px, transparent 1px 64px), repeating-linear-gradient(90deg, #9fd8ff 0 1px, transparent 1px 64px); }
[data-mood="tech"] .mood { background: radial-gradient(50% 60% at 30% 60%, #0e3f74 0%, #08214a 46%, #030b1b 100%); }
[data-mood="tech"] .mood::before { content: ''; position: absolute; inset: 0; opacity: .22;
  background: linear-gradient(90deg, transparent 49.6%, #5fd2ff 49.6% 50.4%, transparent 50.4%) 0 0 / 120px 120px, linear-gradient(0deg, transparent 49.6%, #5fd2ff 49.6% 50.4%, transparent 50.4%) 0 0 / 120px 120px;
  mask: radial-gradient(60% 60% at 50% 50%, #000, transparent); }
/* Islamic studies: a quiet night with a crescent and warm lanterns */
[data-mood="islam"] .mood, .sc-wudu .mood, .quran .mood { background: radial-gradient(45% 55% at 82% 18%, #f3c77a1c, transparent 70%), linear-gradient(#05121d, #0a2232 55%, #0d2b3b); }
.mood .moon { position: absolute; top: 13%; inset-inline-end: 8%; width: 84px; height: 84px; border-radius: 50%; box-shadow: -16px 10px 0 0 #f6e3b4; filter: drop-shadow(0 0 22px #f3c77a90); }
.mood .lamp { position: absolute; top: 0; width: 24px; height: 38px; margin-top: var(--h, 90px); border-radius: 9px 9px 13px 13px;
  background: linear-gradient(#ffe3a0, #e6a83f); box-shadow: 0 0 34px 12px #f3b24d52, 0 0 120px 44px #f3b24d1f; transform-origin: 50% calc(-1 * var(--h, 90px)); animation: swing 5s ease-in-out infinite alternate; }
.mood .lamp::before { content: ''; position: absolute; left: 11px; bottom: 100%; width: 2px; height: var(--h, 90px); background: #f3c77a55; }
.mood .lamp::after { content: ''; position: absolute; left: 4px; top: -8px; width: 16px; height: 9px; border-radius: 8px 8px 2px 2px; background: #c58b2a; }
.mood .l1 { inset-inline-end: 20%; --h: 70px; } .mood .l2 { inset-inline-end: 31%; --h: 150px; animation-delay: -1.7s; } .mood .l3 { inset-inline-end: 43%; --h: 40px; animation-delay: -3.1s; }
@keyframes swing { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

.isl-head { will-change: transform, opacity; }
.isl-num { display: inline-block; padding: 3px 14px; border-radius: 999px; border: 1px solid #ffffff2e; background: #ffffff0c; font-size: 13px; font-weight: 700; color: var(--c3); }
.isl-head h3 { margin: 10px 0 4px; font-size: clamp(32px, 4.2vw, 66px); line-height: 1.2; font-weight: 900; text-shadow: 0 10px 40px #0008; }
.isl-guide { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--soft); font-size: 16px; }
.isl-guide img { width: 40px; height: auto; filter: drop-shadow(0 6px 10px #0008); }
.isl-body { display: grid; grid-template-columns: 1.05fr .95fr; gap: 4vw; align-items: center; min-height: 0; }
.isl-visual { position: relative; aspect-ratio: 16 / 10.5; max-height: 62vh; width: 100%; }
.isl-media { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; background: #0b1730; box-shadow: 0 40px 90px #000b, 0 0 0 1px #ffffff1f; opacity: 0; will-change: transform, opacity; }
.isl-media .m { position: absolute; inset: 0; margin: 0; opacity: 0; will-change: transform, opacity; }
.isl-media .m video, .isl-media .m > img { width: 100%; height: 100%; object-fit: cover; }
.m.emo3 { display: flex; align-items: center; justify-content: center; gap: 4%; background: radial-gradient(70% 80% at 50% 70%, rgb(var(--rgb) / .45), #0d1b3d 75%); }
.m.emo3 img { width: 25%; height: auto; filter: drop-shadow(0 18px 22px #0008); animation: bob 3.6s ease-in-out infinite alternate; }
.m.emo3 img:nth-child(2) { width: 30%; animation-delay: -1.2s; } .m.emo3 img:nth-child(3) { animation-delay: -2.4s; }
.m.art2 { display: grid; grid-template-columns: 1fr 1fr; align-items: end; padding: 6% 6% 0; background: radial-gradient(70% 80% at 50% 80%, #f3c77a40, #0d2433 75%); }
.m.art2 img { width: 100%; height: 88%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 14px 18px #0008); }
.isl-art { position: absolute; z-index: 2; left: 50%; top: 50%; width: 74%; height: auto; pointer-events: none; filter: drop-shadow(0 30px 40px #000a); will-change: transform; }
.lessons { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: lsn; will-change: transform, opacity; }
.lsn { position: relative; padding: 14px 18px 14px; padding-inline-start: 62px; border-radius: 18px; border: 1px solid #ffffff14; background: #ffffff06; counter-increment: lsn;
  transition: background .45s, border-color .45s, opacity .45s; opacity: .62; }
.lsn::before { content: counter(lsn); position: absolute; inset-inline-start: 16px; top: 13px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: #ffffff14; font-weight: 800; transition: background .45s, color .45s; }
.lsn b { font-size: clamp(17px, 1.45vw, 20px); }
.lsn small { margin-inline-start: 10px; font: 700 11px Arial, sans-serif; letter-spacing: .6px; color: var(--muted); direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.lsn .more { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .6s ease, opacity .45s; }
.lsn.done { opacity: .78; }
.lsn.done::before { background: rgb(var(--rgb) / .3); }
.lsn.on { opacity: 1; background: rgb(var(--rgb) / .12); border-color: rgb(var(--rgb) / .5); }
.lsn.on::before { background: var(--c); color: #160b33; }
.lsn.on .more { max-height: 260px; opacity: 1; }
.idea { margin: 8px 0 8px; color: #e8f0fc; font-size: 15.5px; line-height: 1.95; }
.goal { margin: 0; color: var(--soft); font-size: 14.5px; line-height: 1.85; }
.goal i { display: inline-block; margin-inline-end: 8px; padding: 0 10px; border-radius: 999px; background: rgb(var(--rgb) / .2); color: var(--c3); font-style: normal; font-size: 12.5px; font-weight: 800; }

/* try it: the five looks of the world map */
.maptry { position: relative; padding: 14vh 0 10vh; background: radial-gradient(50% 60% at 30% 50%, #0f4d7a40, transparent 70%); }
html[dir="ltr"] .maptry { background: radial-gradient(50% 60% at 70% 50%, #0f4d7a40, transparent 70%); }
.maptry-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 4vw; align-items: center; }
.maptry-copy h3, .quran-copy h3 { margin: 8px 0 12px; font-size: clamp(30px, 3.6vw, 54px); line-height: 1.3; font-weight: 900; }
.maptry-copy > p, .quran-copy > p { margin: 0 0 18px; color: var(--soft); font-size: clamp(16px, 1.3vw, 18.5px); line-height: 2; }
.looks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.looks button { display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; border-radius: 14px; border: 1px solid #ffffff1f; background: #ffffff08; color: #dfe9f8;
  font: 700 12.5px/1.4 Cairo, Arial, sans-serif; cursor: pointer; transition: background .25s, border-color .25s, transform .25s; }
.looks button:hover { transform: translateY(-2px); background: #ffffff12; }
.looks img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 9px; }
.looks button[aria-selected="true"] { border-color: var(--c2); background: #ffffff14; box-shadow: 0 0 0 1px var(--c2); }
.mapframe { position: relative; margin: 0; aspect-ratio: 1920 / 1008; border-radius: 24px; overflow: hidden; background: #0b3a66; box-shadow: 0 50px 110px #000c, 0 0 0 1px #ffffff21; }
.mapframe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.05); transition: opacity .8s ease, transform 1.4s ease; }
.mapframe img.on { opacity: 1; transform: none; }

/* wudu, step by step */
.sc-wudu { --len: 760svh; }
.sc-wudu .stage { isolation: isolate; display: grid; grid-template-rows: auto 1fr auto; gap: 1.5vh; padding: 92px max(6vw, 64px) 4vh; }
.wudu-head h3 { margin: 8px 0 0; font-size: clamp(32px, 4vw, 62px); line-height: 1.2; font-weight: 900; }
.wudu-body { display: grid; grid-template-columns: .8fr 1.2fr; grid-template-rows: 1fr auto; gap: 2vh 4vw; align-items: center; min-height: 0; }
.wudu-kid { position: relative; grid-row: 1 / span 2; margin: 0; height: min(60vh, 540px); display: grid; place-items: end center; }
.wudu-kid::before { content: ''; position: absolute; bottom: -2%; width: 70%; height: 14%; border-radius: 50%; background: radial-gradient(closest-side, #5fc3f0aa, transparent); }
.wudu-kid img { position: relative; height: 100%; width: auto; filter: drop-shadow(0 26px 36px #000b); }
.flow { position: absolute; inset: 0 25% 30%; opacity: 0; pointer-events: none; }
.flow i { position: absolute; top: 0; width: 9px; height: 15px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: linear-gradient(#e6f8ff, #4fb6f0); box-shadow: 0 0 10px #8fd8ff; }
.flow i:nth-child(1) { left: 22%; } .flow i:nth-child(2) { left: 38%; animation-delay: .25s !important; } .flow i:nth-child(3) { left: 52%; animation-delay: .5s !important; }
.flow i:nth-child(4) { left: 66%; animation-delay: .15s !important; } .flow i:nth-child(5) { left: 80%; animation-delay: .4s !important; }
.wudu-kid.pour .flow { animation: pourOn 1.6s ease-out; }
.wudu-kid.pour .flow i { animation: drip .7s linear 2; }
@keyframes pourOn { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes drip { from { transform: translateY(0); opacity: 1; } to { transform: translateY(300px); opacity: 0; } }
.wudu-cards { position: relative; height: clamp(230px, 32vh, 290px); }
.wd { position: absolute; inset: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr auto; column-gap: 22px; align-content: start; padding: 24px 26px;
  border-radius: 26px; background: linear-gradient(160deg, #13394a, #0b2433); border: 1px solid #f3c77a33; box-shadow: 0 40px 80px #0009; opacity: 0; will-change: transform, opacity; }
.wd img { grid-row: 1 / span 4; width: clamp(72px, 7vw, 104px); height: auto; filter: drop-shadow(0 12px 16px #0008); }
.wd-n { color: var(--c2); font-size: 14px; font-weight: 800; }
.wd h4 { margin: 4px 0 6px; font-size: clamp(24px, 2.4vw, 34px); font-weight: 900; }
.wd p { margin: 0 0 14px; color: #dbe9f2; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.9; }
.wd .voice { justify-self: start; }
.wd-path { display: flex; justify-content: center; gap: clamp(6px, 1vw, 14px); margin: 0; padding: 0; list-style: none; }
.wd-path li { display: grid; place-items: center; width: clamp(38px, 3.6vw, 52px); height: clamp(38px, 3.6vw, 52px); border-radius: 50%; background: #ffffff0c;
  border: 1px solid #ffffff1c; opacity: .4; transition: opacity .4s, transform .4s, border-color .4s, background .4s; }
.wd-path img { width: 66%; height: auto; }
.wd-path li.done { opacity: .85; background: #f3c77a1a; }
.wd-path li.on { opacity: 1; transform: scale(1.22); border-color: var(--c2); box-shadow: 0 0 22px #f3c77a66; }
.wd-dua { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin: 0 auto; max-width: 1000px; text-align: center; color: #f6e7c3;
  font-size: clamp(16px, 1.4vw, 20px); line-height: 1.9; opacity: 0; will-change: transform, opacity; }

/* try it: the Quran with Sheikh Al-Husary */
.quran { position: relative; isolation: isolate; padding: 14vh 0 12vh; overflow: hidden; }
.quran-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4vw; align-items: center; }
.mushaf { padding: 16px; border-radius: 30px; background: linear-gradient(160deg, #18423a, #0b2420); box-shadow: 0 50px 110px #000c, inset 0 0 0 1px #f3c77a3d; }
.ms-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.ms-tabs button { height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid #f3c77a40; background: #ffffff0a; color: #f3e6c6; font: 800 15px Cairo, Arial, sans-serif; cursor: pointer; }
.ms-tabs button[aria-selected="true"] { background: linear-gradient(135deg, #f7d58e, var(--gold2)); color: #2a1c02; border-color: transparent; }
.ms-page { padding: 18px 24px 22px; border-radius: 20px; text-align: center; color: #1f2937; border: 2px solid #d9b44a;
  background: radial-gradient(120% 90% at 50% 0%, #fffaf0, #f4e8cb); box-shadow: inset 0 0 0 6px #fff7e0, inset 0 0 0 7px #e5cb85; }
.ms-name { display: inline-block; margin: 0 0 4px; padding: 2px 20px; border-radius: 999px; background: #0b6b55; color: #fff; font: 800 15px Cairo, Arial, sans-serif; }
.ms-basmala { margin: 4px 0; font-family: AmiriQuran, 'Times New Roman', serif; font-size: clamp(22px, 2vw, 30px); color: #065f46; }
.ms-text { margin: 0; font-family: AmiriQuran, 'Times New Roman', serif; font-size: clamp(24px, 2.5vw, 36px); line-height: 2.35; }
.ayah { cursor: pointer; border-radius: 12px; padding: 0 4px; transition: background .3s, box-shadow .3s; }
.ayah:hover { background: #fdf0c8; }
.ayah.on, .ms-basmala.on { background: #fde5a0; box-shadow: 0 0 0 3px #fde5a0; }
.ms-basmala { border-radius: 12px; transition: background .3s, box-shadow .3s; }
.ayah-end { white-space: nowrap; }
/* the verse number sits in the middle of its circle: a flex box with line-height 1, so the font's tall line does not push it down */
.ayah-n { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 1.62em; height: 1.62em; padding: .06em .18em 0; margin: 0 .2em;
  border-radius: 999px; border: 2px solid #c9a23c; box-shadow: inset 0 0 0 2px #fffaf0, inset 0 0 0 3px #e3c67e; background: radial-gradient(circle, #fffdf7 55%, #f5e4b6);
  color: #7a5a12; font: 800 .44em/1 Cairo, Arial, sans-serif; font-variant-numeric: lining-nums tabular-nums; vertical-align: middle; }
.ms-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.ms-credit { color: #e9dcb8; font-size: 13.5px; }
.ms-words { margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: #ffffff0b; border: 1px solid #f3c77a2b; }
.ms-words b { color: var(--c2); }
/* each meaning on the same line as its word: the rows line up on the text's baseline, not on the taller Quran font's top */
.ms-words dl { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 6px 16px; margin: 8px 0 0; }
.ms-words dt { font-family: AmiriQuran, 'Times New Roman', serif; font-size: 21px; color: #fde5a0; }
.ms-words dd { margin: 0; color: var(--soft); font-size: 15px; line-height: 2; }

/* ===== ATCODEX ARABIC ===== */
@font-face { font-family: Naskh; src: url('/assets/programs/arabic/fonts/naskh-arabic.woff2') format('woff2'); font-weight: 400 700; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
.glyph { font-family: Naskh, 'Times New Roman', serif; font-weight: 700; line-height: 1.3; }
.ar-glyphs i { font-family: Naskh, Cairo, serif; font-weight: 700; }

/* Bobo among letter tiles */
.intro-lolly.bobo { height: min(66vh, 560px); }
.bobo .lolly { height: min(74%, 411px); }
.bobo .bubble q { margin-bottom: 0; }
.tiles i { position: absolute; display: grid; place-items: center; width: clamp(52px, 4.8vw, 74px); aspect-ratio: 1; border-radius: 30%; font: 700 clamp(28px, 2.7vw, 42px) / 1 Naskh, serif;
  color: #fff; background: linear-gradient(150deg, #ffa58a, #e9604c); box-shadow: 0 16px 30px #0008, inset 0 -5px 0 #0002; animation: bob 4s ease-in-out infinite alternate; }
.tiles i:nth-child(1) { top: 16%; inset-inline-end: 4%; rotate: 9deg; }
.tiles i:nth-child(2) { top: 42%; inset-inline-end: -3%; rotate: -7deg; animation-delay: -1.3s; color: #3a2405; background: linear-gradient(150deg, #ffe08f, #f2a93b); }
.tiles i:nth-child(3) { top: 50%; inset-inline-start: 1%; rotate: -10deg; animation-delay: -2.1s; color: #e9604c; background: linear-gradient(150deg, #fffaf3, #ffe6d3); }
.tiles i:nth-child(4) { top: 74%; inset-inline-start: 9%; rotate: 6deg; animation-delay: -3s; }

/* a lit board for the letter scenes; Arabic content always reads right to left */
.board { position: relative; overflow: hidden; direction: rtl; border-radius: 30px; border: 1px solid #ffffff17;
  background: repeating-linear-gradient(#0000 0 47px, #ffffff08 47px 48px), radial-gradient(80% 70% at 50% 40%, #2b1d36, #120e24 72%);
  box-shadow: 0 40px 90px #000a, 0 0 80px rgb(var(--rgb) / .12); }
.board i { font-style: normal; color: #f0614f; }
.sc-letter { --len: 560svh; }
.sc-harakat { --len: 640svh; }
.sc-phonics { --len: 620svh; }
.sc-kgplay { --len: 620svh; }
.sc-letter .stage, .sc-harakat .stage, .sc-phonics .stage, .sc-kgplay .stage { display: grid; grid-template-rows: auto 1fr auto; gap: 2.2vh; padding: 92px 0 4.5vh;
  background: radial-gradient(50% 60% at 68% 58%, rgb(var(--rgb) / .14), transparent 70%), #030b1b; }
html[dir="ltr"] .sc-letter .stage, html[dir="ltr"] .sc-harakat .stage, html[dir="ltr"] .sc-phonics .stage, html[dir="ltr"] .sc-kgplay .stage { background: radial-gradient(50% 60% at 32% 58%, rgb(var(--rgb) / .14), transparent 70%), #030b1b; }
.letter-head { will-change: transform, opacity; }
.letter-head h3 { margin: 8px 0 0; font-size: clamp(30px, 3.8vw, 58px); line-height: 1.25; font-weight: 900; }
.letter-body { display: grid; grid-template-columns: 1.12fr .88fr; gap: 4vw; align-items: center; min-height: 0; }
.lt-view { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2.4%; padding: 5%; opacity: 0; }
.lt-view > * { will-change: transform, opacity; }
.lt-name { flex-direction: column; gap: 0; }
.lt-name .glyph { font-size: min(31vh, 280px); line-height: 1.15; color: transparent; background: linear-gradient(165deg, #ffe3d6 8%, var(--c) 52%, #ea5a48);
  -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 18px 40px rgb(var(--rgb) / .35)); }
.lt-tag { padding: 0 28px 6px; border-radius: 999px; border: 1px solid rgb(var(--rgb) / .4); background: rgb(var(--rgb) / .1); font: 700 clamp(30px, 3vw, 44px) / 1.6 Naskh, serif; color: var(--c2); }
/* white cards like the program's own word cards */
.lt-forms figure, .lt-words figure, .lt-similar figure, .hw { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 22px;
  background: linear-gradient(#fffdf8, #fff2e2); color: #2b2140; box-shadow: 0 18px 36px #0007, inset 0 -4px 0 #f1dcc4; }
.lt-forms figure { flex: 1; max-width: 23%; height: 72%; gap: 2px; padding: 14px 6px; }
.lt-forms small, .hw.more small { font: 700 13px Cairo, Arial, sans-serif; color: #9a6b5a; }
.lt-forms .glyph { font-size: clamp(54px, 5.4vw, 90px); color: #f0614f; }
.lt-forms img { width: 48%; height: auto; filter: drop-shadow(0 8px 10px #0003); }
.lt-forms figcaption, .lt-words figcaption, .hw figcaption { font: 700 clamp(22px, 2vw, 30px) / 1.5 Naskh, serif; }
.lt-words { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; gap: 14px; padding: 6% 7%; }
.lt-words figure { gap: 2px; padding: 8px; }
.lt-words img { height: 54%; width: auto; max-width: 70%; object-fit: contain; filter: drop-shadow(0 8px 10px #0003); }
.lt-similar figure { width: 24%; aspect-ratio: 3 / 4; gap: 12px; }
.lt-similar .glyph { font-size: clamp(70px, 7vw, 118px); line-height: 1.15; }
.lt-similar figure::before { content: ''; order: 2; width: calc(var(--n) * 16px - 6px); height: 10px; background: radial-gradient(circle 5px at 5px 5px, #f0614f 96%, #0000) 0 0 / 16px 10px repeat-x; }
.lt-similar figcaption { order: 3; font: 700 14px Cairo, Arial, sans-serif; color: #7d5b4c; }
/* the text beside the board: one step at a time */
.cards { position: relative; height: clamp(270px, 36vh, 340px); }
.scard { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; will-change: transform, opacity; }
.scard-n { color: var(--c2); font-size: 15px; font-weight: 800; }
.scard h4 { margin: 6px 0 10px; font-size: clamp(28px, 2.9vw, 44px); line-height: 1.3; font-weight: 900; }
.scard p { margin: 0 0 14px; color: #e8f0fc; font-size: clamp(16px, 1.35vw, 19px); line-height: 2; }
.scard .goal { margin: 0; color: var(--soft); font-size: 15px; }
.sc-dots { display: flex; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc-dots li { position: relative; width: 46px; height: 4px; border-radius: 4px; background: #ffffff22; overflow: hidden; }
.sc-dots li::after { content: ''; position: absolute; inset: 0; background: var(--c); transform: scaleX(var(--f, 0)); transform-origin: right; }
html[dir="ltr"] .sc-dots li::after { transform-origin: left; }

/* harakat: the bare letter on top; under it, the letter with each mark (only the mark shows), and the mark that falls into place */
.hk-stage { display: grid; grid-template-rows: 1fr 30%; }
.hk-letter { position: relative; display: grid; place-items: center; }
.hk-letter .glyph { grid-area: 1 / 1; font-size: min(26vh, 236px); line-height: 1.6; }
.hk-letter .base { color: #fff8f2; text-shadow: 0 0 50px rgb(var(--rgb) / .3); }
.hk-letter .v { color: var(--c); opacity: 0; }
.mk { position: absolute; left: 50%; top: 4%; width: min(9vh, 80px); height: auto; overflow: visible; fill: none; stroke: var(--c); stroke-width: 10; stroke-linecap: round;
  stroke-linejoin: round; opacity: 0; filter: drop-shadow(0 0 12px rgb(var(--rgb) / .7)); will-change: transform, opacity; }
.mk.low { top: auto; bottom: 0; }
.hk-words { position: relative; }
.hw { position: absolute; inset: 0 14% 18%; flex-direction: row; gap: 6%; opacity: 0; will-change: transform, opacity; }
.hw img { height: 72%; width: auto; }
.hw figcaption { font-size: clamp(30px, 3vw, 46px); }
.hw.more { justify-content: space-around; gap: 0; }
.hw.more span { display: flex; flex-direction: column; align-items: center; font: 700 clamp(24px, 2.2vw, 34px) / 1.5 Naskh, serif; color: #f0614f; }

/* the four levels: a warm study night with faint letters */
[data-mood="letters"] .mood { background: radial-gradient(55% 60% at 30% 62%, #4a2333 0%, #1f1430 48%, #070a1c 100%); }
html[dir="ltr"] [data-mood="letters"] .mood { background: radial-gradient(55% 60% at 70% 62%, #4a2333 0%, #1f1430 48%, #070a1c 100%); }
[data-mood="letters"] .mood::before { content: 'ا ب ت ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ه و ي ا ب ت ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ه و ي';
  position: absolute; inset: -4% -2%; direction: rtl; text-align: justify; word-spacing: .5em; font: 700 clamp(70px, 8vw, 130px) / 1.35 Naskh, serif; color: rgb(var(--rgb) / .05); }

/* try it: tracing, and sun and moon letters */
.tracetry, .lamtry, .spelltry, .matchtry { position: relative; padding: 14vh 0 10vh; background: radial-gradient(48% 60% at 30% 52%, rgb(var(--rgb) / .14), transparent 72%); }
html[dir="ltr"] .tracetry, html[dir="ltr"] .lamtry, html[dir="ltr"] .spelltry, html[dir="ltr"] .matchtry { background: radial-gradient(48% 60% at 70% 52%, rgb(var(--rgb) / .14), transparent 72%); }
.tracetry-grid, .lamtry-grid, .spelltry-grid, .matchtry-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 5vw; align-items: center; }
.tracetry-copy h3, .lamtry-copy h3, .spelltry-copy h3, .matchtry-copy h3 { margin: 8px 0 12px; font-size: clamp(30px, 3.6vw, 54px); line-height: 1.3; font-weight: 900; }
.tracetry-copy > p, .lamtry-copy > p, .spelltry-copy > p, .matchtry-copy > p { margin: 0 0 18px; color: var(--soft); font-size: clamp(16px, 1.3vw, 18.5px); line-height: 2; }
.from-app { position: relative; width: min(100%, 380px); aspect-ratio: 16 / 9; margin: 6px 0 0; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 50px #0009, 0 0 0 1px #ffffff1f; }
.from-app img { width: 100%; height: 100%; object-fit: cover; }
.from-app figcaption { position: absolute; inset: auto 0 0; padding: 28px 14px 8px; background: linear-gradient(to top, #030b1be6, #030b1b00); color: var(--soft); font-size: 13px; }
.tracer, .lamgame { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 22px; background: linear-gradient(#fffaf3, #fff1e0); color: #2b2140; }
.tr-letters { display: flex; justify-content: center; gap: 8px; direction: rtl; }
.tr-letters button { width: 52px; height: 52px; border-radius: 16px; border: 2px solid #f1dcc4; background: #fff; color: #2b2140; font: 700 30px / 1 Naskh, serif; cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s; }
.tr-letters button:hover { transform: translateY(-2px); }
.tr-letters button[aria-selected="true"] { background: #f0614f; border-color: #f0614f; color: #fff; box-shadow: 0 8px 18px #f0614f55; }
.tr-pad { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px #f3e4d2; overflow: hidden; transition: box-shadow .4s; }
.tr-pad.pass { box-shadow: inset 0 0 0 3px #2ecc9a, 0 0 0 4px #2ecc9a33; }
.tr-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tr-ink { touch-action: none; cursor: crosshair; }
.tr-score { position: absolute; top: 12px; inset-inline-end: 14px; padding: 2px 14px; border-radius: 999px; background: #2ecc9a; color: #fff; font: 800 16px / 1.8 Cairo, Arial, sans-serif;
  opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.tr-score.on { opacity: 1; transform: none; }
.tr-score.low { background: #f0a63a; }
.tr-msg { min-height: 1.8em; margin: 0; text-align: center; font-weight: 800; line-height: 1.8; color: #5a4636; }
.tr-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tr-colors { display: flex; gap: 8px; margin-inline-end: auto; }
.tr-colors button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: var(--k); box-shadow: 0 0 0 1px #0002; cursor: pointer; }
.tr-colors button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--k); }
.tracer .btn-line, .lamgame .btn-line { height: 44px; color: #2b2140; border-color: #2b214033; background: #fff; }
.tracer .btn-gold { height: 44px; }
/* the two rules, side by side with the program's own colours: a night for the moon, a warm day for the sun */
.lam-rules { display: grid; gap: 12px; }
.rule { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 20px; border: 1px solid #ffffff17; }
.rule.moon { background: linear-gradient(135deg, #2f3d80, #1b2452); }
.rule.sun { background: linear-gradient(135deg, #5a3d12, #33250e); }
.rule img { width: 52px; height: 52px; }
.rule b { font-size: 18px; }
.rule p { margin: 2px 0 0; color: var(--soft); font-size: 14.5px; line-height: 1.7; }
.rule .ex { direction: rtl; font: 700 clamp(30px, 2.6vw, 40px) / 1.5 Naskh, serif; color: #fff; }
.lam, .sh { font-style: normal; }
.moon .lam { color: #a9c8ff; }
.sun .lam { opacity: .38; }
.sun .sh { color: var(--c2); }
.lg-say { min-height: 3.6em; margin: 0; padding: 10px 16px; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px #0000000f; display: grid; place-items: center;
  text-align: center; font-weight: 800; line-height: 1.7; }
.lg-say.ok { color: #127a59; } .lg-say.no { color: #c2410c; }
.lg-tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; direction: rtl; }
.lg-word { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 6px; border-radius: 18px; border: 2px solid #f1dcc4; background: #fff; color: #2b2140;
  cursor: pointer; box-shadow: 0 6px 0 #f1dcc4; transition: transform .2s, border-color .2s, box-shadow .2s; }
.lg-word img { width: 52px; height: 52px; }
.lg-word span { font: 700 26px / 1.5 Naskh, serif; }
.lg-word:hover { transform: translateY(-3px); }
.lg-word[aria-pressed="true"] { border-color: #f0614f; box-shadow: 0 6px 0 #f0614f, 0 0 0 5px #f0614f2e; transform: translateY(-4px); }
.lg-word.gone { visibility: hidden; }
.lg-word.no { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.lg-fly { position: fixed; z-index: 50; margin: 0; pointer-events: none; transition: transform .6s cubic-bezier(.4, 0, .2, 1), opacity .6s ease-in; }
.lg-baskets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.basket { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; align-items: center; column-gap: 10px; min-height: 106px; padding: 12px 14px; border: 0;
  border-radius: 20px; font: inherit; text-align: start; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.basket.moon { background: linear-gradient(150deg, #3d4d90, #27326a); color: #fff; }
.basket.sun { background: linear-gradient(150deg, #ffd66b, #f4b23c); color: #3a2405; }
.basket img { grid-row: 1 / span 2; width: 52px; height: 52px; }
.basket b { font-size: 18px; }
.basket .in { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; direction: rtl; }
.basket .in span { padding: 0 9px; border-radius: 10px; background: #ffffff24; font: 700 18px / 1.6 Naskh, serif; }
.basket.sun .in span { background: #ffffffa6; }
.basket.sun .sh { color: #c2410c; }
.lamgame.picking .basket { box-shadow: 0 0 0 3px #f0614f80; }
.basket:hover { transform: translateY(-2px); }
.basket.hit { animation: hit .5s; }
@keyframes hit { 40% { transform: scale(1.05); } }
.lg-end { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; border-radius: 22px;
  text-align: center; background: radial-gradient(circle at 50% 50%, #fffaf3f5, #fff1e0eb); }
.lg-end[hidden] { display: none; }
.lg-score { font-size: clamp(24px, 2.4vw, 34px); font-weight: 900; }
.lg-end p { margin: 0; max-width: 36ch; color: #5a4636; line-height: 1.8; }

/* ===== ATCODEX ENGLISH ===== */
@font-face { font-family: Fredoka; src: url('/assets/programs/english/fonts/fredoka.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
.en-glyphs i { font-family: Fredoka, Cairo, sans-serif; font-weight: 700; }
.art-shot video { width: 100%; height: 100%; object-fit: cover; }

/* Sunny, the program's sun: the rays turn slowly and the eyes follow the pointer, as in the program */
.intro-lolly.sunny-fig { height: min(66vh, 560px); place-items: center; }
.sunny { position: relative; width: min(44vh, 390px); height: auto; overflow: visible; filter: drop-shadow(0 0 70px #fbbf2459) drop-shadow(0 30px 40px #0008);
  animation: bob 4.6s ease-in-out infinite alternate; }
.sunny .rays { transform-origin: 50px 50px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.floaters img { position: absolute; width: clamp(54px, 5vw, 80px); height: auto; filter: drop-shadow(0 14px 20px #0008); animation: bob 4s ease-in-out infinite alternate; }
.floaters img:nth-child(1) { top: 14%; inset-inline-end: 6%; rotate: 8deg; }
.floaters img:nth-child(2) { top: 62%; inset-inline-end: 0; animation-delay: -1.3s; }
.floaters img:nth-child(3) { top: 50%; inset-inline-start: 2%; rotate: -12deg; animation-delay: -2.1s; }
.floaters img:nth-child(4) { top: 76%; inset-inline-start: 14%; animation-delay: -3s; }
.sunny-fig .bubble q { margin-bottom: 0; font-family: Fredoka, Cairo, sans-serif; font-weight: 600; }

/* phonics board: English always reads left to right; the program's tiles and word cards */
.board.en-board { direction: ltr; background: repeating-linear-gradient(#0000 0 47px, #ffffff08 47px 48px), radial-gradient(80% 70% at 50% 40%, #16305e, #0a1531 72%);
  box-shadow: 0 40px 90px #000a, 0 0 80px rgb(var(--rgb) / .14); }
.lt-stage, .hk-stage, .en-board, .kg-board { height: min(60vh, 560px); }
.ph-view { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3%; padding: 5%; opacity: 0; font-family: Fredoka, Cairo, sans-serif; }
.ph-view > * { will-change: transform, opacity; }
.ph-cards .lc { flex: 1; max-width: 29%; height: 76%; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: 24px;
  background: linear-gradient(#fff, #eef4ff); color: #1b2747; box-shadow: 0 18px 36px #0007, inset 0 -5px 0 #d5e2f7; }
.lc .pair { font: 700 clamp(46px, 4.4vw, 76px) / 1 Fredoka, sans-serif; letter-spacing: 3px; color: #2b8ef0; text-shadow: 0 4px 0 #1b64b0; }
.en-board .lc .pair i { color: inherit; }
.lc .tl { padding: 0 16px 6px; border-radius: 16px; background: var(--c); color: #0b2447; font: 700 clamp(38px, 3.4vw, 58px) / 1.15 Fredoka, sans-serif; box-shadow: inset 0 -5px 0 #0002; }
.lc img { height: 38%; width: auto; max-width: 72%; object-fit: contain; filter: drop-shadow(0 10px 12px #0003); }
.lc figcaption { font: 700 clamp(24px, 2.2vw, 36px) / 1.2 Fredoka, sans-serif; color: #1b2747; }
.en-board .lc figcaption i { font-style: normal; color: #2b8ef0; }
.ph-teams { flex-wrap: wrap; align-content: center; gap: 4%; }
.ph-teams .lc { flex: 0 0 38%; max-width: 38%; height: 41%; gap: 2px; }
.ph-teams .lc img { height: 50%; }
.ph-blend, .ph-magic { flex-direction: column; gap: 4%; }
.ph-tiles { display: flex; gap: 6px; }
.ph-tiles b { position: relative; display: grid; place-items: center; width: clamp(64px, 6.2vw, 96px); aspect-ratio: 1 / 1.1; border-radius: 20px; background: #fff; color: #1b2747;
  font: 700 clamp(46px, 4.6vw, 72px) / 1 Fredoka, sans-serif; box-shadow: 0 9px 0 #c9d8f0, 0 18px 30px #0006; transition: background .4s, color .4s, box-shadow .4s; }
.ph-tiles b.hl { background: var(--c); color: #0b2447; box-shadow: 0 9px 0 #2b8ad0, 0 18px 30px #0006; }
.ph-tiles b.me, .ph-tiles b.vw.long { background: var(--c2); color: #3a2805; box-shadow: 0 9px 0 #d9a92e, 0 18px 30px #0006; }
.en-board .spark { position: absolute; top: -22px; right: -22px; width: 40px; height: 40px; opacity: 0; background: #fff7c2; filter: drop-shadow(0 0 12px #ffd166);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ph-pic { height: 30%; width: auto; filter: drop-shadow(0 16px 20px #0008); }
.ph-eq { margin: 0; font: 600 clamp(24px, 2.2vw, 34px) / 1 Fredoka, sans-serif; color: #dce9ff; }
.en-board .ph-eq i { font-style: normal; color: var(--c2); }

/* the four stages: a night sky full of faint letters */
[data-mood="sky"] .mood { background: radial-gradient(55% 60% at 30% 62%, #1d4a8c 0%, #0f2656 48%, #050c22 100%); }
html[dir="ltr"] [data-mood="sky"] .mood { background: radial-gradient(55% 60% at 70% 62%, #1d4a8c 0%, #0f2656 48%, #050c22 100%); }
[data-mood="sky"] .mood::before { content: 'A a B b C c D d E e F f G g H h I i J j K k L l M m N n O o P p Q q R r S s T t U u V v W w X x Y y Z z';
  position: absolute; inset: -4% -2%; direction: ltr; text-align: justify; word-spacing: .4em; font: 700 clamp(64px, 7vw, 120px) / 1.3 Fredoka, sans-serif; color: rgb(var(--rgb) / .05); }
.isl-guide svg { width: 40px; height: 40px; overflow: visible; filter: drop-shadow(0 6px 10px #0008); }
.lsn .mas { width: 30px; height: 30px; margin-inline-end: 8px; vertical-align: -6px; }

/* try it: Spell It, in the program's own colours */
.speller { position: relative; display: flex; flex-direction: column; aspect-ratio: 16 / 11; border-radius: 22px; overflow: hidden; color: #1b2747; user-select: none; -webkit-user-select: none;
  background: linear-gradient(#3d8bf2, #7b6cf6 70%, #9b8cff); font-family: Fredoka, Cairo, sans-serif; }
.sp-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #ffffffe8; }
.sp-bar b { font: 700 20px Fredoka, sans-serif; }
.sp-stars { display: flex; gap: 4px; }
.sp-stars i { width: 20px; height: 20px; background: #d6deea; transition: background .3s, transform .3s;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.sp-stars i.on { background: #ffc61a; transform: scale(1.15); }
.sp-sky { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 12px; }
.sp-pic { display: grid; place-items: center; width: clamp(110px, 10vw, 148px); aspect-ratio: 1; border-radius: 24px; background: #fff; box-shadow: 0 8px 0 #d3dcf0, 0 18px 30px #0003; }
.sp-pic img { width: 74%; height: auto; }
.sp-pic.ok { animation: hit .5s; }
.sp-slots, .sp-tiles { display: flex; gap: 8px; }
.sp-slot { position: relative; display: grid; place-items: center; width: 52px; height: 58px; border-radius: 14px; border: 3px dashed #ffffffb3; background: #ffffff26;
  font: 700 32px / 1 Fredoka, sans-serif; transition: background .25s, color .25s, box-shadow .25s; }
.sp-slot .gh { position: absolute; font-style: normal; color: #ffffff8c; }
.speller:not(.hint) .sp-slot .gh, .sp-slot.on .gh { display: none; }
.sp-slot.on { border: 0; background: #fff; box-shadow: 0 5px 0 #c9d8f0; }
.sp-slots.ok .sp-slot { background: #34d399; color: #fff; box-shadow: 0 5px 0 #059669; }
.sp-tile { width: 52px; height: 56px; padding: 0; border: 0; border-radius: 14px; background: var(--k); color: #fff; font: 700 30px / 1 Fredoka, sans-serif; cursor: pointer;
  box-shadow: inset 0 -5px 0 #0003, 0 8px 14px #0003; transition: transform .15s; }
.sp-tile:hover { transform: translateY(-3px); }
.sp-tile.used { visibility: hidden; }
.sp-tile.no { animation: shake .45s; }
.sp-msg { min-height: 1.7em; margin: 0; color: #fff; font: 600 17px / 1.7 Fredoka, Cairo, sans-serif; text-align: center; text-shadow: 0 2px 6px #0004; }
.sp-end { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center;
  background: radial-gradient(circle at 50% 55%, #ffffffeb, #e8f0ffe0); font-family: Cairo, Arial, sans-serif; }
.sp-end[hidden] { display: none; }
.sp-score { font-size: clamp(24px, 2.4vw, 34px); font-weight: 900; }
.sp-end p { margin: 0; max-width: 34ch; color: #3b5076; line-height: 1.8; }

/* ===== ATCODEX KG ===== */
.kg-glyphs i { font-weight: 900; }
.intro-lolly.fofo-fig { height: min(68vh, 580px); }
.fofo-fig .lolly { height: min(88%, 520px); }
.fofo-fig .bubble q { margin-bottom: 0; }

/* the KG board in the program's own look: white cards with dark outlines on mint */
.board.kg-board { background: radial-gradient(90% 80% at 50% 25%, #f6fcf9, #d9f2e5); border-color: #ffffff40; color: #1d2b24; box-shadow: 0 40px 90px #000a, 0 0 80px rgb(var(--rgb) / .22); }
.kg-view { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.5%; padding: 5% 6%; opacity: 0; }
.kg-view > * { will-change: transform, opacity; }
.kq { margin: 0; font-size: clamp(20px, 1.9vw, 28px); font-weight: 800; color: #1d2b24; }
.kg-board .kq i { margin-inline-start: 8px; padding: 0 12px; border-radius: 999px; background: #2f80ed; color: #fff; font: 700 .7em / 1.8 Fredoka, Arial, sans-serif; vertical-align: middle; }
.kl { display: grid; place-items: center; width: clamp(88px, 8vw, 124px); aspect-ratio: 1; border-radius: 24px; background: #fde8dc; border: 2px dashed #f2b89b; color: #c4532b;
  font: 800 clamp(52px, 5vw, 78px) / 1 Cairo, Arial, sans-serif; rotate: -4deg; box-shadow: 0 10px 20px #c4532b22; }
.kg-en .kl { color: #2f6fd1; background: #e3eeff; border-color: #a9c6f5; font-family: Fredoka, Cairo, sans-serif; }
.kc { display: flex; justify-content: center; gap: 16px; width: 100%; }
.ka { margin: 0; flex: 0 1 34%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 10px; border-radius: 20px; background: #fff;
  border: 2px solid #1d2b24; color: #1d2b24; font: 800 clamp(18px, 1.6vw, 24px) / 1.3 Cairo, Arial, sans-serif; transition: background .35s, border-color .35s, box-shadow .35s, transform .35s; }
.ka img { width: clamp(60px, 5.6vw, 92px); height: auto; }
.ka.ok, .kt.ok { background: #e3f7ec; border-color: #2fa36b; box-shadow: 0 0 0 4px #2fa36b33; }
.ka.ok { transform: scale(1.04); }
.kg-en .ka figcaption { font-family: Fredoka, Cairo, sans-serif; }
.kr { margin: 0; max-width: 92%; text-align: center; font-size: clamp(20px, 1.9vw, 28px); font-weight: 800; line-height: 1.7; color: #1d2b24; }
.kr span { display: inline-block; opacity: .12; transition: opacity .25s; }
.kr span.on { opacity: 1; }
.ks { margin: 0; display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-radius: 20px; background: #edf7f1; color: #1d2b24; font-size: clamp(22px, 2.1vw, 32px); font-weight: 800; }
.ks img { width: clamp(48px, 4.4vw, 68px); height: auto; }
.kqq { margin: 0; color: #33473d; font-size: clamp(18px, 1.6vw, 24px); font-weight: 700; }
.kc3 .ka { flex-basis: 28%; padding: 12px 8px; }
/* match: three letters, three pictures, and a line drawn for each pair */
.km { position: relative; display: grid; grid-template-columns: 1fr 1.3fr 1fr; width: 82%; height: 60%; }
.km-col { display: flex; flex-direction: column; justify-content: space-between; }
.km .kt, .km .ka { flex: none; height: 30%; display: grid; place-items: center; padding: 0; }
.kt { border-radius: 18px; background: #fff; border: 2px solid #1d2b24; color: #1d2b24; font: 800 clamp(30px, 3vw, 46px) / 1 Cairo, Arial, sans-serif; transition: background .35s, border-color .35s, box-shadow .35s; }
.km .ka img { width: auto; height: 70%; }
.km-lines { width: 100%; height: 100%; overflow: visible; }
.km-lines path { fill: none; stroke: #2fa36b; stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }

/* my first words: two rows moving in opposite directions */
.kgwords { position: relative; padding: 14vh 0 8vh; overflow: hidden; }
.kgwords-head { max-width: 820px; text-align: center; }
.kgwords-head h3 { margin: 8px 0 12px; font-size: clamp(30px, 3.6vw, 54px); font-weight: 900; line-height: 1.3; }
.kgwords-head p { margin: 0; color: var(--soft); font-size: clamp(16px, 1.3vw, 18.5px); line-height: 2; }
.mq { display: grid; gap: 18px; margin: 42px 0 36px; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mq-row { overflow: hidden; }
.mq-track { display: flex; gap: 16px; width: max-content; animation: mq 60s linear infinite; }
.mq-row[dir="rtl"] .mq-track { animation-name: mqr; }
@keyframes mq { to { transform: translateX(-50%); } }
@keyframes mqr { to { transform: translateX(50%); } }
.mq-track span { display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 14px; border-radius: 20px; background: #ffffff0d; border: 1px solid #ffffff1c; white-space: nowrap; }
.mq-row[dir="rtl"] .mq-track span { padding: 10px 14px 10px 22px; }
.mq-track img { width: 54px; height: 54px; }
.mq-track b { font-size: 21px; font-weight: 800; }
.mq-row[dir="ltr"] b { font-family: Fredoka, Cairo, sans-serif; font-weight: 600; }
.kgwords-shot { display: flex; justify-content: center; }

/* try it: the six colour themes */
.maptry.kgthemes, .maptry.wbthemes { background: radial-gradient(50% 60% at 30% 50%, rgb(var(--rgb) / .12), transparent 70%); }
html[dir="ltr"] .maptry.kgthemes, html[dir="ltr"] .maptry.wbthemes { background: radial-gradient(50% 60% at 70% 50%, rgb(var(--rgb) / .12), transparent 70%); }
.kgthemes .looks, .wbthemes .looks { grid-template-columns: repeat(6, 1fr); }
.wbthemes .mapframe { aspect-ratio: 1280 / 720; background: #fff; }
.kgthemes .mapframe { aspect-ratio: 1010 / 664; background: #e8f5ee; }

/* try it: match, in the program's own look */
.kgmatch { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 480px; padding: 16px; border-radius: 22px; color: #1d2b24;
  background: radial-gradient(90% 80% at 50% 20%, #f6fcf9, #d9f2e5); }
.kgm-bar { display: flex; align-items: center; justify-content: space-between; }
.kgm-title { font-size: 18px; font-weight: 800; }
.kgm-msg { min-height: 1.8em; margin: 0; text-align: center; font-weight: 700; color: #33473d; }
.kgm-msg.ok { color: #1f8a57; } .kgm-msg.no { color: #c2410c; }
.kgm-board { position: relative; flex: 1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 24%; direction: rtl; }
.kgm-col { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.kgm-col button { flex: 1; min-height: 70px; display: grid; place-items: center; padding: 0; border-radius: 18px; background: #fff; border: 2px solid #1d2b24; color: #1d2b24;
  font: 800 34px / 1 Cairo, Arial, sans-serif; cursor: pointer; transition: background .25s, border-color .25s, box-shadow .25s, transform .2s; }
.kgm-col button img { width: auto; height: 54px; }
.kgm-col button:hover { transform: translateY(-2px); }
.kgm-col button[aria-pressed="true"] { border-color: #2f80ed; box-shadow: 0 0 0 4px #2f80ed33; }
.kgm-col button.ok { background: #e3f7ec; border-color: #2fa36b; cursor: default; transform: none; }
.kgm-col button.no { animation: shake .45s; }
.kgm-board.en .kgm-letters button { font-family: Fredoka, Cairo, sans-serif; font-weight: 700; }
.kgm-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.kgm-lines line { stroke: #2fa36b; stroke-width: 4; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .45s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.kgm-end { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; border-radius: 22px;
  text-align: center; background: radial-gradient(circle at 50% 50%, #f6fcf9f5, #d9f2e5eb); }
.kgm-end[hidden] { display: none; }
.kgm-score { font-size: clamp(24px, 2.4vw, 34px); font-weight: 900; }
.kgm-end p { margin: 0; max-width: 36ch; color: #33473d; line-height: 1.8; }

/* ===== ATCODEX WHITEBOARD ===== */
/* three of the board's looks, fanned like cards, with the program's own tool icons around them */
.intro-lolly.wb-fig { height: min(64vh, 540px); place-items: center; }
.wb-card { position: absolute; left: 50%; top: 50%; width: 82%; height: auto; border-radius: 14px; box-shadow: 0 30px 70px #000b, 0 0 0 1px #ffffff2a; }
.wb-card.c1 { transform: translate(-58%, -78%) rotate(-7deg); filter: brightness(.8); }
.wb-card.c2 { transform: translate(-40%, -46%) rotate(5deg); filter: brightness(.9); }
.wb-card.c3 { transform: translate(-52%, -10%) rotate(-2deg); }
.wb-chips i { position: absolute; z-index: 3; display: grid; place-items: center; width: clamp(44px, 4vw, 58px); aspect-ratio: 1; border-radius: 16px; background: var(--k); color: #fff;
  box-shadow: 0 14px 28px #0009, inset 0 -3px 0 #0003; animation: bob 4s ease-in-out infinite alternate; }
.wb-chips svg { width: 56%; height: 56%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wb-chips i:nth-child(1) { top: 4%; inset-inline-start: 6%; animation-delay: -.6s; }
.wb-chips i:nth-child(2) { top: 18%; inset-inline-end: 0; animation-delay: -1.4s; }
.wb-chips i:nth-child(3) { top: 46%; inset-inline-start: -2%; animation-delay: -2.2s; }
.wb-chips i:nth-child(4) { bottom: 18%; inset-inline-end: -2%; animation-delay: -3s; }
.wb-chips i:nth-child(5) { bottom: 4%; inset-inline-start: 16%; animation-delay: -1s; }
.wb-chips i:nth-child(6) { top: 0; inset-inline-end: 34%; animation-delay: -2.6s; }

/* the interactive screen: the board fills the view, then pulls back to the whole screen standing in a classroom */
.sc-ifp { --len: 430svh; }
.sc-ifp .stage { background: #030b1b; }
.room { position: absolute; inset: 0; opacity: var(--room, 0); }
.room-wall { position: absolute; inset: 0 0 24% 0; background: linear-gradient(#0f1d36, #172a4a 70%, #1c3256); }
.room-wall::before { content: ''; position: absolute; inset: 0; opacity: .5; background: repeating-linear-gradient(90deg, #ffffff06 0 2px, transparent 2px 180px); }
.room-floor { position: absolute; inset: 76% 0 0 0; background: linear-gradient(#2a2016, #17120c); box-shadow: 0 -2px 0 #3a2d1f; }
.room-floor::before { content: ''; position: absolute; inset: 0; opacity: .35; background: repeating-linear-gradient(90deg, #00000040 0 2px, transparent 2px 120px); transform: perspective(500px) rotateX(55deg); transform-origin: top; }
.room-light { position: absolute; left: 50%; top: 40%; width: 90vw; height: 70vh; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgb(var(--rgb) / .22), transparent); }
.ifp { --w: min(74vw, 1040px); position: absolute; left: 50%; top: 50%; width: var(--w); margin: calc(var(--w) * -0.2813 - 14px) 0 0 calc(var(--w) / -2);
  transform-origin: 50% calc(var(--w) * 0.2813 + 14px); will-change: transform; }
.ifp-screen { position: relative; aspect-ratio: 16 / 9; border: 14px solid #0b0d12; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 40px 90px #000c, 0 0 0 1px #ffffff1c, inset 0 0 0 1px #ffffff12; }
.ifp-screen video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.ifp-bar { display: block; width: 100%; height: 22px; margin-top: -8px; border-radius: 0 0 12px 12px; background: linear-gradient(#1a1d24, #0b0d12); }
.ifp-stand { display: block; width: 7%; height: calc(var(--w) * .2); margin: 0 auto; background: linear-gradient(90deg, #20242c, #3a404b 50%, #20242c); }
.ifp-feet { display: block; width: 46%; height: 16px; margin: 0 auto; border-radius: 10px; background: linear-gradient(#2c313a, #14171c); box-shadow: 0 18px 30px #000a; }
.ifp, .ifp-bar, .ifp-stand, .ifp-feet { opacity: 1; }
.ifp .tap { position: absolute; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; border: 3px solid #1f4fd1aa; background: #1f4fd122; opacity: 0; animation: tap 3.6s ease-out infinite; }
.ifp .t1 { left: 47%; top: 38%; } .ifp .t2 { left: 58%; top: 60%; animation-delay: 1.2s; } .ifp .t3 { left: 52%; top: 76%; animation-delay: 2.4s; }
@keyframes tap { 0% { transform: scale(.4); opacity: 0; } 8% { opacity: 1; } 30% { transform: scale(1.4); opacity: 0; } 100% { opacity: 0; } }
.ifp-copy { position: absolute; top: 50%; inset-inline-start: max(6vw, 64px); width: min(34vw, 460px); transform: translateY(-50%); opacity: 0; will-change: opacity, transform; }
.ifp-copy h3 { margin: 8px 0 18px; font-size: clamp(30px, 3.4vw, 52px); line-height: 1.25; font-weight: 900; }
.ifp-facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: f; }
.ifp-facts li { position: relative; padding: 12px 16px; padding-inline-start: 52px; border-radius: 16px; border: 1px solid #ffffff14; background: #030b1bcc; color: var(--soft);
  font-size: 16.5px; line-height: 1.8; opacity: .5; counter-increment: f; transition: opacity .4s, background .4s, border-color .4s, color .4s; }
.ifp-facts li::before { content: counter(f); position: absolute; inset-inline-start: 14px; top: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #ffffff14; color: #fff; font-weight: 800; }
.ifp-facts li.on { opacity: 1; color: #fff; border-color: rgb(var(--rgb) / .55); background: #0b1a33e6; }
.ifp-facts li.on::before { background: var(--c); color: #0b1a33; }

/* the six features: a quiet room with a faint board grid */
[data-mood="board"] .mood { background: radial-gradient(55% 60% at 30% 62%, #1d2c48 0%, #111c33 48%, #060b18 100%); }
html[dir="ltr"] [data-mood="board"] .mood { background: radial-gradient(55% 60% at 70% 62%, #1d2c48 0%, #111c33 48%, #060b18 100%); }
[data-mood="board"] .mood::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(#ffffff09 1px, transparent 1px), linear-gradient(90deg, #ffffff09 1px, transparent 1px);
  background-size: 46px 46px; -webkit-mask: radial-gradient(70% 70% at 50% 50%, #000, transparent); mask: radial-gradient(70% 70% at 50% 50%, #000, transparent); }
.isl-media .m.m-saved { display: grid; place-items: center; background: linear-gradient(160deg, #dfe6f0, #c9d3e1); }
.isl-media .m.m-saved > img { width: auto; height: 92%; object-fit: contain; box-shadow: 0 18px 40px #0005; }
.pdf-tag { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 1; padding: 3px 12px; border-radius: 8px; background: #e5383b; color: #fff; font: 800 14px / 1.6 Arial, sans-serif; }

/* try it: a small board in the page */
.wbtry { position: relative; padding: 14vh 0 10vh; background: radial-gradient(50% 55% at 50% 45%, rgb(var(--rgb) / .1), transparent 70%); }
.wbtry-head { max-width: 860px; margin: 0 auto 28px; text-align: center; }
.wbtry-head h3 { margin: 8px 0 12px; font-size: clamp(30px, 3.6vw, 54px); line-height: 1.3; font-weight: 900; }
.wbtry-head p { margin: 0; color: var(--soft); font-size: clamp(16px, 1.3vw, 18.5px); line-height: 2; }
.wbtry .device { max-width: 1100px; margin: 0 auto; }
.miniwb { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: #f4f6fa; color: #1b2a41; }
.mw-bar, .mw-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #fff; }
.mw-bar { border-bottom: 1px solid #e3e8f0; } .mw-foot { border-top: 1px solid #e3e8f0; }
.mw-group, .mw-colors, .mw-looks, .mw-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mw-group button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid #e3e8f0; background: #fff; color: #33415c;
  font: 700 14px Cairo, Arial, sans-serif; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.mw-group svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mw-group button[aria-pressed="true"] { background: #e8efff; border-color: #1f4fd1; color: #1f4fd1; }
.mw-colors button { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: var(--k); box-shadow: 0 0 0 1px #0003; cursor: pointer; }
.mw-colors button[aria-pressed="true"] { box-shadow: 0 0 0 3px #1f4fd1; }
.mw-board { position: relative; aspect-ratio: 16 / 9; touch-action: none; }
.mw-board canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mw-ink { cursor: crosshair; touch-action: none; }
.mw-laser { pointer-events: none; }
.mw-looks button { width: 36px; height: 26px; padding: 0; border-radius: 8px; border: 1px solid #0002; cursor: pointer; }
.mw-looks button[aria-pressed="true"] { box-shadow: 0 0 0 3px #1f4fd1; }
.miniwb .btn-line { height: 40px; padding: 0 16px; color: #1b2a41; border-color: #1b2a4133; background: #fff; }
.miniwb .btn-gold { height: 40px; padding: 0 18px; font-size: 15px; }
.miniwb .btn-gold.done::after { content: "✓"; }
.miniwb [data-sheet][aria-pressed="true"] { border-color: #1f4fd1; color: #1f4fd1; background: #e8efff; }
/* the six looks, the same as the program's colours and patterns */
[data-look="white"].mw-board, .mw-looks [data-look="white"] { background: #fff linear-gradient(#0000 calc(100% - 1px), #00000017 0) 0 0 / 22px 22px, #fff linear-gradient(90deg, #0000 calc(100% - 1px), #00000017 0) 0 0 / 22px 22px; }
[data-look="cream"].mw-board, .mw-looks [data-look="cream"] { background: #fdf8ec linear-gradient(#0000 calc(100% - 1px), #3c78d24d 0) 0 0 / 100% 22px; }
[data-look="sky"].mw-board, .mw-looks [data-look="sky"] { background: #eaf2fc radial-gradient(#0000002e 1.4px, transparent 2px) 0 0 / 18px 18px; }
[data-look="chalk"].mw-board, .mw-looks [data-look="chalk"] { background: #1f3d2f; }
[data-look="slate"].mw-board, .mw-looks [data-look="slate"] { background: #263238 linear-gradient(#0000 calc(100% - 1px), #ffffff1f 0) 0 0 / 22px 22px, #263238 linear-gradient(90deg, #0000 calc(100% - 1px), #ffffff1f 0) 0 0 / 22px 22px; }
[data-look="black"].mw-board, .mw-looks [data-look="black"] { background: #0f0f10 radial-gradient(#ffffff3a 1.4px, transparent 2px) 0 0 / 18px 18px; }

/* lightbox */
.lightbox { width: min(1240px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 22px; background: #000; color: #fff; overflow: hidden; }
.lightbox::backdrop { background: #020814e6; backdrop-filter: blur(8px); }
.lb-media video, .lb-media img { display: block; width: 100%; max-height: 92vh; object-fit: contain; }
.lb-close { position: absolute; top: 12px; inset-inline-end: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff59; background: #000a; cursor: pointer; }
.lb-close::before, .lb-close::after { content: ''; position: absolute; left: 13px; top: 20px; width: 18px; height: 2px; background: #fff; transform: rotate(45deg); }
.lb-close::after { transform: rotate(-45deg); }


/* ===== THE NEXT GENERATION: VR, AR AND HOLOGRAMS (in development) ===== */
.future em, .future .sec-title em { background: linear-gradient(100deg, var(--c3), var(--c) 45%, var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* the page's opening title and the in-development title stay one solid colour, highlighted word included */
#xp-title em, #road-title em { background: none; color: inherit; }
.soon-pill { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 6px 16px 6px 14px; border-radius: 999px; border: 1px solid rgb(var(--rgb) / .45);
  background: rgb(var(--rgb) / .1); color: var(--c3); font: 800 13px Cairo, Arial, sans-serif; backdrop-filter: blur(6px); }
.soon-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(var(--rgb) / .6); } 100% { box-shadow: 0 0 0 12px rgb(var(--rgb) / 0); } }
.sec-title { margin: 0 0 6vh; text-align: center; font-size: clamp(30px, 4vw, 60px); font-weight: 900; line-height: 1.3; }

/* the VR headset of light (WebGL points over a mirror floor with ripples), on a dark product stage: a thin headline, a short
   note, and four numbered glass cards that come in one by one; then the camera flies through a lens into the virtual world */
.sc-vr { --len: 560svh; }
.sc-vr .stage { background: #02060f; }
.vr-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.vr-top { position: absolute; z-index: 2; top: 14vh; inset-inline: max(6vw, 64px); display: flex; align-items: flex-start; justify-content: space-between; gap: 6vw; pointer-events: none; }
.vr-title { margin: 0; color: #f4f8ff; font-size: clamp(52px, 7vw, 116px); font-weight: 250; line-height: 1.12; text-shadow: 0 10px 50px #000c; will-change: transform, opacity; }
html[lang="en"] .vr-title { font-weight: 300; letter-spacing: -2px; line-height: 1.02; }
.vr-aside { max-width: 300px; padding-top: 1.4em; will-change: transform, opacity; }
.vr-aside p { margin: 0; color: #c9d6ea; font-size: 15px; line-height: 1.9; }
.vr-cards { position: absolute; z-index: 2; bottom: 6vh; inset-inline: max(6vw, 64px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.glass { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(170px, 24vh, 220px); padding: 22px 22px 20px; border-radius: 20px; opacity: 0;
  background: linear-gradient(160deg, #ffffff14, #ffffff05 60%); border: 1px solid #ffffff21; box-shadow: inset 0 1px 0 #ffffff1c, 0 30px 60px #0009;
  -webkit-backdrop-filter: blur(14px) saturate(1.25); backdrop-filter: blur(14px) saturate(1.25); will-change: transform, opacity; }
.glass .no { position: absolute; top: 18px; inset-inline-end: 20px; color: #c9d6ea; font: 600 13px Arial, sans-serif; letter-spacing: 1px; }
.glass .tg { position: absolute; top: 19px; inset-inline-start: 22px; color: var(--c); font: 800 10px Arial, sans-serif; letter-spacing: 2.5px; unicode-bidi: isolate; }
.glass b { display: block; margin-bottom: 8px; color: #fff; font-size: clamp(17px, 1.35vw, 21px); font-weight: 800; }
.glass p { margin: 0; color: #b5c4da; font-size: 13.5px; line-height: 1.85; }
/* the words inside the virtual world sit low, over the glass floor, so the planet and the atom keep the sky */
.vr-inside { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 8vw 11vh; text-align: center;
  opacity: 0; pointer-events: none; will-change: transform, opacity; }
.vr-inside::before { content: ''; position: absolute; z-index: -1; inset: auto 0 0; height: 58%; background: linear-gradient(to top, #02060fe8 18%, #02060f99 55%, #02060f00); }
.vr-line { margin: 0; font-size: clamp(32px, 4.4vw, 72px); font-weight: 300; line-height: 1.35; letter-spacing: -.5px; text-shadow: 0 8px 40px #000c; }
.vr-line em { font-style: normal; font-weight: 700; }
.vr-sub { max-width: 820px; margin: 18px 0 0; color: #dfeefc; font-size: clamp(16px, 1.5vw, 21px); line-height: 1.95; text-shadow: 0 6px 30px #000d; }

/* the hologram table: five lessons made of light (a canvas of points) */
.sc-holo { --len: 640svh; }
.sc-holo .stage { display: grid; align-items: center; background: radial-gradient(60% 70% at 30% 62%, rgb(var(--rgb) / .1), transparent 70%), #030b1b; }
html[dir="ltr"] .sc-holo .stage { background: radial-gradient(60% 70% at 70% 62%, rgb(var(--rgb) / .1), transparent 70%), #030b1b; }
.holo-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.holo-copy { position: relative; z-index: 2; width: min(44vw, 600px); margin-inline-start: max(6vw, 64px); }
.holo-head { margin: 8px 0 22px; font-size: clamp(36px, 4.6vw, 72px); font-weight: 900; line-height: 1.2; }
.holo-steps { position: relative; height: clamp(250px, 34vh, 330px); }
.hs { position: absolute; inset: 0; opacity: 0; will-change: transform, opacity; }
.hs-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid rgb(var(--rgb) / .4); color: var(--c); font: 800 11px Arial, sans-serif; letter-spacing: 2.5px; direction: ltr; }
.hs b { display: block; margin: 14px 0 10px; font-size: clamp(26px, 2.6vw, 40px); font-weight: 900; line-height: 1.3; }
.hs p { max-width: 46ch; margin: 0; color: var(--soft); font-size: clamp(16px, 1.4vw, 19px); line-height: 2; }
.holo-dots { display: flex; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.holo-dots li { position: relative; width: 34px; height: 4px; border-radius: 4px; background: #ffffff22; overflow: hidden; }
.holo-dots li::after { content: ''; position: absolute; inset: 0; background: var(--c); transform: scaleX(var(--f, 0)); transform-origin: right; }
html[dir="ltr"] .holo-dots li::after { transform-origin: left; }

/* why it is the future */
.why { padding: 14vh 0 8vh; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 34px; }
.why-i { position: relative; padding-top: 24px; border-top: 1px solid #ffffff1c; }
.why-i::before { content: ''; position: absolute; top: -1px; inset-inline-start: 0; width: 64px; height: 2px; background: linear-gradient(90deg, var(--c), var(--c2)); }
.why-i svg { width: 46px; height: 46px; fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgb(var(--rgb) / .55)); }
.why-i b { display: block; margin: 12px 0 6px; font-size: clamp(20px, 1.7vw, 25px); font-weight: 900; }
.why-i p { margin: 0; color: var(--soft); font-size: 16px; line-height: 1.95; }

/* in development: the team and the road to schools */
.road { padding: 10vh 0 12vh; background: radial-gradient(50% 50% at 50% 20%, rgb(var(--rgb) / .07), transparent 70%); }
.road-head { max-width: 900px; margin: 0 auto 8vh; text-align: center; }
.road-head .sec-title { margin: 6px 0 18px; }
.road-head p { margin: 0; color: #dcecff; font-size: clamp(17px, 1.6vw, 21px); line-height: 2; text-wrap: pretty; }
.road-steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 0 0 8vh; padding: 0; list-style: none; }
.road-steps::before { content: ''; position: absolute; top: 9px; inset-inline: 10px; height: 2px; background: linear-gradient(270deg, var(--c2), var(--c) 40%, #ffffff1f 75%); opacity: .8; }
html[dir="ltr"] .road-steps::before { background: linear-gradient(90deg, var(--c2), var(--c) 40%, #ffffff1f 75%); }
.road-steps li { position: relative; padding-top: 38px; }
.road-steps i { position: absolute; top: 0; inset-inline-start: 0; width: 20px; height: 20px; border-radius: 50%; background: #0b1a36; border: 2px solid rgb(var(--rgb) / .6); }
.road-steps li.now i { background: var(--c); animation: ping 1.8s ease-out infinite; }
.road-steps small { display: block; color: var(--c); font-size: 13px; font-weight: 800; }
.road-steps b { display: block; margin: 4px 0 6px; font-size: clamp(20px, 1.8vw, 26px); font-weight: 900; }
.road-steps p { margin: 0; color: var(--soft); font-size: 16px; line-height: 1.9; }
.road-cta { border-color: rgb(var(--rgb) / .35); background: linear-gradient(120deg, rgb(197 139 255 / .16), rgb(var(--rgb) / .08) 60%, #ffffff05); }
.road-cta p { margin: 8px 0 0; color: var(--soft); font-size: 16px; }

/* tablets and phones: one column, smaller type, the same story */
@media (max-width: 900px) {
  .rail { display: none; }
  .sc-verbs .stage { grid-template-columns: 1fr; grid-template-rows: 46svh auto; align-content: center; gap: 22px; padding: 76px 22px 24px; }
  .verbs-media { order: -1; height: 100%; }
  .verbs-words { height: 210px; }
  .verb b { font-size: clamp(56px, 17vw, 92px); }
  .worlds-head { top: 11vh; }
  .w { width: clamp(64px, 17vw, 92px); }
  .w b { font-size: 12px; } .w small { display: none; }
  .core::before { left: -95px; top: -95px; width: 190px; height: 190px; }
  .core > i { left: -170px; top: -170px; width: 340px; height: 340px; }
  .ch-title { inset-inline-start: 22px; bottom: 7vh; max-width: calc(100vw - 44px); }
  .intro-grid { position: static; grid-template-columns: 1fr; gap: 0; padding-top: 70px; align-self: start; }
  .intro-lolly { position: absolute; inset: auto -4% 0 auto; width: 70%; height: 40svh; }
  .intro-lolly .lolly { position: absolute; bottom: 0; right: 0; height: 100%; width: auto; }
  html[dir="ltr"] .intro-lolly .lolly { right: auto; left: 0; }
  .sc-intro .ch-feats { display: none; }
  html[dir="ltr"] .intro-lolly { inset: auto auto 0 -6%; }
  .bubble { display: none; }
  .intro-copy { position: relative; z-index: 1; }
  .ch-lead { font-size: 16.5px; line-height: 1.95; margin-bottom: 12px; }
  .ch-feats { gap: 4px; } .ch-feats li { font-size: 14.5px; }
  .sc-skills .stage { gap: 3vh; }
  .skills-head p { font-size: 15px; }
  .skill { width: 78vw; }
  .track { gap: 16px; padding-inline: 22px; }
  .track-bar { margin-inline-start: 22px; }
  .sc-gallery .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; gap: 18px; padding: 84px 22px 0; }
  .gal-copy p { display: none; }
  .gal-cols { gap: 12px; } .gal-col { gap: 12px; }
  .tile { border-radius: 18px; aspect-ratio: 3 / 4; } .tile figcaption { padding: 34px 12px 10px; font-size: 12.5px; } .tile figcaption b { font-size: 15px; }
  .quote { inset-inline-start: 22px; bottom: 8vh; }
  .device { padding: 8px; border-radius: 24px; }
  .mdlesson { padding: 12vh 0 8vh; }
  .mdlesson-grid { grid-template-columns: 1fr; }
  .teams-in { gap: 26px; }
  .teams-copy { grid-template-columns: 1fr; }
  .teams-copy .teams-feats { grid-column: 1; grid-row: auto; margin-top: 18px; }
  .teams-feats li { font-size: 14.5px; padding: 10px 12px; gap: 12px; }
  .teams-feats b { min-width: 62px; height: 38px; font-size: 15px; }
  .teams-screen { border-radius: 14px; box-shadow: 0 30px 60px #000b, 0 0 0 6px #16294d, 0 0 0 7px #ffffff21, 0 0 50px rgb(var(--rgb) / .2); }
  .md-stage { padding-bottom: 34%; }
  .md-lolly { width: 34%; bottom: -2%; inset-inline-end: 0; }
  .md-lolly .bubble { display: block; bottom: 14%; inset-inline-end: 96%; max-width: 58vw; padding: 10px 14px 12px; }
  .md-lolly .bubble q { font-size: 14px; }
  .intro-scene img { top: auto; bottom: 0; width: 100%; height: 52svh; object-position: 56% 50%; }
  .intro-scene::after, html[dir="ltr"] .intro-scene::after { background: linear-gradient(180deg, #030b1b 0%, #030b1b 42%, #030b1b99 58%, #030b1b00 76%), linear-gradient(0deg, #030b1b 0%, #030b1b00 14%); }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .ch-end-in { padding: 26px 22px; }
}

@media (max-width: 900px) {
  .guide-row { gap: 6px 22px; } .guide img { width: 84px; } .guide b { font-size: 15px; } .guide small { display: none; }
  .sc-guides .intro-lolly.guides { position: absolute; inset: auto 0 2svh 0; width: auto; height: auto; }
  .stations { grid-template-columns: repeat(7, 1fr); gap: 2px; padding-bottom: 150px; }
  .stations::before, .stations::after { top: 21px; }
  .st { position: static; gap: 6px; } .st img { width: 46px; height: 46px; padding: 7px; } .st b { font-size: 11.5px; }
  .st p { position: absolute; inset: auto 0 0; max-width: none; font-size: 15px; text-align: center; }
  .sc-island .stage { padding: 74px 18px 3vh; gap: 1.2vh; }
  .isl-head h3 { font-size: clamp(26px, 7.4vw, 36px); margin: 6px 0 2px; } .isl-guide { font-size: 13.5px; } .isl-guide img { width: 30px; }
  .isl-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 12px; align-items: start; }
  .isl-visual { aspect-ratio: 16 / 9.5; max-height: 30svh; }
  .lessons { gap: 6px; } .lsn { padding: 9px 12px; padding-inline-start: 48px; border-radius: 14px; } .lsn::before { inset-inline-start: 10px; top: 8px; width: 28px; height: 28px; }
  .lsn b { font-size: 15.5px; } .lsn small { display: none; } .idea { font-size: 14px; line-height: 1.8; margin: 4px 0; } .goal { font-size: 13px; }
  .maptry-grid, .quran-grid { grid-template-columns: 1fr; }
  .mapframe { order: -1; }
  .looks { gap: 5px; } .looks button { font-size: 10.5px; padding: 4px 4px 6px; }
  .sc-wudu .stage { padding: 74px 18px 3vh; }
  .wudu-body { grid-template-columns: 1fr; grid-template-rows: 26svh auto auto; gap: 12px; }
  .wudu-kid { grid-row: auto; height: 26svh; }
  .wudu-kid img { position: absolute; bottom: 0; left: 50%; height: 100%; transform: translateX(-50%); }
  .wudu-cards { height: 240px; } .wd { padding: 16px; column-gap: 14px; } .wd img { width: 58px; }
  .wd-path li { width: 30px; height: 30px; }
  .wd-dua { font-size: 14.5px; }
  .ms-page { padding: 14px 12px 16px; } .mushaf { padding: 10px; border-radius: 22px; }
  .intro-lolly.bobo { height: 30svh; }
  .tiles i { width: 44px; font-size: 25px; border-radius: 13px; }
  .tiles i:nth-child(3), .tiles i:nth-child(4) { display: none; }
  .sc-letter .stage, .sc-harakat .stage, .sc-phonics .stage, .sc-kgplay .stage { padding: 72px 0 2.5vh; gap: 1.4vh; }
  .letter-head h3 { font-size: clamp(24px, 6.6vw, 34px); margin-top: 4px; }
  .letter-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 12px; align-content: start; }
  .lt-stage, .hk-stage, .en-board, .kg-board { height: 40svh; border-radius: 22px; }
  .lt-name .glyph { font-size: 21svh; } .lt-tag { font-size: 26px; padding: 0 20px 4px; }
  .lt-view { padding: 4%; }
  .lt-forms { gap: 6px; } .lt-forms figure { height: 80%; padding: 6px 2px; border-radius: 14px; } .lt-forms small { font-size: 9.5px; }
  .lt-forms .glyph { font-size: 38px; } .lt-forms figcaption, .lt-words figcaption { font-size: 17px; }
  .lt-words { gap: 8px; } .lt-words figure { padding: 4px; border-radius: 14px; }
  .lt-similar figure { width: 29%; border-radius: 16px; } .lt-similar .glyph { font-size: 58px; } .lt-similar figcaption { font-size: 11.5px; text-align: center; }
  .cards { height: auto; min-height: 0; align-self: stretch; }
  .scard { justify-content: flex-start; }
  .scard h4 { font-size: 23px; margin: 2px 0 6px; } .scard p { font-size: 15px; line-height: 1.85; margin-bottom: 8px; } .scard .goal { font-size: 13px; }
  .scard-n { font-size: 13px; }
  .hk-letter .glyph { font-size: 17svh; } .mk { width: 6.5svh; }
  .hw { inset: 0 6% 14%; border-radius: 16px; } .hw img { height: 62%; } .hw figcaption { font-size: 28px; } .hw.more span { font-size: 19px; }
  .tracetry, .lamtry, .spelltry, .matchtry { padding: 12vh 0 6vh; }
  .tracetry-grid, .lamtry-grid, .spelltry-grid, .matchtry-grid { grid-template-columns: 1fr; }
  .from-app { display: none; }
  .tracer, .lamgame { padding: 10px; gap: 10px; }
  .tr-letters { gap: 5px; } .tr-letters button { width: 44px; height: 44px; font-size: 25px; border-radius: 13px; }
  .tr-pad { aspect-ratio: 4 / 3; }
  .rule { grid-template-columns: auto 1fr; padding: 12px 14px; } .rule .ex { grid-column: 1 / -1; text-align: center; } .rule img { width: 42px; height: 42px; }
  .lg-tray { gap: 7px; } .lg-word { padding: 8px 4px 4px; } .lg-word img { width: 40px; height: 40px; } .lg-word span { font-size: 20px; }
  .basket { min-height: 88px; padding: 10px; column-gap: 8px; } .basket img { width: 38px; height: 38px; } .basket .in span { font-size: 15px; }
  .intro-lolly.sunny-fig { height: 30svh; place-items: end center; }
  .sunny { width: 26svh; } .floaters img { width: 40px; } .floaters img:nth-child(3), .floaters img:nth-child(4) { display: none; }
  .ph-view { padding: 4%; gap: 2.5%; }
  .ph-cards .lc { height: 72%; border-radius: 16px; gap: 2px; } .lc .pair { font-size: 30px; letter-spacing: 1px; } .lc .tl { font-size: 26px; padding: 0 10px 4px; border-radius: 11px; }
  .lc figcaption { font-size: 17px; }
  .ph-teams .lc { height: 42%; flex-basis: 44%; max-width: 44%; }
  .ph-tiles b { width: 50px; font-size: 34px; border-radius: 13px; box-shadow: 0 6px 0 #c9d8f0, 0 12px 20px #0006; }
  .ph-tiles b.hl { box-shadow: 0 6px 0 #2b8ad0, 0 12px 20px #0006; } .ph-tiles b.me, .ph-tiles b.vw.long { box-shadow: 0 6px 0 #d9a92e, 0 12px 20px #0006; }
  .en-board .spark { width: 26px; height: 26px; top: -14px; right: -14px; }
  .ph-eq { font-size: 19px; }
  .isl-guide svg { width: 30px; height: 30px; } .lsn .mas { width: 24px; height: 24px; }
  .speller { aspect-ratio: 3 / 4; }
  .sp-slots, .sp-tiles { gap: 5px; } .sp-slot { width: 40px; height: 46px; font-size: 26px; border-radius: 11px; } .sp-tile { width: 42px; height: 46px; font-size: 25px; border-radius: 11px; }
  .sp-msg { font-size: 15px; }
  .intro-lolly.wb-fig { height: 30svh; } .wb-chips i { width: 36px; border-radius: 11px; } .wb-chips i:nth-child(n+5) { display: none; }
  .ifp { --w: 92vw; } .ifp-stand { height: 16vw; }
  .ifp-copy { top: auto; bottom: 3svh; inset-inline: 18px; width: auto; transform: none; }
  .ifp-copy h3 { font-size: 24px; margin: 4px 0 10px; } .ifp-facts { gap: 6px; } .ifp-facts li { padding: 8px 12px; padding-inline-start: 46px; font-size: 14px; } .ifp-facts li::before { top: 8px; width: 24px; height: 24px; }
  .wbtry { padding: 12vh 0 6vh; }
  .mw-group button span { display: none; } .mw-group button { padding: 0 10px; }
  .mw-board { aspect-ratio: 4 / 3; }
  .intro-lolly.fofo-fig { height: 32svh; } .fofo-fig .lolly { height: 100%; }
  .kg-view { padding: 4%; gap: 2%; } .kl { width: 64px; font-size: 40px; border-radius: 16px; } .kq, .kr { font-size: 16px; } .kr { line-height: 1.6; }
  .ka { padding: 8px 6px; border-radius: 14px; font-size: 15px; } .ka img { width: 40px; } .ks { font-size: 18px; padding: 8px 14px; gap: 8px; } .ks img { width: 36px; } .kqq { font-size: 15px; }
  .km { width: 92%; height: auto; } .km-col { gap: 10px; justify-content: flex-start; } .km .kt, .km .ka { height: 56px; border-radius: 12px; } .kt { font-size: 24px; }
  .mq-track img { width: 40px; height: 40px; } .mq-track b { font-size: 17px; } .mq-track span { padding: 8px 16px 8px 10px; }
  .kgthemes .looks, .wbthemes .looks { grid-template-columns: repeat(3, 1fr); }
  .kgmatch { min-height: 420px; padding: 10px; } .kgm-col button { min-height: 60px; font-size: 28px; } .kgm-col button img { height: 42px; } .kgm-board { column-gap: 18%; }
  .vr-top { top: 10vh; inset-inline: 22px; flex-direction: column; gap: 12px; }
  .vr-title { font-size: clamp(44px, 13vw, 66px); }
  .vr-aside { max-width: none; padding: 0; } .vr-aside p { font-size: 14px; }
  .vr-cards { inset-inline: 22px; bottom: 4vh; display: block; }
  .glass { position: absolute; inset: auto 0 0; min-height: 0; padding-top: 46px; }
  .why-grid, .road-steps { grid-template-columns: 1fr; }
  .road-steps::before { top: 10px; bottom: 10px; inset-inline: 9px auto; width: 2px; height: auto; background: linear-gradient(var(--c), var(--c2) 40%, #ffffff1f); }
  .road-steps li { padding: 0; padding-inline-start: 40px; }
  .sc-holo .stage { align-items: end; }
  .holo-copy { width: auto; margin: 0 22px 5vh; }
  .holo-head { font-size: 34px; margin-bottom: 12px; }
  .holo-steps { height: 230px; }
}

/* no motion: every scene is laid out as a normal page, nothing is pinned or moved */
.rm .sc { height: auto; }
.rm .sc > .stage { position: relative; height: auto; min-height: 0; overflow: visible; padding-top: 12vh; padding-bottom: 12vh; }
.rm .sc-open > .stage { min-height: 100svh; }
.rm .verbs-words { height: auto; display: grid; gap: 22px; }
.rm .verb, .rm .ch-title, .rm .worlds-next { position: relative; opacity: 1; transform: none; }
.rm .verbs-media, .rm .orbit-fx, .rm .core { display: none; }
.rm .verbs-dots { display: none; }
.rm .worlds-head { position: relative; top: 0; }
.rm .orbit { position: relative; left: 0; top: 0; width: auto; height: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; margin: 40px 0; }
.rm .w { position: relative; }
.rm .portal { position: relative; clip-path: none; aspect-ratio: 16 / 9; }
.rm .portal video { transform: none; }
.rm .portal-icon { display: none; }
.rm .ch-title { inset: auto; margin: 26px max(6vw, 22px) 0; }
.rm .track { flex-wrap: wrap; width: auto; justify-content: center; }
.rm .gal-col { transform: none !important; }
.rm .quote-media { position: relative; aspect-ratio: 16 / 9; }
.rm .quote { position: relative; inset: auto; margin: 26px max(6vw, 22px) 0; }
.rm .sc-quote .shade { display: none; }
.rm .intro-lolly, .rm .bubble, .rm .intro-copy > * { opacity: 1; transform: none; }
.rm .isl-media, .rm .isl-media .m, .rm .lessons, .rm .isl-head, .rm .wd, .rm .wd-dua { opacity: 1; transform: none; }
.rm .isl-art { position: relative; left: auto; top: auto; display: block; width: 46%; margin: 0 auto 16px; transform: none !important; }
.rm .isl-visual { aspect-ratio: auto; max-height: none; }
.rm .isl-media { position: relative; aspect-ratio: 16 / 10; }
.rm .isl-media .m:not(:first-child) { display: none; }
.rm .lsn { opacity: 1; } .rm .lsn .more { max-height: none; opacity: 1; }
.rm .st { opacity: 1; } .rm .st p { opacity: 1; transform: none; }
.rm .wudu-cards { height: auto; display: grid; gap: 12px; } .rm .wd { position: relative; }
.rm .wd-path { display: none; }
.rm .lt-stage, .rm .hk-stage, .rm .en-board, .rm .kg-board { height: auto; }
.rm .lt-view, .rm .ph-view, .rm .kg-view { position: relative; inset: auto; min-height: 300px; opacity: 1; }
.rm .cards { height: auto; display: grid; gap: 26px; } .rm .scard { position: relative; opacity: 1; }
.rm .sc-dots, .rm .mk { display: none; }
.rm .ph-pic { height: 140px; } .rm .ph-cards .lc { height: 260px; } .rm .ph-teams .lc { height: 150px; }
.rm .letter-body { align-items: start; }
.rm .hk-stage { grid-template-rows: auto auto; } .rm .hk-letter .v:first-child { opacity: 1; }
.rm .hk-words { display: grid; gap: 10px; padding: 0 6% 6%; } .rm .hw { position: relative; inset: auto; padding: 12px; opacity: 1; } .rm .hw img { height: 80px; }
.rm .mq-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
.rm .mq { -webkit-mask: none; mask: none; }
.rm .kr span { opacity: 1; }
.rm .intro-scene { position: relative; height: 56vw; max-height: 70vh; }
.rm .intro-scene img { opacity: 1; width: 100%; transform: none; }
.rm .md-lolly { position: relative; inset: auto; width: 40%; margin: 24px auto 0; }
.rm .md-lolly .bubble { position: relative; inset: auto; margin: 0 auto 12px; }
.rm .km-lines path { stroke-dashoffset: 0; }
.rm .room { opacity: 1; } .rm .sc-ifp .stage { min-height: 100svh; } .rm .ifp { position: relative; left: auto; top: auto; margin: 0 auto; }
.rm .ifp-copy { position: relative; inset: auto; transform: none; opacity: 1; width: auto; margin: 26px max(6vw, 22px) 0; } .rm .ifp-facts li { opacity: 1; }
.rm .vr-gl, .rm .holo-fx { display: none; }
.rm .sc-vr .stage, .rm .sc-holo .stage { background: radial-gradient(60% 60% at 50% 40%, rgb(var(--rgb) / .14), transparent 70%), #030b1b; }
.rm .vr-top, .rm .vr-cards, .rm .vr-inside { position: relative; inset: auto; opacity: 1; transform: none; margin: 0 max(6vw, 22px) 5vh; }
.rm .vr-inside { padding-bottom: 0; }
.rm .vr-inside::before { display: none; }
.rm .glass { opacity: 1; } .rm .vr-cards { display: grid; }
.rm .holo-copy { width: auto; margin: 0 max(6vw, 22px); } .rm .holo-steps { height: auto; display: grid; gap: 30px; } .rm .hs { position: relative; opacity: 1; transform: none; } .rm .holo-dots { display: none; }
