## Tray icon = micro brand mark with auto-contrast background

### Confirmed design (from your answers)
- **Mark content:** logo if the user has one (scaled to fit), else the first letter of their store name, else the current green circle (branding off / nothing to show).
- **Visual treatment:** rounded-square tile with an auto-chosen contrasting background — light mark → dark bg, dark mark → light bg. Win11-taskbar-badge aesthetic.

### The color-matching algorithm (the "intelligent" part)
1. Render the mark onto a 64×64 transparent canvas (super-sampled for crispness, then downsampled to 16×16).
2. Sample the mark's luminance:
   - Logo: median luminance of the non-transparent pixels (median, not average, so a black-and-white logo doesn't average to gray and confuse the contrast decision).
   - Initial: the luminance of the color we drew it with (we control this, so it's exact).
3. Pick background by contrast: luminance ≥ 0.5 → background = near-black `#1f1f1f`; luminance < 0.5 → background = near-white `#f0f0f0`. Strong backgrounds guarantee legibility on either taskbar color.
4. Round the corners into a tile, composite the mark centered, downsample to 16×16 with high-quality interpolation.

### Implementation

**1. `App/TrayIconFactory.cs` (new)** — builds the tray `Bitmap` from branding:
- `Bitmap Build(BrandingConfig? branding, AppConfig config)`:
  - If branding off / nothing configured → return the existing lime-green circle (current behavior, no regression).
  - If `LogoWatermarkEnabled` + `LogoPath` exists → render the logo via Magick.NET onto a 64px transparent canvas, fit-contained with ~10% padding.
  - Else if `TextWatermarkEnabled` or `StoreName` set → draw the store-name initial (first non-space char of `StoreName`, uppercased) in bold Segoe UI, sized to fill ~70% of the canvas. Color: white if no logo (we'll let the contrast step pick the bg); actually for an initial we draw it in a *neutral* dark color so the algo can pair it with a light bg, then the mark color is known.
  - Compute mark luminance from the rendered pixels.
  - Pick background per the algorithm above.
  - Composite: rounded-rect background → mark centered → downsample 64→16 with `HighQualityBicubic`.
  - Return the 16×16 bitmap.
- All paths wrapped: a corrupt logo or font failure falls back to the green circle, never crashes the tray.

**2. `MainForm` integration:**
- Replace the hard-coded green-circle bitmap block in `BuildTrayIcon()` with `TrayIconFactory.Build(_config.Branding, _config)`.
- Hold the bitmap in `_trayBitmap` as today (NotifyIcon handle lifetime).
- Add `void RefreshTrayIcon()` — rebuilds the bitmap, swaps `trayIcon.Icon`, disposes the old bitmap/hicon. Safe to call repeatedly.
- Call `RefreshTrayIcon()` after the welcome wizard finishes (first-launch branding setup) and after `BrandingForm` saves (Options ▸ Branding ▸ Edit branding…). So the icon updates live when the user changes branding.

**3. Magick.NET vs System.Drawing for the render:**
- The *logo scaling* uses Magick.NET (already a dependency; handles PNG alpha, resize cleanly).
- The *tile compositing + initial text + downsampling* uses `System.Drawing` (GDI+) — it's already in use for the current tray icon and is simpler for rounded-rect + text + hicon. No new dependency either way.

### Files
- **NEW (1):** `App/TrayIconFactory.cs`.
- **EDIT (1):** `App/MainForm.cs` (replace bitmap block, add `RefreshTrayIcon`, call it after wizard + branding save).
- **Docs:** README mention; BLOG short note on the color-matching algorithm.

### Behavior contract & risks
- **No regression** when branding is off — exact current green circle.
- **Corrupt/missing logo** → falls back to initial → falls back to green, never an empty tray.
- **Live update** when branding changes (wizard or editor).
- **Reads on both taskbar themes** because the tile carries its own guaranteed-contrast background.
- **No new dependency.**

### Verification
`dotnet build` clean Debug + Release. Manual: branding off → green circle; set store name "ReelDeals", enable text watermark → "R" tile with auto-contrast bg; add a logo → logo tile; toggle branding off → green circle restored.