Diagnose. Then revise.

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>Diagnose. Then revise.</title>
<style>:root{color-scheme:light;--ink:#202b32;--muted:#52616a;--paper:#fff;--bg:#eaf0f3;--accent:#17485d;--soft:#edf5f8;--line:#cbd8de;--heading:Georgia,serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.65 system-ui,-apple-system,"Segoe UI",sans-serif}main{max-width:1040px;margin:28px auto;background:var(--paper);border:1px solid var(--line);border-radius:12px;overflow:hidden}header{padding:28px 32px;border-top:7px solid var(--accent);border-bottom:1px solid var(--line)}.kicker{color:var(--accent);margin:0 0 10px}h1{font:500 clamp(30px,5vw,46px)/1.15 var(--heading);letter-spacing:-.02em;margin:0 0 14px;max-width:850px}header p{margin:0;color:var(--muted)}.content{padding:0 32px 32px}h2{font:500 27px/1.25 var(--heading);margin:0 0 18px}h3{font-size:20px;line-height:1.35;margin:0 0 12px}p{margin:0 0 14px}p:last-child{margin-bottom:0}section{padding-top:28px;margin-top:28px;border-top:1px solid var(--line)}.hero{padding:24px;margin-top:24px;background:var(--soft);border-left:5px solid var(--accent);border-radius:4px}.hero p:first-child{font-size:21px;font-weight:650}.controls{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}button,.controls a{font:inherit;line-height:1.4;border:1px solid var(--accent);border-radius:6px;padding:12px 16px;background:var(--paper);color:var(--accent);cursor:pointer;text-decoration:none;max-width:100%}button:hover,.controls a:hover{background:var(--soft)}button[aria-pressed="true"],#check,#inspect,#rebuild,#apply{background:var(--accent);color:#fff}button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #c56412;outline-offset:3px}label{display:block;font-weight:650;margin:16px 0}input,textarea{display:block;font:inherit;line-height:1.55;color:var(--ink);background:var(--paper);border:1px solid #8297a2;border-radius:5px;padding:12px;width:100%;min-width:0;margin-top:8px}input[type="number"],input[type="date"]{max-width:320px}textarea{resize:vertical}.result{background:var(--soft);padding:18px 20px;border-left:4px solid var(--accent);font-weight:600;overflow-wrap:anywhere}.note{background:var(--soft);border:1px solid var(--line);padding:18px;border-radius:5px}.stage{padding:24px;background:var(--soft);border:1px solid var(--line);border-radius:8px}.record-list{display:grid;gap:14px;margin:20px 0}.record{padding:20px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:4px}.record p{margin-bottom:8px}.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.two-col>section{margin-top:0}.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:20px}.metrics p{font-size:16px!important;font-weight:400!important}.metrics strong{display:block;font-size:30px;font-weight:650;line-height:1.3;font-variant-numeric:tabular-nums;margin-top:8px}.timeline{list-style:none;padding:0;margin:0;counter-reset:phase}.timeline li{padding:14px 0 14px 20px;border-left:3px solid var(--accent);border-bottom:1px solid var(--line)}details{border:1px solid var(--line);border-radius:5px;padding:16px 18px;margin:20px 0}summary{cursor:pointer;font-weight:650}details[open] summary{margin-bottom:16px}dl{display:grid;grid-template-columns:1fr 1.5fr;gap:12px 20px}dt{font-weight:650}dd{margin:0}blockquote{margin:20px 0;padding:20px 24px;border-left:5px solid var(--accent);font:500 27px/1.5 var(--heading);background:var(--soft)}.expression{font-size:27px;font-weight:650;line-height:1.5;overflow-wrap:anywhere}.sample{padding:20px;background:var(--soft)}footer{padding:22px 32px;color:var(--muted);background:var(--soft);border-top:1px solid var(--line)}[hidden]{display:none!important}.sound-map{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:". ahead ." "left center right" ". behind .";gap:8px;text-align:center;padding:20px 0;border:1px dashed var(--accent);background:radial-gradient(circle,transparent 35%,var(--line) 35.3%,transparent 35.7%)}.sound-map p{margin:0;padding:12px 4px;overflow-wrap:anywhere}.map-ahead{grid-area:ahead}.map-left{grid-area:left}.map-center{grid-area:center;font-weight:700}.map-right{grid-area:right}.map-behind{grid-area:behind}.partner{background:var(--soft);padding:24px;border-radius:12px}.partner blockquote:empty{display:none}.route-tree{border-left:3px solid var(--accent);padding-left:24px;display:grid;gap:20px}.route-tree article{padding:18px;background:var(--soft);border-radius:6px}.counters{display:flex;flex-wrap:wrap;gap:8px}.counter{display:inline-flex;align-items:center;justify-content:center;border:2px solid;border-radius:50%;width:56px;height:56px;font-size:16px;font-weight:650}.counter.red{color:#882f27;background:#ffebe7;border-color:#ba5145}.counter.blue{color:#18467a;background:#e2efff;border-color:#3f71a5}.counter-stage{padding:20px;border:1px dashed var(--accent);border-radius:8px}.facts{padding-left:24px}.facts li{margin-bottom:10px}
body.spanish{--bg:#f8e9df;--accent:#8b342a;--soft:#fff0e7;--line:#e5c7b6;--ink:#3c251e}body.asset{--bg:#142632;--accent:#154e69;--soft:#eaf4f8}body.sop{--bg:#e7e8e5;--accent:#484e3f;--soft:#f4f4ed;--heading:system-ui,sans-serif}body.fundraising{--bg:#f0e9f5;--accent:#65377b;--soft:#f7effb;--line:#d9c5e3}body.outdoor{--bg:#e2e9dd;--accent:#2e5b36;--soft:#edf4e9;--line:#bdcfb6}body.about{--bg:#eef0ff;--accent:#51439a;--soft:#f2f0ff;--line:#d4cee9}body.volunteer{--bg:#f1e3d6;--accent:#824128;--soft:#fbf0e5;--line:#ddc5ad}body.event{--bg:#222735;--accent:#303a65;--soft:#edf0fa;--line:#c8cfe2;--heading:system-ui,sans-serif}body.invoice{--bg:#dfece9;--accent:#176253;--soft:#eaf6f2;--line:#bed8d0;--heading:system-ui,sans-serif}body.backlog{--bg:#e6e3ee;--accent:#59447a;--soft:#f4f0fa;--line:#d5cbe5}body.sitemap{--bg:#e5edf2;--accent:#235574;--soft:#edf5fb;--heading:system-ui,sans-serif}body.cooperative{--bg:#f3ecd8;--accent:#795c16;--soft:#fbf5e5;--line:#ddce9f}body.factoring{--bg:#102d2b;--accent:#165d4d;--soft:#e7f6ef;--heading:system-ui,sans-serif}body.ratio{--bg:#fae8da;--accent:#883b2a;--soft:#fff3e8}body.fragments{--bg:#e7e1d7;--accent:#443c31;--soft:#f5f1e9;--line:#d0c6b7}body.nouns{--bg:#eee5f4;--accent:#67417d;--soft:#f8f0fc;--line:#dbc7e5}
@media(max-width:640px){main{margin:0;border-radius:0;border-left:0;border-right:0}header{padding:24px 20px}.content{padding:0 20px 24px}footer{padding:20px}.hero,.stage,.partner{padding:18px}h1{font-size:34px}h2{font-size:26px}.two-col{grid-template-columns:1fr;gap:16px}.controls button,.controls a{flex:1 1 135px}.metrics{grid-template-columns:1fr 1fr}.hero .metrics{gap:14px}.metrics strong{font-size:27px}.sound-map{font-size:16px}.sound-map p{padding:14px 2px}.route-tree{padding-left:16px}.expression{font-size:24px}dl{grid-template-columns:1fr}blockquote{padding:16px;font-size:24px}input[type="number"],input[type="date"]{max-width:100%}}</style>
</head>
<body class="fragments"><main><header><p class="kicker">Formal-prose sentence activity · three core cards + unscored imperative</p><h1>Diagnose. Then revise.</h1></header><div class="content"><div class="hero"><p>A subject and verb do not always make an independent sentence.</p><p>Classify the fixed card. A free repair can have more than one suitable answer.</p></div><section><h2>Read the card</h2><div class="controls"><button type="button" id="f1" aria-pressed="true">F1 · because clause</button><button type="button" id="f2" aria-pressed="false">F2 · folder phrase</button><button type="button" id="c1" aria-pressed="false">C1 · courier sentence</button><button type="button" id="imperative" aria-pressed="false">Unscored imperative</button></div><blockquote id="sentence">Because the studio door was locked.</blockquote><div class="controls"><button type="button" id="fragment" aria-pressed="false">Fragment</button><button type="button" id="complete" aria-pressed="false">Complete</button><button type="button" id="check" >Check classification</button></div><p id="result" class="result" role="status" aria-live="polite">Unanswered. Choose Fragment or Complete.</p><div class="two-col"><label for="repair">Your repair or retain unchanged (teacher review)<textarea id="repair" rows="3"></textarea></label><label for="reason">Explain the grammatical evidence<textarea id="reason" rows="3"></textarea></label></div><div class="controls"><button type="button" id="reveal" >Sample repair</button><button type="button" id="reset" >Reset</button></div><p id="sample" class="sample" hidden></p></section><section><h2>Use the right criterion</h2><p>Formal-prose independence is the declared task. Journalistic and fictional style may intentionally use fragments.</p><p>F1 has a verb but is dependent; F2 lacks a main verb; C1 is already independent. Close the window. is a complete imperative with understood you.</p><p class="note">A sample repair is not an exact-string grading key. Teacher review considers grammatical and semantic suitability. No arbitrary prose checker or saved learner record.</p></section></div><footer><p>Local example only. Controls send nothing and save no changes; reloading restores the sample. Keep your revised sentence separately.</p></footer><noscript>Enable JavaScript to use this interactive example.</noscript></main>
<script>
(()=>{
'use strict';
const q=s=>document.querySelector(s);const put=(s,t)=>{q(s).textContent=t;};const on=(s,fn,event='click')=>q(s).addEventListener(event,fn);const esc=s=>String(s).replace(/[&<>"']/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));const mark=(ids,chosen)=>ids.forEach(id=>q(id).setAttribute('aria-pressed',String(id===chosen)));
const cards=[{text:'Because the studio door was locked.',key:'fragment',why:'Dependent because-clause despite subject and verb.',sample:'We waited outside because the studio door was locked. Adds an independent clause and attaches the reason.'},{text:'The blue folders beside the printer.',key:'fragment',why:'Noun phrase with no finite main verb.',sample:'The blue folders were beside the printer. Adds finite main verb were.'},{text:'The courier placed the packet on the desk.',key:'complete',why:'Independent statement: subject the courier, finite main verb placed.',sample:'Retain unchanged: The courier placed the packet on the desk.'},{text:'Close the window.',key:'complete',why:'Complete imperative with understood you as subject. Unscored challenge.',sample:'Retain unchanged: Close the window. Understood you supplies the imperative subject.'}];let card=0,choice='';function choose(i){card=i;choice='';mark(['#f1','#f2','#c1','#imperative'],['#f1','#f2','#c1','#imperative'][i]);mark(['#fragment','#complete'],'');put('#sentence',cards[i].text);put('#result','Unanswered. Choose Fragment or Complete.');q('#repair').value='';q('#reason').value='';q('#sample').hidden=true;put('#sample','');}['#f1','#f2','#c1','#imperative'].forEach((id,i)=>on(id,()=>choose(i)));['fragment','complete'].forEach(c=>on('#'+c,()=>{choice=c;mark(['#fragment','#complete'],'#'+c);put('#result','Classification changed. Check the grammatical evidence.');}));on('#check',()=>put('#result',!choice?'Unanswered. Choose Fragment or Complete.':(choice===cards[card].key?'Classification matches. ':'Revise classification. ')+cards[card].why));on('#reveal',()=>{q('#sample').hidden=false;put('#sample','One sample, not the only suitable wording: '+cards[card].sample);});['#repair','#reason'].forEach(id=>on(id,()=>put('#result','Attempt edited. Recheck classification; free repair and reason need teacher review.'),'input'));on('#reset',()=>choose(0));
})();
</script>
</body>
</html>