/** * ConfidenceInkwell โ€” the confidence score, rendered as an ink well. * * A tall rectangular vessel. Ink fills from the bottom to the score. The * meniscus (top surface) has a subtle wobble via `` for that "still * settling" feel โ€” signals it's a live measurement, not a static bar. * * Color shifts by confidence tier: sage (>0.85), mustard (0.6-0.85), coral (<0.6). */ import { motion } from "motion/react"; interface Props { score: number; // 0..1 } export function ConfidenceInkwell({ score }: Props) { const pct = Math.max(0, Math.min(1, score)); const tier = pct >= 0.85 ? "high" : pct >= 0.6 ? "mid" : "low"; const color = tier === "high" ? "var(--confidence-high)" : tier === "mid" ? "var(--confidence-mid)" : "var(--confidence-low)"; const label = tier === "high" ? "High" : tier === "mid" ? "Fair" : "Low"; return (
{/* Ink fill */} {/* Meniscus โ€” a subtle wave at the top of the ink */} {/* Tick marks on the side of the well */}
{[0.25, 0.5, 0.75].map((t) => (
))}

Confidence

{(pct * 100).toFixed(0)} %

{label} ยท self-reported

); }