// components/terms.el - Consumer Terms of Service page.
// Returns complete HTML using the shared page shell from styles.el.

from styles import { page_open, page_close }
from nav    import { nav }

fn terms_page() -> String {
    return page_open() + nav() + terms_body() + page_close()
}

fn terms_body() -> String {
    return "
<div style=\"max-width:720px;margin:0 auto;padding:6rem 2.5rem 8rem\">
  <div style=\"margin-bottom:3rem\">
    <a href=\"/\" style=\"font-family:var(--body);font-size:0.75rem;font-weight:500;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy);text-decoration:none\">&#8592; Neuron</a>
  </div>
  <div style=\"margin-bottom:4rem;border-bottom:1px solid var(--border);padding-bottom:3rem\">
    <p class=\"label\" style=\"margin-bottom:1rem\">Legal</p>
    <h1 style=\"font-family:var(--head);font-size:clamp(2rem,4vw,3rem);font-weight:600;color:var(--t1);margin-bottom:0.75rem;line-height:1.1\">Terms of Service</h1>
    <p style=\"font-family:var(--body);font-size:0.875rem;color:var(--t3)\">Effective May 1, 2026 &nbsp;&middot;&nbsp; Neuron, LLC</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 1</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">Using Neuron</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Using Neuron means you&#39;ve read these terms and agree to them. That&#39;s it. No buried consent, no dark patterns. If something here doesn&#39;t sit right with you, email us before using the product - we&#39;ll talk through it.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">These terms cover every version of Neuron: free, Professional, and Founding Member. Enterprise use has its own agreement. If you&#39;re deploying Neuron for an organization, that&#39;s the one you want.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 2</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">What You Can Do With It</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">You can install and use Neuron on devices you own or control. That&#39;s the license. Personal, non-transferable.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Each plan includes <strong style=\"color:var(--t1);font-weight:500\">two devices</strong>. Additional devices are available at a small extra cost. We&#39;re not greedy about it - two covers most people, and if you need more, you can add them.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">The free tier doesn&#39;t expire. Paid licenses are what they say they are. Founding Member licenses are perpetual - you bought it, you own it. I won&#39;t change that.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">You can&#39;t resell it, sublicense it, or redistribute it without asking first. If you want to do something creative with it, ask. The answer might be yes.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\"><strong style=\"color:var(--t1);font-weight:500\">License validation.</strong> To use Neuron, the software validates your license against our license server on startup. This applies to all tiers, including Free. The validation confirms your license is active and in good standing. We do not collect your data during this process - the check is limited to license status only.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\"><strong style=\"color:var(--t1);font-weight:500\">Revocation.</strong> If you violate these terms, abuse the system, or engage in conduct that causes harm to other users or to Neuron, LLC, we can revoke your license. This means the software will stop functioning. Revocation is a last resort - we will contact you first when possible. But it is a real consequence, and you should understand that when you agree to use the product.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 3</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">Your Data</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Your memory, your conversations, your context - all of it lives on your device. I don&#39;t have access to it. I don&#39;t collect it. It doesn&#39;t move in the course of normal use.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">When you turn on network features - sync, relay, collaborative tools - only what those features need to run gets transmitted. Not your memory, not your conversations, unless you explicitly turn on something that shares them with people you&#39;ve chosen. I don&#39;t sell that data. I don&#39;t use it for anything except running the feature you asked for. Turning on a network feature is your consent to that.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Network features route data through Neuron&#39;s messaging backplane. That data is encrypted end-to-end - we cannot read it - and is not stored or retained after transmission. Participating in the network is your consent to this transient routing.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">Your data is yours. Nothing in these terms gives me any claim to your content, your memory, or anything you create using Neuron.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 4</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">Inference</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Neuron routes inference to whatever provider you configure - your own keys for OpenAI, Anthropic, Grok, any compatible endpoint. When you use a third-party provider, your prompts go through their infrastructure. Their terms apply. I don&#39;t control what they do with it.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">Neuron Inference - our own inference layer, launching Q3 2026 - will not store your requests, will not train on them, and will not share them. A separate data addendum will cover the details when it launches.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 5</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">The Network Layer</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Neuron includes access to a proprietary distributed network infrastructure (Patent Pending: US Provisional 64/036,821). Its architecture, operational logic, and internal protocols are trade secrets. What matters here is what it means for you.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">The Neuron AI you interact with develops over time - its responses and capabilities change as the system progresses. This is by design. By using Neuron, you acknowledge that: (a) AI responses may change as the system develops; (b) Neuron, LLC makes no warranty as to the consistency, stability, or predictability of AI outputs at any given point in its development; and (c) AI outputs are a function of development state, not a fixed specification.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">When you enable network features, your interactions may be processed by or through Neuron&#39;s distributed network infrastructure. All such data is encrypted in transit. Neuron, LLC cannot read, inspect, retain, or produce the contents of network traffic as an architectural constraint - not merely as a policy. Because we cannot read network traffic, <span style=\"font-weight:500;color:var(--t1)\">Neuron, LLC is not liable for any content, output, or consequence arising from data processed within the network layer</span>, including outputs produced during system development or content you introduce that is processed by the network.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">You agree to indemnify and hold harmless Neuron, LLC, its affiliates, and its officers from any claims, damages, or legal proceedings arising from: (a) your reliance on AI outputs during active development periods; (b) content you originate and introduce through network features; (c) your violation of applicable law in connection with network participation; or (d) any attempt to reverse-engineer, probe, circumvent, or replicate proprietary network architecture or system mechanisms.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">The network layer is decentralized by design. Neuron, LLC does not guarantee its availability, continuity, or performance, and may modify, suspend, or discontinue network features at any time. Network participation does not create an agency relationship between participants, and no participant acts on behalf of Neuron, LLC in any capacity.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 6</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">What You Can&#39;t Do</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Don&#39;t use Neuron to generate content designed to harm people, defraud anyone, or break the law.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Don&#39;t try to reverse-engineer the licensing or security mechanisms.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Don&#39;t extract or resell proprietary components.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">If you violate these, your license can be revoked. That means the software stops working. We can also suspend access to cloud services and the network layer. This applies to all tiers - there is no free pass because your tier is free.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 7</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">Ownership</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Neuron and everything in it is my intellectual property. Six patents and counting. These terms don&#39;t transfer any of that to you.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">Everything you create using Neuron - outputs, memory nodes, artifacts - is yours. I make no claim to it. Not now, not ever.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 8</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">No Warranty</h2>
    </div>
    <p style=\"font-family:var(--body);font-size:0.875rem;font-weight:600;color:var(--t1);line-height:1.7;margin-bottom:1rem\">THE SOFTWARE IS PROVIDED &#34;AS IS.&#34; NEURON, LLC MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">Software has bugs. Security has limits. Use your judgment. You use Neuron at your own risk.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 9</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">Liability Cap</h2>
    </div>
    <p style=\"font-family:var(--body);font-size:0.875rem;font-weight:600;color:var(--t1);line-height:1.7;margin-bottom:1rem\">TO THE EXTENT PERMITTED BY LAW, NEURON, LLC IS NOT LIABLE FOR INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING FROM YOUR USE OF THE SOFTWARE.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">If something goes wrong and you have a claim against me, the most I owe you is what you paid in the twelve months before it happened. That&#39;s the cap.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 10</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">Changes</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">I&#39;ll update these terms when I need to. Material changes get announced on the site and, where I have your email, directly. Continued use after a change means you accept the new terms.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">Founding Member licenses are locked. I won&#39;t retroactively change what you signed up for.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 11</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">Children and Family Accounts</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">Children 13 and over may use Neuron independently. Children under 13 may only use Neuron as part of a family account established by a parent or legal guardian. By setting up a family account that includes a minor, the parent or guardian provides verifiable consent for the child&#39;s use and accepts these terms on the child&#39;s behalf.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">When a child&#39;s Neuron instance is part of a family account, certain information - including usage activity and relevant context - may be shared from the child&#39;s local instance to the parent&#39;s local instance. This sharing happens device-to-device and does not pass through or get stored on Neuron&#39;s servers.</p>

    <div style=\"margin:1.5rem 0;padding:1.5rem;border-left:3px solid rgba(0,82,160,.35);background:rgba(0,82,160,.04)\">
      <p style=\"font-family:var(--body);font-weight:600;font-size:0.875rem;color:var(--t1);margin-bottom:0.875rem;letter-spacing:0.04em\">Hard Bell - Required acknowledgment for family accounts</p>
      <p style=\"font-family:var(--body);font-weight:300;font-size:0.875rem;color:var(--t2);line-height:1.8;margin-bottom:0.875rem\">Federal data shows approximately 89% of child maltreatment is perpetrated by a parent or caregiver (HHS, Child Maltreatment 2023). The person listed as the primary contact is not always a safe contact. This system is built with that reality in mind.</p>
      <p style=\"font-family:var(--body);font-weight:400;font-size:0.875rem;color:var(--t1);line-height:1.8\">When you create a family account that includes a minor, you are agreeing unconditionally to the following: <strong>if a safety signal is triggered by a child&#39;s account, the parent or guardian named on the family account will not be the first contact reached.</strong> Emergency services and independently designated trusted contacts are notified first. This is not a setting that can be changed. By creating a family account, you accept this structure.</p>
    </div>
    <p style=\"font-family:var(--body);font-weight:500;font-size:0.9375rem;color:var(--t1);line-height:1.8;margin-bottom:0.75rem\">Mandatory reporting - applies to all accounts.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\">By creating any Neuron account, you acknowledge and agree that: <strong style=\"color:var(--t1);font-weight:500\">if Neuron detects credible, specific indicators of intended harm to a person - including harm to the account holder themselves - emergency services or relevant authorities may be contacted.</strong> This is not limited to family accounts. It applies to every user. This is not a privacy violation. It is the only honest answer to what a system that knows you this well is obligated to do when someone is in genuine danger. You cannot opt out of this. If you are unwilling to agree, do not create an account.</p>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">Parents control what is visible to them through their local instance and can revoke family account access at any time. If you believe a child is using Neuron outside of a family account, contact legal@neurontechnologies.ai and we will address it promptly.</p>
  </div>

  <div style=\"margin-bottom:3rem\">
    <div style=\"display:flex;align-items:baseline;gap:1rem;margin-bottom:1.25rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem\">
      <span style=\"font-family:var(--body);font-size:0.75rem;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--navy-65)\">&#167; 12</span>
      <h2 style=\"font-family:var(--head);font-size:1.25rem;font-weight:600;color:var(--t1)\">Governing Law</h2>
    </div>
    <p style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\">These terms are governed by the laws of Delaware. Disputes go to the courts of Delaware.</p>
  </div>

  <div style=\"margin-top:4rem;padding-top:2rem;border-top:1px solid var(--border);display:flex;gap:2rem;flex-wrap:wrap\">
    <a href=\"/\" style=\"font-family:var(--body);font-size:0.8125rem;color:var(--navy);text-decoration:none\">&larr; Home</a>
    <a href=\"/legal/enterprise-terms\" style=\"font-family:var(--body);font-size:0.8125rem;color:var(--navy);text-decoration:none\">Enterprise Agreement &rarr;</a>
  </div>
</div>
"
}
