// Legal screens — Terms of Use and Privacy Policy

function LegalPage({ title, subtitle, children }) {
  return (
    <div style={{ padding: '52px 64px 80px', maxWidth: 820, margin: '0 auto' }}>
      <div className="k-label" style={{ marginBottom: 16, color: 'var(--k-ink-3)' }}>Legal</div>
      <h1 className="k-serif" style={{ fontSize: 42, margin: '0 0 8px', letterSpacing: '-0.025em', lineHeight: 1.08 }}>
        {title}
      </h1>
      <p style={{ fontSize: 13, color: 'var(--k-ink-4)', margin: '0 0 48px', fontFamily: 'var(--k-mono)' }}>
        Last updated: [DATE] · Effective date: [DATE]
      </p>
      <div style={{ fontSize: 14.5, lineHeight: 1.8, color: 'var(--k-ink-2)' }}>
        {children}
      </div>
    </div>
  );
}

function H2({ children }) {
  return (
    <h2 className="k-serif" style={{ fontSize: 21, margin: '44px 0 10px', letterSpacing: '-0.015em', color: 'var(--k-ink)', lineHeight: 1.2 }}>
      {children}
    </h2>
  );
}

function H3({ children }) {
  return (
    <h3 style={{ fontSize: 14, fontWeight: 600, margin: '24px 0 6px', color: 'var(--k-ink)', letterSpacing: '0.01em' }}>
      {children}
    </h3>
  );
}

function P({ children, style }) {
  return <p style={{ margin: '0 0 14px', ...style }}>{children}</p>;
}

function UL({ children }) {
  return (
    <ul style={{ paddingLeft: 22, margin: '8px 0 14px', display: 'flex', flexDirection: 'column', gap: 6 }}>
      {children}
    </ul>
  );
}

function LegalTable({ headers, rows }) {
  return (
    <div style={{ overflowX: 'auto', margin: '14px 0 20px' }}>
      <table style={{ width: '100%', borderCollapse: 'collapse', fontSize: 13.5 }}>
        <thead>
          <tr>
            {headers.map((h, i) => (
              <th key={i} style={{ textAlign: 'left', padding: '8px 12px', background: 'var(--k-bg-2)', borderBottom: '2px solid var(--k-line)', fontWeight: 600, color: 'var(--k-ink)', whiteSpace: 'nowrap' }}>{h}</th>
            ))}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, i) => (
            <tr key={i} style={{ borderBottom: '1px solid var(--k-line)' }}>
              {row.map((cell, j) => (
                <td key={j} style={{ padding: '8px 12px', color: 'var(--k-ink-2)', verticalAlign: 'top' }}>{cell}</td>
              ))}
            </tr>
          ))}
        </tbody>
      </table>
    </div>
  );
}

function A({ href, children }) {
  return <a href={href} target="_blank" rel="noopener noreferrer" style={{ color: 'var(--k-accent)', textDecoration: 'none' }}>{children}</a>;
}

// ─── Terms of Service ────────────────────────────────────────────────────────

