Four more portions. Only the affected lines.
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>Four more portions. Only the affected lines.</title><style>*{box-sizing:border-box}body{margin:0;background:#f3f4f2;color:#202c32;font:16px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}main{max-width:1120px;margin:auto;padding:30px 28px 60px}header{margin-bottom:22px}.eyebrow{font-size:12px;letter-spacing:.14em;text-transform:uppercase;font-weight:750;color:#59676b}h1{font-size:clamp(25px,4vw,36px);line-height:1.15;letter-spacing:-.035em;margin:7px 0 10px}h2{font-size:21px;line-height:1.3;margin:0 0 16px}h3{font-size:17px;margin:0 0 10px}p{margin:8px 0 16px}label{display:block;font-size:14px;font-weight:650;margin:12px 0 5px}input,select,textarea,button{font:inherit}input,select,textarea{width:100%;min-width:0;border:1px solid #b6c0bf;border-radius:7px;background:#fff;color:#202c32;padding:10px 12px}textarea{resize:vertical;min-height:88px}input[type=checkbox]{width:18px;height:18px;vertical-align:middle;margin-right:8px}button{border:1px solid #b8c3c1;border-radius:7px;padding:10px 15px;background:#fff;color:#203632;font-weight:650;cursor:pointer}button.primary{background:#243f3c;color:white;border-color:#243f3c}button:hover{filter:brightness(.95)}button:disabled{opacity:.48;cursor:not-allowed}:focus-visible{outline:3px solid #b05814;outline-offset:3px}.buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.panel{background:#fff;border:1px solid #d7ddda;border-radius:12px;padding:24px}.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:22px}.row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.result{background:#e4eee8;border:1px solid #c5d6ca;border-radius:12px;padding:28px}.big{font-size:clamp(32px,5vw,56px);font-weight:740;line-height:1.14;letter-spacing:-.04em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.muted{color:#59686a;font-size:14px}.tag{display:inline-block;background:#edf0ed;border-radius:4px;padding:3px 8px;font-size:12px;font-weight:700}.error{color:#9d301b;font-weight:650;min-height:24px;margin-top:10px}.note{border-left:3px solid #9a794a;padding:10px 15px;background:#faf5e9;margin:18px 0}.below{margin-top:28px}.record{white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;background:#f2f4f1;padding:18px;border-radius:8px}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;vertical-align:top;border-bottom:1px solid #dce1dd;padding:12px 10px;overflow-wrap:anywhere}th{color:#59686a;font-size:12px}a{color:#2c5a6a;overflow-wrap:anywhere}details{margin-top:20px}summary{cursor:pointer;font-weight:650}hr{border:0;border-top:1px solid #d6dcd6;margin:22px 0}[hidden]{display:none!important}ol,ul{padding-left:23px}.statline{display:flex;gap:20px;flex-wrap:wrap;margin:18px 0}.statline strong{display:block;font-size:24px}.inline{display:flex;align-items:center;gap:8px}.inline label{margin:0} .blank{min-height:36px;border-bottom:1px dashed #aebbb5;color:#66736d;font-size:13px;padding:8px 0}@media(max-width:720px){main{padding:22px 18px 45px}.split{grid-template-columns:1fr}.panel,.result{padding:20px}.row{gap:12px}th,td{padding:10px 6px}}@media(max-width:400px){main{padding:18px 14px 40px}.big{font-size:34px}button{padding:10px 12px}.row{grid-template-columns:1fr}.panel,.result{padding:17px}}.inline{flex-wrap:wrap}.metric{font-size:clamp(29px,4vw,44px);font-weight:750;line-height:1.2;letter-spacing:-.025em;font-variant-numeric:tabular-nums}.strip{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}.caption{font-size:13px;color:#5d6b6f}.tag.warn{background:#f7e9ce;color:#795323}.tag.good{background:#e4ebe4;color:#344f3e}pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}button[aria-pressed=true]{background:#304b51;color:white}.fieldNote{font-size:13px;color:#5e6a6d;margin:5px 0}.three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.docHeader{display:flex;gap:24px;justify-content:space-between;align-items:start;flex-wrap:wrap;border-bottom:2px solid #445a58;padding-bottom:20px}.docHeader h2{margin:0}.money{font-variant-numeric:tabular-nums;white-space:nowrap}.statusBand{padding:17px 22px;border-radius:8px;background:#f5ead5;color:#654c2c;font-weight:650}.statusBand p{font-size:14px;font-weight:400;margin:5px 0 0}.blankLine{border-bottom:1px dashed #b6bfb8;min-height:38px}.evidenceRow{display:grid;grid-template-columns:1fr 1fr;gap:18px;border-top:1px solid #dce1dc;padding:18px 0}.checklabel{font-weight:400;margin:10px 0}.subtle{background:#f4f6f3}.downloadStatus{font-size:13px;min-height:22px;color:#49645a}@media(max-width:650px){.three{grid-template-columns:1fr}.evidenceRow{grid-template-columns:1fr}.metric{font-size:32px}}.quoteSummary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:24px;background:#e8eee6;border:1px solid #cad6c4;border-radius:12px}.quoteSummary .metric{margin-top:10px}.deadlines{border-top:1px solid #cbd3c8;padding:22px 0}.deadlines h2{font-size:19px;margin-top:8px}@media(max-width:650px){.quoteSummary{grid-template-columns:1fr;gap:18px}.quoteSummary>div{display:flex;align-items:center;justify-content:space-between;gap:15px}.quoteSummary .eyebrow{max-width:125px}.quoteSummary .metric{font-size:29px;margin:0}}</style></head><body><main><header><div class="eyebrow">Catering quote · Fictional lunch · October 23, 2026</div><h1>Four more portions. Only the affected lines.</h1></header>
<section class="quoteSummary"><div><span class="eyebrow">Original · 16 portions</span><div class="metric">$460.00</div></div><div><span class="eyebrow">Conditional revised subtotal</span><div class="metric" id="total">$532.00</div></div><div><span class="eyebrow">Change in known charges</span><div class="metric" id="delta">+$72.00</div></div></section><p class="caption">Illustrative scenario assumes the same authorized menu, staffing and fixed delivery; actual provider reconfirmation is pending.</p>
<section class="panel"><div class="strip"><h2>Mixed-unit quote</h2><span class="tag">Service 12:00–13:00 UTC</span></div><table><thead><tr><th>Charge and pricing unit</th><th>Original</th><th>Scenario</th></tr></thead><tbody><tr><td>Meal portions · $18 each</td><td>16 × $18 = $288</td><td id="mealLine">20 × $18 = $360</td></tr><tr><td>Staffing · $22 per staff-hour</td><td>2 × 3 h = 6 staff-hours<br>$132</td><td id="staffLine">2 × 3 h = 6 staff-hours<br>$132</td></tr><tr><td>Delivery · one fixed service</td><td>$40</td><td id="deliveryLine">$40</td></tr></tbody></table><p class="muted">Known subtotals exclude unconfirmed tax and additional charges. No final payable amount or booking is established.</p></section>
<form id="form" class="panel below" novalidate><h2>Review a headcount change</h2><div class="three"><div><label for="portions">Revised meal portions</label><input id="portions" value="20" inputmode="numeric"></div><div><label for="staff">Staff members</label><input id="staff" value="2" inputmode="numeric"></div><div><label for="hours">Hours per staff member</label><input id="hours" value="3" inputmode="decimal"></div></div><div class="row"><div><label for="delivery">Fixed delivery (USD)</label><input id="delivery" value="40" inputmode="decimal"></div><div><label for="reason">Reason for any staffing/delivery change</label><input id="reason" placeholder="Required if these services change"></div></div><label for="assumption"><input type="checkbox" id="assumption" checked>Use the same menu and stated service scope as a scenario assumption.</label><div class="buttons"><button type="submit" class="primary">Calculate scenario</button><button id="restore" type="button">Restore 20-portion example</button></div><p id="feedback" class="error" role="status"></p></form>
<section class="below three deadlines"><div><span class="eyebrow">Offer valid until</span><h2>October 16, 2026</h2></div><div><span class="eyebrow">Final count due</span><h2>October 19, 2026</h2></div><div><span class="eyebrow">Lunch event</span><h2>October 23, 2026</h2></div></section>
<section class="panel below"><h2>Provider confirmations</h2><div class="row"><div><label for="menu">Authorized menu reference</label><input id="menu" placeholder="AUTHORIZED MENU TO BE SUPPLIED"></div><div><label for="venue">Venue, tables and arrangements</label><input id="venue" placeholder="VENUE TO CONFIRM"></div><div><label for="capacity">Actual capacity / staffing reconfirmation</label><input id="capacity" placeholder="TO CONFIRM with provider"></div><div><label for="terms">Tax, additional charges, booking/payment terms</label><input id="terms" placeholder="TO CONFIRM"></div></div><label for="acceptance">Actual acceptance reference</label><input id="acceptance"><p class="muted">The final-count deadline does not extend the offer window. Confirm the actual event time zone and service/delivery inclusions. Dietary and allergen requests and the provider response must come from the parties; this example supplies no food-suitability assurance.</p><a href="https://docelf.com/quote-template/catering">Mixed quantities and headcount revision reference</a></section><footer class="muted below">Local review copy · Edits last only while this page is open.</footer></main><script data-app>
(()=>{
const $=id=>document.getElementById(id);const text=(id,v)=>$(id).textContent=String(v);const on=(id,type,fn)=>$(id).addEventListener(type,fn);const escapeHTML=s=>String(s).replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));const money=n=>'$'+(n/100).toFixed(2);const quantity=(s,integer=false)=>{s=String(s).trim();if(!(integer?/^[0-9]+$/:/^[0-9]+(?:[.][0-9]{1,2})?$/).test(s)||!Number.isFinite(+s)||+s>100000)throw Error('Enter a nonnegative '+(integer?'whole number':'number with at most two decimals')+' up to 100,000. Blank is missing.');return +s};const cents=s=>Math.round(quantity(s)*100);const download=(filename,content,type='text/plain')=>{const url=URL.createObjectURL(new Blob([content],{type})),a=document.createElement('a');a.href=url;a.download=filename;document.body.append(a);a.click();a.remove();setTimeout(()=>URL.revokeObjectURL(url),1000)};
function calculateQuote(p,s,h,d){if(!Number.isInteger(p)||!Number.isInteger(s)||[p,s,h,d].some(x=>!Number.isFinite(x)||x<0))throw Error('Quantities must be finite and nonnegative; portions and people are whole counts.');const meals=p*1800,staffHours=s*h,staffing=Math.round(staffHours*2200),delivery=Math.round(d*100);return {meals,staffHours,staffing,delivery,total:meals+staffing+delivery,delta:meals+staffing+delivery-46000}}
function clear(){['total','delta','mealLine','staffLine','deliveryLine'].forEach(id=>text(id,'—'));text('feedback','Inputs changed. Calculate the scenario again.')}
function update(){clear();try{const p=quantity($('portions').value,true),s=quantity($('staff').value,true),h=quantity($('hours').value),d=quantity($('delivery').value);if(!$('assumption').checked)throw Error('The menu and service scope need a new provider specification before this scenario can be priced.');if((s!==2||h!==3||d!==40)&&!$('reason').value.trim())throw Error('Name the reason for the staffing or delivery change.');const r=calculateQuote(p,s,h,d);text('total',money(r.total));text('delta',(r.delta>=0?'+':'−')+money(Math.abs(r.delta)));text('mealLine',p+' × $18 = '+money(r.meals));text('staffLine',s+' × '+h+' h = '+r.staffHours+' staff-hours; '+money(r.staffing));text('deliveryLine',money(r.delivery));text('feedback','Conditional calculation only. Provider capacity and scope reconfirmation remain pending.')}catch(e){text('feedback',e.message)}}
on('form','submit',e=>{e.preventDefault();update()});['portions','staff','hours','delivery','reason','assumption'].forEach(id=>on(id,'input',clear));on('restore','click',()=>{$('portions').value='20';$('staff').value='2';$('hours').value='3';$('delivery').value='40';$('reason').value='';$('assumption').checked=true;update()});window.app={calculateQuote,update};update();
})();
</script>
<script>
// Local calculation controls: no native form submission or sandbox permissions required.
(()=>{const form=document.getElementById('form');if(!form)throw Error('Calculation form missing');const dispatch=()=>form.dispatchEvent(new Event('submit',{bubbles:true,cancelable:true}));const buttons=[...form.querySelectorAll('button')].filter(button=>button.type==='submit');if(buttons.length!==1)throw Error('Expected one calculation control');for(const button of buttons){button.type='button';button.addEventListener('click',dispatch);}form.addEventListener('keydown',event=>{if(event.key==='Enter'&&!event.isComposing&&['INPUT','SELECT'].includes(event.target.tagName)){event.preventDefault();dispatch();}});})();
</script>
</body></html>