Skip to content

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

feat(math): add unit rate and unit price chapter

yzrfc5ce527bdda
diff --git a/site/index.html b/site/index.html
index 4c030c7..7d8494d 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, 15 narrated chapters">
- <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>15 narrated chapters</small></span>
+ <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 16 narrated chapters">
+ <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>16 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 18ff2fd..9ab935f 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: 15 },
+ chapterBase: 'math-notebook/', chapters: 16 },
];
for (const book of books) {
const cover = document.querySelector(`[data-book="${book.id}"]`);
diff --git a/site/math-notebook/ch15/index.html b/site/math-notebook/ch15/index.html
index f4e41d7..d9a1ba4 100644
--- a/site/math-notebook/ch15/index.html
+++ b/site/math-notebook/ch15/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>Ratios — Elementary Mathematics</title><link rel="stylesheet" href="../lib/engine.css"><link rel="expect" href="#bar" blocking="render"><style>.ratio-inputs .bline{gap:12px}.ratio-inputs .rlabel{font-size:27px;min-width:310px}.ratio-inputs .box{width:6ch!important}.ratio-inputs .why{font-size:20px}.band .prompt{font-size:27px}.side .keys{font-size:19px}</style></head><body>
<script src="../lib/engine.js"></script><script src="audio/en/timings.js"></script><script>
'use strict';
-const CHAPTER={number:15,title:'Ratios',minutes:9,language:'en'};
+const CHAPTER={number:15,title:'Ratios',minutes:9,language:'en', next: '../ch16/' };
const rgC={blue:COL.whole,coral:COL.nat,white:COL.chalk};
const rgText=(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 rgMath=(p,s,x,y,t=0,size=52,col=COL.chalk)=>{const e=M(p,Array.isArray(s)?s:[s],{x,y,size,fill:col,anchor:'middle',o:0});show(e,t);return e;};
diff --git a/site/math-notebook/ch16/audio/en/average.mp3 b/site/math-notebook/ch16/audio/en/average.mp3
new file mode 100644
index 0000000..8343ae7
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/average.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/compare.mp3 b/site/math-notebook/ch16/audio/en/compare.mp3
new file mode 100644
index 0000000..5368549
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/compare.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/direction.mp3 b/site/math-notebook/ch16/audio/en/direction.mp3
new file mode 100644
index 0000000..25f1fe8
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/direction.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/final1.mp3 b/site/math-notebook/ch16/audio/en/final1.mp3
new file mode 100644
index 0000000..cc588ed
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/final1.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/final2.mp3 b/site/math-notebook/ch16/audio/en/final2.mp3
new file mode 100644
index 0000000..886e331
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/final2.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/final3.mp3 b/site/math-notebook/ch16/audio/en/final3.mp3
new file mode 100644
index 0000000..0c93b2e
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/final3.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/finish.mp3 b/site/math-notebook/ch16/audio/en/finish.mp3
new file mode 100644
index 0000000..6bf223e
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/finish.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/groups.mp3 b/site/math-notebook/ch16/audio/en/groups.mp3
new file mode 100644
index 0000000..2b0d26a
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/groups.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/intro.mp3 b/site/math-notebook/ch16/audio/en/intro.mp3
new file mode 100644
index 0000000..1c8e337
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/intro.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/price.mp3 b/site/math-notebook/ch16/audio/en/price.mp3
new file mode 100644
index 0000000..51946c3
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/price.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/q1.mp3 b/site/math-notebook/ch16/audio/en/q1.mp3
new file mode 100644
index 0000000..b12c4c2
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/q1.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/q2.mp3 b/site/math-notebook/ch16/audio/en/q2.mp3
new file mode 100644
index 0000000..fa4d08b
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/q2.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/q3.mp3 b/site/math-notebook/ch16/audio/en/q3.mp3
new file mode 100644
index 0000000..4e97347
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/q3.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/rate.mp3 b/site/math-notebook/ch16/audio/en/rate.mp3
new file mode 100644
index 0000000..f02d2e3
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/rate.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/reciprocal.mp3 b/site/math-notebook/ch16/audio/en/reciprocal.mp3
new file mode 100644
index 0000000..50811a7
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/reciprocal.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/splitprice.mp3 b/site/math-notebook/ch16/audio/en/splitprice.mp3
new file mode 100644
index 0000000..490a736
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/splitprice.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/swim.mp3 b/site/math-notebook/ch16/audio/en/swim.mp3
new file mode 100644
index 0000000..2a68ec6
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/swim.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/timings.js b/site/math-notebook/ch16/audio/en/timings.js
new file mode 100644
index 0000000..7da4531
--- /dev/null
+++ b/site/math-notebook/ch16/audio/en/timings.js
@@ -0,0 +1,601 @@
+window.TIMINGS = {
+ "intro": {
+ "dur": 17.544,
+ "marks": {
+ "sub": 7.852
+ },
+ "cues": [
+ [
+ 0.104,
+ "Chapter sixteen."
+ ],
+ [
+ 1.536,
+ "Unit rate and unit price."
+ ],
+ [
+ 3.737,
+ "A big total can hide a small question: how much for just one?"
+ ],
+ [
+ 7.852,
+ "Today we will use pictures to turn rates into per one comparisons."
+ ],
+ [
+ 12.578,
+ "Keep the units beside the numbers, and they will tell you exactly what your answer means."
+ ]
+ ]
+ },
+ "rate": {
+ "dur": 24.384,
+ "marks": {
+ "units": 4.688,
+ "ordered": 16.068
+ },
+ "cues": [
+ [
+ 0.104,
+ "A delivery team sorts twelve parcels in three minutes."
+ ],
+ [
+ 4.688,
+ "Parcels and minutes are different units, so this comparison is a rate."
+ ],
+ [
+ 9.492,
+ "A ratio can compare two counts of the same kind; a rate compares quantities with different units."
+ ],
+ [
+ 16.068,
+ "We want parcels per minute."
+ ],
+ [
+ 17.617,
+ "That means parcels first, minutes second."
+ ],
+ [
+ 20.482,
+ "The word per tells us which quantity belongs underneath."
+ ]
+ ]
+ },
+ "groups": {
+ "dur": 23.904,
+ "marks": {
+ "share": 3.958,
+ "each": 11.458,
+ "rate": 19.362
+ },
+ "cues": [
+ [
+ 0.091,
+ "Let's spread the work across the time."
+ ],
+ [
+ 2.253,
+ "To understand the average, move the same twelve parcels into three equal groups, one beside each minute."
+ ],
+ [
+ 9.675,
+ "No parcels disappear."
+ ],
+ [
+ 11.458,
+ "Each group has four parcels."
+ ],
+ [
+ 13.607,
+ "The real team might work unevenly, but this equal sharing shows its average."
+ ],
+ [
+ 19.362,
+ "Twelve parcels in three minutes means four parcels for each one minute."
+ ]
+ ]
+ },
+ "unit": {
+ "dur": 25.416,
+ "marks": {
+ "divide": 4.01,
+ "one": 13.425,
+ "meaning": 19.245
+ },
+ "cues": [
+ [
+ 0.104,
+ "A unit rate makes the second quantity exactly one."
+ ],
+ [
+ 4.01,
+ "Divide both quantities by three."
+ ],
+ [
+ 6.354,
+ "Twelve parcels divided by three is four parcels."
+ ],
+ [
+ 10.208,
+ "Three minutes divided by three is one minute."
+ ],
+ [
+ 13.425,
+ "The rate becomes four parcels per one minute, usually written four parcels per minute."
+ ],
+ [
+ 19.245,
+ "The number four needs its units."
+ ],
+ [
+ 21.38,
+ "It tells us how many parcels are sorted for each minute on average."
+ ]
+ ]
+ },
+ "direction": {
+ "dur": 27.312,
+ "marks": {
+ "forward": 2.656,
+ "swap": 10.755,
+ "inverse": 13.75
+ },
+ "cues": [
+ [
+ 0.104,
+ "The direction of a rate comes from the question."
+ ],
+ [
+ 2.656,
+ "Parcels per minute asks how many parcels in one minute."
+ ],
+ [
+ 6.849,
+ "But minutes per parcel asks how much time for one parcel."
+ ],
+ [
+ 10.755,
+ "Swap the quantities and their units together."
+ ],
+ [
+ 13.75,
+ "Three minutes divided by twelve parcels is one quarter of a minute per parcel."
+ ],
+ [
+ 18.932,
+ "Four parcels per minute and one quarter minute per parcel describe the same work from opposite directions."
+ ],
+ [
+ 25.443,
+ "They answer different questions."
+ ]
+ ]
+ },
+ "q1": {
+ "dur": 4.56,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Quick check."
+ ],
+ [
+ 1.12,
+ "Choose the picture that shows four parcels per minute."
+ ]
+ ]
+ },
+ "swim": {
+ "dur": 22.584,
+ "marks": {
+ "distance": 3.568,
+ "time": 5.625,
+ "question": 12.786
+ },
+ "cues": [
+ [
+ 0.091,
+ "Now the time is a fraction."
+ ],
+ [
+ 2.617,
+ "A swimmer travels three quarters of a kilometre in one half of an hour."
+ ],
+ [
+ 7.24,
+ "Each distance tile is one quarter kilometre, and the time strip is half an hour."
+ ],
+ [
+ 12.786,
+ "We want kilometres per hour, so distance goes above time."
+ ],
+ [
+ 16.523,
+ "Do not multiply distance by the time."
+ ],
+ [
+ 18.984,
+ "We are asking how much distance belongs to one whole hour."
+ ]
+ ]
+ },
+ "reciprocal": {
+ "dur": 34.44,
+ "marks": {
+ "extend": 2.982,
+ "divide": 13.815,
+ "reciprocal": 17.799,
+ "answer": 24.076
+ },
+ "cues": [
+ [
+ 0.104,
+ "Assume the swimmer keeps the same pace."
+ ],
+ [
+ 2.982,
+ "One hour contains two half-hour blocks."
+ ],
+ [
+ 6.094,
+ "The first three distance tiles stay put."
+ ],
+ [
+ 8.984,
+ "Three new tiles represent what another half hour would add at that pace."
+ ],
+ [
+ 13.815,
+ "The calculation is three quarters divided by one half."
+ ],
+ [
+ 17.799,
+ "Dividing by one half is multiplying by two, because two halves fit into one."
+ ],
+ [
+ 24.076,
+ "Three quarters times two is three halves, or one point five kilometres per hour."
+ ],
+ [
+ 29.922,
+ "The larger answer makes sense: a whole hour is twice the given time."
+ ]
+ ]
+ },
+ "q2": {
+ "dur": 4.848,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Quick check."
+ ],
+ [
+ 1.12,
+ "At the same pace, choose the distance for one whole hour."
+ ]
+ ]
+ },
+ "average": {
+ "dur": 30.84,
+ "marks": {
+ "timeline": 3.737,
+ "average": 11.784,
+ "whole": 16.445
+ },
+ "cues": [
+ [
+ 0.091,
+ "A maker completes seven badges in two minutes."
+ ],
+ [
+ 3.737,
+ "Here is one possible steady schedule, with every badge whole."
+ ],
+ [
+ 8.021,
+ "One minute falls between the third and fourth completions."
+ ],
+ [
+ 11.784,
+ "Seven divided by two is three point five badges per minute on average."
+ ],
+ [
+ 16.445,
+ "That does not mean cutting a badge in half, or completing exactly three and a half badges each minute."
+ ],
+ [
+ 23.372,
+ "It summarizes total work divided by total time."
+ ],
+ [
+ 26.641,
+ "Some minutes can contain three completions and others four."
+ ]
+ ]
+ },
+ "price": {
+ "dur": 28.056,
+ "marks": {
+ "cost": 10.378,
+ "items": 11.914,
+ "fraction": 14.232
+ },
+ "cues": [
+ [
+ 0.104,
+ "Unit price is a unit rate whose first quantity is money."
+ ],
+ [
+ 4.622,
+ "In our invented shop, four identical bottles cost three dollars and sixty cents."
+ ],
+ [
+ 10.378,
+ "Cost belongs on top."
+ ],
+ [
+ 11.914,
+ "Number of bottles belongs underneath."
+ ],
+ [
+ 14.232,
+ "We divide three dollars and sixty cents by four bottles to find dollars per bottle."
+ ],
+ [
+ 20.26,
+ "Reversing that fraction would give bottles per dollar, which is a different question."
+ ],
+ [
+ 25.208,
+ "Keep the price first when you want cost for one item."
+ ]
+ ]
+ },
+ "splitprice": {
+ "dur": 28.896,
+ "marks": {
+ "share": 6.25,
+ "each": 9.987,
+ "price": 19.349
+ },
+ "cues": [
+ [
+ 0.104,
+ "The total cost is shown as thirty-six dime tiles."
+ ],
+ [
+ 3.698,
+ "Each tile represents ten cents."
+ ],
+ [
+ 6.25,
+ "Share those same tiles equally among the four bottles."
+ ],
+ [
+ 9.987,
+ "Each bottle gets nine dimes, which is ninety cents."
+ ],
+ [
+ 13.516,
+ "All thirty-six tiles remain, so the total is still three dollars and sixty cents."
+ ],
+ [
+ 19.349,
+ "Three dollars and sixty cents divided by four is ninety cents per bottle."
+ ],
+ [
+ 24.583,
+ "Write money with two decimal places, and keep per bottle beside it."
+ ]
+ ]
+ },
+ "compare": {
+ "dur": 36.12,
+ "marks": {
+ "assumption": 11.211,
+ "normalize": 15.404,
+ "compare": 27.448
+ },
+ "cues": [
+ [
+ 0.091,
+ "A lower total price does not always mean a lower price per item."
+ ],
+ [
+ 4.505,
+ "Pack A has three notebooks for four dollars and fifty cents."
+ ],
+ [
+ 8.49,
+ "Pack B has five for seven dollars."
+ ],
+ [
+ 11.211,
+ "Assume the notebooks are identical, and there are no extra charges."
+ ],
+ [
+ 15.404,
+ "Divide each pack's cost and item count by its own item count."
+ ],
+ [
+ 19.935,
+ "Each count bar becomes one notebook."
+ ],
+ [
+ 22.318,
+ "Pack A costs one dollar fifty per notebook."
+ ],
+ [
+ 25.091,
+ "Pack B costs one dollar forty."
+ ],
+ [
+ 27.448,
+ "Pack B has the higher total, but its unit price is ten cents lower per notebook."
+ ],
+ [
+ 32.943,
+ "Compare the same units to answer fairly."
+ ]
+ ]
+ },
+ "q3": {
+ "dur": 7.152,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Quick check."
+ ],
+ [
+ 1.133,
+ "These markers are identical, with no extra charges."
+ ],
+ [
+ 5.026,
+ "Choose the lower price per marker."
+ ]
+ ]
+ },
+ "trap": {
+ "dur": 31.008,
+ "marks": {
+ "flip": 2.8,
+ "correct": 10.326,
+ "compare": 13.802
+ },
+ "cues": [
+ [
+ 0.091,
+ "Labels can catch a backward calculation."
+ ],
+ [
+ 2.8,
+ "Four bottles divided by three dollars and sixty cents gives bottles per dollar."
+ ],
+ [
+ 7.708,
+ "That is not the unit price we were asked for."
+ ],
+ [
+ 10.326,
+ "Cost divided by items gives dollars per bottle."
+ ],
+ [
+ 13.802,
+ "Before comparing rates, check that the units match."
+ ],
+ [
+ 17.174,
+ "Dollars per bottle cannot be compared directly with dollars per pack unless the packs contain the same number."
+ ],
+ [
+ 23.464,
+ "And a cheaper price per item does not settle differences in quality; our comparisons assumed identical products."
+ ]
+ ]
+ },
+ "wrap": {
+ "dur": 26.184,
+ "marks": {
+ "w1": 2.188,
+ "w2": 5.039,
+ "w3": 10.065,
+ "w4": 15.846
+ },
+ "cues": [
+ [
+ 0.13,
+ "Four habits make rates clear."
+ ],
+ [
+ 2.188,
+ "Name the direction and keep both units."
+ ],
+ [
+ 5.039,
+ "Divide the first quantity by the second, so the denominator becomes one."
+ ],
+ [
+ 10.065,
+ "For fractional time, still divide by time; use the reciprocal to calculate."
+ ],
+ [
+ 15.846,
+ "Unit price is cost per item."
+ ],
+ [
+ 18.06,
+ "A fractional count per time can be an average, while every completed object stays whole."
+ ],
+ [
+ 23.815,
+ "Now try a few rates and prices on your own."
+ ]
+ ]
+ },
+ "final1": {
+ "dur": 9.36,
+ "marks": {},
+ "cues": [
+ [
+ 0.117,
+ "Chapter practice, set one."
+ ],
+ [
+ 2.305,
+ "Find each rate in the units shown beside the box."
+ ],
+ [
+ 6.224,
+ "Fractions or exact decimals both work."
+ ]
+ ]
+ },
+ "final2": {
+ "dur": 6.072,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Chapter practice, set two."
+ ],
+ [
+ 2.122,
+ "Find the cost per item."
+ ],
+ [
+ 3.568,
+ "These prices are invented for practice."
+ ]
+ ]
+ },
+ "final3": {
+ "dur": 6.312,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Chapter practice, set three."
+ ],
+ [
+ 2.435,
+ "Compare matching products, then explain an average rate."
+ ]
+ ]
+ },
+ "finish": {
+ "dur": 7.752,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "You have finished unit rate and unit price."
+ ],
+ [
+ 2.891,
+ "Let the units guide your division, and per one will become a fair comparison."
+ ]
+ ]
+ }
+};
diff --git a/site/math-notebook/ch16/audio/en/trap.mp3 b/site/math-notebook/ch16/audio/en/trap.mp3
new file mode 100644
index 0000000..8d89780
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/trap.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/unit.mp3 b/site/math-notebook/ch16/audio/en/unit.mp3
new file mode 100644
index 0000000..6702b06
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/unit.mp3 differ
diff --git a/site/math-notebook/ch16/audio/en/wrap.mp3 b/site/math-notebook/ch16/audio/en/wrap.mp3
new file mode 100644
index 0000000..998c37c
Binary files /dev/null and b/site/math-notebook/ch16/audio/en/wrap.mp3 differ
diff --git a/site/math-notebook/ch16/index.html b/site/math-notebook/ch16/index.html
new file mode 100644
index 0000000..85279f0
--- /dev/null
+++ b/site/math-notebook/ch16/index.html
@@ -0,0 +1,53 @@
+<!doctype html>
+<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Unit Rate and Unit Price — Elementary Mathematics</title><link rel="stylesheet" href="../lib/engine.css"><link rel="expect" href="#bar" blocking="render"><style>.band .prompt{font-size:27px}.side .keys{font-size:19px}.screen .blanks .bline{gap:12px}.screen .blanks .box{width:7ch!important}.screen .blanks .why{font-size:22px}.screen .blanks .bline svg tspan{font-style:normal}</style></head><body>
+<script src="../lib/engine.js"></script><script src="audio/en/timings.js"></script><script>
+'use strict';
+const CHAPTER={number:16,title:'Unit Rate and Unit Price',minutes:10,language:'en'};
+// Reuse ch15 text/math entrance pattern; quantities blue, time/item denominator coral, focus amber.
+const urText=(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 urMath=(p,s,x,y,t=0,size=52,col=COL.chalk)=>{const e=M(p,Array.isArray(s)?s:[s],{x,y,size,fill:col,anchor:'middle',o:0});show(e,t);return e;};
+const urTitle=(p,s,sub='')=>{urText(p,s,100,110,.1,43);if(sub)urText(p,sub,100,165,.15,27,COL.dim);};
+function urParcel(p,id,x,y){const g=G(p,{x,y});g.dataset.objectId=id;mk('rect',{x:-24,y:-21,width:48,height:42,rx:3,fill:mix(COL.board,COL.whole,.3),stroke:COL.whole,'stroke-width':3},g);path(g,'M-24 -7H24 M0 -21V-7',{stroke:COL.whole,'stroke-width':2});return g;}
+function urDelivery(p,grouped=false){const parcels=Array.from({length:12},(_,i)=>urParcel(p,'parcel-'+i,grouped?550+i%4*100:350+i%6*100,grouped?290+Math.floor(i/4)*130:325+Math.floor(i/6)*100));const times=[0,1,2].map(i=>{const g=G(p,{x:1120,y:290+i*130});g.dataset.timeId='minute-'+i;mk('rect',{x:-100,y:-40,width:200,height:80,rx:10,fill:'none',stroke:COL.nat,'stroke-width':3},g);T(g,'1 minute',{y:11,size:30,fill:COL.nat,anchor:'middle'});return g;});return {parcels,times};}
+function urRegroup(model,t){model.parcels.forEach((e,i)=>tw(e,{x:550+i%4*100,y:290+Math.floor(i/4)*130},t,2,io));}
+function urDistance(p,id,x,y,n,w=100){const g=G(p,{x,y});g.dataset.distanceId=id;g.dataset.km=String(n/4);for(let i=0;i<n;i++)mk('rect',{x:i*w,y:0,width:w,height:70,fill:mix(COL.board,COL.whole,.3),stroke:COL.whole,'stroke-width':2},g);return g;}
+function urSwim(p){const cells=[0,1,2].map(i=>urDistance(p,'observed-'+i,300+i*100,300,1));const time=G(p,{x:300,y:480});mk('rect',{width:300,height:70,fill:mix(COL.board,COL.nat,.25),stroke:COL.nat,'stroke-width':3},time);T(time,'½ hour',{x:150,y:44,size:31,fill:COL.nat,anchor:'middle'});urText(p,'distance · each tile = ¼ km',300,265,0,30,COL.whole);urText(p,'time',300,450,0,30,COL.nat);return {cells,time};}
+function urBottle(p,id,x,y){const g=G(p,{x,y});g.dataset.bottleId=id;path(g,'M-12 -44H12V-26L25 -10V40Q25 47 18 47H-18Q-25 47 -25 40V-10L-12 -26Z',{fill:mix(COL.board,COL.nat,.2),stroke:COL.nat,'stroke-width':3});path(g,'M-23 10H23',{stroke:COL.nat,'stroke-width':3});return g;}
+function urMoney(p){const bottles=[0,1,2,3].map(i=>urBottle(p,'bottle-'+i,275+i*350,285));const dimes=Array.from({length:36},(_,i)=>{const g=G(p,{x:440+i%12*60,y:390+Math.floor(i/12)*60});g.dataset.dimeId='dime-'+i;g.dataset.cents='10';mk('circle',{r:17,fill:mix(COL.board,COL.whole,.35),stroke:COL.whole,'stroke-width':2},g);return g;});urText(p,'36 dime tiles · each = $0.10 · total = $3.60',800,625,0,32,COL.whole,'middle');return {bottles,dimes};}
+function urPack(p,x,y,name,n,cost,t=0){const g=G(p,{x,y});urText(g,name,0,0,t,33,COL.chalk);const money=mk('rect',{x:0,y:40,width:cost*70,height:65,fill:mix(COL.board,COL.whole,.3),stroke:COL.whole,'stroke-width':2},g);const count=mk('rect',{x:0,y:165,width:n*70,height:65,fill:mix(COL.board,COL.nat,.25),stroke:COL.nat,'stroke-width':2},g);const costLab=urText(g,'$'+cost.toFixed(2)+' total',0,140,t,30,COL.whole),countLab=urText(g,n+' notebooks',0,265,t,30,COL.nat);return {g,money,count,n,cost,costLab,countLab};}
+const BEATS=[
+['intro','Unit Rate and Unit Price',(m,D)=>{const g=G(scene,{o:0,y:24});T(g,'Unit 2 · Ratios, Proportions, and Percents · Chapter 16',{x:800,y:200,size:28,fill:COL.dim,anchor:'middle'});T(g,'Unit Rate',{x:800,y:330,size:86,weight:600,anchor:'middle'});T(g,'and Unit Price',{x:800,y:435,size:86,weight:600,anchor:'middle'});T(g,'4 parcels / 1 minute',{x:800,y:580,size:52,fill:COL.task,anchor:'middle'});tw(g,{o:1,y:0},.2,1,out);urText(g,'Keep the units · compare per one',800,735,m('sub'),36,COL.dim,'middle');hide(g,D-.8,.7);}],
+['rate','Different quantities, different units',m=>{const p=panel(0);urTitle(p,'Twelve parcels · three minutes');S.urDelivery=urDelivery(p);urText(p,'12 parcels',590,245,m('units'),35,COL.whole,'middle');urText(p,'3 minutes',1120,205,m('units'),35,COL.nat,'middle');urText(p,'parcels per minute',800,680,m('ordered'),48,COL.task,'middle');urText(p,'parcels ÷ minutes',800,790,m('ordered',2),38,COL.chalk,'middle');}],
+['groups','Share the same work across time',m=>{const p=panel(0);urTitle(p,'Same twelve parcels · three equal groups','Equal sharing represents the average; actual minute counts can vary.');S.urDelivery=urDelivery(p);urRegroup(S.urDelivery,m('share'));[0,1,2].forEach(i=>urText(p,'4 parcels',350,300+i*130,m('each'),32,COL.whole,'middle'));urText(p,'12 parcels / 3 minutes = 4 parcels / 1 minute',800,755,m('rate'),37,COL.task,'middle');}],
+['unit','Make the denominator one',m=>{const p=panel(0);urTitle(p,'Unit rate = rate per ONE');S.urDelivery=urDelivery(p,true);const focus=mk('rect',{x:480,y:225,width:760,height:125,rx:14,fill:'none',stroke:COL.task,'stroke-width':4},p);put(focus,{o:0});show(focus,m('one'));urMath(p,'12 ÷ 3 = 4',395,690,m('divide'),53,COL.whole);urMath(p,'3 ÷ 3 = 1',1130,690,m('divide',1),53,COL.nat);urText(p,'4 parcels per 1 minute',800,785,m('one'),47,COL.task,'middle');urText(p,'4 parcels per minute, on average',800,850,m('meaning'),29,COL.dim,'middle');}],
+['direction','The question chooses the direction',m=>{const p=panel(0);urTitle(p,'Parcels per minute ↔ minutes per parcel');const a=G(p,{x:800,y:330}),b=G(p,{x:800,y:510});T(a,'12 parcels',{size:52,anchor:'middle',fill:COL.whole});T(b,'3 minutes',{size:52,anchor:'middle',fill:COL.nat});const rule=path(p,'M560 405H1040',{stroke:COL.chalk,'stroke-width':3});hide(rule,m('swap'),.2);show(rule,m('swap',2),.2);const first=urText(p,'12 ÷ 3 = 4 parcels/minute',800,710,m('forward'),44,COL.chalk,'middle');hide(first,m('swap'),.5);tw(a,{x:1000,y:420},m('swap'),1,io);tw(b,{x:600,y:420},m('swap'),1,io);tw(a,{x:800,y:510},m('swap',1),1,io);tw(b,{x:800,y:330},m('swap',1),1,io);urText(p,'3 ÷ 12 = ¼ minute/parcel',800,710,m('inverse'),44,COL.task,'middle');urText(p,'Same work · different question · different units',800,815,m('inverse',2),32,COL.dim,'middle');S.urSwap={a,b,rule};}],
+['q1','Choose the per-minute picture',()=>{const p=panel(0);urTitle(p,'Four parcels per minute','Which picture puts FOUR parcels beside ONE minute?');S.urChoices=[[4,1],[1,4],[3,1]].map(([n,time],i)=>{const x=290+i*510,g=G(p);for(let j=0;j<n;j++)urParcel(g,'q1-'+i+'-'+j,x+(j-(n-1)/2)*62,315);mk('rect',{x:x-130,y:415,width:260,height:80,rx:12,fill:'none',stroke:COL.nat,'stroke-width':3},g);urText(g,time+(time===1?' minute':' minutes'),x,465,0,33,COL.nat,'middle');urText(g,n+(n===1?' parcel':' parcels'),x,250,0,32,COL.whole,'middle');return {el:g,box:[x-220,210,440,350],label:n+' parcels in '+time+' minutes'};});},{ask:done=>quiz(BAND,[{id:'c-per-minute',prompt:'Select the picture for 4 parcels per minute.',build:pickEls(S.urChoices,0,'Four parcels beside one minute. Units tell you the direction.',i=>i===1?'That is one parcel in four minutes, not four parcels per minute.':'That shows three parcels per minute; the requested count is four.')}],done)}],
+['swim','Divide by fractional time',m=>{const p=panel(0);urTitle(p,'A swimmer: ¾ km in ½ hour','Labelled model; screen pixels are not physical kilometres.');S.urSwim=urSwim(p);urText(p,'¾ km',750,345,m('distance'),44,COL.whole);urText(p,'½ hour',750,525,m('time'),44,COL.nat);urMath(p,[F('3/4','1/2')],1170,415,m('question'),67);urText(p,'kilometres ÷ hours',1170,610,m('question'),30,COL.task,'middle');urText(p,'Wanted: kilometres per ONE hour',800,800,m('question',2),39,COL.task,'middle');}],
+['reciprocal','How many half hours fit?',m=>{const p=panel(0);urTitle(p,'One hour contains TWO half hours','Projection assumes the swimmer keeps the same pace.');S.urSwim=urSwim(p);const time2=G(p,{x:600,y:650,o:0});mk('rect',{width:300,height:70,fill:mix(COL.board,COL.nat,.25),stroke:COL.nat,'stroke-width':3},time2);T(time2,'½ hour',{x:150,y:44,size:31,fill:COL.nat,anchor:'middle'});show(time2,m('extend'),.5);tw(time2,{y:480},m('extend'),2,io);const copies=[0,1,2].map(i=>{const e=urDistance(p,'projected-'+i,600+i*100,400,1);put(e,{o:0});show(e,m('extend'),.5);tw(e,{y:300},m('extend'),2,io);return e;});urText(p,'first half hour',450,405,0,26,COL.dim,'middle');urText(p,'another half hour · same pace',750,405,m('extend',2),25,COL.dim,'middle');urText(p,'1 hour',1080,525,m('extend',2),37,COL.nat);urMath(p,[F(3,4),' ÷ ',F(1,2)],400,700,m('divide'),48);urMath(p,'=',650,700,m('reciprocal'),48);urMath(p,[F(3,4),' × 2'],900,700,m('reciprocal'),48);urText(p,'= 1.5 km/hour',1250,700,m('answer'),39,COL.task,'middle');urText(p,'Distance and time both double; the pace stays the same.',800,835,m('answer',1),31,COL.dim,'middle');S.urSwim.copies=copies;S.urSwim.time2=time2;}],
+['q2','Extend to one hour',()=>{const p=panel(0);urTitle(p,'¾ km in ½ hour · same pace for 1 hour','All distance strips use the same scale. Which is the one-hour distance?');S.urChoices=[[3,25,'⅜ km'],[3,50,'¾ km'],[6,50,'1½ km']].map(([n,w,label],i)=>{const x=290+i*510,g=G(p);for(let j=0;j<n;j++)mk('rect',{x:x-n*w/2+j*w,y:300,width:w,height:70,fill:mix(COL.board,COL.whole,.3),stroke:COL.whole,'stroke-width':2},g);urText(g,label,x,435,0,43,COL.whole,'middle');urText(g,'in 1 hour',x,525,0,31,COL.nat,'middle');g.dataset.km=String(n*w/200);return {el:g,box:[x-220,245,440,330],label:label+' in one hour'};});},{ask:done=>quiz(BAND,[{id:'c-half-hour',prompt:'Pick the distance for ONE hour at the same pace.',build:pickEls(S.urChoices,2,'One hour is two half hours: ¾ × 2 = 1½ kilometres.',i=>i===0?'That multiplies the distance by ½. Divide by ½ hour to get per hour.':'¾ kilometre is the half-hour distance. One whole hour gives twice as far.')}],done)}],
+['average','A fractional rate; whole completed objects',m=>{const p=panel(0);urTitle(p,'Seven completed badges in two minutes','One possible steady schedule; every badge stays whole.');const badges=Array.from({length:7},(_,i)=>{const g=G(p,{x:350+i*125,y:310});g.dataset.badgeId='badge-'+i;g.dataset.completion=String(2*(i+1)/7);mk('circle',{r:25,fill:mix(COL.board,COL.whole,.3),stroke:COL.whole,'stroke-width':3},g);T(g,String(i+1),{y:9,size:25,anchor:'middle',fill:COL.whole});tw(g,{x:200+1000*(i+1)/7,y:420},m('timeline'),2,io);return g;});const axis=G(p,{o:0});path(axis,'M200 500H1200',{stroke:COL.nat,'stroke-width':3});[0,1,2].forEach(i=>{path(axis,`M${200+i*500} 488V512`,{stroke:COL.nat,'stroke-width':3});T(axis,i+' min',{x:200+i*500,y:555,size:30,fill:COL.nat,anchor:'middle'});});path(axis,'M700 365V500', {stroke:COL.task,'stroke-width':3,'stroke-dasharray':'8 8'});show(axis,m('timeline'));urText(p,'1 minute falls between badges 3 and 4',800,640,m('average'),31,COL.task,'middle');urText(p,'7 ÷ 2 = 3.5 badges/minute on average',800,735,m('average'),42,COL.chalk,'middle');urText(p,'Total work ÷ total time · no badge is cut in half',800,835,m('whole'),32,COL.dim,'middle');S.urBadges=badges;}],
+['price','Cost goes on top',m=>{const p=panel(0);urTitle(p,'Four bottles cost $3.60','Invented price · four identical bottles');[0,1,2,3].forEach(i=>urBottle(p,'price-'+i,370+i*180,350));urText(p,'$3.60 cost',1200,305,m('cost'),45,COL.whole,'middle');path(p,'M1010 370H1390',{stroke:COL.chalk,'stroke-width':3});urText(p,'4 bottles',1200,450,m('items'),45,COL.nat,'middle');urText(p,'$3.60 ÷ 4 bottles',800,670,m('fraction'),50,COL.chalk,'middle');urText(p,'Wanted: dollars per bottle',800,805,m('fraction',2),38,COL.task,'middle');}],
+['splitprice','Share the cost without changing the total',m=>{const p=panel(0);urTitle(p,'Thirty-six dimes shared among four bottles');S.urMoney=urMoney(p);S.urMoney.dimes.forEach((e,i)=>{const b=Math.floor(i/9),j=i%9;tw(e,{x:235+b*350+j%3*40,y:390+Math.floor(j/3)*55},m('share'),2,io);});[0,1,2,3].forEach(i=>urText(p,'9 dimes = $0.90',275+i*350,555,m('each'),29,COL.whole,'middle'));urText(p,'$3.60 ÷ 4 = $0.90 per bottle',800,755,m('price'),47,COL.task,'middle');urText(p,'Four equal costs still total $3.60',800,840,m('price',1),31,COL.dim,'middle');}],
+['compare','Compare the cost of one matching item',m=>{const p=panel(0);urTitle(p,'Notebook packs A and B','Both packs use the same cost scale and the same item-count scale.');S.urPacks=[urPack(p,230,270,'Pack A: 3 for $4.50',3,4.5),urPack(p,890,270,'Pack B: 5 for $7.00',5,7)];urText(p,'Identical notebooks · no extra charges',800,210,m('assumption'),28,COL.task,'middle');S.urPacks.forEach((a,i)=>{hide(a.costLab,m('normalize'),.4);hide(a.countLab,m('normalize'),.4);urText(a.g,'$'+(a.cost/a.n).toFixed(2)+' per notebook',0,140,m('normalize',2),30,COL.whole);urText(a.g,'1 notebook',0,265,m('normalize',2),30,COL.nat);tw(a.money,{'a_width':a.cost/a.n*70},m('normalize'),2,io);tw(a.count,{'a_width':70},m('normalize'),2,io);urText(p,'÷ '+a.n+' for both bars',500+i*660,565,m('normalize'),28,COL.task,'middle');urText(p,'$'+(a.cost/a.n).toFixed(2)+' / 1 notebook',465+i*660,630,m('normalize',2),37,COL.chalk,'middle');});urText(p,'Pack B: $0.10 less per notebook',800,765,m('compare'),42,COL.task,'middle');urText(p,'Higher total cost can still mean lower unit price.',800,845,m('compare',1),30,COL.dim,'middle');}],
+['q3','Choose the lower unit price',()=>{const p=panel(0);urTitle(p,'Same markers · no extra charges','Compare dollars per marker, not total cost alone.');S.urChoices=[[4,2.8],[6,3.9]].map(([n,c],i)=>{const x=450+i*700,g=G(p);for(let j=0;j<n;j++)mk('rect',{x:x+(j-(n-1)/2)*48-10,y:270,width:20,height:100,rx:5,fill:mix(COL.board,COL.nat,.3),stroke:COL.nat,'stroke-width':2},g);urText(g,'Pack '+['A','B'][i]+': '+n+' markers',x,225,0,36,COL.nat,'middle');urText(g,'$'+c.toFixed(2)+' total',x,440,0,36,COL.whole,'middle');urText(g,'$'+(c/n).toFixed(2)+' per marker',x,545,0,41,COL.task,'middle');g.dataset.count=String(n);g.dataset.cost=String(c);return {el:g,box:[x-290,190,580,410],label:'Pack '+['A','B'][i]+', '+(c/n).toFixed(2)+' dollars per marker'};});},{ask:done=>quiz(BAND,[{id:'c-unit-price',prompt:'Pick the pack with the LOWER price per marker.',build:pickEls(S.urChoices,1,'Pack B: $3.90 ÷ 6 = $0.65 per marker, lower than $0.70.',()=> 'Pack A costs less in total, but each marker costs $0.70. Pack B is $0.65 per marker.')}],done)}],
+['trap','Let the units catch a reversed division',m=>{const p=panel(0);urTitle(p,'Unit price asks COST per ITEM');urText(p,'4 bottles ÷ $3.60',800,320,m('flip'),51,COL.chalk,'middle');urText(p,'gives bottles per dollar',800,405,m('flip'),33,COL.dim,'middle');const cross=path(p,'M480 275L1120 345 M480 345L1120 275',{stroke:COL.bad,'stroke-width':4},{d:0});draw(cross,m('flip',2),.8);urText(p,'$3.60 ÷ 4 bottles = $0.90 per bottle',800,555,m('correct'),44,COL.task,'middle');urText(p,'Compare matching units AND identical products.',800,720,m('compare'),37,COL.chalk,'middle');urText(p,'A pack is not automatically one bottle.',800,815,m('compare',1),32,COL.dim,'middle');}],
+['wrap','Per one, with meaning',m=>{const p=panel(0);urTitle(p,'Four habits for rates and prices');[['Name the direction; keep both units.','w1'],['Divide first quantity by second; make denominator 1.','w2'],['Fractional time still means divide by time.','w3'],['Price = cost/item; fractional counts can describe averages.','w4']].forEach(([s,key],i)=>{const g=G(p,{x:-16,y:285+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:32});tw(g,{x:0,o:1},m(key),.6);});}],
+['final1','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-rates',prompt:'Find the unit rate in the units shown. Exact fractions or decimals are accepted.',build:blanks([
+{parts:['45 km in 3 hours: ',{box:'15'},' km/hour'],why:'45 ÷ 3 = 15 kilometres per hour.'},
+{parts:['⅔ km in ⅙ hour: ',{box:'4'},' km/hour'],why:'(2/3) ÷ (1/6) = (2/3) × 6 = 4 kilometres per hour.'},
+{parts:['9 signs in 4 hours: ',{box:'2.25'},' signs/hour on average'],why:'9 ÷ 4 = 2.25 completed signs per hour on average; each sign stays whole.'},
+{parts:['8 minutes for 4 parcels: ',{box:'2'},' minutes/parcel'],why:'Time per parcel: 8 minutes ÷ 4 parcels = 2 minutes per parcel.'}
+])}],done,'Chapter practice 1 of 3')}],
+['final2','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-prices',prompt:'Calculate cost per item. The $ and units are already supplied.',build:blanks([
+{parts:['$5.40 for 6 folders: $',{box:'0.90'},' per folder'],why:'5.40 ÷ 6 = 0.90 dollars per folder.'},
+{parts:['$8.75 for 5 rolls: $',{box:'1.75'},' per roll'],why:'8.75 ÷ 5 = 1.75 dollars per roll.'},
+{parts:['$6.30 for 9 cards: $',{box:'0.70'},' per card'],why:'6.30 ÷ 9 = 0.70 dollars per card.'}
+])}],done,'Chapter practice 2 of 3')}],
+['final3','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[
+{id:'p-compare',prompt:'Identical pencils, no extra charges: A has 8 for $3.20; B has 10 for $4.50. Which has the lower cost per pencil?',build:choice(['Pack A: $0.40 per pencil','Pack B: $0.45 per pencil','Equal unit prices'],0,'A: $3.20 ÷ 8 = $0.40 per pencil, less than B at $0.45.',['','More pencils does not guarantee a lower unit price. Compare $0.40 with $0.45.','The unit prices differ: $0.40 and $0.45.'])},
+{id:'p-average',prompt:'A potter finishes 5 whole pots in 2 hours. What does 2.5 pots/hour mean?',build:choice(['Every hour must end with half a pot completed','An average: 5 completed pots divided by 2 hours','The potter completed only 2 whole pots'],1,'An average of 2.5 pots/hour summarizes five whole completed pots in two hours.',['The average is total completed pots divided by total time; no completed pot is cut in half.','','There were five completed pots, not two.'])}
+],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 62ae086..2b8cf0e 100644
--- a/site/math-notebook/index.html
+++ b/site/math-notebook/index.html
@@ -230,7 +230,7 @@ main#contents { padding-bottom: 80px; }
// 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], ['Subtracting Positive and Negative Numbers', 13], ['Multiplying and Dividing Positive and Negative Numbers', 14], ['Inequalities', 10]]],
- ['Ratios, Proportions, and Percents', [['Ratios', 9]]],
+ ['Ratios, Proportions, and Percents', [['Ratios', 9], ['Unit Rate and Unit Price', 10]]],
];
const HUES = ['#f4a48c', '#86c9e8', '#f3c95c', '#e8a0c8', '#8fd6b0', '#bba8ee', '#f0b45a'];
const id = n => 'ch' + String(n).padStart(2, '0');