// File: score-marks.tsx // Path: apps/web/components/score-marks.tsx // Project: AI Risk Index — airiskindex.io // Author: Simon-Pierre Boucher // Contact: contact@spboucher.ai // Copyright © 2026 Simon-Pierre Boucher. All rights reserved. // // Description: Chart marks: score bars with CI whiskers, stat tiles, interval strips, meter. /** * Chart marks for 0–100 scores with confidence bounds. * Specs per the dataviz skill: thin bars (≤24px) with a 4px rounded data-end * and a square baseline, track = lighter step of the same ramp, CI whisker in * muted ink, values in text tokens (never the series color). */ export interface Band { low: number; score: number; high: number; } const pct = (value: number): string => `${Math.max(0, Math.min(100, value))}%`; /** Horizontal score bar with CI whisker on a 0–100 track. */ export function ScoreBar({ band, thick = 10 }: { band: Band; thick?: number }): JSX.Element { return (