/* ─────────────────────────────────────────────────────────────
   設計 token —— index.html 與 cis.html 共用（未來 /en/ 也共用）。
   改配色或字型只改這一個檔案，不要在頁面裡寫死色碼。
   相關說明：docs/architecture.md
   ───────────────────────────────────────────────────────────── */

:root{
  --blue:#1e40af;
  --blue-deep:#1e3a8a;
  --teal:#0f766e;
  --teal-bright:#0d9488;
  --ink:#111827;
  --ink-soft:#374151;
  --muted:#6b7280;
  --line:#e5e7eb;
  --bg:#ffffff;
  --bg-alt:#f8fafc;
  --card:#ffffff;
  --tint-blue:#e0f2fe;
  --tint-mint:#ecfdf5;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.06);
  --maxw:1080px;
  /* 標題與內文一律黑體：螢幕可讀性優先，且黑體的系統後備（蘋方／微軟正黑體）
     不像明體會退到新細明體。標題字獨立成 --display，日後要換只改這一行。 */
  --display:"Inter","Noto Sans TC","PingFang TC","Microsoft JhengHei","Segoe UI",sans-serif;
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;
  /* 備用：若日後想讓標題回到宋體，把 --display 指向 --serif 的內容，
     並記得在頁面的 Google Fonts 連結加回 &family=Noto+Serif+TC:wght@700 */
  --serif:"Noto Serif TC","Source Han Serif TC",Georgia,"PingFang TC","Microsoft JhengHei",sans-serif;
  --mono:"SF Mono",Consolas,"Roboto Mono",monospace;
}

/* 深色模式。跟隨系統，但 [data-theme="light"] 可強制留在淺色。 */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --blue:#60a5fa; --blue-deep:#93c5fd; --teal:#2dd4bf; --teal-bright:#5eead4;
    --ink:#f1f5f9; --ink-soft:#cbd5e1; --muted:#94a3b8; --line:#1e293b;
    --bg:#0b1220; --bg-alt:#0f172a; --card:#111c2e;
    --tint-blue:#12283f; --tint-mint:#0f2b28;
    --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.35);
  }
}
/* 明確指定深色時同樣生效（優先於系統設定） */
:root[data-theme="dark"]{
  --blue:#60a5fa; --blue-deep:#93c5fd; --teal:#2dd4bf; --teal-bright:#5eead4;
  --ink:#f1f5f9; --ink-soft:#cbd5e1; --muted:#94a3b8; --line:#1e293b;
  --bg:#0b1220; --bg-alt:#0f172a; --card:#111c2e;
  --tint-blue:#12283f; --tint-mint:#0f2b28;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.35);
}
