Skip to content

An AI skill that turns books into animated, narrated, interactive web experiences

feat(math): add signed subtraction chapter

yzr3146303cd7ba
diff --git a/site/index.html b/site/index.html
index 4c6eced..79df302 100644
--- a/site/index.html
+++ b/site/index.html
@@ -23,8 +23,8 @@
<a class="book-hotspot algebra-book" data-book="elementary-algebra" href="elementary-algebra/" aria-label="Open Elementary Algebra, 68 narrated chapters">
<span class="book-caption"><strong>Elementary Algebra <span aria-hidden="true">↗</span></strong><small>68 narrated chapters</small></span>
</a>
- <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 11 narrated chapters">
- <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>11 narrated chapters</small></span>
+ <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 12 narrated chapters">
+ <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>12 narrated chapters</small></span>
</a>
<span class="physics-pending">Physics · Coming soon</span>
</section>
diff --git a/site/lib/bookshelf.js b/site/lib/bookshelf.js
index dec378c..8d88daa 100644
--- a/site/lib/bookshelf.js
+++ b/site/lib/bookshelf.js
@@ -17,7 +17,7 @@
const books = [
{ id: 'elementary-algebra', key: 'progress', chapterBase: 'elementary-algebra/', chapters: 68 },
{ id: 'math-notebook', key: 'animebook:progress:' + new URL('math-notebook/', location.href).pathname,
- chapterBase: 'math-notebook/', chapters: 11 },
+ chapterBase: 'math-notebook/', chapters: 12 },
];
for (const book of books) {
const cover = document.querySelector(`[data-book="${book.id}"]`);
diff --git a/site/math-notebook/ch11/index.html b/site/math-notebook/ch11/index.html
index d36905c..ff70781 100644
--- a/site/math-notebook/ch11/index.html
+++ b/site/math-notebook/ch11/index.html
@@ -2,7 +2,7 @@
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Adding Positive and Negative Numbers — Elementary Mathematics</title><link rel="stylesheet" href="../lib/engine.css"><link rel="expect" href="#bar" blocking="render"><style>.screen .blanks .math{font-size:38px}.side .keys{font-size:20px}</style></head><body>
<script src="../lib/engine.js"></script><script src="audio/en/timings.js"></script><script>
'use strict';
-const CHAPTER={number:11,title:'Adding Positive and Negative Numbers',minutes:12,language:'en'};
+const CHAPTER={number:11,title:'Adding Positive and Negative Numbers',minutes:12,language:'en', next: '../ch12/' };
const saColor=v=>v>0?POS:v<0?NEG:COL.chalk;
const saSigned=v=>v>0?'+'+v:num(v);
const saText=(p,s,x,y,t=0,size=30,col=COL.chalk,anchor='start')=>{const e=T(p,s,{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};
diff --git a/site/math-notebook/ch12/audio/en/altitude.mp3 b/site/math-notebook/ch12/audio/en/altitude.mp3
new file mode 100644
index 0000000..7ac9b71
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/altitude.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/chain.mp3 b/site/math-notebook/ch12/audio/en/chain.mp3
new file mode 100644
index 0000000..ffbe3fd
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/chain.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/crossZero.mp3 b/site/math-notebook/ch12/audio/en/crossZero.mp3
new file mode 100644
index 0000000..69eabeb
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/crossZero.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/final1.mp3 b/site/math-notebook/ch12/audio/en/final1.mp3
new file mode 100644
index 0000000..f6a94dc
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/final1.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/final2.mp3 b/site/math-notebook/ch12/audio/en/final2.mp3
new file mode 100644
index 0000000..5e76a55
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/final2.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/final3.mp3 b/site/math-notebook/ch12/audio/en/final3.mp3
new file mode 100644
index 0000000..cbbfae1
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/final3.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/finish.mp3 b/site/math-notebook/ch12/audio/en/finish.mp3
new file mode 100644
index 0000000..5dc93c2
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/finish.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/intro.mp3 b/site/math-notebook/ch12/audio/en/intro.mp3
new file mode 100644
index 0000000..dc80f5c
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/intro.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/lineNegative.mp3 b/site/math-notebook/ch12/audio/en/lineNegative.mp3
new file mode 100644
index 0000000..e1a41ff
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/lineNegative.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/linePositive.mp3 b/site/math-notebook/ch12/audio/en/linePositive.mp3
new file mode 100644
index 0000000..930a02b
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/linePositive.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/missingPositive.mp3 b/site/math-notebook/ch12/audio/en/missingPositive.mp3
new file mode 100644
index 0000000..bfb1134
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/missingPositive.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/negativeStart.mp3 b/site/math-notebook/ch12/audio/en/negativeStart.mp3
new file mode 100644
index 0000000..7ba9bb3
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/negativeStart.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/opposite.mp3 b/site/math-notebook/ch12/audio/en/opposite.mp3
new file mode 100644
index 0000000..4eaded7
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/opposite.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/q1.mp3 b/site/math-notebook/ch12/audio/en/q1.mp3
new file mode 100644
index 0000000..4f06b1b
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/q1.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/q2.mp3 b/site/math-notebook/ch12/audio/en/q2.mp3
new file mode 100644
index 0000000..724984d
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/q2.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/q3.mp3 b/site/math-notebook/ch12/audio/en/q3.mp3
new file mode 100644
index 0000000..dcf5d3d
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/q3.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/removeNegative.mp3 b/site/math-notebook/ch12/audio/en/removeNegative.mp3
new file mode 100644
index 0000000..a2c86db
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/removeNegative.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/removePositive.mp3 b/site/math-notebook/ch12/audio/en/removePositive.mp3
new file mode 100644
index 0000000..0e5a2ef
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/removePositive.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/rewrite.mp3 b/site/math-notebook/ch12/audio/en/rewrite.mp3
new file mode 100644
index 0000000..037f6bf
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/rewrite.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/temperature.mp3 b/site/math-notebook/ch12/audio/en/temperature.mp3
new file mode 100644
index 0000000..0db85f6
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/temperature.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/timings.js b/site/math-notebook/ch12/audio/en/timings.js
new file mode 100644
index 0000000..6271bef
--- /dev/null
+++ b/site/math-notebook/ch12/audio/en/timings.js
@@ -0,0 +1,863 @@
+window.TIMINGS = {
+ "intro": {
+ "dur": 23.64,
+ "marks": {
+ "sub": 9.505
+ },
+ "cues": [
+ [
+ 0.104,
+ "Chapter twelve."
+ ],
+ [
+ 1.302,
+ "Subtracting positive and negative numbers."
+ ],
+ [
+ 4.193,
+ "Subtraction can remove an amount, compare two positions, or find a change."
+ ],
+ [
+ 9.505,
+ "The sign of the amount matters."
+ ],
+ [
+ 11.432,
+ "Taking away a negative value can make the result larger."
+ ],
+ [
+ 15.169,
+ "We will explain why with actual tiles, then connect the picture to a useful rule: subtracting a number means adding its opposite."
+ ]
+ ]
+ },
+ "opposite": {
+ "dur": 27.744,
+ "marks": {
+ "positive": 4.362,
+ "negative": 9.792,
+ "zero": 16.68
+ },
+ "cues": [
+ [
+ 0.117,
+ "Before subtracting, find the opposite of the number being subtracted."
+ ],
+ [
+ 4.362,
+ "Positive four and negative four sit the same distance from zero on opposite sides."
+ ],
+ [
+ 9.792,
+ "The opposite of negative four is positive four."
+ ],
+ [
+ 13.268,
+ "The opposite of positive four is negative four."
+ ],
+ [
+ 16.68,
+ "Their sum is zero, so each is the additive inverse of the other."
+ ],
+ [
+ 21.119,
+ "Zero is its own opposite."
+ ],
+ [
+ 23.242,
+ "The opposite changes the sign of the value, while keeping its magnitude."
+ ]
+ ]
+ },
+ "removePositive": {
+ "dur": 34.752,
+ "marks": {
+ "remove": 6.51,
+ "result": 21.589
+ },
+ "cues": [
+ [
+ 0.091,
+ "Start with six positive tiles, each worth positive one."
+ ],
+ [
+ 4.05,
+ "Our problem is six minus two."
+ ],
+ [
+ 6.51,
+ "Subtracting positive two removes two positive tiles from the working collection."
+ ],
+ [
+ 12.188,
+ "Watch these two original tiles move into the removal tray."
+ ],
+ [
+ 16.406,
+ "We are keeping track of the tiles taken away, but they no longer belong to the result."
+ ],
+ [
+ 21.589,
+ "Four positive tiles remain."
+ ],
+ [
+ 23.451,
+ "Six minus two equals four."
+ ],
+ [
+ 25.677,
+ "This also equals six plus negative two, because taking away two positive units has the same effect as adding two negative units."
+ ]
+ ]
+ },
+ "missingPositive": {
+ "dur": 44.4,
+ "marks": {
+ "pairs": 7.578,
+ "unchanged": 21.471,
+ "remove": 30.247,
+ "result": 33.581
+ },
+ "cues": [
+ [
+ 0.104,
+ "Now start with two positive tiles and subtract positive five."
+ ],
+ [
+ 4.401,
+ "There are only two positive tiles to remove."
+ ],
+ [
+ 7.578,
+ "First, add three zero pairs."
+ ],
+ [
+ 10.885,
+ "Each pair contains one positive tile and one negative tile, with combined value zero."
+ ],
+ [
+ 17.122,
+ "We now have five positive tiles and three negative tiles."
+ ],
+ [
+ 21.471,
+ "Their total is still positive two: five plus negative three equals two."
+ ],
+ [
+ 26.68,
+ "Adding zero pairs has not changed our starting number."
+ ],
+ [
+ 30.247,
+ "Now remove all five positive tiles."
+ ],
+ [
+ 33.581,
+ "The three negative tiles remain."
+ ],
+ [
+ 35.964,
+ "Two minus five equals negative three."
+ ],
+ [
+ 39.167,
+ "The extra tiles made removal possible; they did not change the starting value."
+ ]
+ ]
+ },
+ "q1": {
+ "dur": 10.2,
+ "marks": {
+ "ask": 1.146
+ },
+ "cues": [
+ [
+ 0.091,
+ "Quick check."
+ ],
+ [
+ 1.146,
+ "Start with two negative tiles and subtract positive three."
+ ],
+ [
+ 5.078,
+ "Choose the smallest collection of zero pairs that makes this removal possible."
+ ]
+ ]
+ },
+ "removeNegative": {
+ "dur": 43.488,
+ "marks": {
+ "pairs": 12.122,
+ "unchanged": 18.802,
+ "remove": 26.536,
+ "result": 29.18
+ },
+ "cues": [
+ [
+ 0.117,
+ "Here is three minus negative two."
+ ],
+ [
+ 2.995,
+ "Start with three positive tiles."
+ ],
+ [
+ 5.456,
+ "To subtract negative two, we must remove two negative tiles, but none are available yet."
+ ],
+ [
+ 12.122,
+ "Add two zero pairs first."
+ ],
+ [
+ 14.648,
+ "They contribute zero, so the starting value remains three."
+ ],
+ [
+ 18.802,
+ "The collection now has five positive tiles and two negative tiles."
+ ],
+ [
+ 23.477,
+ "Five plus negative two is still three."
+ ],
+ [
+ 26.536,
+ "Take away the two negative tiles."
+ ],
+ [
+ 29.18,
+ "Five positive tiles remain."
+ ],
+ [
+ 31.146,
+ "Three minus negative two equals five."
+ ],
+ [
+ 34.023,
+ "Removing a negative contribution increases the value."
+ ],
+ [
+ 37.93,
+ "That is why subtracting negative two has the same effect as adding positive two."
+ ]
+ ]
+ },
+ "negativeStart": {
+ "dur": 36.864,
+ "marks": {
+ "remove": 9.076,
+ "result": 16.081
+ },
+ "cues": [
+ [
+ 0.078,
+ "A negative starting value works the same way."
+ ],
+ [
+ 3.242,
+ "Start with four negative tiles and calculate negative four minus negative two."
+ ],
+ [
+ 9.076,
+ "We already have enough negative tiles, so remove two of the original four."
+ ],
+ [
+ 14.271,
+ "No zero pairs are needed."
+ ],
+ [
+ 16.081,
+ "Two negative tiles remain."
+ ],
+ [
+ 17.865,
+ "Negative four minus negative two equals negative two."
+ ],
+ [
+ 21.966,
+ "The result has increased from negative four to negative two, even though it is still below zero."
+ ],
+ [
+ 28.125,
+ "Increasing does not always mean becoming positive."
+ ],
+ [
+ 31.667,
+ "The sign of the starting number does not change what subtraction asks us to remove."
+ ]
+ ]
+ },
+ "q2": {
+ "dur": 13.32,
+ "marks": {
+ "ask": 1.081
+ },
+ "cues": [
+ [
+ 0.091,
+ "Quick check."
+ ],
+ [
+ 1.081,
+ "Start with five negative tiles and subtract negative seven."
+ ],
+ [
+ 5.143,
+ "Two zero pairs have been added without changing the starting value."
+ ],
+ [
+ 8.828,
+ "Choose the tiles that remain after removing seven negative tiles."
+ ]
+ ]
+ },
+ "rewrite": {
+ "dur": 37.056,
+ "marks": {
+ "rule": 3.568,
+ "example": 14.675,
+ "other": 20.143
+ },
+ "cues": [
+ [
+ 0.117,
+ "The pictures give us one rule that works for every sign."
+ ],
+ [
+ 3.568,
+ "Keep the first number."
+ ],
+ [
+ 5.013,
+ "Change subtraction to addition."
+ ],
+ [
+ 7.083,
+ "Replace the number being subtracted with its opposite."
+ ],
+ [
+ 10.417,
+ "In symbols, a minus b equals a plus negative b."
+ ],
+ [
+ 14.675,
+ "Three minus negative two becomes three plus positive two, which equals five."
+ ],
+ [
+ 20.143,
+ "Negative four minus positive two becomes negative four plus negative two, which equals negative six."
+ ],
+ [
+ 27.682,
+ "The first number keeps its sign."
+ ],
+ [
+ 29.596,
+ "Only the number being subtracted is replaced by its additive inverse."
+ ],
+ [
+ 34.01,
+ "Then use the addition ideas from the previous chapter."
+ ]
+ ]
+ },
+ "lineNegative": {
+ "dur": 35.736,
+ "marks": {
+ "start": 4.023,
+ "opposite": 7.708,
+ "move": 11.927,
+ "result": 17.708
+ },
+ "cues": [
+ [
+ 0.104,
+ "Try two minus negative five on an exact number line."
+ ],
+ [
+ 4.023,
+ "The starting number is positive two."
+ ],
+ [
+ 6.445,
+ "Place the dot there."
+ ],
+ [
+ 7.708,
+ "Replace subtracting negative five with adding positive five."
+ ],
+ [
+ 11.927,
+ "From two, move five units to the right."
+ ],
+ [
+ 14.753,
+ "The arrow starts at two, not at zero."
+ ],
+ [
+ 17.708,
+ "The endpoint is seven."
+ ],
+ [
+ 19.57,
+ "Two minus negative five equals two plus five, or seven."
+ ],
+ [
+ 23.815,
+ "Removing a negative amount and adding its positive opposite give the same result."
+ ],
+ [
+ 29.076,
+ "You do not need to guess a direction from the two minus signs; first identify the signed number being subtracted."
+ ]
+ ]
+ },
+ "linePositive": {
+ "dur": 36.192,
+ "marks": {
+ "start": 3.216,
+ "opposite": 5.078,
+ "move": 13.008,
+ "result": 18.177
+ },
+ "cues": [
+ [
+ 0.104,
+ "Now calculate negative three minus four."
+ ],
+ [
+ 3.216,
+ "Start at negative three."
+ ],
+ [
+ 5.078,
+ "The opposite of positive four is negative four, so rewrite the calculation as negative three plus negative four."
+ ],
+ [
+ 13.008,
+ "Move four units left from negative three."
+ ],
+ [
+ 15.69,
+ "The endpoint is negative seven."
+ ],
+ [
+ 18.177,
+ "Negative three minus four equals negative seven."
+ ],
+ [
+ 22.161,
+ "The first number stays negative three throughout the rewrite."
+ ],
+ [
+ 26.003,
+ "Subtracting a positive amount decreases the value; subtracting a negative amount increases it."
+ ],
+ [
+ 32.812,
+ "Both statements fit the tile picture and the number line."
+ ]
+ ]
+ },
+ "q3": {
+ "dur": 9.216,
+ "marks": {
+ "ask": 1.12
+ },
+ "cues": [
+ [
+ 0.104,
+ "Quick check."
+ ],
+ [
+ 1.12,
+ "Start at negative two and subtract negative six."
+ ],
+ [
+ 4.909,
+ "Choose the endpoint after adding the opposite of negative six."
+ ]
+ ]
+ },
+ "crossZero": {
+ "dur": 41.352,
+ "marks": {
+ "pairs": 8.125,
+ "unchanged": 11.927,
+ "remove": 18.633,
+ "result": 20.951
+ },
+ "cues": [
+ [
+ 0.104,
+ "What happens when we remove more negative units than we started with?"
+ ],
+ [
+ 4.388,
+ "Here is negative five minus negative eight."
+ ],
+ [
+ 8.125,
+ "Add three zero pairs to the five negative tiles."
+ ],
+ [
+ 11.927,
+ "There are now eight negative tiles and three positive tiles, still totaling negative five."
+ ],
+ [
+ 18.633,
+ "Remove the eight negatives."
+ ],
+ [
+ 20.951,
+ "The three positives remain."
+ ],
+ [
+ 22.812,
+ "Negative five minus negative eight equals positive three."
+ ],
+ [
+ 27.852,
+ "The same calculation is negative five plus eight."
+ ],
+ [
+ 31.471,
+ "Five units right reach zero, and three more reach positive three."
+ ],
+ [
+ 36.432,
+ "Crossing zero follows the same rule; it does not need an exception."
+ ]
+ ]
+ },
+ "zero": {
+ "dur": 35.952,
+ "marks": {
+ "keep": 2.8,
+ "from": 12.539,
+ "same": 19.701
+ },
+ "cues": [
+ [
+ 0.104,
+ "A few special cases help us check the rule."
+ ],
+ [
+ 2.8,
+ "Subtracting zero changes nothing, because the opposite of zero is zero."
+ ],
+ [
+ 8.802,
+ "Negative seven minus zero is negative seven."
+ ],
+ [
+ 12.539,
+ "Starting from zero and subtracting negative four means adding positive four."
+ ],
+ [
+ 17.865,
+ "The result is four."
+ ],
+ [
+ 19.701,
+ "Subtracting a number from itself gives zero."
+ ],
+ [
+ 23.242,
+ "For example, negative six minus negative six becomes negative six plus positive six."
+ ],
+ [
+ 29.935,
+ "Equal opposites cancel."
+ ],
+ [
+ 31.654,
+ "These cases are useful when you want to check whether your signs make sense."
+ ]
+ ]
+ },
+ "chain": {
+ "dur": 40.344,
+ "marks": {
+ "rewrite": 9.688,
+ "first": 19.948,
+ "last": 23.568
+ },
+ "cues": [
+ [
+ 0.13,
+ "For a longer calculation, rewrite each subtraction carefully."
+ ],
+ [
+ 4.714,
+ "We have negative six minus negative ten plus negative three."
+ ],
+ [
+ 9.688,
+ "Keep negative six."
+ ],
+ [
+ 11.224,
+ "Replace subtracting negative ten with adding positive ten."
+ ],
+ [
+ 15.273,
+ "The last addend is already negative three, so it stays as it is."
+ ],
+ [
+ 19.948,
+ "Negative six plus ten equals positive four."
+ ],
+ [
+ 23.568,
+ "Then four plus negative three equals one."
+ ],
+ [
+ 27.057,
+ "Addition and subtraction at the same level are worked from left to right."
+ ],
+ [
+ 31.862,
+ "Track the signed partial sum before continuing."
+ ],
+ [
+ 35.69,
+ "Do not change every sign just because you see a subtraction symbol."
+ ]
+ ]
+ },
+ "temperature": {
+ "dur": 42.936,
+ "marks": {
+ "change": 7.812,
+ "gap": 20.182,
+ "labels": 31.289
+ },
+ "cues": [
+ [
+ 0.091,
+ "A thermometer starts at eight degrees and later reads negative six degrees."
+ ],
+ [
+ 5.755,
+ "We can ask two different questions."
+ ],
+ [
+ 7.812,
+ "The signed change is the final reading minus the initial reading: negative six minus eight."
+ ],
+ [
+ 14.31,
+ "This equals negative fourteen degrees."
+ ],
+ [
+ 17.07,
+ "The negative sign tells us the temperature fell."
+ ],
+ [
+ 20.182,
+ "The positive gap between the readings is fourteen degrees, the magnitude of that change."
+ ],
+ [
+ 25.768,
+ "On the line, eight units down reach zero and six more reach negative six."
+ ],
+ [
+ 31.289,
+ "A fourteen-degree fall has signed change negative fourteen."
+ ],
+ [
+ 35.013,
+ "A fourteen-degree gap is a positive distance."
+ ],
+ [
+ 37.995,
+ "Read the question carefully so your answer describes the requested quantity."
+ ]
+ ]
+ },
+ "altitude": {
+ "dur": 42.072,
+ "marks": {
+ "upper": 9.714,
+ "lower": 12.8,
+ "gap": 15.286,
+ "result": 26.562
+ },
+ "cues": [
+ [
+ 0.091,
+ "A drone is thirty-five meters above sea level."
+ ],
+ [
+ 3.724,
+ "A diver is eighteen meters below sea level."
+ ],
+ [
+ 7.617,
+ "How far apart are they vertically?"
+ ],
+ [
+ 9.714,
+ "The upper height is positive thirty-five."
+ ],
+ [
+ 12.8,
+ "The lower height is negative eighteen."
+ ],
+ [
+ 15.286,
+ "For this positive gap, subtract the lower height from the upper height: thirty-five minus negative eighteen."
+ ],
+ [
+ 21.849,
+ "Adding the opposite gives thirty-five plus eighteen, or fifty-three."
+ ],
+ [
+ 26.562,
+ "The vertical separation is fifty-three meters."
+ ],
+ [
+ 30.234,
+ "The amber distance crosses sea level: thirty-five meters above, plus eighteen meters below."
+ ],
+ [
+ 36.81,
+ "Heights have signs; the distance between these two positions is positive."
+ ]
+ ]
+ },
+ "wrap": {
+ "dur": 36.456,
+ "marks": {
+ "w1": 3.438,
+ "w2": 8.112,
+ "w3": 13.242,
+ "w4": 23.555
+ },
+ "cues": [
+ [
+ 0.169,
+ "Four ideas make signed subtraction reliable."
+ ],
+ [
+ 3.438,
+ "Keep the starting number."
+ ],
+ [
+ 4.909,
+ "Replace subtraction with addition of the opposite."
+ ],
+ [
+ 8.112,
+ "In the tile picture, subtracting means removing tiles of the specified sign."
+ ],
+ [
+ 13.242,
+ "If those tiles are missing, add enough zero pairs first."
+ ],
+ [
+ 17.148,
+ "Adding zero preserves the starting value; removing the requested tiles then changes it."
+ ],
+ [
+ 23.555,
+ "For a change, use final minus initial and keep the sign."
+ ],
+ [
+ 27.904,
+ "For a positive gap, use the distance between positions."
+ ],
+ [
+ 31.94,
+ "Now try the chapter practice with your signs and your reasoning together."
+ ]
+ ]
+ },
+ "final1": {
+ "dur": 9.432,
+ "marks": {
+ "ask": 2.227
+ },
+ "cues": [
+ [
+ 0.091,
+ "Chapter practice, set one."
+ ],
+ [
+ 2.227,
+ "Subtract positive and negative numbers."
+ ],
+ [
+ 5.0,
+ "Rewrite each subtraction as addition of the opposite when it helps."
+ ]
+ ]
+ },
+ "final2": {
+ "dur": 10.392,
+ "marks": {
+ "ask": 2.357
+ },
+ "cues": [
+ [
+ 0.104,
+ "Chapter practice, set two."
+ ],
+ [
+ 2.357,
+ "Work with unequal negative values, larger numbers, and a calculation with three terms."
+ ],
+ [
+ 8.62,
+ "Keep the signed partial sum."
+ ]
+ ]
+ },
+ "final3": {
+ "dur": 10.488,
+ "marks": {
+ "ask": 2.461
+ },
+ "cues": [
+ [
+ 0.104,
+ "Chapter practice, set three."
+ ],
+ [
+ 2.461,
+ "Distinguish a signed temperature change from a positive gap."
+ ],
+ [
+ 6.393,
+ "Then explain subtraction with zero pairs and remaining tiles."
+ ]
+ ]
+ },
+ "finish": {
+ "dur": 17.04,
+ "marks": {
+ "end": 0.104
+ },
+ "cues": [
+ [
+ 0.104,
+ "Chapter twelve is complete."
+ ],
+ [
+ 2.305,
+ "You can explain why subtracting a negative increases a value, and connect that picture to adding the opposite."
+ ],
+ [
+ 9.518,
+ "Your score records first attempts."
+ ],
+ [
+ 12.188,
+ "Replay a tile picture or a number-line move whenever you want to check the reasoning."
+ ]
+ ]
+ }
+};
diff --git a/site/math-notebook/ch12/audio/en/wrap.mp3 b/site/math-notebook/ch12/audio/en/wrap.mp3
new file mode 100644
index 0000000..a942be4
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/wrap.mp3 differ
diff --git a/site/math-notebook/ch12/audio/en/zero.mp3 b/site/math-notebook/ch12/audio/en/zero.mp3
new file mode 100644
index 0000000..a193c26
Binary files /dev/null and b/site/math-notebook/ch12/audio/en/zero.mp3 differ
diff --git a/site/math-notebook/ch12/index.html b/site/math-notebook/ch12/index.html
new file mode 100644
index 0000000..b2b05e9
--- /dev/null
+++ b/site/math-notebook/ch12/index.html
@@ -0,0 +1,93 @@
+<!doctype html>
+<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Subtracting Positive and Negative Numbers — Elementary Mathematics</title><link rel="stylesheet" href="../lib/engine.css"><link rel="expect" href="#bar" blocking="render"><style>.screen .blanks .math{font-size:38px}.side .keys{font-size:20px}</style></head><body>
+<script src="../lib/engine.js"></script><script src="audio/en/timings.js"></script><script>
+'use strict';
+const CHAPTER={number:12,title:'Subtracting Positive and Negative Numbers',minutes:13,language:'en'};
+const saColor=v=>v>0?POS:v<0?NEG:COL.chalk;
+const saSigned=v=>v>0?'+'+v:num(v);
+const saText=(p,s,x,y,t=0,size=30,col=COL.chalk,anchor='start')=>{const e=T(p,s,{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};
+const saMath=(p,s,x,y,t=0,size=48,col=COL.chalk,anchor='middle')=>{const e=M(p,Array.isArray(s)?s:[s],{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};
+const saTitle=(p,s,sub='')=>{saText(p,s,100,110,.1,43);if(sub)saText(p,sub,100,162,.15,27,COL.dim);};
+function saEq(p,a,b,c,t=0,y=750,xEq=800,size=60){const row=tokens(p,[{t:num(a),fill:saColor(a)},' + ',{t:b<0?'('+num(b)+')':num(b),fill:saColor(b)}],{x:xEq-size*.5,y,size,anchor:'end'});row.push(saMath(p,'=',xEq,y,t,size),saMath(p,num(c),xEq+size*.65,y,t,size,saColor(c),'start'));row.slice(0,3).forEach(e=>{put(e,{o:0});show(e,t)});return row;}
+function saLine(p,lo=-8,hi=8,u=76,o=800){const y=560;const g=G(p);g.dataset.lineLo=lo;g.dataset.lineHi=hi;g.dataset.unit=u;g.dataset.origin=o;path(g,`M${o+(lo-.55)*u} ${y}H${o+(hi+.55)*u}`,{stroke:COL.chalk,'stroke-width':3});for(const [v,d] of [[lo-.55,-1],[hi+.55,1]])path(g,`M${o+v*u-12*d} ${y-9}L${o+v*u} ${y}L${o+v*u-12*d} ${y+9}`,{stroke:COL.chalk,'stroke-width':3});for(let v=lo;v<=hi;v++){path(g,`M${o+v*u} ${y-9}V${y+9}`,{stroke:COL.dim,'stroke-width':2});T(g,num(v),{x:o+v*u,y:y+45,size:28,font:MATH,anchor:'middle',fill:v===0?COL.chalk:COL.dim});}const dot=G(g,{x:o,y});const circle=mk('circle',{r:11,fill:COL.chalk,stroke:COL.board,'stroke-width':2},dot);return {g,y,u,o,dot,circle,x:v=>o+u*v};}
+function saMove(l,a,b,y,t){const c=saColor(b-a),dur=1.4,x1=l.x(a),x2=l.x(b),d=Math.sign(b-a),g=G(l.g);g.dataset.moveFrom=a;g.dataset.moveTo=b;g.dataset.startX=x1;g.dataset.endX=x2;const ln=path(g,`M${x1} ${y}H${x2}`,{stroke:c,'stroke-width':5},{d:0});draw(ln,t,dur);const h=path(g,`M${x2-14*d} ${y-10}L${x2} ${y}L${x2-14*d} ${y+10}`,{stroke:c,'stroke-width':5},{o:0});show(h,t+dur-.12,.15);saText(g,saSigned(b-a),(x1+x2)/2,y-22,t+.1,35,c,'middle');const drop=path(g,`M${x2} ${y+12}V${l.y-15}`,{stroke:c,'stroke-width':2,'stroke-dasharray':'5 5'},{o:0});show(drop,t+dur,.2);tw(l.dot,{x:x2},t,dur,lin);tw(l.circle,{c_fill:saColor(b)},t,dur,lin);return g;}
+function saTile(p,sign,id,x,y,t=0){const e=tile(p,sign,x,y);e.dataset.tileId=id;e.dataset.value=sign;tw(e,{o:1,s:1},t,.35,back);return e;}
+const saBlanks=rows=>(body,api)=>{const ctl=blanks(rows)(body,api),check=ctl.check;ctl.check=()=>{body.querySelectorAll('input.box').forEach(b=>{b.value=b.value.replace(/^\s*\+\s*/,'').replace(/(\d),(?=\d{3}\b)/g,'$1');});check();};return ctl;};
+
+// A display row separates signed operands from the operation. All equals signs align.
+function ssEq(p,parts,t=0,y=790,xEq=800,size=52){const k=parts.indexOf(' = '),left=tokens(p,parts.slice(0,k),{x:xEq-size*.5,y,size,anchor:'end'});left.forEach(e=>{put(e,{o:0});show(e,t)});saMath(p,'=',xEq,y,t,size);const right=tokens(p,parts.slice(k+1),{x:xEq+size*.65,y,size,anchor:'start'});right.forEach(e=>{put(e,{o:0});show(e,t)});return [...left,...right];}
+const ssV=v=>({t:num(v),fill:saColor(v)});
+const ssOperand=v=>({t:v<0?'('+num(v)+')':num(v),fill:saColor(v)});
+function ssSubtract(p,a,b,result,t=0,y=790,size=56){return ssEq(p,[ssV(a),' − ',ssOperand(b),' = ',ssV(result)],t,y,800,size);}
+// Actual signed tiles move. Added zero pairs appear before any requested tile is removed.
+function ssRemoval(p,a,b,m,hasPairs=true){
+ const g=G(p),initial=[],positive=[],negative=[],pairs=[];
+ mk('rect',{x:130,y:245,width:950,height:335,rx:22,fill:'none',stroke:COL.dim,'stroke-width':2},g);
+ mk('rect',{x:1160,y:245,width:360,height:335,rx:22,fill:'none',stroke:COL.dim,'stroke-width':2,'stroke-dasharray':'8 6'},g);
+ saText(g,'Working collection',605,230,0,27,COL.chalk,'middle');saText(g,'Removed from start',1340,230,0,27,COL.dim,'middle');
+ for(let i=0;i<Math.abs(a);i++){const e=saTile(g,Math.sign(a),'initial-'+i,210+i*82,385,i*.04);initial.push(e);(a>0?positive:negative).push(e);}
+ const available=Math.sign(a)===Math.sign(b)?Math.abs(a):0,k=Math.max(0,Math.abs(b)-available);
+ for(let i=0;i<k;i++){
+ const x=680+i*100,pp=saTile(g,1,'zero-'+i+'-positive',x,315,m('pairs')+i*.12),nn=saTile(g,-1,'zero-'+i+'-negative',x,450,m('pairs')+i*.12);
+ positive.push(pp);negative.push(nn);const ring=G(g,{x,y:382.5,o:0});
+ mk('rect',{x:-39,y:-107,width:78,height:214,rx:17,fill:'none',stroke:COL.chalk,'stroke-width':2,'stroke-dasharray':'6 5'},ring);show(ring,m('pairs')+.4+i*.12);hide(ring,m('remove')-.8,.4);pairs.push([pp,nn]);
+ }
+ const removed=(b>0?positive:negative).slice(0,Math.abs(b));
+ const survivors=[...positive,...negative].filter(e=>!removed.includes(e));
+ removed.forEach((e,i)=>tw(e,{x:1245+(i%3)*82,y:315+Math.floor(i/3)*90,o:.38},m('remove')+i*.12,.8));
+ survivors.forEach((e,i)=>tw(e,{x:605+(i-(survivors.length-1)/2)*82,y:385},m('result'),.8));
+ saText(g,'Start: '+saSigned(a),130,630,0,32,saColor(a));
+ if(k)saText(g,'After adding '+k+' × 0: '+saSigned(a),130,690,m('unchanged'),32,saColor(a));
+ else saText(g,'Enough requested tiles are already here.',130,690,0,29,COL.dim);
+ saText(g,'After removal: '+saSigned(a-b),1120,660,m('result'),32,saColor(a-b),'middle');
+ saText(g,'Removed value: '+saSigned(b),1340,610,m('remove'),27,saColor(b),'middle');
+ ssSubtract(p,a,b,a-b,m('result'),815);
+ return {g,initial,positive,negative,pairs,removed,survivors};
+}
+function ssTileOptions(p,groups,y=525){return groups.map(([sign,n],j)=>{const g=G(p,{x:310+j*490,y});for(let i=0;i<n;i++)saTile(g,sign,'answer-'+j+'-'+i,(i-(n-1)/2)*74,0);saText(g,String.fromCharCode(65+j),0,-62,0,29,COL.dim,'middle');return {el:g,box:[130+j*490,y-100,360,175],label:n+' '+(sign>0?'positive':'negative')+' tiles'};});}
+const BEATS=[
+['intro','Remove a signed amount',(m,D)=>{const g=G(scene,{o:0,y:24});T(g,'Unit 1 · The Number System · Chapter 12',{x:800,y:215,size:28,fill:COL.dim,anchor:'middle'});T(g,'Subtracting Positive',{x:800,y:325,size:72,weight:600,anchor:'middle'});T(g,'and Negative Numbers',{x:800,y:420,size:72,weight:600,anchor:'middle'});tw(g,{o:1,y:0},.2,1,out);saTile(g,1,'intro-plus',730,550,.4);saTile(g,-1,'intro-minus',870,550,.5);saText(g,'Remove signed tiles · add the opposite',800,690,m('sub'),34,COL.dim,'middle');hide(g,D-.8,.7);}],
+['opposite','Find the additive inverse',m=>{const p=panel(0);saTitle(p,'Opposites have sum zero','Same magnitude · opposite sign');const l=saLine(p,-6,6,94);S.ssLine=l;const pg=G(p,{x:l.x(4),y:l.y,o:0}),ng=G(p,{x:l.x(-4),y:l.y,o:0});mk('circle',{r:15,fill:POS},pg);mk('circle',{r:15,fill:NEG},ng);show(pg,m('positive'));show(ng,m('positive'));saText(p,'+4',l.x(4),480,m('positive'),44,POS,'middle');saText(p,'−4',l.x(-4),480,m('positive'),44,NEG,'middle');const arc=path(p,`M${l.x(-4)} 410 Q800 235 ${l.x(4)} 410`,{stroke:COL.dim,'stroke-width':3,fill:'none'},{d:0});draw(arc,m('negative'),1.2);saText(p,'Opposite of −4: +4',800,280,m('negative'),39,POS,'middle');saEq(p,4,-4,0,m('zero'),760);saText(p,'Opposite of 0: 0',800,845,m('zero',2),30,COL.chalk,'middle');}],
+['removePositive','Subtract positive tiles',m=>{const p=panel(0);saTitle(p,'6 − 2','Subtract +2: remove two positive tiles.');S.ssModel=ssRemoval(p,6,2,m,false);}],
+['missingPositive','Add zero pairs first',m=>{const p=panel(0);saTitle(p,'2 − 5','Not enough positive tiles? Add zero pairs BEFORE removing.');S.ssModel=ssRemoval(p,2,5,m);}],
+['q1','Quick check',()=>{const p=panel(0);saTitle(p,'−2 − 3','Start with two negative tiles. How many zero pairs are NEEDED?');saTile(p,-1,'q1-start0',760,235);saTile(p,-1,'q1-start1',850,235);S.ssPairOptions=[1,3,5].map((n,j)=>{const g=G(p,{x:300+j*490,y:450});for(let i=0;i<n;i++){saTile(g,1,'q1-'+j+'-p'+i,(i-(n-1)/2)*65,-45);saTile(g,-1,'q1-'+j+'-n'+i,(i-(n-1)/2)*65,45);}saText(g,String.fromCharCode(65+j)+' · '+n+' zero '+(n===1?'pair':'pairs'),0,135,0,29,COL.dim,'middle');return {el:g,box:[100+j*490,325,400,290],label:n+' zero pairs'};});},{ask:done=>quiz(BAND,[{id:'c-zero-pairs',prompt:'Choose the MINIMUM zero pairs needed to remove 3 positive tiles.',build:pickEls(S.ssPairOptions,1,'Three zero pairs supply three positives to remove. Before removal, −2 + 3 − 3 is still −2.',i=>i===0?'One pair supplies only one positive tile. We must remove three.':'Five pairs would work, but the question asks for the minimum. Three provide exactly three positive tiles.',()=>pulseFx(S.ssPairOptions[1].el,1.05))}],done)}],
+['removeNegative','Subtract a negative amount',m=>{const p=panel(0);saTitle(p,'3 − (−2)','Subtract −2: remove two NEGATIVE tiles.');S.ssModel=ssRemoval(p,3,-2,m);}],
+['negativeStart','A negative start can increase',m=>{const p=panel(0);saTitle(p,'−4 − (−2)','We already have the two negative tiles to remove.');S.ssModel=ssRemoval(p,-4,-2,m,false);}],
+['q2','Quick check',()=>{const p=panel(0);saTitle(p,'−5 − (−7)','Two zero pairs have been added. Remove seven NEGATIVE tiles.');for(let i=0;i<5;i++)saTile(p,-1,'q2-initial'+i,380+i*76,265);for(let i=0;i<2;i++){saTile(p,1,'q2-pairp'+i,930+i*90,245);saTile(p,-1,'q2-pairn'+i,930+i*90,330);}saText(p,'Starting value is still −5: −7 + 2 = −5',800,410,0,30,COL.dim,'middle');S.ssTileChoices=ssTileOptions(p,[[1,2],[-1,2],[-1,5]],555);},{ask:done=>quiz(BAND,[{id:'c-remainder',prompt:'Which tiles remain after all seven negatives are removed?',build:pickEls(S.ssTileChoices,0,'The five original negatives and two added negatives leave. The two added positives remain: +2.',i=>i===1?'Subtracting −7 removes negative tiles, so the two leftover tiles here are positive.':'The starting value is −5, but removing seven negative units increases it to +2.',()=>pulseFx(S.ssTileChoices[0].el,1.1))}],done)}],
+['rewrite','Subtract means add the opposite',m=>{const p=panel(0);saTitle(p,'Keep the start · add the opposite');saMath(p,'a − b = a + (−b)',800,270,m('rule'),69);saText(p,'Keep a',435,350,m('rule'),29,COL.dim,'middle');saText(p,'Replace b with its opposite',1070,350,m('rule'),29,COL.dim,'middle');ssSubtract(p,3,-2,5,m('example'),475);saEq(p,3,2,5,m('example',1.5),560);ssSubtract(p,-4,2,-6,m('other'),705);saEq(p,-4,-2,-6,m('other',1.5),795);}],
+['lineNegative','Subtract negative: move right',m=>{const p=panel(0);saTitle(p,'2 − (−5)','Rewrite first. The move starts at +2.');S.ssLine=saLine(p);saMove(S.ssLine,0,2,315,m('start'));saEq(p,2,5,7,m('opposite'),245,800,46);saMove(S.ssLine,2,7,440,m('move'));ssSubtract(p,2,-5,7,m('result'));}],
+['linePositive','Subtract positive: move left',m=>{const p=panel(0);saTitle(p,'−3 − 4','The first number keeps its sign.');S.ssLine=saLine(p);saMove(S.ssLine,0,-3,315,m('start'));saEq(p,-3,-4,-7,m('opposite'),245,800,46);saMove(S.ssLine,-3,-7,440,m('move'));ssSubtract(p,-3,4,-7,m('result'));}],
+['q3','Quick check',()=>{const p=panel(0);saTitle(p,'−2 − (−6)','The start is shown. Add the opposite of −6.');const l=saLine(p);S.ssLine=l;saMove(l,0,-2,330,0);S.ssPoints=[-8,4,8].map(v=>{const g=G(p,{x:l.x(v),y:l.y});mk('circle',{r:17,fill:COL.board,stroke:COL.task,'stroke-width':3},g);return {el:g,box:[l.x(v)-34,l.y-35,68,70],label:num(v)};});},{ask:done=>quiz(BAND,[{id:'c-endpoint',prompt:'Choose the endpoint of −2 + 6.',build:pickEls(S.ssPoints,1,'From −2, move six units RIGHT to +4. Subtracting −6 adds +6.',i=>i===0?'−8 comes from moving left. The opposite of −6 is +6, so move right.':'Keep the starting sign: −2 + 6 is 4. Changing −2 to +2 would incorrectly give 8.',()=>pulseFx(S.ssPoints[1].el,1.25))}],done)}],
+['crossZero','Remove beyond the original negatives',m=>{const p=panel(0);saTitle(p,'−5 − (−8)','Three zero pairs make eight negative tiles available.');S.ssModel=ssRemoval(p,-5,-8,m);saText(p,'Same result as −5 + 8',800,745,m('result'),31,COL.dim,'middle');}],
+['zero','Useful zero checks',m=>{const p=panel(0);saTitle(p,'Zero fits the same rule');ssSubtract(p,-7,0,-7,m('keep'),330);saText(p,'Subtract zero: unchanged',800,395,m('keep'),30,COL.dim,'middle');ssSubtract(p,0,-4,4,m('from'),545);saText(p,'0 + 4 = 4',800,615,m('from'),35,POS,'middle');ssSubtract(p,-6,-6,0,m('same'),770);saText(p,'Equal opposites add to zero',800,845,m('same'),30,COL.dim,'middle');}],
+['chain','Track the signed partial sum',m=>{const p=panel(0);saTitle(p,'−6 − (−10) + (−3)','Work from left to right after rewriting.');const lines=[[[ssV(-6),' − ',ssOperand(-10),' + ',ssOperand(-3),' = ',ssV(-6),' + ',ssV(10),' + ',ssOperand(-3)],'rewrite',340,47],[[ssV(-6),' + ',ssV(10),' = ',ssV(4)],'first',520,58],[[ssV(4),' + ',ssOperand(-3),' = ',ssV(1)],'last',715,58]];lines.forEach(([parts,k,y,size])=>ssEq(p,parts,m(k),y,750,size));saText(p,'The initial −6 stays −6.',800,845,m('last'),30,COL.dim,'middle');}],
+['temperature','Signed change or positive gap?',m=>{const p=panel(0);saTitle(p,'Initial 8°C → final −6°C','Two questions; two meanings.');const l=saLine(p,-8,8,75);S.ssLine=l;put(l.dot,{x:l.x(8)});put(l.circle,{c_fill:POS});saText(p,'initial: 8°C',l.x(8),305,0,30,POS,'middle');saText(p,'final: −6°C',l.x(-6),305,0,30,NEG,'middle');saMove(l,8,-6,420,m('change'));ssEq(p,[ssV(-6),' − ',ssV(8),' = ',ssV(-14)],m('change'),700,800,52);saText(p,'Signed change: −14°C (a fall)',800,755,m('change'),32,NEG,'middle');const tape=G(p,{o:0});path(tape,`M${l.x(-6)} 340H${l.x(8)}`,{stroke:COL.task,'stroke-width':8});for(const v of [-6,8])path(tape,`M${l.x(v)} 329V351`,{stroke:COL.task,'stroke-width':3});saText(tape,'14°C gap',800,310,0,30,COL.task,'middle');show(tape,m('gap'));saText(p,'Positive gap: 14°C',800,835,m('labels'),32,COL.task,'middle');}],
+['altitude','Upper height minus lower height',m=>{const p=panel(0);saTitle(p,'Drone +35 m · diver −18 m','How far apart vertically? Upper minus lower.');const g=G(p),x=500,y0=565,s=6,yt=y0-35*s,yb=y0+18*s;path(g,`M${x} 300V710`,{stroke:COL.dim,'stroke-width':3});path(g,'M190 565H1450',{stroke:COL.chalk,'stroke-width':2,'stroke-dasharray':'8 6'});saText(g,'Sea level: 0 m',1350,550,0,28,COL.chalk,'middle');for(const v of [-20,-10,0,10,20,30,40]){const y=y0-v*s;path(g,`M${x-9} ${y}H${x+9}`,{stroke:COL.dim,'stroke-width':2});saText(g,num(v),x-28,y+9,0,26,COL.dim,'end');}const drone=G(g,{x:720,y:yt,o:0});path(drone,'M-35 0H35M-16 -10L16 10M-16 10L16 -10',{stroke:POS,'stroke-width':5});for(const dx of [-35,35])mk('ellipse',{cx:dx,cy:-8,rx:23,ry:6,fill:'none',stroke:POS,'stroke-width':3},drone);show(drone,m('upper'));saText(g,'+35 m',825,yt+10,m('upper'),35,POS);const diver=G(g,{x:720,y:yb,o:0});mk('circle',{cx:-18,cy:-6,r:10,fill:'none',stroke:NEG,'stroke-width':3},diver);path(diver,'M-8 -4L24 3L48 -7M18 1L42 17',{stroke:NEG,'stroke-width':5});show(diver,m('lower'));saText(g,'−18 m',825,yb+10,m('lower'),35,NEG);const tape=G(g,{o:0});path(tape,`M1080 ${yt}V${yb}`,{stroke:COL.task,'stroke-width':8});for(const yy of [yt,y0,yb])path(tape,`M1067 ${yy}H1093`,{stroke:COL.task,'stroke-width':3});saText(tape,'35 m',1115,(yt+y0)/2+10,0,31,COL.task);saText(tape,'18 m',1115,(y0+yb)/2+10,0,31,COL.task);saText(tape,'53 m',1260,(yt+yb)/2+10,0,44,COL.task);show(tape,m('gap'));ssSubtract(p,35,-18,53,m('gap'),790,52);saText(p,'Vertical separation: 53 meters',800,850,m('result'),33,COL.task,'middle');S.ssAltitude={g,x,y0,s,yt,yb,tape};}],
+['wrap','Four reliable ideas',m=>{const p=panel(0);saTitle(p,'Subtract signed numbers with a reason');[['Keep the start; add the opposite of the subtracted number.','w1'],['Remove tiles of the SIGN you are subtracting.','w2'],['Add zero pairs FIRST if those tiles are missing.','w3'],['Signed change = final − initial; a gap is positive distance.','w4']].forEach(([s,k],i)=>{const g=G(p,{x:-16,y:270+i*145,o:0});mk('circle',{cx:130,cy:-10,r:26,fill:COL.task},g);T(g,String(i+1),{x:130,y:0,size:30,anchor:'middle',fill:COL.board});T(g,s,{x:195,size:31});tw(g,{x:0,o:1},m(k),.6);});}],
+['final1','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-basic',prompt:'Subtract. Keep the first number; add the opposite of the second.',build:saBlanks([
+ {parts:['7 − (−6) = ',{box:'13'}],why:'7 + 6 = 13. Subtracting −6 adds +6.'},
+ {parts:['19 − (−8) = ',{box:'27'}],why:'19 + 8 = 27.'},
+ {parts:['−4 − 10 = ',{box:'-14'}],why:'−4 + (−10) = −14.'},
+ {parts:['−9 − 33 = ',{box:'-42'}],why:'−9 + (−33) = −42.'},
+ {parts:['−8 − 0 = ',{box:'-8'}],why:'Subtracting zero leaves the starting value unchanged: −8 + 0 = −8.'},
+ {parts:['0 − (−9) = ',{box:'9'}],why:'The opposite of −9 is +9, so 0 + 9 = 9.'}
+ ])}],done,'Chapter practice 1 of 3')}],
+['final2','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-mixed',prompt:'Subtract. Track the signed partial sum for the last row.',build:saBlanks([
+ {parts:['−16 − (−7) = ',{box:'-9'}],why:'−16 + 7 = −9.'},
+ {parts:['−150 − (−151) = ',{box:'1'}],why:'−150 + 151 = 1; subtracting the larger negative crosses zero.'},
+ {parts:['76 − 173 = ',{box:'-97'}],why:'76 + (−173) = −97.'},
+ {parts:['−13 − (−5) + 8 = ',{box:'0'}],why:'−13 + 5 = −8; then −8 + 8 = 0.'}
+ ])}],done,'Chapter practice 2 of 3')}],
+['final3','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[
+ {id:'p-change',prompt:'Temperature changes from 11°C to −8°C. Find the SIGNED CHANGE: final minus initial.',build:saBlanks([{parts:[{box:'-19'},' °C'],why:'−8 − 11 = −19°C. The negative sign shows a fall.'}])},
+ {id:'p-gap',prompt:'For those same readings, 11°C and −8°C, find the POSITIVE GAP.',build:saBlanks([{parts:[{box:'19'},' °C'],why:'The distance between the readings is 19°C, the magnitude of the signed change.'}])},
+ {id:'p-altitude',prompt:'A drone is +44 meters and a diver is −17 meters relative to sea level. Find their VERTICAL SEPARATION: upper minus lower.',build:saBlanks([{parts:[{box:'61'},' meters'],why:'44 − (−17) = 44 + 17 = 61 meters.'}])},
+ {id:'p-tiles',prompt:'Start with 2 positive tiles and subtract −3. Add the MINIMUM zero pairs, then remove 3 negative tiles.',build:saBlanks([
+ {parts:[{box:'3'},' zero pairs added.'],why:'Three pairs supply the three missing negative tiles and preserve starting value +2.'},
+ {parts:['Remaining signed value = ',{box:'5'}],why:'Two original positives plus three added positives remain: +5.'}
+ ])}
+ ],done,'Chapter practice 3 of 3')}],
+['finish','Finished',()=>panel(0),{ask:finishCard}]
+].map(([id,title,run,extra])=>({id,title,run,...extra}));
+boot();
+</script></body></html>
diff --git a/site/math-notebook/index.html b/site/math-notebook/index.html
index a4ac2e2..28134ef 100644
--- a/site/math-notebook/index.html
+++ b/site/math-notebook/index.html
@@ -229,7 +229,7 @@ main#contents { padding-bottom: 80px; }
'use strict';
// Chapters are numbered in order through the units. Add a chapter here when its lesson is ready.
const UNITS = [ // [unit title, [[chapter title, minutes], ...]]; chapters are numbered in order. Add a chapter when its lesson is ready.
- ['The Number System', [['Types of Numbers and the Number Line', 9], ['Positive and Negative Numbers', 8], ['Absolute Value', 9], ['Factors and Greatest Common Factor', 11], ['Multiples and Least Common Multiple', 10], ['Fraction Basics: Types of Fractions and Adding and Subtracting Fractions', 13], ['Multiplying and Dividing Fractions', 12], ['Adding and Subtracting Decimals', 11], ['Multiplying Decimals', 12], ['Dividing Decimals', 10], ['Adding Positive and Negative Numbers', 12]]],
+ ['The Number System', [['Types of Numbers and the Number Line', 9], ['Positive and Negative Numbers', 8], ['Absolute Value', 9], ['Factors and Greatest Common Factor', 11], ['Multiples and Least Common Multiple', 10], ['Fraction Basics: Types of Fractions and Adding and Subtracting Fractions', 13], ['Multiplying and Dividing Fractions', 12], ['Adding and Subtracting Decimals', 11], ['Multiplying Decimals', 12], ['Dividing Decimals', 10], ['Adding Positive and Negative Numbers', 12], ['Subtracting Positive and Negative Numbers', 13]]],
];
const HUES = ['#f4a48c', '#86c9e8', '#f3c95c', '#e8a0c8', '#8fd6b0', '#bba8ee', '#f0b45a'];
const id = n => 'ch' + String(n).padStart(2, '0');