/* soccerarena.ai — shared visual atoms. */ const SA = { turf: '#0a1f0f', turf2: '#0c2613', surface: '#0e2a16', surfaceHi: '#123420', line: 'rgba(200,245,58,0.10)', line2: 'rgba(255,255,255,0.07)', white: '#f4f7f2', dim: 'rgba(244,247,242,0.62)', faint: 'rgba(244,247,242,0.38)', lime: '#c8f53a', limeDim: 'rgba(200,245,58,0.55)', orange: '#ff9d3d', orangeDim: 'rgba(255,157,61,0.16)', mono: "'JetBrains Mono', ui-monospace, monospace", sans: "'Archivo', system-ui, sans-serif", }; function Sparkline({ data, w = 64, h = 22, color = SA.lime, strokeWidth = 1.5 }) { const min = Math.min(...data), max = Math.max(...data); const span = max - min || 1; const pts = data.map((v, i) => { const x = (i / (data.length - 1)) * (w - 2) + 1; const y = h - 1 - ((v - min) / span) * (h - 2); return `${x.toFixed(1)},${y.toFixed(1)}`; }); const last = data[data.length - 1]; const lx = w - 1; const ly = h - 1 - ((last - min) / span) * (h - 2); return ( ); } function FlipBadge({ label = 'FLIPPED', when, compact = false }) { return ( ↺ {label}{when ? ` ${when}` : ''} ); } function SplitBar({ split, height = 6 }) { const total = split.home + split.draw + split.away || 1; const seg = (n, color) => n > 0 ? (
) : null; return (