';
}).join('');
}
function renderInsight(sp){
var esop=parseFloat(document.getElementById('inp-esop').value)||10;
var fp=(100-esop)/100;
var names=founders.map(function(f,i){return ''+esc(f.name||'Founder '+(i+1))+' ('+(sp[i]*fp*100).toFixed(1)+'%)';});
var maxGap=0;
for(var i=0;i0.25) txt+='There is a large equity gap between founders. Ensure the lower-equity co-founders have strong vesting terms and consider milestone-linked ESOP top-ups to maintain motivation through the critical early years.';
else txt+='This is a differentiated but balanced split reflecting genuine contribution differences. Use a robust vesting schedule to ensure all founders remain committed through the first 4 years.';
document.getElementById('insight-box').innerHTML=txt;
}
function updateCardPcts(sp){
var esop=parseFloat(document.getElementById('inp-esop').value)||10;
var fp=(100-esop)/100;
founders.forEach(function(f,i){
var el=document.getElementById('cfpct-'+f.id);
if(el) el.textContent=fmtPct(sp[i]*fp);
});
}
function calc(){
var sp=splits();
renderDonut(sp);
renderLegend(sp);
updateCardPcts(sp);
renderRec(sp);
renderInsight(sp);
}
renderFounders();
calc();