/* ============================================================
   NoteDesk — Design Tokens
   来源：design-system/notedesk/MASTER.md
   风格：Minimalism & Swiss Style — Warm ink + amber accent on cream
   ============================================================ */

:root {
  /* ---------- 色彩 ---------- */
  --color-primary: #78716c;
  --color-on-primary: #ffffff;
  --color-secondary: #a8a29e;
  --color-on-secondary: #0f172a;

  --color-accent: #d97706;          /* 浅底强调，配深色文字 */
  --color-accent-strong: #b45309;   /* 实底按钮，配白字 5.05:1 */
  --color-accent-soft: #fef3c7;     /* 选中态浅底 */
  --color-accent-ink: #92400e;      /* 浅底上的文字 6.38:1 */
  --color-on-accent: #0f172a;

  --color-background: #fffbeb;
  --color-foreground: #0f172a;
  --color-ink: #44403c;             /* 标题 / 强调正文 */
  --color-card: #ffffff;
  --color-card-foreground: #0f172a;

  --color-muted: #f6f6f6;
  --color-muted-strong: #ececeb;
  --color-muted-foreground: #475569;
  --color-subtle-foreground: #78716c;

  --color-border: #e7e5e4;
  --color-border-strong: #d6d3d1;

  --color-destructive: #dc2626;
  --color-destructive-soft: #fef2f2;
  --color-on-destructive: #ffffff;

  --color-success: #15803d;
  --color-success-soft: #f0fdf4;

  --color-ring: #78716c;

  /* 分类色标 */
  --cat-work: #d97706;
  --cat-life: #0e7490;
  --cat-idea: #7c3aed;
  --cat-study: #15803d;

  /* ---------- 字体 ---------- */
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono",
    Menlo, monospace;

  --text-xs: 0.75rem;    /* 12 */
  --text-sm: 0.875rem;   /* 14 */
  --text-base: 1rem;     /* 16 */
  --text-lg: 1.125rem;   /* 18 */
  --text-xl: 1.5rem;     /* 24 */
  --text-2xl: 2rem;      /* 32 */

  --leading-tight: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

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

  /* ---------- 间距（4px 基准） ---------- */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* ---------- 圆角 ---------- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ---------- 阴影 ---------- */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 10px 15px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 25px rgba(15, 23, 42, 0.12);

  /* ---------- 动效 ---------- */
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 250ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* ---------- 层级 ---------- */
  --z-base: 0;
  --z-sticky: 10;
  --z-dropdown: 20;
  --z-overlay: 40;
  --z-modal: 100;
  --z-toast: 1000;

  /* ---------- 布局 ---------- */
  --sidebar-width: 280px;
  --list-width: 320px;
  --editor-max: 820px;
}

/* 尊重用户系统的"减弱动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0.01ms;
    --duration-base: 0.01ms;
    --duration-slow: 0.01ms;
  }
}
