---
description: Semantic colours and theme extensions for {{PROJECT_NAME}}
globs: ["lib/**/*.dart", "test/**/*.dart"]
alwaysApply: false
---

# Theming — {{PROJECT_NAME}}

## Context
Theme variants from brief: **{{THEME_SUMMARY}}**.{{HIGH_CONTRAST_NOTE}}

## Constraints
- Prefer **`ThemeExtension`** (or design-system equivalents) for app-specific colours and radii — avoid raw `Color(0xFF...)` in feature code except in central token definitions
- Use **`Theme.of(context).colorScheme`** / `TextTheme` for Material-aligned roles where appropriate
- **High contrast:** when supported, verify WCAG contrast for text and controls; never rely on colour alone for state (pair with icon or label){{HIGH_CONTRAST_UX_LINE}}
- Touch targets: respect platform minimums (e.g. ~48 logical pixels) for interactive widgets

## Anti-patterns
- Hard-coded `Colors.*` scattered across feature widgets instead of theme tokens
- Ignoring `MediaQuery.of(context).platformBrightness` / high-contrast modes when the product claims support
