Formula cards • chemistry balancing lesson — Have learners count each element on both sides of a supplied equation, change coefficients while retaining substance formulas, and explain…

HTML for this example

Select the code and use your copy shortcut. Changes in this preview are temporary.

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Formula cards • chemistry balancing lesson</title><style>*{box-sizing:border-box}body{margin:0;background:var(--bg,#f3f7fa);color:var(--ink,#203342);font:16px/1.55 system-ui,Segoe UI,sans-serif}main{max-width:1100px;margin:auto;padding:28px 30px 50px}h1{font-size:clamp(27px,3.5vw,40px);line-height:1.18;letter-spacing:-.035em;margin:8px 0 12px}h2{font-size:21px;line-height:1.35;margin:0 0 16px}h3{font-size:18px}.eyebrow{color:var(--accent,#176783);font-size:12px;letter-spacing:.12em;font-weight:800;text-transform:uppercase}.intro,.muted,small{color:#516272}.intro{margin:0 0 24px}.panel{padding:24px;border:1px solid var(--line,#d6e0e7);border-radius:12px;background:white;margin:18px 0}.grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.grid>*{min-width:0}.controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:16px 0}button,input,textarea,select{font:inherit}button{border:1px solid var(--accent,#176783);background:var(--accent,#176783);color:white;padding:10px 16px;min-height:44px;border-radius:7px;font-weight:700;cursor:pointer}button.secondary{background:white;color:var(--accent,#176783)}button[aria-pressed=true]{background:var(--tint,#e3f2f8);color:var(--ink,#203342);box-shadow:inset 0 0 0 2px var(--accent,#176783)}button:hover{filter:brightness(.96)}:focus-visible{outline:3px solid #d56b00;outline-offset:3px}label{display:block;margin:12px 0 5px;font-size:14px;font-weight:650}input:not([type=checkbox]),select,textarea{width:100%;padding:10px 12px;min-height:44px;border:1px solid #94a5b2;background:white;color:inherit;border-radius:7px}textarea{resize:vertical;min-height:120px}input[type=checkbox]{width:20px;height:20px;margin-right:9px}label.inline{display:flex;align-items:center;font-weight:500;gap:7px}.result{padding:24px;background:var(--tint,#e3f2f8);border:1px solid var(--line,#c8dce7);border-radius:12px}.big{font-size:clamp(30px,5vw,48px);font-weight:780;line-height:1.25;letter-spacing:-.035em;margin:10px 0}.trace{font:15px/1.7 ui-monospace,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.error{color:#a12820;font-weight:650;min-height:24px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:15px}th,td{text-align:left;border-bottom:1px solid var(--line,#d6e0e7);padding:12px 9px;vertical-align:top}th{font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:#516272}code,pre,.code{font:14px/1.65 ui-monospace,Consolas,monospace}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--tint,#eef3f7);padding:16px;border-radius:6px}details{border-top:1px solid var(--line,#d6e0e7);margin:24px 0;padding-top:16px}summary{cursor:pointer;font-weight:700;min-height:44px}footer{border-top:1px solid var(--line,#d6e0e7);margin-top:26px;padding-top:16px;font-size:13px;color:#516272}.bar{height:16px;background:#dce4ea;border-radius:20px;overflow:hidden;margin:12px 0}.bar span{display:block;height:100%;background:var(--accent,#176783)}[hidden]{display:none!important}@media(max-width:720px){main{padding:20px}.grid{grid-template-columns:1fr;gap:12px}.panel,.result{padding:20px}}@media(max-width:400px){main{padding:16px}.panel,.result{padding:16px}button{padding:10px 13px}} .sheet{background:white;padding:28px;border:1px solid var(--line,#d6e0e7)}.note{padding:16px;border-left:4px solid var(--accent,#176783);background:var(--tint,#e3f3fa)}.badge{display:inline-block;padding:5px 11px;border-radius:22px;background:var(--tint,#e3f3fa);font-size:13px;font-weight:700}.preview{white-space:pre-wrap;overflow-wrap:anywhere}.schedule-row{display:grid;grid-template-columns:1fr 100px 100px;gap:14px;align-items:center;border-bottom:1px solid var(--line,#d6e0e7);padding:12px 0}.schedule-row label{margin:0}.schedule-row small{display:block}.export textarea{min-height:200px}h2,h3,p,td,button{overflow-wrap:anywhere}.grid>*{min-width:0}@media(max-width:720px){.sheet{padding:20px}.schedule-row{grid-template-columns:1fr 80px}.schedule-row .range{grid-column:1/3}}@media(max-width:400px){.sheet{padding:16px}}
body{--accent:#226b70;--tint:#e6f5f1;--bg:#f2f8f6;--ink:#213f43;--line:#c4dcd7}.formula-board{padding:25px;background:white;border:2px solid #abcfc8;border-radius:15px}.equation{display:grid;grid-template-columns:1fr 25px 1fr 25px 1fr;gap:12px}.formula-piece>strong{display:block;text-align:center;font-size:32px;margin:12px 0}.formula-piece label{font-size:12px}.formula-piece input{text-align:center;font-weight:750}.operator{align-self:center;font-size:26px}.groups{display:flex;flex-wrap:wrap;gap:6px;min-height:48px}.atom-group{display:inline-flex;padding:5px;gap:3px;border:1px solid #abc7bd;border-radius:4px;background:#f3f8f5}.atom{display:inline-block;padding:0 4px;background:#e2edf1;border-radius:3px;font-size:12px;font-weight:800}.atom-O{background:#fae2d5;color:#81361c}.tally-result{display:grid;grid-template-columns:1fr 1.2fr;gap:20px;border-top:1px solid #c4dcd7;padding-top:16px}.tally-result #tally{font-size:24px;font-weight:750}.formula{font-size:21px}.audit-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.audit-case{padding:16px;background:#f4f8f6;border-top:3px solid #749c8f}.audit-case p{min-height:55px}.transfer-inputs{grid-template-columns:repeat(3,1fr)}@media(max-width:720px){.tally-result{grid-template-columns:1fr;gap:0}.audit-grid{grid-template-columns:1fr}.audit-case p{min-height:0}.formula-board{padding:17px}.equation{gap:7px;grid-template-columns:1fr 15px 1fr 15px 1fr}.formula-piece>strong{font-size:24px}.operator{font-size:20px}.atom-group{padding:3px;gap:1px}.atom{padding:0 2px}}</style></head><body><main>
<header><span class="eyebrow">Paper formula lab / learner activity</span><h1>Change the count. Keep the formula.</h1><p class="intro">Use whole copies of the supplied formula cards to balance H₂ + O₂ → H₂O.</p></header>
<div class="controls"><button type="button" id="learner-tab" class="secondary">Learner workbench</button><button type="button" id="teacher-tab" class="secondary">Teacher plan & key</button></div>
<section id="learner-view"><section class="formula-board"><div class="equation"><div class="formula-piece"><label for="coefficient-0">H₂ coefficient</label><input id="coefficient-0" type="number" value="1"><strong>H<sub>2</sub></strong><div id="groups-0" class="groups"></div></div><span class="operator" aria-hidden="true">+</span><div class="formula-piece"><label for="coefficient-1">O₂ coefficient</label><input id="coefficient-1" type="number" value="1"><strong>O<sub>2</sub></strong><div id="groups-1" class="groups"></div></div><span class="operator" aria-hidden="true">→</span><div class="formula-piece"><label for="coefficient-2">H₂O coefficient</label><input id="coefficient-2" type="number" value="1"><strong>H<sub>2</sub>O</strong><div id="groups-2" class="groups"></div></div></div><div class="controls"><button type="button" id="count">Count this attempt</button><button type="button" id="retain" class="secondary">Retain attempt</button><button type="button" id="reset" class="secondary">Reset workbench</button></div><p id="coefficient-error" class="error" role="alert"></p><div class="tally-result"><div><span class="eyebrow">Atom tally / left : right</span><p id="tally" aria-live="polite"></p></div><div><b id="balance-state"></b><p id="count-feedback"></p></div></div></section>
<section class="panel"><h2>Keep the reasoning trail</h2><p>“Retain attempt” adds the current validated equation and counts. Later edits do not replace earlier entries.</p><ol id="history"></ol><label for="reason">Your reason for a correction / support used</label><textarea id="reason"></textarea><small>Only your explicit entries become local learner work. The initial 1/1/1 display is a starting illustration.</small></section>
<section class="panel"><h2>Audit a count and an identity</h2><div class="audit-grid"><article class="audit-case"><b>Case 1</b><p class="formula">H₂ + O₂ → 2H₂O</p><label for="verdict-0">Your audit verdict</label><select id="verdict-0"><option value="">Choose a reason</option><option>Unequal atom counts</option><option>Changed assigned formula</option><option>Balanced; reducible ratio</option></select><div class="controls"><button type="button" id="audit-0">Check case 1</button></div><p id="audit-feedback-0" aria-live="polite">Not checked.</p></article><article class="audit-case"><b>Case 2</b><p class="formula">H₂ + O₂ → H₂O₂</p><label for="verdict-1">Your audit verdict</label><select id="verdict-1"><option value="">Choose a reason</option><option>Unequal atom counts</option><option>Changed assigned formula</option><option>Balanced; reducible ratio</option></select><div class="controls"><button type="button" id="audit-1">Check case 2</button></div><p id="audit-feedback-1" aria-live="polite">Not checked.</p></article><article class="audit-case"><b>Case 3</b><p class="formula">4H₂ + 2O₂ → 4H₂O</p><label for="verdict-2">Your audit verdict</label><select id="verdict-2"><option value="">Choose a reason</option><option>Unequal atom counts</option><option>Changed assigned formula</option><option>Balanced; reducible ratio</option></select><div class="controls"><button type="button" id="audit-2">Check case 3</button></div><p id="audit-feedback-2" aria-live="polite">Not checked.</p></article></div></section>
<section class="panel"><h2>Transfer: N₂ + H₂ → NH₃</h2><p>Enter coefficients independently. The formula labels stay fixed.</p><div class="grid transfer-inputs"><div><label for="transfer-0">N₂ coefficient</label><input id="transfer-0" type="number" value=""></div><div><label for="transfer-1">H₂ coefficient</label><input id="transfer-1" type="number" value=""></div><div><label for="transfer-2">NH₃ coefficient</label><input id="transfer-2" type="number" value=""></div></div><div class="controls"><button type="button" id="transfer-check">Check transfer counts</button></div><p id="transfer-result" aria-live="polite">No transfer attempt supplied.</p><p id="transfer-error" class="error" role="alert"></p><label for="exit">Why do matching totals not justify changing H₂O to H₂O₂?</label><textarea id="exit"></textarea><p>Teacher reviews your explanation; a tally does not establish independent mastery.</p></section>
<details><summary>Clean learner worksheet / no teacher answers</summary><label for="learner-copy">Plain-text blank worksheet</label><textarea id="learner-copy" readonly>PAPER-ONLY BALANCING WORKSHEET
Fixed target: ___ H2 + ___ O2 -&gt; ___ H2O
Keep the formulas fixed. Change coefficients only.
Earlier attempt: ______ / H left-right ___ / O left-right ___
Correction: ______ / H left-right ___ / O left-right ___
Reason for correction and support used: ______
Audit cases: H2 + O2 -&gt; 2H2O; H2 + O2 -&gt; H2O2; 4H2 + 2O2 -&gt; 4H2O.
Check atom counts, assigned formulas, then smallest whole-number ratio.
Transfer: ___ N2 + ___ H2 -&gt; ___ NH3 / N left-right ___ / H left-right ___
Exit: Why do equal totals not justify changing H2O to H2O2? ______
Actual explanation / teacher support: ______</textarea><button type="button" id="select-learner" class="secondary">Select learner worksheet</button><small>Copy manually. No teacher key appears in this text.</small></details></section>
<section id="teacher-view" hidden><article class="sheet"><span class="eyebrow">Teacher reference / separate key</span><h2>Counts, identities, then ratio</h2><div class="table-wrap"><table><thead><tr><th>Reference attempt</th><th>H left / right</th><th>O left / right</th><th>Audit</th></tr></thead><tbody><tr><td>H₂ + O₂ → H₂O</td><td>2 / 2</td><td>2 / 1</td><td>Oxygen differs.</td></tr><tr><td>H₂ + O₂ → 2H₂O</td><td>2 / 4</td><td>2 / 2</td><td>Hydrogen differs.</td></tr><tr><td>2H₂ + O₂ → 2H₂O</td><td>4 / 4</td><td>2 / 2</td><td>Fixed formulas, simplest ratio 2, 1, 2.</td></tr><tr><td>H₂ + O₂ → H₂O₂</td><td>2 / 2</td><td>2 / 2</td><td>Product changed to hydrogen peroxide; not the assigned water.</td></tr><tr><td>4H₂ + 2O₂ → 4H₂O</td><td>8 / 8</td><td>4 / 4</td><td>Balanced. Divide all coefficients by 2.</td></tr></tbody></table></div><p><b>Transfer key:</b> N₂ + 3H₂ → 2NH₃; N 2/2, H 6/6; ratio 1, 3, 2.</p><p>Exit reasoning must identify changed substance identity; “the numbers are wrong” alone needs follow-up. Record actual words and support separately.</p></article><section class="panel"><h2>Editable teaching sequence</h2><b id="total" aria-live="polite"></b><label for="budget">Available planned minutes</label><input id="budget" type="number" value="45"><div class="schedule-row"><div><b>Diagnose</b><small>Display the fixed target; tally each element and name a concern.</small></div><div><label for="minutes-0">Minutes</label><input id="minutes-0" type="number" value="5"></div><b class="range" id="range-0"></b></div><div class="schedule-row"><div><b>Model whole groups</b><small>Duplicate H₂O cards; explain coefficient × subscript.</small></div><div><label for="minutes-1">Minutes</label><input id="minutes-1" type="number" value="8"></div><b class="range" id="range-1"></b></div><div class="schedule-row"><div><b>Paper-card balance</b><small>Keep formulas fixed; retain earlier attempt, correction and reason.</small></div><div><label for="minutes-2">Minutes</label><input id="minutes-2" type="number" value="12"></div><b class="range" id="range-2"></b></div><div class="schedule-row"><div><b>Partner error audit</b><small>Check unequal counts, changed product and reducible ratio separately.</small></div><div><label for="minutes-3">Minutes</label><input id="minutes-3" type="number" value="10"></div><b class="range" id="range-3"></b></div><div class="schedule-row"><div><b>Independent transfer</b><small>N₂ + H₂ → NH₃: supply coefficients and N/H tally.</small></div><div><label for="minutes-4">Minutes</label><input id="minutes-4" type="number" value="6"></div><b class="range" id="range-4"></b></div><div class="schedule-row"><div><b>Exit explanation</b><small>Why do equal counts not justify changing H₂O to H₂O₂?</small></div><div><label for="minutes-5">Minutes</label><input id="minutes-5" type="number" value="4"></div><b class="range" id="range-5"></b></div><p id="schedule-error" class="error" role="alert"></p></section><label for="class-context">Class level / required standard / access needs (teacher to confirm)</label><input id="class-context" type="text" value=""><section class="panel export"><h2>Manual-copy teacher plan</h2><div class="controls"><button type="button" id="prepare">Prepare text</button><button type="button" id="select-text" class="secondary">Select text</button></div><p id="export-error" class="error" role="alert"></p><label for="export-text">Generated plain text</label><textarea id="export-text" readonly></textarea><small>Select text, then copy manually. Nothing is saved or sent.</small></section></section>
<footer>Paper-only symbolic accounting companion, not an experiment or chemistry runtime. Atom labels show counts, not molecular geometry or bond energy. No handling, gas generation or combustion instructions. Balance alone does not establish reaction conditions, rate, yield or learning results. No edits or learner records are saved; school-required materials remain authoritative.</footer>
</main><script>const $=id=>document.getElementById(id);const on=(id,e,fn)=>$(id).addEventListener(e,fn);const txt=(id,v)=>$(id).textContent=v;const esc=s=>String(s).replace(/[&<>"']/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));const positive=x=>String(x).trim()!==''&&Number.isFinite(Number(x))&&Number(x)>0;const num=x=>Number(x.toPrecision(10)).toString();function enter(id,fn){on(id,'keydown',e=>{if(e.key==='Enter'&&!e.isComposing&&e.keyCode!==229){e.preventDefault();fn()}})}function selectText(id){$(id).focus();$(id).select()}
function isoDay(s){if(!/^\d{4}-\d{2}-\d{2}$/.test(s))throw Error('Use a real calendar date as YYYY-MM-DD.');const d=new Date(s+'T00:00:00Z');if(!Number.isFinite(d.getTime())||d.toISOString().slice(0,10)!==s)throw Error('Use a real calendar date as YYYY-MM-DD.');return d.getTime()/86400000}


const phases=['Diagnose','Model whole groups','Paper-card balance','Partner error audit','Independent transfer','Exit explanation'];let current=null,attempts=[];
function coefficient(s){if(!/^\d+$/.test(s)||!Number.isSafeInteger(Number(s))||Number(s)<1||Number(s)>24)throw Error('Enter a positive whole coefficient from 1 to 24.');return Number(s)}
function gcd(a,b){while(b){const t=b;b=a%b;a=t}return a}
function atomCount(values,kind){const [a,b,c]=values;if(kind==='water')return {first:[2*a,2*c],second:[2*b,c],elements:['H','O']};if(kind==='transfer')return {first:[2*a,c],second:[2*b,3*c],elements:['N','H']};throw Error('Unsupported fixed equation.')}
function describe(values,kind){const t=atomCount(values,kind),balanced=t.first[0]===t.first[1]&&t.second[0]===t.second[1],factor=gcd(gcd(values[0],values[1]),values[2]);return {...t,balanced,factor,ratio:values.map(v=>v/factor)}}
function pending(){current=null;txt('tally','Pending current coefficients');txt('balance-state','Recount after edits');txt('count-feedback','');txt('coefficient-error','');for(let i=0;i<3;i++)$('groups-'+i).innerHTML=''}
function count(){try{const values=[0,1,2].map(i=>coefficient($('coefficient-'+i).value)),r=describe(values,'water');current={values,...r};txt('tally','H '+r.first[0]+' : '+r.first[1]+' · O '+r.second[0]+' : '+r.second[1]);txt('balance-state',r.balanced?(r.factor===1?'Balanced · simplest ratio':'Balanced · reducible ratio'):'Not balanced');txt('count-feedback',r.balanced?(r.factor===1?'Both element counts match; supplied formulas stay fixed.':'Counts match. Divide every coefficient by '+r.factor+' to obtain '+r.ratio.join(', ')+'.'):r.first[0]!==r.first[1]?'Hydrogen differs. A whole water card contains two H atoms.':'Oxygen differs. Each O₂ card contains two O atoms; each H₂O card contains one.');for(let i=0;i<3;i++){const atoms=i===0?['H','H']:i===1?['O','O']:['H','H','O'];$('groups-'+i).innerHTML=Array.from({length:values[i]},()=>'<span class="atom-group">'+atoms.map(a=>'<span class="atom atom-'+a+'">'+a+'</span>').join('')+'</span>').join('')}txt('coefficient-error','');return true}catch(e){pending();txt('tally','No accepted tally');txt('coefficient-error',e.message);return false}}
function equation(v){return v[0]+'H₂ + '+v[1]+'O₂ → '+v[2]+'H₂O'}
on('count','click',count);for(let i=0;i<3;i++){on('coefficient-'+i,'input',pending);enter('coefficient-'+i,count)}
on('retain','click',()=>{if(!current&&!count())return;const item={values:[...current.values],h:[...current.first],o:[...current.second]};attempts.push(item);$('history').innerHTML=attempts.map((x,i)=>'<li><b>Attempt '+(i+1)+': '+equation(x.values)+'</b> · H '+x.h.join('/')+'; O '+x.o.join('/')+'</li>').join('')});
const auditAnswers=['Unequal atom counts','Changed assigned formula','Balanced; reducible ratio'],auditReasons=['H 2/4; O 2/2. Hydrogen differs.','H 2/2; O 2/2, but H₂O₂ is hydrogen peroxide, not the assigned H₂O product.','H 8/8; O 4/4. This is balanced; divide 4, 2, 4 by 2 to obtain 2, 1, 2.'];
for(let i=0;i<3;i++){on('audit-'+i,'click',()=>{const v=$('verdict-'+i).value;if(!auditAnswers.includes(v)){txt('audit-feedback-'+i,'Choose a verdict before checking.');return}txt('audit-feedback-'+i,(v===auditAnswers[i]?'Correct condition. ':'Revisit the condition. ')+auditReasons[i])});on('verdict-'+i,'change',()=>txt('audit-feedback-'+i,'Verdict changed; check again.'))}
function transfer(){try{const v=[0,1,2].map(i=>coefficient($('transfer-'+i).value)),r=describe(v,'transfer');txt('transfer-result','N '+r.first.join(' : ')+' · H '+r.second.join(' : ')+' · '+(r.balanced?(r.factor===1?'Balanced; simplest positive whole-number ratio.':'Balanced; reduce all coefficients by '+r.factor+'.'):'Counts differ; revise coefficients without changing formulas.'));txt('transfer-error','')}catch(e){txt('transfer-result','No accepted transfer tally');txt('transfer-error',e.message)}}
on('transfer-check','click',transfer);for(let i=0;i<3;i++)on('transfer-'+i,'input',()=>{txt('transfer-result','Transfer input changed; check again.');txt('transfer-error','')});
function view(learner){$('learner-view').hidden=!learner;$('teacher-view').hidden=learner;$('learner-tab').setAttribute('aria-pressed',String(learner));$('teacher-tab').setAttribute('aria-pressed',String(!learner))}
on('learner-tab','click',()=>view(true));on('teacher-tab','click',()=>view(false));on('select-learner','click',()=>selectText('learner-copy'));
on('reset','click',()=>{for(let i=0;i<3;i++){$('coefficient-'+i).value='1';$('transfer-'+i).value='';$('verdict-'+i).value='';txt('audit-feedback-'+i,'Not checked.')}attempts=[];$('history').innerHTML='';$('reason').value='';$('exit').value='';txt('transfer-result','No transfer attempt supplied.');txt('transfer-error','');count()});
on('class-context','input',()=>{$('export-text').value='';txt('export-error','Context changed; prepare the current plan.')});
on('prepare','click',()=>{const values=timing();if(!scheduleValid){txt('export-error','Resolve the timetable before preparing the teacher plan.');return}$('export-text').value='PAPER-ONLY CHEMISTRY TEACHER PLAN\n'+phases.map((p,i)=>p+': '+values[i]+' min').join('\n')+'\nFixed formulas: H2 + O2 -> H2O. Coefficients duplicate whole formula cards; subscripts retain substance identity.\nTeacher key: 2H2 + O2 -> 2H2O; H4/4, O2/2. Doubled 4/2/4 is balanced, reducible by2. H2O2 changes the specified product even when counts match.\nTransfer key: N2 + 3H2 -> 2NH3; N2/2, H6/6.\nContext/standard/access: '+($('class-context').value||'TO CONFIRM')+'\nMaterials: paper formula cards, learner sheet, writing materials; availability TO CONFIRM.\nActual earlier attempt ___ / correction ___ / per-element tally ___ / reason ___ / support ___ / transfer response ___ / exit explanation ___\nNo experiments or chemical handling; balance does not establish rate, yield or conditions.';txt('export-error','Teacher plan prepared; actual learner evidence remains blank.')});view(true);count();

let scheduleValid=false;
function timing(){scheduleValid=false;$('export-text').value='';txt('export-error','');try{const values=phases.map((p,i)=>{const s=$('minutes-'+i).value;if(!/^\d+$/.test(s)||!Number.isSafeInteger(Number(s))||Number(s)<1||Number(s)>240)throw Error('Enter whole minutes from 1 to 240 for every phase.');return Number(s)});const b=$('budget').value;if(!/^\d+$/.test(b)||Number(b)<1||Number(b)>1200)throw Error('Enter an available budget from 1 to 1200 whole minutes.');let at=0;values.forEach((v,i)=>{txt('range-'+i,at+'–'+(at+v)+' min');at+=v});scheduleValid=at===Number(b);txt('total',scheduleValid?at+'-minute plan ready':at+' scheduled / '+b+' available');txt('schedule-error',scheduleValid?'':'Adjust the allocations or available budget before preparing a plan.');return values}catch(e){for(let i=0;i<phases.length;i++)txt('range-'+i,'Time pending');txt('total','Timing needs input');txt('schedule-error',e.message);return null}}
for(let i=0;i<phases.length;i++)on('minutes-'+i,'input',timing);on('budget','input',timing);
on('select-text','click',()=>selectText('export-text'));
timing();</script></body></html>