(function () {
  const e = React.createElement;
  const legalCopy = {
    privacy: {
      title: "Privacy Policy",
      effective: "Effective 24th June 2026",
      intro: "Content Stack Lab (\"CSL,\" \"we,\" \"our\") respects your privacy. This Privacy Policy explains what information we collect through contentstacklab.com (\"the Website\"), how we use it, and the choices you have. By using this Website, you agree to the practices described here.",
      sections: [
        ["Information we collect", "Information you provide directly: when you use the contact form, you may submit your name, email address, company name, job title, and details about your enquiry. When you book a consultation through Cal.com, you provide your name, email, and scheduling preferences. Information collected automatically: we use Google Analytics to collect anonymous usage data including pages visited, time on site, referral source, browser type, device type, and general geographic location — aggregated and not personally identifying. Cookies: the Website uses cookies for Google Analytics and basic site functionality, which you can control through your browser settings."],
        ["How we use your information", "We use the information collected to respond to your enquiries submitted through the contact form; schedule and manage consultations booked through Cal.com; understand how visitors use the Website so we can improve it; and comply with legal obligations."],
        ["Third-party services", "We use Cal.com for scheduling consultations — when you book a call, your data is processed according to Cal.com's privacy policy. We use Google Analytics for understanding website traffic and usage patterns, which uses cookies to collect anonymous data; you can opt out using the Google Analytics Opt-out Browser Add-on. We do not sell, rent, or share your personal information with third parties for marketing purposes."],
        ["Data retention", "Contact form submissions are retained for as long as necessary to respond to your enquiry and maintain business records. Google Analytics data is retained according to Google's standard retention settings."],
        ["Your rights", "You have the right to request access to the personal data we hold about you; request correction of inaccurate data; request deletion of your data; and withdraw consent for data processing at any time. To exercise any of these rights, contact us at connect@contentstacklab.com."],
        ["Data security", "We take reasonable measures to protect your information. However, no method of transmission over the internet is 100% secure, and we cannot guarantee absolute security."],
        ["International users", "This Website is operated from Pakistan. If you access the Website from outside Pakistan, your information may be transferred to and processed in Pakistan. By using the Website, you consent to this transfer."],
        ["Children's privacy", "This Website is not intended for individuals under 18. We do not knowingly collect personal information from children."],
        ["Changes to this policy", "We may update this Privacy Policy from time to time. Changes will be posted on this page with an updated effective date. Continued use of the Website after changes constitutes acceptance."],
        ["Contact", "For questions about this Privacy Policy, reach out at connect@contentstacklab.com."]
      ]
    },
    terms: {
      title: "Terms of Service",
      effective: "Effective 24th June 2026",
      intro: "These Terms of Service govern your use of contentstacklab.com (\"the Website\"), operated by Content Stack Lab (\"CSL,\" \"we,\" \"our\"). By accessing or using this Website, you agree to these terms. If you don't agree, please don't use the site.",
      sections: [
        ["Intellectual property", "All content on this Website including text, case studies, blog posts, graphics, logos, and design elements is the property of Content Stack Lab and is protected under applicable intellectual property laws. You may not reproduce, distribute, or republish any content without prior written permission."],
        ["Use of the website", "You agree to use this Website for lawful purposes only. You may not use the site in any way that could damage, disable, or impair it; attempt to gain unauthorized access to any part of the site; use automated tools to scrape, crawl, or extract content; or misrepresent your identity when submitting information through the site."],
        ["Contact form & data submission", "When you submit information through the contact form (name, email, company, job title, or any other details), you consent to CSL collecting and using this data solely for the purpose of responding to your enquiry. We will not sell or share your information with third parties. For full details, see our Privacy Policy."],
        ["Third-party services", "This Website uses Cal.com for booking consultations. When you use the booking feature, you are also subject to Cal.com's own terms and privacy policy. CSL is not responsible for the practices or policies of third-party services integrated into this Website."],
        ["Blog content & commentary", "The views and opinions expressed in blog posts on this Website are based on professional experience and are intended for informational purposes only. They do not constitute professional advice. Any actions taken based on blog content are at your own discretion."],
        ["External links", "This Website may contain links to third-party websites. These links are provided for convenience only. CSL has no control over and assumes no responsibility for the content, privacy policies, or practices of any third-party sites."],
        ["Disclaimer of warranties", "This Website is provided \"as is\" without warranties of any kind, either express or implied. CSL does not warrant that the site will be uninterrupted, error-free, or free of harmful components."],
        ["Limitation of liability", "To the maximum extent permitted by law, CSL shall not be liable for any indirect, incidental, or consequential damages arising from your use of this Website."],
        ["Governing law", "These Terms shall be governed by and construed in accordance with the laws of Pakistan. Any disputes arising from these terms shall be subject to the exclusive jurisdiction of the courts in Pakistan."],
        ["Changes to these terms", "CSL reserves the right to update or modify these Terms at any time. Changes will be posted on this page with an updated effective date. Continued use of the Website after changes constitutes acceptance of the revised terms."],
        ["Contact", "If you have questions about these Terms, reach out at connect@contentstacklab.com."]
      ]
    }
  };

  function mountWhenReady(render) {
    if (window.Header && window.SiteFooter) {
      render();
      return;
    }
    setTimeout(() => mountWhenReady(render), 40);
  }

  function LegalPage() {
    window.useReveal();
    const type = document.body.dataset.page || "privacy";
    const page = legalCopy[type];
    React.useEffect(() => window.scrollTo(0, 0), []);
    return e("div", { className: "legal-page-shell" },
      e(window.Header),
      e("main", { className: "dark-theme" },
        e("section", { className: "article-hero article-hesro--narrow" },
          e("div", { className: "wrap article-hero__inner reveal" },
            e("h1", null, page.title, e("span", { className: "dot" }, ".")),
            page.effective ? e("p", { className: "legal-effective" }, page.effective) : null,
            e("p", null, page.intro)
          )
        ),
        e("section", { className: "sec sec--sunken" },
          e("div", { className: "wrap article-single" },
            e("article", { className: "article-body reveal" },
              page.sections.map(([heading, text]) => e("section", { key: heading }, e("h2", null, heading), e("p", null, text)))
            )
          )
        )
      ),
      e("div", { className: "dark-theme" }, e(window.SiteFooter))
    );
  }

  mountWhenReady(() => ReactDOM.createRoot(document.getElementById("root")).render(e(LegalPage)));
})();
