/* ==========================================================================
   KIRIMURE / MAER DESIGN SYSTEM — TOKENS (TEKOA SIBLING)
   Import Google Fonts before use:
   Space Grotesk (display) · Inter (body) · JetBrains Mono (code/labels)
   ========================================================================== */

:root[data-theme="light"] {
  /* surfaces */
  --bg:        #F5F2EA;
  --surface:   #FFFFFF;
  --surface-2: #ECE7DA;
  --border:    #DEDBCC;

  /* text */
  --text:       #14161F;
  --text-dim:   #63667A;
  --text-faint: #8C8F9E;

  /* brand (unified Kirimure indigo) */
  --accent:       #4F46E5;
  --accent-hover: #4338CA;
  --accent-ink:   #FFFFFF;
  --accent-soft:  #EEF0FC; /* Tekoa extension: running/admin/guidance tint */

  /* status */
  --danger:     #C23B3B;
  --danger-bg:  #FBEAEA;
  --success:    #1E8E5A;
  --success-bg: #E9F6EF;
  --warn:       #9A6B00;
  --warn-bg:    #FBF1DC;

  --shadow: 0 1px 2px rgba(20,22,31,0.04), 0 8px 24px rgba(20,22,31,0.06);

  /* intentionally dark CLI terminal well */
  --terminal-bg:    #0B0D16;
  --terminal-text:  #E6E8F2;
  --terminal-muted: #666A80;
}

:root[data-theme="dark"] {
  /* surfaces */
  --bg:        #0B0D16;
  --surface:   #12141F;
  --surface-2: #191C2B;
  --border:    #262A3D;

  /* text */
  --text:       #F1F1F6;
  --text-dim:   #9498AC;
  --text-faint: #666A80;

  /* brand */
  --accent:       #6C63FF;
  --accent-hover: #8079FF;
  --accent-ink:   #0B0D16;
  --accent-soft:  #1E1D3A; /* Tekoa extension: running/admin/guidance tint */

  /* status */
  --danger:     #FF6B6B;
  --danger-bg:  #2A1518;
  --success:    #34D399;
  --success-bg: #12281F;
  --warn:       #FBBF24;
  --warn-bg:    #2A2312;

  --shadow: 0 1px 2px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.35);

  /* intentionally dark CLI terminal well */
  --terminal-bg:    #080A12;
  --terminal-text:  #E6E8F2;
  --terminal-muted: #666A80;
}

/* ---------- typography ---------- */
:root {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* type scale (px) */
  --text-xs:   11px;    /* eyebrows, badges, meta */
  --text-sm:   12.5px;  /* labels, secondary, small buttons, chips */
  --text-base: 13.5px;  /* body default, table cells, inputs */
  --text-md:   15px;    /* section headings */
  --text-lg:   19px;    /* drawer/modal titles */
  --text-xl:   24px;    /* stat values */
  --text-2xl:  26px;    /* page titles */

  --leading: 1.5;
}

/* ---------- spacing scale (4px rhythm) ---------- */
:root {
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
}

/* ---------- radius scale ---------- */
:root {
  --radius-sm:   6px;    /* icon buttons, small badge tags */
  --radius-md:   8px;    /* inputs, buttons, side-tabs, toasts, close buttons */
  --radius-lg:   10px;   /* snippets, token rows, segmented nav */
  --radius-xl:   14px;   /* cards, tables, stat strips, modals, banners */
  --radius-pill: 999px;  /* filter chips, status badges */
}

/* ---------- motion ---------- */
:root {
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 250ms;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
