function ConsumerHealthDataPage() {
  useReveal();
  const [activeSection, setActiveSection] = React.useState("");

  const sections = [
    { id: "consumer-health-data-we-collect", label: "Consumer Health Data We Collect" },
    { id: "where-it-comes-from", label: "Where It Comes From" },
    { id: "why-we-collect-and-use-it", label: "Why We Collect and Use It" },
    { id: "who-we-share-it-with", label: "Who We Share It With" },
    { id: "your-rights", label: "Your Rights" },
    { id: "how-to-make-a-request", label: "How to Make a Request" },
    { id: "geofencing", label: "Geofencing" },
    { id: "changes-to-this-policy", label: "Changes to This Policy" },
    { id: "contact-us", label: "Contact Us" },
  ];

  React.useEffect(() => {
    const els = sections.map(s => document.getElementById(s.id)).filter(Boolean);
    const io = new IntersectionObserver(entries => {
      entries.forEach(e => { if (e.isIntersecting) setActiveSection(e.target.id); });
    }, { rootMargin: "-100px 0px -60% 0px", threshold: 0 });
    els.forEach(el => io.observe(el));
    return () => io.disconnect();
  }, []);

  return (
    <>
      <Nav currentPage="consumer-health-data" />
      <section className="legal-hero">
        <div className="container">
          <div className="reveal in"><span className="eyebrow">Legal</span></div>
          <h1 className="serif reveal in delay-1" style={{ marginTop: 22, maxWidth: '20ch' }}>Consumer Health Data Privacy Policy</h1>
          <div className="version reveal in delay-2">Version 1.0 · Effective Date: October 17, 2026</div>
        </div>
      </section>

      <div className="legal-body">
        <div className="legal-layout">
          <nav className="legal-toc">
            {sections.map(s => (
              <a key={s.id} href={`#${s.id}`} className={activeSection === s.id ? "active" : ""}>{s.label}</a>
            ))}
          </nav>

          <div className="legal-content reveal in">
            <p>This Consumer Health Data Privacy Policy describes how Axonos, Inc. ("Brainbox," "we," "us," or "our") collects, uses, shares, and deletes consumer health data, as defined by Washington's My Health My Data Act, Nevada's consumer health data law, and similar state laws. It adds to our Privacy Policy, which describes all of the personal information we handle.</p>

            <h2 id="consumer-health-data-we-collect">1. Consumer Health Data We Collect</h2>
            <ul>
              <li>Health conditions you choose to report in your profile.</li>
              <li>Your voice recordings and their transcripts, which we analyze for wellness purposes, including the voice activities you complete during setup (your cognitive baseline).</li>
              <li>Information we create from your speech: speech markers, your daily Overall, Informativeness, and Fluency scores, your weekly Cogniscore, estimates of mood, energy, and stress, and AI-written summaries of your scores.</li>
              <li>Your voiceprint, which is biometric data.</li>
              <li>The fact that you use a brain-wellness app, and records of which wellness features you use and when.</li>
              <li>Any health information you choose to include in feedback or messages to us.</li>
            </ul>

            <h2 id="where-it-comes-from">2. Where It Comes From</h2>
            <p>We collect consumer health data from you, through your device's microphone when you start a session, and by creating it from your recordings.</p>

            <h2 id="why-we-collect-and-use-it">3. Why We Collect and Use It</h2>
            <p>We collect and use consumer health data only with your consent, which you give in the App before we collect it, or as needed to provide the Services you ask for. We use it to:</p>
            <ul>
              <li>provide the Services: calculate and explain your scores, hold voice conversations with you, write your daily summaries, send the reminders you turn on, and recognize your voice;</li>
              <li>improve our models and Services, unless you turn off "Help improve Brainbox" in Profile, then Data &amp; Privacy; and</li>
              <li>keep the Services secure, keep records of your consents, and comply with the law.</li>
            </ul>

            <h2 id="who-we-share-it-with">4. Who We Share It With</h2>
            <p className="important">We do not sell consumer health data.</p>
            <p>We share consumer health data only with these processors, which handle it on our behalf under contracts that limit how they may use it:</p>
            <ul>
              <li><span><strong>Google Cloud and Google Firebase:</strong> hosting, storage, and sign-in. They hold all of the categories in Section 1.</span></li>
              <li><span><strong>Speechmatics:</strong> your voice recordings and your voiceprint, to transcribe your speech and recognize your voice.</span></li>
              <li><span><strong>Daily (Daily.co, including Pipecat Cloud):</strong> the audio and text of your voice chats.</span></li>
              <li><span><strong>OpenRouter and the AI model provider it chooses:</strong> the text of your voice chats and, for daily summaries, your daily scores.</span></li>
              <li><span><strong>Cartesia:</strong> the text of Brainbox's spoken replies, which can reflect what you said.</span></li>
              <li><span><strong>PostHog:</strong> records of which features you use, linked to a pseudonymous ID.</span></li>
              <li><span><strong>Zendesk:</strong> any health information you include in feedback.</span></li>
              <li><span><strong>Google Workspace:</strong> any health information you include in emails to us.</span></li>
            </ul>
            <p>We do not share consumer health data with any other third party or affiliate unless you give separate consent, you direct us to (for example, through a sharing feature we may offer), or the law requires it.</p>

            <h2 id="your-rights">5. Your Rights</h2>
            <p>You have the right to:</p>
            <ul>
              <li>confirm whether we collect, share, or sell your consumer health data, and access it, including a list of every third party and affiliate we have shared it with and how to contact them;</li>
              <li>withdraw your consent to our collection and sharing of it;</li>
              <li>have it deleted; and</li>
              <li>appeal if we refuse to act on your request.</li>
            </ul>
            <p>To access your data, you can download it in the App (Profile, then Data &amp; Privacy, then Download your data), or email us.</p>
            <p>Deleting your account in the App deletes your sign-in and voiceprint right away; our Privacy Policy explains what we keep afterward and why. To have all of your consumer health data deleted, email <a href="mailto:privacy@brainboxapp.com" style={{ color: 'var(--primary)' }}>privacy@brainboxapp.com</a>. When you do, we will delete it from our records, including archives and backups, within the time the law allows, and tell our processors to delete it too.</p>

            <h2 id="how-to-make-a-request">6. How to Make a Request</h2>
            <p>Email <a href="mailto:privacy@brainboxapp.com" style={{ color: 'var(--primary)' }}>privacy@brainboxapp.com</a>, preferably from the email address on your account. We will verify your identity before acting. We will respond within 45 days, and we will tell you if we need up to 45 more days where the law allows it. Requests are free, up to twice a year. We will not treat you differently for exercising your rights.</p>
            <p>If we decline your request, you can appeal by replying to our decision with the word "Appeal." We will answer within 45 days and explain our reasons. If we deny your appeal, you can contact the Washington State Attorney General at atg.wa.gov/file-complaint, or the attorney general of the state where you live.</p>

            <h2 id="geofencing">7. Geofencing</h2>
            <p>We do not use geofences around places where health care services are provided.</p>

            <h2 id="changes-to-this-policy">8. Changes to This Policy</h2>
            <p>We may update this Policy. The Effective Date at the top shows when it last changed. We will tell you about material changes in the App or by email and, where the law requires, ask for your consent again.</p>

            <h2 id="contact-us">9. Contact Us</h2>
            <p>Axonos, Inc.<br />1223 Wilshire Blvd #3210<br />Santa Monica, CA 90403<br />United States</p>
            <p><a href="mailto:privacy@brainboxapp.com" style={{ color: 'var(--primary)' }}>privacy@brainboxapp.com</a></p>

            <div className="legal-nav-strip">
              <a href="/privacy">← Privacy Policy</a>
              <a href="/terms">Terms of Use →</a>
            </div>
          </div>
        </div>
      </div>

      <Footer />
    </>
  );
}

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<ConsumerHealthDataPage />);