function TermsScreen({ onEnter }) {
  return (
    <LegalPage title="Terms of Service">

      <H2>1. Agreement to Terms</H2>
      <P>By accessing or using Kalibr at [PRODUCT_URL] ("the Platform"), you agree to be bound by these Terms of Service ("Terms"). If you do not agree to these Terms, do not use the Platform.</P>
      <P>These Terms constitute a legally binding agreement between you and <strong style={{ color: 'var(--k-ink)' }}>Aryan Shah</strong> ("we", "us", "our"), the operator of Kalibr.</P>
      <P>If you are using the Platform on behalf of an organisation, you represent that you have authority to bind that organisation to these Terms.</P>

      <H2>2. What Kalibr Is</H2>
      <P>Kalibr is a psychometric assessment platform. It measures working-style preferences and interpersonal dynamics through a validated personality assessment battery and produces:</P>
      <UL>
        <li>A personal psychometric profile report across 10 dimensions</li>
        <li>An AI constitution — a personalised system prompt for use with LLM assistants</li>
        <li>Pairwise compatibility reports between two profiled individuals (paid tier)</li>
      </UL>
      <P><strong style={{ color: 'var(--k-ink)' }}>Kalibr is not:</strong></P>
      <UL>
        <li>A clinical assessment tool</li>
        <li>A diagnostic instrument for any medical or psychological condition</li>
        <li>A hiring decision tool</li>
        <li>A measure of intelligence, cognitive ability, skill, education, or training</li>
        <li>A predictor of job performance</li>
      </UL>
      <P>Scores and reports are starting points for self-understanding and team development. They are not fixed characterisations of any individual. No score is better or worse than another.</P>

      <H2>3. Eligibility</H2>
      <P>You must be at least 18 years old to use the Platform. By using Kalibr, you represent that you are 18 or older.</P>
      <P>The Platform is available globally. It is your responsibility to ensure that your use of the Platform complies with laws applicable in your jurisdiction.</P>

      <H2>4. Accounts and Access</H2>
      <H3>4.1 Respondent access</H3>
      <P>If you are invited to take an assessment by an organisation or operator, you access the Platform via a unique token-based link. No account registration is required. Your token expires 72 hours after generation. You may resume an incomplete assessment within that window using the same link.</P>
      <H3>4.2 Paid user accounts</H3>
      <P>If you register directly on the Platform, you must provide accurate information. You are responsible for maintaining the confidentiality of your account credentials and for all activity that occurs under your account.</P>
      <H3>4.3 Admin accounts</H3>
      <P>Administrator access is restricted to authorised email addresses and requires Google OAuth authentication. You must not share admin credentials with any unauthorised person.</P>
      <H3>4.4 Account termination</H3>
      <P>We reserve the right to suspend or terminate accounts that violate these Terms, engage in fraudulent activity, or where we determine in our sole discretion that continued access poses a risk to the Platform or other users.</P>

      <H2>5. The Assessment</H2>
      <H3>5.1 Honest responses</H3>
      <P>The psychometric assessment is designed to measure how you naturally work and think. The validity of your results depends on honest responses. You agree to answer all items truthfully and based on your genuine tendencies, not how you think you should respond.</P>
      <P>Attempts to game, manipulate, or intentionally distort the assessment are a violation of these Terms and will affect the validity of your results.</P>
      <H3>5.2 One assessment per person</H3>
      <P>Each assessment link is intended for one individual. You must not complete an assessment on behalf of another person, share your link with another person, or allow another person to complete your assessment.</P>
      <H3>5.3 Assessment validity</H3>
      <P>Assessment responses are subject to automated quality checks. Where responses indicate straightlining, excessive speed, or other quality concerns, results will be flagged. In cases where quality flags indicate invalidation, your results may not be generated or may be withheld pending review.</P>
      <H3>5.4 No re-sits to obtain a different result</H3>
      <P>You must not retake the assessment with the intention of obtaining a different score. Where we detect this pattern, we reserve the right to use your first completed assessment as the valid record.</P>

      <H2>6. Reports and Outputs</H2>
      <H3>6.1 Accuracy and limitations</H3>
      <P>Report narratives are generated by a large language model (Claude, operated by Anthropic, Inc.) using your scored profile as input. While the underlying scoring is deterministic and algorithmic, narrative text involves generative AI and may vary slightly across runs. We do not guarantee that narrative descriptions will be verbatim identical across report generations.</P>
      <P>Reports describe tendencies derived from self-reported responses at the time of assessment. They do not predict future behaviour with certainty and should not be treated as definitive characterisations of any individual.</P>
      <H3>6.2 AI constitution</H3>
      <P>The AI constitution output is a system prompt designed for use with LLM assistants. Its effectiveness depends on the LLM you use it with, your individual use patterns, and other factors outside our control. We do not guarantee specific outcomes from use of the AI constitution.</P>
      <H3>6.3 Pairwise reports</H3>
      <P>Pairwise compatibility scores are based on a proprietary algorithm that is theoretically grounded in published personality and team-performance research. The algorithm has not been independently validated against prospective outcome data. Pairwise scores should be treated as one input into decisions, not as determinative conclusions. We make no warranties that pairwise scores will predict the quality of working relationships.</P>
      <H3>6.4 Your reports are yours</H3>
      <P>Your personal profile report belongs to you. You may share it with whoever you choose. We will not share your individual report with third parties without your consent, except as described in our Privacy Policy (organisational operators who invite you have access to your scored outputs as described therein).</P>

      <H2>7. Permitted Use</H2>
      <P>You may use Kalibr for personal self-understanding and development, team formation and communication, co-founder and partner compatibility assessment, configuring AI assistants with your personalised system prompt, and professional coaching contexts.</P>
      <H3>7.1 Prohibited uses</H3>
      <UL>
        <li><strong style={{ color: 'var(--k-ink)' }}>Hiring decisions as a primary or sole criterion.</strong> Kalibr is not validated as a hiring screening tool. Using Kalibr scores as a basis for employment decisions, candidate rejection, or offer withdrawal may expose you to legal liability in many jurisdictions and is prohibited under these Terms.</li>
        <li><strong style={{ color: 'var(--k-ink)' }}>Discriminatory purposes.</strong> You must not use scores or reports to discriminate against individuals on the basis of any protected characteristic.</li>
        <li><strong style={{ color: 'var(--k-ink)' }}>Coercive assessment.</strong> You must not require individuals to complete the assessment as a condition of employment, promotion, or contract without their informed consent and without complying with applicable employment law in your jurisdiction.</li>
        <li><strong style={{ color: 'var(--k-ink)' }}>Reverse engineering.</strong> You must not attempt to reverse-engineer the scoring algorithm, dimension formulas, or any proprietary component of the Platform.</li>
        <li><strong style={{ color: 'var(--k-ink)' }}>Data scraping.</strong> You must not use automated tools to extract data from the Platform.</li>
        <li><strong style={{ color: 'var(--k-ink)' }}>Resale or redistribution.</strong> You must not resell, sublicense, or redistribute reports, scored outputs, or any Platform content without our written permission.</li>
        <li><strong style={{ color: 'var(--k-ink)' }}>Misrepresentation.</strong> You must not present Kalibr reports as clinical assessments, medical diagnoses, validated hiring tools, or as having predictive validity that we have not claimed.</li>
      </UL>

      <H2>8. Organisational and Enterprise Use</H2>
      <P>If you are an organisation deploying Kalibr for your employees, clients, or programme participants:</P>
      <UL>
        <li>You are responsible for obtaining informed consent from all individuals you invite before sending them an assessment link</li>
        <li>You must inform individuals that their scored outputs will be visible to you as the operator</li>
        <li>You must not use Kalibr as a hiring screening or pre-employment selection tool</li>
        <li>You must comply with all applicable data protection and employment laws in your jurisdiction</li>
        <li>You are responsible for ensuring that individuals under 18 are not invited to take the assessment</li>
      </UL>
      <P>We reserve the right to terminate organisational access where we determine that the Platform is being used in violation of these Terms.</P>

      <H2>9. Intellectual Property</H2>
      <H3>9.1 Platform IP</H3>
      <P>All platform algorithms, dimension composites, pairwise scoring engine, AI constitution engine, individual blind spot engine, scoring rules, and report templates are proprietary to Aryan Shah. All rights reserved. The platform code, design, and software are protected by applicable intellectual property laws.</P>
      <H3>9.2 Assessment items</H3>
      <P>Base assessment items are derived from the International Personality Item Pool (IPIP), which is in the public domain. IPIP items are not our intellectual property. The way we select, combine, score, and interpret those items — and all derived outputs — is proprietary.</P>
      <H3>9.3 Your content</H3>
      <P>You retain ownership of your assessment responses. By submitting responses, you grant us a non-exclusive, worldwide licence to process, store, and use your responses and scored outputs to provide the Platform services, improve scoring accuracy, and build anonymised population-level insights. This licence survives deletion of your account for the purpose of anonymised aggregate research.</P>
      <H3>9.4 Reports</H3>
      <P>Reports generated from your profile are for your personal and professional use. You may share them freely. You may not sell them or present them as independently certified assessments.</P>

      <H2>10. Payment and Refunds</H2>
      <H3>10.1 Pricing</H3>
      <P>Current pricing is displayed at [PRODUCT_URL]/pricing. We reserve the right to change pricing at any time. Price changes will not affect purchases already made.</P>
      <H3>10.2 What is included</H3>
      <P>The free tier includes assessment completion and a limited preview of your results. The paid individual tier (currently $50 one-time) includes the full profile report and AI constitution. Pairwise reports require both individuals to hold individual paid profiles.</P>
      <H3>10.3 Refunds</H3>
      <P>Because our core deliverable — the scored profile and report — is generated and delivered immediately upon payment, we generally do not offer refunds after a report has been generated and accessed.</P>
      <P>If you experience a technical failure that prevented you from accessing your report, contact us at [CONTACT_EMAIL] within 14 days and we will resolve the issue or provide a refund at our discretion.</P>
      <P>If you are located in the UK or EU, you have a statutory right to cancel within 14 days of purchase. This right is waived if you have accessed the digital content (your report) within the cancellation period, which you expressly acknowledge by proceeding with payment.</P>

      <H2>11. Disclaimers and Limitation of Liability</H2>
      <H3>11.1 No warranty</H3>
      <P>The Platform is provided "as is" and "as available". We make no warranties, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement.</P>
      <UL>
        <li>Reports will accurately predict your behaviour in any specific situation</li>
        <li>Pairwise scores will predict the success or failure of any professional relationship</li>
        <li>The AI constitution will produce specific outcomes when used with any LLM</li>
        <li>The Platform will be uninterrupted, error-free, or free of security vulnerabilities</li>
      </UL>
      <H3>11.2 Limitation of liability</H3>
      <P>To the maximum extent permitted by applicable law, Aryan Shah's total liability to you for any claim arising out of or relating to the Platform or these Terms — whether in contract, tort, or otherwise — is limited to the amount you paid to us in the 12 months preceding the claim, or INR 10,000 (approximately £100), whichever is lower.</P>
      <P>We are not liable for any employment, hiring, partnership, or professional decisions made based on Kalibr reports; indirect, incidental, consequential, or punitive damages; loss of profit, revenue, data, or goodwill; or decisions made by any third party based on your Kalibr scores.</P>
      <H3>11.3 Indemnification</H3>
      <P>You agree to indemnify and hold harmless Aryan Shah from any claims, damages, or expenses (including reasonable legal fees) arising from your violation of these Terms, your misuse of the Platform, or your use of Kalibr scores in employment or other high-stakes decisions prohibited under Section 7.</P>

      <H2>12. Governing Law and Disputes</H2>
      <P>These Terms are governed by the laws of India. Any disputes arising out of or relating to these Terms or the Platform will be subject to the exclusive jurisdiction of the courts of [CITY, India].</P>
      <P>If you are located in the UK or EU, nothing in these Terms affects your rights as a consumer under applicable mandatory consumer protection laws in your jurisdiction.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Informal resolution:</strong> Before initiating any legal proceedings, you agree to contact us at [CONTACT_EMAIL] and give us 30 days to attempt to resolve the dispute informally.</P>

      <H2>13. Changes to These Terms</H2>
      <P>We may update these Terms from time to time. When we make material changes, we will notify you by email at least 14 days before the changes take effect. Continued use of the Platform after the effective date constitutes acceptance of the updated Terms.</P>

      <H2>14. Miscellaneous</H2>
      <P><strong style={{ color: 'var(--k-ink)' }}>Severability.</strong> If any provision of these Terms is found to be unenforceable, the remaining provisions will continue in full force and effect.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Entire agreement.</strong> These Terms, together with our Privacy Policy, constitute the entire agreement between you and Aryan Shah with respect to the Platform.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>No waiver.</strong> Our failure to enforce any provision of these Terms does not constitute a waiver of our right to enforce it in the future.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Assignment.</strong> You may not assign your rights under these Terms without our written consent. We may assign our rights and obligations in connection with a merger, acquisition, or sale of assets.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Force majeure.</strong> We are not liable for any failure or delay in performance due to circumstances beyond our reasonable control.</P>

      <H2>15. Contact</H2>
      <P>For questions about these Terms: <strong style={{ color: 'var(--k-ink)' }}>Aryan Shah</strong> · <a href="mailto:[CONTACT_EMAIL]" style={{ color: 'var(--k-accent)', textDecoration: 'none' }}>[CONTACT_EMAIL]</a></P>

      <div style={{ marginTop: 48, paddingTop: 20, borderTop: '1px solid var(--k-line)', fontSize: 12.5, color: 'var(--k-ink-4)', lineHeight: 1.7 }}>
        Kalibr is operated by Aryan Shah. © 2026 Aryan Shah. All rights reserved. Base assessment items IPIP public domain. Platform algorithms, dimension composites, scoring engine, AI constitution engine, and individual blind spot engine are proprietary.
      </div>
    </LegalPage>
  );
}

