{
  "version": "2026-11-01-unified-v1",
  "videos": {
    "python": "rfscVS0vtbw",
    "js": "PkZNo7MFNFg",
    "html": "mU6anWqZJcc",
    "git": "RGOj5yH7evk",
    "sql": "HXV3zeQKqGY",
    "react": "bMknfKXIFA8",
    "cs": "zOjov-2OZ0E",
    "algo": "8hly31xKli0",
    "api": "GZvSYJDk-us",
    "unity": "XtQMytORBmM",
    "math": "eI4an8aSsgw"
  },
  "courses": {
    "maths": {
      "id": "maths",
      "name": "Maths Journey",
      "shortName": "Maths",
      "emoji": "📐",
      "theme": "maths",
      "description": "A warm, advanced interactive maths book for curious young mathematicians.",
      "chapters": [
        {
          "id": "ch1",
          "title": "The Number System",
          "stage": "Part 1 — Numbers & Logic",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "People first needed numbers to count things: sheep, days, coins, and baskets of grain. But counting numbers alone were not enough for real life. Traders needed to talk about debt, builders needed to measure lengths that were not whole numbers, and thinkers needed a way to describe points on a line that never seemed to end. Every time life asked a bigger question, mathematics built a bigger number system.\n\nThe number system is really a story of expansion. First came counting numbers. Then zero became important because “nothing” also has to be represented. Then negative numbers helped with loss, debt, and direction. Fractions helped with sharing and measuring. Irrational numbers appeared when geometry showed that some lengths could not be written as neat fractions at all. What looks like one topic is really a map of how human thinking became more powerful."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "One of the great heroes of this story is Brahmagupta, an Indian mathematician who lived in the seventh century. He wrote clear rules for working with zero and negative numbers at a time when many people still found those ideas strange. Today zero feels ordinary, but it was once a bold idea. Brahmagupta helped turn it into a reliable mathematical tool.\n\nHis work mattered because mathematics grows when we allow it to describe more of reality. A treasure chest with 5 coins is easy to count, but what about owing 5 coins? What about having none? What about measuring the diagonal of a square, which leads to numbers like square root of 2? Maalik, the number system became powerful because mathematicians kept refusing to stop at the first set of numbers that worked."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "The number system is easier to understand if you imagine nested boxes. The smallest box is the natural numbers: 1, 2, 3, 4, and so on. They are the counting numbers. Some mathematicians include 0 with them, and some start at 1. In this book, when we need to be precise, we will treat 0 separately and say exactly what we mean.\n\nThe next box is the integers: ..., -3, -2, -1, 0, 1, 2, 3, ... . Integers include the whole numbers and their opposites. They are useful whenever direction matters, such as temperature above or below zero, floors above or below ground, or money gained and money owed.\n\nThen come rational numbers. A rational number is any number that can be written as a fraction of integers, like 3/4, -7/2, or 5 because 5 can be written as 5/1. Rational numbers include terminating decimals like 0.25 and repeating decimals like 0.333.... Irrational numbers are different: they cannot be written as a fraction of integers. Numbers like square root of 2 and pi go on forever without repeating in a fixed loop.\n\nThe largest box in this chapter is the real numbers. Real numbers are all the rational numbers and all the irrational numbers together. If you point to an ordinary place on the number line, that point represents a real number. So the number line is not just filled with whole numbers. It is packed densely with fractions, decimals, square roots, and many numbers with no simple fraction name at all."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Picture a number line with marks at -2, -1, 0, 1, and 2. Between 1 and 2, place 3/2, 1.4, and square root of 2. The picture shows a deep truth: whole numbers are only a tiny part of the line, and real numbers fill the spaces between them."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap here to watch how the number system grows from counting numbers into the full real number line.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If you stand at 0 on a number line and walk 3 steps left, what kind of number do you land on?\n2. If a decimal repeats forever in a pattern, do you think it should count as rational or irrational? Why?\n3. Is every point between 1 and 2 a fraction? What makes you unsure?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Find the smallest number set each of these belongs to: -4, 12, 7/3, and square root of 5.\n\nSteps:\n1. The number 12 is a counting number, so its smallest set here is the natural numbers.\n2. The number -4 is not natural, but it is an integer.\n3. The number 7/3 is a fraction of integers, so it is rational.\n4. The number square root of 5 cannot be written as a fraction of integers, so it is irrational.\n\nAnswer: 12 is natural, -4 is integer, 7/3 is rational, and square root of 5 is irrational.\n\nWhy it worked: We classified each number by asking for the smallest box in the nested number-system picture that contains it.\n\nProblem: Show that 0.375 is rational, and write it as a simplest fraction.\n\nSteps:\n1. Write the decimal as a fraction with a power of 10 underneath: 0.375 = 375/1000.\n2. Simplify the fraction by dividing top and bottom by 125.\n3. That gives 375/1000 = 3/8.\n\nAnswer: 0.375 = 3/8, so it is rational.\n\nWhy it worked: Any terminating decimal can be written over 10, 100, 1000, and so on. That makes it a fraction of integers, so it is rational.\n\nProblem: Explain why square root of 2 is irrational.\n\nSteps:\n1. Pretend square root of 2 is rational. Then it can be written as a/b in simplest form, where a and b are integers and b is not 0.\n2. Square both sides: 2 = a^2 / b^2, so a^2 = 2b^2.\n3. That means a^2 is even, so a must be even. Write a = 2k.\n4. Substitute back: (2k)^2 = 2b^2, so 4k^2 = 2b^2, which simplifies to b^2 = 2k^2.\n5. Now b^2 is even, so b is even too.\n6. But if both a and b are even, then a/b was not in simplest form after all. That is a contradiction.\n\nAnswer: Square root of 2 is irrational.\n\nWhy it worked: We assumed square root of 2 was a fraction, and that assumption led to an impossible situation. So the assumption had to be false."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Find the smallest number set each number belongs to: 8, -2, 3/5, and square root of 3.\n2. Which smallest set contains each of these: 0, -11, 2.75, and pi?\n### Let's Think\n1. Show that 0.125 is rational by writing it as a simplest fraction.\n2. Explain why 0.1010010001... is irrational. [Hint: look at whether the decimal repeats in a fixed pattern.]\n### Maalik's Challenge\n1. Find a rational number between square root of 2 and 1.5, and justify why it fits."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. The number 8 is natural. The number -2 is an integer. The number 3/5 is rational because it is a fraction of integers. The number square root of 3 is irrational because it cannot be written as a fraction of integers.\n2. The number 0 is an integer. The number -11 is an integer. The number 2.75 is rational because 2.75 = 275/100 = 11/4. The number pi is irrational.\n### Let's Think\n1. We write 0.125 as 125/1000. Dividing top and bottom by 125 gives 1/8. So 0.125 is rational.\n2. A rational decimal either ends or repeats in a fixed loop. The decimal 0.1010010001... keeps changing the number of zeros between the ones, so it does not settle into a repeating block. That means it is irrational.\n### Maalik's Challenge\n1. One good answer is 1.45. It is rational because 1.45 = 145/100 = 29/20. Also, square root of 2 is about 1.4142..., so 1.45 is bigger than square root of 2 and still less than 1.5."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Draw five nested boxes labelled natural, integers, rational, irrational, and real in the way that makes sense to you. Then place ten numbers from your own choosing into the smallest correct box for each one."
            }
          ]
        },
        {
          "id": "ch2",
          "title": "Prime Numbers & Factorisation",
          "stage": "Part 1 — Numbers & Logic",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Suppose you want to understand a machine. One smart way is to take it apart into its smallest important pieces. Number theory does something similar with whole numbers. Instead of gears and screws, it uses factors and prime numbers. Prime numbers are the basic building blocks from which larger whole numbers are made.\n\nThis matters because multiplication can hide structure. The number 60 looks like a single object, but inside it are 2, 2, 3, and 5 multiplied together. Once you can see that hidden structure, many things become easier: checking divisibility, finding common factors, reducing fractions, and even building modern encryption systems. Factorisation is the art of opening a number and seeing what it is really made of."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Euclid, the ancient Greek mathematician, helped make number theory feel permanent. More than two thousand years ago, he wrote clear arguments about primes and factors in *Elements*. One of the great ideas connected to his work is that every whole number greater than 1 can be built from primes in a unique way, apart from order. That statement is now called the Fundamental Theorem of Arithmetic.\n\nAnother beautiful story comes from Eratosthenes, who designed a clever method for finding primes: the sieve. You list numbers, cross out multiples of 2, then multiples of 3, then 5, and so on. What remains are primes. Maalik, that is a very mathematical move: instead of checking every number in a messy way, you build a system that reveals the pattern cleanly."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A prime number has exactly two positive factors: 1 and itself. So 2, 3, 5, 7, and 11 are prime. A composite number has more than two positive factors, so it can be broken into smaller whole-number pieces. For example, 12 is composite because 12 = 3 x 4 and also 12 = 2 x 6.\n\nPrime numbers are special because they are the atoms of the whole numbers. When you keep factorising a composite number, you eventually reach primes. For example, 84 can be broken into 2 x 42, then 2 x 2 x 21, then 2 x 2 x 3 x 7. Those final prime pieces are what really matter.\n\nThe Fundamental Theorem of Arithmetic says that every whole number greater than 1 has one prime factorisation, ignoring order. So 84 will always break down into 2 x 2 x 3 x 7. You may draw a different factor tree than someone else, but if you finish the job properly, you arrive at the same primes. That is why prime factorisation is so powerful: it is a fingerprint for the number.\n\nOnce you have prime factorisations, you can compare numbers more intelligently. Common prime pieces help you find the greatest common divisor. Taking all needed prime pieces helps you find the least common multiple. Factorisation does not just answer one question. It unlocks many."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw two pictures side by side: a factor tree for 84 ending in 2, 2, 3, and 7, and a rectangle array for 12 showing 3 rows of 4. The first picture shows hidden building blocks; the second shows why composite numbers can be arranged in different rectangular ways."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap here to watch how prime numbers act like the atoms of the whole numbers.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. Which numbers from 2 to 12 can only make a 1-by-n rectangle?\n2. Why is 1 not considered prime, even though it only has one positive factor?\n3. If two different factor trees start from 60, do you think they must end with the same prime pieces?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Write the prime factorisation of 84.\n\nSteps:\n1. Start with any factor pair, for example 84 = 2 x 42.\n2. Break 42 into 2 x 21.\n3. Break 21 into 3 x 7.\n4. All the numbers 2, 2, 3, and 7 are prime, so we stop.\n5. Write the result neatly as 84 = 2^2 x 3 x 7.\n\nAnswer: The prime factorisation of 84 is 2^2 x 3 x 7.\n\nWhy it worked: Factor trees may look different at the start, but they end with the same prime building blocks.\n\nProblem: Use prime factors to find the greatest common divisor and least common multiple of 72 and 90.\n\nSteps:\n1. Prime factorise each number.\n2. 72 = 2^3 x 3^2.\n3. 90 = 2 x 3^2 x 5.\n4. For the greatest common divisor, take only the prime factors both numbers share, with the smaller exponents: 2 x 3^2 = 18.\n5. For the least common multiple, take every prime factor needed, with the larger exponents: 2^3 x 3^2 x 5 = 360.\n\nAnswer: The greatest common divisor is 18, and the least common multiple is 360.\n\nWhy it worked: The greatest common divisor is made from the overlap. The least common multiple is made from all the prime pieces needed to build both numbers.\n\nProblem: Without multiplying everything out, decide whether N = 2^4 x 3^2 x 5 is a perfect square. If it is not, what is the smallest whole number you can multiply by to make it a perfect square?\n\nSteps:\n1. A perfect square has even exponents in its prime factorisation because squaring doubles exponents.\n2. In N, the exponent of 2 is 4, which is even.\n3. The exponent of 3 is 2, which is even.\n4. The exponent of 5 is 1, which is odd.\n5. So N is not a perfect square.\n6. To make every exponent even, multiply by one more 5.\n\nAnswer: N is not a perfect square. The smallest whole number to multiply by is 5.\n\nWhy it worked: Prime exponents reveal structure instantly. You do not need to expand the number to know whether it is a square."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Write the prime factorisation of 60.\n2. List all the prime numbers between 20 and 40.\n### Let's Think\n1. Use prime factorisation to find the greatest common divisor and least common multiple of 18 and 24.\n2. Explain why any even number greater than 2 cannot be prime.\n### Maalik's Challenge\n1. What is the smallest whole number you can multiply 450 by to make a perfect square? [Hint: look at the exponents in its prime factorisation.]"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. We can write 60 = 6 x 10 = (2 x 3) x (2 x 5) = 2^2 x 3 x 5.\n2. The primes between 20 and 40 are 23, 29, 31, and 37.\n### Let's Think\n1. First factorise: 18 = 2 x 3^2 and 24 = 2^3 x 3. The greatest common divisor uses the overlap with smaller exponents: 2 x 3 = 6. The least common multiple uses the larger exponents: 2^3 x 3^2 = 72.\n2. Any even number greater than 2 is divisible by 2 and also larger than 2, so it has at least the factors 1, 2, and itself. That means it has more than two positive factors, so it is composite, not prime.\n### Maalik's Challenge\n1. First factorise 450. We get 450 = 45 x 10 = 3^2 x 5 x 2 x 5 = 2 x 3^2 x 5^2. The exponent of 2 is odd, so 450 is not a perfect square. Multiply by 2 to get 2^2 x 3^2 x 5^2 = 900, which is a perfect square."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Create your own sieve from 2 to 100. Circle the primes, then look for patterns in the gaps between them. Write down one pattern you notice and one question you still have."
            }
          ]
        },
        {
          "id": "ch3",
          "title": "Fractions, Ratios & Percentages",
          "stage": "Part 1 — Numbers & Logic",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Whole numbers are fine until something must be shared, compared, or measured more carefully. If two pizzas are shared between three people, the answer is not “impossible.” It is a fraction. If one team wins 7 games out of 10, that is a ratio and also a percentage. If a shop gives a 15% discount, the language of parts becomes the language of money.\n\nFractions, ratios, and percentages all describe relationships. They tell us how much of a whole we have, how two quantities compare, or how many parts out of one hundred we are considering. They are different viewpoints of the same powerful idea: mathematics can compare quantities without needing them to be whole."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Euclid helped make ratio into a serious mathematical tool. In ancient geometry, ratios allowed mathematicians to compare lengths even when those lengths were awkward or impossible to measure by simple counting. A ratio says, “Do not just look at the numbers separately. Look at how they relate.” That was a huge step forward.\n\nMuch later, Simon Stevin argued that decimal notation should be used widely in everyday life. His work helped make calculations with fractions and percentages far more practical for trade, science, and engineering. Maalik, this is a lovely lesson from history: sometimes mathematics advances not by inventing a brand-new idea, but by expressing an old idea in a clearer, more usable form."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A fraction is not just “a slice of pizza.” It is a number. The fraction 3/4 means three parts when the whole is cut into four equal parts, but it also means 3 divided by 4. That is why fractions belong on the number line, not only in pictures of cakes and bars.\n\nEquivalent fractions are different names for the same number. For example, 1/2, 2/4, and 50/100 all describe the same amount. We create equivalent fractions by multiplying or dividing the numerator and denominator by the same non-zero number. Simplifying a fraction is really finding its most efficient name.\n\nA ratio compares quantities, such as 2:3. Sometimes that means part to part, and sometimes part to whole, so context matters. A percentage is a ratio out of 100. So 75% means 75 out of 100, which is also 75/100 and simplifies to 3/4. Fractions, ratios, decimals, and percentages are like different languages describing the same relationship.\n\nThe powerful habit is translation. If one form looks confusing, convert it into another form that feels clearer. A difficult percentage question may become easy as a fraction. A ratio question may become simple when you think in equal groups. Strong mathematicians move fluently between forms."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a rectangle divided into 4 equal parts with 3 shaded. Label it 3/4, 0.75, and 75%. Next to it, show a double number line for a 2:3 ratio. The picture reminds you that these ideas are all about comparing equal-sized parts or equal-sized steps."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap here to watch fractions, ratios, and percentages become three views of the same idea.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If 1/2 and 2/4 are equal, what changed and what stayed the same?\n2. If a team wins 3 games out of 5, what percentage would you guess that is?\n3. Are the ratios 2:3 and 4:6 the same comparison? How can you tell?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Which is greater, 3/4 or 5/8, and by how much?\n\nSteps:\n1. Use a common denominator of 8.\n2. Rewrite 3/4 as 6/8.\n3. Compare 6/8 and 5/8.\n4. Since 6/8 is larger, 3/4 is larger.\n5. The difference is 6/8 - 5/8 = 1/8.\n\nAnswer: 3/4 is greater than 5/8 by 1/8.\n\nWhy it worked: Fractions are easiest to compare when they are written using equal-sized parts.\n\nProblem: Blue paint and white paint are mixed in the ratio 3:4. If the total paint is 28 litres, how much of each colour is used?\n\nSteps:\n1. The ratio 3:4 has 3 + 4 = 7 total parts.\n2. If 7 parts make 28 litres, then 1 part is 28/7 = 4 litres.\n3. Blue paint is 3 parts, so blue paint is 3 x 4 = 12 litres.\n4. White paint is 4 parts, so white paint is 4 x 4 = 16 litres.\n\nAnswer: 12 litres of blue paint and 16 litres of white paint are used.\n\nWhy it worked: Ratios describe equal groups. Once you know the size of one part, the rest follows naturally.\n\nProblem: A tablet costs £120 and is reduced by 15%. What is the sale price, and how much money is saved?\n\nSteps:\n1. Find 15% of £120.\n2. Since 10% of £120 is £12, 5% is £6.\n3. So 15% is £12 + £6 = £18.\n4. Subtract the discount from the original price: £120 - £18 = £102.\n\nAnswer: The sale price is £102, and the saving is £18.\n\nWhy it worked: A percentage is just a fraction out of 100. Breaking 15% into 10% and 5% made the calculation quick and clear."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Simplify 18/24.\n2. Write 0.35 as a percentage and as a simplest fraction.\n### Let's Think\n1. In a club, the ratio of girls to boys is 5:7 and there are 36 children altogether. How many girls and how many boys are there?\n2. Which is larger: 40% of 90 or 3/8 of 96? [Hint: calculate both in the same number form.]\n### Maalik's Challenge\n1. A tank is 60% full. After 24 litres are added, it is 80% full. What is the full capacity of the tank?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Divide top and bottom of 18/24 by 6. That gives 3/4.\n2. The decimal 0.35 is 35%, because percent means out of 100. As a fraction, 0.35 = 35/100 = 7/20 in simplest form.\n### Let's Think\n1. The ratio 5:7 has 12 total parts. If 12 parts make 36 children, then 1 part is 3 children. So girls = 5 x 3 = 15 and boys = 7 x 3 = 21.\n2. Forty percent of 90 is 0.4 x 90 = 36. Also, 3/8 of 96 is 96 divided by 8 times 3, which is 12 x 3 = 36. So they are equal.\n### Maalik's Challenge\n1. The tank rises from 60% full to 80% full, so the increase is 20% of the full capacity. That 20% equals 24 litres. So 10% equals 12 litres, and 100% equals 120 litres. The full capacity is 120 litres."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Choose a real-life statistic you care about, such as football shots on target, game win rate, or time spent reading this week. Write it as a fraction, a ratio, a decimal, and a percentage."
            }
          ]
        },
        {
          "id": "ch4",
          "title": "Powers & Roots",
          "stage": "Part 1 — Numbers & Logic",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "If you multiply the same number again and again, ordinary notation becomes clumsy very quickly. Writing 2 x 2 x 2 x 2 x 2 is possible, but powers give a cleaner way: 2^5. Exponents were invented because mathematics needed a compact language for repeated multiplication, just as multiplication is a compact language for repeated addition.\n\nRoots answer the inverse question. If a square has area 49, what is its side length? If a cube has volume 64, what is its edge length? Powers build numbers up. Roots pull them apart and ask what original number created them. Together, powers and roots describe growth, shape, scale, and structure."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Archimedes loved thinking beyond ordinary size. In *The Sand Reckoner*, he showed that mathematics could describe numbers unimaginably larger than the counts people used in daily life. That kind of thinking pushes us toward powers, because powers let us express huge quantities without drowning in digits.\n\nMathematicians in India, the Islamic world, and Europe later developed increasingly efficient methods for working with powers and extracting roots. The important lesson is not just that they found answers. It is that they searched for patterns. Maalik, exponents are not random symbols on top of numbers. They are a compact map of repeated structure."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "In a power like 3^4, the number 3 is the base and the number 4 is the exponent. It means 3 x 3 x 3 x 3. So 3^4 = 81. A square is a second power, and a cube is a third power. That language comes from geometry: x^2 can represent the area of a square of side x, and x^3 can represent the volume of a cube of side x.\n\nExponents follow useful rules because repeated multiplication has structure. For example, 2^3 x 2^4 means three 2s multiplied by four more 2s, so together that makes seven 2s: 2^7. That is why when you multiply powers with the same base, you add the exponents. If you raise a power to another power, like (3^2)^4, you multiply the exponents because you are repeating a repeated multiplication.\n\nRoots reverse powers. The square root of 49 is 7 because 7^2 = 49. The cube root of 64 is 4 because 4^3 = 64. A root asks, “What number, used as a base in this power, would create the result?” Sometimes the answer is a whole number, and sometimes it is not. That is why roots connect naturally to irrational numbers.\n\nThe deep idea is that powers show how fast quantities can grow, while roots help you uncover hidden size. If a square has area 144, the side length is not found by subtraction or division. It is found by asking which number, when squared, gives 144. That kind of reverse thinking is one of mathematics' strongest habits."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw squares with side lengths 1, 2, 3, and 4, labelled with areas 1, 4, 9, and 16. Then draw a square of area 49 and ask for its side length. The diagram makes powers feel like growth and roots feel like the search for the hidden side."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap here to watch powers grow quickly and roots reverse the process.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. What does 2^4 really mean in multiplication form?\n2. If a square has area 36, what number should its side length be?\n3. If 10^3 = 1000, what do you think 10^4 should be, and why?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Simplify 2^3 x 2^5 / 2^4.\n\nSteps:\n1. Multiply the powers with the same base: 2^3 x 2^5 = 2^(3+5) = 2^8.\n2. Now divide by 2^4.\n3. Dividing powers with the same base subtracts exponents: 2^8 / 2^4 = 2^(8-4) = 2^4.\n4. Evaluate 2^4 = 16.\n\nAnswer: The expression simplifies to 16.\n\nWhy it worked: Exponent rules are shortcuts created by repeated multiplication. They are not magic; they are compressed structure.\n\nProblem: Solve x^2 = 81.\n\nSteps:\n1. We want numbers whose square is 81.\n2. Since 9^2 = 81, one solution is x = 9.\n3. Since (-9)^2 = 81 as well, the other solution is x = -9.\n\nAnswer: x = 9 or x = -9.\n\nWhy it worked: An equation asks for all values that make it true. Squaring a positive or negative number can produce the same result.\n\nProblem: What is the smallest whole number you can multiply 72 by to make a perfect square?\n\nSteps:\n1. Prime factorise 72: 72 = 2^3 x 3^2.\n2. A perfect square needs even exponents.\n3. The exponent of 3 is already 2, which is even.\n4. The exponent of 2 is 3, which is odd, so it needs one more 2.\n5. Multiply by 2 to get 72 x 2 = 144.\n6. Since 144 = 12^2, it is a perfect square.\n\nAnswer: Multiply by 2.\n\nWhy it worked: Powers reveal the hidden structure of squares. Even exponents signal a perfect square immediately."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Evaluate 5^2 and cube root of 64.\n2. Write 10,000 as a power of 10, and find square root of 121.\n### Let's Think\n1. Simplify 3^2 x 3^4 / 3^3.\n2. A square has area 196 cm^2. Find its side length.\n### Maalik's Challenge\n1. What is the smallest whole number you can multiply 48 by to make a perfect square, and what is the square root of the new product? [Hint: start with prime factors.]"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. The value of 5^2 is 25. The cube root of 64 is 4 because 4^3 = 64.\n2. The number 10,000 is 10^4. Also, square root of 121 is 11 because 11^2 = 121.\n### Let's Think\n1. First combine the powers in the numerator: 3^2 x 3^4 = 3^6. Then divide by 3^3 to get 3^(6-3) = 3^3 = 27.\n2. If the area of a square is 196 cm^2, then the side length is square root of 196, which is 14 cm.\n### Maalik's Challenge\n1. Prime factorise 48: 48 = 2^4 x 3. The exponent of 2 is even, but the exponent of 3 is odd. Multiply by 3 to get 2^4 x 3^2 = 144. The square root of 144 is 12."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Find three numbers at home or in a game that can be described by powers, such as square areas, cube stacks, or powers of 10. Then invent one “reverse” question for each using a root."
            }
          ]
        },
        {
          "id": "ch5",
          "title": "Expressions & Simplification",
          "stage": "Part 2 — Algebra",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Arithmetic is wonderful when every number is known. But what if you want a rule that works for many numbers at once? What if you want to describe the perimeter of any rectangle, the cost of any number of tickets, or the pattern in a growing shape? Then you need expressions. Expressions let mathematics talk in general, not just in one-off examples.\n\nSimplification exists because mathematical language should reveal structure, not hide it. The expression 4x + 7 + 3x - 2 looks cluttered, but 7x + 5 shows the pattern more clearly. Simplifying does not change the meaning. It gives the same idea in a stronger form, like cleaning a window so you can actually see through it."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Al-Khwarizmi, a mathematician of the ninth century, is one of the great founders of algebra. His work helped turn symbolic reasoning into a systematic subject. The word algebra comes from the Arabic word *al-jabr*, connected to restoring and balancing. That is a beautiful clue: algebra is about structure and balance.\n\nAl-Khwarizmi did not write expressions exactly the way we do today, but he helped create the habit of thinking about unknowns and general rules. Maalik, that matters because algebra is not “arithmetic with letters.” It is a language for patterns. Once you understand that language, whole families of problems become visible at once."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "An expression is a mathematical phrase made of numbers, variables, and operations. For example, 3x + 4 is an expression. It does not ask a question, so it is not an equation. It simply describes a quantity. If x changes, the value of the expression changes too.\n\nThe pieces inside an expression have names. In 5x - 2, the term 5x has coefficient 5, the variable is x, and -2 is a constant term. Like terms are terms with the same variable part, such as 3x and 8x, or 4a^2 and -a^2. We can combine like terms because they represent the same kind of thing. Three x's plus eight x's really is eleven x's.\n\nThe distributive property helps us open brackets: 3(x + 2) = 3x + 6. Think of it as multiplication reaching every term inside. This property is one of the main engines of algebra. It helps us expand expressions, remove brackets, and then combine like terms into a cleaner result.\n\nSimplifying is really a search for structure. You collect like terms, watch signs carefully, and use brackets correctly. A simplified expression is not just shorter. It is often easier to understand, compare, and use later when solving equations."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Use algebra tiles or an area model: show 3x and 2x combining into 5x, and show a rectangle with side lengths 3 and x + 2 splitting into areas 3x and 6. The picture explains both like terms and the distributive property."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap here to watch algebra turn messy expressions into clear mathematical structure.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If x stands for a number, what do x + x and 2x have in common?\n2. Why can 3x and 4x combine, but 3x and 4y cannot?\n3. If one train ticket costs p pounds, how would you write the total cost of 4 tickets plus a £3 booking fee?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Simplify 4x + 7 + 3x - 2.\n\nSteps:\n1. Group the like terms: 4x and 3x belong together, and 7 and -2 belong together.\n2. Add the x-terms: 4x + 3x = 7x.\n3. Add the constants: 7 - 2 = 5.\n\nAnswer: The simplified expression is 7x + 5.\n\nWhy it worked: We combined like terms only. The x-terms represent the same kind of quantity, and the constants represent ordinary numbers.\n\nProblem: Expand and simplify 3(2x - 5) + 4(x + 1).\n\nSteps:\n1. Distribute 3 across the first bracket: 3(2x - 5) = 6x - 15.\n2. Distribute 4 across the second bracket: 4(x + 1) = 4x + 4.\n3. Combine the results: 6x - 15 + 4x + 4.\n4. Combine like terms: 6x + 4x = 10x and -15 + 4 = -11.\n\nAnswer: The simplified expression is 10x - 11.\n\nWhy it worked: The distributive property opened the brackets, and then simplifying collected the like terms.\n\nProblem: Simplify 2(3a - 4) - [a + 5 - (2a - 1)].\n\nSteps:\n1. Expand the first bracket: 2(3a - 4) = 6a - 8.\n2. Simplify inside the square bracket carefully: a + 5 - (2a - 1) = a + 5 - 2a + 1 = -a + 6.\n3. Now subtract the whole bracket: 6a - 8 - (-a + 6).\n4. Subtracting a bracket changes the signs inside: 6a - 8 + a - 6.\n5. Combine like terms: 6a + a = 7a and -8 - 6 = -14.\n\nAnswer: The simplified expression is 7a - 14.\n\nWhy it worked: The tricky part was the negative sign in front of the bracket. Once that sign was handled correctly, the rest was ordinary simplification."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Simplify 6m + 2 + 5m - 7.\n2. Evaluate 3n + 4 when n = 5.\n### Let's Think\n1. Expand and simplify 2(3x + 4) - x.\n2. A rectangle has length x + 3 and width x. Write an expression for its perimeter and simplify it.\n### Maalik's Challenge\n1. The expression 4(2y - 1) - 3(y + 5) + 2 simplifies to ay + b. Find a and b."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Combine like terms: 6m + 5m = 11m and 2 - 7 = -5. So the simplified expression is 11m - 5.\n2. Substitute n = 5 into 3n + 4. That gives 3(5) + 4 = 15 + 4 = 19.\n### Let's Think\n1. Expand first: 2(3x + 4) = 6x + 8. Then subtract x to get 6x + 8 - x = 5x + 8.\n2. The perimeter of a rectangle is 2 times length plus 2 times width. So the perimeter is 2(x + 3) + 2x = 2x + 6 + 2x = 4x + 6.\n### Maalik's Challenge\n1. Expand and simplify: 4(2y - 1) - 3(y + 5) + 2 = 8y - 4 - 3y - 15 + 2 = 5y - 17. So a = 5 and b = -17."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Invent a real-life situation that can be modelled by an expression, such as a game score, a travel cost, or a growing pattern of tiles. Write the expression, then explain what each term means."
            }
          ]
        },
        {
          "id": "ch6",
          "title": "Equations & Inequalities",
          "stage": "Part 2 — Algebra",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Equations exist because people constantly need to describe something unknown in a precise way. If you know the total cost, the distance travelled, or the area of a shape, but one number is missing, an equation lets you trap the missing value inside logic and then uncover it step by step.\n\nInequalities are just as important. Real life is full of limits, not just exact answers: a bridge can hold at most a certain mass, a code must be longer than a minimum length, and a runner may need to finish in less than a target time. Equations describe equality; inequalities describe possibility."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "A great early algebraist, Muhammad ibn Musa al-Khwarizmi, wrote about solving equations more than a thousand years ago. He showed that unknown quantities could be handled systematically instead of guessed. His work was so influential that the word algebra comes from the title of his book, and the word algorithm comes from his name.\n\nWhat mattered was not just the answers, but the method. He helped turn mathematics into a language for reasoning about hidden numbers. Every time you solve for x, Maalik, you are using that same powerful idea: truth can be preserved while you transform a problem into a simpler one."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "An equation is like a perfectly balanced scale. If both sides have the same value, the balance is true. So when you add, subtract, multiply, or divide, you must do the same thing to both sides to keep the truth balanced.\n\nThe goal is usually to isolate the variable. If 3x + 7 = 28, you peel away the extra parts in reverse order: subtract 7 first, then divide by 3. Algebra often feels hard only when the order is muddled. Once the order is clear, it becomes clean.\n\nAn inequality is similar, but instead of saying two sides are equal, it says one side is greater or smaller. On a number line, this means a whole region of answers, not just one point.\n\nThere is one especially important rule: when you multiply or divide an inequality by a negative number, the inequality sign flips. That happens because the order of numbers reverses. For example, since 2 is greater than 1, multiplying both by -1 gives -2 and -1, and now -2 is less than -1."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Imagine a balance scale for equations and a number line for inequalities: the scale shows why both sides must be treated equally, and the number line shows why an inequality can have many solutions and why a negative multiplication reverses direction."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see how algebra turns a hidden number into a solvable puzzle.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If x + 5 = 12, what must x be so the balance stays fair?\n2. If 2x is greater than 10, what kinds of numbers can x be?\n3. Why does dividing by -2 change x < 6 into x > -3?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Solve 3x + 7 = 28.\n\nSteps: Subtract 7 from both sides: 3x = 21. Then divide both sides by 3: x = 7.\n\nAnswer: x = 7.\n\nWhy it worked: Each move kept the equation balanced. Subtracting removed the extra 7, and dividing undid the multiplication by 3.\n\nProblem: Solve 4(x - 2) + 3 = 2x + 11.\n\nSteps: Expand the left side: 4x - 8 + 3 = 2x + 11, so 4x - 5 = 2x + 11. Subtract 2x from both sides: 2x - 5 = 11. Add 5: 2x = 16. Divide by 2: x = 8.\n\nAnswer: x = 8.\n\nWhy it worked: Brackets hide structure, so expanding first makes the equation easier to compare. Then equal changes to both sides preserve the truth until x stands alone.\n\nProblem: Solve the inequality -3x + 5 < 14.\n\nSteps: Subtract 5 from both sides: -3x < 9. Divide both sides by -3, and flip the sign: x > -3.\n\nAnswer: x > -3.\n\nWhy it worked: The first step simplified the inequality. The second step isolated x, but dividing by a negative reverses the order, so the inequality sign must flip."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Solve x + 9 = 21.\n2. Solve 5x - 4 = 26.\n### Let's Think\n1. Solve 3(x + 2) = 2x + 11.\n2. Solve 4 - 2x ≥ 10.\n### Maalik's Challenge\n1. The perimeter of a rectangle is 30 cm. Its length is 3 cm more than its width. Find the length and the width."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. x + 9 = 21, so subtract 9 from both sides: x = 12.\n2. 5x - 4 = 26, so add 4: 5x = 30. Divide by 5: x = 6.\n### Let's Think\n1. 3(x + 2) = 2x + 11 becomes 3x + 6 = 2x + 11. Subtract 2x: x + 6 = 11. Subtract 6: x = 5.\n2. 4 - 2x ≥ 10. Subtract 4: -2x ≥ 6. Divide by -2 and flip the sign: x ≤ -3.\n### Maalik's Challenge\n1. Let the width be w cm. Then the length is w + 3 cm. The perimeter is 2w + 2(w + 3) = 30. So 4w + 6 = 30, then 4w = 24, so w = 6. The length is 9. The rectangle is 6 cm by 9 cm."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, invent an equation whose answer is x = 14 and an inequality whose answer set is all numbers greater than 6. Then solve your own creations to check that they work."
            }
          ]
        },
        {
          "id": "ch7",
          "title": "Quadratic Equations",
          "stage": "Part 2 — Algebra",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Linear equations are about steady change, but many important situations do not change steadily. If you build a square, its area grows with the side length squared. If something is thrown upward, its height changes in a curved way. Quadratic equations exist because reality often bends instead of moving in a straight line.\n\nThey also appear when two factors work together. If one number is multiplied by itself, or when two changing lengths create an area, a square term appears naturally. Quadratics are the mathematics of turning, curving, and area."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Long before modern textbooks, mathematicians in India, Babylon, and the Islamic world solved quadratic problems. Brahmagupta described methods for solving them, and later al-Khwarizmi explained geometric ways to understand them, especially by completing the square.\n\nThat matters because quadratics were not invented as a school exercise. They came from real questions about land, trade, geometry, and measurement. People needed to solve problems where a length times a length appeared, and quadratic thinking gave them a way."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A quadratic equation is an equation where the highest power of the variable is 2. A simple example is x^2 = 49. Because both 7^2 and (-7)^2 equal 49, the solutions are x = 7 and x = -7. That is your first clue that quadratics often have two solutions.\n\nMany quadratics can be solved by factoring. If x^2 + 5x + 6 = 0, you look for two numbers that multiply to 6 and add to 5. Those numbers are 2 and 3, so the quadratic becomes (x + 2)(x + 3) = 0.\n\nNow comes a deep idea called the zero-product property. If two numbers multiply to make 0, then at least one of them must be 0. So x + 2 = 0 or x + 3 = 0. That gives x = -2 or x = -3.\n\nQuadratics are closely connected to parabolas, the curved graphs shaped like a smile or a frown. The solutions of a quadratic equation are the x-values where the parabola crosses the x-axis."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a square of side x and add rectangles to show how x^2 + 4x + 4 becomes (x + 2)^2; beside it, sketch a parabola crossing the x-axis at its roots so the algebra and the graph tell the same story."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see why squaring creates curves and why quadratics often have two answers.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If x^2 = 25, why are there two possible values of x?\n2. Which two numbers multiply to 12 and add to 7?\n3. If a parabola crosses the x-axis twice, how many solutions does its equation have?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Solve x^2 = 36.\n\nSteps: Take square roots of both sides. Since both 6^2 and (-6)^2 equal 36, the solutions are x = 6 and x = -6.\n\nAnswer: x = 6 or x = -6.\n\nWhy it worked: Squaring removes the sign, so reversing a square usually gives two possibilities, one positive and one negative.\n\nProblem: Solve x^2 + 7x + 12 = 0.\n\nSteps: Factor the quadratic: x^2 + 7x + 12 = (x + 3)(x + 4). Apply the zero-product property: x + 3 = 0 or x + 4 = 0. So x = -3 or x = -4.\n\nAnswer: x = -3 or x = -4.\n\nWhy it worked: Factoring turned one quadratic equation into two simpler linear equations.\n\nProblem: Solve x^2 - 4x = 12.\n\nSteps: Move everything to one side: x^2 - 4x - 12 = 0. Factor: (x - 6)(x + 2) = 0. Therefore x - 6 = 0 or x + 2 = 0, so x = 6 or x = -2.\n\nAnswer: x = 6 or x = -2.\n\nWhy it worked: A quadratic is easiest to solve when it equals 0, because then factoring and the zero-product property can be used."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Solve x^2 = 49.\n2. Solve x^2 + 5x + 6 = 0.\n### Let's Think\n1. Solve x^2 - 10x + 21 = 0.\n2. A rectangle has side lengths x and x + 4, and its area is 60. Find x.\n### Maalik's Challenge\n1. A positive number multiplied by the next positive number is 72. Find the number."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. x^2 = 49, so x = 7 or x = -7.\n2. x^2 + 5x + 6 = 0 factors as (x + 2)(x + 3) = 0. So x = -2 or x = -3.\n### Let's Think\n1. x^2 - 10x + 21 = 0 factors as (x - 3)(x - 7) = 0. So x = 3 or x = 7.\n2. x(x + 4) = 60 gives x^2 + 4x - 60 = 0. This factors as (x + 10)(x - 6) = 0, so x = -10 or x = 6. Since a side length must be positive, x = 6.\n### Maalik's Challenge\n1. Let the number be n. Then n(n + 1) = 72, so n^2 + n - 72 = 0. Factor: (n + 9)(n - 8) = 0. So n = -9 or n = 8. The positive number is 8."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, choose any two whole numbers and build a quadratic equation that has them as solutions. Then expand it and check that your equation really works."
            }
          ]
        },
        {
          "id": "ch8",
          "title": "Polynomials",
          "stage": "Part 2 — Algebra",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "A polynomial is a way to describe patterns built from powers of a variable. They exist because change is often layered: there may be a constant part, a linear part, a square part, even a cube part, all working together. A single polynomial can hold that whole pattern in one expression.\n\nPolynomials are also flexible. They can model area, volume, counting patterns, motion, and approximations. Once mathematicians realised that many different problems could be expressed using the same algebraic building blocks, polynomials became one of the central languages of mathematics."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Francois Viete helped turn algebra into a symbolic language by using letters for known and unknown quantities. That made expressions far easier to study and compare. Later, Isaac Newton used polynomials in deep ways to approximate complicated behaviour and understand changing quantities.\n\nSo polynomials are not merely collections of terms. They are one of the great organising tools of mathematics. They let people describe patterns clearly, transform them, and discover hidden structure."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A polynomial is an expression made from terms like 5, 3x, 2x^2, or -7x^3, added together. The exponents must be whole numbers: 0, 1, 2, 3, and so on. That means x^-1 and √x are not polynomial terms.\n\nEach term has a coefficient and a power. In 4x^2 - 3x + 9, the coefficients are 4, -3, and 9. The highest power is 2, so the polynomial has degree 2.\n\nPolynomials behave well because like terms can be combined cleanly. You can add 3x^2 and 5x^2 to get 8x^2, but you cannot combine 3x^2 with 3x because they represent different kinds of quantities.\n\nYou can also multiply and factor polynomials. This matters because factoring helps you see structure, while multiplying helps you build structure. Maalik, this is a bit like taking apart a machine and then building one."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Show algebra tiles or an area rectangle to represent (x + 3)(x + 2), so the product x^2 + 5x + 6 appears visually as one square, five x-rectangles, and six unit squares."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see how polynomial terms combine, grow, and factor like mathematical building blocks.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. Why can 2x and 5x combine, but 2x and 5x^2 cannot?\n2. What is the degree of 7x^3 - x + 4?\n3. If (x + 2)(x + 3) is expanded, what kinds of terms should appear?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Simplify (3x^2 + 2x - 5) + (x^2 - 7x + 4).\n\nSteps: Combine like terms: 3x^2 + x^2 = 4x^2, 2x - 7x = -5x, and -5 + 4 = -1.\n\nAnswer: 4x^2 - 5x - 1.\n\nWhy it worked: Like terms have the same power of x, so they measure the same kind of quantity and can be added together.\n\nProblem: Expand (x + 3)(x - 2).\n\nSteps: Multiply each part of the first bracket by each part of the second: x·x = x^2, x·(-2) = -2x, 3·x = 3x, and 3·(-2) = -6. Then combine like terms: x^2 - 2x + 3x - 6 = x^2 + x - 6.\n\nAnswer: x^2 + x - 6.\n\nWhy it worked: Bracket multiplication distributes one expression across the other, and then like terms can be combined.\n\nProblem: Factor 2x^2 + 8x.\n\nSteps: Find the greatest common factor of both terms, which is 2x. Factor it out: 2x^2 + 8x = 2x(x + 4).\n\nAnswer: 2x(x + 4).\n\nWhy it worked: Factoring reverses multiplication. Since both terms contain 2x, pulling it outside reveals the shared structure."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Simplify (5x^2 - 3x + 1) + (2x^2 + x - 4).\n2. What is the degree of 7y^4 - 2y + 9?\n### Let's Think\n1. Expand (x + 4)(x + 1).\n2. Factor 3x^2 + 12x.\n### Maalik's Challenge\n1. Find a polynomial with roots 3 and -2."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Combine like terms: 5x^2 + 2x^2 = 7x^2, -3x + x = -2x, and 1 - 4 = -3. So the answer is 7x^2 - 2x - 3.\n2. The highest power of y is 4, so the degree is 4.\n### Let's Think\n1. (x + 4)(x + 1) = x^2 + x + 4x + 4 = x^2 + 5x + 4.\n2. The greatest common factor is 3x, so 3x^2 + 12x = 3x(x + 4).\n### Maalik's Challenge\n1. If the roots are 3 and -2, the polynomial can be written as (x - 3)(x + 2). Expanding gives x^2 - x - 6. So one correct answer is x^2 - x - 6."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, create your own polynomial with three terms, degree 3, and a negative coefficient somewhere inside it. Then simplify it after adding another polynomial of your choice."
            }
          ]
        },
        {
          "id": "ch9",
          "title": "Rational Equations",
          "stage": "Part 2 — Algebra",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Rational equations exist because many real problems involve division. Speed is distance divided by time. Density is mass divided by volume. Sharing equally means dividing a total by the number of groups. Whenever variables appear inside those divisions, rational expressions naturally arise.\n\nThese equations are especially important because they force you to think about what is allowed and what is forbidden. In a rational expression, the denominator can never be zero. So rational equations teach not only how to solve, but also how to respect the boundaries of a problem."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Diophantus, an ancient Greek mathematician, became famous for studying equations in clever and systematic ways. He was especially interested in number solutions and expressions that involved ratios. His work pushed algebra toward a more flexible style of thinking.\n\nMuch later, algebraists developed symbolic methods for handling expressions with variables in numerators and denominators. Rational equations became part of the larger idea that algebra can describe relationships, not just whole numbers, but fractions, proportions, and rates as well."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A rational expression is a fraction made from algebraic expressions, such as 3/x or (x + 2)/(x - 1). A rational equation is an equation containing one or more of these expressions.\n\nThe biggest rule comes first: the denominator cannot be zero. So before solving, you should notice any forbidden values. In 3/x, x cannot equal 0. In (x + 2)/(x - 1), x cannot equal 1.\n\nTo solve rational equations, you often clear the denominators by multiplying every term by the least common denominator. This changes the problem from a fraction puzzle into an ordinary equation.\n\nBut you are not done until you check your answer. Sometimes algebraic steps can produce an extraneous solution, which is a value that appears during the work but does not actually satisfy the original equation. Rational equations demand both skill and caution."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Show two fraction bars with a marked forbidden value on the number line, then illustrate how multiplying by the common denominator clears the fractions while still keeping the original restrictions visible."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see how algebra clears fractions while keeping forbidden values in view.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. Why is x = 0 forbidden in 5/x?\n2. What common denominator would clear 1/x + 1/2?\n3. Why should you always check a solution after solving a rational equation?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Solve 2/x = 1/3.\n\nSteps: Multiply both sides by 3x: 3x·(2/x) = 3x·(1/3). This becomes 6 = x.\n\nAnswer: x = 6.\n\nWhy it worked: Multiplying by the common denominator removes the fractions and leaves a simpler equation.\n\nProblem: Solve 1/x + 1/2 = 1.\n\nSteps: The common denominator is 2x. Multiply every term by 2x: 2 + x = 2x. Subtract x from both sides: 2 = x.\n\nAnswer: x = 2.\n\nWhy it worked: Clearing denominators turned the rational equation into a linear equation, and x = 2 does not break the denominator rule.\n\nProblem: Solve 1/(x - 3) = 2/x.\n\nSteps: The common denominator is x(x - 3). Multiply both sides: x = 2(x - 3). Expand: x = 2x - 6. Subtract x: 0 = x - 6, so x = 6. Check restrictions: x cannot be 0 or 3, so x = 6 is allowed.\n\nAnswer: x = 6.\n\nWhy it worked: Multiplying by the common denominator removed both fractions at once, and checking the final value confirmed that it was valid."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Solve 4/x = 1/2.\n2. Solve (x + 5)/x = 6.\n### Let's Think\n1. Solve 1/x + 1/3 = 2/3.\n2. Solve 2/(x - 1) = 1.\n### Maalik's Challenge\n1. Solve 1/(x - 2) + 1/(x + 2) = 1/2."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Multiply both sides by 2x: 8 = x, so x = 8.\n2. Multiply both sides by x: x + 5 = 6x. Then 5 = 5x, so x = 1. This is allowed because x is not 0.\n### Let's Think\n1. Multiply every term by 3x: 3 + x = 2x. So x = 3. Since x is not 0, this is valid.\n2. Multiply both sides by x - 1: 2 = x - 1. So x = 3. This is allowed because x is not 1.\n### Maalik's Challenge\n1. The common denominator is 2(x - 2)(x + 2). Multiplying the equation by it gives 2(x + 2) + 2(x - 2) = x^2 - 4. So 2x + 4 + 2x - 4 = x^2 - 4, which becomes 4x = x^2 - 4. Rearranging gives x^2 - 4x - 4 = 0. Using the quadratic formula or completing the square gives x = 2 ± 2√2. Neither answer is 2 or -2, so both are valid."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, invent a rational equation whose solution is x = 5 but whose forbidden value is x = 2. Then explain why 2 is forbidden even though it is not the actual answer."
            }
          ]
        },
        {
          "id": "ch10",
          "title": "Systems of Equations",
          "stage": "Part 2 — Algebra",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "A single equation can describe one condition, but many real problems come with more than one condition at once. If you know the total cost of two kinds of tickets and also the total number sold, one equation is not enough. Systems of equations exist so that several facts can work together to reveal several unknowns.\n\nA system is really a search for an answer that satisfies every condition at the same time. That idea is powerful far beyond school algebra. It appears in science, economics, engineering, coding, and logic."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Ancient Chinese mathematicians solved systems of equations centuries ago using methods that were astonishingly organised. In a text called The Nine Chapters on the Mathematical Art, they arranged numbers in rows and eliminated unknowns in a way that resembles modern linear algebra.\n\nLater, Rene Descartes connected equations to geometry by placing them on coordinate axes. That made it possible to think of a system not only as algebra, but also as the intersection of graphs. Two viewpoints, one truth."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A system of equations is a set of equations that must all be true at the same time. If the variables are x and y, the solution is usually an ordered pair such as (4, 3). That pair must satisfy every equation in the system.\n\nOne common method is substitution. If one equation already tells you y = x + 3, you can place x + 3 wherever y appears in the other equation. Then the system collapses into one equation with one variable.\n\nAnother method is elimination. You add or subtract the equations so that one variable disappears. This is often faster when the coefficients line up neatly.\n\nYou can also think graphically. Each equation represents a line. If the lines cross, the crossing point is the solution. If they are parallel, there is no solution. If they are really the same line, there are infinitely many solutions."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw two lines on a coordinate plane that cross at one point, then compare that picture with a pair of equations being solved by substitution or elimination so the intersection becomes the algebraic answer."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see how two equations can join forces to reveal one shared answer.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If x + y = 10 and x = 4, what must y be?\n2. Why is the solution to a system usually a pair of numbers instead of one number?\n3. What does it mean if two graph lines never meet?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Solve the system x + y = 13 and y = x + 3.\n\nSteps: Substitute y = x + 3 into x + y = 13: x + (x + 3) = 13. So 2x + 3 = 13, then 2x = 10, so x = 5. Now y = x + 3 = 8.\n\nAnswer: (5, 8).\n\nWhy it worked: Substitution replaced one variable using information from the other equation, turning the system into a single equation.\n\nProblem: Solve the system 2x + y = 11 and x - y = 1.\n\nSteps: Add the equations: (2x + y) + (x - y) = 11 + 1. This gives 3x = 12, so x = 4. Substitute into x - y = 1: 4 - y = 1, so y = 3.\n\nAnswer: (4, 3).\n\nWhy it worked: Adding the equations eliminated y, leaving a simpler one-variable equation.\n\nProblem: Solve the system 2x + y = 7 and 4x + 2y = 20.\n\nSteps: Multiply the first equation by 2: 4x + 2y = 14. But the second equation says 4x + 2y = 20. The same left side cannot equal both 14 and 20.\n\nAnswer: No solution.\n\nWhy it worked: The equations describe parallel lines: they have the same pattern but different totals, so they never meet."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Solve the system x + y = 9 and x - y = 1.\n2. Solve the system y = 2x + 1 and x + y = 10.\n### Let's Think\n1. Solve the system 3x + y = 17 and x - y = 3.\n2. Solve the system 2x + 3y = 16 and x + y = 7.\n### Maalik's Challenge\n1. A basket contains chickens and rabbits. There are 12 heads and 34 legs altogether. How many chickens and how many rabbits are there?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Add the equations: 2x = 10, so x = 5. Then y = 9 - 5 = 4. The solution is (5, 4).\n2. Substitute y = 2x + 1 into x + y = 10: x + 2x + 1 = 10. So 3x = 9, x = 3, and y = 7. The solution is (3, 7).\n### Let's Think\n1. Add the equations: (3x + y) + (x - y) = 17 + 3, so 4x = 20 and x = 5. Then 5 - y = 3, so y = 2. The solution is (5, 2).\n2. From x + y = 7, we get y = 7 - x. Substitute into 2x + 3y = 16: 2x + 3(7 - x) = 16. So 2x + 21 - 3x = 16, giving -x = -5 and x = 5. Then y = 2. The solution is (5, 2).\n### Maalik's Challenge\n1. Let c be the number of chickens and r be the number of rabbits. Heads give c + r = 12. Legs give 2c + 4r = 34. Divide the second equation by 2 to get c + 2r = 17. Subtract the first equation: r = 5. Then c = 7. So there are 7 chickens and 5 rabbits."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, create a system of two equations whose solution is (4, 6). Then solve it in two different ways: once by substitution and once by elimination."
            }
          ]
        },
        {
          "id": "ch11",
          "title": "Angles, Triangles & Polygons",
          "stage": "Part 3 — Geometry & Proof",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Geometry began because people needed to measure land, build safely, draw maps, and understand shapes in the sky. Angles, triangles, and polygons are the alphabet of geometry: once you can read them, you can understand buildings, bridges, tiling patterns, computer graphics, and even the paths of planets.\n\nThis chapter exists because shapes are not just pictures. They have hidden rules. A triangle's angles always add to 180 degrees. A straight line always makes 180 degrees. A full turn is 360 degrees. These facts let you solve problems without measuring everything, which is exactly the kind of logical power mathematicians love."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Euclid, who lived in ancient Alexandria over 2,000 years ago, collected geometry into one of the most important books ever written: Elements. He did not simply list facts. He built geometry from definitions, common sense ideas, and proof. That made geometry feel like a tower: each new level rested carefully on the level below.\n\nMaalik, when you solve an angle problem by reasoning instead of guessing, you are working in Euclid's spirit. You are saying, “If this is true, then that must be true.” That is the beginning of mathematical proof."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "An angle measures turn. A right angle is 90 degrees, a straight angle is 180 degrees, and a full turn is 360 degrees. When angles sit on a straight line, they add to 180 degrees. When angles meet around a point, they add to 360 degrees. Opposite angles formed by two crossing straight lines are equal.\n\nParallel lines create especially useful patterns. If a transversal cuts two parallel lines, corresponding angles are equal, alternate angles are equal, and co-interior angles add to 180 degrees. These are not random names; they describe where the angles sit.\n\nTriangles are the simplest polygons, but they are incredibly powerful. The three interior angles of any triangle add to 180 degrees. An isosceles triangle has two equal sides and two equal base angles. An equilateral triangle has three equal sides and three angles of 60 degrees.\n\nFor polygons, the interior angle sum depends on how many sides there are. An n-sided polygon can be split into n - 2 triangles, so its interior angle sum is (n - 2) × 180 degrees. That one idea turns a complicated shape into triangle logic."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Imagine drawing diagonals from one vertex of a pentagon so it splits into three triangles. Since each triangle has 180 degrees, the pentagon has 3 × 180 = 540 degrees inside; the same splitting idea works for every polygon."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see how angle facts turn shapes into solvable puzzles.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If a full turn is 360 degrees, why should angles around a point add to 360 degrees?\n2. A triangle is cut out of paper. If you tear off the three corners and place them together, what straight shape do they make?\n3. How many triangles can you make inside a hexagon by drawing diagonals from one corner?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Two angles on a straight line are 73 degrees and x degrees. Find x.\n\nSteps: Angles on a straight line add to 180 degrees, so 73 + x = 180. Subtract 73 from both sides: x = 107.\n\nAnswer: x = 107 degrees.\n\nWhy it worked: A straight line is half of a full turn, so the two angles must exactly fill 180 degrees.\n\nProblem: A triangle has angles 48 degrees, 67 degrees, and x degrees. Find x.\n\nSteps: Triangle angles add to 180 degrees, so 48 + 67 + x = 180. Since 48 + 67 = 115, we get 115 + x = 180. Therefore x = 65.\n\nAnswer: x = 65 degrees.\n\nWhy it worked: Every triangle has the same total angle sum, even if it looks long, thin, or tilted.\n\nProblem: Find the interior angle sum of a regular octagon.\n\nSteps: An octagon has n = 8 sides. The interior angle sum is (n - 2) × 180 = (8 - 2) × 180 = 6 × 180 = 1080.\n\nAnswer: The interior angle sum is 1080 degrees.\n\nWhy it worked: Drawing diagonals from one vertex splits the octagon into 6 triangles, and each triangle contributes 180 degrees."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Two angles on a straight line are 118 degrees and x degrees. Find x.\n2. A triangle has angles 39 degrees, 82 degrees, and y degrees. Find y.\n### Let's Think\n1. Find the interior angle sum of a 12-sided polygon.\n2. In an isosceles triangle, the two equal base angles are each 52 degrees. Find the third angle.\n### Maalik's Challenge\n1. A regular polygon has interior angle sum 1440 degrees. How many sides does it have?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Angles on a straight line add to 180 degrees, so x = 180 - 118 = 62 degrees.\n2. Triangle angles add to 180 degrees, so y = 180 - 39 - 82 = 59 degrees.\n### Let's Think\n1. A 12-sided polygon has interior angle sum (12 - 2) × 180 = 10 × 180 = 1800 degrees.\n2. The two base angles total 52 + 52 = 104 degrees. The third angle is 180 - 104 = 76 degrees.\n### Maalik's Challenge\n1. Use (n - 2) × 180 = 1440. Divide by 180 to get n - 2 = 8. Therefore n = 10. The polygon has 10 sides."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, draw one triangle, one pentagon, and one octagon. Split each polygon into triangles from one vertex, then write the angle sum underneath and explain it in one sentence."
            }
          ]
        },
        {
          "id": "ch12",
          "title": "Pythagoras' Theorem",
          "stage": "Part 3 — Geometry & Proof",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Pythagoras' theorem exists because right-angled triangles appear everywhere: ramps, ladders, screens, maps, roofs, and coordinate grids. If you know two sides of a right-angled triangle, the theorem lets you find the third side exactly.\n\nIt is one of the most famous theorems in mathematics because it connects shape and number. A length problem becomes a square-number problem. That bridge between geometry and algebra is one reason mathematics feels so powerful."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "The theorem is named after Pythagoras, a Greek mathematician and philosopher from around 2,500 years ago. But the idea was known in other ancient cultures too, including Babylonian and Indian mathematics. That tells us something important: great ideas are often discovered in more than one place because the world keeps asking the same deep questions.\n\nPythagoras' theorem became famous because it can be proved, not just observed. Maalik, if you measure a few right triangles, the rule looks true. But proof explains why it must always be true."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "Pythagoras' theorem says that in a right-angled triangle, a^2 + b^2 = c^2, where c is the hypotenuse. The hypotenuse is the longest side, directly opposite the right angle. The other two sides are often called the legs.\n\nThe theorem is not saying a + b = c. It is saying the squares on the two shorter sides have areas that add to the area of the square on the longest side. That is why the little 2 matters so much.\n\nIf you know the two shorter sides, square them, add, and square root the result. If you know the hypotenuse and one shorter side, square both known sides and subtract to find the missing shorter side squared.\n\nThe theorem only works for right-angled triangles. If there is no 90 degree angle, you need different tools. That detail is not a small warning; it is part of the theorem's structure."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Picture a right triangle with squares drawn on all three sides. The two smaller squares together have exactly the same area as the square on the hypotenuse, showing visually why a^2 + b^2 = c^2."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see why the squares on the sides of a right triangle fit together perfectly.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. In a right triangle, which side must be the hypotenuse?\n2. If the two shorter sides are 3 and 4, what do their squares add to?\n3. Why would 3 + 4 = 5 be the wrong reason for a 3-4-5 triangle?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: A right triangle has shorter sides 6 cm and 8 cm. Find the hypotenuse.\n\nSteps: Use a^2 + b^2 = c^2. Then 6^2 + 8^2 = c^2, so 36 + 64 = c^2. Therefore c^2 = 100, so c = 10.\n\nAnswer: The hypotenuse is 10 cm.\n\nWhy it worked: We squared the two shorter sides and found the side whose square has that total area.\n\nProblem: A right triangle has hypotenuse 13 cm and one shorter side 5 cm. Find the other shorter side.\n\nSteps: Let the missing side be x. Then x^2 + 5^2 = 13^2. So x^2 + 25 = 169. Subtract 25: x^2 = 144. Therefore x = 12.\n\nAnswer: The missing side is 12 cm.\n\nWhy it worked: The hypotenuse square is the total, so subtracting the known smaller square leaves the missing square.\n\nProblem: A rectangle is 9 m long and 12 m wide. Find the diagonal.\n\nSteps: The diagonal makes a right triangle with the length and width. So d^2 = 9^2 + 12^2 = 81 + 144 = 225. Therefore d = 15.\n\nAnswer: The diagonal is 15 m.\n\nWhy it worked: A rectangle's corner is a right angle, so the diagonal is the hypotenuse of a right triangle."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. A right triangle has shorter sides 5 cm and 12 cm. Find the hypotenuse.\n2. A right triangle has hypotenuse 17 cm and one shorter side 8 cm. Find the other shorter side.\n### Let's Think\n1. A TV screen is 20 inches wide and 15 inches high. Find its diagonal.\n2. Does a triangle with side lengths 7, 24, and 25 have a right angle? Explain.\n### Maalik's Challenge\n1. Find the exact distance from the point (2, 3) to the point (10, 9) using Pythagoras' theorem."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. c^2 = 5^2 + 12^2 = 25 + 144 = 169, so c = 13 cm.\n2. x^2 + 8^2 = 17^2, so x^2 + 64 = 289. Thus x^2 = 225, so x = 15 cm.\n### Let's Think\n1. d^2 = 20^2 + 15^2 = 400 + 225 = 625, so d = 25 inches.\n2. Check the largest side: 7^2 + 24^2 = 49 + 576 = 625, and 25^2 = 625. Yes, it is a right triangle.\n### Maalik's Challenge\n1. The horizontal change is 10 - 2 = 8. The vertical change is 9 - 3 = 6. The distance squared is 8^2 + 6^2 = 64 + 36 = 100, so the distance is 10."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Find three examples of right-angled triangles around you, such as a screen corner, a ramp, or a book cover. Measure two sides if you can, then predict the diagonal."
            }
          ]
        },
        {
          "id": "ch13",
          "title": "Circle Theorems",
          "stage": "Part 3 — Geometry & Proof",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Circles appear in wheels, clocks, gears, planets, lenses, and ripples in water. They are simple to draw but full of beautiful structure. Circle theorems exist because points on a circle are not random: they obey precise angle rules.\n\nThese theorems let you find angles without measuring them. That matters in geometry because a measured angle might be slightly wrong, but a proved angle is exact."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Ancient Greek mathematicians studied circles deeply because circles seemed perfect and mysterious. Euclid included circle results in Elements, and later mathematicians used circle geometry for astronomy, navigation, and engineering.\n\nOne of the remarkable things about circle theorems is how much they can reveal from very little information. Maalik, a single chord or tangent can unlock several hidden angles if you know where to look."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A circle is the set of all points the same distance from a fixed centre. That fixed distance is the radius. A chord joins two points on the circle. A diameter is a chord through the centre, and it is twice the radius.\n\nOne key theorem says the angle at the centre is twice the angle at the circumference when both stand on the same arc. So if an arc makes a 100 degree angle at the centre, it makes a 50 degree angle at the circumference.\n\nAnother famous theorem says the angle in a semicircle is 90 degrees. This happens because the diameter creates a straight angle of 180 degrees at the centre, so the angle at the circumference is half of that.\n\nThere are more circle facts too. Angles in the same segment are equal. Opposite angles in a cyclic quadrilateral add to 180 degrees. A tangent is perpendicular to the radius at the point where it touches the circle."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a circle with centre O, points A and B on the circle, and point C on the circumference. Show angle AOB at the centre and angle ACB at the circumference standing on the same arc, with the centre angle twice as large."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to watch the hidden angle rules of circles come alive.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. Why is every radius in the same circle the same length?\n2. If a diameter makes 180 degrees at the centre, what angle should it make at the circumference?\n3. If two angles stand on the same chord, why might they be equal?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Angle AOB at the centre of a circle is 124 degrees. Angle ACB at the circumference stands on the same arc. Find angle ACB.\n\nSteps: The angle at the centre is twice the angle at the circumference. So angle ACB = 124 ÷ 2 = 62.\n\nAnswer: Angle ACB = 62 degrees.\n\nWhy it worked: Both angles stand on the same arc AB, so the centre angle is double the circumference angle.\n\nProblem: AB is a diameter of a circle, and C is another point on the circle. Find angle ACB.\n\nSteps: The angle in a semicircle is a right angle. Since AB is the diameter, angle ACB stands on a semicircle.\n\nAnswer: Angle ACB = 90 degrees.\n\nWhy it worked: A diameter makes 180 degrees at the centre, and the circumference angle on the same arc is half of 180 degrees.\n\nProblem: A quadrilateral ABCD is cyclic. Angle A is 72 degrees. Find opposite angle C.\n\nSteps: Opposite angles in a cyclic quadrilateral add to 180 degrees. So angle C = 180 - 72 = 108.\n\nAnswer: Angle C = 108 degrees.\n\nWhy it worked: In a cyclic quadrilateral, all four vertices lie on one circle, forcing opposite angles to be supplementary."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. The angle at the centre is 86 degrees. Find the angle at the circumference on the same arc.\n2. A triangle is drawn with one side as the diameter of a circle and the third vertex on the circle. What is the angle at the third vertex?\n### Let's Think\n1. A cyclic quadrilateral has one angle of 115 degrees. Find the opposite angle.\n2. A tangent touches a circle at point T. The radius OT is drawn to T. What is the angle between the tangent and OT?\n### Maalik's Challenge\n1. In a circle, angle ABC and angle ADC stand on the same chord AC. If angle ABC = 37 degrees, find angle ADC and explain why."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. The circumference angle is half the centre angle, so it is 86 ÷ 2 = 43 degrees.\n2. The angle in a semicircle is 90 degrees, so the third-vertex angle is a right angle.\n### Let's Think\n1. Opposite angles in a cyclic quadrilateral add to 180 degrees, so the opposite angle is 180 - 115 = 65 degrees.\n2. A tangent is perpendicular to the radius at the point of contact, so the angle is 90 degrees.\n### Maalik's Challenge\n1. Angles in the same segment are equal. Since angle ABC and angle ADC stand on the same chord AC, angle ADC = 37 degrees."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Draw a large circle and place four points on it. Create one centre-angle problem, one semicircle problem, and one cyclic-quadrilateral problem for someone else to solve."
            }
          ]
        },
        {
          "id": "ch14",
          "title": "Coordinate Geometry",
          "stage": "Part 3 — Geometry & Proof",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Coordinate geometry exists because mathematicians wanted a way to connect pictures with numbers. A point on a page can be described by an ordered pair like (3, 5). A line can be described by an equation. Suddenly geometry and algebra become one language.\n\nThis idea is powerful because it lets you prove shape facts by calculation. Instead of saying “this line looks steep” or “these sides look equal,” you can use coordinates to show it exactly."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "René Descartes, a French mathematician and philosopher, helped create coordinate geometry in the 1600s. There is a famous story that he watched a fly moving on the ceiling and wondered how to describe its position using distances from the walls. Whether the story is perfectly true or not, the idea is brilliant.\n\nDescartes' work joined algebra and geometry. Maalik, every time you plot a point or graph a line, you are using that bridge between shape and symbol."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "The coordinate plane has two number lines crossing at right angles. The horizontal axis is the x-axis, and the vertical axis is the y-axis. A point (x, y) tells you how far to move across and then how far to move up or down.\n\nThe gradient of a line measures steepness. Between two points, gradient = change in y divided by change in x. If the gradient is positive, the line rises as you move right. If it is negative, the line falls.\n\nA straight line can often be written as y = mx + c. Here m is the gradient, and c is the y-intercept, where the line crosses the y-axis. This form lets you read a line's behaviour quickly.\n\nDistance on a coordinate grid comes from Pythagoras' theorem. If two points differ by 8 horizontally and 6 vertically, the distance between them is the hypotenuse of a right triangle, so it is 10."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a coordinate grid with points A(2, 3) and B(8, 6). Show the horizontal change, vertical change, and the straight-line distance as the hypotenuse of a right triangle."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see how coordinates turn geometry into algebra you can calculate.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. What does the point (4, -2) tell you to do from the origin?\n2. If a line has positive gradient, what happens as you move from left to right?\n3. Why does the distance between two points on a grid involve a right triangle?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Find the gradient of the line through A(1, 2) and B(5, 10).\n\nSteps: Change in y = 10 - 2 = 8. Change in x = 5 - 1 = 4. Gradient = 8 ÷ 4 = 2.\n\nAnswer: The gradient is 2.\n\nWhy it worked: Gradient measures rise divided by run, and the line rises 8 units while running 4 units to the right.\n\nProblem: Find the equation of a line with gradient 3 and y-intercept -4.\n\nSteps: Use y = mx + c. Here m = 3 and c = -4, so y = 3x - 4.\n\nAnswer: y = 3x - 4.\n\nWhy it worked: The form y = mx + c directly stores the line's gradient and y-intercept.\n\nProblem: Find the distance between P(2, 1) and Q(8, 9).\n\nSteps: The horizontal change is 8 - 2 = 6. The vertical change is 9 - 1 = 8. Distance squared = 6^2 + 8^2 = 36 + 64 = 100, so distance = 10.\n\nAnswer: The distance is 10 units.\n\nWhy it worked: The two changes make the legs of a right triangle, and the distance is the hypotenuse."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Plot mentally the point (-3, 4). Which direction do you move first, and then which direction?\n2. Find the gradient between (0, 1) and (4, 9).\n### Let's Think\n1. Find the equation of a line with gradient -2 and y-intercept 5.\n2. Find the distance between (1, 1) and (4, 5).\n### Maalik's Challenge\n1. The points A(1, 2), B(5, 2), and C(5, 8) form a triangle. Prove it is right-angled, then find the length of AC."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. From the origin, move 3 units left because x = -3, then 4 units up because y = 4.\n2. Change in y = 9 - 1 = 8. Change in x = 4 - 0 = 4. Gradient = 8 ÷ 4 = 2.\n### Let's Think\n1. Using y = mx + c with m = -2 and c = 5 gives y = -2x + 5.\n2. Horizontal change = 4 - 1 = 3. Vertical change = 5 - 1 = 4. Distance = square root of (3^2 + 4^2) = square root of 25 = 5.\n### Maalik's Challenge\n1. AB is horizontal because A and B have the same y-coordinate, 2. BC is vertical because B and C have the same x-coordinate, 5. A horizontal and vertical line meet at 90 degrees, so the triangle is right-angled at B. AC is the hypotenuse: horizontal change = 4 and vertical change = 6, so AC = square root of (4^2 + 6^2) = square root of 52 = 2 square root of 13."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Create your own coordinate treasure map with at least six points. Then write two gradient questions and one distance question based on your map."
            }
          ]
        },
        {
          "id": "ch15",
          "title": "Introduction to Mathematical Proof",
          "stage": "Part 3 — Geometry & Proof",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Mathematical proof exists because examples are not enough. If you test a rule 10 times, or even 10,000 times, you may feel confident, but you have not shown it is always true. A proof explains why a statement must be true in every allowed case.\n\nThis is what makes mathematics different from guessing. Proof turns patterns into knowledge. It is the reason mathematicians can trust results about numbers too large to write down and shapes too perfect to build."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Euclid is one of the great figures in the history of proof. His book Elements organised geometry into definitions, axioms, and theorems. Each theorem was proved from earlier facts, creating a chain of reasoning that influenced mathematics for thousands of years.\n\nAnother important figure is Pierre de Fermat, who wrote a simple-looking claim about powers in the margin of a book. It took mathematicians over 300 years to prove it fully. Maalik, that story shows how a statement can be easy to understand but incredibly hard to prove."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A proof is a logical argument that starts from known facts and reaches a conclusion. Every step must be justified. In ordinary life, you might say, “It seems true.” In mathematics, you must say, “It follows because...”\n\nOne common proof method is direct proof. You begin with the assumptions and move step by step to the result. For example, to prove that the sum of two even numbers is even, you can write the numbers as 2a and 2b, then show their sum is 2(a + b), which is even.\n\nAnother method is proof by contradiction. You assume the opposite of what you want to prove, then show that this assumption leads to something impossible. This method is powerful because false assumptions often break the logic.\n\nA counterexample is different from a proof. To prove a statement is always true, you need reasoning for every case. But to disprove a statement, one counterexample is enough."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Imagine a chain of stepping stones labelled assumption, known fact, logical step, logical step, conclusion. A proof is safe only if every stone is solid and none are missing."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to learn how mathematicians turn patterns into certainty.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If a rule works for the numbers 2, 4, 6, and 8, does that prove it works for every even number?\n2. What would one counterexample do to a statement that says “all numbers have this property”?\n3. Why is “the diagram looks right” weaker than a proof?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Prove that the sum of two even numbers is even.\n\nSteps: Let the two even numbers be 2a and 2b, where a and b are integers. Their sum is 2a + 2b = 2(a + b). Since a + b is an integer, 2(a + b) is even.\n\nAnswer: The sum of two even numbers is even.\n\nWhy it worked: We used the definition of even number: a number is even if it is 2 times an integer.\n\nProblem: Disprove the statement: “Every prime number is odd.”\n\nSteps: A counterexample is enough. The number 2 is prime because its only positive factors are 1 and 2. But 2 is even, not odd.\n\nAnswer: The statement is false.\n\nWhy it worked: A universal statement can be destroyed by one valid counterexample.\n\nProblem: Prove that if n is odd, then n^2 is odd.\n\nSteps: If n is odd, write n = 2k + 1 for some integer k. Then n^2 = (2k + 1)^2 = 4k^2 + 4k + 1. This equals 2(2k^2 + 2k) + 1. Since 2k^2 + 2k is an integer, n^2 is odd.\n\nAnswer: If n is odd, then n^2 is odd.\n\nWhy it worked: We rewrote n^2 in the form 2 times an integer plus 1, which is exactly the structure of an odd number."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Prove that the sum of two odd numbers is even.\n2. Give a counterexample to disprove: “All square numbers are odd.”\n### Let's Think\n1. Prove that if n is even, then n^2 is even.\n2. Is this statement true or false: “If a number is divisible by 4, then it is even”? Prove or disprove it.\n### Maalik's Challenge\n1. Prove that the sum of three consecutive integers is always divisible by 3."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Let the odd numbers be 2a + 1 and 2b + 1. Their sum is 2a + 1 + 2b + 1 = 2a + 2b + 2 = 2(a + b + 1), which is even.\n2. The number 4 is a square number because 4 = 2^2, but 4 is even. So the statement “All square numbers are odd” is false.\n### Let's Think\n1. If n is even, write n = 2k. Then n^2 = (2k)^2 = 4k^2 = 2(2k^2). Since 2k^2 is an integer, n^2 is even.\n2. The statement is true. If a number is divisible by 4, it can be written as 4k. Since 4k = 2(2k), it is 2 times an integer, so it is even.\n### Maalik's Challenge\n1. Let the three consecutive integers be n, n + 1, and n + 2. Their sum is 3n + 3 = 3(n + 1). Since n + 1 is an integer, the sum is divisible by 3."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, choose one number pattern you believe is true. Test it with examples, then try to prove it using algebra. If it fails, find the counterexample and explain what it teaches you."
            }
          ]
        },
        {
          "id": "ch16",
          "title": "Sin, Cos, Tan — What Are They Really?",
          "stage": "Part 4 — Trigonometry",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Trigonometry exists because triangles are one of the universe's favourite shapes. Whenever a sloping line, a shadow, a roof, a ramp, a wave, a rotation, or a direction appears, a triangle is often hiding inside the problem. Sin, cos, and tan are special ratios that let us measure those triangles without having to guess.\n\nMaalik, the brilliant idea is this: if two right triangles have the same sharp angle, their sides may be different sizes, but their side ratios stay the same. That means an angle has its own numerical fingerprint. Sine, cosine, and tangent are three different fingerprints of an angle."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Ancient astronomers needed trigonometry long before it was a school topic. They wanted to measure the positions of stars, the size of Earth, and the distances to faraway objects that nobody could walk to. Greek, Indian, Islamic, and later European mathematicians all developed pieces of trigonometry because the sky demanded it.\n\nOne important figure was Hipparchus, a Greek astronomer who lived more than two thousand years ago. He made early trigonometric tables to help solve astronomy problems. Later, mathematicians in India developed ideas closely related to sine, and Islamic mathematicians refined the subject into a powerful calculation tool. Trigonometry grew because people looked upward and asked, “How can we measure what is too far away to touch?”"
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "In a right triangle, choose one of the sharp angles. The side across from that angle is called the opposite side. The side next to that angle, but not the hypotenuse, is called the adjacent side. The hypotenuse is the longest side, opposite the right angle.\n\nThe three main trigonometric ratios are sine, cosine, and tangent. For an angle θ, sin θ = opposite/hypotenuse, cos θ = adjacent/hypotenuse, and tan θ = opposite/adjacent. These are not random rules; they are ratios that stay constant for the same angle in similar right triangles.\n\nFor example, every 30°-60°-90° triangle has side lengths in the ratio 1 : square root of 3 : 2. So sin 30° is always 1/2, because the side opposite 30° is half the hypotenuse. The triangle could be tiny or enormous; the ratio remains the same.\n\nA useful way to remember the ratios is SOH-CAH-TOA: Sine is Opposite over Hypotenuse, Cosine is Adjacent over Hypotenuse, Tangent is Opposite over Adjacent. But Maalik, do not stop at the memory trick. The real idea is that angles control shape."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw several right triangles with the same 35° angle but different sizes. Mark the opposite, adjacent, and hypotenuse sides. The matching angles make the triangles similar, so the ratios opposite/hypotenuse, adjacent/hypotenuse, and opposite/adjacent stay unchanged."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see how one angle creates three powerful side ratios: sine, cosine, and tangent.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If a right triangle is enlarged like a photograph, what happens to each side length?\n2. If every side doubles, what happens to the ratio opposite/hypotenuse?\n3. Why should an angle, not the triangle's size, decide the value of sin θ?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: In a right triangle, relative to angle θ, the opposite side is 3 and the hypotenuse is 5. Find sin θ.\n\nSteps:\n1. Sine means opposite divided by hypotenuse.\n2. Substitute the side lengths: sin θ = 3/5.\n\nAnswer: sin θ = 3/5.\n\nWhy it worked: The sine ratio compares the side across from the angle to the longest side of the right triangle.\n\nProblem: A right triangle has adjacent side 12 and hypotenuse 13 relative to angle θ. Find cos θ.\n\nSteps:\n1. Cosine means adjacent divided by hypotenuse.\n2. Substitute the side lengths: cos θ = 12/13.\n\nAnswer: cos θ = 12/13.\n\nWhy it worked: Cosine measures how much of the hypotenuse points along the direction adjacent to the angle.\n\nProblem: In a right triangle, the opposite side is 7 and the adjacent side is 24 relative to angle θ. Find tan θ.\n\nSteps:\n1. Tangent means opposite divided by adjacent.\n2. Substitute the side lengths: tan θ = 7/24.\n\nAnswer: tan θ = 7/24.\n\nWhy it worked: Tangent compares vertical-type change with horizontal-type change. It is closely related to steepness."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. In a right triangle, relative to angle θ, the opposite side is 5 and the hypotenuse is 13. Find sin θ.\n2. Relative to angle θ, the adjacent side is 8 and the hypotenuse is 10. Find cos θ.\n### Let's Think\n1. Relative to angle θ, the opposite side is 9 and the adjacent side is 12. Find tan θ, then simplify if possible.\n2. A right triangle has opposite side 6 and hypotenuse 10. Find the adjacent side, then find cos θ.\n### Maalik's Challenge\n1. A ramp rises 3 metres over a horizontal distance of 4 metres. Find sin θ, cos θ, and tan θ for the angle the ramp makes with the ground."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. sin θ = opposite/hypotenuse = 5/13.\n2. cos θ = adjacent/hypotenuse = 8/10 = 4/5.\n### Let's Think\n1. tan θ = opposite/adjacent = 9/12 = 3/4.\n2. Use Pythagoras: adjacent^2 + 6^2 = 10^2, so adjacent^2 + 36 = 100. Thus adjacent^2 = 64, so adjacent = 8. Then cos θ = adjacent/hypotenuse = 8/10 = 4/5.\n### Maalik's Challenge\n1. The ramp, rise, and ground form a 3-4-5 right triangle, so the hypotenuse is 5 metres. For the ground angle, opposite = 3, adjacent = 4, and hypotenuse = 5. Therefore sin θ = 3/5, cos θ = 4/5, and tan θ = 3/4."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, draw three different right triangles that all contain a 45° angle. Measure or reason about the side lengths, and explain why sin 45°, cos 45°, and tan 45° do not depend on the triangle's size."
            }
          ]
        },
        {
          "id": "ch17",
          "title": "The Unit Circle",
          "stage": "Part 4 — Trigonometry",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Right-triangle trigonometry is powerful, but it has a limit: a right triangle only gives sharp angles between 0° and 90°. Mathematicians needed sine and cosine to work for every angle, including 120°, 270°, negative angles, and angles bigger than a full turn. The unit circle makes that possible.\n\nThe unit circle is a circle with radius 1, centred at the origin on a coordinate plane. It connects rotation, coordinates, and trigonometry in one picture. Maalik, once you understand it, sine and cosine stop being only triangle ratios and become coordinates of motion."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "The unit circle combines ideas from geometry, astronomy, and coordinate systems. Ancient astronomers studied circular motion because planets and stars seemed to sweep around the sky. Later, René Descartes helped build coordinate geometry, where shapes could be placed on x- and y-axes and studied with algebra.\n\nThat combination was explosive. A circle could now be described with coordinates, and an angle could point to a specific location. Instead of keeping trigonometry trapped inside one triangle, mathematicians used the circle to let angles travel all the way around."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "The unit circle has radius 1. Start at the point (1, 0) and rotate counterclockwise by an angle θ. Wherever the radius lands on the circle, the x-coordinate is cos θ and the y-coordinate is sin θ.\n\nThat means cos θ tells you the horizontal coordinate, while sin θ tells you the vertical coordinate. For 0°, the point is (1, 0), so cos 0° = 1 and sin 0° = 0. For 90°, the point is (0, 1), so cos 90° = 0 and sin 90° = 1.\n\nThe unit circle also explains negative values. At 180°, the point is (-1, 0), so cos 180° = -1. At 270°, the point is (0, -1), so sin 270° = -1. The signs are not arbitrary; they come from which quadrant the point lies in.\n\nTangent also appears on the unit circle. Since tan θ = sin θ / cos θ, it is y/x when x is not zero. At 90° and 270°, x = 0, so tangent is undefined there. Division by zero is not allowed, even in trigonometry."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a coordinate plane with a circle of radius 1 centred at the origin. Mark an angle θ from the positive x-axis to a radius, then drop a vertical line to the x-axis to make a right triangle whose endpoint is labelled (cos θ, sin θ)."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to watch sine and cosine become coordinates on a circle of radius 1.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. On the unit circle, what point do you reach after turning 180° from (1, 0)?\n2. If an endpoint is below the x-axis, should its sine be positive or negative?\n3. Why does a circle of radius 1 make the hypotenuse especially simple?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Find sin 0° and cos 0° using the unit circle.\n\nSteps:\n1. A 0° rotation starts at the point (1, 0).\n2. On the unit circle, x = cos θ and y = sin θ.\n3. Therefore cos 0° = 1 and sin 0° = 0.\n\nAnswer: sin 0° = 0 and cos 0° = 1.\n\nWhy it worked: The unit circle defines cosine as the x-coordinate and sine as the y-coordinate.\n\nProblem: Find sin 180°, cos 180°, and tan 180°.\n\nSteps:\n1. A 180° rotation lands at (-1, 0).\n2. Therefore cos 180° = -1 and sin 180° = 0.\n3. tan 180° = sin 180° / cos 180° = 0 / (-1) = 0.\n\nAnswer: sin 180° = 0, cos 180° = -1, and tan 180° = 0.\n\nWhy it worked: The point at 180° has y-coordinate 0 and x-coordinate -1, and tangent is sine divided by cosine.\n\nProblem: An angle has unit-circle point (3/5, 4/5). Find sin θ, cos θ, and tan θ.\n\nSteps:\n1. The x-coordinate is cos θ, so cos θ = 3/5.\n2. The y-coordinate is sin θ, so sin θ = 4/5.\n3. tan θ = sin θ / cos θ = (4/5) / (3/5) = 4/3.\n\nAnswer: sin θ = 4/5, cos θ = 3/5, and tan θ = 4/3.\n\nWhy it worked: On the unit circle, coordinates directly give cosine and sine, and their ratio gives tangent."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Use the unit circle to find sin 90° and cos 90°.\n2. Use the unit circle to find sin 270° and cos 270°.\n### Let's Think\n1. If a unit-circle point is (-5/13, 12/13), find sin θ, cos θ, and tan θ.\n2. Explain why tan 90° is undefined.\n### Maalik's Challenge\n1. A point on the unit circle has x-coordinate 8/17 and is in the fourth quadrant. Find its y-coordinate, then give sin θ, cos θ, and tan θ."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. At 90°, the point is (0, 1), so sin 90° = 1 and cos 90° = 0.\n2. At 270°, the point is (0, -1), so sin 270° = -1 and cos 270° = 0.\n### Let's Think\n1. Since x = cos θ and y = sin θ, cos θ = -5/13 and sin θ = 12/13. Then tan θ = (12/13)/(-5/13) = -12/5.\n2. At 90°, cos 90° = 0. Since tan θ = sin θ / cos θ, tan 90° would require division by zero, so it is undefined.\n### Maalik's Challenge\n1. On the unit circle, x^2 + y^2 = 1. So (8/17)^2 + y^2 = 1, giving 64/289 + y^2 = 289/289. Thus y^2 = 225/289, so y = ±15/17. In the fourth quadrant y is negative, so y = -15/17. Therefore cos θ = 8/17, sin θ = -15/17, and tan θ = (-15/17)/(8/17) = -15/8."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, sketch a unit circle and label the points for 0°, 90°, 180°, and 270°. Then explain the sine and cosine values at each point as coordinates, not as memorised facts."
            }
          ]
        },
        {
          "id": "ch18",
          "title": "Trigonometric Identities",
          "stage": "Part 4 — Trigonometry",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "A trigonometric identity is an equation involving sine, cosine, or tangent that is true for every angle where both sides make sense. Identities exist because trigonometry has many different-looking expressions that secretly say the same thing. They let mathematicians simplify, prove, and transform problems.\n\nMaalik, identities are like secret tunnels in mathematics. One expression may look complicated, but an identity can lead you to a simpler version. The most important identities come from the unit circle and the Pythagorean theorem."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "The Pythagorean theorem is ancient, but its influence reaches far into trigonometry. Once mathematicians placed a right triangle inside the unit circle, the theorem x^2 + y^2 = 1 became a statement about cosine and sine.\n\nLeonhard Euler later helped reveal even deeper relationships among trigonometric functions, exponentials, and complex numbers. You do not need Euler's most advanced ideas yet, but it is worth knowing that simple identities such as sin^2 θ + cos^2 θ = 1 are the doorway to some of the most elegant mathematics ever discovered."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "The fundamental trigonometric identity is sin^2 θ + cos^2 θ = 1. This notation means (sin θ)^2 + (cos θ)^2 = 1. It comes from the unit circle: the point at angle θ is (cos θ, sin θ), and every point on the unit circle satisfies x^2 + y^2 = 1.\n\nAnother key identity is tan θ = sin θ / cos θ, as long as cos θ is not zero. This connects tangent to sine and cosine. It means tangent is not a completely separate creature; it is built from the other two.\n\nIdentities are useful because they let you change form without changing value. For example, if you know sin θ = 3/5 and θ is in the first quadrant, then cos θ can be found using sin^2 θ + cos^2 θ = 1.\n\nA proof of an identity usually means starting with one side and using known identities to transform it into the other side. The goal is not to test one angle; it is to show the statement is always true."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw the unit circle with a radius to the point (cos θ, sin θ). Drop a vertical line to form a right triangle. The legs are cos θ and sin θ, and the hypotenuse is 1, so the Pythagorean theorem gives cos^2 θ + sin^2 θ = 1."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see why the most famous trig identity is really the Pythagorean theorem on the unit circle.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If a point is on a circle of radius 1, what must x^2 + y^2 equal?\n2. On the unit circle, what are x and y in terms of cosine and sine?\n3. Why does tan θ become impossible when cos θ = 0?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: If sin θ = 3/5 and θ is in the first quadrant, find cos θ.\n\nSteps:\n1. Use sin^2 θ + cos^2 θ = 1.\n2. Substitute sin θ = 3/5: (3/5)^2 + cos^2 θ = 1.\n3. So 9/25 + cos^2 θ = 1.\n4. Therefore cos^2 θ = 16/25.\n5. In the first quadrant cosine is positive, so cos θ = 4/5.\n\nAnswer: cos θ = 4/5.\n\nWhy it worked: The Pythagorean identity links sine and cosine for the same angle.\n\nProblem: Simplify (1 - sin^2 θ)/cos θ, assuming cos θ is not zero.\n\nSteps:\n1. From sin^2 θ + cos^2 θ = 1, we get 1 - sin^2 θ = cos^2 θ.\n2. Replace the numerator: (1 - sin^2 θ)/cos θ = cos^2 θ / cos θ.\n3. Since cos θ is not zero, divide to get cos θ.\n\nAnswer: cos θ.\n\nWhy it worked: The expression looked more complicated than it really was; the Pythagorean identity revealed the hidden cos^2 θ.\n\nProblem: Show that sin θ / cos θ = tan θ.\n\nSteps:\n1. In a right triangle, sin θ = opposite/hypotenuse.\n2. Also cos θ = adjacent/hypotenuse.\n3. Divide: sin θ / cos θ = (opposite/hypotenuse)/(adjacent/hypotenuse).\n4. The hypotenuse factors cancel, leaving opposite/adjacent.\n5. But opposite/adjacent = tan θ.\n\nAnswer: sin θ / cos θ = tan θ.\n\nWhy it worked: Dividing the sine ratio by the cosine ratio cancels the hypotenuse and leaves the tangent ratio."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. If cos θ = 5/13 and θ is in the first quadrant, find sin θ.\n2. Rewrite tan θ using sine and cosine.\n### Let's Think\n1. Simplify (1 - cos^2 θ)/sin θ, assuming sin θ is not zero.\n2. If sin θ = 12/13 and θ is in the second quadrant, find cos θ.\n### Maalik's Challenge\n1. Prove that 1 + tan^2 θ = 1/cos^2 θ, assuming cos θ is not zero."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Use sin^2 θ + cos^2 θ = 1. Then sin^2 θ + 25/169 = 1, so sin^2 θ = 144/169. In the first quadrant, sin θ = 12/13.\n2. tan θ = sin θ / cos θ, as long as cos θ is not zero.\n### Let's Think\n1. Since sin^2 θ + cos^2 θ = 1, we have 1 - cos^2 θ = sin^2 θ. So (1 - cos^2 θ)/sin θ = sin^2 θ/sin θ = sin θ.\n2. Use sin^2 θ + cos^2 θ = 1. Then 144/169 + cos^2 θ = 1, so cos^2 θ = 25/169. In the second quadrant, cosine is negative, so cos θ = -5/13.\n### Maalik's Challenge\n1. Start with the left side: 1 + tan^2 θ = 1 + (sin θ/cos θ)^2. This equals 1 + sin^2 θ/cos^2 θ. Rewrite 1 as cos^2 θ/cos^2 θ, giving (cos^2 θ + sin^2 θ)/cos^2 θ. Since cos^2 θ + sin^2 θ = 1, the expression becomes 1/cos^2 θ."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, create your own expression using sin^2 θ and cos^2 θ that secretly simplifies to 1. Then write a short proof showing why it works."
            }
          ]
        },
        {
          "id": "ch19",
          "title": "Applications of Trigonometry",
          "stage": "Part 4 — Trigonometry",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Trigonometry becomes especially exciting when it helps us measure the world. If something is too tall, too far, too steep, or moving at an angle, trigonometry gives us a way to calculate missing information from what we can measure.\n\nMaalik, this is one of the most practical parts of mathematics. A single angle and one known length can unlock a height, a distance, a direction, or a slope. Trigonometry turns triangles into measuring machines."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Eratosthenes, an ancient Greek mathematician, famously estimated the circumference of Earth using shadows and angles. He noticed that at the same time of day, sunlight made different shadow angles in different cities. From this, he reasoned about the curve of Earth itself.\n\nThat story is a perfect example of trigonometric thinking, even though the exact tools looked different from modern school formulas. The important move was to use an angle as information. Humans could not wrap a tape measure around Earth, so mathematics became the measuring tape."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "Many trigonometry applications begin by drawing a right triangle. If you know an angle and one side, you can often find another side using sine, cosine, or tangent. The key is choosing the ratio that connects the information you have with the information you want.\n\nSuppose you stand 20 metres from a tree and the angle of elevation to the top is 35°. The horizontal distance is adjacent to the angle, and the tree height is opposite. Tangent connects opposite and adjacent, so tan 35° = height/20.\n\nTrigonometry also helps with navigation. If a boat travels northeast, its motion can be split into eastward and northward parts. Cosine and sine are excellent for splitting a slanted movement into horizontal and vertical components.\n\nThe most important habit is to draw and label carefully. Mark the angle, the right angle, the known sides, and the unknown side. Then choose the ratio that uses exactly those pieces."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a person standing some distance from a tower, looking up to the top. The ground distance is adjacent, the tower height is opposite, and the line of sight is the hypotenuse, making an angle of elevation at the person's eye."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see how trigonometry measures heights, distances, slopes, and directions.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If you know a ground distance and an angle of elevation, which ratio often helps find height?\n2. If you know a hypotenuse and want the vertical part, should sine or cosine be more useful?\n3. Why is drawing the right triangle usually the first step?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Maalik stands 10 metres from a wall. The angle of elevation to the top is 30°. Find the wall's height in exact form.\n\nSteps:\n1. The height is opposite the 30° angle, and the ground distance 10 is adjacent.\n2. Use tangent: tan 30° = height/10.\n3. tan 30° = 1/square root of 3.\n4. So height = 10/square root of 3 = 10 square root of 3 / 3.\n\nAnswer: The height is 10 square root of 3 / 3 metres.\n\nWhy it worked: Tangent connects the opposite side to the adjacent side, exactly matching the height and ground distance.\n\nProblem: A kite string is 50 metres long and makes a 40° angle with the ground. How high is the kite? Give an approximate answer using sin 40° ≈ 0.643.\n\nSteps:\n1. The string is the hypotenuse.\n2. The height is opposite the 40° angle.\n3. Use sine: sin 40° = height/50.\n4. height = 50 × 0.643 = 32.15.\n\nAnswer: The kite is about 32.15 metres high.\n\nWhy it worked: Sine connects the opposite side with the hypotenuse, which are the height and the kite string.\n\nProblem: A drone flies 100 metres at an angle of 20° above the horizontal. Find its horizontal distance using cos 20° ≈ 0.940.\n\nSteps:\n1. The flight path is the hypotenuse.\n2. The horizontal distance is adjacent to the 20° angle.\n3. Use cosine: cos 20° = horizontal/100.\n4. horizontal = 100 × 0.940 = 94.\n\nAnswer: The horizontal distance is about 94 metres.\n\nWhy it worked: Cosine gives the adjacent part of a slanted distance."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. A ladder 13 metres long leans against a wall and makes an angle of 60° with the ground. Write an expression for the height reached on the wall.\n2. A ramp rises 2 metres over a horizontal distance of 5 metres. Find tan θ for the angle with the ground.\n### Let's Think\n1. A tree casts a 12 metre shadow. The angle of elevation from the shadow tip to the top is 45°. Find the tree's height.\n2. A boat travels 80 km at an angle of 30° north of east. Find the eastward distance using cos 30° = square root of 3 / 2.\n### Maalik's Challenge\n1. A tower is 30 metres tall. From a point on the ground, the angle of elevation to the top is 60°. How far is the point from the base of the tower?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. The height is opposite the 60° angle and the ladder is the hypotenuse, so height = 13 sin 60° = 13 square root of 3 / 2 metres.\n2. Tangent is rise/run, so tan θ = 2/5.\n### Let's Think\n1. The height is opposite and the shadow is adjacent. tan 45° = height/12. Since tan 45° = 1, height = 12 metres.\n2. The eastward distance is adjacent to the 30° angle, so eastward distance = 80 cos 30° = 80 × square root of 3 / 2 = 40 square root of 3 km.\n### Maalik's Challenge\n1. The tower height is opposite and the ground distance d is adjacent. tan 60° = 30/d. Since tan 60° = square root of 3, square root of 3 = 30/d. Thus d = 30/square root of 3 = 10 square root of 3 metres."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, choose a tall object near you, such as a tree or building. Imagine you know your distance from it and the angle to its top. Sketch the triangle and explain which trig ratio would find its height."
            }
          ]
        },
        {
          "id": "ch20",
          "title": "What Is a Function?",
          "stage": "Part 5 — Functions & Graphs",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "A function exists because mathematics often needs to describe a rule that turns one thing into another. Put in a number, and the function gives an output. Time goes in, position comes out. Side length goes in, area comes out. Temperature in Celsius goes in, temperature in Fahrenheit comes out.\n\nMaalik, functions are one of the biggest ideas in modern mathematics because they describe relationships. Instead of solving just one problem, a function gives a rule for a whole family of problems at once."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "The word function became important as mathematicians studied motion, curves, and changing quantities. Gottfried Wilhelm Leibniz used the term in the 1600s, and later mathematicians such as Leonhard Euler helped make functions central to algebra and calculus.\n\nEuler introduced the notation f(x), which is still used everywhere. It looks simple, but it is powerful: f(x) means “the output of the function f when the input is x.” That notation lets mathematicians talk about rules clearly and flexibly."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A function is a rule that assigns each input exactly one output. The input is often called x, and the output is often called f(x) or y. For example, if f(x) = 2x + 3, then f(4) = 2 × 4 + 3 = 11.\n\nThe phrase “exactly one output” is crucial. A vending machine can be imagined as a function if each button gives one selected item. But if pressing the same button sometimes gave crisps and sometimes gave juice with no pattern, it would not behave like a function.\n\nFunctions can be shown in many ways: as formulas, graphs, tables, words, or machines. The same function f(x) = x^2 might be described as “square the input,” drawn as a U-shaped parabola, or evaluated with numbers like f(3) = 9.\n\nThe set of allowed inputs is called the domain. The possible outputs are called the range. Sometimes the domain is all real numbers, but sometimes it must be restricted. For example, if a function describes the height of a ball after it is thrown, negative time would not make sense in the real-world situation."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a function machine with numbers entering on the left, a rule box labelled “multiply by 2, then add 3,” and outputs leaving on the right. Show that input 4 produces output 11 and input -1 produces output 1."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to see how functions turn inputs into outputs using dependable rules.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If f(x) = x + 10, what does the function do to every input?\n2. Why would a rule fail to be a function if the same input could give two different outputs?\n3. Can a function have two different inputs that lead to the same output?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: If f(x) = 3x - 2, find f(5).\n\nSteps:\n1. Replace x with 5.\n2. f(5) = 3 × 5 - 2.\n3. f(5) = 15 - 2 = 13.\n\nAnswer: f(5) = 13.\n\nWhy it worked: Function notation asks for the output when the input is 5.\n\nProblem: If g(x) = x^2 + 1, find g(-4).\n\nSteps:\n1. Replace x with -4.\n2. g(-4) = (-4)^2 + 1.\n3. (-4)^2 = 16, so g(-4) = 17.\n\nAnswer: g(-4) = 17.\n\nWhy it worked: The input -4 must be substituted everywhere x appears, and squaring a negative number gives a positive result.\n\nProblem: Is the rule “input a number, output its square root” a function on the domain of non-negative real numbers if we mean the principal square root?\n\nSteps:\n1. The domain is non-negative real numbers, such as 0, 4, 9, and 2.25.\n2. The principal square root means the non-negative square root only.\n3. Each input has exactly one principal square root.\n\nAnswer: Yes, it is a function on the non-negative real numbers.\n\nWhy it worked: With the domain restricted and the principal square root specified, every input has exactly one output."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. If f(x) = 2x + 7, find f(6).\n2. If h(x) = x^2 - 5, find h(3).\n### Let's Think\n1. If p(x) = 4 - x, find p(-2) and p(10).\n2. Explain whether this rule is a function: input a person, output their current age in years.\n### Maalik's Challenge\n1. A function is defined by A(s) = s^2, where s is the side length of a square. Find A(7), then explain a sensible domain for this real-world function."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. f(6) = 2 × 6 + 7 = 12 + 7 = 19.\n2. h(3) = 3^2 - 5 = 9 - 5 = 4.\n### Let's Think\n1. p(-2) = 4 - (-2) = 6. Also p(10) = 4 - 10 = -6.\n2. Yes, if “current age in years” is measured in a clearly defined way, each person has exactly one current age. Different people may have the same age, and that is allowed.\n### Maalik's Challenge\n1. A(7) = 7^2 = 49, so the area is 49 square units. A sensible real-world domain is s > 0, because a square's side length must be positive. If allowing a degenerate square, one might allow s = 0, but ordinary squares use positive side lengths."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, invent three function machines: one using addition, one using multiplication, and one using squaring. Test each machine with inputs -2, 0, and 5, and record the outputs."
            }
          ]
        },
        {
          "id": "ch21",
          "title": "Transformations of Graphs",
          "stage": "Part 5 — Functions & Graphs",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "When mathematicians began drawing equations as pictures, they noticed something exciting: one graph could generate a whole family of relatives. A parabola could slide left, jump upward, flip upside down, or stretch taller. That mattered because real life rarely gives you the exact same pattern twice. A ball thrown from a different place, a bridge arch built higher, or a signal shifted in time all follow the same basic shape, just transformed.\n\nSo transformations are a powerful shortcut. Instead of inventing a brand-new graph from nothing, you can start with a familiar parent graph and describe exactly what changed. Maalik, that is a very grown-up mathematical habit: not only seeing objects, but noticing relationships between objects."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "René Descartes helped create coordinate geometry, the idea that numbers and pictures can speak to each other. Before that, geometry and algebra often felt like two different worlds. Descartes showed that a curve on a page could be described by an equation, and an equation could be understood as a shape.\n\nThat opened a huge door. Once mathematicians could draw equations, they began to see patterns between graphs. They saw that y = x^2, y = x^2 + 3, and y = (x - 2)^2 were not strangers at all. They were the same basic curve wearing different costumes. The lesson is beautiful: mathematics becomes easier when you notice structure instead of staring at each problem as if it were completely new."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A graph transformation is a controlled change to a graph. Think of a graph as a shape made from all the points that satisfy a rule. If the rule changes in a simple way, the whole shape moves in a simple way too.\n\nStart with a parent function, such as y = x^2 or y = |x|. If you write y = f(x) + 3, every output becomes 3 bigger, so the whole graph moves up 3 units. If you write y = f(x) - 2, every output becomes 2 smaller, so the graph moves down 2 units.\n\nHorizontal changes feel trickier at first. If you write y = f(x - 4), the graph moves right 4 units. That seems backwards, but there is a good reason: to get the old input x, the new graph must use x - 4. In the same way, y = f(x + 1) moves the graph left 1 unit.\n\nReflections and stretches change the graph's orientation or steepness. Writing y = -f(x) flips the graph across the x-axis because every output changes sign. Writing y = f(-x) flips the graph across the y-axis because every input changes sign. Writing y = 2f(x) doubles every output, so the graph stretches vertically. Writing y = f(2x) compresses the graph horizontally because the same old outputs happen sooner.\n\nThe big idea is this: outside the function usually changes outputs, while inside the function changes inputs. Outputs control up/down and vertical stretch. Inputs control left/right and horizontal stretch. That one observation saves a lot of confusion."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Picture the parent parabola y = x^2 with vertex at (0, 0). Then imagine copies of it: one moved to (2, 1), one reflected so it opens downward, and one stretched so it becomes narrower. The shapes are all related, and the diagram helps you see that the equation is really giving instructions to the same parent graph."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Watch how one parent graph turns into many related graphs by shifting, flipping, and stretching.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If y = x^2 becomes y = x^2 + 5, what happens to every y-value?\n2. If y = x^2 becomes y = (x - 3)^2, where does the vertex move?\n3. Which feels more natural to you: “outside changes outputs” or “inside changes inputs”? Test it on y = |x + 2|."
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Describe the transformation from y = x^2 to y = (x - 2)^2 + 1.\n\nSteps:\n1. The expression x - 2 is inside the square, so it changes inputs and moves the graph right 2.\n2. The +1 is outside the square, so it changes outputs and moves the graph up 1.\n3. The parent graph y = x^2 has vertex (0, 0), so the new vertex is (2, 1).\n4. The graph still opens upward because the squared term is still positive.\n\nAnswer: Shift right 2 units and up 1 unit; the new vertex is (2, 1).\n\nWhy it worked: We started with the parent parabola and read the equation as a list of instructions rather than as something completely new.\n\nProblem: Describe the transformation from y = |x| to y = -|x| + 4, and find the vertex.\n\nSteps:\n1. The negative sign is outside the absolute value, so it changes outputs.\n2. That reflects the graph across the x-axis.\n3. The +4 moves the reflected graph up 4 units.\n4. The parent graph y = |x| has vertex (0, 0), so the new vertex is (0, 4).\n5. Instead of opening upward like a V, it opens downward because of the reflection.\n\nAnswer: Reflect across the x-axis, then shift up 4 units; the vertex is (0, 4).\n\nWhy it worked: Reflection changes the direction of the graph, and the vertical shift changes where its highest or lowest point sits.\n\nProblem: Let f(x) = 2x + 1. Write g(x) = f(x + 3) - 2 in simplest form.\n\nSteps:\n1. First substitute x + 3 into f.\n2. Since f(x) = 2x + 1, we get f(x + 3) = 2(x + 3) + 1.\n3. Simplify: 2(x + 3) + 1 = 2x + 6 + 1 = 2x + 7.\n4. Now subtract 2: g(x) = 2x + 7 - 2 = 2x + 5.\n\nAnswer: g(x) = 2x + 5.\n\nWhy it worked: We followed the transformation instructions exactly. For a line, different transformations can still produce another line with the same slope, which is why the final result stays simple."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Describe the transformation from y = x^2 to y = (x + 1)^2 - 4.\n2. Describe the transformation from y = |x| to y = 2|x - 3|.\n### Let's Think\n1. For y = -(x - 2)^2 + 5, state the vertex and whether the parabola opens up or down.\n2. The points (1, 4), (2, 7), and (3, 12) lie on y = f(x). Which points lie on y = f(x - 2)?\n### Maalik's Challenge\n1. The graph y = x^2 is transformed so that the new graph has vertex (-3, 2), opens downward, and is twice as steep as the parent graph. Write its equation."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. In y = (x + 1)^2 - 4, the +1 is inside, so the graph moves left 1. The -4 is outside, so the graph moves down 4. Final answer: left 1, down 4.\n2. In y = 2|x - 3|, the x - 3 moves the graph right 3. The 2 outside doubles every output, so the graph is stretched vertically by factor 2. Final answer: right 3, vertical stretch by factor 2.\n### Let's Think\n1. The form y = -(x - 2)^2 + 5 tells us the vertex is (2, 5). The negative sign outside makes the parabola open downward.\n2. The graph y = f(x - 2) is the graph of f shifted right 2. So each x-coordinate increases by 2 while each y-coordinate stays the same. The new points are (3, 4), (4, 7), and (5, 12).\n### Maalik's Challenge\n1. Start with the parent graph y = x^2. Twice as steep means multiply by 2: y = 2x^2. Opening downward means add a negative sign: y = -2x^2. Vertex at (-3, 2) means shift left 3 and up 2, giving y = -2(x + 3)^2 + 2."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, pick one parent graph you know well, such as y = x^2 or y = |x|. Invent three transformed versions of it and describe each one in words before you write the equation. Then check whether your words and your equation really match."
            }
          ]
        },
        {
          "id": "ch22",
          "title": "Inverse Functions",
          "stage": "Part 5 — Functions & Graphs",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Sometimes the most important question is not “What comes out?” but “What had to go in?” If a machine gives you a finished answer, can you reverse the steps and recover the starting value? Merchants, astronomers, codebreakers, and scientists have all needed that kind of thinking. Inverse functions were born from the need to undo a process.\n\nIf an ordinary function is a machine, an inverse function is an undo machine. It reverses the original rule. That is incredibly useful, because real mathematics often works backwards. You know the result, and you want the cause. You know the output, and you need the input."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Leonhard Euler did not invent the idea of reversing processes, but he helped make functions into a language mathematicians could use clearly and powerfully. Once functions became a standard way to describe rules, mathematicians could talk carefully about what it means to reverse a rule.\n\nThat led to an important discovery: not every function can be reversed nicely. If one output comes from two different inputs, the undo machine gets confused. Euler and the mathematicians after him helped turn that observation into precise mathematics. The lesson is deep, Maalik: a good inverse is not just about doing algebra. It is about whether a rule keeps enough information to be reversed."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "If f(3) = 11, then the inverse function tells us f^-1(11) = 3. The original function takes 3 to 11; the inverse takes 11 back to 3. An inverse function undoes whatever the original function did.\n\nFor a function to have an inverse that is also a function, each output must come from exactly one input. Mathematicians call this one-to-one. If two different inputs lead to the same output, the inverse would not know which starting number to choose. For example, x^2 sends both 3 and -3 to 9, so on all real numbers it does not have an inverse function.\n\nThere is a standard algebra method for finding an inverse. First write y = f(x). Then swap x and y, because inputs and outputs trade jobs in the inverse. After that, solve for y. The new y is f^-1(x).\n\nHere is the beautiful symmetry: the domain of the original function becomes the range of the inverse, and the range of the original becomes the domain of the inverse. On a graph, the points of a function and its inverse are reflections of each other across the line y = x.\n\nSo inverse functions are really about reversibility. Can the machine be run backward without confusion? If yes, we have an inverse function. If not, we may need to restrict the domain first so the rule becomes one-to-one."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw the graph of y = 2x + 5 and the graph of its inverse y = (x - 5)/2 on the same axes. Then draw the line y = x. Each point on one graph has a mirrored partner on the other side of that diagonal line, showing that inputs and outputs have swapped places."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "See how an inverse function acts like an undo machine and mirrors the original graph across y = x.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If a machine adds 7, what must the undo machine do?\n2. If a machine squares numbers, why is 9 a problem for an inverse on all real numbers?\n3. If f(10) = 3, what must be true about f^-1(3)?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Find the inverse of f(x) = 2x + 5.\n\nSteps:\n1. Write y = 2x + 5.\n2. Swap x and y: x = 2y + 5.\n3. Solve for y: x - 5 = 2y, so y = (x - 5)/2.\n4. Therefore f^-1(x) = (x - 5)/2.\n5. Check: if f(4) = 13, then f^-1(13) = (13 - 5)/2 = 4.\n\nAnswer: f^-1(x) = (x - 5)/2.\n\nWhy it worked: Swapping x and y reverses the roles of input and output, which is exactly what an inverse does.\n\nProblem: Does g(x) = x^2 have an inverse function on all real numbers? If not, how can we fix it?\n\nSteps:\n1. Test whether the rule is one-to-one.\n2. Notice that g(3) = 9 and g(-3) = 9.\n3. Two different inputs give the same output, so the inverse would not know whether 9 came from 3 or -3.\n4. Therefore g(x) = x^2 does not have an inverse function on all real numbers.\n5. If we restrict the domain to x >= 0, then each output has exactly one input.\n6. On that restricted domain, the inverse is g^-1(x) = sqrt(x).\n\nAnswer: Not on all real numbers. But on x >= 0, the inverse is sqrt(x).\n\nWhy it worked: An inverse function needs a rule that can be reversed without ambiguity.\n\nProblem: Find the inverse of p(x) = (x + 1)/(x - 2).\n\nSteps:\n1. Write y = (x + 1)/(x - 2).\n2. Multiply both sides by x - 2: y(x - 2) = x + 1.\n3. Expand: yx - 2y = x + 1.\n4. Bring x-terms together: yx - x = 2y + 1.\n5. Factor out x: x(y - 1) = 2y + 1.\n6. Solve for x: x = (2y + 1)/(y - 1).\n7. Swap the variable name back to x: p^-1(x) = (2x + 1)/(x - 1).\n\nAnswer: p^-1(x) = (2x + 1)/(x - 1).\n\nWhy it worked: Even though the original rule looked complicated, the same swap-and-solve method still worked."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Find the inverse of f(x) = x + 7.\n2. Find the inverse of g(x) = 4x.\n### Let's Think\n1. Let h(x) = 3x - 2. Find h^-1(19).\n2. Does q(x) = x^2 + 1 have an inverse function on all real numbers? If not, what inverse do you get if you restrict to x >= 0?\n### Maalik's Challenge\n1. Find the inverse of r(x) = (2x + 3)/(x - 4)."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Write y = x + 7. Swap x and y: x = y + 7. Solve for y: y = x - 7. So f^-1(x) = x - 7.\n2. Write y = 4x. Swap x and y: x = 4y. Solve for y: y = x/4. So g^-1(x) = x/4.\n### Let's Think\n1. First find the inverse of h(x) = 3x - 2. Write y = 3x - 2, swap to get x = 3y - 2, then solve: x + 2 = 3y, so y = (x + 2)/3. Thus h^-1(19) = (19 + 2)/3 = 7.\n2. The function q(x) = x^2 + 1 is not one-to-one on all real numbers because q(3) = 10 and q(-3) = 10. So it has no inverse function on all real numbers. If we restrict to x >= 0, then y = x^2 + 1 becomes x = y^2 + 1 after swapping. Solving gives y = sqrt(x - 1). So the restricted inverse is q^-1(x) = sqrt(x - 1).\n### Maalik's Challenge\n1. Write y = (2x + 3)/(x - 4). Multiply both sides by x - 4: y(x - 4) = 2x + 3. Expand: yx - 4y = 2x + 3. Bring x-terms together: yx - 2x = 4y + 3. Factor x: x(y - 2) = 4y + 3. Solve: x = (4y + 3)/(y - 2). Rename the variable: r^-1(x) = (4x + 3)/(x - 2)."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, invent your own two-step function machine using only simple operations such as multiply, add, or subtract. Then build its inverse machine. Test your pair on three numbers and make sure the second machine really undoes the first every time."
            }
          ]
        },
        {
          "id": "ch23",
          "title": "Composite Functions",
          "stage": "Part 5 — Functions & Graphs",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "One rule is powerful, but chains of rules are even more powerful. Real systems almost never do just one thing. A game might take your score, double it, then subtract a penalty. A map app might convert distance into time, then time into cost. A scientific model may measure temperature, then use that result inside another formula.\n\nComposite functions exist because mathematics needs a way to describe one machine feeding into another. Instead of writing long explanations every time, mathematicians use composition to show that the output of one function becomes the input of the next. It is a compact way to describe a whole process."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Leonhard Euler again plays a starring role here because he helped turn functions into a language flexible enough for serious mathematics. Once functions were treated as objects in their own right, mathematicians could combine them, compare them, and build more complicated rules out of simpler ones.\n\nThat idea is now everywhere. Computer programs are full of composition: one step cleans data, another step transforms it, and another step displays it. Mathematicians learned long ago that complicated systems often become understandable when you split them into smaller rules and then study how those rules join together. Composition is the grammar of chained ideas."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "If you have two functions, f and g, then the composite function f ○ g means “do g first, then do f.” In symbols, (f ○ g)(x) = f(g(x)). The inside function acts first because its output must be ready before the outside function can use it.\n\nThat order matters a lot. In ordinary arithmetic, 2 + 3 is the same as 3 + 2, but function composition is usually not commutative. That means f(g(x)) is often different from g(f(x)). If one machine doubles and then adds 1, while the other squares, changing the order can change everything.\n\nA very useful way to think about composition is as a relay race. The first runner hands the baton to the second. If the first runner gives the wrong kind of baton, the second runner cannot continue. In function language, that means the output of the inside function has to make sense as an input for the outside function.\n\nDomains matter because of that. For example, if one function takes square roots, then the expression inside the square root must be non-negative. A composite function is not only about combining rules. It is about checking that the combination is legal.\n\nSo composition teaches two important habits: pay attention to order, and pay attention to whether each step can actually happen."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Picture two boxes in a row. The first box is labeled g and the second is labeled f. A number x enters g, comes out as g(x), then travels into f, and finally leaves as f(g(x)). A parallel diagram with the boxes reversed shows why g(f(x)) can be different."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Follow a number through two function machines and see why the order of the machines matters.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If g doubles a number and f adds 3, what happens to 4 under f(g(4))?\n2. If you square first and then subtract 1, is that the same as subtracting 1 first and then squaring?\n3. Why might a square-root function be dangerous inside a composition?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Let f(x) = 2x + 3 and g(x) = x^2. Find (f ○ g)(x) and (g ○ f)(x).\n\nSteps:\n1. For f ○ g, do g first: g(x) = x^2.\n2. Now feed that into f: f(g(x)) = f(x^2) = 2x^2 + 3.\n3. For g ○ f, do f first: f(x) = 2x + 3.\n4. Now feed that into g: g(f(x)) = (2x + 3)^2.\n\nAnswer: (f ○ g)(x) = 2x^2 + 3, and (g ○ f)(x) = (2x + 3)^2.\n\nWhy it worked: We obeyed the order carefully. The inside function always acts first.\n\nProblem: Let h(x) = sqrt(x) and k(x) = x - 5. Find (h ○ k)(x) and its domain.\n\nSteps:\n1. The composition h ○ k means do k first, then h.\n2. Since k(x) = x - 5, we get h(k(x)) = h(x - 5).\n3. Because h(t) = sqrt(t), this becomes sqrt(x - 5).\n4. For the square root to make sense, x - 5 must be at least 0.\n5. So x >= 5.\n\nAnswer: (h ○ k)(x) = sqrt(x - 5), with domain x >= 5.\n\nWhy it worked: Composition is not only about substitution. It is also about checking which inputs make the combined rule legal.\n\nProblem: Let f(x) = 2x - 1 and g(x) = x^2. Find all x such that (f ○ g)(x) = 17.\n\nSteps:\n1. First find the composite rule: (f ○ g)(x) = f(x^2) = 2x^2 - 1.\n2. Set it equal to 17: 2x^2 - 1 = 17.\n3. Add 1 to both sides: 2x^2 = 18.\n4. Divide by 2: x^2 = 9.\n5. Take square roots: x = 3 or x = -3.\n\nAnswer: x = 3 or x = -3.\n\nWhy it worked: Once the composition was written as one rule, we could solve it like an ordinary equation."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Let f(x) = x + 4 and g(x) = 3x. Find (f ○ g)(x).\n2. Let f(x) = x + 4 and g(x) = 3x. Find (g ○ f)(x).\n### Let's Think\n1. Let p(x) = x^2 - 1 and q(x) = x + 2. Find (p ○ q)(x).\n2. Let r(x) = sqrt(x) and s(x) = x - 9. Find (r ○ s)(x) and its domain.\n### Maalik's Challenge\n1. Let f(x) = 2x - 1 and g(x) = x^2. Find all x such that (f ○ g)(x) = (g ○ f)(x)."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. For (f ○ g)(x), do g first: g(x) = 3x. Then apply f: f(3x) = 3x + 4. So (f ○ g)(x) = 3x + 4.\n2. For (g ○ f)(x), do f first: f(x) = x + 4. Then apply g: g(x + 4) = 3(x + 4) = 3x + 12. So (g ○ f)(x) = 3x + 12.\n### Let's Think\n1. Do q first: q(x) = x + 2. Then apply p: p(x + 2) = (x + 2)^2 - 1 = x^2 + 4x + 4 - 1 = x^2 + 4x + 3.\n2. The composition is r(s(x)) = sqrt(x - 9). For the square root to make sense, x - 9 must be at least 0. So the domain is x >= 9.\n### Maalik's Challenge\n1. First compute each composition. We have (f ○ g)(x) = f(x^2) = 2x^2 - 1. Also (g ○ f)(x) = (2x - 1)^2 = 4x^2 - 4x + 1. Set them equal:\n\n2x^2 - 1 = 4x^2 - 4x + 1\n0 = 2x^2 - 4x + 2\n0 = 2(x^2 - 2x + 1)\n0 = 2(x - 1)^2\n\nSo (x - 1)^2 = 0, which gives x = 1."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, invent two function machines of your own. Make one of them simple and the other a little surprising. Then compute both orders, f ○ g and g ○ f, and see whether they match. If they do not, explain why the order changed the answer."
            }
          ]
        },
        {
          "id": "ch24",
          "title": "Exponential Growth & Decay",
          "stage": "Part 6 — Exponentials & Logarithms",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Some things do not grow by equal amounts. They grow by equal multipliers. A bacteria colony may double. Money in a bank may increase by the same percentage each year. A medicine in the body may shrink by the same fraction each hour. Ordinary addition is too slow and too clumsy to describe that kind of change.\n\nExponential models exist because the world often changes by repeated multiplication, not repeated addition. Growth and decay are two sides of the same idea. In one case the multiplier is bigger than 1, so the quantity grows. In the other case the multiplier is between 0 and 1, so the quantity shrinks."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Jacob Bernoulli became fascinated by compound interest, which is growth that happens by percentages stacking on top of percentages. He asked what would happen if interest were added more and more often. His investigation helped lead mathematicians toward the number e, one of the most important constants in all of mathematics.\n\nBernoulli's question sounds simple, but it opened a giant door. Once mathematicians understood repeated percentage change, they could model populations, finance, physics, chemistry, and later even computer science. The lesson for you, Maalik, is wonderful: a curious question about money turned into mathematics that describes huge pieces of the real world."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "Exponential change happens when the same multiplier is used again and again. If something doubles each step, you multiply by 2 every time. If something grows by 10% each step, you multiply by 1.10 every time. If something decays by 25% each step, you keep 75% each time, so you multiply by 0.75.\n\nThat is the key difference from linear change. Linear change adds the same amount again and again. Exponential change multiplies by the same factor again and again. At first the numbers may look close, but after enough steps they separate dramatically.\n\nA basic exponential model looks like y = a(b^t). Here a is the starting amount, b is the multiplier, and t counts how many steps have happened. If b > 1, the model grows. If 0 < b < 1, the model decays.\n\nFor example, if 100 bacteria double every hour, then after t hours the number is 100(2^t). If a substance loses 20% every hour, then it keeps 80% each hour, so its amount is a(0.8^t). The secret is to translate percentages into multipliers correctly.\n\nExponential growth can become enormous surprisingly fast. Exponential decay can make large quantities become tiny. That is why this topic matters so much in science, money, medicine, and technology."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Show two curves starting from the same point: one linear and one exponential. At first they may seem close, but the exponential growth curve bends upward more and more sharply. A second diagram can show exponential decay flattening toward zero without ever suddenly dropping all at once."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "See how repeated multiplication creates explosive growth and graceful decay.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If a quantity grows by 50%, what number should you multiply by each step?\n2. If a quantity decays by 30%, what number should you multiply by each step?\n3. Why is “add 10 every time” different from “grow by 10% every time”?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: A bacteria culture starts with 100 bacteria and doubles every hour. How many bacteria are there after 4 hours?\n\nSteps:\n1. Start with 100.\n2. Doubling means multiply by 2 each hour.\n3. After 4 hours, multiply by 2 four times: 100 x 2^4.\n4. Since 2^4 = 16, we get 100 x 16 = 1600.\n\nAnswer: 1600 bacteria.\n\nWhy it worked: Doubling is repeated multiplication, so powers describe it perfectly.\n\nProblem: £500 is placed in an account that grows by 10% each year. How much is there after 3 years?\n\nSteps:\n1. A growth rate of 10% means the multiplier is 1.10.\n2. Start with 500.\n3. After 3 years, the amount is 500(1.10)^3.\n4. Compute: 1.10^3 = 1.331.\n5. Multiply: 500 x 1.331 = 665.5.\n\nAnswer: £665.50.\n\nWhy it worked: The money grows by the same percentage each year, so the amount is multiplied by the same factor each time.\n\nProblem: A chemical sample starts at 320 grams and loses 25% of its mass every hour. How much remains after 3 hours?\n\nSteps:\n1. Losing 25% means keeping 75%.\n2. So the multiplier is 0.75.\n3. After 3 hours, the mass is 320(0.75)^3.\n4. Compute: 0.75^3 = 0.421875.\n5. Multiply: 320 x 0.421875 = 135.\n\nAnswer: 135 grams remain.\n\nWhy it worked: Decay is just exponential growth with a multiplier between 0 and 1."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. A plant is 12 cm tall and doubles in height each week. How tall is it after 3 weeks?\n2. £200 grows by 5% per year for 2 years. How much money is there at the end?\n### Let's Think\n1. Game A starts with 10 coins and gains 8 coins each day. Game B starts with 1 coin and doubles each day. How many coins does each game have after 6 days, and which is larger?\n2. A substance starts at 160 grams and halves every 2 hours. How much remains after 6 hours?\n### Maalik's Challenge\n1. A bacteria culture starts with 3 bacteria and doubles every hour. After how many hours does it first reach 96 bacteria?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Doubling each week means multiply by 2 each week. After 3 weeks, height = 12 x 2^3 = 12 x 8 = 96 cm.\n2. A 5% growth rate means multiplier 1.05. After 2 years, amount = 200(1.05)^2 = 200(1.1025) = 220.5. So the final amount is £220.50.\n### Let's Think\n1. Game A is linear: start with 10 and add 8 for 6 days, so total = 10 + 6 x 8 = 58. Game B is exponential: start with 1 and double for 6 days, so total = 1 x 2^6 = 64. After 6 days, Game B is larger.\n2. Halving every 2 hours means the amount is multiplied by 1/2 once every 2-hour step. In 6 hours there are 3 such steps. So amount = 160(1/2)^3 = 160/8 = 20 grams.\n### Maalik's Challenge\n1. We need 3 x 2^t = 96. Divide by 3: 2^t = 32. Since 32 = 2^5, we get t = 5. So the culture reaches 96 bacteria after 5 hours."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, invent two stories that use the same exponential rule but in different worlds. For example, one could be money and the other could be bacteria. Use the same multiplier in both stories and explain why the mathematics is identical even though the situations look different."
            }
          ]
        },
        {
          "id": "ch25",
          "title": "Logarithm Rules",
          "stage": "Part 6 — Exponentials & Logarithms",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Multiplication becomes huge very quickly when exponents are involved. Long before calculators, astronomers, navigators, and scientists needed a way to handle gigantic products and powers more efficiently. Logarithms were invented as a brilliant shortcut: they turned multiplication into addition and powers into multiplication.\n\nBut logarithms are not only a trick for easier calculation. They also answer a new kind of question: if I know the base and I know the result, what exponent produced it? That means logarithms are the natural reverse of exponential functions. They exist because mathematics needed a language for “which power?”"
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "John Napier introduced logarithms in the early 1600s, and Henry Briggs helped shape the base-10 version that became widely used. Their work was revolutionary because it allowed difficult calculations to be done far faster in astronomy and navigation.\n\nWhat makes this story beautiful is that logarithms were first treasured as practical tools, but later mathematicians realised they were also deep ideas about inverse functions and structure. A rule created to save time on calculations became one of the central ideas in algebra, analysis, and science."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A logarithm answers the question “What exponent?” If 2^5 = 32, then log_2(32) = 5. The base is 2, the result is 32, and the logarithm tells you the exponent 5.\n\nSo logarithms are inverse functions for exponentials. Exponentials ask, “What happens when I raise a base to a power?” Logarithms ask, “Which power got me here?” That is why they fit so naturally after exponential growth.\n\nThe logarithm rules come from exponent rules. If 2^a x 2^b = 2^(a+b), then taking log base 2 shows that log_2(xy) = log_2(x) + log_2(y). In words, multiplication turns into addition. Similarly, division turns into subtraction, and powers move out to the front as multipliers:\n\n- log_b(xy) = log_b(x) + log_b(y)\n- log_b(x/y) = log_b(x) - log_b(y)\n- log_b(x^n) = n log_b(x)\n\nThese rules only work when the inputs are positive. You cannot take the logarithm of 0 or a negative number in the usual real-number system. That restriction matters.\n\nOne more useful idea: log_10 is called the common logarithm, and log_2 appears often in computing because computers love powers of 2. Different bases tell different stories, but the core idea is always the same: a logarithm is an exponent in disguise."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Show a staircase of powers: 2^0 = 1, 2^1 = 2, 2^2 = 4, 2^3 = 8, 2^4 = 16. Next to it, show the matching logarithm statements: log_2(1) = 0, log_2(2) = 1, log_2(4) = 2, and so on. Then connect the product rule to exponent addition with arrows."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Learn how logarithms answer “which power?” and why log rules come straight from exponent rules.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If 10^3 = 1000, what is log_10(1000)?\n2. If 2^4 x 2^3 = 2^7, what log rule should match that idea?\n3. Why must the input of a logarithm be positive?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Evaluate log_2(1/8).\n\nSteps:\n1. Ask: what power of 2 gives 1/8?\n2. Since 2^3 = 8, we know 2^-3 = 1/8.\n3. Therefore log_2(1/8) = -3.\n\nAnswer: -3.\n\nWhy it worked: A logarithm is just the exponent that produces the number.\n\nProblem: Simplify log_2(8x) - log_2(x), assuming x > 0.\n\nSteps:\n1. Use the subtraction rule: log_2(8x) - log_2(x) = log_2((8x)/x).\n2. Since x > 0, the x terms cancel safely.\n3. That gives log_2(8).\n4. Because 2^3 = 8, we get log_2(8) = 3.\n\nAnswer: 3.\n\nWhy it worked: Logarithm rules turn a complicated-looking expression into a simpler exponent question.\n\nProblem: Solve log_2(x) + log_2(x - 2) = 3.\n\nSteps:\n1. Use the product rule: log_2(x) + log_2(x - 2) = log_2(x(x - 2)).\n2. So log_2(x(x - 2)) = 3.\n3. Rewrite in exponential form: x(x - 2) = 2^3 = 8.\n4. Expand: x^2 - 2x = 8.\n5. Move everything to one side: x^2 - 2x - 8 = 0.\n6. Factor: (x - 4)(x + 2) = 0.\n7. Candidates are x = 4 or x = -2.\n8. Check the domain. We need x > 0 and x - 2 > 0, so x > 2.\n9. Therefore x = 4 is the only valid solution.\n\nAnswer: x = 4.\n\nWhy it worked: We combined the logs first, changed the logarithmic equation into an exponential one, and then checked the domain carefully."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Evaluate log_2(8).\n2. Evaluate log_10(100).\n### Let's Think\n1. Simplify log_5(25x) - log_5(x), assuming x > 0.\n2. If log_2(x) = 5, what is x?\n### Maalik's Challenge\n1. If log_2(x) = a and log_2(y) = b, write log_2(8x^2 / y) in terms of a and b."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Since 2^3 = 8, log_2(8) = 3.\n2. Since 10^2 = 100, log_10(100) = 2.\n### Let's Think\n1. Use the quotient rule: log_5(25x) - log_5(x) = log_5((25x)/x) = log_5(25). Since 5^2 = 25, the answer is 2.\n2. If log_2(x) = 5, then x is the number produced by 2^5. Since 2^5 = 32, we get x = 32.\n### Maalik's Challenge\n1. Use the log rules carefully:\n\nlog_2(8x^2 / y) = log_2(8) + log_2(x^2) - log_2(y)\n= 3 + 2log_2(x) - log_2(y)\n= 3 + 2a - b.\n\nSo the expression simplifies to 3 + 2a - b."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, build a tiny “log detective notebook.” Write five exponential facts, such as 2^5 = 32 or 10^3 = 1000. Then rewrite each one as a logarithm statement. After that, invent one log rule example of your own and explain why it works using exponent laws."
            }
          ]
        },
        {
          "id": "ch26",
          "title": "The Natural Logarithm & Euler's Number e",
          "stage": "Part 6 — Growth, Sequences & Data",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Exponential growth is what happens when something keeps multiplying by the same kind of rule: populations grow, money earns interest, and chain reactions spread. But once mathematicians began studying growth carefully, they needed a special number that appears when growth is happening in the smoothest possible way. That number is e, which is about 2.718281828...\n\nThe natural logarithm, written ln, exists because we often want to reverse exponential growth. If e to the power x gives a number, then ln tells us which power x was. Maalik, that makes ln a kind of “growth detective”: it looks at a final amount and asks, “What exponent created this?”"
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Long before calculators, mathematicians wanted faster ways to work with multiplication, division, and powers. John Napier helped launch the idea of logarithms in the early 1600s, turning hard multiplication problems into easier addition problems. That was a giant leap for astronomy, navigation, and science.\n\nLater, Jacob Bernoulli noticed that repeated growth such as (1 + 1/n)^n heads toward a special number as n gets larger and larger. Leonhard Euler studied this number deeply and gave it the name e. Because e shows up so naturally in growth, decay, and change, the logarithm with base e became known as the natural logarithm."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "The number e is the base of the natural exponential function. When you see e^x, it means “e multiplied by itself x times” when x is a whole number, and mathematicians extend that meaning smoothly for all real numbers.\n\nThe natural logarithm is written ln(x). It answers the question: “What power of e equals x?” So if e^3 = 20.085... then ln(20.085...) = 3. In general, ln and e^x undo each other. That means ln(e^7) = 7 and e^(ln 12) = 12.\n\nA very important fact, Maalik, is that ln(x) only works for positive numbers. There is no real value for ln(0) or ln(-5). Also, ln(1) = 0 because e^0 = 1.\n\nIf 0 < x < 1, then ln(x) is negative. For example, ln(1/e) = -1 because e^(-1) = 1/e. So ln does not just measure size. It measures which exponent of e you need."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "The clearest picture is to draw y = e^x and y = ln(x). Because they are inverse functions, their graphs are mirror images across the line y = x. If one graph sends 2 to e^2, the other sends e^2 back to 2."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "See how e and ln act like perfect opposites in the story of smooth growth.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If e^4 is a number, what must ln(e^4) be, and why?\n2. Without calculating a decimal, is ln(0.3) positive, zero, or negative?\n3. Which is larger: ln(e) or ln(1)?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Evaluate ln(e^5) and e^(ln 12).\n\nSteps:\n1. ln undoes powers of e, so ln(e^5) = 5.\n2. The exponential function undoes ln, so e^(ln 12) = 12.\n\nAnswer: 5 and 12.\n\nWhy it worked: Inverse functions reverse each other. Applying one after the other returns the original number.\n\nProblem: Solve e^x = 20.\n\nSteps:\n1. We want to undo the exponential, so take ln of both sides.\n2. ln(e^x) = ln(20).\n3. Because ln and e^x are inverses, x = ln(20).\n4. As a decimal, x is about 2.996.\n\nAnswer: x = ln(20), approximately 3.00.\n\nWhy it worked: Taking ln on both sides turns the unknown exponent into an ordinary number.\n\nProblem: A quantity follows the rule A = 5e^t. When A = 40, find t.\n\nSteps:\n1. Start with 40 = 5e^t.\n2. Divide by 5 to get 8 = e^t.\n3. Take ln of both sides: ln(8) = ln(e^t).\n4. So t = ln(8), which is about 2.079.\n\nAnswer: t = ln(8), approximately 2.08.\n\nWhy it worked: The variable was in the exponent, so the natural logarithm was the correct tool to unlock it."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Evaluate ln(e^7).\n2. Solve ln(x) = 3.\n### Let's Think\n1. Solve e^x = 15. Give your answer in exact form and as a decimal to 2 decimal places.\n2. Is ln(0.2) positive or negative? Explain without using a calculator.\n### Maalik's Challenge\n1. Suppose e^a = 9 and e^b = 4. What is ln(36)?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. ln(e^7) = 7 because ln undoes powers of e.\n2. If ln(x) = 3, then x = e^3 because ln asks for the exponent on e. So x = e^3.\n### Let's Think\n1. Take ln of both sides: ln(e^x) = ln(15), so x = ln(15). As a decimal, x ≈ 2.71.\n2. ln(0.2) is negative. The number 0.2 is between 0 and 1, so it must be a negative power of e that makes it.\n### Maalik's Challenge\n1. Since e^a = 9 and e^b = 4, multiplying gives e^a × e^b = 36, so e^(a + b) = 36. Therefore ln(36) = a + b."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, invent your own equation of the form ke^t = N, then solve for t using ln and explain each move as if you are teaching a younger student."
            }
          ]
        },
        {
          "id": "ch27",
          "title": "Arithmetic Sequences",
          "stage": "Part 6 — Growth, Sequences & Data",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Some patterns grow by adding the same amount each time. House numbers on one side of a street might jump by 2. A saving plan might add 5 pounds every week. Staircases, calendar patterns, and repeated score increases all create the same mathematical idea: a sequence with a constant step.\n\nArithmetic sequences exist because mathematicians want a precise way to describe patterns built from equal differences. Once you can see the step clearly, you can predict distant terms without writing every single one before it."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "A famous story about Carl Friedrich Gauss says that when he was a child, his teacher asked the class to add 1 + 2 + 3 + ... + 100, expecting it to take a long time. Gauss quickly noticed a pattern: 1 + 100 = 101, 2 + 99 = 101, 3 + 98 = 101, and so on.\n\nThat idea matters here because arithmetic sequences are all about equal changes. Gauss saw that regular patterns can be reorganized cleverly. Mathematics becomes powerful when you stop just calculating and start noticing structure."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "An arithmetic sequence is a list of numbers where each term changes by the same amount. That amount is called the common difference. In 4, 7, 10, 13, ... the common difference is 3.\n\nIf the first term is a_1 and the common difference is d, then the nth term is a_n = a_1 + (n - 1)d. This works because to get from the first term to the nth term, you add the step size d exactly n - 1 times.\n\nArithmetic sequences can increase, decrease, or stay constant. If d is positive, the terms rise. If d is negative, the terms fall. If d = 0, every term is the same.\n\nMaalik, the big idea is this: do not stare at the numbers one by one. Hunt for the difference. Once you know the first term and the difference, the whole sequence is under your control."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Picture a staircase made of blocks. Each new step adds the same number of blocks as the one before. That repeated equal increase is exactly what an arithmetic sequence looks like in a diagram."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Spot the constant step and the whole arithmetic pattern becomes predictable.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. What is the common difference in 11, 15, 19, 23, ...?\n2. If a sequence goes 30, 25, 20, 15, ..., is the common difference positive or negative?\n3. Which will be larger, the 20th term or the 5th term of a sequence with difference 6?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Find the next three terms and the 10th term of 4, 7, 10, 13, ...\n\nSteps:\n1. The common difference is 3.\n2. Add 3 three more times: 16, 19, 22.\n3. Use a_n = a_1 + (n - 1)d.\n4. a_10 = 4 + (10 - 1) × 3 = 4 + 27 = 31.\n\nAnswer: Next three terms: 16, 19, 22. The 10th term is 31.\n\nWhy it worked: Arithmetic sequences are built by repeated equal addition, so the formula counts how many jumps of size 3 were made.\n\nProblem: An arithmetic sequence starts at 12 and has common difference -4. Find the 8th term.\n\nSteps:\n1. Here a_1 = 12 and d = -4.\n2. Use a_n = a_1 + (n - 1)d.\n3. a_8 = 12 + 7(-4) = 12 - 28 = -16.\n\nAnswer: The 8th term is -16.\n\nWhy it worked: A negative common difference means the sequence keeps stepping downward by the same amount.\n\nProblem: Is 52 a term in the sequence 7, 12, 17, 22, ...?\n\nSteps:\n1. The first term is 7 and the common difference is 5.\n2. Set up the nth-term rule: a_n = 7 + (n - 1)5.\n3. Ask whether 7 + 5(n - 1) = 52.\n4. Subtract 7: 5(n - 1) = 45.\n5. Divide by 5: n - 1 = 9, so n = 10.\n\nAnswer: Yes. 52 is the 10th term.\n\nWhy it worked: To test whether a number belongs in an arithmetic sequence, solve the nth-term formula for n."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Find the 12th term of the arithmetic sequence 5, 9, 13, 17, ...\n2. Write the next two terms after 40, 34, 28, 22, ...\n### Let's Think\n1. The first term is 18 and the common difference is 7. Find the 25th term.\n2. Is 101 a term in the arithmetic sequence 6, 11, 16, 21, ...?\n### Maalik's Challenge\n1. An arithmetic sequence has first term 3 and 20th term 79. What is the common difference?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. a_1 = 5 and d = 4. So a_12 = 5 + 11 × 4 = 49.\n2. The difference is -6, so the next two terms are 16 and 10.\n### Let's Think\n1. a_25 = 18 + 24 × 7 = 18 + 168 = 186.\n2. Use 6 + 5(n - 1) = 101. Then 5(n - 1) = 95, so n - 1 = 19 and n = 20. Yes, 101 is the 20th term.\n### Maalik's Challenge\n1. Use a_n = a_1 + (n - 1)d. Then 79 = 3 + 19d, so 76 = 19d and d = 4."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, create an arithmetic sequence with a negative common difference, then challenge yourself to decide whether a number you choose belongs to it."
            }
          ]
        },
        {
          "id": "ch28",
          "title": "Geometric Sequences",
          "stage": "Part 6 — Growth, Sequences & Data",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Some patterns do not grow by adding the same amount. Instead, they grow by multiplying by the same factor. A bacteria colony may double. A bouncing ball may reach half as high each time. A video game reward might triple each level. These are not arithmetic patterns. They are geometric patterns.\n\nGeometric sequences exist because multiplication-based growth and decay are everywhere. They help us describe doubling, halving, repeated scaling, and explosive change. When the multiplier stays constant, a geometric sequence is the right mathematical language."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "One famous legend tells of a reward promised on a chessboard: place 1 grain of rice on the first square, 2 on the second, 4 on the third, then keep doubling all the way across the board. It sounds harmless at first, but the total becomes enormous.\n\nThat story captures the shock of geometric growth. Equal multiplication can outrun equal addition incredibly fast. Mathematicians learned to respect powers and ratios because repeated multiplication creates patterns that become huge—or tiny—much faster than many people expect."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A geometric sequence is a list of numbers where each term is multiplied by the same number to get the next term. That number is called the common ratio. In 3, 6, 12, 24, ... the common ratio is 2.\n\nIf the first term is a_1 and the common ratio is r, then the nth term is a_n = a_1 × r^(n - 1). This is because you multiply by r exactly n - 1 times to reach the nth term.\n\nIf r is greater than 1, the terms grow. If 0 < r < 1, the terms shrink. If r is negative, the signs alternate. For example, 5, -10, 20, -40, ... has common ratio -2.\n\nMaalik, geometric sequences are the mathematics of scaling. Instead of asking, “What step was added?” ask, “What multiplier was used?” That one change in thinking opens a whole new world of patterns."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Imagine a branching tree where each branch splits into 2 new branches every stage. The number of branch tips goes 1, 2, 4, 8, 16, ... showing repeated multiplication by the same ratio."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Watch how multiplying by a fixed ratio creates fast growth or rapid shrinking.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. What is the common ratio in 2, 10, 50, 250, ...?\n2. Does the sequence 81, 27, 9, 3, ... grow or shrink?\n3. In 6, -12, 24, -48, ... what does the sign pattern tell you about the ratio?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Find the 7th term of the geometric sequence 3, 6, 12, 24, ...\n\nSteps:\n1. The first term is 3 and the common ratio is 2.\n2. Use a_n = a_1 × r^(n - 1).\n3. a_7 = 3 × 2^6 = 3 × 64 = 192.\n\nAnswer: The 7th term is 192.\n\nWhy it worked: A geometric sequence grows by repeated multiplication, so powers naturally count how many times the ratio is used.\n\nProblem: A geometric sequence starts at 160 and has common ratio 1/2. Find the first five terms.\n\nSteps:\n1. Start with 160.\n2. Multiply by 1/2 each time: 160, 80, 40, 20, 10.\n\nAnswer: 160, 80, 40, 20, 10.\n\nWhy it worked: A ratio of 1/2 means each term is half the previous one, so the sequence shows geometric decay.\n\nProblem: Is 486 a term in the sequence 2, 6, 18, 54, ...?\n\nSteps:\n1. The first term is 2 and the common ratio is 3.\n2. Write the rule: a_n = 2 × 3^(n - 1).\n3. Ask whether 2 × 3^(n - 1) = 486.\n4. Divide by 2: 3^(n - 1) = 243.\n5. Since 243 = 3^5, we get n - 1 = 5.\n6. So n = 6.\n\nAnswer: Yes. 486 is the 6th term.\n\nWhy it worked: Testing membership in a geometric sequence means matching the target number to a power pattern."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Find the next two terms of 5, 15, 45, 135, ...\n2. Find the 5th term of the geometric sequence 7, 14, 28, 56, ...\n### Let's Think\n1. The first term is 81 and the common ratio is 1/3. Find the 6th term.\n2. Is 972 a term in the geometric sequence 4, 12, 36, 108, ...?\n### Maalik's Challenge\n1. A geometric sequence has first term 2 and 8th term 4374. What is the common ratio?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. The common ratio is 3, so the next two terms are 405 and 1215.\n2. a_5 = 7 × 2^4 = 7 × 16 = 112.\n### Let's Think\n1. a_6 = 81 × (1/3)^5 = 81 ÷ 243 = 1/3.\n2. Use 4 × 3^(n - 1) = 972. Then 3^(n - 1) = 243 = 3^5, so n = 6. Yes, 972 is the 6th term.\n### Maalik's Challenge\n1. Use 2 × r^7 = 4374. Then r^7 = 2187. Since 2187 = 3^7, the common ratio is 3."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, design a geometric sequence that shrinks but never reaches zero, and explain why multiplying by the same ratio keeps it alive forever."
            }
          ]
        },
        {
          "id": "ch29",
          "title": "Sigma Notation & Series",
          "stage": "Part 6 — Growth, Sequences & Data",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Writing long sums again and again is tiring and clumsy. Imagine writing 1 + 2 + 3 + ... + 100 every time you want to talk about it. Mathematicians invented sigma notation so they could describe large sums neatly, clearly, and powerfully.\n\nA series is what you get when you add the terms of a sequence. Sigma notation exists because mathematics loves compression without losing meaning. It lets us write many additions in one elegant line and then reason about the whole pattern at once."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "The Greek letter sigma, written Σ, was chosen because it stands for “sum.” But the clever thinking behind many series problems goes back much further. The story of Gauss adding 1 through 100 by pairing numbers is a perfect example.\n\nHe noticed that 1 + 100, 2 + 99, 3 + 98, and so on all make 101. Instead of plodding through the sum, he reorganized it. That is the spirit of series: you are not trapped by the list. You can look for a smarter structure."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "Sigma notation tells you to add a pattern of terms. For example, Σ from n = 1 to 4 of n means 1 + 2 + 3 + 4. The symbol underneath tells you where to start, and the symbol above tells you where to stop.\n\nIf you see Σ from k = 1 to 5 of 2k, that means 2(1) + 2(2) + 2(3) + 2(4) + 2(5), which equals 2 + 4 + 6 + 8 + 10.\n\nA sequence is the list itself. A series is the result of adding the list. For arithmetic series, a useful formula is S = n/2 × (first term + last term). For geometric series with n terms, first term a, and ratio r not equal to 1, a useful formula is S = a(1 - r^n)/(1 - r).\n\nMaalik, sigma notation is like mathematical zip-compression. It packs a long addition into a short expression, but all the pattern is still inside."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "A good diagram shows dots grouped in pairs from the start and end of a sequence: first with last, second with second-last. The matching pairs reveal why some long sums can be found quickly without adding one term at a time."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Turn long additions into one sharp symbol and then unlock the pattern inside the sum.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. What sum does Σ from n = 1 to 3 of n^2 represent?\n2. In Σ from k = 2 to 5 of 3k, what is the first term being added?\n3. If a series is built from an arithmetic sequence, what two edge numbers are especially useful to notice?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Evaluate Σ from n = 1 to 4 of 2n.\n\nSteps:\n1. List the terms: 2(1), 2(2), 2(3), 2(4).\n2. This gives 2 + 4 + 6 + 8.\n3. Add them: 2 + 4 + 6 + 8 = 20.\n\nAnswer: 20.\n\nWhy it worked: Sigma notation is just a compact instruction for building and adding a sequence.\n\nProblem: Find the sum 5 + 8 + 11 + ... + 32.\n\nSteps:\n1. This is an arithmetic series with first term 5, last term 32, and common difference 3.\n2. Find the number of terms: 5 + (n - 1)3 = 32.\n3. Then (n - 1)3 = 27, so n - 1 = 9 and n = 10.\n4. Use S = n/2 × (first + last).\n5. S = 10/2 × (5 + 32) = 5 × 37 = 185.\n\nAnswer: 185.\n\nWhy it worked: Arithmetic series can be summed quickly because first-plus-last forms a constant pair pattern.\n\nProblem: Find the sum 3 + 6 + 12 + 24 + 48.\n\nSteps:\n1. This is a geometric series with first term 3, ratio 2, and 5 terms.\n2. Use S = a(1 - r^n)/(1 - r).\n3. Substitute: S = 3(1 - 2^5)/(1 - 2).\n4. Since 2^5 = 32, this becomes 3(1 - 32)/(-1) = 3(-31)/(-1) = 93.\n\nAnswer: 93.\n\nWhy it worked: The geometric sum formula captures the repeated multiplication pattern in one expression."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Evaluate Σ from k = 1 to 5 of k.\n2. Evaluate Σ from m = 2 to 4 of 3m.\n### Let's Think\n1. Find the sum 7 + 10 + 13 + ... + 34.\n2. Evaluate Σ from n = 1 to 4 of 2^n.\n### Maalik's Challenge\n1. If Σ from k = 1 to n of k = 36, what is n?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Σ from k = 1 to 5 of k = 1 + 2 + 3 + 4 + 5 = 15.\n2. Σ from m = 2 to 4 of 3m = 3(2) + 3(3) + 3(4) = 6 + 9 + 12 = 27.\n### Let's Think\n1. This arithmetic series has first term 7, last term 34, difference 3. Solve 7 + (n - 1)3 = 34, giving n = 10. Then S = 10/2 × (7 + 34) = 5 × 41 = 205.\n2. Σ from n = 1 to 4 of 2^n = 2 + 4 + 8 + 16 = 30.\n### Maalik's Challenge\n1. Use the sum formula for 1 + 2 + ... + n: n(n + 1)/2 = 36. Multiply by 2: n(n + 1) = 72. Since 8 × 9 = 72, n = 8."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, invent your own sigma expression, expand it into an ordinary sum, and then see whether you can find a shortcut instead of adding term by term."
            }
          ]
        },
        {
          "id": "ch30",
          "title": "Data & Averages",
          "stage": "Part 6 — Growth, Sequences & Data",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "The world produces piles of information: temperatures, goals scored, book pages read, test scores, rainfall, and much more. Data helps us collect those facts, but raw lists can be messy. We need smart ways to summarize them so that the important patterns stand out.\n\nAverages exist because we often want one number that tells the main story of a data set. But different averages tell different stories. Mathematics helps us choose whether mean, median, mode, or range gives the most useful picture."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Florence Nightingale is often remembered as a nurse, but she was also a brilliant user of data. She collected hospital information carefully and created powerful diagrams that showed how many deaths were caused by poor sanitation.\n\nHer work helped convince leaders to improve medical conditions. That is a beautiful lesson, Maalik: data is not just numbers sitting in rows. When understood properly, data can reveal truth, change decisions, and improve real lives."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "Data is a collection of information. To understand it, mathematicians often begin with summary measures. The mean is the total divided by how many numbers there are. The median is the middle value when the data is arranged in order. The mode is the most frequent value. The range is the largest value minus the smallest.\n\nThese measures are useful for different reasons. The mean uses every value, so it can be affected a lot by very large or very small outliers. The median is often more stable when one strange value appears.\n\nFor example, in the data 8, 9, 9, 10, 40, the mean is pulled upward by 40, but the median stays near the centre of the ordinary values. That is why choosing the right average matters.\n\nMaalik, data is not just arithmetic. It is interpretation. You are asking, “What is the fairest summary of this information?” That is a deep mathematical question."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "A simple dot plot with one far-away outlier shows how the mean gets dragged toward the extreme value while the median stays near the middle of the main cluster."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Learn when the mean tells the truth best and when the median is the wiser guide.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. Which average uses every number in the data set?\n2. If one giant outlier appears, which is usually more stable: mean or median?\n3. What does the range tell you about a data set?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: For the data 4, 4, 6, 9, 9, 9, 10, find the mean, median, mode, and range.\n\nSteps:\n1. Add the numbers: 4 + 4 + 6 + 9 + 9 + 9 + 10 = 51.\n2. There are 7 numbers, so mean = 51/7 ≈ 7.29.\n3. The middle number is the 4th number, which is 9, so median = 9.\n4. The most frequent number is 9, so mode = 9.\n5. Range = 10 - 4 = 6.\n\nAnswer: Mean = 51/7 ≈ 7.29, median = 9, mode = 9, range = 6.\n\nWhy it worked: Each summary measure captures a different feature of the same data set.\n\nProblem: The data set is 8, 9, 9, 10, 40. Which average gives the fairest picture of the “typical” value: mean or median?\n\nSteps:\n1. Find the mean: (8 + 9 + 9 + 10 + 40) ÷ 5 = 76 ÷ 5 = 15.2.\n2. Find the median: the middle value is 9.\n3. Notice that 40 is far away from the other values.\n4. The mean is dragged upward, but the median stays close to the centre of the main group.\n\nAnswer: The median, 9, gives the fairer typical value.\n\nWhy it worked: An outlier can distort the mean, while the median is more resistant to extreme values.\n\nProblem: A student has test scores of 80, 90, and 100, but the tests count with weights 1, 2, and 3. Find the weighted average.\n\nSteps:\n1. Multiply each score by its weight: 80 × 1 = 80, 90 × 2 = 180, 100 × 3 = 300.\n2. Add the weighted scores: 80 + 180 + 300 = 560.\n3. Add the weights: 1 + 2 + 3 = 6.\n4. Weighted average = 560 ÷ 6 = 93 1/3.\n\nAnswer: The weighted average is 93 1/3.\n\nWhy it worked: Weighted averages count some data values more strongly than others, so the weights must be included in both the total and the divisor."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Find the mean of 6, 8, 10, 12, 14.\n2. Find the median of 3, 9, 4, 7, 12.\n### Let's Think\n1. For the data 2, 2, 5, 7, 7, 7, 20, find the mode and range.\n2. The data set is 11, 12, 12, 13, 50. Which is better for the typical value: mean or median? Explain.\n### Maalik's Challenge\n1. A weighted game score uses weights 2, 3, and 5 for rounds scored 40, 70, and 90. What is the weighted average score?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Mean = (6 + 8 + 10 + 12 + 14) ÷ 5 = 50 ÷ 5 = 10.\n2. First order the data: 3, 4, 7, 9, 12. The median is 7.\n### Let's Think\n1. The mode is 7 because it appears most often. The range is 20 - 2 = 18.\n2. The median is better. The value 50 is an outlier that pulls the mean upward, while the median stays closer to the middle of the ordinary values.\n### Maalik's Challenge\n1. Weighted total = 40 × 2 + 70 × 3 + 90 × 5 = 80 + 210 + 450 = 740. Total weight = 2 + 3 + 5 = 10. Weighted average = 740 ÷ 10 = 74."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, collect five real numbers from your day—steps, pages, minutes, scores, or anything you like—and decide which average tells the best story of them and why."
            }
          ]
        },
        {
          "id": "ch31",
          "title": "Probability Fundamentals",
          "stage": "Part 8 — Statistics & Probability",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Probability exists because the world is not always certain, but it is not completely wild either. If you roll a die, you cannot know the exact result before it lands, but you can still reason carefully about what could happen and how likely each possibility is.\n\nMaalik, probability is the mathematics of intelligent uncertainty. It helps you make fair games, understand risk, test predictions, and avoid being fooled by lucky streaks. It turns “maybe” into something you can measure."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Gerolamo Cardano, a doctor and mathematician from the 1500s, studied games of chance because people wanted to understand gambling. He noticed that fairness in a game depends on counting possible outcomes correctly, not just trusting feelings.\n\nLater, Blaise Pascal and Pierre de Fermat exchanged letters about how to divide winnings fairly when a game stops early. Their ideas helped launch modern probability. A question about games became a powerful tool for science, finance, weather, medicine, and computer algorithms."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "Probability is a number between 0 and 1 that measures how likely an event is. A probability of 0 means impossible. A probability of 1 means certain. A probability of 1/2 means the event is equally likely to happen or not happen.\n\nWhen all outcomes are equally likely, the basic rule is: probability = favourable outcomes / total outcomes. If a fair die has 6 sides and you want a 5, there is 1 favourable outcome out of 6, so the probability is 1/6.\n\nThe complement of an event is “not that event.” If the probability of rain is 0.3, then the probability of no rain is 0.7. Complements are useful because sometimes it is easier to count what you do not want and subtract from 1.\n\nA key idea, Maalik, is that probability predicts long-run behaviour, not guaranteed short-run results. A fair coin has probability 1/2 of heads, but it can still land heads three times in a row. Fair does not mean perfectly alternating."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a probability line from 0 to 1, marking impossible at 0, even chance at 1/2, and certain at 1. Then show a die with six equally sized outcome boxes so Maalik can see probability as “chosen boxes over all boxes.”"
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Watch how uncertainty becomes measurable when we count outcomes carefully.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If a bag has 3 red balls and 2 blue balls, is red more likely, less likely, or equally likely compared with blue?\n2. If something has probability 0, could it happen in that situation?\n3. A fair coin lands heads four times in a row. Does that make tails guaranteed next?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: A fair die is rolled once. What is the probability of rolling an even number?\n\nSteps:\n1. The possible outcomes are 1, 2, 3, 4, 5, 6.\n2. The even outcomes are 2, 4, 6.\n3. There are 3 favourable outcomes out of 6 total outcomes.\n4. So the probability is 3/6 = 1/2.\n\nAnswer: 1/2.\n\nWhy it worked: All six die faces are equally likely, so we could count favourable outcomes and divide by the total.\n\nProblem: A bag contains 5 green counters, 3 yellow counters, and 2 black counters. What is the probability of not choosing black?\n\nSteps:\n1. The total number of counters is 5 + 3 + 2 = 10.\n2. Not black means green or yellow, so there are 5 + 3 = 8 favourable counters.\n3. The probability is 8/10 = 4/5.\n\nAnswer: 4/5.\n\nWhy it worked: “Not black” is a complement event. We counted all outcomes that are not black.\n\nProblem: A spinner has 8 equal sections numbered 1 to 8. What is the probability of landing on a number greater than 5?\n\nSteps:\n1. The outcomes greater than 5 are 6, 7, and 8.\n2. There are 3 favourable outcomes.\n3. There are 8 total equally likely outcomes.\n4. The probability is 3/8.\n\nAnswer: 3/8.\n\nWhy it worked: The spinner sections are equal, so each number has the same chance."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. A fair coin is tossed once. What is the probability of heads?\n2. A bag has 4 red marbles and 6 blue marbles. What is the probability of choosing a red marble?\n### Let's Think\n1. A fair die is rolled. What is the probability of rolling a number that is not 1?\n2. A spinner has 10 equal sections numbered 1 to 10. What is the probability of landing on a multiple of 3?\n### Maalik's Challenge\n1. A box has red, blue, and green cubes. The probability of red is 1/4 and the probability of blue is 2/5. What is the probability of green?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. A fair coin has 2 equally likely outcomes: heads and tails. Heads is 1 favourable outcome, so the probability is 1/2.\n2. There are 4 + 6 = 10 marbles total. Red has 4 favourable outcomes, so the probability is 4/10 = 2/5.\n### Let's Think\n1. A die has 6 outcomes. “Not 1” means 2, 3, 4, 5, or 6, which is 5 outcomes. The probability is 5/6.\n2. The multiples of 3 from 1 to 10 are 3, 6, and 9. That is 3 favourable outcomes out of 10, so the probability is 3/10.\n### Maalik's Challenge\n1. The probabilities of all possible colours must add to 1. Red plus blue is 1/4 + 2/5 = 5/20 + 8/20 = 13/20. So green is 1 - 13/20 = 7/20."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, invent a fair spinner with 12 equal sections. Choose one event with probability 1/3 and another event with probability 1/4, then explain how you know."
            }
          ]
        },
        {
          "id": "ch32",
          "title": "Combinatorics (Permutations & Combinations)",
          "stage": "Part 8 — Statistics & Probability",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Combinatorics exists because many problems are really counting problems in disguise. If you are making a password, arranging books, choosing a team, or planning routes through a grid, you need to count possibilities without listing them one by one.\n\nMaalik, combinatorics is the art of counting intelligently. Instead of writing out hundreds or millions of cases, you find the hidden structure and count them in one clean move."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Indian mathematicians studied counting patterns long ago while analysing poetry, rhythms, and arrangements of syllables. Later, mathematicians such as Blaise Pascal explored number patterns that appear when choosing groups, leading to what many people now call Pascal's triangle.\n\nCombinatorics became especially important as probability grew. To know how likely something is, you often first need to know how many ways it can happen. Counting and probability are close friends."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "The multiplication principle says that if one choice can happen in a ways and a second independent choice can happen in b ways, then both together can happen in a × b ways. For example, 3 shirts and 4 pairs of trousers make 12 outfits.\n\nA permutation is an arrangement where order matters. If three runners win gold, silver, and bronze, then A-B-C is different from B-A-C. For n different objects arranged in a line, there are n! ways, where n! means n × (n - 1) × ... × 2 × 1.\n\nA combination is a selection where order does not matter. If you choose 3 friends for a team, choosing A, B, C is the same team as choosing C, B, A. That means combinations are usually fewer than permutations because we divide away the repeated orders.\n\nFor choosing r objects from n objects, the number of combinations is n! / (r!(n - r)!). You do not need to memorise it blindly, Maalik. It comes from counting ordered selections first, then dividing by the number of ways each chosen group could have been rearranged."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Show three letters A, B, C branching into all six orders: ABC, ACB, BAC, BCA, CAB, CBA. Then circle them as one group when order does not matter, showing why permutations and combinations answer different questions."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "See how smart counting replaces long lists of possibilities.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If you choose a captain and vice-captain, does order matter?\n2. If you choose two toppings for a pizza, does order matter?\n3. Why is arranging 5 books harder than arranging 3 books?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: How many different 3-letter codes can be made from A, B, C, D if letters cannot repeat and order matters?\n\nSteps:\n1. There are 4 choices for the first letter.\n2. After that, 3 letters remain for the second position.\n3. Then 2 letters remain for the third position.\n4. Multiply: 4 × 3 × 2 = 24.\n\nAnswer: 24 codes.\n\nWhy it worked: Each position depended on earlier choices, and order mattered, so this was a permutation-style count.\n\nProblem: How many ways can Maalik choose 2 books from 5 different books to take on a trip?\n\nSteps:\n1. If order mattered, there would be 5 × 4 = 20 ways to pick a first book and a second book.\n2. But choosing Book A then Book B is the same pair as Book B then Book A.\n3. Each pair has been counted 2 times.\n4. Divide: 20 / 2 = 10.\n\nAnswer: 10 ways.\n\nWhy it worked: The problem asked for a selection, not an arrangement, so order did not matter.\n\nProblem: In a race with 6 runners, how many possible gold-silver-bronze results are there?\n\nSteps:\n1. There are 6 choices for gold.\n2. Then 5 choices remain for silver.\n3. Then 4 choices remain for bronze.\n4. Multiply: 6 × 5 × 4 = 120.\n\nAnswer: 120 possible results.\n\nWhy it worked: Gold, silver, and bronze are different positions, so order matters."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. How many ways can 4 different books be arranged on a shelf?\n2. How many outfits can be made from 5 shirts and 3 pairs of trousers?\n### Let's Think\n1. How many ways can you choose 2 players from a group of 6 for a team?\n2. How many 2-letter codes can be made from A, B, C, D, E if letters cannot repeat and order matters?\n### Maalik's Challenge\n1. Seven students are in a club. How many ways can they choose a president, secretary, and treasurer if no student can have more than one role?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Arranging 4 different books gives 4! = 4 × 3 × 2 × 1 = 24 ways.\n2. There are 5 choices for the shirt and 3 choices for the trousers, so the total is 5 × 3 = 15 outfits.\n### Let's Think\n1. If order mattered, there would be 6 × 5 = 30 choices. But each pair is counted twice, so 30 / 2 = 15 teams.\n2. There are 5 choices for the first letter and 4 choices for the second letter, so there are 5 × 4 = 20 codes.\n### Maalik's Challenge\n1. The roles are different, so order matters. There are 7 choices for president, 6 for secretary, and 5 for treasurer. The total is 7 × 6 × 5 = 210 ways."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, design a secret-code system using four symbols chosen from six possible symbols. Decide whether repetition is allowed, then count how many codes your system can make."
            }
          ]
        },
        {
          "id": "ch33",
          "title": "The Concept of a Limit",
          "stage": "Part 9 — Calculus Intro",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Limits exist because mathematics often wants to understand what happens as something gets closer and closer to a value, even if it never quite reaches it. This is essential for studying motion, curves, speed, area, and change.\n\nMaalik, limits let you reason at the edge of a number. Instead of asking only “What happens at this exact point?” you ask, “What value is the pattern approaching?” That tiny shift opens the door to calculus."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Ancient Greek mathematicians such as Eudoxus and Archimedes used limit-like ideas when finding areas and volumes. Archimedes approximated curved shapes by squeezing them between shapes he understood, getting closer and closer to the true answer.\n\nMany centuries later, Isaac Newton and Gottfried Wilhelm Leibniz developed calculus using ideas of infinitely small change. Later mathematicians made the idea of a limit more precise, so calculus could stand on a strong logical foundation."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A limit describes the value a function approaches as the input approaches a certain number. We write lim as x approaches a of f(x) = L, meaning that f(x) gets closer and closer to L when x gets closer and closer to a.\n\nThe function does not always need to equal the limit at the exact point. Imagine walking toward a door but stopping just before touching it. Your position can approach the door even if you never arrive. In mathematics, approaching is its own powerful idea.\n\nFor example, consider f(x) = x + 2. As x approaches 3, f(x) approaches 5. That one is simple because the function is smooth. But limits become especially useful when direct substitution creates trouble, such as a missing point or a 0/0 expression that can be simplified.\n\nMaalik, a limit is not magic and not guessing. It is disciplined closeness. You study values from nearby inputs and ask what number they are being pulled toward."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a graph with a curve approaching an open circle at x = 2 and y = 5. The open circle shows the function may be missing at that point, while arrows from both sides show the limit is still 5."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Watch how getting closer and closer can reveal a value even at a tricky point.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If x gets closer to 10, what does x + 1 get closer to?\n2. Can a pattern approach a value without actually reaching it?\n3. Why might looking from the left and from the right both matter?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Find the limit of x + 4 as x approaches 6.\n\nSteps:\n1. The expression x + 4 is continuous and has no tricky point at x = 6.\n2. Substitute x = 6.\n3. 6 + 4 = 10.\n\nAnswer: The limit is 10.\n\nWhy it worked: For a simple continuous expression, the value approached is the same as the value at the point.\n\nProblem: Find the limit of 2x - 1 as x approaches 3.\n\nSteps:\n1. As x gets close to 3, 2x gets close to 6.\n2. Then 2x - 1 gets close to 5.\n3. Direct substitution confirms it: 2(3) - 1 = 5.\n\nAnswer: The limit is 5.\n\nWhy it worked: Linear functions move smoothly, so nearby inputs lead to nearby outputs.\n\nProblem: Find the limit of (x^2 - 9)/(x - 3) as x approaches 3.\n\nSteps:\n1. Direct substitution gives (9 - 9)/(3 - 3) = 0/0, which is undefined.\n2. Factor the numerator: x^2 - 9 = (x - 3)(x + 3).\n3. For x not equal to 3, the expression becomes x + 3.\n4. As x approaches 3, x + 3 approaches 6.\n\nAnswer: The limit is 6.\n\nWhy it worked: The original expression has a hole at x = 3, but near that point it behaves exactly like x + 3."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Find the limit of x + 7 as x approaches 2.\n2. Find the limit of 3x as x approaches 5.\n### Let's Think\n1. Find the limit of x^2 - 1 as x approaches 4.\n2. Find the limit of (x^2 - 4)/(x - 2) as x approaches 2.\n### Maalik's Challenge\n1. Find the limit of (x^2 + 5x + 6)/(x + 2) as x approaches -2."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Since x + 7 is continuous, substitute x = 2. The limit is 2 + 7 = 9.\n2. Since 3x is continuous, substitute x = 5. The limit is 3(5) = 15.\n### Let's Think\n1. Substitute x = 4: 4^2 - 1 = 16 - 1 = 15. The limit is 15.\n2. Factor x^2 - 4 = (x - 2)(x + 2). For x not equal to 2, the expression becomes x + 2. As x approaches 2, the limit is 4.\n### Maalik's Challenge\n1. Factor x^2 + 5x + 6 = (x + 2)(x + 3). For x not equal to -2, the expression becomes x + 3. As x approaches -2, the limit is 1."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, create a fraction that has a factor cancelling to produce a hole, then find its limit at the missing x-value."
            }
          ]
        },
        {
          "id": "ch34",
          "title": "What Is a Derivative?",
          "stage": "Part 9 — Calculus Intro",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Derivatives exist because we often need to measure change at one exact instant. Average speed is easy: distance divided by time. But what does it mean to know your speed at exactly one moment, when no time interval seems to have passed?\n\nMaalik, the derivative answers that question using limits. It tells us the instantaneous rate of change and the slope of a curve at a single point. That makes it one of the central ideas in calculus."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Isaac Newton studied motion, gravity, and planets, and he needed mathematics that could describe changing quantities moment by moment. Around the same era, Gottfried Wilhelm Leibniz developed a powerful notation for calculus, including dy/dx.\n\nNewton and Leibniz used different styles, but both helped create tools for studying change. Their work transformed physics, engineering, astronomy, and eventually modern technology."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A derivative measures how fast a function is changing. If y = f(x), then the derivative tells you how much y changes for a tiny change in x. On a graph, it is the slope of the tangent line at a point.\n\nYou already know slope for a straight line: rise divided by run. Curves are harder because their steepness changes from point to point. The derivative solves this by looking at secant slopes between two nearby points and then taking a limit as the points move together.\n\nThe derivative of f at x can be written f'(x). One definition is f'(x) = lim as h approaches 0 of (f(x + h) - f(x)) / h. This fraction is an average rate of change over a tiny interval h. The limit turns it into instantaneous rate of change.\n\nMaalik, the derivative is like a mathematical speedometer. It does not just tell you where the function is; it tells you how the function is moving at that exact place."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw a curve with two nearby points connected by a secant line, then show the second point sliding closer until the secant becomes a tangent line. Label the tangent slope as the derivative."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "See how average slope becomes instant slope through the power of a limit.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. On a hill, where would your slope be bigger: on a gentle path or a steep climb?\n2. If a graph is flat at a point, what might its derivative be there?\n3. Why does a curve need a tangent line instead of one fixed slope for the whole graph?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Find the derivative of f(x) = x^2 using the definition.\n\nSteps:\n1. Use f'(x) = lim as h approaches 0 of (f(x + h) - f(x)) / h.\n2. f(x + h) = (x + h)^2 = x^2 + 2xh + h^2.\n3. Subtract f(x): x^2 + 2xh + h^2 - x^2 = 2xh + h^2.\n4. Divide by h: (2xh + h^2)/h = 2x + h.\n5. Let h approach 0: 2x + h approaches 2x.\n\nAnswer: f'(x) = 2x.\n\nWhy it worked: The limit of the average slope between nearby points became the exact tangent slope.\n\nProblem: What is the slope of y = x^2 at x = 3?\n\nSteps:\n1. From the previous result, the derivative of x^2 is 2x.\n2. Substitute x = 3.\n3. 2(3) = 6.\n\nAnswer: The slope is 6.\n\nWhy it worked: The derivative f'(x) gives the slope at any x-value, so f'(3) gives the slope at x = 3.\n\nProblem: A toy car's distance from the start is s(t) = t^2 metres after t seconds. What is its instantaneous speed at t = 4?\n\nSteps:\n1. Speed is the derivative of position.\n2. The derivative of t^2 is 2t.\n3. At t = 4, the speed is 2(4) = 8.\n4. The units are metres per second.\n\nAnswer: 8 metres per second.\n\nWhy it worked: The derivative measured how quickly the distance was changing at exactly 4 seconds."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. If f'(2) = 7, what does that tell you about the graph at x = 2?\n2. If a position function has derivative 0 at a moment, what does that suggest about speed then?\n### Let's Think\n1. For f(x) = x^2, what is f'(5)?\n2. A car's position is s(t) = t^2. What is its instantaneous speed at t = 6?\n### Maalik's Challenge\n1. Use the definition of derivative to show that the derivative of f(x) = 3x is 3."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. It tells you the tangent slope at x = 2 is 7. The graph is increasing fairly steeply there.\n2. It suggests the instantaneous speed is 0, meaning the object is momentarily not moving forward or backward.\n### Let's Think\n1. The derivative of x^2 is 2x, so f'(5) = 2(5) = 10.\n2. Since s(t) = t^2 has derivative 2t, the speed at t = 6 is 2(6) = 12 metres per second.\n### Maalik's Challenge\n1. Use f'(x) = lim as h approaches 0 of (f(x + h) - f(x))/h. For f(x) = 3x, f(x + h) = 3(x + h) = 3x + 3h. The numerator is 3x + 3h - 3x = 3h. Dividing by h gives 3. The limit as h approaches 0 is still 3, so f'(x) = 3."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, draw a smooth roller-coaster curve and mark three places: one with positive slope, one with negative slope, and one with slope 0."
            }
          ]
        },
        {
          "id": "ch35",
          "title": "Basic Differentiation Rules",
          "stage": "Part 9 — Calculus Intro",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Differentiation rules exist because using the limit definition every time would be slow. Once mathematicians discovered patterns, they turned those patterns into reliable shortcuts.\n\nMaalik, these rules are not random tricks. They are compressed logic. Each one comes from the definition of derivative, but once proven, it lets you work faster and focus on meaning."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Gottfried Wilhelm Leibniz created notation that made calculus easier to use and share. His dy/dx notation helped people think of derivatives as rates of change, and it became one of the most successful notations in mathematics.\n\nAs calculus spread, mathematicians organised its rules carefully. The power rule, constant multiple rule, and sum rule made it possible to differentiate complicated expressions without rebuilding the whole idea from limits each time."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "The constant rule says the derivative of a constant is 0. If f(x) = 7, the graph is a flat horizontal line. Since it does not rise or fall, its slope is 0 everywhere.\n\nThe power rule says that if f(x) = x^n, then f'(x) = nx^(n - 1), for many powers n. For example, the derivative of x^5 is 5x^4, and the derivative of x^2 is 2x.\n\nThe constant multiple rule says that if you multiply a function by a constant, its derivative is multiplied by that same constant. So the derivative of 3x^4 is 3 times the derivative of x^4, which is 12x^3.\n\nThe sum rule says you can differentiate terms separately. If f(x) = x^3 + 5x - 2, then f'(x) = 3x^2 + 5. Maalik, differentiation is like reading the motion of each term and then combining the results."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Show a polynomial graph with tangent lines at different points, and beside it show the expression split into terms. The diagram should connect each term to its derivative, showing differentiation as term-by-term slope reading."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Learn the shortcut rules that make derivatives fast without losing their meaning.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. Why should the derivative of 12 be 0?\n2. If x^2 has derivative 2x, what pattern might x^3 follow?\n3. Why can the derivative of x^2 + x be found by looking at x^2 and x separately?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Differentiate f(x) = x^5.\n\nSteps:\n1. Use the power rule: the derivative of x^n is nx^(n - 1).\n2. Here n = 5.\n3. Bring the 5 down and reduce the power by 1.\n\nAnswer: f'(x) = 5x^4.\n\nWhy it worked: The power rule is a proven shortcut for the limit pattern of powers.\n\nProblem: Differentiate g(x) = 4x^3 - 2x + 9.\n\nSteps:\n1. The derivative of 4x^3 is 4 × 3x^2 = 12x^2.\n2. The derivative of -2x is -2.\n3. The derivative of 9 is 0.\n4. Combine the results.\n\nAnswer: g'(x) = 12x^2 - 2.\n\nWhy it worked: The sum rule lets us differentiate each term separately, and the constant rule removes the 9.\n\nProblem: Find the slope of y = x^4 - 3x^2 + 2 at x = 2.\n\nSteps:\n1. Differentiate: y' = 4x^3 - 6x.\n2. Substitute x = 2.\n3. y'(2) = 4(2^3) - 6(2) = 32 - 12 = 20.\n\nAnswer: The slope is 20.\n\nWhy it worked: The derivative gives the tangent slope formula, and substituting x = 2 gives the slope at that point."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Differentiate f(x) = x^6.\n2. Differentiate g(x) = 8.\n### Let's Think\n1. Differentiate h(x) = 3x^4 + 2x^2 - 5.\n2. Find the slope of y = x^3 at x = 4.\n### Maalik's Challenge\n1. Find the x-values where the graph y = x^3 - 6x has a horizontal tangent."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. By the power rule, the derivative of x^6 is 6x^5.\n2. The derivative of a constant is 0, so g'(x) = 0.\n### Let's Think\n1. Differentiate term by term: the derivative of 3x^4 is 12x^3, the derivative of 2x^2 is 4x, and the derivative of -5 is 0. So h'(x) = 12x^3 + 4x.\n2. The derivative of y = x^3 is y' = 3x^2. At x = 4, the slope is 3(4^2) = 48.\n### Maalik's Challenge\n1. First differentiate: y' = 3x^2 - 6. A horizontal tangent has slope 0, so set 3x^2 - 6 = 0. Then 3x^2 = 6, so x^2 = 2. Therefore x = square root of 2 or x = -square root of 2."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "{student_name}, make a three-term polynomial of your own, differentiate it, then choose one x-value and find the slope of the tangent there."
            }
          ]
        },
        {
          "id": "ch36",
          "title": "Introduction to Integration",
          "stage": "Part 9 — Calculus Intro",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Suppose you know how fast a rocket is moving each second, but you want the total distance it travelled. Or suppose you know the height of a curved shape at every point, and you want its total area. Integration exists because mathematics needed a way to add up infinitely many tiny pieces into one meaningful whole.\n\nMaalik, differentiation tells you about change at an instant. Integration answers the reverse sort of question: if you know the tiny changes, what total do they build? It is the mathematics of accumulation."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Two giants, Isaac Newton and Gottfried Wilhelm Leibniz, developed calculus in the late 1600s. Newton cared about motion, planets, and changing quantities. Leibniz cared about patterns, symbols, and elegant methods. They approached the subject differently, but both saw the same deep truth: area and change are secretly connected.\n\nLeibniz gave us the integral sign, ∫, which is really a stretched S for \"sum.\" That is a beautiful clue. An integral is a sum of tiny pieces. Once you see that, the symbol stops looking mysterious."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "Imagine the graph of a function as the roofline of a strange building. If you want the area under that roof, one way is to chop the region into very thin rectangles and add their areas. If the rectangles get thinner and thinner, the total becomes more and more exact. Integration is the limit of that idea.\n\nA definite integral, such as ∫ from 0 to 4 of f(x) dx, gives a total amount over an interval. Very often, that total is an area. It can also represent total distance, total mass, total water collected, or anything else that accumulates.\n\nAn indefinite integral asks for an antiderivative: a function whose derivative is the one you started with. For example, because the derivative of x^2 is 2x, an antiderivative of 2x is x^2. Usually we add + C because many different functions have the same derivative.\n\nThe amazing bridge is this: differentiation and integration are inverse ideas. One measures local change; the other rebuilds the whole picture from those changes."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Picture the area under a curved graph filled with skinny rectangles. As the rectangles become narrower, the staircase shape hugs the curve more tightly, and the total rectangle area approaches the exact area under the graph."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to watch how tiny slices join together to make one total area.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. A rectangle of width 1 and height 5 has area 5. What is the total area of four such rectangles placed side by side?\n2. If four width-1 strips have heights 1, 2, 3, and 4, what total area do you get by adding the strip areas?\n3. If you cut the strips thinner and thinner under a sloping line, do you expect your total to become less accurate or more accurate?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Find the integral of 3 from x = 0 to x = 4.\n\nSteps:\n1. The graph y = 3 is a horizontal line.\n2. From x = 0 to x = 4, the region under the line is a rectangle.\n3. Its width is 4 and its height is 3.\n4. Area = 4 × 3 = 12.\n\nAnswer: ∫ from 0 to 4 of 3 dx = 12.\n\nWhy it worked: A constant function makes a rectangle, so the integral is just the rectangle's area.\n\nProblem: Find the area under y = x from x = 0 to x = 5.\n\nSteps:\n1. The graph of y = x from 0 to 5 forms a right triangle under the line.\n2. The base is 5.\n3. The height is also 5.\n4. Triangle area = 1/2 × 5 × 5 = 25/2.\n\nAnswer: ∫ from 0 to 5 of x dx = 25/2 = 12.5.\n\nWhy it worked: Under a straight line through the origin, the region is a triangle, so geometry gives the integral exactly.\n\nProblem: Find an antiderivative of 2x.\n\nSteps:\n1. Ask: what function has derivative 2x?\n2. The derivative of x^2 is 2x.\n3. Any constant added to x^2 disappears when differentiated.\n\nAnswer: An antiderivative of 2x is x^2 + C.\n\nWhy it worked: Integration can reverse differentiation. Since d/dx of x^2 + C is 2x, x^2 + C is the correct family of antiderivatives."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Find ∫ from 0 to 6 of 2 dx.\n2. Find an antiderivative of 5x^4.\n### Let's Think\n1. Find the area under y = x from x = 0 to x = 10.\n2. A particle has speed v(t) = 4t metres per second from t = 0 to t = 3. How far does it travel in those 3 seconds?\n### Maalik's Challenge\n1. Find the area under y = 2x + 1 from x = 0 to x = 4 in two different ways."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. The graph y = 2 is a rectangle from x = 0 to x = 6. Width = 6 and height = 2, so the area is 12. Therefore ∫ from 0 to 6 of 2 dx = 12.\n2. We need a function whose derivative is 5x^4. Since the derivative of x^5 is 5x^4, an antiderivative is x^5 + C.\n### Let's Think\n1. The region under y = x from 0 to 10 is a triangle with base 10 and height 10. Its area is 1/2 × 10 × 10 = 50. So ∫ from 0 to 10 of x dx = 50.\n2. The speed graph is a line from (0, 0) to (3, 12). The area under it is a triangle with base 3 and height 12. Area = 1/2 × 3 × 12 = 18. So the particle travels 18 metres.\n### Maalik's Challenge\n1. First way: geometry. From x = 0 to x = 4, the graph y = 2x + 1 makes a trapezium with parallel sides 1 and 9 and width 4. Area = 1/2 × (1 + 9) × 4 = 20. Second way: antiderivative. An antiderivative of 2x + 1 is x^2 + x. Evaluate from 0 to 4: (4^2 + 4) - (0^2 + 0) = 20. So the area is 20."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Look at something that changes steadily today, like water filling a bottle or distance increasing on a walk, and describe what the integral would mean in that situation."
            }
          ]
        },
        {
          "id": "ch37",
          "title": "Euclid's Proof that Primes are Infinite",
          "stage": "Part 10 — Theorems & Proofs",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Prime numbers are the atoms of arithmetic. Every whole number bigger than 1 can be built from primes by multiplication. Once mathematicians realised this, a thrilling question appeared: do the primes ever run out, or does the list continue forever?\n\nEuclid's proof exists because mathematics does not like guesses when a perfect argument is possible. Instead of checking bigger and bigger primes forever, Euclid found a reason that no final prime list can ever succeed."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Euclid lived in Alexandria more than two thousand years ago and wrote the *Elements*, one of the most influential books in the history of mathematics. It was not just a collection of facts. It showed how to build mathematics from definitions, logic, and proof.\n\nHis proof that there are infinitely many primes is still famous because it is short, clean, and deep. It feels almost like magic the first time you see it, but every step is completely logical."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "Suppose, just for the sake of argument, that there are only finitely many primes. Imagine you have listed them all: p1, p2, p3, and so on up to a final one.\n\nNow multiply all of them together and add 1. Call that new number N. When you divide N by any prime on your list, the remainder is 1, because N is exactly one more than a multiple of that prime.\n\nThat means none of the listed primes can divide N. So either N itself is prime, or N has a prime factor not on the list. Either way, your \"complete\" list was not complete after all.\n\nSo the assumption that there are only finitely many primes must be false. Therefore there are infinitely many primes. The clever twist is that Euclid does not need to find every prime. He only proves that the search can never end."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Show a row of listed primes being multiplied together, then add 1 to create a new number. Draw arrows from each listed prime showing a remainder of 1 when dividing the new number, proving that some new prime must appear."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to watch one of the cleanest contradiction proofs in all of mathematics.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. Multiply 2 × 3 × 5 and then add 1. What number do you get?\n2. Is that new number divisible by 2, 3, or 5?\n3. If it is not divisible by any prime on your list, what must be true about its prime factors?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Start with the list 2, 3, 5. Form Euclid's new number.\n\nSteps:\n1. Multiply the primes: 2 × 3 × 5 = 30.\n2. Add 1: 30 + 1 = 31.\n3. Check divisibility: 31 is not divisible by 2, 3, or 5.\n4. In fact, 31 is prime.\n\nAnswer: The new number is 31, a prime not on the original list.\n\nWhy it worked: Euclid's construction forces the new number to escape divisibility by every prime on the list.\n\nProblem: Start with the list 2, 3, 5, 7. Form Euclid's new number.\n\nSteps:\n1. Multiply: 2 × 3 × 5 × 7 = 210.\n2. Add 1: 210 + 1 = 211.\n3. Check the listed primes: 211 is not divisible by 2, 3, 5, or 7.\n4. Testing small divisors shows 211 is prime.\n\nAnswer: The new number is 211, another new prime.\n\nWhy it worked: Again, adding 1 makes division by each listed prime leave remainder 1.\n\nProblem: Show that Euclid's new number does not have to be prime itself.\n\nSteps:\n1. Use the list 2, 3, 5, 7, 11, 13.\n2. Multiply: 2 × 3 × 5 × 7 × 11 × 13 = 30030.\n3. Add 1: N = 30031.\n4. N is not divisible by 2, 3, 5, 7, 11, or 13.\n5. But 30031 = 59 × 509.\n\nAnswer: The new number is composite, but its prime factors 59 and 509 are both new.\n\nWhy it worked: Euclid's proof only needs a new prime factor, not necessarily a new prime number made directly by the formula."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Form Euclid's number using the list 2, 3.\n2. Form Euclid's number using the list 2, 3, 5, 7.\n### Let's Think\n1. Suppose someone claims that 13 is the largest prime. Use Euclid's idea to challenge that claim.\n2. If N = p1 × p2 × ... × pk + 1 is composite, why must at least one of its prime factors be missing from the list p1, p2, ..., pk?\n### Maalik's Challenge\n1. Explain, in your own words, why Euclid's proof does not need to tell us what the \"next prime\" is."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Multiply 2 × 3 = 6, then add 1 to get 7. So Euclid's number is 7.\n2. Multiply 2 × 3 × 5 × 7 = 210, then add 1 to get 211. So Euclid's number is 211.\n### Let's Think\n1. If 13 were the largest prime, then the list of all primes would include at least 2, 3, 5, 7, 11, 13. Multiply them and add 1 to get 30031. That number is not divisible by any of those listed primes. Therefore either 30031 is prime or it has a prime factor not on the list. In both cases, there must be a prime bigger than 13.\n2. Every composite number has a prime factor. If one of the listed primes divided N, then because N is one more than a multiple of that prime, the remainder would be 1, not 0. So none of the listed primes can divide N. Therefore any prime factor of N must be new.\n### Maalik's Challenge\n1. Euclid's proof is about impossibility, not about listing. It says: no matter what finite list of primes you write down, I can build a number that avoids all of them. That means there cannot be a final list. So the proof shows the collection of primes is infinite without having to identify a single \"last missing one\" step by step."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Write down your own finite list of primes, build Euclid's number from it, and investigate whether your new number is prime or composite."
            }
          ]
        },
        {
          "id": "ch38",
          "title": "Euler's Identity — The Most Beautiful Equation",
          "stage": "Part 10 — Theorems & Proofs",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "Some equations solve problems. Others reveal hidden unity. Euler's identity exists because three enormous parts of mathematics — growth, geometry, and imaginary numbers — meet in one astonishing place.\n\nMaalik, mathematicians love this equation not because it is decorative, but because it connects five of the most important constants ever discovered: 0, 1, e, i, and π. It says that ideas that look unrelated are actually woven together."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Leonhard Euler was one of the most extraordinary mathematicians in history. He worked on geometry, mechanics, number theory, infinite series, notation, and much more. In fact, many symbols we now use all the time became standard because of him.\n\nEuler had a gift for seeing connections where other people saw separate topics. His identity is a perfect example. It does not merely calculate something; it reveals a deep structure hiding behind several branches of mathematics at once."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "The identity is e^(iπ) + 1 = 0. At first glance it looks impossible. The number e comes from exponential growth, π comes from circles, and i is defined by i^2 = -1. Why should they belong in one equation?\n\nThe bridge is Euler's formula: e^(iθ) = cos(θ) + i sin(θ). This says that complex exponentials describe rotation on the unit circle. When θ = π, you have turned halfway around the circle.\n\nAt angle π, cosine is -1 and sine is 0. So e^(iπ) = cos(π) + i sin(π) = -1 + 0i = -1. Add 1, and you get 0. That is Euler's identity.\n\nA wonderful way to think about it is this: multiplication by certain complex numbers causes turning. Exponential growth, when allowed to move into the complex plane, becomes rotation. That is why the equation feels so surprising and so beautiful."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Draw the unit circle with a point starting at 1 on the real axis and rotating by angle π until it lands at -1. Label that landing point as e^(iπ), then show that adding 1 moves the value to 0."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to watch growth, circles, and imaginary numbers meet in one perfect equation.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. What are i^2, i^3, and i^4?\n2. On the unit circle, where do you land after a half-turn of π radians?\n3. If e^(iθ) = cos(θ) + i sin(θ), what happens when θ = π?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Simplify i^2, i^3, and i^4.\n\nSteps:\n1. By definition, i^2 = -1.\n2. Then i^3 = i^2 × i = -1 × i = -i.\n3. Next, i^4 = i^2 × i^2 = (-1)(-1) = 1.\n\nAnswer: i^2 = -1, i^3 = -i, and i^4 = 1.\n\nWhy it worked: Powers of i repeat in a cycle of length 4: i, -1, -i, 1, then back to i.\n\nProblem: Use Euler's formula to find e^(iπ/2).\n\nSteps:\n1. Euler's formula says e^(iθ) = cos(θ) + i sin(θ).\n2. Substitute θ = π/2.\n3. cos(π/2) = 0 and sin(π/2) = 1.\n4. So e^(iπ/2) = 0 + i(1) = i.\n\nAnswer: e^(iπ/2) = i.\n\nWhy it worked: A quarter-turn on the unit circle lands at the point (0, 1), which is the complex number i.\n\nProblem: Derive Euler's identity from Euler's formula.\n\nSteps:\n1. Start with e^(iθ) = cos(θ) + i sin(θ).\n2. Let θ = π.\n3. Then e^(iπ) = cos(π) + i sin(π).\n4. Since cos(π) = -1 and sin(π) = 0, we get e^(iπ) = -1.\n5. Add 1 to both sides.\n\nAnswer: e^(iπ) + 1 = 0.\n\nWhy it worked: A rotation by π radians lands exactly at -1 on the complex plane."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Simplify i^5.\n2. Find cos(π) and sin(π).\n### Let's Think\n1. Use Euler's formula to find e^(i0).\n2. Explain why e^(iπ) + 1 = 0 contains five especially important constants.\n### Maalik's Challenge\n1. Use Euler's formula to find e^(i2π)."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Since i^4 = 1, we have i^5 = i^4 × i = 1 × i = i.\n2. On the unit circle, angle π is a half-turn to the point (-1, 0). So cos(π) = -1 and sin(π) = 0.\n### Let's Think\n1. Euler's formula gives e^(i0) = cos(0) + i sin(0) = 1 + i(0) = 1.\n2. The equation contains 0 and 1, the most basic numbers in arithmetic; π, the circle constant; e, the constant of continuous growth; and i, the imaginary unit. Seeing all five in one true equation is astonishing because they come from very different areas of mathematics.\n### Maalik's Challenge\n1. Use θ = 2π in Euler's formula: e^(i2π) = cos(2π) + i sin(2π) = 1 + i(0) = 1. A full turn on the unit circle brings you back to the starting point 1."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Draw a complex plane, mark 1, i, -1, and -i, and describe what multiplication by i does to a point each time."
            }
          ]
        },
        {
          "id": "ch39",
          "title": "Fermat's Last Theorem",
          "stage": "Part 10 — Theorems & Proofs",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "After discovering that 3^2 + 4^2 = 5^2, it is completely natural to ask a sharper question: can the same thing happen with cubes, fourth powers, or any higher powers? Fermat's Last Theorem exists because mathematicians could not resist asking whether the Pythagorean pattern continues.\n\nThe answer is astonishing. For squares, there are infinitely many whole-number solutions. But for every exponent greater than 2, the pattern breaks completely. That makes the theorem feel both simple to state and very mysterious."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Pierre de Fermat wrote in the margin of a book that he had a \"truly marvelous proof\" that the equation x^n + y^n = z^n has no positive integer solutions when n > 2, but the margin was too small to contain it. For centuries, mathematicians wondered whether he really had such a proof.\n\nThe theorem remained unsolved for more than 350 years. Finally, Andrew Wiles, after years of secret work and then a dramatic correction with Richard Taylor, proved it in the 1990s using deep modern mathematics. The story is one of the greatest detective adventures in the history of the subject."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "Fermat's Last Theorem says this: for positive integers x, y, z, and any integer n greater than 2, the equation x^n + y^n = z^n has no solutions.\n\nThe case n = 2 is different. That is exactly the world of Pythagorean triples, such as 3^2 + 4^2 = 5^2. So the theorem is not saying the equation never works. It says the miracle stops after squares.\n\nWhy is this hard? Because checking examples is never enough. You can test thousands of triples, but the theorem talks about all positive integers forever. To prove a statement that strong, mathematicians needed ideas from number theory, algebra, and geometry.\n\nFor you, Maalik, the key lesson is that a question can be easy to understand and still be extremely deep. That is one reason mathematics stays alive."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Show three squares with areas 9, 16, and 25 fitting the Pythagorean case, then beside them show cubes of side 3, 4, and 5 to suggest that the neat square relationship does not continue to higher powers."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to explore why squares can cooperate while higher powers refuse.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. Verify that 3^2 + 4^2 = 5^2.\n2. Now compare 3^3 + 4^3 with nearby cubes. Does it equal 5^3?\n3. Why does checking many examples still not count as a proof for all integers?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: Show that the exponent n = 2 does allow a whole-number solution.\n\nSteps:\n1. Compute 3^2 = 9.\n2. Compute 4^2 = 16.\n3. Add them: 9 + 16 = 25.\n4. Compute 5^2 = 25.\n\nAnswer: 3^2 + 4^2 = 5^2, so n = 2 does have solutions.\n\nWhy it worked: Fermat's Last Theorem excludes only exponents greater than 2, not the square case.\n\nProblem: Test whether 3^3 + 4^3 = 5^3.\n\nSteps:\n1. Compute 3^3 = 27.\n2. Compute 4^3 = 64.\n3. Add them: 27 + 64 = 91.\n4. Compute 5^3 = 125.\n\nAnswer: No. 3^3 + 4^3 = 91, not 125.\n\nWhy it worked: This example shows that a Pythagorean triple for squares does not automatically become a triple for cubes.\n\nProblem: Explain why a solution for n = 6 would automatically create a solution for n = 3.\n\nSteps:\n1. Suppose x^6 + y^6 = z^6 for positive integers x, y, z.\n2. Rewrite the powers: x^6 = (x^2)^3, y^6 = (y^2)^3, and z^6 = (z^2)^3.\n3. Then (x^2)^3 + (y^2)^3 = (z^2)^3.\n4. That would be a whole-number solution for exponent 3.\n\nAnswer: Any exponent-6 solution would produce an exponent-3 solution.\n\nWhy it worked: Higher powers can sometimes be regrouped into lower powers, which helps mathematicians reduce the problem."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Verify that 5^2 + 12^2 = 13^2.\n2. Check whether 1^3 + 2^3 is a cube.\n### Let's Think\n1. Explain in one sentence what Fermat's Last Theorem says for n = 4.\n2. Why does the existence of 3^2 + 4^2 = 5^2 not contradict Fermat's Last Theorem?\n### Maalik's Challenge\n1. Show that if there were a positive integer solution to x^6 + y^6 = z^6, then there would also be a positive integer solution to a^3 + b^3 = c^3."
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Compute 5^2 = 25 and 12^2 = 144. Their sum is 169. Since 13^2 = 169, we get 5^2 + 12^2 = 13^2.\n2. Compute 1^3 + 2^3 = 1 + 8 = 9. But 9 is not a cube of any whole number, so it is not a cube.\n### Let's Think\n1. For n = 4, the theorem says there are no positive integers x, y, z such that x^4 + y^4 = z^4.\n2. The theorem only applies to exponents greater than 2. The equation 3^2 + 4^2 = 5^2 uses exponent 2, so it belongs to the allowed Pythagorean case.\n### Maalik's Challenge\n1. If x^6 + y^6 = z^6, define a = x^2, b = y^2, and c = z^2. Then a^3 = (x^2)^3 = x^6, and similarly b^3 = y^6 and c^3 = z^6. So the equation becomes a^3 + b^3 = c^3. Therefore any solution for exponent 6 would force a solution for exponent 3."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Find one famous mathematical question that is easy to ask but hard to solve, and explain why you think people kept chasing it."
            }
          ]
        },
        {
          "id": "ch40",
          "title": "Gödel's Incompleteness Theorem",
          "stage": "Part 10 — Theorems & Proofs",
          "age": "9+",
          "duration": "1–2 weeks",
          "skill": "Advanced maths thinking",
          "sections": [
            {
              "id": "why",
              "title": "Why Does This Exist?",
              "type": "text",
              "body": "For a long time, mathematicians dreamed of creating a perfect rulebook: a formal system with clear axioms and rules that could, in principle, prove every true statement about numbers. Gödel's incompleteness theorem exists because this dream was important enough to test.\n\nThe result was startling. Gödel showed that if a rulebook is strong enough to talk about ordinary arithmetic and is also consistent, then there will be true statements it cannot prove from inside itself. The theorem reveals a limit built into formal reasoning."
            },
            {
              "id": "story",
              "title": "Mathematician's Story",
              "type": "text",
              "body": "Kurt Gödel published his incompleteness theorems in 1931. At the time, many mathematicians hoped that all of mathematics could be placed on a perfectly secure logical foundation. David Hilbert was one of the leaders of that dream.\n\nGödel did not destroy mathematics. He did something subtler and deeper. He showed that no single sufficiently strong formal system can capture every arithmetic truth. That changed logic, philosophy, and computer science forever."
            },
            {
              "id": "explanation",
              "title": "Textual Explanation",
              "type": "text",
              "body": "A formal system is like a precise game of reasoning. You start with axioms, which are accepted statements, and apply fixed rules to create proofs. In a tiny system, this can work beautifully.\n\nGödel's insight was to let statements talk about proofs indirectly by coding symbols and sentences as numbers. That made it possible for arithmetic to describe claims about arithmetic itself.\n\nUsing that coding, Gödel built a statement that roughly says, \"This statement cannot be proved in this system.\" If the system proved that statement, it would become false, which would be disastrous for a consistent system. So, if the system is consistent, it cannot prove the statement.\n\nBut from outside the system, we can then see something remarkable: the statement is true precisely because it has no proof inside the system. So the system misses at least one true arithmetic statement. That is incompleteness. It does not mean mathematics fails. It means no single rulebook can do absolutely everything."
            },
            {
              "id": "visual",
              "title": "Visual Proof or Diagram",
              "type": "text",
              "body": "Show a formal rulebook on one side and a statement on the other that points back to the rulebook saying, \"I have no proof in here.\" Use numbered arrows to suggest Gödel's coding of statements into arithmetic."
            },
            {
              "id": "video",
              "title": "Embedded Chapter Video",
              "type": "video",
              "body": "Tap to explore why even a brilliant rulebook has limits.",
              "videoKey": "math"
            },
            {
              "id": "intuition",
              "title": "Intuition Check",
              "type": "text",
              "body": "1. If a rule says \"0 is even\" and another says \"if n is even, then n + 2 is even,\" can you prove that 4 is even?\n2. What is the difference between the sentence \"This sentence has five words\" and the sentence \"This sentence is false\"?\n3. Why might a statement that talks about its own provability be especially tricky?"
            },
            {
              "id": "examples",
              "title": "Worked Examples",
              "type": "text",
              "body": "Problem: In a toy rule system, the axioms are: \"0 is even\" and \"if n is even, then n + 2 is even.\" Prove that 6 is even.\n\nSteps:\n1. From the first axiom, 0 is even.\n2. Apply the second rule to 0, so 2 is even.\n3. Apply the second rule again to 2, so 4 is even.\n4. Apply the second rule again to 4, so 6 is even.\n\nAnswer: 6 is even in this system.\n\nWhy it worked: Formal systems use fixed starting points and repeatable rules to build proofs step by step.\n\nProblem: Decide whether each self-referential sentence behaves cleanly.\n\nSteps:\n1. Consider: \"This sentence has five words.\" Count the words: This / sentence / has / five / words.\n2. It has five words, so the sentence is true.\n3. Now consider: \"This sentence is false.\"\n4. If it is true, then it is false. If it is false, then it is true.\n\nAnswer: The first sentence behaves normally; the second creates a paradox.\n\nWhy it worked: Self-reference is not always a problem, but some kinds of self-reference create logical trouble.\n\nProblem: Suppose a statement G says, \"G has no proof in Rulebook R.\" What happens if Rulebook R proves G?\n\nSteps:\n1. If R proves G, then G is provable in R.\n2. But G itself says that G has no proof in R.\n3. So proving G would make G false.\n4. A consistent rulebook should not prove a false statement of that kind.\n\nAnswer: If R is consistent, it cannot prove G.\n\nWhy it worked: This is the core Gödel-style idea: a statement can be designed to talk about its own provability, creating a limit inside the system."
            },
            {
              "id": "practice",
              "title": "Practice Questions",
              "type": "text",
              "body": "### Warm Up\n1. Using the toy system from this chapter, prove that 8 is even.\n2. Is the sentence \"This sentence has four words\" true or false?\n### Let's Think\n1. Why can a consistent rulebook not prove a statement G that says, \"G has no proof in this rulebook\"?\n2. Does Gödel's incompleteness theorem mean that 2 + 3 = 5 might be unprovable? Explain.\n### Maalik's Challenge\n1. Imagine a rulebook that could prove every true arithmetic statement. What problem would arise when you apply Gödel's self-reference idea to that rulebook?"
            },
            {
              "id": "solutions",
              "title": "Solutions",
              "type": "text",
              "body": "### Warm Up\n1. Start with 0 is even. Apply the rule \"if n is even, then n + 2 is even\" four times: 0 even, 2 even, 4 even, 6 even, 8 even. So 8 is even.\n2. Count the words: This / sentence / has / four / words. That is five words, not four, so the sentence is false.\n### Let's Think\n1. If the rulebook proved G, then G would be provable. But G says it has no proof in that same rulebook. So the rulebook would be proving a statement that says it cannot be proved there. That clash is exactly why a consistent rulebook cannot prove G.\n2. No. Basic truths like 2 + 3 = 5 are provable in ordinary arithmetic. Gödel's theorem says there exist some true arithmetic statements that escape proof inside a sufficiently strong consistent system, not that familiar arithmetic suddenly stops working.\n### Maalik's Challenge\n1. If the rulebook proved every true arithmetic statement, then it would need to handle its own Gödel-style sentence G. If it proved G, contradiction appears because G says it has no proof there. If it failed to prove a true G, then it was not proving every true statement after all. So self-reference forces a limit."
            },
            {
              "id": "mission",
              "title": "Student's Mission",
              "type": "text",
              "body": "Invent a tiny rule system of your own with one starting fact and one repeating rule, then see which statements your system can prove and which it cannot."
            }
          ]
        }
      ]
    },
    "programming": {
      "id": "programming",
      "name": "Coding Journey",
      "shortName": "Programming",
      "emoji": "💻",
      "theme": "programming",
      "description": "A software engineering roadmap from game-coding foundations to college-ready projects.",
      "chapters": [
        {
          "id": "ch1",
          "title": "From Gamer Coder to Engineer",
          "stage": "Foundation",
          "age": "12",
          "duration": "1 week",
          "skill": "Roadmap setup",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A personal engineer profile and coding mission board."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Real engineers plan learning like quests: clear goals, small releases, and proof of progress."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Grace Hopper turned curiosity into compilers and made computers easier for humans to command."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "You already touched games, Roblox, Unity, JavaScript and Minecraft modding. Now the mission is to build reliable programs and a portfolio, not just follow tutorials.",
              "code": "goal = \"ship projects\"\nfor week in roadmap:\n    learn()\n    build()\n    reflect()"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "cs"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Write three reasons you want to become a software engineer.",
                "🟡 List five things you have already built or learned at KidsComp.",
                "🔴 Create a folder called Coding Journey with subfolders for Projects, Notes and Experiments."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a README about your coding mission and save it as your first portfolio artifact."
            }
          ]
        },
        {
          "id": "ch2",
          "title": "Python Power-Up",
          "stage": "Foundation",
          "age": "12",
          "duration": "2 weeks",
          "skill": "Python fluency",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A console-based adventure game with choices and score."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Python is used for automation, AI, data, websites and prototypes because it is readable and fast to write."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Guido van Rossum designed Python to make programming feel clear and enjoyable."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Practise variables, input, conditionals, loops and functions until they feel natural. Focus on naming and reading your own code aloud.",
              "code": "def ask(question):\n    answer = input(question)\n    return answer.lower().strip()"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "python"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Print a custom welcome message.",
                "🟡 Ask the player for a choice and respond differently.",
                "🔴 Add health, coins and three possible endings."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Ship “Terminal Quest”, a mini text adventure."
            }
          ]
        },
        {
          "id": "ch3",
          "title": "Debugging Like a Detective",
          "stage": "Foundation",
          "age": "12",
          "duration": "2 weeks",
          "skill": "Debugging",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A bug diary and a repaired broken game."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Debugging is one of the biggest real engineering skills; the best coders are calm problem solvers."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Margaret Hamilton’s Apollo software team prevented disasters by thinking carefully about errors."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Use print checks, read error messages, isolate one bug at a time, and write what fixed it. Bugs are clues, not failures.",
              "code": "print(\"health before hit:\", health)\nhealth -= damage\nprint(\"health after hit:\", health)"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "python"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Fix a missing colon syntax error.",
                "🟡 Trace why a score is not increasing.",
                "🔴 Write a bug diary with cause, fix and lesson."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Repair a deliberately broken Python game and explain every fix."
            }
          ]
        },
        {
          "id": "ch4",
          "title": "Functions and Clean Code",
          "stage": "Foundation",
          "age": "12",
          "duration": "2 weeks",
          "skill": "Functions",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A reusable quiz engine."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Functions stop code becoming spaghetti and let engineers reuse ideas across projects."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Barbara Liskov helped shape how programmers think about modular, reliable software."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "A function should do one clear job. Give it a helpful name, inputs, and a returned result when useful.",
              "code": "def calculate_score(correct, total):\n    return round((correct / total) * 100)"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "python"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Turn repeated print lines into a function.",
                "🟡 Write a function that checks an answer.",
                "🔴 Build a quiz with at least five questions and final feedback."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a “Tech Trivia Quiz” for family or friends."
            }
          ]
        },
        {
          "id": "ch5",
          "title": "Files, Data and Saves",
          "stage": "Foundation",
          "age": "12",
          "duration": "2 weeks",
          "skill": "Files and JSON",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A high-score tracker that saves results."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Games, apps and websites all need to remember data between sessions."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Radia Perlman designed systems that help networks remember safe paths through chaos."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Use text or JSON files to store data. Read, update, save, and handle missing files gracefully.",
              "code": "import json\nwith open(\"scores.json\", \"w\") as f:\n    json.dump(scores, f, indent=2)"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "python"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Save one score to a file.",
                "🟡 Load the score when the program starts.",
                "🔴 Store a list of players and sort the top scores."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build a reusable high-score system for your games."
            }
          ]
        },
        {
          "id": "ch6",
          "title": "GitHub: Your Engineer Backpack",
          "stage": "Foundation",
          "age": "12",
          "duration": "2 weeks",
          "skill": "Git/GitHub basics",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A GitHub account structure and first repository."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Git is how engineers protect work, track changes and collaborate without chaos."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Linus Torvalds created Git to manage the Linux project with thousands of contributors."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Commit small changes with clear messages. A repository is the history of a project, not just a folder online.",
              "code": "git init\ngit add .\ngit commit -m \"Add first Python adventure\""
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "git"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Create a repo for Terminal Quest.",
                "🟡 Write a clear README with screenshots or notes.",
                "🔴 Make three small commits instead of one giant commit."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Publish your first GitHub repository with a README."
            }
          ]
        },
        {
          "id": "ch7",
          "title": "HTML: Structure the Web",
          "stage": "Foundation",
          "age": "12-13",
          "duration": "3 weeks",
          "skill": "HTML",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A personal coding homepage."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Every website starts with meaningful structure: headings, sections, links, lists and forms."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Tim Berners-Lee invented the Web so information could connect through links."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "HTML describes content. Use semantic tags so browsers, search engines and screen readers understand the page.",
              "code": "<main>\n  <h1>Noah Codes</h1>\n  <section>My projects</section>\n</main>"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "html"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Create a page with heading, bio and project list.",
                "🟡 Add links to useful coding resources.",
                "🔴 Add a contact-style form without collecting real personal data."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build your first “Noah Codes” homepage."
            }
          ]
        },
        {
          "id": "ch8",
          "title": "CSS: Make Interfaces Feel Alive",
          "stage": "Foundation",
          "age": "12-13",
          "duration": "3 weeks",
          "skill": "CSS",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A dark terminal-style portfolio page."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Design affects whether people understand and enjoy your software."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Susan Kare designed early computer icons that made interfaces more friendly."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "CSS controls layout, colour, spacing, typography and responsive behaviour. Good design is clarity plus personality.",
              "code": ".card {\n  border: 1px solid #22d3ee;\n  border-radius: 18px;\n}"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "html"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Style your homepage with a dark theme.",
                "🟡 Create three project cards with hover effects.",
                "🔴 Make the layout work on laptop and phone widths."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Upgrade your homepage into a polished portfolio landing page."
            }
          ]
        },
        {
          "id": "ch9",
          "title": "JavaScript in the Browser",
          "stage": "Foundation",
          "age": "13",
          "duration": "3 weeks",
          "skill": "DOM basics",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "An interactive reaction-time game."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "JavaScript makes websites react to clicks, keyboard input, timers and data."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Brendan Eich created JavaScript quickly, but it became one of the world’s most used languages."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "The DOM is the page as JavaScript sees it. Select elements, listen for events, and update content safely.",
              "code": "button.addEventListener(\"click\", () => {\n  score += 1;\n  scoreEl.textContent = score;\n});"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "js"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Change text when a button is clicked.",
                "🟡 Track a score in JavaScript.",
                "🔴 Add a timer and final result screen."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build “Reflex Hacker”, a browser reaction game."
            }
          ]
        },
        {
          "id": "ch10",
          "title": "Game Loops and Canvas",
          "stage": "Foundation",
          "age": "13",
          "duration": "3 weeks",
          "skill": "Canvas games",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A simple 2D arcade game."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Game loops teach timing, state, input and rendering — core ideas behind interactive software."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "John Carmack became legendary by understanding performance and game engines deeply."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "A game loop repeatedly updates the world and redraws the screen. Keep game state separate from rendering.",
              "code": "function loop() {\n  update();\n  draw();\n  requestAnimationFrame(loop);\n}"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "js"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Draw a player rectangle on canvas.",
                "🟡 Move it with arrow keys.",
                "🔴 Add coins, enemies and a win condition."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a mini browser arcade game inspired by your KidsComp game work."
            }
          ]
        },
        {
          "id": "ch11",
          "title": "Algorithms Without Fear",
          "stage": "Intermediate",
          "age": "13",
          "duration": "3 weeks",
          "skill": "Algorithm thinking",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A puzzle solver for guessing games."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Algorithms are recipes for solving problems clearly and efficiently."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Ada Lovelace imagined instructions for machines before modern computers existed."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Think in steps: input, process, output. Compare brute force with smarter approaches like binary search.",
              "code": "low, high = 1, 100\nwhile low <= high:\n    guess = (low + high) // 2"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "algo"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Explain binary search using a number guessing game.",
                "🟡 Sort five game scores by hand.",
                "🔴 Write Python code to find the highest score in a list."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build an “Algorithm Arcade” with guessing and sorting challenges."
            }
          ]
        },
        {
          "id": "ch12",
          "title": "Lists, Dictionaries and Data Structures",
          "stage": "Intermediate",
          "age": "13",
          "duration": "3 weeks",
          "skill": "Core data structures",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A game inventory system."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Most software is about organising information so it can be found and changed quickly."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Donald Knuth showed that understanding algorithms and data structures makes programmers powerful."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Lists store ordered items. Dictionaries map keys to values. Choose the shape that matches the problem.",
              "code": "inventory = {\"potion\": 3, \"sword\": 1}\ninventory[\"potion\"] -= 1"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "python"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Store a list of unlocked achievements.",
                "🟡 Create a dictionary for player stats.",
                "🔴 Build add, remove and search functions."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a reusable RPG inventory module."
            }
          ]
        },
        {
          "id": "ch13",
          "title": "Object-Oriented Programming",
          "stage": "Intermediate",
          "age": "13-14",
          "duration": "3 weeks",
          "skill": "OOP",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A character class system."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "OOP helps model real things like players, enemies, bank accounts or buttons."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Alan Kay helped popularise object-oriented thinking and personal computing ideas."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Classes are blueprints. Objects are individual things made from those blueprints, with properties and behaviours.",
              "code": "class Player:\n    def __init__(self, name):\n        self.name = name\n        self.health = 100"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "python"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Create a Player class.",
                "🟡 Add attack and heal methods.",
                "🔴 Create Enemy and Boss classes with different powers."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build a turn-based battle simulator."
            }
          ]
        },
        {
          "id": "ch14",
          "title": "Web Forms and Validation",
          "stage": "Intermediate",
          "age": "13-14",
          "duration": "3 weeks",
          "skill": "Forms",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A smart study planner form."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Forms power signups, search, checkout, support tickets and dashboards."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Jean Sammet helped make programming languages more accessible to business and people."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Validate input before using it. Give helpful feedback and avoid blaming the user.",
              "code": "if (name.trim() === \"\") {\n  showError(\"Name is required\");\n}"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "js"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Create a form with three fields.",
                "🟡 Show friendly validation errors.",
                "🔴 Save valid form data to localStorage."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build a weekly coding study planner."
            }
          ]
        },
        {
          "id": "ch15",
          "title": "APIs and JSON",
          "stage": "Intermediate",
          "age": "14",
          "duration": "4 weeks",
          "skill": "APIs",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A weather or space-data dashboard."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Modern apps often connect to services through APIs instead of keeping all data locally."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Roy Fielding described REST, a major idea behind web APIs."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Fetch data, handle loading and errors, then render the response. JSON is a common data format for APIs.",
              "code": "const res = await fetch(url);\nconst data = await res.json();\nrender(data);"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "api"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Fetch data from a public API.",
                "🟡 Display loading and error states.",
                "🔴 Transform raw JSON into cards or a table."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build a live “Data Mission Control” dashboard."
            }
          ]
        },
        {
          "id": "ch16",
          "title": "SQL and Databases",
          "stage": "Intermediate",
          "age": "14",
          "duration": "4 weeks",
          "skill": "SQL basics",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A project tracker database design."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Databases store the world’s orders, users, messages, playlists, scores and bookings."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Edgar F. Codd created the relational database model behind SQL systems."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Tables hold rows. Queries select, filter, sort and join information. Design clean columns before writing queries.",
              "code": "SELECT title, status\nFROM projects\nWHERE status = \"building\"\nORDER BY updated_at DESC;"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "sql"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Design a table for projects.",
                "🟡 Write SELECT queries with WHERE and ORDER BY.",
                "🔴 Sketch how users and projects could relate."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a SQL notebook for a project tracker app."
            }
          ]
        },
        {
          "id": "ch17",
          "title": "Computer Systems: What Is Actually Happening?",
          "stage": "Intermediate",
          "age": "14",
          "duration": "3 weeks",
          "skill": "CS fundamentals",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A visual explainer of CPU, memory and storage."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Understanding computers makes errors less mysterious and performance easier to reason about."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "John von Neumann influenced the architecture used by many computers today."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Programs run as instructions. Memory is fast temporary workspace; storage is slower but persistent.",
              "code": "CPU -> runs instructions\nRAM -> holds active data\nDisk -> stores files long-term"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "cs"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Explain CPU/RAM/disk using a game console analogy.",
                "🟡 Draw what happens when a Python script runs.",
                "🔴 Research one laptop spec and explain what it affects."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build a one-page “How my laptop runs code” explainer."
            }
          ]
        },
        {
          "id": "ch18",
          "title": "Networking and the Internet",
          "stage": "Intermediate",
          "age": "14",
          "duration": "4 weeks",
          "skill": "Networking basics",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A map of how a browser loads a website."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Every web app depends on requests, responses, DNS, servers and security."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Vint Cerf helped create TCP/IP, a foundation of the internet."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "When you visit a URL, your browser finds the server, requests files, and renders them. HTTPS helps keep traffic private.",
              "code": "Browser -> DNS -> Server\nGET /index.html -> 200 OK"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "cs"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Trace what happens after typing a URL.",
                "🟡 Explain client and server in your own words.",
                "🔴 Use browser dev tools Network tab to inspect a page."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create an illustrated internet journey poster."
            }
          ]
        },
        {
          "id": "ch19",
          "title": "Build and Deploy a Static Site",
          "stage": "Intermediate",
          "age": "14-15",
          "duration": "4 weeks",
          "skill": "Deployment",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A live personal portfolio website."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "A project feels real when someone else can open it online."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Netlify, GitHub Pages and similar tools made deployment easier for independent builders."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Deployment means publishing files to a server or hosting platform. Keep the source code in Git and the live site separate.",
              "code": "git add .\ngit commit -m \"Improve portfolio\"\ngit push"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "git"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Prepare your portfolio files.",
                "🟡 Add project screenshots and descriptions.",
                "🔴 Deploy the site and test it in a browser."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Publish your first live portfolio website."
            }
          ]
        },
        {
          "id": "ch20",
          "title": "React Thinking",
          "stage": "Advanced Builder",
          "age": "15",
          "duration": "4 weeks",
          "skill": "Components",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A component-based project gallery."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Professional front-end teams use components to build larger apps without repeating themselves."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Jordan Walke created React ideas that changed how many teams build UIs."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "A component is a reusable UI piece. Props are inputs. State is data that changes over time.",
              "code": "function ProjectCard({ title }) {\n  return <article>{title}</article>;\n}"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "react"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Identify repeated UI in your portfolio.",
                "🟡 Convert a card into a reusable component conceptually.",
                "🔴 Build a small React-style component sketch, even before using tools."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Rebuild your project gallery using component thinking."
            }
          ]
        },
        {
          "id": "ch21",
          "title": "Testing and Quality",
          "stage": "Advanced Builder",
          "age": "15",
          "duration": "4 weeks",
          "skill": "Testing",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A test checklist and simple automated checks."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Testing lets engineers change code without breaking everything secretly."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Kent Beck helped popularise test-driven development and extreme programming practices."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Manual tests are checklists; automated tests are programs that check programs. Start small with functions.",
              "code": "function add(a, b) { return a + b; }\nconsole.assert(add(2,3) === 5);"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "js"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Write five manual tests for a game.",
                "🟡 Add console.assert tests for utility functions.",
                "🔴 Fix a bug and add a test that would catch it next time."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a quality checklist for every future project."
            }
          ]
        },
        {
          "id": "ch22",
          "title": "UX: Build for Humans",
          "stage": "Advanced Builder",
          "age": "15",
          "duration": "4 weeks",
          "skill": "User experience",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A redesigned app screen after user feedback."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Great engineers care whether people can actually use what they build."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Don Norman helped define user-centred design and why design should make sense."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "UX means clarity, feedback, accessibility, and reducing confusion. Watch users, don’t just ask them.",
              "code": "button.textContent = isSaving ? \"Saving...\" : \"Save progress\";"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "html"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Ask one person to use your app silently.",
                "🟡 Write down three confusing moments.",
                "🔴 Improve labels, spacing or feedback based on what you observed."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Run a mini usability test and publish before/after screenshots."
            }
          ]
        },
        {
          "id": "ch23",
          "title": "Security Basics",
          "stage": "Advanced Builder",
          "age": "15",
          "duration": "4 weeks",
          "skill": "Security mindset",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A safe-login design checklist."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Software engineers protect people’s data and trust."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Whitfield Diffie helped pioneer public-key cryptography, which supports secure communication."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Never store passwords in plain text. Validate input. Be careful with permissions and personal data.",
              "code": "// Good habit: do not log secrets\nconsole.log(\"User logged in\");"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "cs"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 List data an app should keep private.",
                "🟡 Spot unsafe examples like hard-coded passwords.",
                "🔴 Write security rules for your future apps."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a “security checklist for young builders”."
            }
          ]
        },
        {
          "id": "ch24",
          "title": "Backend Concepts",
          "stage": "Advanced Builder",
          "age": "15-16",
          "duration": "5 weeks",
          "skill": "Servers",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A tiny API design for tasks or scores."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Backends handle data, rules, authentication and communication between users."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "James Gosling created Java, widely used in backend systems for reliability and scale."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "A frontend asks; a backend responds. APIs should use clear routes, status codes and data shapes.",
              "code": "GET /projects\nPOST /projects\nPATCH /projects/:id"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "api"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Design three API routes for a score app.",
                "🟡 Write example JSON responses.",
                "🔴 Explain what should happen on success and failure."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Document an API for your project tracker."
            }
          ]
        },
        {
          "id": "ch25",
          "title": "Full-Stack Mini App",
          "stage": "Advanced Builder",
          "age": "16",
          "duration": "5 weeks",
          "skill": "Full-stack architecture",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A project tracker with frontend, mock API and data model."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Full-stack thinking connects user interface, data, server rules and deployment."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Ursula Burns led complex technology organisations where systems thinking mattered every day."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Split responsibilities: UI renders, API serves, database stores, Git tracks, tests protect.",
              "code": "UI -> API -> Database\ncreateProject() -> POST /projects -> INSERT row"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "api"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Draw the app architecture.",
                "🟡 Create frontend screens for list/add/edit.",
                "🔴 Use mock JSON data before a real database."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build “ShipLog”, a project tracker for your coding journey."
            }
          ]
        },
        {
          "id": "ch26",
          "title": "Data Structures Level 2",
          "stage": "Advanced Builder",
          "age": "16",
          "duration": "4 weeks",
          "skill": "Stacks, queues, maps",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A browser history simulator."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Stacks, queues and maps appear in editors, games, browsers, schedulers and servers."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Edsger Dijkstra developed algorithms and ideas that shaped computer science discipline."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "A stack is last-in-first-out. A queue is first-in-first-out. A map/dictionary gives fast lookup by key.",
              "code": "stack.push(\"page1\")\nlast_page = stack.pop()"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "algo"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Simulate undo with a stack.",
                "🟡 Simulate a waiting line with a queue.",
                "🔴 Use a map to count word frequency."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build a “Data Structure Playground” with visual demos."
            }
          ]
        },
        {
          "id": "ch27",
          "title": "Algorithms Level 2",
          "stage": "Advanced Builder",
          "age": "16",
          "duration": "4 weeks",
          "skill": "Complexity",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A performance race between search methods."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Performance matters when data grows from 10 items to 10 million."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Tony Hoare created Quicksort, one of the classic sorting algorithms."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Big O is a way to talk about how work grows. Focus on intuition, not scary notation.",
              "code": "linear search: check each item\nbinary search: cut sorted list in half"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "algo"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Time a loop over 100, 10,000 and 1,000,000 items.",
                "🟡 Compare linear and binary search explanations.",
                "🔴 Sort scores and discuss trade-offs."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create an algorithm race visualiser."
            }
          ]
        },
        {
          "id": "ch28",
          "title": "AI and Machine Learning Intro",
          "stage": "Advanced Builder",
          "age": "16",
          "duration": "5 weeks",
          "skill": "AI basics",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A simple recommendation demo."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "AI systems recommend videos, detect spam, summarise text and power coding assistants."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Fei-Fei Li helped advance computer vision and human-centred AI."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Machine learning finds patterns from examples. Start with data quality, fairness and careful evaluation.",
              "code": "if user_likes(\"games\"):\n    recommend(\"game dev tutorial\")"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "python"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Make a rule-based recommender first.",
                "🟡 Create a tiny dataset of interests and recommendations.",
                "🔴 Write three risks of biased or low-quality data."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build a transparent “What should I learn next?” recommender."
            }
          ]
        },
        {
          "id": "ch29",
          "title": "Mobile App Pathway",
          "stage": "Advanced Builder",
          "age": "16-17",
          "duration": "5 weeks",
          "skill": "Mobile basics",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A mobile-first habit tracker design."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Mobile apps teach touch-first design, offline needs and small-screen discipline."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Sundar Pichai helped lead products used by billions, showing the value of scalable user-focused software."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Mobile-first means designing for small screens first, then expanding. Keep actions obvious and fast.",
              "code": "@media (max-width: 700px) {\n  .grid { grid-template-columns: 1fr; }\n}"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "js"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Sketch a habit tracker mobile screen.",
                "🟡 Build it as a responsive web page.",
                "🔴 Add localStorage so habits persist."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a mobile-friendly coding streak tracker."
            }
          ]
        },
        {
          "id": "ch30",
          "title": "Open Source First Steps",
          "stage": "Portfolio",
          "age": "17",
          "duration": "5 weeks",
          "skill": "Collaboration",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A first contribution plan."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Open source teaches reading other people’s code, communication and careful small changes."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Guido van Rossum and Python’s community show how shared projects can outgrow one creator."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Start with documentation, examples or tiny bug fixes. Be respectful, specific and patient.",
              "code": "fork -> branch -> commit -> pull request"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "git"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Find a beginner-friendly repo or docs project.",
                "🟡 Read its CONTRIBUTING guide.",
                "🔴 Draft a tiny improvement without rushing to submit."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Make one safe documentation-style contribution or simulated pull request."
            }
          ]
        },
        {
          "id": "ch31",
          "title": "Capstone 1: Personal Dashboard",
          "stage": "Portfolio",
          "age": "17",
          "duration": "6 weeks",
          "skill": "Product build",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A dashboard that tracks coding progress, projects and goals."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Dashboards combine data, UI, persistence and design into one useful product."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Marissa Mayer’s work on search products highlights how data and design meet in real products."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Plan features before coding: user story, data model, screens, edge cases and release checklist.",
              "code": "features = [\"goals\", \"projects\", \"streaks\", \"notes\"]\nrelease(\"v1\")"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "api"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Write five user stories.",
                "🟡 Design the data model.",
                "🔴 Build and release a version 1 with only essential features."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Ship a live “Noah Dev Dashboard”."
            }
          ]
        },
        {
          "id": "ch32",
          "title": "Capstone 2: Educational Game",
          "stage": "Portfolio",
          "age": "17",
          "duration": "6 weeks",
          "skill": "Game + learning",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A browser game that teaches a school topic."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Teaching through code proves you understand both the subject and the software."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Shigeru Miyamoto shows how playful systems can feel simple while hiding deep design craft."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Good educational games balance challenge, feedback, reward and learning objective.",
              "code": "if (answerCorrect) {\n  unlockNextLevel();\n  explainWhy();\n}"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "js"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Choose one school topic.",
                "🟡 Design three levels that get harder gradually.",
                "🔴 Add feedback that explains mistakes kindly."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Ship an educational mini-game for younger students."
            }
          ]
        },
        {
          "id": "ch33",
          "title": "Capstone 3: Full-Stack Community App",
          "stage": "Portfolio",
          "age": "17-18",
          "duration": "6 weeks",
          "skill": "Full-stack product",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A safe club/event/project organiser app design and prototype."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "College-ready portfolios need at least one larger project with real-world structure."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Tracy Chou has used software engineering to build products and improve inclusion in tech."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "A full-stack app needs users, permissions, data, validation, security and clear deployment notes.",
              "code": "User -> creates event\nMember -> joins event\nAdmin -> reviews reports"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "api"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Define roles and permissions.",
                "🟡 Design database tables.",
                "🔴 Prototype key screens and API routes."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Build or prototype a community project organiser."
            }
          ]
        },
        {
          "id": "ch34",
          "title": "Portfolio Polish",
          "stage": "Pre-College",
          "age": "18",
          "duration": "4 weeks",
          "skill": "GitHub portfolio",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A college-ready GitHub profile and portfolio site."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Admissions, mentors and internship reviewers need evidence: projects, explanations, commits and reflection."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Reshma Saujani founded Girls Who Code, showing how storytelling and access can change tech journeys."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "A strong portfolio explains what you built, why it matters, what was hard, and what you learned.",
              "code": "README sections:\n- Problem\n- Features\n- Tech stack\n- Lessons learned"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "git"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Pin your best repositories.",
                "🟡 Rewrite READMEs with screenshots and lessons.",
                "🔴 Create a portfolio page linking to your strongest work."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Publish a polished “College-ready software portfolio”."
            }
          ]
        },
        {
          "id": "ch35",
          "title": "Interview and Problem-Solving Practice",
          "stage": "Pre-College",
          "age": "18",
          "duration": "4 weeks",
          "skill": "Problem solving",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A gentle coding challenge routine."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Interviews and university work reward calm thinking, not memorising random answers."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Mary Jackson’s engineering career shows the value of preparation, persistence and problem solving."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Use a repeatable approach: restate, examples, simple solution, improve, test, explain.",
              "code": "def solve(problem):\n    understand()\n    try_simple()\n    test_edges()\n    explain()"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "algo"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Solve two easy array/string problems per week.",
                "🟡 Explain one solution out loud.",
                "🔴 Keep a mistake log instead of chasing streaks."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a personal problem-solving notebook."
            }
          ]
        },
        {
          "id": "ch36",
          "title": "How to Learn Any New Tech",
          "stage": "Pre-College",
          "age": "18",
          "duration": "4 weeks",
          "skill": "Learning system",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A 7-day learning sprint template."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Technology changes. The real superpower is learning new tools without panic."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Katherine Johnson mastered complex mathematics and adapted her skills to spaceflight problems."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Skim docs, build a tiny project, break errors down, ask precise questions, and teach back what you learned.",
              "code": "day1 = \"docs + tiny demo\"\nday7 = \"ship + reflect\""
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "cs"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Pick one unfamiliar tool.",
                "🟡 Build the smallest useful demo.",
                "🔴 Write a one-page guide for your future self."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Create a reusable learning sprint template."
            }
          ]
        },
        {
          "id": "ch37",
          "title": "Final Master Mission",
          "stage": "Pre-College",
          "age": "18",
          "duration": "4 weeks",
          "skill": "Capstone presentation",
          "sections": [
            {
              "id": "build",
              "title": "What you'll build",
              "type": "text",
              "body": "A final presentation of your journey and best projects."
            },
            {
              "id": "why",
              "title": "Why this matters",
              "type": "text",
              "body": "Engineers must communicate. A brilliant project matters more when people understand it."
            },
            {
              "id": "story",
              "title": "A famous engineer's story",
              "type": "text",
              "body": "Steve Wozniak combined engineering skill with the ability to demonstrate what a personal computer could do."
            },
            {
              "id": "concept",
              "title": "Concept explanation",
              "type": "code",
              "body": "Tell the story: starting point, skills gained, projects shipped, hardest bugs, next ambitions.",
              "code": "presentation = [\"origin\", \"skills\", \"projects\", \"lessons\", \"next\"]"
            },
            {
              "id": "video",
              "title": "Video tutorial",
              "type": "video",
              "body": "Watch actively: pause, code along, and write three notes in your journey folder.",
              "videoKey": "cs"
            },
            {
              "id": "exercises",
              "title": "Hands-on exercises",
              "type": "list",
              "items": [
                "🟢 Choose your top 3–5 projects.",
                "🟡 Write a short story for each: problem, build, result.",
                "🔴 Record or rehearse a 5-minute demo."
              ]
            },
            {
              "id": "project",
              "title": "Mini project",
              "type": "text",
              "body": "Deliver the final “Future Software Engineer” showcase."
            }
          ]
        }
      ]
    }
  }
}