/* Design tokens, colour sheet "Slate": the one file a variant replaces.
   Cool greys, one blue accent, functional status colours, the system font, a 14px base.
   Every key is read by the compiled stylesheet (a check keeps it so); hover and focus shades are
   derived from these values in the browser, so a variant changes the look by replacing this file. */
:root {
  /* type and shape */
  --font-sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-size-base: 14px;  --font-size-sm: 13px;  --font-size-xs: 11px;  --font-size-subject: 21px;
  --radius-md: 6px;  --radius-lg: 8px;  --radius-card: 12px;  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.04);
  --shadow-lg: 0 10px 15px -3px rgba(15,23,42,.10), 0 4px 6px -4px rgba(15,23,42,.06);

  /* density */
  --topbar-h: 56px;  --rail-w: 48px;  --sidebar-w: 248px;  --list-w: 372px;
  --header-h: 52px;  --searchbar-h: 36px;  --row-h: 52px;  --icon: 18px;  --avatar: 32px;  --avatar-lg: 40px;

  /* surfaces */
  --color-bg-canvas: #eef2f7;    --color-bg-surface: #ffffff;   --color-bg-inset: #f8fafc;
  --color-bg-hover: rgba(15,23,42,.04);  --color-bg-selected: #eff6ff;
  --color-overlay: rgba(15,23,42,.5);  --color-shadow: rgba(15,23,42,.15);

  /* text */
  --color-text-primary: #0f172a;  --color-text-secondary: #475569;  --color-text-muted: #5b6577;
  --color-text-heading: #1e293b;  --color-text-on-accent: #ffffff;

  /* lines and focus */
  --color-border-default: #e2e8f0;  --color-border-strong: #cbd5e1;  --color-border-muted: #f1f5f9;
  --color-border-focus: #3b82f6;    --color-focus-ring: rgba(59,130,246,.25);  --color-error-ring: rgba(220,38,38,.25);

  /* accent and links */
  --color-accent: #2563eb;  --color-accent-hover: #1d4ed8;  --color-accent-soft: #eff6ff;
  --color-accent-veil: rgba(37,99,235,.4);  --color-accent-veil-strong: rgba(37,99,235,.5);
  --color-link: #2563eb;    --color-link-hover: #1e40af;

  /* task rail (icons only; light in this sheet) */
  --color-rail-bg: #f8fafc;  --color-rail-fg: #475569;  --color-rail-fg-muted: #94a3b8;
  --color-rail-selected-bg: rgba(37,99,235,.10);  --color-rail-selected-fg: #2563eb;  --color-rail-compose: #2563eb;

  /* folder list selection */
  --color-nav-selected-bg: rgba(37,99,235,.10);  --color-nav-selected-fg: #1d4ed8;

  /* initials avatars: six pairs, picked by a hash of the address; none in a status hue */
  --av1-bg: #dbeafe;  --av1-fg: #1e3a8a;
  --av2-bg: #e0e7ff;  --av2-fg: #312e81;
  --av3-bg: #cffafe;  --av3-fg: #155e75;
  --av4-bg: #fce7f3;  --av4-fg: #831843;
  --av5-bg: #ede9fe;  --av5-fg: #4c1d95;
  --av6-bg: #e2e8f0;  --av6-fg: #334155;

  /* status colours: functional only, the same in every sheet */
  --color-success-bg: #ecfdf5;  --color-success-text: #065f46;  --color-success-icon: #059669;
  --color-warning-bg: #fffbeb;  --color-warning-text: #92400e;  --color-warning-icon: #d97706;
  --color-error-bg: #fef2f2;    --color-error-text: #991b1b;    --color-error-icon: #dc2626;
  --color-info-bg: #eff6ff;     --color-info-text: #1e40af;     --color-info-icon: #2563eb;

  /* list marks */
  --color-unread: #2563eb;  --color-flag: #dc2626;  --color-badge-bg: #2563eb;  --color-badge-fg: #ffffff;

  /* controls */
  --color-btn-primary-bg: #2563eb;   --color-btn-primary-fg: #ffffff;  --color-btn-primary-hover: #1d4ed8;
  --color-btn-secondary-bg: #ffffff; --color-btn-secondary-fg: #334155; --color-btn-secondary-border: #cbd5e1; --color-btn-secondary-hover: #f1f5f9;
  --color-btn-danger-bg: #dc2626;    --color-btn-danger-fg: #ffffff;
  --color-input-bg: #ffffff;  --color-input-border: #8a94a6;  --color-input-placeholder: #5b6577;
  --color-toast-bg: #1e293b;  --color-toast-fg: #f8fafc;

  /* the study bar: the one element allowed to look like the study */
  --study-h: 44px;  --study-bg: #0f172a;  --study-fg: #f8fafc;  --study-muted: #94a3b8;  --study-accent: #c4b5fd;  --study-track: #334155;

  /* the assistant panel */
  --ea-w: 304px;  --ea-bg: #ffffff;  --ea-header-bg: #f8fafc;  --ea-border: #e2e8f0;  --ea-chip-bg: #f1f5f9;  --ea-chip-fg: #334155;
}
