<!-- source-hash: c1693a304ddf9b29bde0ca02b6f6b8ea -->
Utility module providing class name merging with extended Tailwind support, and platform URL resolution helpers for multi-tenant Flamingo/OpenFrame deployments.

## Key Components

| Export | Type | Description |
|--------|------|-------------|
| `cn` | Function | Merges class names using `clsx` + `tailwind-merge`, extended with custom ODS typography classes (`text-h1`–`text-h6`) |
| `getPlatformProductionUrl` | Function | Returns the production URL for a named platform, with `NEXT_PUBLIC_*` env var override support |
| `getAllPlatformBaseDomains` | Function | Extracts all unique base domains across platforms; handles localhost, Vercel preview, and production cases (useful for cross-domain cookie scope) |
| `getBaseUrl` | Function | Resolves the current app's base URL using a priority chain: env override → platform URL → Vercel domain → production fallback → `localhost:3000` |

## Usage Example

```typescript
import { cn, getBaseUrl, getPlatformProductionUrl, getAllPlatformBaseDomains } from '@/lib/cn'

// Merge Tailwind classes (including custom ODS typography)
const className = cn('text-h1 font-bold', isActive && 'text-yellow-400')

// Resolve current app base URL
const apiBase = getBaseUrl()                      // http://localhost:3000 (dev)
                                                  // https://www.openmsp.ai (prod fallback)

// Resolve a specific platform URL (respects NEXT_PUBLIC_* overrides)
const flamingoUrl = getBaseUrl('flamingo')        // https://www.flamingo.run
const openframeUrl = getPlatformProductionUrl('openframe') // https://openframe.ai

// Get all cookie-scoped base domains (e.g. for document.cookie domain=)
const domains = getAllPlatformBaseDomains()
// Production: ['.flamingo.run', 'flamingo.run', '.openmsp.ai', 'openmsp.ai', ...]
// Vercel preview: ['.vercel.app', 'vercel.app']
// Localhost: []
```

## Environment Variables

| Variable | Platform | Default |
|----------|----------|---------|
| `NEXT_PUBLIC_FLAMINGO_URL` | `flamingo`, `universal` | `https://www.flamingo.run` |
| `NEXT_PUBLIC_OPENMSP_URL` | `openmsp` | `https://www.openmsp.ai` |
| `NEXT_PUBLIC_OPENFRAME_URL` | `openframe` | `https://openframe.ai` |
| `NEXT_PUBLIC_MARKETING_HUB_URL` | `marketing-hub` | `https://marketing-hub.flamingo.so` |
| `NEXT_PUBLIC_DEV_URL` | all (dev only) | `http://localhost:3000` |