{"id":341,"date":"2026-01-10T23:54:16","date_gmt":"2026-01-10T23:54:16","guid":{"rendered":"https:\/\/plentylearning.com\/espanol\/?page_id=341"},"modified":"2026-01-11T01:27:43","modified_gmt":"2026-01-11T01:27:43","slug":"spanish-a1-foundations-of-communication-cefr","status":"publish","type":"page","link":"https:\/\/plentylearning.com\/espanol\/spanish-a1-foundations-of-communication-cefr\/","title":{"rendered":"Spanish A1 \u2013 Foundations of Communication (CEFR)"},"content":{"rendered":"\n <!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" \/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\/>\n  <title>Spanish A1 \u2013 Foundations of Communication (CEFR) | Plenty Learning<\/title>\n  <style>\n    :root{\n      --brand:#5a2ea6; \/* Change to your exact Plenty Learning HEX *\/\n      --bg:#0b0b10;\n      --card: rgba(18,18,33,.88);\n      --border: rgba(255,255,255,.12);\n      --text:#f3f3f7;\n      --muted:#c8c8d6;\n      --ok:#18a558;\n      --bad:#d94848;\n      --warn:#f0b429;\n      --shadow: 0 10px 26px rgba(0,0,0,.35);\n      --radius:18px;\n    }\n    *{box-sizing:border-box}\n    body{\n      margin:0;\n      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;\n      background: linear-gradient(180deg, rgba(90,46,166,.14), transparent 42%), var(--bg);\n      color: var(--text);\n    }\n    .wrap{max-width: 1120px; margin:0 auto; padding: 18px;}\n    .topbar{\n      display:flex; flex-wrap:wrap;\n      align-items:center; justify-content:space-between; gap:14px;\n      padding:16px 18px; border:1px solid var(--border); border-radius: var(--radius);\n      background: rgba(18,18,33,.85); backdrop-filter: blur(8px); box-shadow: var(--shadow);\n    }\n    .brand{display:flex; align-items:center; gap:12px;}\n    .logo{\n      width:46px;height:46px;border-radius:14px;\n      background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.16), rgba(255,255,255,.06)), var(--brand);\n      display:grid;place-items:center;font-weight:900;\n      letter-spacing:.06em;\n      user-select:none;\n    }\n    h1{margin:0; font-size:16px; line-height:1.2;}\n    .subtitle{margin-top:2px; font-size:12px; color: var(--muted);}\n    .pill{\n      font-size:12px; padding:8px 10px; border-radius:999px;\n      border:1px solid var(--border); background: rgba(255,255,255,.04);\n      color: var(--muted); white-space:nowrap;\n    }\n    .grid{display:grid; grid-template-columns: 1fr; gap:14px; margin-top:14px;}\n    .card{\n      border:1px solid var(--border); border-radius: var(--radius);\n      background: var(--card); padding:16px; box-shadow: var(--shadow);\n    }\n    .muted{color: var(--muted); font-size:13px; line-height:1.5;}\n    .tiny{color: var(--muted); font-size:12px; line-height:1.45;}\n    .note{\n      border-left:4px solid var(--brand);\n      padding:10px 12px;\n      background: rgba(90,46,166,.12);\n      border-radius: 14px;\n      margin-top:10px;\n    }\n    .row{display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between;}\n    .btns{display:flex; flex-wrap:wrap; gap:10px; align-items:center;}\n    button, select, input[type=\"text\"], textarea{\n      border:1px solid var(--border);\n      background: rgba(255,255,255,.06);\n      color: var(--text);\n      padding:10px 12px;\n      border-radius:14px;\n      font-family: inherit;\n    }\n    button{cursor:pointer; font-weight:900; user-select:none;}\n    button.primary{background: var(--brand); border-color: rgba(255,255,255,.18);}\n    button.ghost{background: rgba(255,255,255,.03);}\n    button:active{transform: translateY(1px);}\n    select, input[type=\"text\"], textarea{\n      width:100%;\n      background: rgba(0,0,0,.25);\n      outline:none;\n      font-weight:600;\n    }\n    textarea{min-height:120px; resize:vertical;}\n\n    .tabs{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px;}\n    .tab{\n      padding:10px 12px; border-radius:14px;\n      border:1px solid var(--border);\n      background: rgba(255,255,255,.04);\n      cursor:pointer; font-weight:900; font-size:13px;\n      user-select:none;\n    }\n    .tab.active{background: var(--brand); border-color: rgba(255,255,255,.18);}\n\n    .badge{\n      font-size:11px; color: var(--muted);\n      border:1px solid var(--border);\n      padding:3px 8px;\n      border-radius: 999px;\n      background: rgba(255,255,255,.03);\n      white-space:nowrap;\n    }\n\n    .q{\n      padding:12px;\n      border:1px solid var(--border);\n      border-radius: 16px;\n      background: rgba(255,255,255,.03);\n      margin-top:12px;\n    }\n    .qhead{display:flex; gap:10px; align-items:flex-start; justify-content:space-between;}\n    .qhead b{font-size:14px;}\n    .feedback{margin-top:8px; font-size:13px; line-height:1.35;}\n    .ok{color: var(--ok);}\n    .bad{color: var(--bad);}\n    .warn{color: var(--warn);}\n\n    .rulebox{\n      display:none;\n      margin-top:10px;\n      padding:10px 12px;\n      border-radius:14px;\n      border:1px solid var(--border);\n      background: rgba(0,0,0,.22);\n    }\n    .rulebox.show{display:block;}\n\n    .stats{\n      display:grid;\n      grid-template-columns: repeat(4, minmax(0,1fr));\n      gap:10px;\n      margin-top:10px;\n    }\n    .stat{\n      border:1px solid var(--border);\n      background: rgba(255,255,255,.03);\n      border-radius: 16px;\n      padding:10px 12px;\n    }\n    .k{font-size:12px;color:var(--muted);}\n    .v{margin-top:4px; font-size:16px; font-weight:900;}\n    @media (max-width: 900px){ .stats{grid-template-columns:1fr 1fr;} }\n\n    .visualRow{\n      display:grid; grid-template-columns: repeat(3, minmax(0,1fr));\n      gap:10px; margin-top:10px;\n    }\n    @media (max-width: 900px){ .visualRow{grid-template-columns:1fr;} }\n    .visual{\n      border:1px solid var(--border);\n      background: rgba(0,0,0,.22);\n      border-radius: 16px;\n      padding:12px;\n      display:flex; gap:10px; align-items:flex-start;\n    }\n    .ico{width:36px;height:36px;border-radius:12px;background: rgba(90,46,166,.22); display:grid; place-items:center; flex:0 0 auto; border:1px solid rgba(255,255,255,.10);}\n    .ico svg{width:20px;height:20px; opacity:.95}\n    .visual h4{margin:0 0 4px; font-size:13px;}\n    .visual .tiny{margin:0;}\n\n    .footer{ text-align:center; color: var(--muted); font-size:12px; padding: 10px; }\n  <\/style>\n<\/head>\n\n<body>\n  <div class=\"wrap\">\n    <div class=\"topbar\">\n      <div class=\"brand\">\n        <div class=\"logo\">PL<\/div>\n        <div>\n          <h1>Spanish A1 \u2013 Foundations of Communication (CEFR)<\/h1>\n          <div class=\"subtitle\">Self-learning for English speakers \u00b7 Interactive \u00b7 By TeacherJM<\/div>\n        <\/div>\n      <\/div>\n      <div class=\"btns\">\n        <span class=\"pill\">A1 Beginner \u00b7 Survival language \u00b7 Basic grammar<\/span>\n      <\/div>\n    <\/div>\n\n    <div class=\"grid\">\n      <section class=\"card\">\n        <div class=\"row\">\n          <div>\n            <h2 style=\"margin:0 0 6px; font-size:16px;\" id=\"moduleTitle\">Module 1 \u2013 Greetings &#038; Introductions<\/h2>\n            <div class=\"muted\" id=\"moduleDesc\">Instructions in English. Activities in Spanish.<\/div>\n          <\/div>\n          <div class=\"btns\">\n            <div style=\"min-width: 320px;\">\n              <select id=\"moduleSelect\" aria-label=\"Select module\">\n                <option value=\"m1\">Module 1 \u2013 Greetings &#038; Introductions<\/option>\n                <option value=\"m2\">Module 2 \u2013 Alphabet &#038; Pronunciation<\/option>\n                <option value=\"m3\">Module 3 \u2013 Subject Pronouns + SER<\/option>\n                <option value=\"m4\">Module 4 \u2013 ESTAR (location\/condition)<\/option>\n                <option value=\"m5\">Module 5 \u2013 Survival Tasks + A1 Review<\/option>\n              <\/select>\n            <\/div>\n            <span class=\"badge\" id=\"moduleTime\">Estimated: 55\u201375 min<\/span>\n          <\/div>\n        <\/div>\n\n        <div class=\"note\">\n          <div class=\"muted\">\n            <b>Course outcomes (\u201cI can\u2026\u201d, CEFR A1):<\/b>\n            <ul style=\"margin:8px 0 0 18px;\">\n              <li>I can greet people and introduce myself.<\/li>\n              <li>I can spell my name and understand basic Spanish sounds.<\/li>\n              <li>I can say who I am and where I\u2019m from using <b>ser<\/b>.<\/li>\n              <li>I can say where things are and how I feel using <b>estar<\/b>.<\/li>\n              <li>I can handle simple survival interactions (shop, caf\u00e9, directions) and pass an A1 progress check.<\/li>\n            <\/ul>\n          <\/div>\n        <\/div>\n\n        <div class=\"tabs\" id=\"tabs\">\n          <div class=\"tab active\" data-tab=\"learn\">Learn<\/div>\n          <div class=\"tab\" data-tab=\"practice\">Practice<\/div>\n          <div class=\"tab\" data-tab=\"assess\">Assess<\/div>\n          <div class=\"tab\" data-tab=\"progress\">Progress<\/div>\n        <\/div>\n      <\/section>\n\n      <!-- LEARN -->\n      <section class=\"card\" id=\"panel-learn\">\n        <div class=\"row\">\n          <div>\n            <h3 style=\"margin:0 0 6px; font-size:15px;\">Learn<\/h3>\n            <div class=\"tiny\">Instruction (EN): Read the mini rules, listen, then try Practice.<\/div>\n          <\/div>\n          <div class=\"btns\">\n            <button class=\"ghost\" type=\"button\" id=\"btnShowRule\">Show rule<\/button>\n            <button type=\"button\" id=\"btnListenExamples\">Listen: examples<\/button>\n            <button type=\"button\" id=\"btnListenPhrases\">Listen: phrase bank<\/button>\n          <\/div>\n        <\/div>\n\n        <div class=\"rulebox\" id=\"learnRuleBox\"><\/div>\n\n        <div class=\"visualRow\" id=\"learnVisuals\"><\/div>\n\n        <div class=\"q\">\n          <div class=\"qhead\">\n            <div>\n              <b>Mini phrase bank (Spanish)<\/b>\n              <div class=\"tiny\">Instruction (EN): Repeat aloud. Focus on clear pronunciation.<\/div>\n            <\/div>\n            <div class=\"badge\">A1<\/div>\n          <\/div>\n          <div class=\"muted\" style=\"margin-top:8px;\">\n            <ul style=\"margin:0 0 0 18px;\" id=\"phraseList\"><\/ul>\n          <\/div>\n        <\/div>\n      <\/section>\n\n      <!-- PRACTICE -->\n      <section class=\"card\" id=\"panel-practice\" style=\"display:none;\">\n        <div class=\"row\">\n          <div>\n            <h3 style=\"margin:0 0 6px; font-size:15px;\">Practice<\/h3>\n            <div class=\"tiny\">Instruction (EN): Complete Activity A \u2192 B \u2192 C. Try again until confident.<\/div>\n          <\/div>\n          <div class=\"btns\">\n            <button type=\"button\" id=\"btnResetPractice\">Reset practice<\/button>\n          <\/div>\n        <\/div>\n\n        <div class=\"q\" id=\"practiceA\"><\/div>\n        <div class=\"q\" id=\"practiceB\"><\/div>\n        <div class=\"q\" id=\"practiceC\"><\/div>\n      <\/section>\n\n      <!-- ASSESS -->\n      <section class=\"card\" id=\"panel-assess\" style=\"display:none;\">\n        <div class=\"row\">\n          <div>\n            <h3 style=\"margin:0 0 6px; font-size:15px;\">Assess (auto-evaluation)<\/h3>\n            <div class=\"tiny\">Instruction (EN): Do Writing (short) + Quiz. Pass mark: <b>80%<\/b>.<\/div>\n          <\/div>\n          <div class=\"btns\">\n            <button class=\"primary\" type=\"button\" id=\"btnCheckAssess\">Check<\/button>\n            <button class=\"ghost\" type=\"button\" id=\"btnRetryIncorrect\">Retry incorrect only<\/button>\n            <button type=\"button\" id=\"btnNewQuiz\">New set<\/button>\n            <button class=\"ghost\" type=\"button\" id=\"btnResetAssess\">Reset<\/button>\n          <\/div>\n        <\/div>\n\n        <div class=\"stats\">\n          <div class=\"stat\"><div class=\"k\">Quiz score<\/div><div class=\"v\"><span id=\"aScore\">0<\/span>\/<span id=\"aMax\">10<\/span><\/div><\/div>\n          <div class=\"stat\"><div class=\"k\">Streak<\/div><div class=\"v\" id=\"streak\">0<\/div><\/div>\n          <div class=\"stat\"><div class=\"k\">Best streak<\/div><div class=\"v\" id=\"bestStreak\">0<\/div><\/div>\n          <div class=\"stat\"><div class=\"k\">Average<\/div><div class=\"v\" id=\"avg\">\u2014<\/div><div class=\"tiny\"><span id=\"attempts\">0<\/span> attempts<\/div><\/div>\n        <\/div>\n\n        <div class=\"q\" id=\"writingTask\"><\/div>\n\n        <div class=\"q\">\n          <div class=\"qhead\">\n            <div>\n              <b>Quiz (Random 10)<\/b>\n              <div class=\"tiny\">Instruction (EN): Choose the best option. Use Show rule if needed.<\/div>\n            <\/div>\n            <div class=\"btns\">\n              <button class=\"ghost\" type=\"button\" id=\"btnShowQuizRule\">Show rule<\/button>\n              <button type=\"button\" id=\"btnListenQuizHint\">Listen<\/button>\n            <\/div>\n          <\/div>\n          <div class=\"rulebox\" id=\"quizRuleBox\"><\/div>\n          <div id=\"quiz\"><\/div>\n          <div class=\"feedback\" id=\"aMsg\"><\/div>\n        <\/div>\n      <\/section>\n\n      <!-- PROGRESS -->\n      <section class=\"card\" id=\"panel-progress\" style=\"display:none;\">\n        <h3 style=\"margin:0 0 6px; font-size:15px;\">Progress &#038; Self-assessment<\/h3>\n        <div class=\"muted\">Instruction (EN): Tick what you can do confidently. Save your progress.<\/div>\n\n        <div class=\"q\">\n          <div class=\"qhead\">\n            <div><b>\u201cI can\u2026\u201d checklist<\/b><\/div>\n            <div class=\"badge\">Self-reflection<\/div>\n          <\/div>\n          <div style=\"display:grid; gap:10px; margin-top:10px;\" id=\"canList\"><\/div>\n          <div class=\"btns\" style=\"margin-top:12px;\">\n            <button class=\"primary\" type=\"button\" id=\"btnSaveChecklist\">Save<\/button>\n            <button class=\"ghost\" type=\"button\" id=\"btnResetChecklist\">Reset<\/button>\n          <\/div>\n          <div class=\"feedback\" id=\"checkMsg\"><\/div>\n        <\/div>\n\n        <div class=\"q\">\n          <div class=\"qhead\">\n            <div><b>Recommended next step<\/b><\/div>\n            <div class=\"badge\">Guidance<\/div>\n          <\/div>\n          <div class=\"muted\" id=\"nextStep\"><\/div>\n        <\/div>\n\n        <div class=\"footer\">\u00a9 Plenty Learning \u00b7 Spanish A1 \u00b7 By TeacherJM<\/div>\n      <\/section>\n    <\/div>\n  <\/div>\n\n<script>\n  \/\/ ===== Helpers\n  function normalize(str){\n    return (str || \"\").toString().trim().toLowerCase()\n      .normalize(\"NFD\").replace(\/[\\u0300-\\u036f]\/g, \"\");\n  }\n  function shuffle(arr){\n    const a = arr.slice();\n    for(let i=a.length-1;i>0;i--){\n      const j = Math.floor(Math.random()*(i+1));\n      [a[i], a[j]] = [a[j], a[i]];\n    }\n    return a;\n  }\n  function speakES(text){\n    try{\n      if(!(\"speechSynthesis\" in window)) return alert(\"Speech not supported in this browser.\");\n      window.speechSynthesis.cancel();\n      const u = new SpeechSynthesisUtterance(text);\n      const voices = window.speechSynthesis.getVoices();\n      const esVoice = voices.find(v => (v.lang || \"\").toLowerCase().startsWith(\"es\"));\n      if(esVoice) u.voice = esVoice;\n      u.lang = esVoice ? esVoice.lang : \"es-ES\";\n      u.rate = 0.95; u.pitch = 1.0;\n      window.speechSynthesis.speak(u);\n    }catch(e){ alert(\"Could not play audio. Try a different browser.\"); }\n  }\n  window.speechSynthesis && window.speechSynthesis.getVoices();\n\n  \/\/ ===== Icons (inline SVG)\n  function iconSvg(name){\n    const common = 'fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"';\n    if(name===\"hello\") return `<svg viewBox=\"0 0 24 24\" ${common}><path d=\"M4 12h7\"\/><path d=\"M8 7v10\"\/><path d=\"M14 7h6v10h-6z\"\/><\/svg>`;\n    if(name===\"sound\") return `<svg viewBox=\"0 0 24 24\" ${common}><path d=\"M11 5 6 9H3v6h3l5 4z\"\/><path d=\"M15 9a3 3 0 0 1 0 6\"\/><path d=\"M17.5 7a6 6 0 0 1 0 10\"\/><\/svg>`;\n    if(name===\"id\") return `<svg viewBox=\"0 0 24 24\" ${common}><path d=\"M4 7h16v12H4z\"\/><path d=\"M8 11h8\"\/><path d=\"M8 15h6\"\/><\/svg>`;\n    if(name===\"map\") return `<svg viewBox=\"0 0 24 24\" ${common}><path d=\"M9 18 3 20V6l6-2 6 2 6-2v14l-6 2-6-2Z\"\/><path d=\"M9 4v14\"\/><path d=\"M15 6v14\"\/><\/svg>`;\n    if(name===\"chat\") return `<svg viewBox=\"0 0 24 24\" ${common}><path d=\"M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4Z\"\/><\/svg>`;\n    return `<svg viewBox=\"0 0 24 24\" ${common}><path d=\"M12 2v20\"\/><path d=\"M2 12h20\"\/><\/svg>`;\n  }\n\n  \/\/ ===== Course modules (A1)\n  const MODULES = {\n    m1: {\n      title:\"Module 1 \u2013 Greetings & Introductions\",\n      time:\"Estimated: 55\u201375 min\",\n      desc:\"Basic survival language: greetings, polite phrases, introductions.\",\n      learnRule: `\n        <div class=\"tiny\">\n          <b>Rule (English):<\/b><br\/>\n          \u2022 Greetings: <b>Hola<\/b>, <b>Buenos d\u00edas<\/b>, <b>Buenas tardes<\/b>, <b>Buenas noches<\/b>.<br\/>\n          \u2022 Polite: <b>por favor<\/b>, <b>gracias<\/b>, <b>perd\u00f3n<\/b>, <b>lo siento<\/b>.<br\/>\n          \u2022 Introductions: <b>Me llamo\u2026<\/b> \/ <b>Soy\u2026<\/b> \/ <b>Mucho gusto<\/b>.\n        <\/div>\n      `,\n      examplesListen:\"Hola. Buenos d\u00edas. Me llamo Ana. \u00bfC\u00f3mo te llamas? Mucho gusto. Por favor. Gracias.\",\n      visuals:[\n        {h:\"Greet\", t:\"Hola \u00b7 Buenos d\u00edas\/tardes\/noches\", ex:\"Buenos d\u00edas.\", ico:\"hello\"},\n        {h:\"Introduce\", t:\"Me llamo\u2026 \/ Soy\u2026\", ex:\"Me llamo Juan.\", ico:\"id\"},\n        {h:\"Be polite\", t:\"por favor \u00b7 gracias \u00b7 perd\u00f3n\", ex:\"Gracias.\", ico:\"chat\"}\n      ],\n      phrases:[\n        {es:\"Hola.\", en:\"Hello.\"},\n        {es:\"Buenos d\u00edas.\", en:\"Good morning.\"},\n        {es:\"Buenas tardes.\", en:\"Good afternoon.\"},\n        {es:\"Buenas noches.\", en:\"Good evening\/night.\"},\n        {es:\"\u00bfC\u00f3mo est\u00e1s?\", en:\"How are you? (informal)\"},\n        {es:\"Estoy bien, gracias.\", en:\"I\u2019m fine, thanks.\"},\n        {es:\"Me llamo ____.\", en:\"My name is ____.\"},\n        {es:\"\u00bfC\u00f3mo te llamas?\", en:\"What\u2019s your name? (informal)\"},\n        {es:\"Mucho gusto.\", en:\"Nice to meet you.\"},\n        {es:\"Por favor.\", en:\"Please.\"},\n        {es:\"Gracias.\", en:\"Thank you.\"},\n        {es:\"De nada.\", en:\"You\u2019re welcome.\"}\n      ],\n      practice:{\n        A:{ type:\"choose\", title:\"Activity A: Choose the best greeting\", instr:\"Choose the correct Spanish option.\",\n          items:[\n            {q:\"Good morning \u2192\", options:[\"Buenos d\u00edas\",\"Buenas noches\"], a:\"Buenos d\u00edas\"},\n            {q:\"Nice to meet you \u2192\", options:[\"Mucho gusto\",\"Lo siento\"], a:\"Mucho gusto\"},\n            {q:\"Please \u2192\", options:[\"Por favor\",\"Perd\u00f3n\"], a:\"Por favor\"},\n            {q:\"You\u2019re welcome \u2192\", options:[\"De nada\",\"Gracias\"], a:\"De nada\"}\n          ], pass:3\n        },\n        B:{ type:\"cloze\", title:\"Activity B: Complete the mini-dialogue\", instr:\"Type the missing words (Spanish).\",\n          items:[\n            {q:\"\u2014 Hola. Me ____ Ana.\", a:\"llamo\"},\n            {q:\"\u2014 \u00bfC\u00f3mo ____?\", a:\"est\u00e1s\"},\n            {q:\"\u2014 Estoy bien, ____.\", a:\"gracias\"},\n            {q:\"\u2014 Mucho ____.\", a:\"gusto\"}\n          ], pass:3\n        },\n        C:{ type:\"order\", title:\"Activity C: Put the dialogue in order\", instr:\"Type order numbers (1\u20134).\",\n          items:[\"Hola.\",\"Me llamo Ana.\",\"\u00bfC\u00f3mo te llamas?\",\"Mucho gusto.\"], pass:3\n        }\n      },\n      writing:{\n        prompt:\"Write 4\u20136 lines to introduce yourself. Include: greeting + name + country + polite closing.\",\n        help:\"Example: Hola. Me llamo\u2026 Soy de\u2026 Mucho gusto. Gracias.\",\n        checks:{minChars:70, needMarkers:[\"hola\",\"me llamo\",\"soy de\",\"mucho gusto\",\"gracias\",\"por favor\"], needConnector:false}\n      },\n      quizRule:\"Use correct greetings + polite phrases + basic introductions (Me llamo \/ \u00bfC\u00f3mo te llamas?).\",\n      quizListen:\"Hola. Buenos d\u00edas. \u00bfC\u00f3mo est\u00e1s? Me llamo Ana. Mucho gusto. Gracias.\",\n      can:[\n        \"I can greet someone politely.\",\n        \"I can introduce myself (Me llamo\u2026).\",\n        \"I can ask someone\u2019s name (\u00bfC\u00f3mo te llamas?).\",\n        \"I can use basic polite words (por favor, gracias).\",\n        \"I can pass the module quiz with 80% or more.\"\n      ]\n    },\n\n    m2: {\n      title:\"Module 2 \u2013 Alphabet & Pronunciation\",\n      time:\"Estimated: 55\u201375 min\",\n      desc:\"Spanish alphabet basics, spelling names, key sounds (j, g, ll\/y, r\/rr).\",\n      learnRule: `\n        <div class=\"tiny\">\n          <b>Rule (English):<\/b><br\/>\n          \u2022 Spelling: <b>\u00bfC\u00f3mo se escribe?<\/b> \/ <b>Se escribe\u2026<\/b><br\/>\n          \u2022 Key sounds: <b>j<\/b> (like \u201ch\u201d in English), <b>rr<\/b> strong \u201cr\u201d, <b>ll\/y<\/b> depends on accent (often \u201cy\u201d).<br\/>\n          \u2022 Practice slowly \u2192 clarity first.\n        <\/div>\n      `,\n      examplesListen:\"\u00bfC\u00f3mo se escribe? Se escribe J-U-A-N. La jota suena fuerte: jam\u00f3n. La erre doble: perro.\",\n      visuals:[\n        {h:\"Spell\", t:\"\u00bfC\u00f3mo se escribe? \/ Se escribe\u2026\", ex:\"Se escribe A-N-A.\", ico:\"id\"},\n        {h:\"Sounds\", t:\"j \u00b7 rr \u00b7 ll\/y\", ex:\"jam\u00f3n \u00b7 perro \u00b7 llave\", ico:\"sound\"},\n        {h:\"Repeat\", t:\"slow \u2192 clear\", ex:\"A\u2026 N\u2026 A\u2026\", ico:\"chat\"}\n      ],\n      phrases:[\n        {es:\"\u00bfC\u00f3mo se escribe tu nombre?\", en:\"How do you spell your name?\"},\n        {es:\"Se escribe A-N-A.\", en:\"It\u2019s spelled A-N-A.\"},\n        {es:\"Mi apellido es Mu\u00f1oz.\", en:\"My last name is Mu\u00f1oz.\"},\n        {es:\"\u00bfPuedes repetir, por favor?\", en:\"Can you repeat, please?\"},\n        {es:\"No entiendo.\", en:\"I don\u2019t understand.\"},\n        {es:\"M\u00e1s despacio, por favor.\", en:\"More slowly, please.\"}\n      ],\n      practice:{\n        A:{ type:\"choose\", title:\"Activity A: Choose the spelling phrase\", instr:\"Pick the best Spanish option.\",\n          items:[\n            {q:\"How do you spell it? \u2192\", options:[\"\u00bfC\u00f3mo se escribe?\",\"\u00bfC\u00f3mo est\u00e1s?\"], a:\"\u00bfC\u00f3mo se escribe?\"},\n            {q:\"It\u2019s spelled\u2026 \u2192\", options:[\"Se escribe\u2026\",\"Soy de\u2026\"], a:\"Se escribe\u2026\"},\n            {q:\"Repeat, please \u2192\", options:[\"\u00bfPuedes repetir, por favor?\",\"Buenas tardes\"], a:\"\u00bfPuedes repetir, por favor?\"},\n            {q:\"More slowly \u2192\", options:[\"M\u00e1s despacio, por favor.\",\"De nada.\"], a:\"M\u00e1s despacio, por favor.\"}\n          ], pass:3\n        },\n        B:{ type:\"cloze\", title:\"Activity B: Spell your name (fill)\", instr:\"Type the missing letters (A1).\",\n          items:[\n            {q:\"Se escribe J-U-_-N.\", a:\"a\"},\n            {q:\"Se escribe M-A-R-_-A.\", a:\"i\"},\n            {q:\"Se escribe L-U-_-S.\", a:\"i\"},\n            {q:\"Se escribe A-N-_-.\", a:\"a\"}\n          ], pass:3\n        },\n        C:{ type:\"meaning\", title:\"Activity C: Meaning check\", instr:\"Choose the best English meaning.\",\n          items:[\n            {q:\"\u201cNo entiendo.\u201d means:\", options:[\"I don\u2019t understand.\",\"I\u2019m from\u2026\"], a:\"I don\u2019t understand.\"},\n            {q:\"\u201c\u00bfPuedes repetir, por favor?\u201d means:\", options:[\"Can you repeat, please?\",\"What\u2019s your name?\"], a:\"Can you repeat, please?\"}\n          ], pass:2\n        }\n      },\n      writing:{\n        prompt:\"Write 4\u20136 lines: your name + spelling + a polite request (repeat\/slowly).\",\n        help:\"Example: Me llamo\u2026 Se escribe\u2026 \u00bfPuedes repetir, por favor? Gracias.\",\n        checks:{minChars:70, needMarkers:[\"se escribe\",\"por favor\",\"gracias\",\"me llamo\",\"puedes repetir\",\"mas despacio\"], needConnector:false}\n      },\n      quizRule:\"Alphabet basics: ask to spell (\u00bfC\u00f3mo se escribe?), answer (Se escribe\u2026), and polite comprehension phrases.\",\n      quizListen:\"\u00bfC\u00f3mo se escribe? Se escribe A-N-A. \u00bfPuedes repetir, por favor? M\u00e1s despacio, por favor.\",\n      can:[\n        \"I can ask how to spell a word (\u00bfC\u00f3mo se escribe?).\",\n        \"I can spell my name (Se escribe\u2026).\",\n        \"I can ask for repetition or slower speech.\",\n        \"I can say I don\u2019t understand (No entiendo).\",\n        \"I can pass the module quiz with 80% or more.\"\n      ]\n    },\n\n    m3: {\n      title:\"Module 3 \u2013 Subject Pronouns + SER (identity & origin)\",\n      time:\"Estimated: 60\u201380 min\",\n      desc:\"Yo\/t\u00fa\/\u00e9l\/ella\/nosotros\u2026 + ser for identity and origin. Basic questions.\",\n      learnRule: `\n        <div class=\"tiny\">\n          <b>Rule (English):<\/b><br\/>\n          \u2022 Subject pronouns: <b>yo, t\u00fa, \u00e9l, ella, nosotros\/as, ustedes<\/b>.<br\/>\n          \u2022 <b>Ser<\/b> = identity\/origin: <b>soy<\/b>, <b>eres<\/b>, <b>es<\/b>, <b>somos<\/b>, <b>son<\/b>.<br\/>\n          \u2022 Origin: <b>Soy de Chile.<\/b> \/ <b>\u00bfDe d\u00f3nde eres?<\/b>\n        <\/div>\n      `,\n      examplesListen:\"Yo soy Juan. T\u00fa eres Ana. \u00c9l es Pedro. Nosotros somos de Chile. \u00bfDe d\u00f3nde eres?\",\n      visuals:[\n        {h:\"Pronouns\", t:\"yo \u00b7 t\u00fa \u00b7 \u00e9l\/ella \u00b7 nosotros \u00b7 ustedes\", ex:\"Yo \/ T\u00fa\", ico:\"id\"},\n        {h:\"SER\", t:\"soy\/eres\/es\/somos\/son\", ex:\"Soy profesor.\", ico:\"chat\"},\n        {h:\"Origin\", t:\"Soy de\u2026 \/ \u00bfDe d\u00f3nde eres?\", ex:\"Soy de Chile.\", ico:\"map\"}\n      ],\n      phrases:[\n        {es:\"Yo soy ____.\", en:\"I am ____.\"},\n        {es:\"T\u00fa eres ____.\", en:\"You are ____.\"},\n        {es:\"\u00c9l es ____.\", en:\"He is ____.\"},\n        {es:\"Ella es ____.\", en:\"She is ____.\"},\n        {es:\"Soy de Chile.\", en:\"I\u2019m from Chile.\"},\n        {es:\"\u00bfDe d\u00f3nde eres?\", en:\"Where are you from?\"},\n        {es:\"Somos estudiantes.\", en:\"We are students.\"},\n        {es:\"Ustedes son de Canad\u00e1.\", en:\"You (pl.) are from Canada.\"}\n      ],\n      practice:{\n        A:{ type:\"choose\", title:\"Activity A: Choose the correct SER form\", instr:\"Select the best option.\",\n          items:[\n            {q:\"Yo ___ de Estados Unidos.\", options:[\"soy\",\"eres\"], a:\"soy\"},\n            {q:\"T\u00fa ___ estudiante.\", options:[\"eres\",\"es\"], a:\"eres\"},\n            {q:\"Ella ___ de M\u00e9xico.\", options:[\"es\",\"somos\"], a:\"es\"},\n            {q:\"Nosotros ___ de Chile.\", options:[\"somos\",\"son\"], a:\"somos\"}\n          ], pass:3\n        },\n        B:{ type:\"cloze\", title:\"Activity B: Complete the question\/answer\", instr:\"Type the missing word (Spanish).\",\n          items:[\n            {q:\"\u00bfDe d\u00f3nde ____?\", a:\"eres\"},\n            {q:\"Yo ____ de Per\u00fa.\", a:\"soy\"},\n            {q:\"Nosotros ____ estudiantes.\", a:\"somos\"},\n            {q:\"Ustedes ____ de Canad\u00e1.\", a:\"son\"}\n          ], pass:3\n        },\n        C:{ type:\"meaning\", title:\"Activity C: Meaning check\", instr:\"Choose the best English meaning.\",\n          items:[\n            {q:\"\u201cSoy de Chile.\u201d means:\", options:[\"I\u2019m from Chile.\",\"I\u2019m in Chile.\"], a:\"I\u2019m from Chile.\"},\n            {q:\"\u201c\u00bfDe d\u00f3nde eres?\u201d means:\", options:[\"Where are you from?\",\"Where are you?\"], a:\"Where are you from?\"}\n          ], pass:2\n        }\n      },\n      writing:{\n        prompt:\"Write 4\u20136 lines: who you are + where you\u2019re from + one question to a friend.\",\n        help:\"Example: Hola. Soy\u2026 Soy de\u2026 \u00bfDe d\u00f3nde eres? Mucho gusto.\",\n        checks:{minChars:70, needMarkers:[\"soy\",\"eres\",\"de donde\",\"soy de\",\"mucho gusto\",\"hola\"], needConnector:false}\n      },\n      quizRule:\"SER is for identity and origin. Use soy\/eres\/es\/somos\/son correctly with subject pronouns.\",\n      quizListen:\"Yo soy\u2026 T\u00fa eres\u2026 \u00c9l es\u2026 Nosotros somos\u2026 \u00bfDe d\u00f3nde eres?\",\n      can:[\n        \"I can use subject pronouns (yo, t\u00fa, \u00e9l\/ella\u2026).\",\n        \"I can use ser to say who I am (Soy\u2026).\",\n        \"I can say where I\u2019m from (Soy de\u2026).\",\n        \"I can ask someone\u2019s origin (\u00bfDe d\u00f3nde eres?).\",\n        \"I can pass the module quiz with 80% or more.\"\n      ]\n    },\n\n    m4: {\n      title:\"Module 4 \u2013 ESTAR (location & condition)\",\n      time:\"Estimated: 60\u201380 min\",\n      desc:\"Estar for location and feelings. Here\/there. Basic classroom phrases.\",\n      learnRule: `\n        <div class=\"tiny\">\n          <b>Rule (English):<\/b><br\/>\n          \u2022 <b>Estar<\/b> = location\/condition: <b>estoy<\/b>, <b>est\u00e1s<\/b>, <b>est\u00e1<\/b>, <b>estamos<\/b>, <b>est\u00e1n<\/b>.<br\/>\n          \u2022 Location: <b>Estoy en casa.<\/b> \/ <b>El libro est\u00e1 aqu\u00ed.<\/b><br\/>\n          \u2022 Feelings: <b>Estoy bien\/cansado\/enfermo.<\/b>\n        <\/div>\n      `,\n      examplesListen:\"Estoy en casa. \u00bfD\u00f3nde est\u00e1s? Estoy bien. Estoy cansado. El ba\u00f1o est\u00e1 all\u00ed.\",\n      visuals:[\n        {h:\"ESTAR forms\", t:\"estoy\/est\u00e1s\/est\u00e1\/estamos\/est\u00e1n\", ex:\"Estoy bien.\", ico:\"chat\"},\n        {h:\"Location\", t:\"en + place \u00b7 aqu\u00ed\/all\u00ed\", ex:\"Est\u00e1 aqu\u00ed.\", ico:\"map\"},\n        {h:\"Condition\", t:\"bien \u00b7 mal \u00b7 cansado\", ex:\"Estoy cansado.\", ico:\"sound\"}\n      ],\n      phrases:[\n        {es:\"\u00bfD\u00f3nde est\u00e1s?\", en:\"Where are you?\"},\n        {es:\"Estoy en casa.\", en:\"I\u2019m at home.\"},\n        {es:\"Estoy bien.\", en:\"I\u2019m fine.\"},\n        {es:\"Estoy mal.\", en:\"I\u2019m not well.\"},\n        {es:\"Estoy cansado\/a.\", en:\"I\u2019m tired.\"},\n        {es:\"El ba\u00f1o est\u00e1 aqu\u00ed\/all\u00ed.\", en:\"The bathroom is here\/there.\"}\n      ],\n      practice:{\n        A:{ type:\"choose\", title:\"Activity A: SER or ESTAR?\", instr:\"Choose the best verb.\",\n          items:[\n            {q:\"Yo ___ en casa.\", options:[\"estoy\",\"soy\"], a:\"estoy\"},\n            {q:\"Ella ___ de Espa\u00f1a.\", options:[\"es\",\"est\u00e1\"], a:\"es\"},\n            {q:\"Nosotros ___ cansados.\", options:[\"estamos\",\"somos\"], a:\"estamos\"},\n            {q:\"T\u00fa ___ estudiante.\", options:[\"eres\",\"est\u00e1s\"], a:\"eres\"}\n          ], pass:3\n        },\n        B:{ type:\"cloze\", title:\"Activity B: Complete with estar\", instr:\"Type the correct form (estoy\/est\u00e1s\/est\u00e1\/estamos\/est\u00e1n).\",\n          items:[\n            {q:\"Yo ____ bien.\", a:\"estoy\"},\n            {q:\"\u00bfT\u00fa ____ en el hotel?\", a:\"est\u00e1s\"},\n            {q:\"El libro ____ aqu\u00ed.\", a:\"est\u00e1\"},\n            {q:\"Nosotros ____ en clase.\", a:\"estamos\"}\n          ], pass:3\n        },\n        C:{ type:\"meaning\", title:\"Activity C: Meaning check\", instr:\"Choose the best English meaning.\",\n          items:[\n            {q:\"\u201cEstoy en casa.\u201d means:\", options:[\"I\u2019m at home.\",\"I\u2019m from home.\"], a:\"I\u2019m at home.\"},\n            {q:\"\u201c\u00bfD\u00f3nde est\u00e1s?\u201d means:\", options:[\"Where are you?\",\"Where are you from?\"], a:\"Where are you?\"}\n          ], pass:2\n        }\n      },\n      writing:{\n        prompt:\"Write 4\u20136 lines: where you are + how you feel + ask someone where they are.\",\n        help:\"Example: Estoy en\u2026 Estoy\u2026 \u00bfD\u00f3nde est\u00e1s? Gracias.\",\n        checks:{minChars:70, needMarkers:[\"estoy\",\"donde estas\",\"en casa\",\"en el\",\"aqui\",\"alli\",\"cansado\",\"bien\",\"mal\"], needConnector:false}\n      },\n      quizRule:\"ESTAR = location\/condition. SER = identity\/origin. Don\u2019t mix them in basic sentences.\",\n      quizListen:\"Estoy en casa. Estoy bien. \u00bfD\u00f3nde est\u00e1s? \u00c9l es de M\u00e9xico. Ella est\u00e1 aqu\u00ed.\",\n      can:[\n        \"I can use estar for location (Estoy en\u2026).\",\n        \"I can use estar for feelings (Estoy bien\/cansado\u2026).\",\n        \"I can ask where someone is (\u00bfD\u00f3nde est\u00e1s?).\",\n        \"I can choose between ser and estar in simple sentences.\",\n        \"I can pass the module quiz with 80% or more.\"\n      ]\n    },\n\n    m5: {\n      title:\"Module 5 \u2013 Survival Tasks + A1 Review\",\n      time:\"Estimated: 70\u201390 min\",\n      desc:\"Real-life mini tasks (caf\u00e9\/shop\/directions) + A1 progress check (mixed).\",\n      learnRule: `\n        <div class=\"tiny\">\n          <b>Rule (English):<\/b><br\/>\n          \u2022 Requests: <b>Quiero\u2026<\/b> (I want), <b>Necesito\u2026<\/b> (I need), <b>\u00bfCu\u00e1nto cuesta?<\/b> (How much?).<br\/>\n          \u2022 Directions: <b>\u00bfD\u00f3nde est\u00e1\u2026?<\/b> \/ <b>Est\u00e1 aqu\u00ed \/ all\u00ed<\/b>.<br\/>\n          \u2022 Review: greetings + ser + estar + polite words.\n        <\/div>\n      `,\n      examplesListen:\"Hola. Quiero un caf\u00e9, por favor. \u00bfCu\u00e1nto cuesta? Gracias. \u00bfD\u00f3nde est\u00e1 el ba\u00f1o? Est\u00e1 all\u00ed.\",\n      visuals:[\n        {h:\"In a caf\u00e9\", t:\"Quiero\u2026 \/ por favor \/ gracias\", ex:\"Quiero un caf\u00e9.\", ico:\"chat\"},\n        {h:\"In a shop\", t:\"Necesito\u2026 \/ \u00bfCu\u00e1nto cuesta?\", ex:\"\u00bfCu\u00e1nto cuesta?\", ico:\"id\"},\n        {h:\"Directions\", t:\"\u00bfD\u00f3nde est\u00e1\u2026? \/ aqu\u00ed\/all\u00ed\", ex:\"\u00bfD\u00f3nde est\u00e1 el ba\u00f1o?\", ico:\"map\"}\n      ],\n      phrases:[\n        {es:\"Quiero un caf\u00e9, por favor.\", en:\"I want a coffee, please.\"},\n        {es:\"Necesito agua.\", en:\"I need water.\"},\n        {es:\"\u00bfCu\u00e1nto cuesta?\", en:\"How much is it?\"},\n        {es:\"\u00bfD\u00f3nde est\u00e1 el ba\u00f1o?\", en:\"Where is the bathroom?\"},\n        {es:\"Est\u00e1 aqu\u00ed \/ Est\u00e1 all\u00ed.\", en:\"It\u2019s here \/ It\u2019s there.\"},\n        {es:\"Gracias. De nada.\", en:\"Thanks. You\u2019re welcome.\"}\n      ],\n      practice:{\n        A:{ type:\"choose\", title:\"Activity A: Choose the survival phrase\", instr:\"Pick the best Spanish option.\",\n          items:[\n            {q:\"I want a coffee \u2192\", options:[\"Quiero un caf\u00e9\",\"Soy un caf\u00e9\"], a:\"Quiero un caf\u00e9\"},\n            {q:\"How much is it? \u2192\", options:[\"\u00bfCu\u00e1nto cuesta?\",\"\u00bfC\u00f3mo est\u00e1s?\"], a:\"\u00bfCu\u00e1nto cuesta?\"},\n            {q:\"Where is the bathroom? \u2192\", options:[\"\u00bfD\u00f3nde est\u00e1 el ba\u00f1o?\",\"\u00bfDe d\u00f3nde eres?\"], a:\"\u00bfD\u00f3nde est\u00e1 el ba\u00f1o?\"},\n            {q:\"I need water \u2192\", options:[\"Necesito agua\",\"Estoy agua\"], a:\"Necesito agua\"}\n          ], pass:3\n        },\n        B:{ type:\"cloze\", title:\"Activity B: Complete the mini-dialogue\", instr:\"Type the missing words.\",\n          items:[\n            {q:\"\u2014 Hola. ____ un caf\u00e9, por favor.\", a:\"quiero\"},\n            {q:\"\u2014 ____ cuesta?\", a:\"cu\u00e1nto\"},\n            {q:\"\u2014 Gracias. \u2014 De ____.\", a:\"nada\"},\n            {q:\"\u2014 \u00bfD\u00f3nde ____ el ba\u00f1o?\", a:\"est\u00e1\"}\n          ], pass:3\n        },\n        C:{ type:\"order\", title:\"Activity C: Order a simple caf\u00e9 dialogue\", instr:\"Type order numbers (1\u20135).\",\n          items:[\"Hola.\",\"Quiero un caf\u00e9, por favor.\",\"\u00bfCu\u00e1nto cuesta?\",\"Gracias.\",\"De nada.\"], pass:4\n        }\n      },\n      writing:{\n        prompt:\"Write 5\u20137 lines: a mini scene in a caf\u00e9 or shop. Include: greeting + request + price question + thanks.\",\n        help:\"Example: Hola. Quiero\u2026 \u00bfCu\u00e1nto cuesta? Gracias. De nada.\",\n        checks:{minChars:80, needMarkers:[\"hola\",\"quiero\",\"necesito\",\"cuanto cuesta\",\"gracias\",\"por favor\",\"donde esta\"], needConnector:false}\n      },\n      quizRule:\"Mixed A1: greetings + polite words + ser\/estar basics + survival phrases (quiero\/necesito\/d\u00f3nde\/cu\u00e1nto).\",\n      quizListen:\"Hola. Me llamo\u2026 Soy de\u2026 Estoy en\u2026 Quiero\u2026 \u00bfCu\u00e1nto cuesta? \u00bfD\u00f3nde est\u00e1\u2026? Gracias.\",\n      can:[\n        \"I can order something politely (Quiero\u2026, por favor).\",\n        \"I can ask the price (\u00bfCu\u00e1nto cuesta?).\",\n        \"I can ask for a location (\u00bfD\u00f3nde est\u00e1\u2026?).\",\n        \"I can use greetings + ser + estar in a short interaction.\",\n        \"I can pass the A1 review quiz with 80% or more.\"\n      ]\n    }\n  };\n\n  \/\/ ===== Big Quiz Bank (100 items) tagged by module: m1..m5 (A1 \u2192 A1+)\n  \/\/ Each module pulls random 10 from its 20 items\n  const QUIZ_BANK = [\n    \/\/ m1 (20)\n    {m:\"m1\", p:\"Good morning \u2192\", opts:[\"Buenos d\u00edas\",\"Buenas noches\"], a:\"Buenos d\u00edas\", r:\"Greeting\"},\n    {m:\"m1\", p:\"Good evening\/night \u2192\", opts:[\"Buenas noches\",\"Buenas tardes\"], a:\"Buenas noches\", r:\"Greeting\"},\n    {m:\"m1\", p:\"Please \u2192\", opts:[\"Por favor\",\"De nada\"], a:\"Por favor\", r:\"Polite word\"},\n    {m:\"m1\", p:\"Thank you \u2192\", opts:[\"Gracias\",\"Perd\u00f3n\"], a:\"Gracias\", r:\"Polite word\"},\n    {m:\"m1\", p:\"You\u2019re welcome \u2192\", opts:[\"De nada\",\"Gracias\"], a:\"De nada\", r:\"Response\"},\n    {m:\"m1\", p:\"Nice to meet you \u2192\", opts:[\"Mucho gusto\",\"No entiendo\"], a:\"Mucho gusto\", r:\"Introductions\"},\n    {m:\"m1\", p:\"My name is\u2026 \u2192\", opts:[\"Me llamo\u2026\",\"Estoy\u2026\"], a:\"Me llamo\u2026\", r:\"Introduce yourself\"},\n    {m:\"m1\", p:\"What\u2019s your name? \u2192\", opts:[\"\u00bfC\u00f3mo te llamas?\",\"\u00bfD\u00f3nde est\u00e1s?\"], a:\"\u00bfC\u00f3mo te llamas?\", r:\"Ask name\"},\n    {m:\"m1\", p:\"How are you? \u2192\", opts:[\"\u00bfC\u00f3mo est\u00e1s?\",\"\u00bfDe d\u00f3nde eres?\"], a:\"\u00bfC\u00f3mo est\u00e1s?\", r:\"Basic question\"},\n    {m:\"m1\", p:\"I\u2019m fine, thanks \u2192\", opts:[\"Estoy bien, gracias\",\"Soy bien, gracias\"], a:\"Estoy bien, gracias\", r:\"Common reply\"},\n    {m:\"m1\", p:\"Sorry \/ excuse me \u2192\", opts:[\"Perd\u00f3n\",\"Buenos d\u00edas\"], a:\"Perd\u00f3n\", r:\"Polite word\"},\n    {m:\"m1\", p:\"Good afternoon \u2192\", opts:[\"Buenas tardes\",\"Buenas noches\"], a:\"Buenas tardes\", r:\"Greeting\"},\n    {m:\"m1\", p:\"Choose: \u201cHola, ____\u201d\", opts:[\"\u00bfc\u00f3mo est\u00e1s?\",\"\u00bfd\u00f3nde est\u00e1?\"], a:\"\u00bfc\u00f3mo est\u00e1s?\", r:\"Common greeting combo\"},\n    {m:\"m1\", p:\"Choose a polite closing:\", opts:[\"Gracias\",\"Eres\"], a:\"Gracias\", r:\"Polite\"},\n    {m:\"m1\", p:\"\u201cMucho gusto\u201d is used when\u2026\", opts:[\"meeting someone\",\"asking the price\"], a:\"meeting someone\", r:\"Context\"},\n    {m:\"m1\", p:\"Fill: Me ____ Ana.\", opts:[\"llamo\",\"llamas\"], a:\"llamo\", r:\"Me llamo = I\u2019m called\"},\n    {m:\"m1\", p:\"Fill: \u00bfC\u00f3mo te ____?\", opts:[\"llamas\",\"llamo\"], a:\"llamas\", r:\"t\u00fa form\"},\n    {m:\"m1\", p:\"Choose: \u201cDe nada\u201d \u2192\", opts:[\"You\u2019re welcome\",\"Goodbye\"], a:\"You\u2019re welcome\", r:\"Meaning\"},\n    {m:\"m1\", p:\"Choose: \u201cPor favor\u201d \u2192\", opts:[\"Please\",\"Thanks\"], a:\"Please\", r:\"Meaning\"},\n    {m:\"m1\", p:\"Choose: \u201cLo siento\u201d \u2192\", opts:[\"I\u2019m sorry\",\"I\u2019m from\"], a:\"I\u2019m sorry\", r:\"Meaning\"},\n\n    \/\/ m2 (20)\n    {m:\"m2\", p:\"How do you spell it? \u2192\", opts:[\"\u00bfC\u00f3mo se escribe?\",\"\u00bfC\u00f3mo est\u00e1s?\"], a:\"\u00bfC\u00f3mo se escribe?\", r:\"Spelling question\"},\n    {m:\"m2\", p:\"It\u2019s spelled\u2026 \u2192\", opts:[\"Se escribe\u2026\",\"Soy de\u2026\"], a:\"Se escribe\u2026\", r:\"Spelling answer\"},\n    {m:\"m2\", p:\"Repeat, please \u2192\", opts:[\"\u00bfPuedes repetir, por favor?\",\"\u00bfDe d\u00f3nde eres?\"], a:\"\u00bfPuedes repetir, por favor?\", r:\"Request\"},\n    {m:\"m2\", p:\"More slowly, please \u2192\", opts:[\"M\u00e1s despacio, por favor.\",\"Muchas gracias.\"], a:\"M\u00e1s despacio, por favor.\", r:\"Request\"},\n    {m:\"m2\", p:\"I don\u2019t understand \u2192\", opts:[\"No entiendo.\",\"No soy.\"], a:\"No entiendo.\", r:\"Comprehension\"},\n    {m:\"m2\", p:\"Spell: A-N-A \u2192\", opts:[\"Se escribe A-N-A.\",\"Soy A-N-A.\"], a:\"Se escribe A-N-A.\", r:\"Spelling\"},\n    {m:\"m2\", p:\"Fill: Se escribe J-U-_-N.\", opts:[\"a\",\"e\"], a:\"a\", r:\"Common name\"},\n    {m:\"m2\", p:\"Fill: Se escribe L-U-_-S.\", opts:[\"i\",\"o\"], a:\"i\", r:\"Common name\"},\n    {m:\"m2\", p:\"Fill: Se escribe M-A-R-_-A.\", opts:[\"i\",\"u\"], a:\"i\", r:\"Mar\u00eda\"},\n    {m:\"m2\", p:\"Choose: \u201c\u00bfPuedes repetir?\u201d \u2192\", opts:[\"request\",\"greeting\"], a:\"request\", r:\"Function\"},\n    {m:\"m2\", p:\"Choose the correct pair:\", opts:[\"\u00bfC\u00f3mo se escribe? \/ Se escribe\u2026\",\"\u00bfD\u00f3nde est\u00e1s? \/ Soy de\u2026\"], a:\"\u00bfC\u00f3mo se escribe? \/ Se escribe\u2026\", r:\"Spelling pair\"},\n    {m:\"m2\", p:\"Meaning: \u201cM\u00e1s despacio\u201d \u2192\", opts:[\"More slowly\",\"More expensive\"], a:\"More slowly\", r:\"Meaning\"},\n    {m:\"m2\", p:\"Meaning: \u201cSe escribe\u201d \u2192\", opts:[\"It\u2019s spelled\",\"I\u2019m writing\"], a:\"It\u2019s spelled\", r:\"Meaning\"},\n    {m:\"m2\", p:\"Meaning: \u201c\u00bfC\u00f3mo se escribe?\u201d \u2192\", opts:[\"How do you spell it?\",\"How are you?\"], a:\"How do you spell it?\", r:\"Meaning\"},\n    {m:\"m2\", p:\"Choose polite add-on:\", opts:[\"por favor\",\"porque\"], a:\"por favor\", r:\"Politeness\"},\n    {m:\"m2\", p:\"In class: \u201cNo entiendo\u201d + \u2026\", opts:[\"por favor\",\"de\"], a:\"por favor\", r:\"Natural polite\"},\n    {m:\"m2\", p:\"Spell prompt: \u201cMi nombre es Ana. Se escribe\u2026\u201d\", opts:[\"A-N-A\",\"Yo-soy\"], a:\"A-N-A\", r:\"Spelling\"},\n    {m:\"m2\", p:\"Choose: \u201c\u00bfPuedes repetir, ____?\u201d\", opts:[\"por favor\",\"de nada\"], a:\"por favor\", r:\"Polite\"},\n    {m:\"m2\", p:\"Choose: \u201cGracias\u201d + reply \u2192\", opts:[\"De nada\",\"Perd\u00f3n\"], a:\"De nada\", r:\"Basic exchange\"},\n    {m:\"m2\", p:\"Choose the best for asking clarification:\", opts:[\"No entiendo\",\"Soy de\"], a:\"No entiendo\", r:\"Comprehension\"},\n\n    \/\/ m3 (20)\n    {m:\"m3\", p:\"Yo ___ de Chile.\", opts:[\"soy\",\"eres\"], a:\"soy\", r:\"Ser (yo)\"},\n    {m:\"m3\", p:\"T\u00fa ___ estudiante.\", opts:[\"eres\",\"es\"], a:\"eres\", r:\"Ser (t\u00fa)\"},\n    {m:\"m3\", p:\"\u00c9l ___ profesor.\", opts:[\"es\",\"soy\"], a:\"es\", r:\"Ser (\u00e9l)\"},\n    {m:\"m3\", p:\"Nosotros ___ de Per\u00fa.\", opts:[\"somos\",\"son\"], a:\"somos\", r:\"Ser (nosotros)\"},\n    {m:\"m3\", p:\"Ustedes ___ de Canad\u00e1.\", opts:[\"son\",\"somos\"], a:\"son\", r:\"Ser (ustedes)\"},\n    {m:\"m3\", p:\"Where are you from? \u2192\", opts:[\"\u00bfDe d\u00f3nde eres?\",\"\u00bfD\u00f3nde est\u00e1s?\"], a:\"\u00bfDe d\u00f3nde eres?\", r:\"Origin question\"},\n    {m:\"m3\", p:\"I\u2019m from Mexico \u2192\", opts:[\"Soy de M\u00e9xico.\",\"Estoy en M\u00e9xico.\"], a:\"Soy de M\u00e9xico.\", r:\"Origin uses ser\"},\n    {m:\"m3\", p:\"Fill: \u00bfDe d\u00f3nde ____?\", opts:[\"eres\",\"est\u00e1s\"], a:\"eres\", r:\"Origin question\"},\n    {m:\"m3\", p:\"Fill: Yo ____ Juan.\", opts:[\"soy\",\"estoy\"], a:\"soy\", r:\"Identity uses ser\"},\n    {m:\"m3\", p:\"Choose: \u201cSoy estudiante\u201d \u2192\", opts:[\"I am a student\",\"I am at school\"], a:\"I am a student\", r:\"Meaning\"},\n    {m:\"m3\", p:\"Choose pronoun: ___ eres Ana. (you)\", opts:[\"T\u00fa\",\"Yo\"], a:\"T\u00fa\", r:\"Subject pronoun\"},\n    {m:\"m3\", p:\"Choose: Ella ___ de Espa\u00f1a.\", opts:[\"es\",\"est\u00e1\"], a:\"es\", r:\"Origin uses ser\"},\n    {m:\"m3\", p:\"Choose: \u201cNosotros somos\u2026\u201d \u2192\", opts:[\"we are\",\"they are\"], a:\"we are\", r:\"Meaning\"},\n    {m:\"m3\", p:\"Choose: \u201cUstedes son\u2026\u201d \u2192\", opts:[\"you (plural) are\",\"I am\"], a:\"you (plural) are\", r:\"Meaning\"},\n    {m:\"m3\", p:\"Choose: \u201c\u00bfDe d\u00f3nde eres?\u201d expects answer:\", opts:[\"Soy de\u2026\",\"Estoy en\u2026\"], a:\"Soy de\u2026\", r:\"Appropriate reply\"},\n    {m:\"m3\", p:\"Choose: \u201cSoy ____.\u201d (identity)\", opts:[\"profesor\",\"aqu\u00ed\"], a:\"profesor\", r:\"Identity\"},\n    {m:\"m3\", p:\"Choose: \u201cEres ____.\u201d (you are)\", opts:[\"estudiante\",\"en casa\"], a:\"estudiante\", r:\"Identity\"},\n    {m:\"m3\", p:\"Choose: \u201cSomos ____.\u201d\", opts:[\"amigos\",\"aqu\u00ed\"], a:\"amigos\", r:\"Ser + noun\"},\n    {m:\"m3\", p:\"Choose: \u201cSon ____.\u201d\", opts:[\"de Chile\",\"en Chile\"], a:\"de Chile\", r:\"Origin\"},\n    {m:\"m3\", p:\"Choose: ser form for \u201c\u00e9l\u201d\", opts:[\"es\",\"eres\"], a:\"es\", r:\"Conjugation\"},\n\n    \/\/ m4 (20)\n    {m:\"m4\", p:\"Yo ___ en casa.\", opts:[\"estoy\",\"soy\"], a:\"estoy\", r:\"Estar location\"},\n    {m:\"m4\", p:\"T\u00fa ___ bien.\", opts:[\"est\u00e1s\",\"eres\"], a:\"est\u00e1s\", r:\"Estar condition\"},\n    {m:\"m4\", p:\"Ella ___ de M\u00e9xico.\", opts:[\"es\",\"est\u00e1\"], a:\"es\", r:\"Origin uses ser\"},\n    {m:\"m4\", p:\"Nosotros ___ cansados.\", opts:[\"estamos\",\"somos\"], a:\"estamos\", r:\"Estar + feeling\"},\n    {m:\"m4\", p:\"El libro ___ aqu\u00ed.\", opts:[\"est\u00e1\",\"es\"], a:\"est\u00e1\", r:\"Estar location\"},\n    {m:\"m4\", p:\"Where are you? \u2192\", opts:[\"\u00bfD\u00f3nde est\u00e1s?\",\"\u00bfDe d\u00f3nde eres?\"], a:\"\u00bfD\u00f3nde est\u00e1s?\", r:\"Location question\"},\n    {m:\"m4\", p:\"I\u2019m at the hotel \u2192\", opts:[\"Estoy en el hotel.\",\"Soy del hotel.\"], a:\"Estoy en el hotel.\", r:\"Estar + place\"},\n    {m:\"m4\", p:\"I\u2019m tired \u2192\", opts:[\"Estoy cansado\/a.\",\"Soy cansado\/a.\"], a:\"Estoy cansado\/a.\", r:\"Feelings use estar\"},\n    {m:\"m4\", p:\"Fill: Yo ____ bien.\", opts:[\"estoy\",\"soy\"], a:\"estoy\", r:\"Condition\"},\n    {m:\"m4\", p:\"Fill: El ba\u00f1o ____ all\u00ed.\", opts:[\"est\u00e1\",\"es\"], a:\"est\u00e1\", r:\"Location\"},\n    {m:\"m4\", p:\"Choose: \u201cEstoy mal\u201d \u2192\", opts:[\"I\u2019m not well\",\"I\u2019m from\u2026\"], a:\"I\u2019m not well\", r:\"Meaning\"},\n    {m:\"m4\", p:\"Choose: \u201cEst\u00e1 aqu\u00ed\u201d \u2192\", opts:[\"It\u2019s here\",\"It\u2019s from here\"], a:\"It\u2019s here\", r:\"Meaning\"},\n    {m:\"m4\", p:\"Choose: SER or ESTAR: \u201cYo ____ de Chile.\u201d\", opts:[\"soy\",\"estoy\"], a:\"soy\", r:\"Origin\"},\n    {m:\"m4\", p:\"Choose: SER or ESTAR: \u201cYo ____ en casa.\u201d\", opts:[\"estoy\",\"soy\"], a:\"estoy\", r:\"Location\"},\n    {m:\"m4\", p:\"Choose: \u201c\u00bfD\u00f3nde est\u00e1s?\u201d expects answer:\", opts:[\"Estoy en\u2026\",\"Soy de\u2026\"], a:\"Estoy en\u2026\", r:\"Reply\"},\n    {m:\"m4\", p:\"Choose: \u201c\u00bfDe d\u00f3nde eres?\u201d expects answer:\", opts:[\"Soy de\u2026\",\"Estoy en\u2026\"], a:\"Soy de\u2026\", r:\"Reply\"},\n    {m:\"m4\", p:\"Choose: \u201cEstamos en clase\u201d \u2192\", opts:[\"We are in class\",\"We are class\"], a:\"We are in class\", r:\"Meaning\"},\n    {m:\"m4\", p:\"Choose: conjugation for \u201ct\u00fa\u201d (estar)\", opts:[\"est\u00e1s\",\"estoy\"], a:\"est\u00e1s\", r:\"Conjugation\"},\n    {m:\"m4\", p:\"Choose: conjugation for \u201cnosotros\u201d (estar)\", opts:[\"estamos\",\"est\u00e1n\"], a:\"estamos\", r:\"Conjugation\"},\n    {m:\"m4\", p:\"Choose: Ella ___ aqu\u00ed.\", opts:[\"est\u00e1\",\"es\"], a:\"est\u00e1\", r:\"Location\"},\n\n    \/\/ m5 (20)\n    {m:\"m5\", p:\"I want a coffee \u2192\", opts:[\"Quiero un caf\u00e9\",\"Soy un caf\u00e9\"], a:\"Quiero un caf\u00e9\", r:\"Request\"},\n    {m:\"m5\", p:\"I need water \u2192\", opts:[\"Necesito agua\",\"Estoy agua\"], a:\"Necesito agua\", r:\"Need\"},\n    {m:\"m5\", p:\"How much is it? \u2192\", opts:[\"\u00bfCu\u00e1nto cuesta?\",\"\u00bfC\u00f3mo se escribe?\"], a:\"\u00bfCu\u00e1nto cuesta?\", r:\"Price question\"},\n    {m:\"m5\", p:\"Where is the bathroom? \u2192\", opts:[\"\u00bfD\u00f3nde est\u00e1 el ba\u00f1o?\",\"\u00bfDe d\u00f3nde eres?\"], a:\"\u00bfD\u00f3nde est\u00e1 el ba\u00f1o?\", r:\"Directions\"},\n    {m:\"m5\", p:\"It\u2019s here \u2192\", opts:[\"Est\u00e1 aqu\u00ed\",\"Es aqu\u00ed\"], a:\"Est\u00e1 aqu\u00ed\", r:\"Location uses estar\"},\n    {m:\"m5\", p:\"It\u2019s there \u2192\", opts:[\"Est\u00e1 all\u00ed\",\"Soy all\u00ed\"], a:\"Est\u00e1 all\u00ed\", r:\"Location\"},\n    {m:\"m5\", p:\"Add politeness: Quiero un caf\u00e9, ____.\", opts:[\"por favor\",\"porque\"], a:\"por favor\", r:\"Polite\"},\n    {m:\"m5\", p:\"Basic shop: \u201c\u00bfCu\u00e1nto cuesta?\u201d expects:\", opts:[\"a price\",\"a name\"], a:\"a price\", r:\"Function\"},\n    {m:\"m5\", p:\"Choose: \u201cNecesito\u2026\u201d is used for:\", opts:[\"needs\",\"greetings\"], a:\"needs\", r:\"Function\"},\n    {m:\"m5\", p:\"Fill: \u00bfD\u00f3nde ____ el ba\u00f1o?\", opts:[\"est\u00e1\",\"es\"], a:\"est\u00e1\", r:\"Location verb\"},\n    {m:\"m5\", p:\"Fill: ____ un caf\u00e9, por favor.\", opts:[\"Quiero\",\"Soy\"], a:\"Quiero\", r:\"Request\"},\n    {m:\"m5\", p:\"Fill: \u00bf____ cuesta?\", opts:[\"Cu\u00e1nto\",\"D\u00f3nde\"], a:\"Cu\u00e1nto\", r:\"Price question\"},\n    {m:\"m5\", p:\"Choose: \u201cGracias\u201d reply \u2192\", opts:[\"De nada\",\"Hola\"], a:\"De nada\", r:\"Polite exchange\"},\n    {m:\"m5\", p:\"Choose: A1 review: \u201cSoy de\u2026\u201d means:\", opts:[\"I\u2019m from\u2026\",\"I\u2019m in\u2026\"], a:\"I\u2019m from\u2026\", r:\"Ser origin\"},\n    {m:\"m5\", p:\"Choose: A1 review: \u201cEstoy en\u2026\u201d means:\", opts:[\"I\u2019m in\/at\u2026\",\"I\u2019m from\u2026\"], a:\"I\u2019m in\/at\u2026\", r:\"Estar location\"},\n    {m:\"m5\", p:\"Choose best mini-scene start:\", opts:[\"Hola.\",\"Porque.\"], a:\"Hola.\", r:\"Greeting\"},\n    {m:\"m5\", p:\"Choose: \u201c\u00bfD\u00f3nde est\u00e1\u2026?\u201d means:\", opts:[\"Where is\u2026?\",\"Where are you from?\"], a:\"Where is\u2026?\", r:\"Meaning\"},\n    {m:\"m5\", p:\"Choose: \u201c\u00bfCu\u00e1nto cuesta?\u201d means:\", opts:[\"How much is it?\",\"How are you?\"], a:\"How much is it?\", r:\"Meaning\"},\n    {m:\"m5\", p:\"Choose: \u201cNecesito ayuda\u201d means:\", opts:[\"I need help\",\"I am help\"], a:\"I need help\", r:\"Meaning\"},\n    {m:\"m5\", p:\"Choose correct: \u201cEst\u00e1 aqu\u00ed\u201d uses:\", opts:[\"estar\",\"ser\"], a:\"estar\", r:\"Grammar\"}\n  ];\n\n  \/\/ ===== UI hooks\n  const moduleSelect = document.getElementById(\"moduleSelect\");\n  const moduleTitle = document.getElementById(\"moduleTitle\");\n  const moduleDesc = document.getElementById(\"moduleDesc\");\n  const moduleTime = document.getElementById(\"moduleTime\");\n\n  const tabs = document.getElementById(\"tabs\");\n  const panels = {\n    learn: document.getElementById(\"panel-learn\"),\n    practice: document.getElementById(\"panel-practice\"),\n    assess: document.getElementById(\"panel-assess\"),\n    progress: document.getElementById(\"panel-progress\")\n  };\n\n  tabs.addEventListener(\"click\", (e) => {\n    const t = e.target.closest(\".tab\");\n    if(!t) return;\n    const key = t.getAttribute(\"data-tab\");\n    document.querySelectorAll(\".tab\").forEach(x => x.classList.remove(\"active\"));\n    t.classList.add(\"active\");\n    Object.keys(panels).forEach(k => panels[k].style.display = (k === key ? \"block\" : \"none\"));\n    window.scrollTo({top:0, behavior:\"smooth\"});\n  });\n\n  \/\/ Learn\n  const btnShowRule = document.getElementById(\"btnShowRule\");\n  const learnRuleBox = document.getElementById(\"learnRuleBox\");\n  const btnListenExamples = document.getElementById(\"btnListenExamples\");\n  const btnListenPhrases = document.getElementById(\"btnListenPhrases\");\n  const learnVisuals = document.getElementById(\"learnVisuals\");\n  const phraseList = document.getElementById(\"phraseList\");\n\n  \/\/ Practice containers\n  const practiceA = document.getElementById(\"practiceA\");\n  const practiceB = document.getElementById(\"practiceB\");\n  const practiceC = document.getElementById(\"practiceC\");\n  const btnResetPractice = document.getElementById(\"btnResetPractice\");\n\n  \/\/ Assess\n  const writingTask = document.getElementById(\"writingTask\");\n  const btnCheckAssess = document.getElementById(\"btnCheckAssess\");\n  const btnRetryIncorrect = document.getElementById(\"btnRetryIncorrect\");\n  const btnNewQuiz = document.getElementById(\"btnNewQuiz\");\n  const btnResetAssess = document.getElementById(\"btnResetAssess\");\n\n  const btnShowQuizRule = document.getElementById(\"btnShowQuizRule\");\n  const quizRuleBox = document.getElementById(\"quizRuleBox\");\n  const btnListenQuizHint = document.getElementById(\"btnListenQuizHint\");\n\n  const quizEl = document.getElementById(\"quiz\");\n  const aScoreEl = document.getElementById(\"aScore\");\n  const aMaxEl = document.getElementById(\"aMax\");\n  const aMsgEl = document.getElementById(\"aMsg\");\n  const streakEl = document.getElementById(\"streak\");\n  const bestStreakEl = document.getElementById(\"bestStreak\");\n  const avgEl = document.getElementById(\"avg\");\n  const attemptsEl = document.getElementById(\"attempts\");\n\n  \/\/ Progress\n  const canList = document.getElementById(\"canList\");\n  const btnSaveChecklist = document.getElementById(\"btnSaveChecklist\");\n  const btnResetChecklist = document.getElementById(\"btnResetChecklist\");\n  const checkMsg = document.getElementById(\"checkMsg\");\n  const nextStep = document.getElementById(\"nextStep\");\n\n  \/\/ ===== State\n  let currentKey = \"m1\";\n\n  function doneKey(){ return `pl_a1_${currentKey}_done`; }\n  function checklistKey(){ return `pl_a1_${currentKey}_checklist`; }\n  function statsKey(){ return `pl_a1_${currentKey}_stats`; }\n\n  function loadDone(){\n    try{ return JSON.parse(localStorage.getItem(doneKey()) || \"{}\"); }\n    catch(e){ return {}; }\n  }\n  function saveDone(obj){ localStorage.setItem(doneKey(), JSON.stringify(obj)); }\n  function markDone(section, ok){\n    const d = loadDone();\n    d[section] = !!ok;\n    saveDone(d);\n  }\n\n  \/\/ ===== Stats\n  let QUIZ_SIZE = 10;\n  let CURRENT_QUIZ = [];\n  let LAST = [];\n  let streak = 0, bestStreak = 0, attempts = 0, totalScore = 0;\n\n  function loadStats(){\n    try{\n      const s = JSON.parse(localStorage.getItem(statsKey()) || \"{}\");\n      streak = s.streak || 0;\n      bestStreak = s.bestStreak || 0;\n      attempts = s.attempts || 0;\n      totalScore = s.totalScore || 0;\n    }catch(e){}\n  }\n  function saveStats(){\n    localStorage.setItem(statsKey(), JSON.stringify({streak, bestStreak, attempts, totalScore}));\n  }\n  function updateStatsUI(){\n    streakEl.textContent = String(streak);\n    bestStreakEl.textContent = String(bestStreak);\n    attemptsEl.textContent = String(attempts);\n    avgEl.textContent = attempts ? (totalScore\/attempts).toFixed(1) + \"\/10\" : \"\u2014\";\n  }\n\n  \/\/ ===== Render: Learn\n  function renderLearn(m){\n    learnRuleBox.innerHTML = m.learnRule;\n    learnRuleBox.classList.remove(\"show\");\n    btnShowRule.textContent = \"Show rule\";\n\n    btnListenExamples.onclick = ()=> speakES(m.examplesListen);\n    btnListenPhrases.onclick = ()=> speakES(m.phrases.map(p=>p.es).join(\" \"));\n\n    learnVisuals.innerHTML = m.visuals.map(v=>`\n      <div class=\"visual\">\n        <div class=\"ico\" aria-hidden=\"true\">${iconSvg(v.ico)}<\/div>\n        <div>\n          <h4>${v.h}<\/h4>\n          <p class=\"tiny\">${v.t}<\/p>\n          <p class=\"tiny\"><b>${v.ex}<\/b><\/p>\n        <\/div>\n      <\/div>\n    `).join(\"\");\n\n    phraseList.innerHTML = m.phrases.map(p => `<li><b>${p.es}<\/b> <span class=\"tiny\">(${p.en})<\/span><\/li>`).join(\"\");\n  }\n  btnShowRule.addEventListener(\"click\", ()=>{\n    const showing = learnRuleBox.classList.contains(\"show\");\n    learnRuleBox.classList.toggle(\"show\", !showing);\n    btnShowRule.textContent = showing ? \"Show rule\" : \"Hide rule\";\n  });\n\n  \/\/ ===== Practice builders\n  function buildChoose(container, cfg, doneId){\n    container.innerHTML = `\n      <div class=\"qhead\">\n        <div>\n          <b>${cfg.title}<\/b>\n          <div class=\"tiny\">Instruction (EN): ${cfg.instr}<\/div>\n        <\/div>\n        <div class=\"btns\">\n          <button type=\"button\" class=\"ghost\" data-showrule>Show rule<\/button>\n          <button type=\"button\" data-check>Check<\/button>\n          <button type=\"button\" class=\"ghost\" data-reset>Reset<\/button>\n        <\/div>\n      <\/div>\n      <div class=\"rulebox\" data-rulebox><div class=\"tiny\"><b>Rule (English):<\/b> Use the Learn rules as support.<\/div><\/div>\n      <div data-items><\/div>\n      <div class=\"feedback\" data-fb><\/div>\n    `;\n    const ruleBtn = container.querySelector(\"[data-showrule]\");\n    const ruleBox = container.querySelector(\"[data-rulebox]\");\n    ruleBtn.addEventListener(\"click\", ()=>{\n      const showing = ruleBox.classList.contains(\"show\");\n      ruleBox.classList.toggle(\"show\", !showing);\n      ruleBtn.textContent = showing ? \"Show rule\" : \"Hide rule\";\n    });\n\n    const itemsEl = container.querySelector(\"[data-items]\");\n    itemsEl.innerHTML = cfg.items.map((it, idx)=>`\n      <div style=\"margin-top:10px;\">\n        <div class=\"tiny\">${idx+1}) ${it.q}<\/div>\n        <select data-idx=\"${idx}\">\n          <option value=\"\">Choose\u2026<\/option>\n          ${it.options.map(o=>`<option>${o}<\/option>`).join(\"\")}\n        <\/select>\n        <div class=\"feedback\" id=\"${doneId}-fb-${idx}\"><\/div>\n      <\/div>\n    `).join(\"\");\n\n    const fb = container.querySelector(\"[data-fb]\");\n    container.querySelector(\"[data-check]\").addEventListener(\"click\", ()=>{\n      let score = 0;\n      cfg.items.forEach((it, idx)=>{\n        const sel = container.querySelector(`select[data-idx=\"${idx}\"]`);\n        const v = normalize(sel.value);\n        const a = normalize(it.a);\n        const f = document.getElementById(`${doneId}-fb-${idx}`);\n        if(!v){ f.className=\"feedback warn\"; f.textContent=\"Incomplete.\"; return; }\n        if(v===a){ f.className=\"feedback ok\"; f.textContent=\"Correct \u2705\"; score++; }\n        else { f.className=\"feedback bad\"; f.innerHTML=`Not correct \u274c Suggested: <b>${it.a}<\/b>`; }\n      });\n      const pass = score >= cfg.pass;\n      fb.className = pass ? \"feedback ok\" : \"feedback warn\";\n      fb.textContent = pass ? `Great \u2705 ${score}\/${cfg.items.length} correct.` : `You got ${score}\/${cfg.items.length}. Use Show rule and retry.`;\n      markDone(doneId, pass);\n      updateNextStep();\n    });\n\n    container.querySelector(\"[data-reset]\").addEventListener(\"click\", ()=>{\n      cfg.items.forEach((it, idx)=>{\n        const sel = container.querySelector(`select[data-idx=\"${idx}\"]`);\n        sel.value = \"\";\n        const f = document.getElementById(`${doneId}-fb-${idx}`);\n        f.textContent=\"\"; f.className=\"feedback\";\n      });\n      fb.textContent=\"\"; fb.className=\"feedback\";\n      markDone(doneId, false);\n      updateNextStep();\n    });\n  }\n\n  function buildCloze(container, cfg, doneId){\n    container.innerHTML = `\n      <div class=\"qhead\">\n        <div>\n          <b>${cfg.title}<\/b>\n          <div class=\"tiny\">Instruction (EN): ${cfg.instr}<\/div>\n        <\/div>\n        <div class=\"btns\">\n          <button type=\"button\" class=\"ghost\" data-showrule>Show rule<\/button>\n          <button type=\"button\" data-check>Check<\/button>\n          <button type=\"button\" class=\"ghost\" data-reset>Reset<\/button>\n        <\/div>\n      <\/div>\n      <div class=\"rulebox\" data-rulebox><div class=\"tiny\"><b>Rule (English):<\/b> Accents are optional (A1). Meaning matters.<\/div><\/div>\n      <div data-items><\/div>\n      <div class=\"feedback\" data-fb><\/div>\n    `;\n    const ruleBtn = container.querySelector(\"[data-showrule]\");\n    const ruleBox = container.querySelector(\"[data-rulebox]\");\n    ruleBtn.addEventListener(\"click\", ()=>{\n      const showing = ruleBox.classList.contains(\"show\");\n      ruleBox.classList.toggle(\"show\", !showing);\n      ruleBtn.textContent = showing ? \"Show rule\" : \"Hide rule\";\n    });\n\n    const itemsEl = container.querySelector(\"[data-items]\");\n    itemsEl.innerHTML = cfg.items.map((it, idx)=>`\n      <div style=\"margin-top:10px;\">\n        <div class=\"tiny\">${idx+1}) ${it.q}<\/div>\n        <input type=\"text\" data-idx=\"${idx}\" placeholder=\"Type your answer\u2026\">\n        <div class=\"feedback\" id=\"${doneId}-fb-${idx}\"><\/div>\n      <\/div>\n    `).join(\"\");\n\n    const fb = container.querySelector(\"[data-fb]\");\n    container.querySelector(\"[data-check]\").addEventListener(\"click\", ()=>{\n      let score = 0;\n      cfg.items.forEach((it, idx)=>{\n        const inp = container.querySelector(`input[data-idx=\"${idx}\"]`);\n        const v = normalize(inp.value);\n        const a = normalize(it.a);\n        const f = document.getElementById(`${doneId}-fb-${idx}`);\n        if(!v){ f.className=\"feedback warn\"; f.textContent=\"Incomplete.\"; return; }\n        if(v===a){ f.className=\"feedback ok\"; f.textContent=\"Correct \u2705\"; score++; }\n        else { f.className=\"feedback bad\"; f.innerHTML=`Not correct \u274c Suggested: <b>${it.a}<\/b>`; }\n      });\n      const pass = score >= cfg.pass;\n      fb.className = pass ? \"feedback ok\" : \"feedback warn\";\n      fb.textContent = pass ? `Great \u2705 ${score}\/${cfg.items.length} correct.` : `You got ${score}\/${cfg.items.length}. Review and retry.`;\n      markDone(doneId, pass);\n      updateNextStep();\n    });\n\n    container.querySelector(\"[data-reset]\").addEventListener(\"click\", ()=>{\n      cfg.items.forEach((it, idx)=>{\n        const inp = container.querySelector(`input[data-idx=\"${idx}\"]`);\n        inp.value = \"\";\n        const f = document.getElementById(`${doneId}-fb-${idx}`);\n        f.textContent=\"\"; f.className=\"feedback\";\n      });\n      fb.textContent=\"\"; fb.className=\"feedback\";\n      markDone(doneId, false);\n      updateNextStep();\n    });\n  }\n\n  function buildOrder(container, cfg, doneId){\n    const target = cfg.items.slice();\n    container.innerHTML = `\n      <div class=\"qhead\">\n        <div>\n          <b>${cfg.title}<\/b>\n          <div class=\"tiny\">Instruction (EN): ${cfg.instr}<\/div>\n        <\/div>\n        <div class=\"btns\">\n          <button type=\"button\" data-check>Check<\/button>\n          <button type=\"button\" class=\"ghost\" data-reset>Reset<\/button>\n        <\/div>\n      <\/div>\n      <div class=\"tiny\" style=\"margin-top:10px;\">Type the order number (1,2,3\u2026) next to each item.<\/div>\n      <div data-items><\/div>\n      <div class=\"feedback\" data-fb><\/div>\n    `;\n    const itemsEl = container.querySelector(\"[data-items]\");\n    const shuffledItems = shuffle(target);\n    itemsEl.innerHTML = shuffledItems.map((txt, idx)=>`\n      <div style=\"display:flex; gap:10px; align-items:center; margin-top:10px;\">\n        <div style=\"flex:1;\" class=\"muted\">${txt}<\/div>\n        <input type=\"text\" inputmode=\"numeric\" pattern=\"[0-9]*\" data-idx=\"${idx}\" placeholder=\"1\" style=\"max-width:90px;\">\n      <\/div>\n      <div class=\"feedback\" id=\"${doneId}-fb-${idx}\"><\/div>\n    `).join(\"\");\n\n    const fb = container.querySelector(\"[data-fb]\");\n    container.querySelector(\"[data-check]\").addEventListener(\"click\", ()=>{\n      let score = 0;\n      shuffledItems.forEach((txt, idx)=>{\n        const inp = itemsEl.querySelector(`input[data-idx=\"${idx}\"]`);\n        const v = (inp.value || \"\").trim();\n        const correctPos = target.indexOf(txt) + 1;\n        const f = document.getElementById(`${doneId}-fb-${idx}`);\n        if(!v){ f.className=\"feedback warn\"; f.textContent=\"Incomplete.\"; return; }\n        if(Number(v) === correctPos){ f.className=\"feedback ok\"; f.textContent=\"Correct \u2705\"; score++; }\n        else { f.className=\"feedback bad\"; f.innerHTML=`Not correct \u274c Suggested: <b>${correctPos}<\/b>`; }\n      });\n      const pass = score >= cfg.pass;\n      fb.className = pass ? \"feedback ok\" : \"feedback warn\";\n      fb.textContent = pass ? `Great \u2705 ${score}\/${shuffledItems.length} correct.` : `You got ${score}\/${shuffledItems.length}. Retry.`;\n      markDone(doneId, pass);\n      updateNextStep();\n    });\n\n    container.querySelector(\"[data-reset]\").addEventListener(\"click\", ()=>{\n      shuffledItems.forEach((txt, idx)=>{\n        const inp = itemsEl.querySelector(`input[data-idx=\"${idx}\"]`);\n        inp.value = \"\";\n        const f = document.getElementById(`${doneId}-fb-${idx}`);\n        f.textContent=\"\"; f.className=\"feedback\";\n      });\n      fb.textContent=\"\"; fb.className=\"feedback\";\n      markDone(doneId, false);\n      updateNextStep();\n    });\n  }\n\n  \/\/ For \"meaning\" we reuse choose\n  function buildMeaning(container, cfg, doneId){ buildChoose(container, cfg, doneId); }\n\n  function renderPractice(m){\n    const A = m.practice.A, B = m.practice.B, C = m.practice.C;\n    (A.type===\"choose\") ? buildChoose(practiceA, A, \"practiceA\")\n      : (A.type===\"cloze\") ? buildCloze(practiceA, A, \"practiceA\")\n      : buildOrder(practiceA, A, \"practiceA\");\n\n    (B.type===\"choose\") ? buildChoose(practiceB, B, \"practiceB\")\n      : (B.type===\"cloze\") ? buildCloze(practiceB, B, \"practiceB\")\n      : buildOrder(practiceB, B, \"practiceB\");\n\n    (C.type===\"meaning\") ? buildMeaning(practiceC, C, \"practiceC\")\n      : (C.type===\"choose\") ? buildChoose(practiceC, C, \"practiceC\")\n      : (C.type===\"cloze\") ? buildCloze(practiceC, C, \"practiceC\")\n      : buildOrder(practiceC, C, \"practiceC\");\n  }\n\n  btnResetPractice.addEventListener(\"click\", ()=>{\n    const d = loadDone();\n    d.practiceA = false; d.practiceB = false; d.practiceC = false;\n    saveDone(d);\n    renderPractice(MODULES[currentKey]);\n    updateNextStep();\n    alert(\"Practice reset \u2705\");\n  });\n\n  \/\/ ===== Writing task\n  function buildWriting(container, cfg){\n    container.innerHTML = `\n      <div class=\"qhead\">\n        <div>\n          <b>Writing task (Spanish)<\/b>\n          <div class=\"tiny\">Instruction (EN): ${cfg.prompt}<\/div>\n        <\/div>\n        <div class=\"btns\">\n          <button class=\"ghost\" type=\"button\" data-help>Show help<\/button>\n          <button type=\"button\" data-check>Self-check<\/button>\n          <button class=\"ghost\" type=\"button\" data-clear>Clear<\/button>\n        <\/div>\n      <\/div>\n      <div class=\"rulebox\" data-helpbox><div class=\"tiny\"><b>Support (English):<\/b> ${cfg.help}<\/div><\/div>\n      <textarea data-area placeholder=\"Escribe aqu\u00ed...\"><\/textarea>\n      <div class=\"tiny\" data-count>0 characters<\/div>\n      <div class=\"feedback\" data-fb><\/div>\n    `;\n    const helpBtn = container.querySelector(\"[data-help]\");\n    const helpBox = container.querySelector(\"[data-helpbox]\");\n    const area = container.querySelector(\"[data-area]\");\n    const count = container.querySelector(\"[data-count]\");\n    const fb = container.querySelector(\"[data-fb]\");\n\n    helpBtn.addEventListener(\"click\", ()=>{\n      const showing = helpBox.classList.contains(\"show\");\n      helpBox.classList.toggle(\"show\", !showing);\n      helpBtn.textContent = showing ? \"Show help\" : \"Hide help\";\n    });\n\n    area.addEventListener(\"input\", ()=> count.textContent = `${area.value.length} characters`);\n\n    container.querySelector(\"[data-clear]\").addEventListener(\"click\", ()=>{\n      area.value = \"\"; count.textContent = \"0 characters\";\n      fb.textContent=\"\"; fb.className=\"feedback\";\n      markDone(\"writing\", false);\n      updateNextStep();\n    });\n\n    container.querySelector(\"[data-check]\").addEventListener(\"click\", ()=>{\n      const t = area.value || \"\";\n      const n = normalize(t);\n      const checks = cfg.checks || {};\n      let score = 0;\n      const needs = [];\n\n      if(t.trim().length >= (checks.minChars || 70)) score++; else needs.push(\"Write a little more (aim 4\u20137 lines).\");\n      const markers = (checks.needMarkers || []);\n      const markerCount = markers.filter(m => n.includes(normalize(m))).length;\n      if(markerCount >= 2) score++; else needs.push(\"Use at least 2 key phrases from this module.\");\n      \/\/ total = 2\n      const pass = score >= 2;\n\n      if(pass){\n        fb.className = \"feedback ok\";\n        fb.innerHTML = `Great \u2705 Writing self-check: <b>${score}\/2<\/b>`;\n        markDone(\"writing\", true);\n      }else{\n        fb.className = \"feedback warn\";\n        fb.innerHTML = `Almost there \u26a0\ufe0f Writing self-check: <b>${score}\/2<\/b><ul>${needs.map(x=>`<li>${x}<\/li>`).join(\"\")}<\/ul>`;\n        markDone(\"writing\", false);\n      }\n      updateNextStep();\n    });\n  }\n\n  \/\/ ===== Quiz runtime\n  function pickQuizSet(exclude = []){\n    const ex = new Set(exclude.map(q => q.p+\"|\"+q.a));\n    const pool = QUIZ_BANK.filter(q => q.m === currentKey && !ex.has(q.p+\"|\"+q.a));\n    return shuffle(pool).slice(0, QUIZ_SIZE);\n  }\n\n  function renderQuiz(){\n    quizEl.innerHTML = \"\";\n    LAST = new Array(CURRENT_QUIZ.length).fill(false);\n    aScoreEl.textContent = \"0\";\n    aMaxEl.textContent = String(CURRENT_QUIZ.length);\n    aMsgEl.className = \"feedback\";\n    aMsgEl.textContent = \"Complete the quiz and click Check.\";\n\n    CURRENT_QUIZ.forEach((q, i)=>{\n      const div = document.createElement(\"div\");\n      div.className = \"q\";\n      div.innerHTML = `\n        <div class=\"qhead\">\n          <div><b>${q.p}<\/b><\/div>\n          <div class=\"btns\">\n            <button class=\"ghost\" type=\"button\" data-rule=\"${i}\">Show rule<\/button>\n            <button type=\"button\" data-listen=\"${i}\">Listen<\/button>\n          <\/div>\n        <\/div>\n        <div class=\"rulebox\" id=\"qr-${i}\">\n          <div class=\"tiny\"><b>Rule (English):<\/b> ${q.r}<\/div>\n        <\/div>\n        <select data-answer=\"${q.a}\" data-idx=\"${i}\">\n          <option value=\"\">Choose\u2026<\/option>\n          ${q.opts.map(o=>`<option>${o}<\/option>`).join(\"\")}\n        <\/select>\n        <div class=\"feedback\" id=\"qfb-${i}\"><\/div>\n      `;\n      quizEl.appendChild(div);\n    });\n\n    document.querySelectorAll(\"[data-rule]\").forEach(btn=>{\n      btn.addEventListener(\"click\", ()=>{\n        const i = btn.getAttribute(\"data-rule\");\n        const box = document.getElementById(\"qr-\"+i);\n        const showing = box.classList.contains(\"show\");\n        box.classList.toggle(\"show\", !showing);\n        btn.textContent = showing ? \"Show rule\" : \"Hide rule\";\n      });\n    });\n    document.querySelectorAll(\"[data-listen]\").forEach(btn=>{\n      btn.addEventListener(\"click\", ()=>{\n        const i = parseInt(btn.getAttribute(\"data-listen\"),10);\n        speakES(CURRENT_QUIZ[i].p);\n      });\n    });\n  }\n\n  function newQuizSet(){\n    CURRENT_QUIZ = pickQuizSet();\n    renderQuiz();\n  }\n\n  function retryIncorrectOnly(){\n    if(!LAST.length){\n      aMsgEl.className = \"feedback warn\";\n      aMsgEl.textContent = \"Click Check first to identify incorrect items.\";\n      return;\n    }\n    const incorrect = CURRENT_QUIZ.filter((q,i)=> LAST[i] === false);\n    if(!incorrect.length){\n      aMsgEl.className = \"feedback ok\";\n      aMsgEl.textContent = \"All correct \u2705 Click New set for more practice.\";\n      return;\n    }\n    const fill = QUIZ_SIZE - incorrect.length;\n    const extra = pickQuizSet(incorrect).slice(0, Math.max(0, fill));\n    CURRENT_QUIZ = shuffle(incorrect.concat(extra)).slice(0, QUIZ_SIZE);\n    renderQuiz();\n    aMsgEl.className = \"feedback\";\n    aMsgEl.textContent = \"Retry mode: incorrect items kept + new items added to complete 10.\";\n  }\n\n  function renderAssess(m){\n    quizRuleBox.classList.remove(\"show\");\n    btnShowQuizRule.textContent = \"Show rule\";\n    quizRuleBox.innerHTML = `<div class=\"tiny\"><b>Rule (English):<\/b> ${m.quizRule}<\/div>`;\n    btnListenQuizHint.onclick = ()=> speakES(m.quizListen);\n\n    buildWriting(writingTask, m.writing);\n\n    loadStats();\n    updateStatsUI();\n    newQuizSet();\n  }\n\n  btnShowQuizRule.addEventListener(\"click\", ()=>{\n    const showing = quizRuleBox.classList.contains(\"show\");\n    quizRuleBox.classList.toggle(\"show\", !showing);\n    btnShowQuizRule.textContent = showing ? \"Show rule\" : \"Hide rule\";\n  });\n\n  function checkAssessment(){\n    const selects = Array.from(quizEl.querySelectorAll(\"select[data-answer]\"));\n    let answered = 0, score = 0;\n    let localStreak = streak;\n\n    selects.forEach(sel=>{\n      const idx = parseInt(sel.getAttribute(\"data-idx\"),10);\n      const ans = sel.getAttribute(\"data-answer\");\n      const fb = document.getElementById(\"qfb-\"+idx);\n      const v = sel.value;\n      if(v) answered++;\n\n      if(!v){\n        fb.className = \"feedback warn\";\n        fb.textContent = \"Incomplete.\";\n        localStreak = 0;\n        LAST[idx] = false;\n        return;\n      }\n      const ok = normalize(v) === normalize(ans);\n      LAST[idx] = ok;\n      if(ok){\n        fb.className = \"feedback ok\";\n        fb.textContent = \"Correct \u2705\";\n        score++;\n        localStreak++;\n        if(localStreak > bestStreak) bestStreak = localStreak;\n      }else{\n        fb.className = \"feedback bad\";\n        fb.innerHTML = `Not correct \u274c Suggested: <b>${ans}<\/b>`;\n        localStreak = 0;\n      }\n    });\n\n    streak = localStreak;\n    aScoreEl.textContent = String(score);\n\n    if(answered === selects.length){\n      attempts++;\n      totalScore += score;\n      saveStats();\n      updateStatsUI();\n    }\n\n    const pct = selects.length ? (score \/ selects.length) : 0;\n\n    if(answered < selects.length){\n      aMsgEl.className = \"feedback warn\";\n      aMsgEl.textContent = `You answered ${answered}\/${selects.length}. Complete all items to register your attempt.`;\n      markDone(\"quiz\", false);\n    } else if(pct >= 0.8){\n      aMsgEl.className = \"feedback ok\";\n      aMsgEl.textContent = \"Pass \u2705 Great job. Go to Progress and tick your checklist.\";\n      markDone(\"quiz\", true);\n    } else if(pct >= 0.6){\n      aMsgEl.className = \"feedback warn\";\n      aMsgEl.textContent = \"Almost \ud83d\udc4d Click Retry incorrect only and use Show rule.\";\n      markDone(\"quiz\", false);\n    } else {\n      aMsgEl.className = \"feedback bad\";\n      aMsgEl.textContent = \"Keep practicing \ud83d\udd01 Return to Practice and try again.\";\n      markDone(\"quiz\", false);\n    }\n    updateNextStep();\n  }\n\n  btnCheckAssess.addEventListener(\"click\", checkAssessment);\n  btnRetryIncorrect.addEventListener(\"click\", retryIncorrectOnly);\n  btnNewQuiz.addEventListener(\"click\", newQuizSet);\n  btnResetAssess.addEventListener(\"click\", ()=>{\n    markDone(\"writing\", false);\n    markDone(\"quiz\", false);\n    renderAssess(MODULES[currentKey]);\n    updateNextStep();\n  });\n\n  \/\/ ===== Progress\n  function renderProgress(m){\n    canList.innerHTML = m.can.map((txt, i)=>`\n      <label style=\"display:flex; gap:10px; align-items:flex-start;\">\n        <input type=\"checkbox\" class=\"can\" data-idx=\"${i}\" \/>\n        <span>${txt}<\/span>\n      <\/label>\n    `).join(\"\");\n\n    const raw = localStorage.getItem(checklistKey());\n    if(raw){\n      try{\n        const vals = JSON.parse(raw);\n        document.querySelectorAll(\".can\").forEach((c,i)=> c.checked = !!vals[i]);\n      }catch(e){}\n    }\n    checkMsg.textContent = \"\"; checkMsg.className = \"feedback\";\n    updateNextStep();\n  }\n\n  btnSaveChecklist.addEventListener(\"click\", ()=>{\n    const vals = Array.from(document.querySelectorAll(\".can\")).map(x=>x.checked);\n    localStorage.setItem(checklistKey(), JSON.stringify(vals));\n    checkMsg.className = \"feedback ok\";\n    checkMsg.textContent = `Saved \u2705 (${vals.filter(Boolean).length}\/${vals.length} statements checked)`;\n    updateNextStep();\n  });\n\n  btnResetChecklist.addEventListener(\"click\", ()=>{\n    document.querySelectorAll(\".can\").forEach(x=> x.checked=false);\n    localStorage.removeItem(checklistKey());\n    checkMsg.className = \"feedback\";\n    checkMsg.textContent = \"Reset done.\";\n    updateNextStep();\n  });\n\n  \/\/ ===== Guidance\n  function completionSummary(){\n    const d = loadDone();\n    const keys = [\"practiceA\",\"practiceB\",\"practiceC\",\"writing\",\"quiz\"];\n    const done = keys.filter(k => d[k]).length;\n    return {done, total: keys.length, d};\n  }\n  function updateNextStep(){\n    const c = completionSummary();\n    const checklistCount = Array.from(document.querySelectorAll(\".can\")).filter(x=>x.checked).length || 0;\n    const checklistTotal = Array.from(document.querySelectorAll(\".can\")).length || 5;\n\n    let msg = \"\";\n    if(c.done < 2) msg = \"Start with <b>Practice<\/b>: complete Activity A and B. Use Show rule if needed.\";\n    else if(c.done < 3) msg = \"Next: complete <b>Practice C<\/b> to consolidate.\";\n    else if(!c.d[\"writing\"]) msg = \"Now go to <b>Assess<\/b>: complete the <b>Writing<\/b> self-check.\";\n    else if(!c.d[\"quiz\"]) msg = \"Then pass the <b>Quiz<\/b> with <b>80%<\/b>. Use Retry incorrect only.\";\n    else if(checklistCount < checklistTotal) msg = \"Assessment complete \u2705 Go to <b>Progress<\/b>, tick your checklist, then Save.\";\n    else msg = \"Module completed \u2705 Select the next module from the dropdown.\";\n\n    nextStep.innerHTML = `\n      <div class=\"muted\">\n        <b>Completion:<\/b> ${c.done}\/${c.total} sections completed \u00b7\n        <b>Checklist:<\/b> ${checklistCount}\/${checklistTotal}<br\/>\n        ${msg}\n      <\/div>\n    `;\n  }\n\n  \/\/ ===== Module loader\n  function loadModule(key){\n    currentKey = key;\n    const m = MODULES[currentKey];\n\n    moduleTitle.textContent = m.title;\n    moduleDesc.innerHTML = `Instructions in English. Activities in Spanish. <span class=\"tiny\">${m.desc}<\/span>`;\n    moduleTime.textContent = m.time;\n\n    \/\/ default to Learn tab\n    document.querySelectorAll(\".tab\").forEach(x => x.classList.remove(\"active\"));\n    document.querySelector('.tab[data-tab=\"learn\"]').classList.add(\"active\");\n    Object.keys(panels).forEach(k => panels[k].style.display = (k === \"learn\" ? \"block\" : \"none\"));\n\n    renderLearn(m);\n    renderPractice(m);\n    renderAssess(m);\n    renderProgress(m);\n    updateNextStep();\n  }\n\n  moduleSelect.addEventListener(\"change\", ()=> loadModule(moduleSelect.value));\n\n  \/\/ ===== INIT\n  loadModule(\"m1\");\n<\/script>\n<\/body>\n<\/html>\n\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/plentylearning.com\/espanol\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-10-ene-2026-09_25_15-p.m-1024x683.png\" alt=\"\" class=\"wp-image-345\" srcset=\"https:\/\/plentylearning.com\/espanol\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-10-ene-2026-09_25_15-p.m-1024x683.png 1024w, https:\/\/plentylearning.com\/espanol\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-10-ene-2026-09_25_15-p.m-300x200.png 300w, https:\/\/plentylearning.com\/espanol\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-10-ene-2026-09_25_15-p.m-768x512.png 768w, https:\/\/plentylearning.com\/espanol\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-10-ene-2026-09_25_15-p.m.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Spanish A1 \u2013 Foundations of Communication (CEFR) | Plenty Learning PL Spanish A1 \u2013 Foundations of Communication (CEFR) Self-learning for English speakers \u00b7 Interactive \u00b7 By TeacherJM A1 Beginner \u00b7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"class_list":["post-341","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":4,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages\/341\/revisions"}],"predecessor-version":[{"id":353,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages\/341\/revisions\/353"}],"wp:attachment":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/media?parent=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}