# Design decisions log Every design decision that affects tokens, components, or system architecture MUST be logged here with rationale. This ensures consistency across sessions and agents. Agents MUST check this file before making any decision that could contradict a previous one. ## Format ``` ### [Decision ID] — [Short title] **Date:** [date] **Category:** token | component | architecture | convention **Decision:** [What was decided] **Rationale:** [Why this decision was made] **Affects:** [Which tokens/components/files this impacts] **Alternatives considered:** [What else was considered and why it was rejected] ``` --- ## Decisions ### D001 — Primary brand colour is warm gold #BA834E **Date:** 2025-03-25 **Category:** token **Decision:** Primary brand colour (color.brand.500) is #BA834E — warm gold. **Rationale:** Extracted from Parsons brand swatches. Matches the existing FA 1.0 CTA button colour ("Add to package"). Warm gold conveys trust and professionalism appropriate for funeral services. The colour has a 3.7:1 contrast ratio on white, suitable for large text and interactive elements (buttons with white text). **Affects:** color.brand.500, color.interactive.default, MUI palette.primary.main **Alternatives considered:** #B0610F (copper) was considered for primary but it's darker and more aggressive. Placed at brand.600 for hover/emphasis instead. ### D002 — Primary text colour is charcoal #2C2E35 (not pure black) **Date:** 2025-03-25 **Category:** token **Decision:** Primary text colour is #2C2E35 (color.neutral.800) — charcoal with cool blue undertone. **Rationale:** From brand swatch. Softer than pure black for extended reading comfort while maintaining 13.2:1 contrast ratio on white (well exceeds WCAG AA). The cool undertone complements the sage secondary palette. **Affects:** color.text.primary, MUI palette.text.primary **Alternatives considered:** Pure black (#000000) — higher contrast but causes eye fatigue on white backgrounds. Added as color.black for rare use. ### D003 — Brand link/accent colour uses copper #B0610F **Date:** 2025-03-25 **Category:** token **Decision:** Brand-coloured text (links, inline emphasis) uses #B0610F (color.brand.600 / copper) not the base gold. **Rationale:** The base gold #BA834E has only 3.7:1 contrast on white which doesn't meet WCAG AA for normal text (4.5:1 required). The copper #B0610F provides 4.8:1 contrast, meeting AA. It's also visually more assertive for link text. **Affects:** color.text.brand, color.interactive.hover **Alternatives considered:** brand.700 (#8B4E0D) at 6.7:1 — meets AAA but is too dark and loses the warm "brand" feel. ### D004 — Sage palette as secondary colour family **Date:** 2025-03-25 **Category:** token **Decision:** Secondary palette uses cool sage/slate tones (#4C5B6B as sage.700) rather than a second warm colour. **Rationale:** From brand swatches (cool row). The sage provides visual contrast against the warm brand palette and adds a calming, professional quality appropriate for the funeral services context. Used for secondary buttons and less prominent actions. **Affects:** color.sage.*, color.interactive.secondary, MUI palette.secondary **Alternatives considered:** Using a lighter warm tone for secondary — rejected as it wouldn't provide enough visual distinction from primary. ### D005 — Display font is Noto Serif SC for H1-H2 headings **Date:** 2025-03-25 **Category:** token **Decision:** Display/heading font is Noto Serif SC for Display, H1, and H2 levels. H3+ use Montserrat (body font). **Rationale:** User specified Noto Serif SC as display font and Montserrat as primary. The serif at H1-H2 adds warmth and gravitas suitable for funeral services. H3+ switches to Montserrat to create a clear hierarchy break. **Affects:** fontFamily.display, fontFamily.body, typography.display/h1/h2/h3/h4 **Alternatives considered:** Using serif for all headings — rejected as it would make H3/H4 feel too formal at smaller sizes. ### D006 — Warning text uses amber.700 for AA compliance **Date:** 2025-03-25 **Category:** token **Decision:** Warning text colour is amber.700 (#A36B00) not amber.600 (#CC8500). **Rationale:** amber.600 (3.6:1 contrast on white) only passes AA for large text. For warning text that must be readable at body size, amber.700 at 5.1:1 meets WCAG AA for normal text. **Affects:** color.text.warning **Alternatives considered:** amber.800 — passes AAA but is too dark to read as "amber/warning". ### D007 — Style Dictionary requires usesDtcg: true **Date:** 2025-03-25 **Category:** architecture **Decision:** Added `usesDtcg: true` to Style Dictionary v4.4.0 config. **Rationale:** Without this flag, SD v4 doesn't properly populate `allTokens` for the CSS `css/variables` format, resulting in empty CSS output. JS and JSON formats work without it but CSS requires it for DTCG token format. **Affects:** style-dictionary/config.js, CSS output **Alternatives considered:** Custom format — rejected as the built-in format works correctly with the flag. ### D008 — Responsive typography via @media in MUI theme **Date:** 2025-03-25 **Category:** architecture **Decision:** Mobile font sizes are handled via `@media (max-width:600px)` queries in the MUI theme typography config, not via `responsiveFontSizes()`. **Rationale:** Explicit media queries allow precise control over mobile sizes (28px, 24px, 20px, 18px) matching the token definitions. MUI's `responsiveFontSizes()` uses its own scaling algorithm that can't be configured to match our exact values. **Affects:** src/theme/index.ts, typography.*.fontSizeMobile tokens **Alternatives considered:** `responsiveFontSizes()` utility — rejected due to lack of precise size control. ### D009 — Merge Text Button into Button atom **Date:** 2026-03-25 **Category:** component **Decision:** Text Button is not a separate atom. It is implemented as `