:root {
  color-scheme: light;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --surface-muted: #edf0f2;
  --surface-raised: #ffffff;

  --text: #151f2a;
  --text-soft: #4d5a67;
  --muted: #77838f;
  --text-on-strong: #ffffff;

  --line: #e2e8ee;
  --line-strong: #cdd6df;

  --accent: #0f7a5a;
  --accent-hover: #0c6449;
  --accent-soft: #e8f4ef;
  --accent-ring: rgb(15 122 90 / 16%);

  --success: #0f7a5a;
  --success-soft: #e8f4ef;
  --warning: #9a6700;
  --warning-soft: #fff6e0;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --info: #2b5f9e;
  --info-soft: #eaf2fb;

  --switch-track: #b6c0ca;
  --switch-thumb: #ffffff;

  --nav: #1b2430;
  --nav-surface: #202b34;
  --nav-text: #c4ced9;
  --nav-text-strong: #ffffff;
  --nav-line: #2b3644;

  /* 结果日志是一块常驻深色的终端面板（两个主题下 --nav 都是深色），
     而 --success / --danger 是为页面浅底调的（浅色主题下是 #0f7a5a / #b3261e）。
     拿它们去画深色底上的文字只有 2.4~3.4:1，几乎读不出来。
     所以单独给「深色面上的语义色」：亮一档，且刻意不随主题切换 ——
     浅色主题下它们在 #1b2430 上仍有 6.3:1 / 5.4:1，暗色主题下 7.2:1 / 6.2:1。 */
  --nav-success: #2eb98a;
  --nav-danger: #f2705f;

  --overlay: rgb(17 24 32 / 48%);
  --shadow-rgb: 24 33 43;
  --surface-rgb: 255 255 255;
  --shadow-sm: 0 1px 2px rgb(var(--shadow-rgb) / 6%);
  --shadow-card: 0 1px 2px rgb(var(--shadow-rgb) / 5%), 0 8px 24px rgb(var(--shadow-rgb) / 6%);
  --shadow-dialog: 0 24px 70px rgb(var(--shadow-rgb) / 22%);
  --shadow-float: 0 2px 4px rgb(var(--shadow-rgb) / 6%), 0 14px 38px rgb(var(--shadow-rgb) / 14%);

  --radius-card: 10px;
  --radius-control: 8px;
  --radius-shell: 14px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;

  /* 顶栏壳层（shell.css）布局常量 */
  --topbar-h: 60px;
  --wrap-max: 1720px;
  --gutter: 32px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d1319;
  --surface: #151d26;
  --surface-soft: #1a232d;
  --surface-muted: #202a35;
  --surface-raised: #1a2430;

  --text: #e7eef4;
  --text-soft: #b3c0cc;
  --muted: #8492a0;
  --text-on-strong: #ffffff;

  --line: #242f3b;
  --line-strong: #33404e;

  --accent: #2eb98a;
  --accent-hover: #3ecd9b;
  --accent-soft: #123329;
  --accent-ring: rgb(46 185 138 / 22%);

  --success: #2eb98a;
  --success-soft: #123329;
  --warning: #e0b055;
  --warning-soft: #332a16;
  --danger: #f2705f;
  --danger-soft: #331d1a;
  --info: #6aa9e8;
  --info-soft: #16263a;

  --switch-track: #3a4756;
  --switch-thumb: #ffffff;

  --nav: #11181f;
  --nav-surface: #19242e;
  --nav-text: #a8b4c0;
  --nav-text-strong: #f2f6fa;
  --nav-line: #222c37;

  /* 与 :root 同值是有意的：--nav 在两个主题下都是深色，这一对不随主题切换。
     显式重声明是为了过 TestDarkThemeRedeclaresEveryColorToken 这条 token 完备性守卫。 */
  --nav-success: #2eb98a;
  --nav-danger: #f2705f;

  --overlay: rgb(0 0 0 / 62%);
  --shadow-rgb: 0 0 0;
  --surface-rgb: 21 29 38;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 28%);
  --shadow-card: 0 1px 2px rgb(0 0 0 / 38%), 0 8px 24px rgb(0 0 0 / 26%);
  --shadow-dialog: 0 24px 70px rgb(0 0 0 / 52%);
  --shadow-float: 0 2px 6px rgb(0 0 0 / 40%), 0 18px 46px rgb(0 0 0 / 36%);
}