// ─── Privacy Policy ──────────────────────────────────────────────────────────

function PrivacyScreen({ onEnter }) {
  return (
    <LegalPage title="Privacy Policy">

      <H2>1. Who We Are</H2>
      <P>Kalibr is a psychometric assessment platform operated by <strong style={{ color: 'var(--k-ink)' }}>Aryan Shah</strong> ("we", "us", "our"). We are based in India and serve users globally.</P>
      <P>Contact: <a href="mailto:[CONTACT_EMAIL]" style={{ color: 'var(--k-accent)', textDecoration: 'none' }}>[CONTACT_EMAIL]</a> · [PRODUCT_URL]. We will respond to all data-related enquiries within 30 days.</P>

      <H2>2. Scope of This Policy</H2>
      <P>This policy applies to all personal data collected through the Kalibr assessment platform at [PRODUCT_URL] and any associated web pages, reports, and services operated by Aryan Shah. It does not apply to third-party services you may access through links from the platform.</P>

      <H2>3. What Data We Collect</H2>
      <H3>3.1 Data you provide directly</H3>
      <P><strong style={{ color: 'var(--k-ink)' }}>Account and profile data</strong></P>
      <UL>
        <li>Name and email address (provided at sign-up or when invited by an organisation)</li>
        <li>Role, job context, and organisation name (provided during onboarding)</li>
        <li>Pilot access codes (if applicable)</li>
      </UL>
      <P><strong style={{ color: 'var(--k-ink)' }}>Assessment responses</strong></P>
      <UL>
        <li>Your responses to all Likert-scale items in the assessment battery (approximately 165–212 items depending on your assessment version)</li>
        <li>Your responses to multiple-choice AI interaction preference items (25 items)</li>
        <li>Your responses to the perseverance and resilience scales (Grit-S, BRCS — 12 items)</li>
      </UL>
      <P><strong style={{ color: 'var(--k-ink)' }}>Assessment metadata</strong></P>
      <UL>
        <li>Time taken to complete each section</li>
        <li>Timestamp of assessment start and completion</li>
        <li>Device type and browser (collected automatically)</li>
      </UL>

      <H3>3.2 Data we derive from your responses</H3>
      <P><strong style={{ color: 'var(--k-ink)' }}>Scored outputs</strong> — Dimension scores across 10 personality dimensions (0–100 scale), supplementary scores for grit, resilience coping, and work ethic, and AI interaction preference classifications.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Risk-signal layer</strong> — We collect responses to a set of items that generate a risk-signal score. This score is used algorithmically by the platform operator to flag profiles that may carry elevated risk in high-authority professional roles. This score is never included in your personal report and is never shared with you. It is visible to the platform operator only, consistent with the intended professional use of this instrument. By completing the assessment, you consent to this data being collected and used in this way.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>AI Constitution</strong> — A personalised system prompt derived algorithmically from your dimension scores and AI preference responses. Included in your personal report if you unlock the paid tier.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Pairwise compatibility scores</strong> — If you participate in a pairwise compatibility assessment, a compatibility score is computed between your scored profile and the profile of one other named person. The pairwise output is visible to both participants and to the operator who initiated the pairing.</P>

      <H3>3.3 Data collected automatically</H3>
      <UL>
        <li>IP address</li>
        <li>Browser type and version</li>
        <li>Operating system</li>
        <li>Pages visited and time spent</li>
        <li>Assessment session tokens</li>
      </UL>
      <P>We do not use tracking pixels, third-party advertising cookies, or behavioural advertising tools.</P>

      <H2>4. Why We Collect This Data and the Legal Basis</H2>
      <LegalTable
        headers={['Purpose', 'Data used', 'Legal basis']}
        rows={[
          ['Delivering the assessment and computing your scores', 'Assessment responses, metadata', 'Performance of contract / Consent'],
          ['Generating your personal profile report', 'Dimension scores, AI preferences', 'Performance of contract'],
          ['Generating pairwise compatibility reports', 'Both participants\' scored profiles', 'Consent (both parties must complete)'],
          ['Operating the risk-signal layer', 'Risk-signal item responses', 'Legitimate interests (operator safety screening)'],
          ['Sending your report and account communications', 'Email address', 'Performance of contract'],
          ['Improving the platform and validating scoring accuracy', 'Anonymised aggregated scores', 'Legitimate interests'],
          ['Security, fraud prevention, abuse detection', 'IP address, session tokens', 'Legitimate interests'],
        ]}
      />
      <P><strong style={{ color: 'var(--k-ink)' }}>India (DPDP Act 2023):</strong> We process your personal data as a Data Fiduciary under the Digital Personal Data Protection Act 2023.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>International users (UK GDPR / EU GDPR):</strong> If you are located in the UK or EEA, we process your data under Article 6(1)(b) (contract performance), Article 6(1)(a) (consent), and Article 6(1)(f) (legitimate interests). Psychometric profile data may constitute special category data under Article 9 — where this applies, we rely on your explicit consent provided at the start of the assessment.</P>

      <H2>5. How We Use AI and Third-Party Processing</H2>
      <H3>Anthropic API</H3>
      <P>Your scored profile data (dimension scores, AI preferences, and supplementary scores) is transmitted to Anthropic, Inc. via their API to generate the narrative sections of your personal report and your AI constitution. This transmission includes your name, role context, and scored profile. Anthropic processes this data as a data processor on our behalf. Anthropic does not use API inputs to train their models by default. See <A href="https://www.anthropic.com/legal/privacy">anthropic.com/legal/privacy</A>.</P>
      <H3>Railway (hosting)</H3>
      <P>Our platform is hosted on Railway Corp. All data at rest is stored on Railway's PostgreSQL infrastructure. Railway does not access your personal data except for infrastructure operations. See <A href="https://railway.app/legal/privacy">railway.app/legal/privacy</A>.</P>
      <H3>Resend (email)</H3>
      <P>We use Resend to send transactional emails. Your email address is transmitted to Resend for this purpose. See <A href="https://resend.com/privacy">resend.com/privacy</A>.</P>
      <P>We do not sell your data to any third party. We do not share your data with advertising networks. We do not use your data to train AI models operated by us.</P>

      <H2>6. Data Retention</H2>
      <LegalTable
        headers={['Data type', 'Retention period']}
        rows={[
          ['Raw assessment responses', '36 months from date of completion'],
          ['Scored profiles and reports', 'Indefinitely, unless you request deletion'],
          ['Account data (name, email)', 'Until account deletion or deletion request'],
          ['Risk-signal layer scores', 'Same as scored profiles — operator-facing only'],
          ['Pairwise reports', 'Indefinitely, unless both participants request deletion'],
          ['Email delivery records', '12 months'],
          ['IP address and session logs', '90 days'],
        ]}
      />
      <P>After the applicable retention period, data is permanently deleted from our systems and from all third-party processors.</P>

      <H2>7. Data Security</H2>
      <UL>
        <li>All data is encrypted in transit using TLS 1.2 or higher</li>
        <li>All data at rest is encrypted at the database level</li>
        <li>Risk-signal layer scores are stored server-side only and never transmitted to respondent-facing interfaces</li>
        <li>Assessment sessions are token-gated — tokens are single-use with a 72-hour expiry</li>
        <li>Admin access requires Google OAuth authentication restricted to authorised email addresses</li>
        <li>We do not store payment card data — payments are processed by third-party payment providers</li>
      </UL>
      <P>No security system is impenetrable. In the event of a data breach likely to result in a risk to your rights and freedoms, we will notify you and relevant regulatory authorities as required by applicable law.</P>

      <H2>8. Your Rights</H2>
      <P><strong style={{ color: 'var(--k-ink)' }}>Right to access</strong> — You may request a copy of all personal data we hold about you, including your raw assessment responses, dimension scores, and any reports generated.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Right to correction</strong> — You may request correction of inaccurate personal data.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Right to erasure</strong> — You may request deletion of your personal data. We will delete your account data, assessment responses, and reports within 30 days of a verified request. Note that anonymised aggregate data used for platform improvement cannot be identified and therefore cannot be deleted. You may also delete your account directly from Settings at any time.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Right to data portability</strong> — You may request your scored profile and assessment responses in a machine-readable format (JSON or CSV).</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Right to withdraw consent</strong> — Where processing is based on consent, you may withdraw it at any time. This does not affect processing that occurred before withdrawal.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>Right to object</strong> — You may object to processing based on legitimate interests. We will assess your objection and respond within 30 days.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>India (DPDP Act 2023):</strong> You have the right to access, correct, and erase your personal data, and to nominate a person to exercise these rights on your behalf in the event of death or incapacity.</P>
      <P><strong style={{ color: 'var(--k-ink)' }}>UK/EU users:</strong> You also have the right to lodge a complaint with the UK ICO at <A href="https://ico.org.uk">ico.org.uk</A> or your relevant national supervisory authority.</P>
      <P>To exercise any of these rights, contact us at [CONTACT_EMAIL] with the subject line "Data Rights Request".</P>

      <H2>9. Children</H2>
      <P>Kalibr is not intended for use by individuals under the age of 18. We do not knowingly collect personal data from anyone under 18. If you believe we have inadvertently collected data from a minor, contact us immediately at [CONTACT_EMAIL] and we will delete it.</P>

      <H2>10. International Data Transfers</H2>
      <P>Your data is stored on servers operated by Railway Corp, which may be located outside India. When we transfer your data internationally, we ensure appropriate safeguards are in place:</P>
      <UL>
        <li>Anthropic (United States): data transmitted via API for report generation</li>
        <li>Railway (United States): data stored for platform hosting</li>
        <li>Resend (United States): email address transmitted for transactional email</li>
      </UL>
      <P>Where required by applicable law, we rely on standard contractual clauses or equivalent mechanisms to ensure your data is protected when transferred internationally.</P>

      <H2>11. Cookies and Tracking</H2>
      <LegalTable
        headers={['Cookie', 'Purpose', 'Duration']}
        rows={[
          ['Session token', 'Maintains your assessment session', '72 hours'],
          ['Authentication token', 'Maintains admin login state', '30 days'],
        ]}
      />
      <P>We do not use advertising cookies, tracking pixels, or cross-site tracking technologies. We do not use Google Analytics or similar behavioural analytics tools.</P>

      <H2>12. Organisational Use</H2>
      <P>If you take the Kalibr assessment as part of an organisational pilot or enterprise deployment:</P>
      <UL>
        <li>The organisation that invited you ("the operator") has access to your scored profile and any reports generated</li>
        <li>The operator does not have access to your individual assessment responses — only to your scored outputs</li>
        <li>The risk-signal layer scores are visible to the operator</li>
        <li>Your profile remains yours — you may request a copy or deletion at any time regardless of whether the organisation continues to use the platform</li>
        <li>If you leave the organisation, your profile data remains on Kalibr and accessible to you. It is not automatically transferred to or deleted by the organisation</li>
      </UL>

      <H2>13. Changes to This Policy</H2>
      <P>We may update this policy from time to time. When we make material changes, we will notify you by email at least 14 days before the changes take effect. Continued use of the platform after the effective date constitutes acceptance of the updated policy.</P>

      <H2>14. Contact</H2>
      <P>For any questions, requests, or concerns about this policy or how we handle your data: <strong style={{ color: 'var(--k-ink)' }}>Aryan Shah</strong> · <a href="mailto:[CONTACT_EMAIL]" style={{ color: 'var(--k-accent)', textDecoration: 'none' }}>[CONTACT_EMAIL]</a> · [PRODUCT_URL]</P>

      <div style={{ marginTop: 48, paddingTop: 20, borderTop: '1px solid var(--k-line)', fontSize: 12.5, color: 'var(--k-ink-4)', lineHeight: 1.7 }}>
        Kalibr is operated by Aryan Shah. Base assessment items derived from the International Personality Item Pool (IPIP), which is in the public domain. Platform algorithms, dimension composites, scoring engine, and report engine are proprietary. © 2026 Aryan Shah. All rights reserved.
      </div>
    </LegalPage>
  );
}

Object.assign(window, { TermsScreen, PrivacyScreen });
