Check the direction and the boundary.
HTML for this example
Select the code and use your copy shortcut. Changes in this preview are temporary.
<!doctype html>
<html lang="en-US"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Check the direction and the boundary.</title><style>:root{--paper:#f5f7fb;--ink:#23344d;--accent:#375a91;--line:#c7d3e5;--panel:#fff;--soft:#e8eef8}*{box-sizing:border-box}:root{color-scheme:light}body{margin:0;background:var(--paper);color:var(--ink);font:17px/1.65 system-ui,-apple-system,"Segoe UI",sans-serif}main{max-width:960px;margin:auto;padding:28px 24px 54px}.strap{font-weight:750;letter-spacing:.07em;font-size:16px;color:var(--accent)}header{padding:20px 0 24px;border-top:7px solid var(--accent);border-bottom:2px solid var(--line);margin-bottom:24px}h1{font:700 clamp(30px,5vw,45px)/1.2 Georgia,serif;margin:10px 0 18px;max-width:780px}h2{font:700 25px/1.35 Georgia,serif;margin:0 0 16px}h3{font-size:19px;margin:18px 0 10px}p{margin:12px 0}section{margin:24px 0;padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:8px;min-width:0}.plain section{border-radius:0;border-width:0 0 2px;padding:24px 0;background:transparent}.studio header{border-top-style:double;border-top-width:10px}.studio section{box-shadow:5px 5px 0 var(--line)}.board section{border-top:5px solid var(--accent)}.metric{font-size:clamp(26px,5vw,38px);font-weight:750;line-height:1.3}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.three{grid-template-columns:repeat(3,minmax(0,1fr))}.cell{padding:16px;background:var(--panel);border-left:4px solid var(--accent);min-width:0}.choices,.toolbar{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 18px}button,input,textarea{font:inherit}button{padding:11px 16px;min-height:46px;border:1px solid var(--accent);border-radius:6px;background:var(--panel);color:var(--accent);cursor:pointer;max-width:100%;line-height:1.4}button:hover{box-shadow:0 0 0 2px var(--line)}button[aria-pressed=true],button.primary{background:var(--accent);color:#fff}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #a25718;outline-offset:3px}label,legend{font-weight:650;display:block;margin:12px 0 7px}fieldset{border:0;padding:0;margin:16px 0;min-width:0}input,textarea{border:1px solid #6a7c7d;background:#fff;color:#182f32;padding:11px;width:100%;min-width:0;border-radius:5px}textarea{resize:vertical}.feedback{padding:16px;border-left:4px solid var(--accent);background:var(--soft);margin:18px 0;white-space:pre-line;overflow-wrap:anywhere}.note{border-left:4px solid var(--accent);padding:12px 16px;background:var(--soft)}table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:16px}th,td{text-align:left;vertical-align:top;padding:11px 8px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}th{background:var(--soft)}svg{display:block;width:100%;height:auto;max-width:540px;margin:16px auto;background:#fff}svg text{font:24px system-ui;fill:var(--ink)}footer{border-top:2px solid var(--line);margin-top:30px;padding-top:18px;font-size:16px}[hidden]{display:none!important}.sentence{font:26px/1.7 Georgia,serif;padding:16px;background:var(--soft)}.map-node{border:2px solid var(--accent);padding:16px;text-align:center;font-size:23px;background:var(--panel);max-width:460px;margin:auto}.map-link{text-align:center;padding:10px;font-weight:700}.lane{padding:18px;border:2px dashed var(--line)}@media(max-width:640px){main{padding:20px 16px 40px}.grid,.three{grid-template-columns:1fr}section{padding:18px 14px}.studio section{box-shadow:3px 3px 0 var(--line)}th,td{padding:9px 5px}}</style></head><body class=""><main><header><div class="strap">ORIGINAL WORKED EXAMPLE</div><h1>Check the direction and the boundary.</h1><p>Three fixed items. Choose a transformed statement and boundary; explain with substitution into the original.</p></header><fieldset><legend>Choose item</legend><div class="choices"><button type="button" id="item-I1" aria-pressed="false">I1 / −4x < 20</button><button type="button" id="item-I2" aria-pressed="false">I2 / −4x ≤ 20</button><button type="button" id="item-I3" aria-pressed="false">I3 / 4x < 20</button></div></fieldset><section id="I1-panel" ><h2>I1 / −4x < 20</h2><fieldset><legend>Transformed statement</legend><div class="choices"><button type="button" id="I1-transform-gt" aria-pressed="false">x > −5</button><button type="button" id="I1-transform-lt" aria-pressed="false">x < −5</button><button type="button" id="I1-transform-ge" aria-pressed="false">x ≥ −5</button><button type="button" id="I1-transform-lt5" aria-pressed="false">x < 5</button></div></fieldset><fieldset><legend>Boundary inclusion</legend><div class="choices"><button type="button" id="I1-boundary-open" aria-pressed="false">Open / excluded</button><button type="button" id="I1-boundary-closed" aria-pressed="false">Closed / included</button></div></fieldset><label for="I1-reason">Explain the division and a tested value</label><textarea id="I1-reason" rows="3"></textarea><button type="button" id="I1-check" >Check I1</button><div id="I1-feedback" class="feedback" role="status" aria-live="polite">Not checked yet.</div><div id="I1-solution" hidden><svg viewBox="0 0 400 150" role="img" aria-label="Excluded boundary -5, solution continues right"><title>Solution continues right; boundary -5 excluded</title><path d="M40 80H360" stroke="#aab9ce" stroke-width="2"/><path d="M200 80H355 l-12 -8 m12 8 l-12 8" fill="none" stroke="#375a91" stroke-width="5"/><circle cx="200" cy="80" r="8" fill="#fff" stroke="#375a91" stroke-width="3"/><text x="200" y="125" text-anchor="middle">-5</text></svg></div></section><section id="I2-panel" hidden><h2>I2 / −4x ≤ 20</h2><fieldset><legend>Transformed statement</legend><div class="choices"><button type="button" id="I2-transform-gt" aria-pressed="false">x > −5</button><button type="button" id="I2-transform-lt" aria-pressed="false">x < −5</button><button type="button" id="I2-transform-ge" aria-pressed="false">x ≥ −5</button><button type="button" id="I2-transform-lt5" aria-pressed="false">x < 5</button></div></fieldset><fieldset><legend>Boundary inclusion</legend><div class="choices"><button type="button" id="I2-boundary-open" aria-pressed="false">Open / excluded</button><button type="button" id="I2-boundary-closed" aria-pressed="false">Closed / included</button></div></fieldset><label for="I2-reason">Explain the division and a tested value</label><textarea id="I2-reason" rows="3"></textarea><button type="button" id="I2-check" >Check I2</button><div id="I2-feedback" class="feedback" role="status" aria-live="polite">Not checked yet.</div><div id="I2-solution" hidden><svg viewBox="0 0 400 150" role="img" aria-label="Included boundary -5, solution continues right"><title>Solution continues right; boundary -5 included</title><path d="M40 80H360" stroke="#aab9ce" stroke-width="2"/><path d="M200 80H355 l-12 -8 m12 8 l-12 8" fill="none" stroke="#375a91" stroke-width="5"/><circle cx="200" cy="80" r="8" fill="#375a91" stroke="#375a91" stroke-width="3"/><text x="200" y="125" text-anchor="middle">-5</text></svg></div></section><section id="I3-panel" hidden><h2>I3 / 4x < 20</h2><fieldset><legend>Transformed statement</legend><div class="choices"><button type="button" id="I3-transform-gt" aria-pressed="false">x > −5</button><button type="button" id="I3-transform-lt" aria-pressed="false">x < −5</button><button type="button" id="I3-transform-ge" aria-pressed="false">x ≥ −5</button><button type="button" id="I3-transform-lt5" aria-pressed="false">x < 5</button></div></fieldset><fieldset><legend>Boundary inclusion</legend><div class="choices"><button type="button" id="I3-boundary-open" aria-pressed="false">Open / excluded</button><button type="button" id="I3-boundary-closed" aria-pressed="false">Closed / included</button></div></fieldset><label for="I3-reason">Explain the division and a tested value</label><textarea id="I3-reason" rows="3"></textarea><button type="button" id="I3-check" >Check I3</button><div id="I3-feedback" class="feedback" role="status" aria-live="polite">Not checked yet.</div><div id="I3-solution" hidden><svg viewBox="0 0 400 150" role="img" aria-label="Excluded boundary 5, solution continues left"><title>Solution continues left; boundary 5 excluded</title><path d="M40 80H360" stroke="#aab9ce" stroke-width="2"/><path d="M200 80H45 l12 -8 m-12 8 l12 8" fill="none" stroke="#375a91" stroke-width="5"/><circle cx="200" cy="80" r="8" fill="#fff" stroke="#375a91" stroke-width="3"/><text x="200" y="125" text-anchor="middle">5</text></svg></div></section><button type="button" id="reset" >Reset all three</button><p class="note">An arrow continues beyond the picture; infinity is not a finite endpoint. Explanations need teacher review. Fixed items only; no zero-coefficient division or unrestricted solver.</p><footer>Local review only. Entries and changes stay in this open page; reload restores the example. Keep actual records in the required native document or workflow.</footer></main><script>
(()=>{'use strict';
const $=id=>document.querySelector('#'+id); const on=(id,fn,event='click')=>$(id).addEventListener(event,fn); const put=(id,text)=>{$(id).textContent=text;};
function pick(groupId,values,changed=()=>{}){let selected='';for(const value of values)on(groupId+'-'+value,()=>{selected=value;for(const v of values)$(groupId+'-'+v).setAttribute('aria-pressed',String(v===value));changed(value);});return {get:()=>selected,set:value=>{selected=value;for(const v of values)$(groupId+'-'+v).setAttribute('aria-pressed',String(v===value));}};}
function number(id,min,max,integer=false,optional=false){const raw=$(id).value.trim();if(!raw){if(optional)return null;throw Error('Enter '+$(id).getAttribute('aria-label')+' before checking.');}const n=Number(raw);if(!Number.isFinite(n)||n<min||n>max||(integer&&!Number.isInteger(n)))throw Error('Use '+(integer?'an integer':'a number')+' from '+min+' to '+max+' for '+$(id).getAttribute('aria-label')+'.');return n;}
function edit(ids,fn){for(const id of ids)on(id,fn,'input');}function blank(ids){for(const id of ids)$(id).value='';}function toggle(id,button){on(button,()=>{const e=$(id);e.hidden=!e.hidden;$(button).setAttribute('aria-expanded',String(!e.hidden));});}
const items=[["I1","−4x < 20","gt","open","x > −5","(−5, ∞)","Divide by negative −4, reverse the comparison. Boundary −5 excluded.","−6: 24 < 20 false; −5: 20 < 20 false; 1: −4 < 20 true."],["I2","−4x ≤ 20","ge","closed","x ≥ −5","[−5, ∞)","Divide by negative −4, reverse the comparison. Boundary −5 included.","−6: 24 ≤ 20 false; −5: 20 ≤ 20 true; 1: −4 ≤ 20 true."],["I3","4x < 20","lt5","open","x < 5","(−∞, 5)","Divide by positive 4, preserve the comparison. Boundary 5 excluded.","4: 16 < 20 true; 5: 20 < 20 false; 6: 24 < 20 false."]];const records={};for(const [id,equation,transform,boundary,answer,interval,reason,tests]of items){const changed=()=>{put(id+'-feedback','Choices changed. Check again.');$(id+'-solution').hidden=true;};records[id]={transform:pick(id+'-transform',['gt','lt','ge','lt5'],changed),boundary:pick(id+'-boundary',['open','closed'],changed)};edit([id+'-reason'],changed);on(id+'-check',()=>{const r=records[id];if(!r.transform.get()||!r.boundary.get()){put(id+'-feedback','Unanswered: choose a transformation and boundary.');return;}const match=r.transform.get()===transform&&r.boundary.get()===boundary;put(id+'-feedback',(match?'Matching transformation and boundary. ':'Recheck the direction or boundary. ')+answer+'; interval '+interval+'. '+reason+'\n'+tests+'\n'+(id==='I1'?'x=1 satisfies the original and contradicts x < −5. ':'')+'Teacher reviews your explanation.');$(id+'-solution').hidden=false;});}const selector=pick('item',['I1','I2','I3'],v=>{for(const [id]of items){$(id+'-panel').hidden=id!==v;put(id+'-feedback','Not checked yet.');$(id+'-solution').hidden=true;}});selector.set('I1');on('reset',()=>{for(const [id]of items){Object.values(records[id]).forEach(r=>r.set(''));blank([id+'-reason']);put(id+'-feedback','Not checked yet.');$(id+'-solution').hidden=true;$(id+'-panel').hidden=id!=='I1';}selector.set('I1');});
})();
</script></body></html>