Sustainable & Ethical Health Choices Guide

Answer two simple questions to generate a personalized guide for making healthier, more conscious choices.

Important Disclaimer

This guide provides general information and is for educational purposes only. It is NOT a substitute for professional medical, nutritional, or financial advice. Always consult with a qualified professional for personalized guidance.

Step 1: What is your primary area of focus?

For ${analysisResults.focus}

${tipsHTML}
`; resultsContainer.innerHTML = resultsHTML; resultsContainer.classList.remove('hidden'); document.getElementById('download-pdf-btn').addEventListener('click', downloadPdf); resultsContainer.scrollIntoView({ behavior: 'smooth' }); } function downloadPdf() { if (!analysisResults) return; const { jsPDF } = window.jspdf; const doc = new jsPDF(); // Header doc.setFontSize(22); doc.setFont('helvetica', 'bold'); doc.text('Sustainable & Ethical Health Choices', 105, 20, { align: 'center' }); doc.setFontSize(16); doc.text(`Focus Area: ${analysisResults.focus}`, 105, 28, { align: 'center' }); let finalY = 40; analysisResults.tips.forEach(category => { if (finalY > 250) { doc.addPage(); finalY = 20; } doc.setFontSize(14); doc.setFont('helvetica', 'bold'); doc.text(category.title, 14, finalY); finalY += 7; doc.setFontSize(11); doc.setFont('helvetica', 'normal'); category.points.forEach(point => { if (finalY > 270) { doc.addPage(); finalY = 20; } const textLines = doc.splitTextToSize('• ' + point, 180); doc.text(textLines, 14, finalY); finalY += (textLines.length * 5) + 2; }); finalY += 5; }); doc.save('Sustainable-Health-Guide.pdf'); } // --- EVENT LISTENERS --- nextBtn1.addEventListener('click', () => switchStep('2')); prevBtn2.addEventListener('click', () => switchStep('1')); finishBtn.addEventListener('click', generateGuide); });
Scroll to Top