/* ============================================================
   Legal pages: Privacy Policy & Terms (verbatim from the live
   chimpanzee.io / lifesimulator.io copy, Effective May 11, 2026).
   ============================================================ */

window.LEGAL = {
  privacy: {
    title: "Privacy Policy",
    effective: "May 11, 2026",
    intro: "Chimpanzee, LLC (\u201cChimpanzee,\u201d \u201cwe,\u201d \u201cour\u201d) provides this Privacy Policy to inform you of our practices regarding how we collect and use information in connection with our apps.",
    sections: [
      { id: "summary", h: "Summary", body: [
        { list: [
          "We do not collect personal information from you.",
          "We do not require accounts or sign-up.",
          "We do not use ads.",
          "We do not sell or share data with advertisers.",
          "We do not sync your data to any cloud service.",
          "Most of our apps collect no analytics data at all.",
          "One app, Alone Survival, uses anonymous gameplay analytics to help us improve the game.",
        ] },
      ] },
      { id: "collection", h: "Information Collection", body: [
        "Chimpanzee does not directly collect personal information from you. Our apps do not require account creation, do not request access to your contacts, photos, or location, and do not transmit personal data to our servers.",
        { sub: "Apple App Analytics", t: "Apple may collect anonymous usage data and crash reports through its built-in App Analytics service and provide this to us in aggregate form. This data is governed by Apple\u2019s own privacy practices." },
        { sub: "Analytics in Alone Survival", t: "Our game Alone Survival uses TelemetryDeck, a privacy-focused analytics service, to help us understand how the game is played and improve future updates. TelemetryDeck collects anonymous data such as game session length, scenario chosen, run outcome, and aggregate device information (model, operating system version, region). No personal information, account data, or content you create in the game is collected. This data cannot be linked back to you. You can learn more about TelemetryDeck\u2019s privacy practices at telemetrydeck.com." },
        "No other Chimpanzee apps use third-party analytics services.",
      ] },
      { id: "use", h: "How We Use This Data", body: [
        "We use anonymous analytics data to understand app performance, identify bugs, and improve the user experience. We do not sell, trade, or share this data with advertisers or marketing partners. We do not use it to track you across apps or websites.",
      ] },
      { id: "children", h: "Children\u2019s Privacy", body: [
        "We comply with the Children\u2019s Online Privacy Protection Act (COPPA). We do not knowingly collect personal information from children under 13. If we learn that we have collected personal information from a child under 13 without parental consent, we will take steps to delete that information promptly.",
      ] },
      { id: "california", h: "California Privacy Rights", body: [
        "California residents have certain rights regarding their personal information under the California Consumer Privacy Act (CCPA). Because we do not collect personal information that could identify you, these rights generally do not apply to our apps. California residents with questions may contact us using the information below.",
      ] },
      { id: "international", h: "International Data", body: [
        "Our apps are operated from the United States. If you access our apps from outside the United States, please be aware that any anonymous data we receive may be processed in the United States. By using our apps, you consent to this transfer of information as permitted by applicable law.",
      ] },
      { id: "changes", h: "Changes to This Policy", body: [
        "We may update this Privacy Policy from time to time. When we do, we will update the Effective Date at the top of this document. We encourage you to review this policy periodically. Your continued use of our apps after changes are posted constitutes your acceptance of the updated policy.",
      ] },
    ],
  },

  terms: {
    title: "Terms and Conditions",
    effective: "May 11, 2026",
    intro: "These Terms and Conditions (\u201cTerms\u201d) govern your use of the websites and mobile applications operated by Chimpanzee, LLC (\u201cChimpanzee,\u201d \u201cwe,\u201d \u201cour\u201d), including chimpanzee.io, lifesimulator.io, and all associated mobile applications (collectively, the \u201cServices\u201d). By downloading, installing, accessing, or using any of our Services, you agree to be bound by these Terms. If you do not agree to these Terms, please do not use our Services.",
    sections: [
      { id: "about", h: "1. About Chimpanzee", body: [
        "Chimpanzee, LLC is the owner and operator of the Services. We develop and publish mobile applications across categories including games, utilities, educational tools, and lifestyle apps. Specific app features, pricing, and availability are described within each app and on the App Store.",
        "For questions about these Terms, please contact us at support@chimpanzee.io.",
      ] },
      { id: "eligibility", h: "2. Eligibility", body: [
        "To use our Services, you must:",
        { list: [
          "Be at least 13 years old, or the minimum age required in your jurisdiction",
          "Have an active Apple ID and access to the Apple App Store",
          "Have the legal capacity to enter into a binding agreement",
        ] },
        "If you are under the age of majority in your jurisdiction, you may only use our Services with the consent and supervision of a parent or legal guardian.",
      ] },
      { id: "services", h: "3. The Services", body: [
        "We offer mobile applications through the Apple App Store. Our apps fall into three general categories:",
        { sub: "Free apps", t: "Some of our apps are available at no cost and have no in-app purchases. You may use these apps freely subject to these Terms." },
        { sub: "Apps with one-time purchases", t: "Some of our apps are free to download but offer optional in-app purchases (such as content unlocks, premium features, expansion packs, in-game currency, or one-time boosts)." },
        { sub: "Subscription apps", t: "One of our apps offers a subscription with recurring charges. Subscription terms (including billing frequency, trial periods, and renewal mechanics) are described in the app itself and in the App Store listing prior to purchase." },
        "The specific purchase options, prices, and features available for any given app are described in that app\u2019s App Store listing and within the app itself.",
      ] },
      { id: "payments", h: "4. Purchases and Payments", body: [
        "All purchases of our apps and in-app purchases are processed by Apple through the App Store. We do not directly collect or store any payment information.",
        { sub: "Pricing", t: "Prices are displayed in the App Store in USD and include applicable taxes as calculated by Apple. We reserve the right to change prices at any time, but price changes will not affect purchases you have already completed." },
        { sub: "Non-consumable in-app purchases", t: "Some in-app purchases provide permanent content unlocks (such as expansion packs, premium features, or ad removal). These purchases are linked to your Apple ID and can be restored on devices signed in to that Apple ID using the \u201cRestore Purchases\u201d option within the app. Non-consumable purchases do not expire and do not recur." },
        { sub: "Consumable in-app purchases", t: "Some in-app purchases provide content or currency that is used up through play (such as in-game currency packs, hint bundles, or one-time boosts). Consumable purchases are not restorable. Once consumed, they cannot be recovered. If you delete an app or switch devices, any unconsumed consumable content may be lost. We are not responsible for the loss of consumable content resulting from app deletion, device changes, or other actions outside our control. You are responsible for understanding which purchases are consumable before completing a transaction; this information is displayed in the App Store listing and within the app prior to purchase." },
        { sub: "Subscriptions", t: "For our subscription app, subscriptions automatically renew at the end of each billing period unless you cancel at least 24 hours before the renewal date. You can manage and cancel subscriptions at any time through your Apple ID account settings. Canceling a subscription stops future charges but does not refund the current billing period." },
        { sub: "Trial periods", t: "If a free trial is offered for a subscription, you will not be charged during the trial period. If you do not cancel before the trial ends, you will be charged the regular subscription price. The duration and terms of any trial are displayed in the app before you start the trial." },
      ] },
      { id: "refunds", h: "5. Refunds", body: [
        "Refunds for purchases made through the Apple App Store are handled directly by Apple under Apple\u2019s standard refund policy. To request a refund, please contact Apple Support at reportaproblem.apple.com. Chimpanzee, LLC does not process refunds for App Store purchases.",
      ] },
      { id: "license", h: "6. License to Use Our Apps", body: [
        "Subject to these Terms, we grant you a limited, non-exclusive, non-transferable, revocable license to download and use our apps on devices you own or control, solely for your personal, non-commercial use.",
        "Your use of our apps downloaded from the Apple App Store is also subject to Apple\u2019s Licensed Application End User License Agreement, available at apple.com/legal/internet-services/itunes/dev/stdeula/. In the event of a conflict between these Terms and Apple\u2019s standard EULA, the terms of these Terms shall prevail for matters between you and Chimpanzee, LLC; Apple\u2019s EULA governs matters between you and Apple.",
      ] },
      { id: "acceptable", h: "7. Acceptable Use", body: [
        "You agree not to:",
        { list: [
          "Reverse-engineer, decompile, or attempt to extract source code from our apps",
          "Circumvent any technical measures protecting in-app purchases or premium content",
          "Use our apps in any way that violates applicable laws or regulations",
          "Use our apps to infringe on the rights of others",
          "Attempt to gain unauthorized access to our systems or data",
          "Distribute, sell, sublicense, or commercially exploit our apps or any content within them",
          "Use automated tools, bots, or scripts to interact with our apps",
          "Misrepresent your identity or affiliation in connection with our apps",
        ] },
        "We reserve the right to terminate your access to our Services if you violate these Terms.",
      ] },
      { id: "ip", h: "8. Intellectual Property", body: [
        "All content provided through our apps, including text, graphics, code, audio, characters, narratives, designs, and the apps themselves, is owned by Chimpanzee, LLC or its licensors and is protected by copyright, trademark, and other intellectual property laws.",
        "You may not copy, reproduce, distribute, modify, create derivative works from, publicly display, or otherwise exploit our content without our prior written permission, except as expressly permitted by these Terms or applicable law.",
      ] },
      { id: "updates", h: "9. App Updates and Changes", body: [
        "We may release updates, modifications, or new versions of our apps at any time. We may also discontinue, suspend, or modify features of any app at our discretion. We will use reasonable efforts to notify users of significant changes that affect their use of paid content.",
      ] },
      { id: "disclaimers", h: "10. Disclaimers", body: [
        "Our Services are provided \u201cas is\u201d and \u201cas available\u201d without warranties of any kind, either express or implied. To the fullest extent permitted by law, we disclaim all warranties, including implied warranties of merchantability, fitness for a particular purpose, non-infringement, and any warranties arising from course of dealing or trade practice.",
        "We do not warrant that our apps will be uninterrupted, error-free, secure, or that any defects will be corrected. You use our Services at your own risk.",
        "Our apps may include simulations, games, or educational content that is intended for entertainment or general information only. Nothing in our apps constitutes professional advice (medical, legal, financial, or otherwise), and you should consult appropriate professionals for advice specific to your situation.",
      ] },
      { id: "liability", h: "11. Limitation of Liability", body: [
        "To the fullest extent permitted by law, Chimpanzee, LLC, its officers, members, employees, and affiliates shall not be liable for any indirect, incidental, special, consequential, or punitive damages arising out of or related to your use of our Services, even if we have been advised of the possibility of such damages.",
        "Our total liability to you for any claim arising from these Terms or our Services shall not exceed the amount you paid us in the twelve months preceding the claim, or one hundred US dollars ($100), whichever is greater.",
        "Some jurisdictions do not allow the exclusion or limitation of certain damages, so some of the above limitations may not apply to you.",
      ] },
      { id: "indemnification", h: "12. Indemnification", body: [
        "You agree to indemnify, defend, and hold harmless Chimpanzee, LLC and its affiliates from any claims, damages, losses, liabilities, costs, and expenses (including reasonable attorney\u2019s fees) arising from your use of our Services, your violation of these Terms, or your violation of any rights of another party.",
      ] },
      { id: "class-action", h: "13. Class Action Waiver", body: [
        "By using our Services, you and Chimpanzee, LLC agree that any disputes between us will be resolved on an individual basis and not as part of any class, collective, consolidated, or representative action. Both parties waive any right to participate in a class-action lawsuit, class-wide arbitration, or representative proceeding.",
        "This waiver does not apply to small-claims court proceedings or to claims that cannot be waived under applicable law. If any portion of this waiver is found unenforceable, the remainder shall remain in full effect.",
      ] },
      { id: "law", h: "14. Governing Law and Jurisdiction", body: [
        "These Terms are governed by the laws of the State of OK United States, without regard to its conflict-of-laws principles. Any legal action arising from these Terms shall be brought in the state or federal courts located in OK, and you consent to the exclusive jurisdiction of those courts, except for small-claims actions which may be brought in the appropriate small-claims court.",
      ] },
      { id: "termination", h: "15. Account Termination", body: [
        "We may suspend or terminate your access to our Services at any time, with or without notice, if you violate these Terms or engage in conduct that we reasonably believe is harmful to other users, our business, or third parties.",
        "You may stop using our Services at any time by deleting our apps from your devices. Termination does not relieve you of obligations arising before termination, including payment obligations for completed purchases.",
      ] },
      { id: "changes", h: "16. Changes to These Terms", body: [
        "We may update these Terms from time to time. When we do, we will post the updated Terms on our website and update the Effective Date above. For significant changes, we will provide additional notice through our apps or by email where appropriate. Your continued use of our Services after changes take effect constitutes acceptance of the updated Terms.",
      ] },
      { id: "severability", h: "17. Severability", body: [
        "If any provision of these Terms is found to be unenforceable, the remaining provisions shall remain in full force and effect.",
      ] },
      { id: "entire", h: "18. Entire Agreement", body: [
        "These Terms, together with our Privacy Policy and any app-specific terms you agree to, constitute the entire agreement between you and Chimpanzee, LLC regarding your use of our Services.",
      ] },
      { id: "contact", h: "19. Contact", body: [
        "For questions about these Terms, please contact us at support@chimpanzee.io.",
      ] },
    ],
  },
};

