pub fn contrast_ratio(a: &str, b: &str) -> f64
WCAG 2.x contrast ratio between two hex colors (1.0..=21.0). Unparseable input yields 0.0 (so “is this AA?” checks fail loudly).