feat: high-contrast on-state tokens + [color.high_contrast] plumbing (ADR)
Summary
Deferred from #596 (closed). The external design handoff (2026-06-20) supplied high-contrast values for the on-state tokens (--on-danger/--on-success/--on-warning) plus deepened state fills, intended to clear AAA 7:1 under a contrast mode. They were NOT shipped in #596 (closed) because CRAIG has no high-contrast plumbing yet:
craig-state-bundle'sbuild.rs(ThemeFile.Colors) parses only[color.light]+[color.dark]— there is no[color.high_contrast]parsing.simple_statehouse_palette()setshigh_contrast: None;craig-web'smaterialize_theme_cssonly emits a@media (prefers-contrast: more)block whenPalette.high_contrastisSome.- Design's HC reference uses a
[data-contrast="high"]attribute toggle, which CRAIG does not have (CRAIG drives modes offprefers-color-scheme/prefers-contrast, not a data attribute).
Design itself framed a full high-contrast palette as "its own ADR."
Scope
- Decide the HC mechanism:
@media (prefers-contrast: more)generated from a new[color.high_contrast]TOML section vs. a[data-contrast]toggle. Record in an ADR (or amend ADR-036). - Plumb
[color.high_contrast]throughbuild.rs+Palette.high_contrast+ the schema gate. - Ship at least the on-state HC values from the design handoff (danger/success/warning fill + fg, AAA 7:1).
- Fix the stale
token-schema.adocclaim that "absent, the app derives [HC] from light" (it does not today).
Design-supplied HC values (from the 2026-06-20 handoff)
HC light (#fff on): danger #8a0d11 (9.78) · success #14543a (8.90) · warning #7a4400 (7.91).
HC dark (#000 on): danger #ef9c93 (9.85) · success #8fd3aa (12.07) · warning #f0c47a (12.88).
Acceptance criteria
- HC mechanism decided + recorded (ADR).
-
[color.high_contrast]parsed + emitted; schema gate covers it. - On-state HC values shipped; a dark-mode + HC accessibility-audit variant guards them.
Relates to #596 (closed).