{"id":355,"date":"2026-06-20T16:10:41","date_gmt":"2026-06-20T16:10:41","guid":{"rendered":"https:\/\/www.liltheteacher.com\/?page_id=355"},"modified":"2026-06-20T16:41:59","modified_gmt":"2026-06-20T16:41:59","slug":"english-level-test","status":"publish","type":"page","link":"https:\/\/www.liltheteacher.com\/?page_id=355","title":{"rendered":"English Level Test"},"content":{"rendered":"<link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\">\r\n<link rel=\"preconnect\" href=\"https:\/\/fonts.gstatic.com\" crossorigin>\r\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Cabin+Sketch:wght@400;700&family=Lato:wght@300;400;700&display=swap\" rel=\"stylesheet\">\r\n<style>\r\n:root {\r\n  --bg:#fffafa; --card:#ffffff; --primary:#446084; --primary-light:#e8eef4;\r\n  --accent:#d4688e; --correct:#627D47; --incorrect:#C05530;\r\n  --text:#2E2E2E; --muted:#7a7a7a; --border:#e8e0e0;\r\n  --shadow:0 4px 24px rgba(0,0,0,0.08);\r\n}\r\n*{margin:0;padding:0;box-sizing:border-box}\r\nbody{font-family:'Lato',sans-serif;background:var(--bg);color:var(--text);min-height:100vh;display:flex;align-items:center;justify-content:center}\r\n.container{width:100%;max-width:640px;padding:20px}\r\n.card{background:var(--card);border-radius:16px;padding:40px 36px;box-shadow:var(--shadow);animation:fadeIn .4s ease}\r\n@keyframes fadeIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}\r\n@keyframes fadeOut{from{opacity:1}to{opacity:0;transform:translateY(-8px)}}\r\n.fade-out{animation:fadeOut .3s ease forwards}\r\n.start-title{font-family:'Cabin Sketch',cursive;font-size:28px;font-weight:700;color:var(--primary);margin-bottom:12px}\r\n.start-subtitle{font-size:16px;color:var(--muted);line-height:1.6;margin-bottom:24px}\r\n.start-details{background:var(--primary-light);border-radius:10px;padding:16px 20px;margin-bottom:28px;font-size:14px;line-height:1.7;color:var(--text)}\r\n.start-details strong{color:var(--primary)}\r\n.btn{display:inline-block;background:var(--primary);color:#fff;border:none;border-radius:10px;padding:14px 40px;font-size:17px;font-weight:600;cursor:pointer;transition:background .2s,transform .1s}\r\n.btn:hover{background:#37506e}.btn:active{transform:scale(.97)}\r\n.test-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}\r\n.level-badges{display:flex;gap:6px}\r\n.badge{padding:3px 10px;border-radius:12px;font-size:11px;font-weight:700;letter-spacing:.3px;background:var(--border);color:var(--muted);transition:all .3s}\r\n.badge.active{background:var(--primary);color:#fff}\r\n.badge.done{background:var(--correct);color:#fff}\r\n.badge.failed{background:var(--incorrect);color:#fff}\r\n.level-progress{margin-bottom:18px}\r\n.level-progress-label{font-size:13px;color:var(--muted);margin-bottom:6px}\r\n.level-progress-bar{height:6px;background:var(--border);border-radius:3px;overflow:hidden}\r\n.level-progress-fill{height:100%;background:var(--primary);border-radius:3px;transition:width .4s}\r\n.category-tag{display:inline-block;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--primary);background:var(--primary-light);padding:4px 10px;border-radius:6px;margin-bottom:14px}\r\n.question-text{font-size:19px;font-weight:500;line-height:1.6;margin-bottom:24px}\r\n.passage{background:#f5f0ee;border-left:3px solid var(--accent);padding:14px 18px;border-radius:0 8px 8px 0;margin-bottom:18px;font-size:15px;line-height:1.7}\r\n.options{display:flex;flex-direction:column;gap:10px}\r\n.option-btn{display:flex;align-items:center;gap:12px;background:var(--bg);border:2px solid var(--border);border-radius:10px;padding:14px 18px;font-size:16px;cursor:pointer;transition:all .2s;text-align:left}\r\n.option-btn:hover{border-color:var(--primary);background:var(--primary-light)}\r\n.option-btn .letter{width:30px;height:30px;border-radius:50%;background:var(--border);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;flex-shrink:0}\r\n.option-btn.correct{border-color:var(--correct);background:#eef7f0}\r\n.option-btn.correct .letter{background:var(--correct);color:#fff}\r\n.option-btn.incorrect{border-color:var(--incorrect);background:#f9eeed}\r\n.option-btn.incorrect .letter{background:var(--incorrect);color:#fff}\r\n.option-btn.disabled{pointer-events:none}\r\n.progress-bar{height:4px;background:var(--border);border-radius:2px;margin-top:20px;overflow:hidden}\r\n.progress-fill{height:100%;background:var(--primary);border-radius:2px;transition:width .4s}\r\n.result-level{font-family:'Cabin Sketch',cursive;font-size:64px;font-weight:700;color:var(--primary);margin-bottom:4px}\r\n.result-name{font-family:'Cabin Sketch',cursive;font-size:22px;font-weight:700;margin-bottom:16px}\r\n.result-desc{font-size:15px;color:var(--muted);line-height:1.7;margin-bottom:28px}\r\n.breakdown{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:28px}\r\n.breakdown-item{background:var(--bg);border-radius:10px;padding:14px;text-align:center}\r\n.breakdown-item .cat{font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);margin-bottom:4px}\r\n.breakdown-item .score{font-size:22px;font-weight:700;color:var(--primary)}\r\n.breakdown-item .bar{height:4px;background:var(--border);border-radius:2px;margin-top:8px;overflow:hidden}\r\n.breakdown-item .bar-fill{height:100%;border-radius:2px;transition:width .6s}\r\n.result-meta{font-size:14px;color:var(--muted);margin-bottom:24px}\r\n.result-comment{font-size:15px;color:var(--text);line-height:1.7;background:var(--primary-light);border-radius:10px;padding:16px 20px;margin-bottom:24px;text-align:left}\r\n<\/style>\r\n<div class=\"container\" id=\"app\"><\/div>\r\n<script>\r\n\/\/ \u2500\u2500\u2500 Question Bank \u2500\u2500\u2500\r\n\/\/ Correct answers will be redistributed evenly at build time (see redistributeAnswers)\r\n\/\/ Cognate audit: no Russian-English cognates in A1\/A2; distractors are level-appropriate.\r\nconst RAW_QUESTIONS = {\r\n  A1: {\r\n    grammar: [\r\n      {q:\"She ___ a teacher.\",opts:[\"am\",\"is\",\"are\",\"be\"],ans:1},\r\n      {q:\"I ___ coffee every morning.\",opts:[\"drinks\",\"drink\",\"drinking\",\"drank\"],ans:1},\r\n      {q:\"They ___ from Japan.\",opts:[\"is\",\"am\",\"are\",\"be\"],ans:2},\r\n      {q:\"He ___ not like fish.\",opts:[\"do\",\"does\",\"is\",\"has\"],ans:1},\r\n      {q:\"We ___ to school by bus.\",opts:[\"goes\",\"going\",\"go\",\"gone\"],ans:2},\r\n      {q:\"___ there a bank near here?\",opts:[\"Are\",\"Do\",\"Is\",\"Does\"],ans:2},\r\n    ],\r\n    vocabulary: [\r\n      {q:\"Which word means 'a place where you sleep'?\",opts:[\"kitchen\",\"bedroom\",\"bathroom\",\"garden\"],ans:1},\r\n      {q:\"Which word means 'the opposite of cheap'?\",opts:[\"slow\",\"heavy\",\"expensive\",\"difficult\"],ans:2},\r\n      {q:\"A person who teaches students is a ___\",opts:[\"baker\",\"driver\",\"teacher\",\"farmer\"],ans:2},\r\n      {q:\"Which word means 'the season when it snows'?\",opts:[\"spring\",\"summer\",\"autumn\",\"winter\"],ans:3},\r\n      {q:\"'Yesterday' means ___\",opts:[\"tomorrow\",\"today\",\"the day before today\",\"next week\"],ans:2},\r\n      {q:\"Which animal says 'meow'?\",opts:[\"dog\",\"cow\",\"cat\",\"horse\"],ans:2},\r\n    ],\r\n    wordChoice: [\r\n      {q:\"Let's ___ a break.\",opts:[\"make\",\"have\",\"take\",\"do\"],ans:2},\r\n      {q:\"She ___ a shower every morning.\",opts:[\"makes\",\"does\",\"takes\",\"has\"],ans:2},\r\n      {q:\"I go to work ___ Monday.\",opts:[\"in\",\"at\",\"on\",\"by\"],ans:2},\r\n      {q:\"He is ___ good student.\",opts:[\"a\",\"an\",\"the\",\"\u2014\"],ans:0},\r\n      {q:\"We always ___ a great time at grandma's house.\",opts:[\"make\",\"do\",\"have\",\"take\"],ans:2},\r\n      {q:\"Can you ___ me a favour?\",opts:[\"make\",\"do\",\"give\",\"take\"],ans:1},\r\n    ],\r\n    reading: [\r\n      {passage:\"My name is Maria. I am 25 years old. I live in a small apartment in Madrid. I work in a bakery near my home. I like my job because I meet many people every day.\",q:\"Where does Maria work?\",opts:[\"In a school\",\"In a bakery\",\"In a hospital\",\"At home\"],ans:1},\r\n      {passage:\"Tom gets up at 7 o'clock every morning. He has breakfast at 7:30. Then he walks to the bus stop. The bus arrives at 8:15 and takes him to work.\",q:\"How does Tom get to work?\",opts:[\"He walks\",\"He drives\",\"He takes the bus\",\"He rides a bike\"],ans:2},\r\n      {passage:\"This is my kitchen. There is a table and four chairs. On the table, there are two cups and a plate. Next to the window, there is a small fridge.\",q:\"How many chairs are in the kitchen?\",opts:[\"One\",\"Two\",\"Three\",\"Four\"],ans:3},\r\n      {passage:\"Anna has a dog named Rex. Rex is big and brown. Every evening, Anna takes Rex for a long walk. Rex likes to run and play with other dogs.\",q:\"What does Anna do every evening?\",opts:[\"She cooks dinner\",\"She takes Rex for a walk\",\"She watches TV\",\"She reads a book\"],ans:1},\r\n      {passage:\"The weather is nice today. The sun is shining and the sky is blue. There are no clouds. It is warm but not too hot.\",q:\"How is the weather today?\",opts:[\"Rainy and windy\",\"Cloudy and windy\",\"Sunny and warm\",\"Hot and stormy\"],ans:2},\r\n      {passage:\"Hi Sam! I'm at the train station now. My train arrives at 3 pm. Can you meet me at Platform 2? I'll wait near the coffee shop. See you soon! \u2014 Lisa\",q:\"Where will Lisa wait for Sam?\",opts:[\"At Platform 2\",\"At the ticket office\",\"Near the coffee shop\",\"Outside the station\"],ans:2},\r\n    ],\r\n  },\r\n  A2: {\r\n    grammar: [\r\n      {q:\"She ___ to Paris last summer.\",opts:[\"go\",\"goes\",\"went\",\"going\"],ans:2},\r\n      {q:\"I have ___ finished my homework.\",opts:[\"yet\",\"already\",\"never\",\"still\"],ans:1},\r\n      {q:\"There aren't ___ apples in the fridge.\",opts:[\"some\",\"much\",\"many\",\"no\"],ans:2},\r\n      {q:\"He is ___ than his sister.\",opts:[\"more tall\",\"taller\",\"tallest\",\"most tall\"],ans:1},\r\n      {q:\"We ___ go to the cinema tonight.\",opts:[\"will\",\"are\",\"have\",\"did\"],ans:0},\r\n      {q:\"She ___ watching TV when I called.\",opts:[\"is\",\"was\",\"were\",\"been\"],ans:1},\r\n    ],\r\n    vocabulary: [\r\n      {q:\"If something is 'delicious', it ___\",opts:[\"tastes bad\",\"tastes very good\",\"looks ugly\",\"sounds quiet\"],ans:1},\r\n      {q:\"'Borrow' means to ___\",opts:[\"give back later\",\"take and return later\",\"keep forever\",\"sell to someone\"],ans:1},\r\n      {q:\"Which word means 'not interesting'?\",opts:[\"exciting\",\"boring\",\"amazing\",\"funny\"],ans:1},\r\n      {q:\"If something is 'dangerous', it ___\",opts:[\"is safe\",\"can hurt you\",\"is beautiful\",\"is easy\"],ans:1},\r\n      {q:\"If you 'agree' with someone, you ___\",opts:[\"have the same opinion as them\",\"think differently from them\",\"get angry at them\",\"feel worried about them\"],ans:0},\r\n      {q:\"Which word means 'happening every day'?\",opts:[\"daily\",\"weekly\",\"yearly\",\"monthly\"],ans:0},\r\n    ],\r\n    wordChoice: [\r\n      {q:\"Could you ___ me a favour?\",opts:[\"make\",\"do\",\"give\",\"take\"],ans:1},\r\n      {q:\"I'm looking ___ to seeing you.\",opts:[\"forward\",\"ahead\",\"up\",\"for\"],ans:0},\r\n      {q:\"She ___ a photo of the sunset.\",opts:[\"did\",\"made\",\"took\",\"had\"],ans:2},\r\n      {q:\"I ___ my best to finish on time.\",opts:[\"made\",\"did\",\"had\",\"took\"],ans:1},\r\n      {q:\"He ___ off his jacket and sat down.\",opts:[\"took\",\"put\",\"turned\",\"gave\"],ans:0},\r\n      {q:\"We ___ a great time at the party.\",opts:[\"made\",\"did\",\"had\",\"took\"],ans:2},\r\n    ],\r\n    reading: [\r\n      {passage:\"Last weekend, Sarah went to a new restaurant in town with her friends. She ordered pasta and they all shared a chocolate cake for dessert. The food was delicious but a bit expensive. She said she would go back for her birthday.\",q:\"What did Sarah think about the prices?\",opts:[\"Very cheap\",\"Reasonable\",\"A bit expensive\",\"Terrible\"],ans:2},\r\n      {passage:\"David has been working from home for six months. He says he saves money because he doesn't need to commute. However, he sometimes feels lonely and misses chatting with colleagues during lunch breaks.\",q:\"What is a disadvantage of David's situation?\",opts:[\"He spends too much money\",\"He feels lonely sometimes\",\"He has too much work\",\"His commute is too long\"],ans:1},\r\n      {passage:\"Emma is taking swimming lessons. She practises every day for thirty minutes. Her teacher says she is making good progress. She hopes to take part in the school sports event in December.\",q:\"How often does Emma practise?\",opts:[\"Once a week\",\"Every day\",\"Only on weekends\",\"Twice a day\"],ans:1},\r\n      {passage:\"The city library is open from 9am to 7pm, Monday to Saturday. On Sundays, it is only open from 10am to 2pm. You can borrow up to eight books at a time for three weeks.\",q:\"How long can you keep a borrowed book?\",opts:[\"One week\",\"Two weeks\",\"Three weeks\",\"One month\"],ans:2},\r\n      {passage:\"Jenny's flight was delayed by three hours, so she decided to read a book and have some coffee while she waited. When she finally arrived in Rome, it was already dark and she was very tired.\",q:\"Why did Jenny have to wait at the airport?\",opts:[\"She was early\",\"Her flight was delayed\",\"She lost her passport\",\"The coffee shop was closed\"],ans:1},\r\n      {passage:\"To all residents: The hot water will be turned off on Saturday from 8 am to 2 pm for repairs. Please make sure to fill buckets or bottles with water before then. If you have any questions, contact the building manager at flat 1A. We apologise for the inconvenience.\",q:\"What should residents do before Saturday?\",opts:[\"Call the plumber\",\"Save some water in advance\",\"Leave the building\",\"Use cold water only\"],ans:1},\r\n    ],\r\n  },\r\n  B1: {\r\n    grammar: [\r\n      {q:\"She ___ in London since 2018.\",opts:[\"lives\",\"lived\",\"has lived\",\"is living\"],ans:2},\r\n      {q:\"If it ___ raining tomorrow, we'll go to the beach.\",opts:[\"isn't\",\"wasn't\",\"weren't\",\"won't be\"],ans:0},\r\n      {q:\"The report ___ by the manager yesterday.\",opts:[\"wrote\",\"was written\",\"has written\",\"is writing\"],ans:1},\r\n      {q:\"I wish I ___ speak French fluently.\",opts:[\"can\",\"could\",\"would\",\"should\"],ans:1},\r\n      {q:\"She asked me where I ___\",opts:[\"live\",\"did live\",\"am living\",\"do live\"],ans:0},\r\n      {q:\"By the time we arrived, the film ___\",opts:[\"started\",\"has started\",\"had started\",\"starts\"],ans:2},\r\n    ],\r\n    vocabulary: [\r\n      {q:\"'Reluctant' means ___\",opts:[\"eager\",\"unwilling\",\"grateful\",\"confused\"],ans:1},\r\n      {q:\"If you 'persuade' someone, you ___\",opts:[\"force them to do something\",\"convince them to do something\",\"ignore them completely\",\"argue with them loudly\"],ans:1},\r\n      {q:\"'Consequences' are ___\",opts:[\"causes\",\"results\",\"suggestions\",\"solutions\"],ans:1},\r\n      {q:\"A 'genuine' feeling is ___\",opts:[\"false\",\"real\",\"strong\",\"strange\"],ans:1},\r\n      {q:\"If someone is 'reliable', they ___\",opts:[\"are often late\",\"can be trusted\",\"change their mind often\",\"are very quiet\"],ans:1},\r\n      {q:\"If you 'admire' someone, you ___\",opts:[\"dislike them\",\"respect and like them\",\"fear them\",\"envy them\"],ans:1},\r\n    ],\r\n    wordChoice: [\r\n      {q:\"She ___ up with a brilliant idea for the project.\",opts:[\"came\",\"put\",\"turned\",\"made\"],ans:0},\r\n      {q:\"I ___ along really well with my sister.\",opts:[\"go\",\"get\",\"come\",\"make\"],ans:1},\r\n      {q:\"They ran ___ of milk, so they went to the shop.\",opts:[\"out\",\"away\",\"off\",\"down\"],ans:0},\r\n      {q:\"He ___ responsibility for the mistake.\",opts:[\"got\",\"made\",\"took\",\"had\"],ans:2},\r\n      {q:\"The meeting has been ___ off until next week.\",opts:[\"put\",\"set\",\"taken\",\"left\"],ans:0},\r\n      {q:\"I can't ___ up with his constant lateness.\",opts:[\"put\",\"come\",\"make\",\"keep\"],ans:0},\r\n    ],\r\n    reading: [\r\n      {passage:\"Working from home has become increasingly common. While many appreciate the flexibility and time saved on commuting, studies show that remote workers often struggle with separating work from personal life. Without the physical boundary of an office, people tend to work longer hours, checking emails late at night and never fully switching off.\",q:\"What is one problem with working from home mentioned in the text?\",opts:[\"It costs more money\",\"People work too much and can't switch off\",\"There are too many meetings\",\"The internet is too slow\"],ans:1},\r\n      {passage:\"Maria had always been shy, so when her drama teacher suggested she join the school play, she was terrified. But after weeks of rehearsing, she discovered that stepping into a character helped her forget her insecurities. On opening night, she delivered her lines perfectly and received a standing ovation.\",q:\"How did acting help Maria?\",opts:[\"She became famous\",\"It helped her overcome her shyness\",\"She earned a lot of money\",\"She made the teacher proud\"],ans:1},\r\n      {passage:\"The old bridge had been closed for repairs for six months. Residents of the village had to take a long detour through the next town, adding thirty minutes to their journey. When the bridge finally reopened, the whole village celebrated with a small fair and free food for everyone.\",q:\"Why was the bridge closed?\",opts:[\"It collapsed\",\"For repairs\",\"Due to flooding\",\"For a celebration\"],ans:1},\r\n      {passage:\"Sleep experts recommend that adults get seven to nine hours of sleep per night. However, research shows that one in three adults regularly gets less than six hours. Chronic sleep deprivation has been linked to heart disease, obesity, and reduced cognitive function. Simple changes like limiting screen time before bed can make a significant difference.\",q:\"What fraction of adults regularly get less than six hours of sleep?\",opts:[\"About 1 in 10\",\"About 1 in 3\",\"About half\",\"About 3 in 4\"],ans:1},\r\n      {passage:\"Dear tenants, please note that the building's parking lot will be resurfaced next week from Monday to Wednesday. During this time, you can park on the street or use the car park at the supermarket on Green Lane, which is about a five-minute walk away. We apologise for any inconvenience. \u2014 Building Management\",q:\"Where can tenants park during the resurfacing?\",opts:[\"In their usual spots\",\"At the supermarket car park on Green Lane\",\"In the basement\",\"Nowhere\"],ans:1},\r\n      {passage:\"Last Saturday, Lisa invited her colleagues over for a barbecue. She bought sausages, burgers, and salad from the local market. Unfortunately, it started raining just as she lit the grill, so everyone ended up eating inside. Despite the weather, they had a lovely time and agreed to try again when it gets warmer.\",q:\"Why did the guests eat inside?\",opts:[\"The food wasn't ready\",\"It started raining\",\"The grill broke\",\"Lisa preferred eating indoors\"],ans:1},\r\n    ],\r\n  },\r\n  B2: {\r\n    grammar: [\r\n      {q:\"Hardly ___ the door when the phone rang.\",opts:[\"I had closed\",\"had I closed\",\"I closed\",\"closing\"],ans:1},\r\n      {q:\"She insisted that he ___ a doctor immediately.\",opts:[\"sees\",\"saw\",\"see\",\"seeing\"],ans:2},\r\n      {q:\"Not only ___ intelligent, but she is also hardworking.\",opts:[\"she is\",\"is she\",\"she was\",\"was she\"],ans:1},\r\n      {q:\"By next June, I ___ here for ten years.\",opts:[\"will work\",\"will be working\",\"will have worked\",\"am working\"],ans:2},\r\n      {q:\"He denied ___ the window.\",opts:[\"breaking\",\"to break\",\"break\",\"broke\"],ans:0},\r\n      {q:\"Had it not ___ for her help, I would have failed.\",opts:[\"been\",\"was\",\"is\",\"being\"],ans:0},\r\n    ],\r\n    vocabulary: [\r\n      {q:\"'Ambiguous' means ___\",opts:[\"very clear\",\"having more than one meaning\",\"dangerous\",\"unimportant\"],ans:1},\r\n      {q:\"If something is 'tangible', it ___\",opts:[\"cannot be touched\",\"is abstract\",\"can be touched or felt\",\"is imaginary\"],ans:2},\r\n      {q:\"'Undermine' means to ___\",opts:[\"support\",\"weaken gradually\",\"replace quickly\",\"destroy suddenly\"],ans:1},\r\n      {q:\"'Pragmatic' describes someone who is ___\",opts:[\"idealistic\",\"practical\",\"lazy\",\"creative\"],ans:1},\r\n      {q:\"If a plan is 'viable', it ___\",opts:[\"is dangerous\",\"cannot work\",\"is likely to succeed\",\"is too expensive\"],ans:2},\r\n      {q:\"'Candid' means ___\",opts:[\"dishonest\",\"careful\",\"honest and direct\",\"polite and reserved\"],ans:2},\r\n    ],\r\n    wordChoice: [\r\n      {q:\"We need to ___ the problem before it gets worse.\",opts:[\"tackle\",\"meet\",\"reach\",\"catch\"],ans:0},\r\n      {q:\"She ___ down their invitation to the wedding.\",opts:[\"turned\",\"broke\",\"shut\",\"cut\"],ans:0},\r\n      {q:\"The company ___ out of money before the project was finished.\",opts:[\"ran\",\"came\",\"went\",\"carried\"],ans:0},\r\n      {q:\"He always ___ off his homework until the last minute.\",opts:[\"puts\",\"takes\",\"leaves\",\"pushes\"],ans:0},\r\n      {q:\"I ___ into an old friend at the supermarket yesterday.\",opts:[\"ran\",\"came\",\"went\",\"turned\"],ans:0},\r\n      {q:\"She ___ after her grandmother \u2014 they have the same smile.\",opts:[\"takes\",\"looks\",\"goes\",\"runs\"],ans:0},\r\n    ],\r\n    reading: [\r\n      {passage:\"Urbanisation is transforming the way millions of people live, but it comes at a cost. As cities expand, green spaces disappear, air quality deteriorates, and housing becomes unaffordable for many. Some urban planners argue that vertical development \u2014 building upward rather than outward \u2014 offers a solution. By concentrating populations in tall buildings, cities can preserve surrounding countryside while still accommodating growth. Critics, however, warn that high-density living can lead to stress, social isolation, and inadequate infrastructure.\",q:\"What is the main debate presented in the text?\",opts:[\"Whether cities should grow at all\",\"Vertical vs horizontal urban development\",\"How to reduce pollution\",\"Whether rural life is better than city life\"],ans:1},\r\n      {passage:\"The gig economy, characterised by short-term contracts and freelance work, has grown dramatically in the past decade. For workers, it offers flexibility and independence. For companies, it reduces labour costs. Yet the lack of job security, benefits, and legal protections leaves many gig workers in a precarious position. Some governments are now exploring regulations to ensure fair treatment, but progress has been slow and inconsistent across countries.\",q:\"What is described as the main disadvantage of gig work?\",opts:[\"Low wages\",\"Lack of security and protections\",\"Too much competition\",\"Difficult working hours\"],ans:1},\r\n      {passage:\"In many cultures, the concept of 'saving face' \u2014 maintaining dignity and avoiding public embarrassment \u2014 plays a central role in social interactions. While Western societies tend to value direct communication, even at the risk of confrontation, cultures influenced by Confucian traditions often prioritise harmony and indirectness. Misunderstandings arise when people from these different backgrounds work together, each interpreting the other's behaviour through their own cultural lens.\",q:\"According to the text, what causes misunderstandings between different cultural groups?\",opts:[\"Language barriers\",\"Different communication styles shaped by culture\",\"Economic differences\",\"Political disagreements\"],ans:1},\r\n      {passage:\"The reintroduction of wolves to Yellowstone National Park in 1995 is often cited as a textbook example of a trophic cascade. The return of this top predator changed the behaviour of deer, which had been overgrazing. Vegetation recovered, attracting birds and beavers. Beavers created wetlands that supported fish and amphibians. Even the course of rivers changed as stabilised riverbanks reduced erosion. A single species had reshaped an entire ecosystem.\",q:\"What does the text illustrate about wolves in Yellowstone?\",opts:[\"They caused more harm than good\",\"They only affected deer populations\",\"One species can transform an entire ecosystem\",\"They were unpopular with visitors\"],ans:2},\r\n      {passage:\"When Sophie moved to Berlin for work, she didn't know anyone in the city. She joined a running club and a German conversation group to meet people. At first, she felt awkward and out of place \u2014 everyone seemed to already have their own friend groups. But after a few weeks, she started recognising faces, and soon she was invited to a group dinner on a Friday night. Six months later, she says the hardest part was simply showing up that first time.\",q:\"What was the most difficult thing for Sophie?\",opts:[\"Learning German\",\"Finding an apartment\",\"Going to the first meeting\",\"Getting a job in Berlin\"],ans:2},\r\n      {passage:\"Subject: Feedback on your recent application. Dear Mr Torres, Thank you for applying for the Marketing Coordinator position. After careful review, we regret to inform you that we will not be proceeding with your application. We received a large number of strong applications, and the decision was a difficult one. We encourage you to apply for future openings that match your qualifications. We wish you the best in your job search. \u2014 HR Department, Westfield & Associates\",q:\"What is the purpose of this email?\",opts:[\"To offer Mr Torres a job\",\"To invite him to an interview\",\"To reject his job application\",\"To ask for more information\"],ans:2},\r\n    ],\r\n  },\r\n  C1: {\r\n    grammar: [\r\n      {q:\"So ___ was the noise that we couldn't hear each other.\",opts:[\"great\",\"much\",\"loud\",\"big\"],ans:0},\r\n      {q:\"It's high time you ___ smoking.\",opts:[\"give up\",\"gave up\",\"give up on\",\"had given up\"],ans:1},\r\n      {q:\"What he did was ___ the entire document.\",opts:[\"delete\",\"deleting\",\"deleted\",\"to deleting\"],ans:0},\r\n      {q:\"No sooner ___ than the lights went out.\",opts:[\"had she arrived\",\"she had arrived\",\"she arrived\",\"did she arrive\"],ans:0},\r\n      {q:\"Little ___ they know what was about to happen.\",opts:[\"did\",\"do\",\"had\",\"were\"],ans:0},\r\n      {q:\"Were he ___ the truth, the situation would be different.\",opts:[\"telling\",\"to tell\",\"told\",\"tell\"],ans:1},\r\n    ],\r\n    vocabulary: [\r\n      {q:\"'Obfuscate' means to ___\",opts:[\"clarify\",\"make unclear\",\"oppose\",\"remove\"],ans:1},\r\n      {q:\"A 'pyrrhic' victory is one that ___\",opts:[\"is overwhelmingly decisive\",\"comes at such a cost it is nearly a defeat\",\"is won through diplomacy\",\"takes a very long time\"],ans:1},\r\n      {q:\"'Disparate' means ___\",opts:[\"similar\",\"essentially different\",\"hidden\",\"unfair\"],ans:1},\r\n      {q:\"If someone is 'obdurate', they are ___\",opts:[\"flexible\",\"stubbornly resistant\",\"enthusiastic\",\"confused\"],ans:1},\r\n      {q:\"'Capricious' behaviour is ___\",opts:[\"consistent\",\"sudden and unpredictable\",\"careful and deliberate\",\"polite and respectful\"],ans:1},\r\n      {q:\"'Pernicious' means ___\",opts:[\"beneficial\",\"having a harmful effect\",\"unusual\",\"temporary\"],ans:1},\r\n    ],\r\n    wordChoice: [\r\n      {q:\"She ___ off the meeting until next week.\",opts:[\"put\",\"set\",\"called\",\"held\"],ans:0},\r\n      {q:\"He ___ across as arrogant in the interview, though he's actually quite kind.\",opts:[\"came\",\"got\",\"looked\",\"passed\"],ans:0},\r\n      {q:\"They ___ about significant changes to the system.\",opts:[\"brought\",\"turned\",\"came\",\"set\"],ans:0},\r\n      {q:\"The company decided to ___ out the new product gradually.\",opts:[\"roll\",\"bring\",\"turn\",\"carry\"],ans:0},\r\n      {q:\"She ___ up to her boss about the unsafe working conditions.\",opts:[\"stood\",\"held\",\"came\",\"went\"],ans:0},\r\n      {q:\"The project ___ through at the last minute thanks to extra funding.\",opts:[\"went\",\"came\",\"pulled\",\"got\"],ans:2},\r\n    ],\r\n    reading: [\r\n      {passage:\"The paradox of tolerance, as formulated by philosopher Karl Popper, states that if a society is tolerant without limit, its ability to be tolerant will eventually be seized or destroyed by the intolerant. Popper argued that unlimited tolerance leads to the disappearance of tolerance itself. He did not advocate suppressing all unpopular views, but suggested that societies should not tolerate movements that aim to suppress the tolerance of others. The challenge lies in determining where the boundary falls \u2014 excessive restriction threatens freedom, while insufficient restriction threatens the very foundation of a free society.\",q:\"What is the central tension that Popper identifies?\",opts:[\"Freedom vs security\",\"The need to limit tolerance to preserve tolerance\",\"Government power vs individual rights\",\"Tradition vs progress\"],ans:1},\r\n      {passage:\"When James started his new job, his manager told him the company had an 'open-door policy' and encouraged everyone to speak up. But when James raised a concern about unrealistic deadlines, his colleagues warned him that people who complained were quietly sidelined. Within months, he noticed that the employees who challenged decisions were left out of key meetings, while those who stayed silent were promoted. James began to wonder whether the open-door policy was genuine or merely performative.\",q:\"What does James conclude about the company's open-door policy?\",opts:[\"It is well-implemented\",\"It may exist in name only\",\"It only applies to senior staff\",\"It has improved deadlines\"],ans:1},\r\n      {passage:\"The concept of 'moral hazard' in economics describes a situation where an actor takes greater risks because the costs of those risks are borne by someone else. It explains why banks that expect government bailouts may engage in reckless lending, or why fully insured patients may overuse medical services. Critics of the concept argue that it oversimplifies human motivation, assuming people are purely rational calculators of risk. Yet its influence on policy \u2014 from insurance design to financial regulation \u2014 remains profound.\",q:\"According to the text, what is the main criticism of the moral hazard concept?\",opts:[\"It is too complex to be useful\",\"It ignores government responsibility\",\"It oversimplifies human motivation\",\"It only applies to banking\"],ans:2},\r\n      {passage:\"In her seminal work on silence, cultural theorist Susan Sontag argued that silence in art is never truly empty. A blank canvas, a pause in music, an unsaid word \u2014 each communicates something, even if that something is refusal or defiance. Silence, in her view, is a form of speech, a deliberate gesture that gains meaning precisely through what it withholds. This perspective challenges the assumption that communication requires expression, suggesting instead that restraint can be its most powerful form.\",q:\"What does Sontag believe about silence in art?\",opts:[\"It is a failure to communicate\",\"It communicates through deliberate withholding\",\"It has no meaning\",\"It is always negative\"],ans:1},\r\n      {passage:\"The replication crisis in psychology has called into question decades of published research. Many celebrated findings, from ego depletion to power posing, have failed to replicate under more rigorous conditions. The causes are systemic: publication bias favouring novel and statistically significant results, small sample sizes, and questionable research practices such as p-hacking. Reform efforts \u2014 including pre-registration, larger samples, and open data \u2014 are reshaping the field, but some worry that the emphasis on replication may discourage creative, exploratory research that pushes boundaries.\",q:\"What concern is raised about the reform movement in psychology?\",opts:[\"It costs too much\",\"It may discourage creative exploratory research\",\"It is too slow\",\"It favours old research\"],ans:1},\r\n      {passage:\"Amina had been living in London for three years but still struggled with small talk. Back home in Lagos, conversations flowed easily \u2014 you asked about someone's family, their weekend, their health. In London, colleagues exchanged pleasantries about the weather and then fell silent. Amina eventually realised that what counted as 'polite' varied enormously. In Lagos, asking personal questions showed warmth; in London, the same questions could feel intrusive. She learned to adjust her style depending on who she was speaking to, but she sometimes missed the easy warmth of home.\",q:\"What does Amina learn about small talk?\",opts:[\"Londoners are rude\",\"The same behaviour can be polite in one culture and intrusive in another\",\"She should stop asking personal questions entirely\",\"Small talk is unimportant\"],ans:1},\r\n    ],\r\n  },\r\n  C2: {\r\n    grammar: [\r\n      {q:\"Only then ___ the full extent of the damage.\",opts:[\"did they realise\",\"they realised\",\"they did realise\",\"realised they\"],ans:0},\r\n      {q:\"Had she known about the delay, she ___ the earlier train.\",opts:[\"would catch\",\"would have caught\",\"will catch\",\"had caught\"],ans:1},\r\n      {q:\"It is not so much his ability ___ his attitude that concerns me.\",opts:[\"like\",\"nor\",\"as\",\"than\"],ans:2},\r\n      {q:\"Come what ___, we shall not yield.\",opts:[\"may\",\"might\",\"can\",\"will\"],ans:0},\r\n      {q:\"The more carefully you read, ___ you will understand.\",opts:[\"the more\",\"the better\",\"more\",\"better\"],ans:0},\r\n      {q:\"Such ___ his arrogance that nobody wanted to work with him.\",opts:[\"was\",\"is\",\"had\",\"were\"],ans:0},\r\n    ],\r\n    vocabulary: [\r\n      {q:\"'Sycophantic' behaviour is ___\",opts:[\"brave and noble\",\"obsequiously flattering\",\"deeply philosophical\",\"carelessly indifferent\"],ans:1},\r\n      {q:\"A 'seminal' work is one that ___\",opts:[\"is about seeds and plants\",\"is highly influential and original\",\"is very old\",\"is difficult to understand\"],ans:1},\r\n      {q:\"'Profligate' spending is ___\",opts:[\"careful\",\"generous\",\"recklessly extravagant\",\"minimal\"],ans:2},\r\n      {q:\"'Pellucid' prose is ___\",opts:[\"confusing\",\"beautifully clear\",\"overly ornate\",\"emotionally charged\"],ans:1},\r\n      {q:\"'Inchoate' means ___\",opts:[\"fully formed\",\"in an early rudimentary stage\",\"deliberately vague\",\"carefully planned\"],ans:1},\r\n      {q:\"'Equanimity' means ___\",opts:[\"extreme anger\",\"calmness under pressure\",\"physical strength\",\"quick movement\"],ans:1},\r\n    ],\r\n    wordChoice: [\r\n      {q:\"The politician ___ around the issue without ever giving a straight answer.\",opts:[\"danced\",\"spoke\",\"talked\",\"moved\"],ans:0},\r\n      {q:\"She ___ to the occasion when the crisis hit.\",opts:[\"rose\",\"raised\",\"arose\",\"stood\"],ans:0},\r\n      {q:\"His reputation was ___ by years of unanswered allegations.\",opts:[\"marked\",\"marred\",\"tinged\",\"riddled\"],ans:1},\r\n      {q:\"The policy has ___ more problems than it solved.\",opts:[\"created\",\"bred\",\"engendered\",\"spawned\"],ans:3},\r\n      {q:\"She ___ her mind and decided to study law instead of medicine.\",opts:[\"changed\",\"made\",\"spoke\",\"kept\"],ans:0},\r\n      {q:\"The committee ___ the proposal on the grounds that it was impractical.\",opts:[\"accepted\",\"endorsed\",\"rejected\",\"postponed\"],ans:2},\r\n    ],\r\n    reading: [\r\n      {passage:\"Walter Benjamin's concept of the 'aura' \u2014 the sense of authenticity and distance that once surrounded a work of art \u2014 has taken on new relevance in the digital age. Benjamin argued that mechanical reproduction strips art of its aura, transforming its function from ritual to politics. Yet the internet has complicated this narrative: the viral image, endlessly shared and recontextualised, paradoxically generates its own form of aura through reach and cultural resonance. The question is whether this digital aura represents a genuine transformation of aesthetic experience or merely a simulated one, in which the appearance of authenticity is itself a mass-produced effect.\",q:\"What is the central question the passage raises about the digital age?\",opts:[\"Whether mechanical reproduction is good\",\"Whether digital aura is genuine or simulated\",\"Whether art should be shared online\",\"Whether Benjamin was correct about politics\"],ans:1},\r\n      {passage:\"The anthropologist David Graeber proposed that many jobs in modern economies are 'bullshit jobs' \u2014 positions that even the people holding them consider unnecessary or pointless. He contrasted this with essential but poorly paid work, such as caregiving and cleaning, arguing that society's valuation of labour is fundamentally inverted. Critics countered that Graeber's analysis relied too heavily on subjective self-assessment: workers may feel their jobs are pointless without understanding their role in complex organisational systems. The debate highlights a deeper tension between the economic logic of employment and the psychological need for meaningful work.\",q:\"What deeper tension does Graeber's debate highlight?\",opts:[\"The need for higher wages\",\"The conflict between economic employment logic and the need for meaningful work\",\"The importance of caregiving\",\"The problem with complex organisations\"],ans:1},\r\n      {passage:\"In 'The Second Sex', Simone de Beauvoir distinguished between sex as a biological category and gender as a social construct, arguing that 'one is not born, but rather becomes, a woman.' This formulation was revolutionary in separating natural fact from cultural imposition, opening the door to analyses of how societies produce and reproduce gendered subjects. Subsequent theorists have pushed further: Judith Butler argued that even biological sex is discursively produced, while materialist feminists insist that the sex\/gender distinction obscures the embodied reality of sexual difference. The debate remains unresolved, but its stakes \u2014 for law, medicine, politics, and identity \u2014 could hardly be higher.\",q:\"What does the passage suggest about the sex\/gender debate?\",opts:[\"De Beauvoir's distinction is now universally accepted\",\"The debate is resolved in favour of Butler\",\"The debate has very high practical stakes despite being unresolved\",\"Materialist feminists have proven de Beauvoir wrong\"],ans:2},\r\n      {passage:\"The historian Hayden White argued that historical narratives impose a literary structure on the past, selecting and arranging events according to rhetorical conventions borrowed from fiction. This does not mean that history is fiction, but that the form of historical writing \u2014 emplotment, argument, and ideological implication \u2014 shapes what can be known. White's critics worried that his approach verged on relativism, undermining the claim that historical accounts can be judged by their fidelity to evidence. White countered that acknowledging the literary dimension of historiography does not deny the reality of the past, only the transparency of the means by which we access it.\",q:\"What is White's key argument about historical writing?\",opts:[\"History is just fiction\",\"Historical narratives use literary structures that shape understanding\",\"Historical evidence is unreliable\",\"Historians should write like novelists\"],ans:1},\r\n      {passage:\"When Nadia took over as head of a struggling department, she noticed that most communication happened via formal emails, even for simple questions. Decisions took days because nothing moved without a meeting. She introduced a simple rule: if something can be resolved in a two-minute conversation, have the conversation. Within three months, the department's email volume dropped by forty percent, and project delivery times improved noticeably. Some older colleagues resisted, saying the old way ensured accountability. Nadia replied that accountability comes from results, not from the number of emails in your sent folder.\",q:\"What was the main effect of Nadia's new rule?\",opts:[\"Email volume increased\",\"The department became more efficient\",\"Colleagues stopped talking to each other\",\"She fired the older staff\"],ans:1},\r\n      {passage:\"In the philosophy of language, the distinction between sense and reference \u2014 Sinn and Bedeutung \u2014 introduced by Frege, addresses a curious puzzle: how can two expressions that refer to the same object differ in cognitive value? The morning star and the evening star both refer to Venus, yet 'The morning star is the evening star' is a discovery, not a trivial truth. Frege's answer was that alongside its referent, an expression carries a sense \u2014 a mode of presentation \u2014 that contributes to meaning. This distinction has proven remarkably durable, though philosophers continue to debate whether sense should be understood as a psychological, semantic, or structural phenomenon.\",q:\"What puzzle does Frege's distinction between sense and reference aim to solve?\",opts:[\"Why Venus has two names\",\"How expressions referring to the same object can differ in cognitive value\",\"Whether language refers to reality\",\"How to translate between languages\"],ans:1},\r\n    ],\r\n  },\r\n};\r\n\r\nconst LEVELS = ['A1','A2','B1','B2','C1','C2'];\r\nconst LEVEL_NAMES = {A1:'Beginner',A2:'Elementary',B1:'Intermediate',B2:'Upper Intermediate',C1:'Advanced',C2:'Proficient'};\r\nconst LEVEL_DESCS = {\r\n  A1:'You can understand and use familiar everyday expressions and basic phrases. You can introduce yourself and ask simple questions.',\r\n  A2:'You can communicate in routine tasks and describe simple aspects of your background and immediate environment.',\r\n  B1:'You can deal with most travel and work situations. You can describe experiences and give reasons for opinions.',\r\n  B2:'You can interact with fluency and spontaneity. You can produce clear, detailed text on a wide range of subjects.',\r\n  C1:'You can express ideas fluently and spontaneously. You can use language flexibly for social, academic, and professional purposes.',\r\n  C2:'You can understand virtually everything heard or read with ease. You can express yourself spontaneously, very fluently, and precisely.',\r\n};\r\nconst CATS = ['grammar','vocabulary','wordChoice','reading'];\r\nconst CAT_LABELS = {grammar:'Grammar',vocabulary:'Vocabulary',wordChoice:'Word Choice',reading:'Reading'};\r\n\r\n\/\/ \u2500\u2500\u2500 Redistribute correct answers evenly across A\/B\/C\/D \u2500\u2500\u2500\r\nfunction redistributeAnswers(questions) {\r\n  let pos = 0;\r\n  const positions = [0,1,2,3];\r\n  for (const lv of LEVELS) {\r\n    for (const cat of CATS) {\r\n      for (const q of questions[lv][cat]) {\r\n        const target = positions[pos % 4];\r\n        pos++;\r\n        if (q.ans !== target) {\r\n          const tmp = q.opts[target];\r\n          q.opts[target] = q.opts[q.ans];\r\n          q.opts[q.ans] = tmp;\r\n          q.ans = target;\r\n        }\r\n      }\r\n    }\r\n  }\r\n  return questions;\r\n}\r\n\r\nconst QUESTIONS = redistributeAnswers(RAW_QUESTIONS);\r\n\r\n\/\/ \u2500\u2500\u2500 State \u2500\u2500\u2500\r\nlet state = {\r\n  started: false,\r\n  done: false,\r\n  questions: [],\r\n  currentQ: 0,\r\n  correct: 0,\r\n  wrong: 0,\r\n  levelWrong: 0,\r\n  answers: [],\r\n  results: {},\r\n  levelSizes: {},\r\n};\r\n\r\nfunction shuffle(arr) {\r\n  const a = [...arr];\r\n  for (let i = a.length - 1; i > 0; i--) {\r\n    const j = Math.floor(Math.random() * (i + 1));\r\n    [a[i], a[j]] = [a[j], a[i]];\r\n  }\r\n  return a;\r\n}\r\n\r\n\/\/ Pick 5 questions per level: 1 from each of 4 categories + 1 random from any category\r\nfunction buildQuestions() {\r\n  const qs = [];\r\n  const levelSizes = {};\r\n  for (const lv of LEVELS) {\r\n    const lvQs = [];\r\n    const usedIndices = {};\r\n    for (const cat of CATS) usedIndices[cat] = [];\r\n\r\n    \/\/ Pick 1 from each category\r\n    for (const cat of CATS) {\r\n      const pool = QUESTIONS[lv][cat];\r\n      const idx = Math.floor(Math.random() * pool.length);\r\n      usedIndices[cat].push(idx);\r\n      lvQs.push(Object.assign({}, pool[idx], {level: lv, cat: cat}));\r\n    }\r\n\r\n    \/\/ Pick 1 more from a random category (different question than already picked)\r\n    const extraCat = CATS[Math.floor(Math.random() * CATS.length)];\r\n    const extraPool = QUESTIONS[lv][extraCat];\r\n    const available = [];\r\n    for (let i = 0; i < extraPool.length; i++) {\r\n      if (!usedIndices[extraCat].includes(i)) available.push(i);\r\n    }\r\n    if (available.length > 0) {\r\n      const extraIdx = available[Math.floor(Math.random() * available.length)];\r\n      lvQs.push(Object.assign({}, extraPool[extraIdx], {level: lv, cat: extraCat}));\r\n    }\r\n\r\n    const shuffled = shuffle(lvQs);\r\n    levelSizes[lv] = shuffled.length;\r\n    qs.push(...shuffled);\r\n  }\r\n  return { questions: qs, levelSizes: levelSizes };\r\n}\r\n\r\nfunction initTest() {\r\n  const built = buildQuestions();\r\n  state.questions = built.questions;\r\n  state.levelSizes = built.levelSizes;\r\n  state.currentQ = 0;\r\n  state.correct = 0;\r\n  state.wrong = 0;\r\n  state.levelWrong = 0;\r\n  state.answers = [];\r\n  state.results = {};\r\n  for (const lv of LEVELS) state.results[lv] = { correct: 0, total: 0 };\r\n  state.done = false;\r\n  state.started = true;\r\n}\r\n\r\n\/\/ \u2500\u2500\u2500 Rendering \u2500\u2500\u2500\r\nfunction render() {\r\n  const app = document.getElementById('app');\r\n  if (state.done) return renderResults(app);\r\n  if (!state.started) return renderStart(app);\r\n  renderQuestion(app);\r\n}\r\n\r\nfunction renderStart(app) {\r\n  app.innerHTML = '<div class=\"card\">' +\r\n    '<div class=\"start-title\">English Level Test<\/div>' +\r\n    '<div class=\"start-subtitle\">Find out your CEFR level \u2014 from A1 to C2<\/div>' +\r\n    '<div class=\"start-details\">' +\r\n      '<strong>How it works:<\/strong><br>' +\r\n      '\u2022 Questions get harder as you progress through levels<br>' +\r\n      '\u2022 The test adapts \u2014 it stops when questions become too difficult<br>' +\r\n      '\u2022 Tests grammar, vocabulary, word choice &amp; reading comprehension<br>' +\r\n      '\u2022 Focus on real-life English \u2014 everyday conversations, emails, and situations<br>' +\r\n      '\u2022 Takes roughly 8\u201310 minutes' +\r\n    '<\/div>' +\r\n    '<button class=\"btn\" onclick=\"handleStart()\">Start Test<\/button>' +\r\n  '<\/div>';\r\n}\r\n\r\nfunction handleStart() {\r\n  initTest();\r\n  render();\r\n}\r\n\r\nfunction getCurrentLevelInfo() {\r\n  const q = state.questions[state.currentQ];\r\n  if (!q) return { level: LEVELS[LEVELS.length-1], levelIdx: LEVELS.length-1, answered: 0, total: 0 };\r\n  const level = q.level;\r\n  const levelIdx = LEVELS.indexOf(level);\r\n  let answered = 0;\r\n  for (let i = 0; i < state.currentQ; i++) {\r\n    if (state.questions[i].level === level) answered++;\r\n  }\r\n  const total = state.levelSizes[level] || 0;\r\n  return { level: level, levelIdx: levelIdx, answered: answered, total: total };\r\n}\r\n\r\nfunction renderQuestion(app) {\r\n  const q = state.questions[state.currentQ];\r\n  if (!q) { endTest(); return; }\r\n  const info = getCurrentLevelInfo();\r\n  const total = state.questions.length;\r\n  const progress = (state.currentQ \/ total) * 100;\r\n  const letters = ['A','B','C','D'];\r\n\r\n  let badgesHtml = '';\r\n  for (let i = 0; i < LEVELS.length; i++) {\r\n    let cls = '';\r\n    if (i < info.levelIdx) cls = 'done';\r\n    else if (i === info.levelIdx) cls = 'active';\r\n    const r = state.results[LEVELS[i]];\r\n    if (r && r.total >= 2 && r.correct < r.total * 0.5) cls = 'failed';\r\n    badgesHtml += '<span class=\"badge ' + cls + '\">' + LEVELS[i] + '<\/span>';\r\n  }\r\n\r\n  const levelProgressPct = info.total > 0 ? (info.answered \/ info.total) * 100 : 0;\r\n  const passageHtml = q.passage ? '<div class=\"passage\">' + q.passage + '<\/div>' : '';\r\n\r\n  let optsHtml = '';\r\n  for (let i = 0; i < q.opts.length; i++) {\r\n    optsHtml += '<button class=\"option-btn\" onclick=\"handleAnswer(' + i + ')\">' +\r\n      '<span class=\"letter\">' + letters[i] + '<\/span>' +\r\n      '<span>' + q.opts[i] + '<\/span>' +\r\n    '<\/button>';\r\n  }\r\n\r\n  app.innerHTML = '<div class=\"card\" id=\"qcard\">' +\r\n    '<div class=\"test-header\">' +\r\n      '<div class=\"level-badges\">' + badgesHtml + '<\/div>' +\r\n      '<span style=\"font-size:13px;color:var(--muted);\">' + (state.currentQ + 1) + '\/' + total + '<\/span>' +\r\n    '<\/div>' +\r\n    '<div class=\"level-progress\">' +\r\n      '<div class=\"level-progress-label\">Level ' + info.level + ' \u2014 ' + info.answered + ' of ' + info.total + ' done<\/div>' +\r\n      '<div class=\"level-progress-bar\"><div class=\"level-progress-fill\" style=\"width:' + levelProgressPct + '%\"><\/div><\/div>' +\r\n    '<\/div>' +\r\n    '<span class=\"category-tag\">' + CAT_LABELS[q.cat] + '<\/span>' +\r\n    passageHtml +\r\n    '<div class=\"question-text\">' + q.q + '<\/div>' +\r\n    '<div class=\"options\" id=\"opts\">' + optsHtml + '<\/div>' +\r\n    '<div class=\"progress-bar\"><div class=\"progress-fill\" style=\"width:' + progress + '%\"><\/div><\/div>' +\r\n  '<\/div>';\r\n}\r\n\r\nfunction handleAnswer(idx) {\r\n  if (state.done) return;\r\n  const q = state.questions[state.currentQ];\r\n  const correct = idx === q.ans;\r\n\r\n  const btns = document.querySelectorAll('.option-btn');\r\n  btns.forEach(function(b, i) {\r\n    b.classList.add('disabled');\r\n    if (i === q.ans) b.classList.add('correct');\r\n    if (i === idx && !correct) b.classList.add('incorrect');\r\n  });\r\n\r\n  state.answers.push({ cat: q.cat, level: q.level, correct: correct });\r\n  state.results[q.level].total++;\r\n  if (correct) {\r\n    state.correct++;\r\n    state.results[q.level].correct++;\r\n  } else {\r\n    state.wrong++;\r\n    state.levelWrong++;\r\n  }\r\n\r\n  setTimeout(function() {\r\n    const card = document.getElementById('qcard');\r\n    if (card) card.classList.add('fade-out');\r\n\r\n    const nextQ = state.questions[state.currentQ + 1];\r\n\r\n    \/\/ Adaptive cutoff: 2 wrong at same level \u2192 end\r\n    if (state.levelWrong >= 2) {\r\n      setTimeout(endTest, 300);\r\n      return;\r\n    }\r\n\r\n    \/\/ If moving to a new level, reset levelWrong counter\r\n    if (nextQ && nextQ.level !== q.level) {\r\n      state.levelWrong = 0;\r\n    }\r\n\r\n    setTimeout(function() {\r\n      state.currentQ++;\r\n      if (state.currentQ >= state.questions.length) {\r\n        endTest();\r\n      } else {\r\n        render();\r\n      }\r\n    }, 300);\r\n  }, 1200);\r\n}\r\n\r\nfunction endTest() {\r\n  if (state.done) return;\r\n  state.done = true;\r\n  render();\r\n}\r\n\r\nfunction determineLevel() {\r\n  let achieved = 'A1';\r\n  for (const lv of LEVELS) {\r\n    const r = state.results[lv];\r\n    if (r && r.total > 0 && r.correct >= Math.ceil(r.total * 0.5)) {\r\n      achieved = lv;\r\n    } else {\r\n      break;\r\n    }\r\n  }\r\n  return achieved;\r\n}\r\n\r\nfunction generateComment(level, catScores) {\r\n  const parts = [];\r\n  const strengths = [];\r\n  const weaknesses = [];\r\n  for (const cat of CATS) {\r\n    const s = catScores[cat];\r\n    if (!s || s.total === 0) continue;\r\n    if (s.correct \/ s.total >= 0.75) strengths.push(CAT_LABELS[cat].toLowerCase());\r\n    else if (s.correct \/ s.total < 0.5) weaknesses.push(CAT_LABELS[cat].toLowerCase());\r\n  }\r\n\r\n  if (strengths.length > 0) {\r\n    parts.push('You show a solid grasp of ' + strengths.join(' and ') + '.');\r\n  }\r\n  if (weaknesses.length > 0) {\r\n    parts.push('You may want to focus on improving your ' + weaknesses.join(' and ') + ' skills.');\r\n  }\r\n  if (strengths.length === 0 && weaknesses.length === 0) {\r\n    parts.push('Your skills are fairly balanced across the areas tested.');\r\n  }\r\n\r\n  const levelIdx = LEVELS.indexOf(level);\r\n  if (levelIdx < LEVELS.length - 1) {\r\n    const next = LEVELS[levelIdx + 1];\r\n    parts.push('To move up to ' + next + ' (' + LEVEL_NAMES[next] + '), try engaging with more complex texts and practising the grammar patterns typical of that level.');\r\n  } else {\r\n    parts.push('You\\'ve reached the top of the scale \u2014 impressive command of English!');\r\n  }\r\n\r\n  return parts.join(' ');\r\n}\r\n\r\nfunction renderResults(app) {\r\n  const level = determineLevel();\r\n  const totalAnswered = state.answers.length;\r\n\r\n  const catScores = {};\r\n  for (const cat of CATS) catScores[cat] = { correct: 0, total: 0 };\r\n  state.answers.forEach(function(a) {\r\n    catScores[a.cat].total++;\r\n    if (a.correct) catScores[a.cat].correct++;\r\n  });\r\n\r\n  let bkHtml = '';\r\n  for (const cat of CATS) {\r\n    const s = catScores[cat];\r\n    const pct = s.total > 0 ? Math.round(s.correct \/ s.total * 100) : 0;\r\n    const color = pct >= 75 ? 'var(--correct)' : pct >= 50 ? 'var(--accent)' : 'var(--incorrect)';\r\n    bkHtml += '<div class=\"breakdown-item\">' +\r\n      '<div class=\"cat\">' + CAT_LABELS[cat] + '<\/div>' +\r\n      '<div class=\"score\">' + (s.total > 0 ? pct + '%' : '\u2014') + '<\/div>' +\r\n      '<div class=\"bar\"><div class=\"bar-fill\" style=\"width:' + pct + '%;background:' + color + '\"><\/div><\/div>' +\r\n    '<\/div>';\r\n  }\r\n\r\n  const comment = generateComment(level, catScores);\r\n\r\n  app.innerHTML = '<div class=\"card\" style=\"animation:fadeIn 0.5s ease;text-align:center;\">' +\r\n    '<div style=\"font-size:14px;color:var(--muted);text-transform:uppercase;letter-spacing:1px;margin-bottom:8px;\">Your English Level<\/div>' +\r\n    '<div class=\"result-level\">' + level + '<\/div>' +\r\n    '<div class=\"result-name\">' + LEVEL_NAMES[level] + '<\/div>' +\r\n    '<div class=\"result-desc\">' + LEVEL_DESCS[level] + '<\/div>' +\r\n    '<div class=\"breakdown\">' + bkHtml + '<\/div>' +\r\n    '<div class=\"result-comment\">' + comment + '<\/div>' +\r\n    '<div class=\"result-meta\">' + totalAnswered + ' questions \u00b7 ' + state.correct + ' correct<\/div>' +\r\n    '<button class=\"btn\" onclick=\"handleReset()\" style=\"margin-top:8px;\">Take Again<\/button>' +\r\n  '<\/div>';\r\n}\r\n\r\nfunction handleReset() {\r\n  state = { started: false, done: false, questions: [], currentQ: 0, correct: 0, wrong: 0, levelWrong: 0, answers: [], results: {}, levelSizes: {} };\r\n  render();\r\n}\r\n\r\n\/\/ Boot\r\nrender();\r\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-355","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>English Level Test - liltheteacher<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.liltheteacher.com\/?page_id=355\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"English Level Test - liltheteacher\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.liltheteacher.com\/?page_id=355\" \/>\n<meta property=\"og:site_name\" content=\"liltheteacher\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-20T16:41:59+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.liltheteacher.com\\\/?page_id=355\",\"url\":\"https:\\\/\\\/www.liltheteacher.com\\\/?page_id=355\",\"name\":\"English Level Test - liltheteacher\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.liltheteacher.com\\\/#website\"},\"datePublished\":\"2026-06-20T16:10:41+00:00\",\"dateModified\":\"2026-06-20T16:41:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.liltheteacher.com\\\/?page_id=355#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.liltheteacher.com\\\/?page_id=355\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.liltheteacher.com\\\/?page_id=355#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.liltheteacher.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"English Level Test\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.liltheteacher.com\\\/#website\",\"url\":\"https:\\\/\\\/www.liltheteacher.com\\\/\",\"name\":\"liltheteacher\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.liltheteacher.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"English Level Test - liltheteacher","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.liltheteacher.com\/?page_id=355","og_locale":"en_US","og_type":"article","og_title":"English Level Test - liltheteacher","og_url":"https:\/\/www.liltheteacher.com\/?page_id=355","og_site_name":"liltheteacher","article_modified_time":"2026-06-20T16:41:59+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.liltheteacher.com\/?page_id=355","url":"https:\/\/www.liltheteacher.com\/?page_id=355","name":"English Level Test - liltheteacher","isPartOf":{"@id":"https:\/\/www.liltheteacher.com\/#website"},"datePublished":"2026-06-20T16:10:41+00:00","dateModified":"2026-06-20T16:41:59+00:00","breadcrumb":{"@id":"https:\/\/www.liltheteacher.com\/?page_id=355#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.liltheteacher.com\/?page_id=355"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.liltheteacher.com\/?page_id=355#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.liltheteacher.com\/"},{"@type":"ListItem","position":2,"name":"English Level Test"}]},{"@type":"WebSite","@id":"https:\/\/www.liltheteacher.com\/#website","url":"https:\/\/www.liltheteacher.com\/","name":"liltheteacher","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.liltheteacher.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.liltheteacher.com\/index.php?rest_route=\/wp\/v2\/pages\/355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.liltheteacher.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.liltheteacher.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.liltheteacher.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liltheteacher.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=355"}],"version-history":[{"count":8,"href":"https:\/\/www.liltheteacher.com\/index.php?rest_route=\/wp\/v2\/pages\/355\/revisions"}],"predecessor-version":[{"id":371,"href":"https:\/\/www.liltheteacher.com\/index.php?rest_route=\/wp\/v2\/pages\/355\/revisions\/371"}],"wp:attachment":[{"href":"https:\/\/www.liltheteacher.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}