/* 多多 GK 設計 tokens：深海軌道。
   起始值來自 outputs/UI_tokens_起始值.css，擴充與調整記錄在 DESIGN.md。
   第一版只有淺色工作區，不跟隨系統深色模式（UI 定案 §3）。 */

@font-face {
  font-family: "DD Noto Sans TC";
  src: url("../fonts/NotoSansTC-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* 側欄 */
  --dd-nav: #0b1729;
  --dd-nav-active: #192b43;
  --dd-nav-text: #adbbcf;
  --dd-nav-text-strong: #ffffff;
  --dd-nav-rule: #1d2f47;

  /* 工作區 */
  --dd-background: #f2f5f9;
  --dd-surface: #ffffff;
  --dd-soft: #f7f9fc;
  --dd-hover: #f0f4fa;
  --dd-text: #142139;
  --dd-muted: #5f6e83;          /* 起始值 #67768b 在工作背景上只有 4.2～4.4:1，加深到 4.75:1 以上，見 DESIGN.md */
  --dd-border: #e1e7ef;
  --dd-border-strong: #c9d3e0;
  --dd-control-border: #8190a4;  /* 輸入框、核取方塊邊線，對白底與弱底都 ≥ 3:1 */

  /* 行動 */
  --dd-primary: #2466dc;
  --dd-primary-hover: #1d58c2;
  --dd-primary-press: #194ca8;
  --dd-selection: #eaf1fd;
  --dd-focus: #2466dc;

  /* 狀態：文字／底（一律搭配文字標籤，不只靠顏色） */
  --dd-warning-text: #8e581a;
  --dd-warning-bg: #fcf0db;
  --dd-review-text: #6a4b97;
  --dd-review-bg: #eee8f9;
  --dd-success-text: #34694f;
  --dd-success-bg: #e6f1eb;
  --dd-error-text: #b42318;
  --dd-error-bg: #feeceb;
  --dd-neutral-text: #4a586c;
  --dd-neutral-bg: #edf1f6;

  /* 字體：中文 Noto Sans TC（本地子集），數字用系統內建的等寬數字拉丁字型 */
  --dd-font: "DD Noto Sans TC", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  --dd-font-num: "Segoe UI", Roboto, "Helvetica Neue", Arial, "DD Noto Sans TC", sans-serif;

  --dd-font-title: 22px;
  --dd-font-stat: 24px;
  --dd-font-section: 16px;
  --dd-font-body: 14px;
  --dd-font-table: 13px;
  --dd-font-secondary: 12px;
  --dd-font-min: 11px;
  --dd-leading: 1.6;
  --dd-leading-tight: 1.35;

  /* 尺寸與間距（4px 基準） */
  --dd-space: 4px;
  --dd-s1: 4px;
  --dd-s2: 8px;
  --dd-s3: 12px;
  --dd-s4: 16px;
  --dd-s6: 24px;
  --dd-s8: 32px;

  --dd-radius-panel: 8px;
  --dd-radius-control: 6px;
  --dd-radius-tag: 4px;

  --dd-sidebar: 220px;
  --dd-toolbar: 56px;
  --dd-detail: 320px;
  --dd-control-h: 36px;
  --dd-touch: 44px;

  /* 動效 */
  --dd-duration-press: 120ms;
  --dd-duration-panel: 180ms;
  --dd-ease: cubic-bezier(.2, 0, 0, 1);

  --dd-shadow-overlay: 0 12px 32px rgb(11 23 41 / .18), 0 2px 6px rgb(11 23 41 / .08);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dd-duration-press: 0ms;
    --dd-duration-panel: 0ms;
  }
}

/* 簡體介面：中文改用裝置內建的簡體字型（Windows 微軟雅黑、Apple 蘋方），不另外下載；數字一樣用等寬數字 */
html:lang(zh-Hans) {
  --dd-font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --dd-font-num: "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
