/* ============================================================================
   Studio NaVivo — Design Tokens
   Single source of truth for color, type, spacing, radius, shadow, transition.
   Migration map (old hardcoded value → token) is documented in comments.
   ============================================================================ */

/* ---- Color: neutral scale ---- */
/* #656464 body/heading text → --color-text-body */
/* #666 muted text           → --color-text-muted */
/* #f8f8f8 body background   → --color-bg-body */
/* #f0f4f8 sidebar widget    → --color-neutral-200 */
/* #eee table border light   → --color-border-light */
/* #ccc table border         → --color-border */
/* #2c3e50 sidebar current   → --color-neutral-900 */
:root {
  --color-neutral-50: #f8f8f8;
  --color-neutral-100: #f7f3ee;
  --color-neutral-200: #f0f4f8;
  --color-neutral-300: #eee;
  --color-neutral-400: #ccc;
  --color-neutral-500: #888;
  --color-neutral-600: #666;
  --color-neutral-700: #656464;
  --color-neutral-900: #2c3e50;

  /* ---- Color: primary (links) ---- */
  /* #24758f link color → --color-primary */
  --color-primary: #24758f;
  --color-primary-hover: #1c5e76;

  /* ---- Color: CTA / semantic buttons ---- */
  /* #c0392b → --color-cta-primary   (hover #a93226) */
  /* #d4a017 → --color-cta-secondary */
  /* #2e7d32 → --color-cta-success   */
  --color-cta-primary: #c0392b;
  --color-cta-primary-hover: #a93226;
  --color-cta-secondary: #d4a017;
  --color-cta-success: #2e7d32;

  /* ---- Color: semantic boxes (info/warning) ---- */
  /* #eef6ff/#bcd7f5 → --color-info-bg / --color-info-border */
  /* #fff7e6/#f0d48a → --color-warning-bg / --color-warning-border */
  /* #e8f4fd/#4a90d9 → --color-info-alt-bg / --color-info-alt-border */
  --color-info-bg: #eef6ff;
  --color-info-border: #bcd7f5;
  --color-warning-bg: #fff7e6;
  --color-warning-border: #f0d48a;
  --color-info-alt-bg: #e8f4fd;
  --color-info-alt-border: #4a90d9;

  --color-error: #c0392b;
  --color-success: #2e7d32;

  /* ---- Backgrounds / text ---- */
  --color-bg-body: var(--color-neutral-50);
  --color-bg-surface: #ffffff;
  --color-text-body: var(--color-neutral-700);
  --color-text-muted: var(--color-neutral-600);
  --color-text-link: var(--color-primary);
  --color-text-on-dark: #ffffff;

  /* ---- Borders ---- */
  --color-border: var(--color-neutral-400);
  --color-border-light: var(--color-neutral-300);

  /* ---- Typography: family ---- */
  /* 'Work Sans' only */
  --font-family: 'Work Sans', sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 600;
  --font-weight-bold: 700;

  /* ---- Typography: type scale (6-8 sizes) ---- */
  /* Body 15px → --text-base */
  /* h1 26px → --text-4xl, h2 22px → --text-3xl, h3 20px → --text-2xl */
  /* h4 18px → --text-xl, h5 16px → --text-lg, h6 14px → --text-sm */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 15px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 20px;
  --text-3xl: 22px;
  --text-4xl: 26px;

  /* ---- Line heights ---- */
  --leading-tight: 1;
  --leading-normal: 1.5;
  --leading-loose: 1.75;

  /* ---- Spacing: 8px grid ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ---- Border radius ---- */
  /* 4px default, 5px/6px/8px variants → consolidated below */
  --radius-sm: 3px;
  --radius: 4px;
  --radius-md: 5px;
  --radius-lg: 6px;
  --radius-xl: 8px;

  /* ---- Shadows ---- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.08);

  /* ---- Transitions ---- */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

/* ---- Convenience: heading size map (h1 > h2 > h3 hierarchy) ---- */
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-sm); }
