Questionnaire

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Root Cause Lab Match Questionnaire</title>
  <style>
    body { font-family: Arial, sans-serif; line-height: 1.6; max-width: 700px; margin: auto; padding: 20px; }
    h2 { color: #2c3e50; }
    label { display: block; margin: 10px 0; }
    button { margin-top: 20px; padding: 10px 20px; font-size: 16px; }
    #results { margin-top: 30px; background: #f4f4f4; padding: 15px; border-radius: 8px; }
  </style>
</head>
<body>

  <h1>Root Cause Lab Match Questionnaire</h1>
  <form id="labForm">

    <h2>1. What are your top 3 health concerns?</h2>
    <label><input type="checkbox" name="concern" value="fatigue"> Fatigue</label>
    <label><input type="checkbox" name="concern" value="brainfog"> Brain fog</label>
    <label><input type="checkbox" name="concern" value="sleep"> Poor sleep</label>
    <label><input type="checkbox" name="concern" value="gut"> Gut issues</label>
    <label><input type="checkbox" name="concern" value="mood"> Mood swings</label>
    <label><input type="checkbox" name="concern" value="skin"> Skin issues</label>

    <h2>2. Have you been exposed to mold or water damage?</h2>
    <label><input type="radio" name="mold" value="yes"> Yes</label>
    <label><input type="radio" name="mold" value="no"> No</label>

    <h2>3. Do you experience chemical sensitivity?</h2>
    <label><input type="radio" name="chemicals" value="yes"> Yes</label>
    <label><input type="radio" name="chemicals" value="no"> No</label>

    <h2>4. Do you have gut symptoms (bloating, gas, etc)?</h2>
    <label><input type="radio" name="gut" value="yes"> Yes</label>
    <label><input type="radio" name="gut" value="no"> No</label>

    <h2>5. Do you have sugar cravings or yeast overgrowth?</h2>
    <label><input type="radio" name="yeast" value="yes"> Yes</label>
    <label><input type="radio" name="yeast" value="no"> No</label>

    <h2>6. Do you have symptoms of burnout or poor stress tolerance?</h2>
    <label><input type="radio" name="stress" value="yes"> Yes</label>
    <label><input type="radio" name="stress" value="no"> No</label>

    <h2>7. Do you sweat easily when exercising or using a sauna?</h2>
    <label><input type="radio" name="sweat" value="yes"> Yes</label>
    <label><input type="radio" name="sweat" value="no"> No</label>

    <button type="button" onclick="getResults()">See Recommended Tests</button>
  </form>

  <div id="results"></div>

  <script>
    function getResults() {
      const concerns = [...document.querySelectorAll('input[name="concern"]:checked')].map(i => i.value);
      const mold = document.querySelector('input[name="mold"]:checked')?.value;
      const chemicals = document.querySelector('input[name="chemicals"]:checked')?.value;
      const gut = document.querySelector('input[name="gut"]:checked')?.value;
      const yeast = document.querySelector('input[name="yeast"]:checked')?.value;
      const stress = document.querySelector('input[name="stress"]:checked')?.value;
      const sweat = document.querySelector('input[name="sweat"]:checked')?.value;

      let suggestions = [];

      if (mold === 'yes' && concerns.includes('fatigue')) {
        suggestions.push("MycoTOX Profile + Organic Acids Test (OAT)");
      }
      if (chemicals === 'yes' && concerns.includes('fatigue')) {
        suggestions.push("GPL-TOX + EnviroTOX Panel");
      }
      if (gut === 'yes' || concerns.includes('gut') || yeast === 'yes') {
        suggestions.push("GI360 + Organic Acids Test (OAT)");
      }
      if (yeast === 'yes' && concerns.includes('brainfog')) {
        suggestions.push("Organic Acids Test (OAT) + HTMA");
      }
      if (stress === 'yes' && sweat === 'no') {
        suggestions.push("HTMA + Organic Acids Test (OAT)");
      }
      if (suggestions.length === 0) {
        suggestions.push("EnviroTOX Complete Panel – broad overview recommended");
      }

      document.getElementById('results').innerHTML =
        '<h2>Recommended Tests:</h2><ul><li>' + suggestions.join('</li><li>') + '</li></ul>';
    }
  </script>

</body>
</html>