/*
 * Desk design tokens (Aevix neutral palette). Brand values come from docs/handoff/brand/BRAND.md.
 * Semantic variables follow shadcn naming so primitives can be restyled without forks.
 * Concepts may override semantic variables inside their own scope class (e.g. .concept-console).
 *
 * Contrast notes (measured, WCAG 2.x):
 *   slate #70757D on warm white #F7F5F2 = 4.3:1 — used for icons/large text only.
 *   --muted-foreground light #61656D on #F7F5F2 = 5.3:1 — small metadata text.
 *   mist #B7B2AA on charcoal #252422 = 7.3:1.
 *   Vix crimson (#CE2029) is intentionally absent.
 */
:root {
  /* brand */
  --desk-charcoal: #252422;
  --desk-warm-white: #f7f5f2;
  --desk-stone: #ddd8d1;
  --desk-slate: #70757d;
  --desk-mist: #b7b2aa;
  --desk-border-light: #e5e0d8;
  --desk-dark-elevated: #1c1b1a;
  --desk-dark-border: #3a3834;

  /* type */
  --desk-font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --desk-font-display: "Manrope", "Inter", ui-sans-serif, system-ui, sans-serif;
  --desk-font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  /* spacing & radii */
  --desk-space-1: 4px;
  --desk-space-2: 8px;
  --desk-space-3: 16px;
  --desk-space-4: 24px;
  --desk-space-5: 32px;
  --desk-radius-xs: 3px;
  --desk-radius-sm: 4px;
  /* controls: buttons, inputs, menu items, sidebar rows */
  --desk-radius-md: 6px;
  --desk-radius: 8px;
  --desk-radius-lg: 12px;

  /* motion */
  --desk-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --desk-duration-fast: 120ms;
  --desk-duration: 180ms;

  /* light semantic */
  --background: #f7f5f2;
  --foreground: #252422;
  --card: #fffefc;
  --card-foreground: #252422;
  --popover: #fffefc;
  --popover-foreground: #252422;
  --primary: #252422;
  --primary-foreground: #f7f5f2;
  --secondary: #ece8e2;
  --secondary-foreground: #252422;
  --muted: #efebe5;
  --muted-foreground: #61656d;
  --subtle-foreground: #70757d;
  --accent: #ebe7e0;
  --accent-foreground: #252422;
  --hover: rgba(37, 36, 34, 0.045);
  --selected: rgba(37, 36, 34, 0.075);
  --border: #e5e0d8;
  --input: #ddd8d1;
  --ring: rgba(37, 36, 34, 0.55);
  --sidebar: #eeebe6;
  --sidebar-foreground: #3a3936;
  --sidebar-accent: rgba(37, 36, 34, 0.07);
  /* Desk logo mark (docs/handoff/brand/logo). Brand only; not a UI accent. */
  --brand-mark: #765b3f;
  --sidebar-border: transparent;
  --desk-shadow-card: 0 1px 2px rgba(37, 36, 34, 0.05), 0 8px 24px -8px rgba(37, 36, 34, 0.12);
  --desk-shadow-pop: 0 2px 6px rgba(37, 36, 34, 0.06), 0 16px 40px -12px rgba(37, 36, 34, 0.18);

  /* semantic status (always paired with an icon or text) */
  --urgent: #c2511a;
  --urgent-soft: rgba(194, 81, 26, 0.1);
  /* High priority: a muted warm step below Urgent. Medium, Low, and None stay neutral. */
  --priority-high: #9c6a46;
  --overdue: #b4471b;
  --due: #8a5a12;
  --destructive: #b42318;
  --destructive-foreground: #fffefc;
  --success: #3f6b47;
  /* In progress status; blue so it never reads as a priority or date warning. */
  --progress: #3c5f86;
  --info: #3c5f86;
  /* Things-style Today star (semantic glyph only, never a surface color) */
  --star: #e2a72e;
}

@media (prefers-color-scheme: dark) {
  :root {
  --background: #252422;
  --foreground: #f2efea;
  --card: #2d2c29;
  --card-foreground: #f2efea;
  --popover: #2d2c29;
  --popover-foreground: #f2efea;
  --primary: #f2efea;
  --primary-foreground: #252422;
  --secondary: #322f2c;
  --secondary-foreground: #f2efea;
  --muted: #2e2d2a;
  --muted-foreground: #b7b2aa;
  --subtle-foreground: #9a958d;
  --accent: #34322e;
  --accent-foreground: #f2efea;
  --hover: rgba(247, 245, 242, 0.045);
  --selected: rgba(247, 245, 242, 0.08);
  --border: #3a3834;
  --input: #44413c;
  --ring: rgba(247, 245, 242, 0.55);
  --sidebar: #1c1b1a;
  --sidebar-foreground: #dcd7cf;
  --sidebar-accent: rgba(247, 245, 242, 0.07);
  --brand-mark: #f3e5c7;
  --sidebar-border: transparent;
  --desk-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --desk-shadow-pop: 0 2px 8px rgba(0, 0, 0, 0.35), 0 18px 44px -12px rgba(0, 0, 0, 0.6);

  --urgent: #ec8a52;
  --urgent-soft: rgba(236, 138, 82, 0.14);
  --priority-high: #d1a07c;
  --overdue: #ef9466;
  --due: #e0b25e;
  --destructive: #f2786b;
  --destructive-foreground: #1c1b1a;
  --success: #8fbf96;
  --progress: #8db0d6;
  --info: #8db0d6;
  --star: #f0bf4c;
  }
}
