export function cx(...parts) {
  return parts.filter(Boolean).join(' ')
}

export function formatCompactNumber(value) {
  return new Intl.NumberFormat('en', { notation: 'compact', maximumFractionDigits: 1 }).format(Number(value || 0))
}

const TONE_CLASSES = {
  sky: 'border-sky-300/25 bg-sky-300/10 text-sky-100',
  emerald: 'border-emerald-300/25 bg-emerald-300/10 text-emerald-100',
  amber: 'border-amber-300/25 bg-amber-300/10 text-amber-100',
  violet: 'border-violet-300/25 bg-violet-300/10 text-violet-100',
  slate: 'border-white/10 bg-white/[0.04] text-slate-200',
}

export function toneClasses(tone = 'slate') {
  return TONE_CLASSES[tone] || TONE_CLASSES.slate
}
