-
- {t("insights.healthScore.label")}
-
+
+
+ {t("insights.healthScore.label")}
+
+ {isProvisional && (
+
+ {t("insights.healthScore.provenance.provisionalBadge")}
+
+ )}
+
{delta !== null && delta > 0 && (
+ {/* v1.4.25 W8e — tap-to-expand provenance accordion.
+ Kept inside the card so the visual "owner" of the
+ breakdown remains the score tile (concept-cohesion). */}
+
+
+
+ {expanded && (
+
+ {hasMixed && (
+
+ {t("insights.healthScore.provenance.mixedBanner")}
+
+ )}
+
+ {provenanceRows.map((row) => {
+ const sourceLabel = t(SOURCE_LABEL_KEY[row.source]);
+ const isEmpty = row.source === "none" || row.value === null;
+ const asOfFormatted = formatAsOf(row.asOf);
+ const asOfLine = asOfFormatted
+ ? t("insights.healthScore.provenance.asOfLabel", {
+ date: asOfFormatted,
+ })
+ : null;
+ return (
+ -
+
+ {row.label}
+
+ {/* value bar — same vocabulary as the existing
+ sub-bar row so the two stride lines align */}
+
+
+ {row.value === null ? "—" : Math.round(row.value)}
+
+ {/* weight share — second, narrower bar tinted
+ dracula-cyan to read "provenance grammar"
+ alongside the Coach accent */}
+
+
+ {sourceLabel}
+
+
+ );
+ })}
+
+
+ {t("insights.healthScore.provenance.footnote")}
+
+
+ )}
+
+