## Implementation

Everything below is generated from one token source and versioned together. Current version: 1.0.0.

| File | What it is | Use it when |
| --- | --- | --- |
| [`/parea.css`](https://brand.parea.health/parea.css) | Fonts, tokens, base styles and all `pa-` components in one file | A static page, a prototype, an email preview, anything without a framework |
| [`/tokens.css`](https://brand.parea.health/tokens.css) | CSS custom properties only | You bring your own components |
| [`/arc-theme.css`](https://brand.parea.health/arc-theme.css) | Token overrides for the Arc component library | A Parea React product built on Arc (admin, app, Agenda, website) |
| [`/tailwind.css`](https://brand.parea.health/tailwind.css) | Tailwind CSS v4 `@theme` mapping | A Tailwind project |
| [`/r/parea.json`](https://brand.parea.health/r/parea.json) | shadcn/ui registry theme | A shadcn/ui project |
| [`/tokens.json`](https://brand.parea.health/tokens.json) | Design Tokens Format Module 2025.10 | Figma, Style Dictionary, native apps |
| [`/assets/icons.svg`](https://brand.parea.health/assets/icons.svg) | Lucide subset and the Parea mark as symbols | Static pages served from the same origin |
| [`/assets/logo/`](https://brand.parea.health/#logo) | Logo, mark, wordmark and app icon as SVG | Anywhere the logo appears |

### Plain HTML

```html
<!doctype html>
<html lang="de-AT" data-theme="light" data-audience="patient">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://brand.parea.health/parea.css">
</head>
<body class="pa-patient-frame">
  <header class="pa-patient-header">
    <span>Ordination am Park</span>
    <a class="pa-patient-phone" href="tel:+4312345678">+43 1 234 56 78</a>
  </header>
  <main class="pa-patient-main pa-page pa-page--patient pa-stack pa-gap-6">
    <h1>Welche Uhrzeit passt Ihnen?</h1>
    <div class="pa-slots">
      <button class="pa-slot" type="button" aria-pressed="false">09:30</button>
      <button class="pa-slot" type="button" aria-pressed="true">10:15</button>
    </div>
    <div class="pa-actions"><button class="pa-button pa-button--lg">Weiter</button></div>
  </main>
  <footer class="pa-patient-footer">Online-Terminbuchung mit Parea Agenda</footer>
</body>
</html>
```

Set `data-audience` and `data-theme` on `<html>`. Put buttons in `pa-actions` so they keep their own width. For production, copy `parea.css` and the fonts into the project instead of hot-linking. The two reference screens on the portal, `/examples/booking/` and `/examples/praxis/`, are complete pages built this way: read their source.

### React with Arc

All Parea products use Arc components (uiarc.dev) with CSS Modules. Arc is themed by overriding tokens, never by editing component CSS.

```ts
// main.tsx
import '@fontsource-variable/google-sans-flex/rond.css';
import '@fontsource-variable/google-sans-code';
import './components/arc/foundation.css';
import './parea/arc-theme.css'; // a copy of https://brand.parea.health/arc-theme.css, after the foundation
```

```html
<html lang="de-AT" data-theme="light" data-accent="neutral" data-audience="practice">
```

- Keep `data-accent="neutral"` or any other value: the theme resolves every accent to Parea Grün.
- Wrap patient routes in `<div data-audience="patient">`. Arc components read the same `--text-*`, `--control-height-*` and `--radius-*` tokens and grow with it.
- Arc's primary button is already Tanne because it uses `--foreground`.
- For assistant content there is no Arc component. Build it from tokens: `--assistant-subtle` background, `--assistant-border` outline, `--radius-panel`, label in `--assistant-strong`. Arc's `badge` with `tone="violet"` renders as the assistant tone and is reserved for "Entwurf".
- Icons: `lucide-react` with `strokeWidth={1.75}` at 16, 20 or 24.
- Motion: Arc's `spring.smooth` (no overshoot). Do not use presets that bounce.
- The theme does not change `--space-*`, so each product keeps its Arc density.
- Remove product-level overrides of `--background`, `--surface`, `--font-body` and `--font-display` (the app and admin set these in `src/styles.css`) or import the theme after them. The theme has to be the last word on colour and type.
- Use the Tanne logo file from the portal in light products and the white one in dark products, instead of inverting a black logo with a CSS filter.

### Tailwind CSS v4

```css
@import "tailwindcss";
@import "./parea/tokens.css";
@import "./parea/tailwind.css";
```

Utilities then read the live variables: `bg-surface text-foreground border-border rounded-control`, `text-fg-secondary`, `bg-accent-subtle text-accent-strong`, `bg-assistant-subtle`, `font-display`, `ease-standard`. Ramps are available as `bg-green-200`, `text-pine-900`. Dark theme and patient audience still switch with the data attributes.

### shadcn/ui

```bash
npx shadcn@latest add https://brand.parea.health/r/parea.json
```

This maps Parea onto shadcn's variable names (`primary` is Tanne, `ring` is the focus colour, `destructive` is danger) and adds `brand`, `mint`, `sand`, `assistant`, `success`, `warning` and `info` colours.

### Native and design tools

`tokens.json` follows the Design Tokens Format Module 2025.10. Colours are OKLCH with a hex fallback. Each semantic colour carries its dark value under `$extensions["health.parea.mode"].dark` and its CSS name under `$extensions["health.parea.css"]`. In SwiftUI and similar, map the semantic names one to one and use the patient audience values for anything a patient sees.

### Versioning

Tokens, stylesheet and documentation share one version number. Additions are minor versions. A renamed or removed token, or a visible change to an existing semantic colour, is a major version and is listed on the portal. Products should copy the files at a version, not hot-link them.
