# FreshCards — Codex (per FVW v8 §22 + §23)

**Module ID:** `oscar.freshcards` (this is Oscar-specific instantiation of the FVW v8 §23 FreshCard standard)
**Status:** Constitutional (per §23, ratified upstream).

## C1 — Behaviour Inventory
- `app/src/freshcards/FreshCard.tsx` (typed wrapper for any artefact)
- `app/src/undo/UndoToastContext.tsx` (closes DO-008)

## C2 — State Machine
Toast: shown → (user clicks undo | timeout) → dismissed

## C3 — Side Effect List
- DOM render of cards/toasts
- Optional Undo callback execution

## C4 — Input Validation Contract
- Card title required
- At least 0 actions (can be empty info card)

## C5 — Failure Modes
- Toast already dismissed: undo no-ops
- Multi-toast: only the clicked toast dismisses

## C6 — User Simulation List
1. Render FreshCard with title only
2. Render FreshCard with primary action
3. Render FreshCard with primary + secondary
4. Show UndoToast → click Undo → action runs → toast dismisses
5. Show UndoToast → wait 7s → auto-dismiss

## C7 — Reproducibility Test
Deterministic (no async network).

## C8 — Shape Matrix
| Surface | Modes | Chips | States |
|---|---|---|---|
| FreshCard | comfortable, compact | title, body, primary, secondary | hover, default |
| UndoToast | show, dismiss | undo, dismiss | shown, dismissing |

## C9 — State Shape Inventory
### C9.1 localStorage
None
### C9.2 In-memory
- toasts: UndoToast[] (in UndoToastContext)
### C9.3 IDB
None (in-memory only — Vol. 1)

---

## END OF FRESHCARDS CODEX

## §23 SENIOR/ADHD AFFORDANCES (per FVW v8 §23.4)

- Min font size: 16px (default), 14px (compact)
- High contrast: #1a3d2e on #fafaf2 (per dark-green-palette overlay)
- One primary button visible (not 3+)
- Constant frame (eyes know where to look)
- Max focus width: 720px (per §23.5)
- Undo affordance: 7s window with clear "Undo" button
- Border: 1px solid (not heavy 2px)

All affordances are CONSTITUTIONAL for any UI module. App-VP rules enforce.
