:root {
  /* ─── Colors：中性色为主，GitHub 语义色 ─── */
  --color-bg:               #f3f3f4;
  --color-surface:          #ffffff;
  --color-surface-raised:   #f7f7f8;
  --color-border:           #e2e2e5;
  --color-border-strong:    #c9c9cf;
  --color-border-focus:     #0969da;

  --color-text:             #16161a;
  --color-text-secondary:   #5b5b63;
  --color-text-tertiary:    #8b8b94;
  --color-text-invert:      #ffffff;

  /* 主操作：绿色 */
  --color-action:           #1f883d;
  --color-action-hover:     #1a7f37;
  --color-action-text:      #ffffff;

  /* 蓝色：图标、焦点、选中与链接悬停 */
  --color-accent:           #0969da;
  --color-accent-hover:     #0860ca;
  --color-accent-emphasis:  #0969da;
  --color-accent-subtle:    #ddf4ff;
  --color-accent-subtle-border: #54aeff66;

  --color-error:            #d1242f;
  --color-error-subtle:     #fdf1f0;
  --color-error-border:     #f0c4c0;

  --color-success:          #1a7f37;
  --color-success-subtle:   #dafbe1;
  --color-underline-active: #fd8c73;

  /* ─── Spacing ─── */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-12: 48px;

  /* ─── Radius ─── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* ─── Typography ─── */
  --font-sans: 'DM Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-lg:   16px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  32px;
  --text-4xl:  40px;

  --leading-tight:   1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.6;

  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     600;

  /* ─── Shadow：仅浮层使用中性阴影 ─── */
  --shadow-overlay: 0 12px 32px rgb(0 0 0 / 0.10);

  /* ─── Transitions ─── */
  --duration-fast: 120ms;
  --duration-base: 160ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);

  /* ─── Layout ─── */
  --container-max: 1120px;
  --nav-height:    60px;
}

/* ═══════════════════════════════════════
   Dark mode（跟随系统）
═══════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:               #0d0d0f;
    --color-surface:          #161619;
    --color-surface-raised:   #1d1d21;
    --color-border:           #2a2a2f;
    --color-border-strong:    #3d3d44;
    --color-border-focus:     #4493f8;

    --color-text:             #f2f2f4;
    --color-text-secondary:   #a4a4ad;
    --color-text-tertiary:    #75757e;
    --color-text-invert:      #16161a;

    --color-action:           #238636;
    --color-action-hover:     #1f7f33;
    --color-action-text:      #ffffff;

    --color-accent:           #4493f8;
    --color-accent-hover:     #58a6ff;
    --color-accent-emphasis:  #1f6feb;
    --color-accent-subtle:    rgb(56 139 253 / 0.15);
    --color-accent-subtle-border: rgb(56 139 253 / 0.40);

    --color-error:            #f85149;
    --color-error-subtle:     rgb(255 157 148 / 0.10);
    --color-error-border:     rgb(255 157 148 / 0.28);

    --color-success:          #3fb950;
    --color-success-subtle:   rgb(46 160 67 / 0.15);
    --color-underline-active: #f78166;

    --shadow-overlay: 0 12px 32px rgb(0 0 0 / 0.55);
  }
}
