/* ───────────────────────────────────────────────────────
   kariochi · tokens.css
   The single source of truth for design tokens.
   Imported FIRST. Never declare tokens elsewhere.
   ─────────────────────────────────────────────────────── */
:root {
  /* surfaces */
  --bg-app:        #fbfaf8;
  --bg-surface:    #ffffff;
  --bg-subtle:     #f3f2ef;
  --bg-placeholder: rgba(15,20,17,0.035);  /* empty-slot tint on the warm canvas */
  --bg-hover:      rgba(0,0,0,0.04);
  --bg-active:     rgba(0,0,0,0.07);

  --bg-brand:      #1a9e6e;
  --bg-brand-soft: rgba(26,158,110,0.10);

  /* text */
  --fg-primary:    #0f1411;
  --fg-secondary:  rgba(15,20,17,0.66);
  --fg-tertiary:   rgba(15,20,17,0.46);
  --fg-on-brand:   #ffffff;
  --fg-on-dark:    #ffffff;  /* text/icons on dark scrims & toasts */
  --fg-brand:      #137c56;

  /* borders */
  --border-subtle:  rgba(15,20,17,0.06);
  --border-default: rgba(15,20,17,0.12);
  --border-strong:  rgba(15,20,17,0.22);
  --border-brand:   rgba(26,158,110,0.55);
  --border-focus:   #1a9e6e;

  /* brand button states */
  --brand-primary:        #1a9e6e;
  --brand-primary-hover:  #178a60;
  --brand-primary-active: #137553;

  /* status */
  --status-success-bg: rgba(26,158,110,0.12);
  --status-success-fg: #137c56;
  --status-warning-bg: rgba(208,141,30,0.14);
  --status-warning-fg: #a3690c;
  --status-error-bg:   rgba(199,52,52,0.10);
  --status-error-fg:   #b13030;
  --status-info-bg:    rgba(46,109,191,0.10);
  --status-info-fg:    #2e6dbf;

  /* spacing */
  --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;
  --space-20: 80px;
  --space-24: 96px;

  /* radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* type */
  --text-xs:   11px;
  --text-sm:   12.5px;
  --text-base: 14px;
  --text-md:   15px;
  --text-lg:   17px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  30px;
  --text-4xl:  36px;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* motion */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 350ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* elevation */
  --shadow-sm: 0 1px 2px rgba(15,20,17,0.06);
  --shadow-md: 0 2px 6px rgba(15,20,17,0.08);
  --shadow-lg: 0 8px 24px rgba(15,20,17,0.10);
  --shadow-xl: 0 18px 48px -8px rgba(15,20,17,0.18), 0 4px 12px rgba(15,20,17,0.08);
}

/* ───────────────────────────────────────────────────────
   Density override — drop spacing scale for compact mode.
   Toggle via <html data-density="compact">.
   ─────────────────────────────────────────────────────── */
[data-density="compact"] {
  --space-1:  3px;
  --space-2:  6px;
  --space-3:  10px;
  --space-4:  13px;
  --space-5:  16px;
  --space-6:  20px;
  --space-8:  26px;
  --space-10: 32px;
}
[data-density="compact"] .section { margin-bottom: var(--space-12); }
[data-density="compact"] .card { padding: var(--space-4) var(--space-5); }
[data-density="compact"] .hero { padding: var(--space-10) 0 var(--space-12); }
[data-density="compact"] .glance .g-cell { padding: var(--space-4); min-height: 180px; }
[data-density="compact"] .glance { margin-bottom: var(--space-12); }