function LegalPage({ go, doc }) {
  React.useEffect(() => { window.scrollTo(0, 0); }, [doc.title]);
  const jump = (id) => {
    const el = document.getElementById("sec-" + id);
    if (el) {
      window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 88, behavior: scrollBehavior() });
      const h = el.querySelector("h2");
      if (h) { h.setAttribute("tabindex", "-1"); h.focus({ preventScroll: true }); }
    }
  };
  return (
    <section className="legal">
      <div className="wrap">
        <button type="button" className="gp-back" onClick={() => go({ name: "home" })}>
          <Icon name="arrow-left" /> Back to home
        </button>
        <header className="legal-head">
          <span className="eyebrow">Legal</span>
          <h1>{doc.title}</h1>
          <p className="legal-eff">Effective Date: {doc.effective}</p>
          <p className="legal-intro">{doc.intro}</p>
        </header>
        <div className="legal-body">
          <nav className="legal-toc" aria-label="Contents">
            <h4>On this page</h4>
            <ul>
              {doc.sections.map((s) => (
                <li key={s.id}><button type="button" onClick={() => jump(s.id)}>{s.h}</button></li>
              ))}
            </ul>
          </nav>
          <article className="legal-content">
            {doc.sections.map((s) => (
              <section className="legal-sec" id={"sec-" + s.id} key={s.id}>
                <h2>{s.h}</h2>
                {s.body.map((b, i) => {
                  if (typeof b === "string") return <p key={i}>{b}</p>;
                  if (b.list) return <ul key={i} className="legal-list">{b.list.map((li, j) => <li key={j}>{li}</li>)}</ul>;
                  if (b.sub) return (
                    <p key={i}><strong className="legal-sub">{b.sub}.</strong> {b.t}</p>
                  );
                  return null;
                })}
              </section>
            ))}
            <div className="legal-foot-note">
              <p>Questions? Email <a href={"mailto:" + window.STUDIO.email}>{window.STUDIO.email}</a>.</p>
              <p className="faint">© {new Date().getFullYear()} Chimpanzee, LLC · All rights reserved</p>
            </div>
          </article>
        </div>
      </div>
    </section>
  );
}

Object.assign(window, { LegalPage });
