@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Tajawal:wght@400;500;600;700;800;900&display=swap');
:root{--ink:#17233b;--muted:#69758a;--yellow:#ffd65a;--yellow2:#ffedb1;--cream:#fffaf0;--paper:#fff;--line:#eee8dc;--blue:#dfeeff;--pink:#ffe6e7;--green:#e4f3e8;--shadow:0 18px 50px rgba(36,45,66,.09)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink);font-family:var(--site-font,'Tajawal'),'DM Sans',sans-serif;font-size:17px;line-height:1.75}a{color:inherit;text-decoration:none}button{font:inherit;cursor:pointer}header{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:22px;padding:13px max(5vw,22px);background:rgba(255,250,240,.94);backdrop-filter:blur(14px);border-bottom:1px solid rgba(238,232,220,.9)}.brand{display:flex;align-items:center;gap:11px;font-family:'DM Sans','Tajawal',sans-serif;font-size:19px;font-weight:800;direction:ltr;white-space:nowrap}.flag{display:inline-block;width:27px;height:19px;border-radius:5px;background:linear-gradient(90deg,#171717 0 33%,#f4d33f 33% 66%,#e94b4b 66%);box-shadow:0 2px 5px #0002}nav{display:flex;align-items:center;gap:6px;flex-wrap:wrap}nav a{font-size:14px;font-weight:700;color:#536078;padding:8px 11px;border-radius:12px;transition:.2s}nav a:hover,nav a:focus{background:var(--yellow2);color:var(--ink)}.hero{max-width:var(--site-width,1200px);margin:42px auto 30px;padding:54px 6%;min-height:420px;border-radius:34px;background:linear-gradient(115deg,#fff0bf 0%,#fff8e7 52%,#e8f2ff 100%);display:grid;grid-template-columns:1.15fr .85fr;align-items:center;gap:32px;overflow:hidden;position:relative}.hero:before{content:'';position:absolute;width:300px;height:300px;border-radius:50%;background:#fff8;left:-110px;top:-130px}.hero>div{position:relative;z-index:1}.eyebrow,.pill{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:999px;background:#fff9e6;color:#8b6810;font-size:14px;font-weight:800}.hero h1{font-size:clamp(38px,5vw,62px);line-height:1.18;margin:18px 0 14px;font-weight:900;letter-spacing:-1px}.hero p{font-size:19px;color:#5d6880;max-width:560px;margin:0 0 24px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--ink);color:#fff;padding:12px 22px;border-radius:14px;font-weight:800;margin:4px 5px 4px 0;box-shadow:0 8px 18px #17233b20;transition:.2s}.btn:hover{transform:translateY(-2px);box-shadow:0 12px 22px #17233b2b}.btn.alt{background:#fff;color:var(--ink);border:1px solid var(--line);box-shadow:none}.mila-wrap{display:flex;align-items:center;justify-content:center;position:relative;min-height:320px}.mila{width:min(280px,80%);height:340px;object-fit:cover;object-position:center 25%;border-radius:42% 42% 30% 30%;border:9px solid #fff;box-shadow:var(--shadow);transform:rotate(2deg)}.speech{position:absolute;bottom:8px;right:0;background:#fff;padding:12px 18px;border-radius:18px;box-shadow:var(--shadow);font-weight:800}.speech small{display:block;color:var(--muted);font-weight:500}.home-main,main{max-width:var(--site-width,1120px);margin:0 auto;padding:28px 24px 65px}.section-title{text-align:center;margin:45px 0 24px}.section-title h2{font-size:32px;margin:0 0 5px;font-weight:900}.muted{color:var(--muted)}.section-title p{margin:0;color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.tile{display:block;background:var(--paper);padding:24px;border:1px solid var(--line);border-radius:var(--radius,22px);box-shadow:0 6px 22px #17233b08;transition:.22s}.tile:hover{transform:translateY(-5px);box-shadow:var(--shadow);border-color:#f1d77e}.tile .icon{width:52px;height:52px;display:grid;place-items:center;border-radius:17px;background:var(--yellow2);font-size:27px;margin-bottom:12px}.tile:nth-child(2) .icon{background:var(--blue)}.tile:nth-child(3) .icon{background:var(--green)}.tile:nth-child(4) .icon{background:var(--pink)}.tile h3{margin:0 0 5px;font-size:21px;font-weight:900}.tile p{margin:0;color:var(--muted);font-size:15px}.lesson,.quiz{background:#fff;border:1px solid var(--line);border-radius:var(--radius,24px);padding:27px;margin:24px 0;box-shadow:0 8px 24px #17233b08}.lesson h2{font-size:30px;margin:10px 0}.nl{font-family:'DM Sans',sans-serif;direction:ltr;text-align:left;font-weight:800;color:#1b4c78}.speak{border:0;border-radius:12px;padding:9px 15px;background:var(--accent,var(--yellow));color:var(--ink);font-weight:800}.wordlist{display:grid;gap:12px}.wordlist>div,.wordlist li{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px 18px}.answers{display:flex;gap:10px;flex-wrap:wrap}.answer{border:1px solid var(--line);background:#fff;padding:10px 16px;border-radius:12px}.answer:hover{background:var(--yellow2)}footer{text-align:center;padding:30px 20px;background:#17233b;color:#fff}footer p{margin:4px 0;color:#cbd2df}h1,h2,h3{line-height:1.35}main>h1{font-size:36px;margin-top:20px}main>p{color:var(--muted)}.home-note{margin:28px 0;padding:24px;border-radius:22px;background:#edf5ff;display:flex;align-items:center;justify-content:space-between;gap:20px}.home-note h3{margin:0 0 5px}.home-note p{margin:0;color:var(--muted)}
@media(max-width:850px){header{align-items:flex-start;flex-direction:column;padding:12px 18px;gap:8px}nav{flex-wrap:nowrap;max-width:100%;overflow-x:auto;padding-bottom:3px}nav a{white-space:nowrap}.hero{margin:20px 14px;padding:30px 24px;grid-template-columns:1fr;text-align:center;gap:15px}.hero p{margin-left:auto;margin-right:auto}.mila-wrap{min-height:270px}.mila{height:270px;width:220px}.speech{right:8%;bottom:0}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.section-title h2{font-size:27px}}
@media(max-width:520px){body{font-size:16px}.hero{border-radius:24px;padding:27px 18px}.hero h1{font-size:39px}.hero p{font-size:17px}.grid{grid-template-columns:1fr;gap:12px}.tile{padding:19px}.home-main,main{padding:18px 16px 45px}.section-title{margin:32px 0 18px}.section-title h2{font-size:25px}.home-note{display:block}.home-note .btn{margin-top:12px}}

/* Mila voice selector */
.mila-voice-panel{position:fixed;z-index:30;left:18px;bottom:18px;width:min(310px,calc(100vw - 36px));padding:15px;background:#fff;border:1px solid #eee4cf;border-radius:20px;box-shadow:0 12px 38px #17233b20;direction:rtl}
.mila-voice-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}.mila-voice-head strong{display:block;font-size:16px}.mila-voice-head small{display:block;color:var(--muted);font-size:12px}.mila-voice-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:14px;background:#fff0bf;font-size:21px}
#milaVoiceSelect{width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font:inherit;font-size:13px;direction:ltr}
.mila-voice-actions{display:flex;gap:8px;margin-top:9px}.mila-voice-actions button{flex:1;border:0;border-radius:11px;padding:9px;background:var(--accent,var(--yellow));color:var(--ink);font-weight:800;font:inherit;font-size:14px}.mila-voice-actions .mila-stop{background:#edf1f7}.mila-voice-panel p{font-size:11px;line-height:1.5;color:var(--muted);margin:8px 0 0}
@media(max-width:520px){.mila-voice-panel{left:10px;bottom:10px;width:min(290px,calc(100vw - 20px));padding:12px}}

/* Global three-language preference selector */
.language-preferences{max-width:1120px;margin:24px auto;padding:22px 24px;background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:0 8px 28px #17233b0b;direction:rtl}
.language-preferences-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.language-preferences-head strong{display:block;font-size:20px;font-weight:900}.language-preferences-head small,.language-preferences-foot small{display:block;color:var(--muted);font-size:13px}.language-save-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--green);color:#236b3c;font-weight:900}.language-preferences-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.language-field{display:grid;gap:6px;font-weight:800;font-size:14px}.language-field select{width:100%;min-height:46px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);padding:8px 10px;font:inherit;font-weight:600}.language-preferences-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px;color:var(--muted);font-size:13px}.language-preferences-foot span{font-weight:800;color:#236b3c}
html[dir="ltr"] .language-preferences{direction:ltr;text-align:left}html[dir="ltr"] .language-preferences-head{direction:ltr}html[dir="ltr"] .language-preferences-foot{direction:ltr}
@media(max-width:700px){.language-preferences{margin:16px 14px;padding:17px}.language-preferences-fields{grid-template-columns:1fr}.language-preferences-foot{align-items:flex-start;flex-direction:column}}
/* Original Mila character illustration: keep the artwork itself free of text and overlays. */
.mila-character{display:block;width:min(100%,390px);max-height:410px;height:auto;object-fit:contain;filter:drop-shadow(0 16px 24px #17233b20)}
.mila-character-wrap{min-height:360px}
@media(max-width:850px){.mila-character{max-height:330px;width:min(90%,330px)}.mila-character-wrap{min-height:280px}}
