(()=>{document.querySelectorAll('.discipline-choice').forEach(card=>{const check=card.querySelector('input[type=checkbox]'),radio=card.querySelector('input[type=radio]'),remove=card.querySelector('.discipline-remove');const sync=()=>card.classList.toggle('is-selected',check.checked);check.addEventListener('change',()=>{if(!check.checked&&radio.checked)radio.checked=false;sync();});radio.addEventListener('change',()=>{if(radio.checked){check.checked=true;sync();}});remove.addEventListener('click',e=>{e.preventDefault();check.checked=false;radio.checked=false;sync();});sync();});})();
