# Cookie & Local Storage Policy

**Effective Date:** September 17, 2026  
**Last Updated:** September 17, 2026

This Cookie & Local Storage Policy explains how **Esencja** ("we", "us", or "our") uses cookies, browser local storage (`localStorage`), and related web technologies when you visit our website ([esencja.app](https://esencja.app)).

This policy is issued in compliance with **Directive 2002/58/EC (ePrivacy Directive)**, Regulation (EU) 2016/679 (GDPR / RODO), and Article 173 of the Polish Telecommunications Act.

---

## 1. What Are Cookies and Local Storage?

* **Cookies:** Small text files placed on your computer or mobile device by websites that you visit. They are widely used to make websites work efficiently and provide basic state preservation.
* **HTML5 Local Storage (`localStorage`):** A modern client-side storage mechanism allowing web applications to store key-value data directly in your browser. Unlike traditional cookies, `localStorage` data does not automatically travel in HTTP request headers on every page request, resulting in superior performance, reduced bandwidth consumption, and enhanced privacy.

---

## 2. Our Privacy-First Architecture

Esencja is architected as a **privacy-first reading platform**. We do **not** use invasive third-party tracking cookies, user surveillance beacons, or cross-site advertising networks. Most of our persistent functionality operates purely client-side via `localStorage`, so your reading habits remain on your device.

---

## 3. Comprehensive Inventory of Storage Keys Used

The following table provides a complete, transparent audit of all client-side storage keys employed on `esencja.app`:

| Key / Identifier | Storage Type | Category | Purpose | Expiration / Lifespan |
|---|---|---|---|---|
| `esencja-cookie-consent-v1` | `localStorage` | **Strictly Necessary** | Stores your cookie preference choices and timestamp to prevent re-prompting on every page. | 365 days / Persistent |
| `esencja-theme` | `localStorage` | **Strictly Necessary** | Remembers your visual theme choice (`dark` or `light`) to prevent screen flashing. | Persistent |
| `esencja-language` | `localStorage` | **Strictly Necessary** | Preserves your preferred interface language (`pl` or `en`). | Persistent |
| `esencja-progress-v1` | `localStorage` | **Functional (Recommended)** | Tracks your reading percentage progress, finished book statuses, and bookmarks. | Persistent |
| `esencja-streak-v1` | `localStorage` | **Functional (Recommended)** | Computes your daily reading streak and renders the 12-week (84-tile) focus heatmap. | Persistent |
| `esencja-playlists-v1` | `localStorage` | **Functional (Recommended)** | Saves your custom audio listening queue and user-created learning playlists. | Persistent |
| `esencja-search-v1` | `localStorage` | **Functional (Recommended)** | Remembers your recent 6 search queries locally for faster command bar navigation. | Persistent |
| `_cf_bm`, `cf_clearance` | HTTP Cookie | **Strictly Necessary** | Cloudflare security cookies to manage bot mitigation and DDoS protection on audio streaming. | 30 minutes to 1 year |

---

## 4. Legal Grounds for Storage

* **Strictly Necessary Storage:** Pursuant to Article 5(3) of Directive 2002/58/EC and national transpositions (e.g., Art. 173 ust. 3 of Polish Telecommunications Law), strictly necessary storage does not require prior consent because it is technical storage used for the sole purpose of carrying out the transmission of a communication or strictly necessary to provide an Information Society Service explicitly requested by you.
* **Functional & Analytics Storage:** Subject to your **freely given, specific, informed, and unambiguous opt-in consent** under Article 6(1)(a) of the GDPR. You can accept, reject, or customize these preferences at any time.

---

## 5. How to Manage and Revoke Your Consent

You have full control over how cookies and local storage are utilized:

### A. Via Our Interactive Preference Center
You can update your choices at any moment by clicking the **"Cookie Settings"** button located in the footer of any page, or by clicking the button below:

```html
<!-- Interactive Consent Trigger -->
<button onclick="window.dispatchEvent(new CustomEvent('open-cookie-settings'))">
  Manage Cookie Preferences
</button>
```

### B. Through Your Web Browser
You can configure your browser to block, alert you to, or delete cookies and site data:
* **Safari:** Settings > Privacy > Manage Website Data
* **Google Chrome:** Settings > Privacy and Security > Cookies and other site data
* **Mozilla Firefox:** Settings > Privacy & Security > Cookies and Site Data
* **Microsoft Edge:** Settings > Cookies and site permissions

*Note: Clearing browser site data will reset your local reading progress, custom playlists, and reading streak.*

---

## 6. Third-Party CDNs and Media Delivery

We deliver audio companions and static resources via high-speed global edge networks:
* **Cloudflare R2:** Used for high-fidelity audio chapter streaming. Cloudflare may process network-level security parameters solely for DDoS mitigation and stream delivery integrity.

---

## 7. Contact Us

If you have questions regarding this Cookie & Local Storage Policy:
* **Email:** `privacy@esencja.app`
* **Address:** Esencja / Zordon Hub Operations, Warsaw, Poland
