// CieloCell — Terms of Service page (V2 brand)
const TermsPage = ({ onBack, onNav }) => {
  const D = CC.display;
  const F = CC.font;
  const [openSection, setOpenSection] = React.useState(null);

  const sections = [
    { id: 's1',  title: '01. who we are',                          content: `CieloCell is a travel eSIM and mobile data service operated by Cielo Cell AB, a Swedish limited liability company (aktiebolag), org. no. 559579-6912, DUNS 373683881, registered at Målarevägen 24, 227 30 Lund, Sweden.\n\nBy downloading the CieloCell app, creating an account, or using any part of the Service, you agree to these Terms of Service and our Privacy Policy. If you do not agree, please do not use the Service.` },
    { id: 's2',  title: '02. the service',                         content: `CieloCell provides prepaid, data-only eSIM plans for use in selected destinations, including the United States. The Service is delivered through licensed MVNO partner networks. CieloCell does not own or operate any mobile network infrastructure.\n\nData-only: CieloCell eSIM plans include mobile data only. Voice calls and SMS are not included unless explicitly stated.\n\nDestinations: Available destinations are listed in the app. CieloCell is launching first in the United States and will expand over time.` },
    { id: 's3',  title: '03. account registration',                content: `You must be at least 18 years of age to use the Service.\n\nYou may register using a valid email address or via Apple or Google sign-in. You must provide accurate, current, and complete information. You are responsible for all activity under your account and for keeping your credentials secure.\n\nEach person may hold only one account. Accounts are personal and may not be transferred or sold.\n\nNotify us immediately at hello@cielocell.com if you suspect unauthorized access to your account.` },
    { id: 's4',  title: '04. device compatibility',                content: `To use CieloCell your device must:\n• Support eSIM technology (hardware eSIM chip)\n• Be carrier-unlocked (not locked to another operator)\n• Run a supported operating system version as listed in the app\n\nYou can check eSIM compatibility by dialing *#06# — if an EID number appears, your device supports eSIM. Confirm your device is carrier-unlocked with your current operator before purchasing.\n\nCompatibility information in the app is a general guide only and does not constitute a warranty. It is your responsibility to verify compatibility before purchasing. CieloCell is not liable for activation failures caused by an incompatible or carrier-locked device.` },
    { id: 's5',  title: '05. eSIM installation and activation',    content: `After purchase, you will receive an eSIM profile via QR code or direct push to your device. Follow the in-app instructions to install and activate it.\n\nOne device only: Once an eSIM profile is installed on a device, it cannot be transferred to a different device. Ensure your device is ready before starting installation.\n\nCieloCell is not responsible for failed installations caused by device incompatibility, carrier lock, software restrictions, or user error.` },
    { id: 's6',  title: '06. coverage, speed, and availability',   content: `CieloCell delivers connectivity through partner MVNO and local network operators. Coverage, speed, and availability depend on those partners and local infrastructure. CieloCell does not guarantee:\n• Minimum data speeds\n• Uninterrupted or continuous connectivity\n• Coverage in any specific location\n\nCoverage maps and speed estimates shown in the app are indicative only. Data speeds may be reduced after exceeding a defined threshold under a network partner's fair-use policy.` },
    { id: 's7',  title: '07. fair and responsible use',            content: `CieloCell plans are for your personal mobile data use only. You must not:\n• Use the Service for any unlawful purpose\n• Resell, sublicense, or share access to your data plan on a commercial basis\n• Use the Service to transmit spam, malware, or harmful content\n• Attempt to gain unauthorized access to any system, network, or account\n• Interfere with or disrupt the CieloCell platform\n• Reverse-engineer or tamper with any part of the app or eSIM profile\n\nViolation of this policy may result in immediate suspension or termination without refund.` },
    { id: 's8',  title: '08. prices, payments, and taxes',         content: `Plan prices are displayed in the app at the time of purchase in the currency shown. Prices include applicable taxes where CieloCell is legally required to collect them. Prices may change; changes will not affect confirmed orders.\n\nPayments are processed by Apple (App Store), Google (Google Play), or Stripe for direct purchases. CieloCell does not store or access your full payment card details.\n\nYou are responsible for any additional taxes, duties, or levies imposed by your local jurisdiction beyond any tax collected by CieloCell at point of sale.` },
    { id: 's9',  title: '09. plan validity and expiry',            content: `All data plans have a validity period displayed in the app before and after purchase. Unused data is forfeited at the end of the validity period and is non-refundable, except where expiry is caused by a service failure solely attributable to CieloCell.\n\nExpired data cannot be reinstated. Plan validity begins from the date of activation, not the date of purchase, unless stated otherwise in the app.` },
    { id: 's10', title: '10. refunds',                             content: `EU / EEA Right of Withdrawal: If you are a consumer in the EU or EEA, you have the right to withdraw from a purchase within 14 calendar days without reason. This right expires as soon as the eSIM is activated or data consumption begins. By activating your eSIM you expressly waive this right, as permitted by Article 16(m) of Directive 2011/83/EU. To withdraw before activation, contact hello@cielocell.com.\n\nService Failure Refunds: If you are unable to use your plan due to a technical failure directly attributable to CieloCell, we will provide a replacement plan or a full refund. Submit requests within 30 days to hello@cielocell.com.\n\nNo refund will be issued for: data already consumed; expired plans; or failures caused by device incompatibility, carrier lock, or network partner outages.\n\nPurchases made through the App Store or Google Play are also subject to the respective store's refund policies.` },
    { id: 's11', title: '11. account deletion',                    content: `You can delete your account and request erasure of your personal data at any time:\n\n• In the app: Profile → Settings → Delete Account\n• By email: hello@cielocell.com\n\nAccount deletion is permanent. Any active plans or account credits are forfeited upon deletion and are non-refundable. Some data may be retained for the period required by applicable law.` },
    { id: 's12', title: '12. suspension and termination',          content: `CieloCell may suspend or terminate your account if you breach these Terms, if we detect fraudulent activity, if required by law, or if your account has been inactive for more than 12 consecutive months. We will notify you where reasonably practicable before taking action.\n\nTermination for breach results in forfeiture of any active plans or credits without refund.` },
    { id: 's13', title: '13. intellectual property',               content: `All intellectual property in the CieloCell app and platform — including the brand name, logo, software, and content — is owned by or licensed to Cielo Cell AB. You may use the app only for personal, non-commercial purposes in accordance with these Terms. No other rights are granted.` },
    { id: 's14', title: '14. third-party services',                content: `CieloCell works with third-party partners including MVNO network operators, payment processors (Apple, Google, Stripe), analytics providers, authentication services, and cloud infrastructure. These parties are governed by their own terms and privacy policies.\n\nCieloCell is not responsible for the acts or omissions of third-party service providers, including network outages or payment failures outside our control.` },
    { id: 's15', title: '15. limitation of liability',             content: `To the fullest extent permitted by applicable law, CieloCell's total liability for any claim arising from these Terms or the Service shall not exceed the greater of: (a) the amount you paid for the specific plan giving rise to the claim; or (b) USD $10.00.\n\nCieloCell is not liable for indirect, incidental, consequential, or punitive damages, including loss of data or loss of connectivity.\n\nNothing in these Terms limits liability that cannot be excluded under applicable law. Consumers in the EU/EEA retain all mandatory rights under applicable consumer protection legislation.` },
    { id: 's16', title: '16. governing law and consumer rights',   content: `These Terms are governed by the laws of Sweden. Disputes that cannot be resolved informally will be referred to the competent courts of Lund, Sweden.\n\nEU/EEA consumers may also bring claims before their local courts and may use the EU Online Dispute Resolution platform at ec.europa.eu/consumers/odr, or contact the Swedish National Board for Consumer Disputes (ARN) at arn.se.\n\nNothing in these Terms affects mandatory consumer protection rights that apply in your country of residence.` },
    { id: 's17', title: '17. changes to these terms',              content: `We may update these Terms from time to time. We will give you at least 14 days' notice of material changes via in-app notification and, where possible, by email. Continued use of the Service after the effective date of a change constitutes acceptance.` },
    { id: 's18', title: '18. contact',                             content: `Cielo Cell AB\nMålarevägen 24, 227 30 Lund, Sweden\n\nhello@cielocell.com` },
  ];

  return <LegalPage title="terms of" highlight="service" subtitle="the rules of the road for using cielocell." sections={sections} onBack={onBack} onNav={onNav} sister={{ label: 'privacy policy', target: 'privacy' }} />;
};

Object.assign(window, { TermsPage });
