:root{--blue:#2457d6;--ink:#17233d;--muted:#5b6880;--line:#e3e9f5;--green:#16845c;--red:#c0392b;--pink:#e0508a;--bg:#f5f7fb;font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 90% 0,#e8efff 0,transparent 35%),var(--bg);font-size:17px;line-height:1.7}
button{font:inherit;cursor:pointer}:focus-visible{outline:3px solid #ffb300;outline-offset:2px}
.skip{position:absolute;inset-inline-start:-999px}.skip:focus{inset-inline-start:8px;top:8px;background:#fff;padding:8px;z-index:9}
.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 max(16px,calc((100% - 960px)/2));background:#ffffffe6;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5;backdrop-filter:blur(10px)}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);font-size:20px;font-weight:800;text-decoration:none;line-height:1.1}.brand small{display:block;font-size:11px;color:var(--muted);font-weight:500}
.brand-mark{width:42px;height:42px;border-radius:13px;background:var(--blue);color:#fff;display:grid;place-items:center;font-size:24px}
.install-btn{border:0;border-radius:12px;background:#eaf0ff;color:var(--blue);font-weight:700;padding:9px 13px}
.shell{max-width:960px;margin:20px auto 60px;padding:0 16px}
footer{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;max-width:960px;margin:0 auto;padding:16px;color:var(--muted);font-size:13px}
.hero{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border-radius:24px;background:linear-gradient(115deg,#214fc7,#3c72ed 65%,#6391f6);color:#fff;padding:24px 28px;box-shadow:0 14px 34px #2457d62b}
.hero h1{margin:4px 0;font-size:28px}.hero p{margin:0;opacity:.92}.eyebrow{font-size:13px;opacity:.85}
.hero-stats{display:flex;gap:12px}.hero-stats div{background:#ffffff26;border-radius:16px;padding:10px 16px;text-align:center;min-width:100px}.hero-stats b{display:block;font-size:22px}.hero-stats small{font-size:12px}
.banner{display:flex;align-items:center;gap:14px;width:100%;margin-top:14px;padding:14px 18px;border-radius:18px;border:2px solid var(--line);background:#fff;text-align:start;color:var(--ink)}
.banner b{display:block;font-size:18px}.banner small{color:var(--muted);font-size:14px}.bicon{font-size:32px}.banner .go{margin-inline-start:auto;background:var(--blue);color:#fff;border-radius:12px;padding:6px 16px;font-weight:700}
.banner.review{border-color:#ffb300;background:#fff8e3}.banner.next{border-color:#b9ccff}.banner.done{border-color:#bfe8d6;background:#effaf4}
.seq{margin-top:26px}.seq-head{display:flex;justify-content:space-between;align-items:center;border-inline-start:6px solid var(--c);padding-inline-start:12px;margin-bottom:10px}.seq-head h2{margin:0;font-size:21px}.seq-head span{color:var(--muted);font-size:14px}.seq-count{background:#fff;border-radius:999px;padding:2px 12px;border:1px solid var(--line)}
.lesson-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:10px}
.lesson-card{display:flex;align-items:center;gap:12px;text-align:start;padding:12px 14px;min-height:64px;background:#fff;border:2px solid var(--line);border-radius:16px;color:var(--ink)}.lesson-card:hover{border-color:var(--c,#9db7ff)}
.lc-icon{font-size:26px;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:#f0f4ff;flex:none}.lc-body{flex:1;min-width:0}.lc-body b{display:block;font-size:16px;line-height:1.35}.lc-body small{color:var(--muted);font-size:12px}
.lc-stars,.rstars{color:#f5a300;letter-spacing:2px;white-space:nowrap}.off{color:#d4dae7}
.challenge{margin-top:10px;width:100%;padding:12px;border:2px dashed var(--c);border-radius:14px;background:#fff;color:var(--ink);font-weight:700}.challenge small{display:block;color:var(--muted);font-weight:400}.challenge:disabled{opacity:.55;cursor:not-allowed}
.foot-links{text-align:center;margin-top:28px}.link{background:none;border:0;color:var(--blue);font-weight:700;text-decoration:underline}
.back{background:none;border:0;color:var(--blue);font-weight:700;padding:8px 0;min-height:44px}
.learn,.qcard,.result,.parent{background:#fff;border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:0 10px 28px #1d2f5710}
.chip{display:inline-block;background:#eaf0ff;color:var(--blue);border-radius:999px;padding:2px 12px;font-size:13px;font-weight:700}.learn h1{font-size:24px;line-height:1.5;margin:10px 0}.goal{background:#fff8e3;border-radius:12px;padding:10px 14px;margin:8px 0}
.steps-dots{display:flex;gap:6px;margin:12px 0}.steps-dots i{height:6px;flex:1;border-radius:3px;background:#dfe6f6}.steps-dots i.on{background:var(--blue)}
.explain{font-size:19px;min-height:90px}.vis{display:flex;justify-content:center;align-items:center;padding:12px;margin:10px 0;background:#f7f9ff;border-radius:16px;overflow-x:auto}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.actions.col{flex-direction:column}
.primary,.ghost,.danger{border-radius:14px;padding:12px 22px;min-height:52px;font-weight:700;border:2px solid transparent}.primary{background:var(--blue);color:#fff}.primary:disabled{opacity:.45}.primary.alt{background:var(--green)}
.ghost{background:#fff;border-color:var(--line);color:var(--ink)}.ghost.round{border-radius:50%;width:48px;min-height:48px;padding:0;flex:none}.danger{background:#fff;border-color:#e7b3ad;color:var(--red)}
.qhead{display:flex;justify-content:space-between;align-items:center}.qcount{font-weight:700;color:var(--muted)}.pbar{height:10px;background:#dfe6f6;border-radius:6px;overflow:hidden;margin:4px 0 14px}.pbar i{display:block;height:100%;background:linear-gradient(90deg,#2f9e8f,#2457d6);transition:width .3s}
.qtitle{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.qtitle h1{font-size:22px;line-height:1.6;margin:0}
.options{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:14px}
.option{min-height:60px;border-radius:16px;border:2px solid #cfd9f1;background:#fff;font-size:20px;font-weight:700;color:var(--ink);padding:8px 12px}.option:hover:not(:disabled){border-color:var(--blue);background:#f2f6ff}
.option.correct{background:#e4f7ec;border-color:var(--green)}.option.wrong{background:#fdeceb;border-color:var(--red)}.option:disabled{cursor:default}
.inputrow{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}.inputrow input{flex:1;min-width:130px;height:60px;font-size:28px;text-align:center;border:2px solid #cfd9f1;border-radius:16px;font-family:inherit}
.inputrow input.correct{border-color:var(--green);background:#e4f7ec}.inputrow input.wrong{border-color:var(--red);background:#fdeceb}.shake{animation:sh .3s}@keyframes sh{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
.hintbox{background:#fff8e3;border-radius:12px;padding:10px 14px;margin-top:12px}.feedback{border-radius:16px;padding:14px 16px;margin-top:14px;font-size:18px}.feedback.good{background:#e4f7ec;border:1px solid #a6dcbf}.feedback.bad{background:#fff3e2;border:1px solid #f2cf99}
.orderbox{margin-top:14px}.slots,.pool{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:10px 0}.slot,.chipbtn{min-width:64px;min-height:56px;border-radius:14px;font-size:22px;font-weight:700}.slot{border:2px dashed #b9c6e6;background:#f7f9ff;color:#9aa7c4}.slot.filled{border:2px solid var(--blue);background:#eaf0ff;color:var(--ink)}.chipbtn{border:2px solid #cfd9f1;background:#fff}
.result{text-align:center}.result .big{font-size:64px}.rscore{font-size:34px;font-weight:800}.rstars{font-size:40px}.missed{text-align:start;background:#f7f9ff;border-radius:14px;padding:10px 14px;margin:10px 0}.missed .m{padding:8px 0;border-top:1px solid var(--line)}.next-review{color:var(--muted)}
.parent h1{margin-top:0}.tablewrap{overflow-x:auto}.ptable{width:100%;border-collapse:collapse;font-size:14px}.ptable th,.ptable td{border-bottom:1px solid var(--line);padding:6px 8px;text-align:start}.note{font-size:14px;color:var(--muted)}
/* illustrations */
.objs{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;font-size:28px;max-width:420px}.objs span{display:inline-block;transform:rotate(var(--r))}
.bundles{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start;justify-content:center}.bundle{display:grid;grid-template-columns:repeat(5,1fr);border:3px solid #2457d6;border-radius:10px;padding:3px 5px;background:#eaf0ff;font-size:20px}.bundle i{font-style:normal;line-height:1.2}.looseWrap{display:flex;flex-wrap:wrap;gap:3px;max-width:200px;font-size:22px;align-self:center}
.blocks{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;justify-content:center}.hundred{width:54px;height:54px;background:repeating-linear-gradient(#7aa2ff 0 4px,#cfe0ff 4px 5px),#7aa2ff;border:2px solid #2457d6;border-radius:4px}.rod{width:14px;height:84px;background:repeating-linear-gradient(#ffb74d 0 7px,#ef8f00 7px 8px);border:2px solid #b36a00;border-radius:3px}.cubes{display:flex;flex-wrap:wrap;gap:3px;width:74px}.cube{width:14px;height:14px;background:#7bd389;border:2px solid #2e8b57;border-radius:3px}
.tbl{border-collapse:collapse;font-size:18px}.tbl th,.tbl td{border:2px solid #bccaee;padding:8px 14px;text-align:center}.tbl thead th{background:#eaf0ff}.tbl tbody th{background:#fff3e2}
.scene{display:flex;gap:26px;font-size:60px}.scene.col{flex-direction:column;gap:10px;font-size:48px}
.two{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:center}.two b{font-size:30px}
.vert{font-size:34px;font-family:ui-monospace,Menlo,Consolas,monospace;display:inline-block;text-align:left;line-height:1.3}.vert hr{border:0;border-top:3px solid var(--ink);margin:2px 0}
.picto{display:grid;gap:6px;font-size:24px}.prow{display:flex;gap:12px;align-items:center}.prow b{width:90px;font-size:16px}.picto small{color:var(--muted)}
.unitbar{margin:8px 0;text-align:center}.unitbar small{display:block}.unitbar div{display:inline-flex}.unitbar i{width:26px;height:26px;border:2px solid #fff;background:#4d7cf0}
.svg{width:100%;max-width:360px;height:auto}.svg.clock{max-width:220px}.svg.shape{max-width:200px}
.coins{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.coin{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;align-content:center;font-weight:800;border:4px solid #8a6d1d;background:radial-gradient(#f6e08a,#d9b53f);color:#4b3a08;line-height:1}.coin small{font-size:11px}.coin.c1,.coin.c2,.coin.c5{width:48px;height:48px;background:radial-gradient(#e4e8ee,#b6bdc9);border-color:#7b8494;color:#2e3644}.coin.c10,.coin.c20{width:56px;height:56px}.coin.c100{width:72px;height:72px;font-size:20px}
.array{display:grid;gap:2px;font-size:26px;justify-content:center}
.gridarea{display:flex;gap:20px;flex-wrap:wrap;justify-content:center;margin:12px 0}.gridwrap{text-align:center}.gridwrap small{display:block;color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(var(--cols),40px);grid-template-rows:repeat(var(--rows),40px);gap:0;border:2px solid #7d8cb0;width:max-content}.grid.small{grid-template-columns:repeat(var(--cols),22px);grid-template-rows:repeat(var(--rows),22px)}
.cell{border:1px solid #cfd8ee;background:#fff;padding:0}.cell.on{background:#4d7cf0}.cell.given{background:#8aa8f5;cursor:default}.cell.axis{border-left:4px solid #e0508a}.cell.miss{background:#ffd9a8;outline:2px dashed #e08a00;outline-offset:-3px}.cell.extra{background:#f7c0bb}
@media(max-width:480px){body{font-size:16px}.hero{padding:18px}.hero h1{font-size:24px}.grid{grid-template-columns:repeat(var(--cols),34px);grid-template-rows:repeat(var(--rows),34px)}.qtitle h1{font-size:20px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
[tabindex="-1"]:focus{outline:none}
#nextQ{display:block;margin-top:14px}bdi{unicode-bidi:isolate}
