feat(insights): give wellness dials a white ring on a gradient tile

Echo the hero card on the wellness-scores strip: each ring tile now rides
a saturated purple-pink gradient (.score-tile-gradient) and the dial paints
a white arc over a translucent-white track with rounded ends.

The gradient mixes over the fixed dark --dracula-bg rather than the theme
--card, so it stays dark in both themes and white copy clears WCAG AA
either way (white on the purple endpoint ~5.0:1, pink endpoint ~6.1:1).

ScoreRing gains a variant prop: onGradient (white arc, white number) for
the tile, band (band-coloured arc) by default so the score-anatomy detail
view stays legible on its plain card. The band semantic is never lost to
the white arc - it still rides data-band, the aria-label, and the band-word
label under the ring.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc-André BombeckandClaude Opus 4.8 committed 2026-06-05 14:49:12 +02:00
1 parent a3692a62f8
commit 278007ce36
5 files changed
+109 -20

No files matched your search

+24
View File
@@ -381,6 +381,30 @@
0 18px 48px -28px color-mix(in srgb, var(--dracula-purple) 50%, transparent);
}
/*
* `.score-tile-gradient` — the saturated purple→pink wellness-tile
* background that echoes the hero band while staying dark enough for a
* WHITE score ring + white centre number to clear WCAG AA in BOTH themes.
*
* Unlike `.hero-gradient` (which mixes over the theme-dependent
* `var(--card)` — near-white in Alucard light, so a white ring would
* vanish), this variant mixes purple/pink over the *fixed* dark
* `var(--dracula-bg)` (#282a36). That keeps the surface identical and
* dark in light + dark mode, so white text/ring read ≥ 4.5:1 either way:
* white on the purple endpoint ≈ 5.0:1, on the pink endpoint ≈ 6.1:1.
* A subtler glow than the hero's keeps a row of five tiles from
* overwhelming the page.
*/
.score-tile-gradient {
background: linear-gradient(
140deg,
color-mix(in srgb, var(--dracula-purple) 55%, var(--dracula-bg)) 0%,
color-mix(in srgb, var(--dracula-pink) 45%, var(--dracula-bg)) 100%
);
border: 1px solid color-mix(in srgb, var(--dracula-purple) 28%, transparent);
box-shadow: 0 12px 32px -24px color-mix(in srgb, var(--dracula-purple) 45%, transparent);
}
/*
* `pulseDot` keyframes — the "live, refreshed N min ago" green dot in
* the hero meta row. Used as `.pulse-dot { animation: pulseDot ... }`.