<Layouts.app flash={@flash} current_scope={@current_scope}>
  <article class="mx-auto max-w-4xl">
    <div class="text-sm font-semibold text-brand">WHO NEED HELP</div>
    <h1 class="mt-2 text-4xl font-black">Privacy Policy</h1>
    <p class="mt-3 text-sm text-base-content/60">Effective: 21 July 2026</p>
    <p class="mt-5 leading-7 text-base-content/75">
      This policy explains how Who Need Help processes personal data when people use the
      voluntary-help service, including Google sign-in. Who Need Help is not an advertising
      network and does not sell personal data.
    </p>

    <div class="mt-10 space-y-8 leading-7 text-base-content/75">
      <section aria-labelledby="privacy-data">
        <h2 id="privacy-data" class="text-2xl font-bold text-base-content">Data we process</h2>
        <ul class="mt-3 list-disc space-y-2 pl-6">
          <li>
            <strong>Account and profile:</strong> email address, password hash if a password is
            added, display name, biography, locale, privacy and messaging preferences, optional
            thank-you URL, linked social profiles, confirmation status, and the time at which the
            registration rules were accepted.
          </li>
          <li>
            <strong>Help and activity content:</strong> requests, categories, descriptions,
            pickup instructions, selected locations and visibility, activity plans, matching and
            handover status, messages, participation decisions, reviews, category proposals, and
            votes.
          </li>
          <li>
            <strong>Trust and support:</strong> blocks, reports, moderation signals and decisions,
            support requests, account-deletion or data-export requests, and legal content-removal
            notices. These records may include the content, contact details, timestamps, and
            reviewer actions needed to handle the case.
          </li>
          <li>
            <strong>Location and tracking:</strong> a request or activity location that the user
            selects, plus exact location, accuracy, and capture time only when a participant
            actively starts live sharing. Tracking sessions retain summary evidence such as
            distance, sample count, movement, and proximity timestamps.
          </li>
          <li>
            <strong>Security and operation:</strong> session cookies, short-lived login and OAuth
            state, hashed rate-limit identifiers, request timestamps, and application or proxy
            logs needed to operate, diagnose, and protect the service.
          </li>
        </ul>
      </section>

      <section aria-labelledby="privacy-google">
        <h2 id="privacy-google" class="text-2xl font-bold text-base-content">
          Google sign-in data
        </h2>
        <p class="mt-3">
          Google sign-in requests the basic <code>email</code> and <code>profile</code> scopes.
          The service uses the Google account's stable identifier, verified email address, email
          verification result, and name to register, sign in, link the account, and seed the
          display name. It stores the stable Google identifier and normalized email with the local
          account. The application consumes provider tokens only while completing the sign-in
          exchange and does not persist Google access tokens or ID tokens.
        </p>
        <p class="mt-3">
          Google user data is not used for advertising, profiling outside Who Need Help, or sale.
          It is shared only with infrastructure processors when necessary to operate and secure
          the service, or when disclosure is legally required.
        </p>
      </section>

      <section aria-labelledby="privacy-use">
        <h2 id="privacy-use" class="text-2xl font-bold text-base-content">
          Why data is used
        </h2>
        <p class="mt-3">
          Data is used to authenticate accounts, publish and match requests, coordinate help or
          activities, deliver private chat and transactional email, apply the user's visibility
          choices, verify handovers, calculate reputation, prevent abuse, moderate content,
          respond to support and legal notices, maintain backups, and keep the service reliable.
        </p>
      </section>

      <section aria-labelledby="privacy-sharing">
        <h2 id="privacy-sharing" class="text-2xl font-bold text-base-content">
          Visibility and recipients
        </h2>
        <p class="mt-3">
          Other users see profile, request, activity, reputation, and location information only
          through the product rules and visibility settings. Exact match locations and private
          chats are limited to the relevant participants. Approved activity participants can see
          the activity's exact location and group chat. Public social links are visible as marked
          verified or unverified.
        </p>
        <p class="mt-3">
          Hosting, database, backup, transactional-email, and map-tile providers process the
          minimum data needed to provide their component of the service. External social-profile
          and thank-you links are controlled by their own operators and policies.
        </p>
      </section>

      <section aria-labelledby="privacy-retention">
        <h2 id="privacy-retention" class="text-2xl font-bold text-base-content">
          Retention and deletion
        </h2>
        <p class="mt-3">
          The current exact tracking point is deleted when sharing stops, the match ends, or
          either participant blocks the other. Derived movement and proximity evidence may remain
          to protect reputation integrity and investigate abuse. Login tokens and rate-limit
          buckets expire or are pruned according to their operational windows.
        </p>
        <p class="mt-3">
          Other account, content, communication, moderation, support, and legal records are kept
          while needed to provide the service, resolve disputes, prevent fraud, meet legal duties,
          or preserve the integrity of completed-help records. Backup copies may remain until the
          relevant backup expires. A deletion request does not erase records that must still be
          retained for those purposes.
        </p>
      </section>

      <section aria-labelledby="privacy-controls">
        <h2 id="privacy-controls" class="text-2xl font-bold text-base-content">Your controls</h2>
        <p class="mt-3">
          Account settings control profile, location visibility, direct messages, and connected
          Google sign-in. Live tracking is optional and can be stopped. You may submit a
          <.link href={~p"/support"} class="link font-semibold">privacy or data-export request</.link>
          or an <.link href={~p"/account/delete"} class="link font-semibold">account-deletion request</.link>.
          Use the
          <.link href={~p"/legal/content-removal"} class="link font-semibold">content-removal form</.link>
          for a specific item of illegal, infringing, or privacy-violating content.
        </p>
      </section>

      <section aria-labelledby="privacy-security">
        <h2 id="privacy-security" class="text-2xl font-bold text-base-content">
          Security, adults, and changes
        </h2>
        <p class="mt-3">
          The service uses access controls, hashed credentials and handover codes, encrypted HTTPS
          transport, restricted visibility, and audit records. No internet service can guarantee
          absolute security. Who Need Help is intended only for adults aged 18 or older.
        </p>
        <p class="mt-3">
          This page will be updated when data practices materially change. The effective date
          above identifies the current version.
        </p>
      </section>

      <section aria-labelledby="privacy-contact">
        <h2 id="privacy-contact" class="text-2xl font-bold text-base-content">Contact</h2>
        <p class="mt-3">
          Contact the Who Need Help operator through the <.link
            href={~p"/support"}
            class="link font-semibold"
          >public support form</.link>.
          Select “Privacy request”, “Data export”, or “Account deletion” so the request reaches the
          appropriate queue.
        </p>
      </section>
    </div>
  </article>
</Layouts.app>
