/* ============================================================================ StonksScout — SHARED UI ATOMS ============================================================================ */ function TierBadge({ tier, size="md" }){ const t = tierOf(tier); const pad = size==="sm" ? "px-2 py-0.5 text-[10px]" : size==="lg" ? "px-3 py-1.5 text-[13px]" : "px-2.5 py-1 text-[11px]"; return ( {t.label} ); } function PumpRisk({ size="md" }){ const pad = size==="sm" ? "px-2 py-0.5 text-[10px]" : "px-2.5 py-1 text-[11px]"; return ( Pump Risk ); } function Chip({ children, tone="neutral" }){ const tones = { neutral: { c:"var(--text)", b:"var(--line)", bg:"var(--fill-soft)" }, pos: { c:"#1f9e6b", b:"rgba(70,211,154,0.3)", bg:"rgba(70,211,154,0.07)" }, neg: { c:"#d24b66", b:"rgba(245,85,109,0.3)", bg:"rgba(245,85,109,0.07)" }, }; const s = tones[tone]; return ( {children} ); } function ChangePill({ value, className="" }){ const pos = value>=0; const c = pos ? "#17a86a" : "#ee3f5f"; return ( {fmtPct(value).replace(/^[+\-]/,"")} ); } function Ret({ value }){ if(value==null) return —; const c = value>0 ? "#17a86a" : value<0 ? "#ee3f5f" : "var(--muted)"; return {fmtPct(value)}; } function StatCard({ label, value, sub, accent, mono=true }){ return (