<script>
  (function() {
    const checkboxes = document.querySelectorAll('input[name="options[]"]');
    const diagnosticButton = document.getElementById('diagnostic-button');

    function updateButtonState() {
      const anyChecked = Array.from(checkboxes).some(cb => cb.checked);
      diagnosticButton.disabled = !anyChecked;
    }

    checkboxes.forEach(checkbox => {
      checkbox.addEventListener('change', updateButtonState);
    });

    updateButtonState();
  })();
</script>
