/* ==========================================================================
   tokens.css — 设计令牌单一事实源
   --------------------------------------------------------------------------
   加载位置：每个页面最后一条 <link rel="stylesheet"> 之后，无 media 门控。
   存在原因：site.css / compact.css / hero-unify.css 都带 min-width:1240 门控，
             移动端不加载；只有放在最后且不带 media，令牌才能在两端都可用。

   三条硬约束（改这个文件前先读）：
   1) 本文件只允许出现 :root 选择器（可被 @media 包裹）；
      不允许任何元素/类选择器、不允许任何普通属性声明、不允许 !important。
   2) 命名空间固定 --tk-*，不得复用已被占用的旧名：
      --sec-py --sec-px --head-mb --h2-fs --h2-lh --h2-ls --en-fs --en-ls
      --t2-fs --t2-lh --line-soft --fs-* --lh-* --sp-* --gray2 --ink-2
      --ease-out --dur --mgap --hx-* --blue* --gray --gutter --wrap
      --radius* --shadow* --r --r-sm
   3) 断点无法变量化（CSS 自定义属性不能用于 @media 条件）。

   断点表（仅供人工查阅，不参与计算）：
     桌面  >= 1240px      → site.css / compact.css / hero-unify.css / pages/*.css
     移动  <= 1239px      → m.css / m-pages.css / m-round17.css / *-m.css
     无门控（两端）        → mix.css / gallery-zoom.css / contact-banner.css / tokens.css

   板块上下留白现状登记（本轮只登记不合并，合并属阶段 4）：
     --sec-py     site 42px  → 被 mix.css:1175 改为 24px（两端）
     --sec-px     site 48px  → mix.css:1175 复述 48px
     --secpad     flex 64px / compact:97 34px / sections-m 28px → 桌面最终被 mix 覆盖为 24px
     --sp-sec     m-pages:1230 40px（仅移动端）
     裸写 42px 48px / 40px / 44px / 20px → 分散在 dispatch/hospital/flex/hr/m-pages
   结论：桌面实际 24px / 48px，移动实际 40px（深色块 44px），与任何单一变量都不完全对应。
   ========================================================================== */

/* ---------- 1 原始刻度：一值一令牌，机械可换 ---------- */
:root {
  /* 字体族：实测 5 套（含 2 套系统栈，项数与顺序不同，不可合并） */
  --tk-ff-latin: "Helvetica Neue",Arial,sans-serif;
  --tk-ff-cjk: "PingFang SC","Microsoft YaHei","Source Han Sans SC","Hiragino Sans GB",sans-serif;
  --tk-ff-serif: Georgia,serif;
  --tk-ff-system: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",sans-serif;
  --tk-ff-system-alt: -apple-system,"PingFang SC","Microsoft YaHei","Hiragino Sans GB","Source Han Sans SC",sans-serif;

  /* 字号：35 档，覆盖 1517/1536 = 98.8%（含全部半像素档；44/32 两档为语义层所需） */
  --tk-fs-10: 10px;
  --tk-fs-10-5: 10.5px;
  --tk-fs-11: 11px;
  --tk-fs-11-5: 11.5px;
  --tk-fs-12: 12px;
  --tk-fs-12-5: 12.5px;
  --tk-fs-13: 13px;
  --tk-fs-13-5: 13.5px;
  --tk-fs-14: 14px;
  --tk-fs-14-5: 14.5px;
  --tk-fs-15: 15px;
  --tk-fs-15-5: 15.5px;
  --tk-fs-16: 16px;
  --tk-fs-16-5: 16.5px;
  --tk-fs-17: 17px;
  --tk-fs-17-5: 17.5px;
  --tk-fs-18: 18px;
  --tk-fs-19: 19px;
  --tk-fs-20: 20px;
  --tk-fs-21: 21px;
  --tk-fs-22: 22px;
  --tk-fs-23: 23px;
  --tk-fs-24: 24px;
  --tk-fs-26: 26px;
  --tk-fs-27: 27px;
  --tk-fs-28: 28px;
  --tk-fs-30: 30px;
  --tk-fs-31: 31px;
  --tk-fs-32: 32px;
  --tk-fs-33: 33px;
  --tk-fs-34: 34px;
  --tk-fs-40: 40px;
  --tk-fs-44: 44px;
  --tk-fs-52: 52px;
  --tk-fs-120: 120px;

  /* 行高：19 档，覆盖 594/634 = 93.7%（全为无单位数值） */
  --tk-lh-1: 1;
  --tk-lh-1-1: 1.1;
  --tk-lh-1-2: 1.2;
  --tk-lh-1-3: 1.3;
  --tk-lh-1-35: 1.35;
  --tk-lh-1-4: 1.4;
  --tk-lh-1-45: 1.45;
  --tk-lh-1-5: 1.5;
  --tk-lh-1-55: 1.55;
  --tk-lh-1-6: 1.6;
  --tk-lh-1-62: 1.62;
  --tk-lh-1-65: 1.65;
  --tk-lh-1-7: 1.7;
  --tk-lh-1-72: 1.72;
  --tk-lh-1-75: 1.75;
  --tk-lh-1-8: 1.8;
  --tk-lh-1-85: 1.85;
  --tk-lh-1-9: 1.9;
  --tk-lh-1-95: 1.95;

  /* 字距 px：12 档，覆盖 355/443 = 80.1% */
  --tk-ls-n1: -1px;
  --tk-ls-0-1: .1px;
  --tk-ls-0-2: .2px;
  --tk-ls-0-3: .3px;
  --tk-ls-0-4: .4px;
  --tk-ls-0-5: .5px;
  --tk-ls-0-6: .6px;
  --tk-ls-0-8: .8px;
  --tk-ls-1: 1px;
  --tk-ls-1-2: 1.2px;
  --tk-ls-2: 2px;
  --tk-ls-2-2: 2.2px;

  /* 字距 em：9 档，覆盖 84/108 = 77.8%。
     em 与 px 语义不同，不可混算，故单列 */
  --tk-lsem-n0-02: -.02em;
  --tk-lsem-n0-01: -.01em;
  --tk-lsem-0-02: .02em;
  --tk-lsem-0-03: .03em;
  --tk-lsem-0-04: .04em;
  --tk-lsem-0-06: .06em;
  --tk-lsem-0-08: .08em;
  --tk-lsem-0-16: .16em;
  --tk-lsem-0-18: .18em;

  /* 圆角：方向性写法（3px 3px 0 0 等）语义独立，不进令牌 */
  --tk-r-0: 0;
  --tk-r-50pct: 50%;
  --tk-r-1: 1px;
  --tk-r-2: 2px;
  --tk-r-3: 3px;
  --tk-r-4: 4px;
  --tk-r-5: 5px;
  --tk-r-6: 6px;
  --tk-r-8: 8px;
  --tk-r-9: 9px;
  --tk-r-10: 10px;
  --tk-r-11: 11px;
  --tk-r-12: 12px;
  --tk-r-14: 14px;
  --tk-r-15: 15px;
  --tk-r-16: 16px;
  --tk-r-18: 18px;
  --tk-r-20: 20px;
  --tk-r-999: 999px;

  /* 阴影：取出现 >=3 次的完整值共 17 条；12 簇 alpha 抖动不合并，仅各自成牌 */
  --tk-sh-01: 0 6px 18px rgba(18,32,47,.05);   /* x13 */
  --tk-sh-02: 0 20px 44px rgba(18,32,47,.14);   /* x6 */
  --tk-sh-03: 0 8px 22px rgba(18,32,47,.05);   /* x6 */
  --tk-sh-04: 0 20px 48px rgba(3,22,42,.38);   /* x5 */
  --tk-sh-05: 0 0 0 3px rgba(12,90,166,.10);   /* x5 */
  --tk-sh-06: 0 14px 30px rgba(18,32,47,.08);   /* x5 */
  --tk-sh-07: 0 18px 38px rgba(9,60,112,.22);   /* x5 */
  --tk-sh-08: 0 2px 10px rgba(11, 47, 99, .05);   /* x5 */
  --tk-sh-09: 0 4px 12px rgba(12,90,166,.30);   /* x4 */
  --tk-sh-10: 0 10px 24px rgba(185,43,30,.38);   /* x4 */
  --tk-sh-11: 0 8px 20px rgba(185,43,30,.26);   /* x4 */
  --tk-sh-12: 0 6px 18px rgba(18,32,47,.04);   /* x4 */
  --tk-sh-13: 0 4px 12px rgba(12,90,166,.24);   /* x3 */
  --tk-sh-14: 0 10px 24px rgba(8,45,85,.16);   /* x3 */
  --tk-sh-15: 0 0 0 3px rgba(12,90,166,.22);   /* x3 */
  --tk-sh-16: inset 3px 0 0 var(--blue);   /* x3 */
  --tk-sh-17: 0 0 0 3px rgba(217,58,43,.14);   /* x3 */

  /* 间距台账：只登记，本轮不做 padding/margin 批量替换（属阶段 4） */
  --tk-sp-0: 0;
  --tk-sp-2: 2px;
  --tk-sp-4: 4px;
  --tk-sp-6: 6px;
  --tk-sp-8: 8px;
  --tk-sp-10: 10px;
  --tk-sp-12: 12px;
  --tk-sp-14: 14px;
  --tk-sp-16: 16px;
  --tk-sp-18: 18px;
  --tk-sp-20: 20px;
  --tk-sp-22: 22px;
  --tk-sp-24: 24px;
  --tk-sp-26: 26px;
  --tk-sp-28: 28px;
  --tk-sp-32: 32px;
  --tk-sp-40: 40px;
  --tk-sp-48: 48px;
  --tk-secpad-desk: 24px;      /* 桌面板块上下（mix.css:1175 实际值） */
  --tk-secpx-desk: 48px;       /* 桌面板块左右 */
  --tk-secpad-mob: 40px;       /* 移动板块上下（m-pages.css） */
  --tk-secpad-mob-dark: 44px;  /* 移动深色板块 */
}

/* ---------- 2 语义层 ----------
   颜色：本层定义全站主色/文本色/面线色；其余文件一律引用本层。
   例外：另有 19 处 `--变量: #hex` 仍是字面值，全部属于「只在变量定义处出现、
   别处零次使用」的单次色（如 global 的 --blue:#1359b8、hr/flex 的 --gray:#5F6E7D），
   多数还是被 site.css 覆盖的死值。是否收敛留给阶段 4 的漂移裁决，本轮不动。
   字号/行高：语义名是原始刻度的别名，收敛只需改这一层。
   -------------------------------------------------------------------------- */
:root {
  /* 品牌 */
  --tk-c-blue: #0c5aa6;
  --tk-c-blue-d: #083e75;
  --tk-c-blue-dd: #062e56;
  --tk-c-blue-l: #2e86d8;
  --tk-c-blue-pale: #eaf2fa;
  --tk-c-gold: #e0a649;
  --tk-c-gold-l: #ffc98a;
  --tk-c-red: #d93a2b;
  --tk-c-red-l: #f2564a;
  --tk-c-red-d: #b92b1e;
  --tk-c-brand-global: #1359b8;
  --tk-c-navy: #08224a;

  /* 文本 */
  --tk-c-ink: #12202f;
  --tk-c-gray: #5a6875;
  --tk-c-gray-2: #66727f;

  /* 面 / 线 */
  --tk-c-line: #e3e8ee;
  --tk-c-line-soft: #e6edf4;
  --tk-c-card-bd: #e8edf3;
  --tk-c-bg: #f4f7fa;
  --tk-c-white: #ffffff;
  --tk-c-black: #000000;

  /* 台账色：高频但暂无明确角色，暂以 hex 命名（阶段 4 收敛） */
  --tk-hex-cfe0f0: #cfe0f0;   /* x31 */
  --tk-hex-e3eaf2: #e3eaf2;   /* x31 */
  --tk-hex-0f559b: #0f559b;   /* x30 */
  --tk-hex-093c70: #093c70;   /* x23 */
  --tk-hex-6b7a89: #6b7a89;   /* x21 */
  --tk-hex-7fa2c4: #7fa2c4;   /* x20 */
  --tk-hex-f7fafd: #f7fafd;   /* x20 */
  --tk-hex-a9c6df: #a9c6df;   /* x20 */
  --tk-hex-f0c784: #f0c784;   /* x19 */
  --tk-hex-0a3e73: #0a3e73;   /* x16 */
  --tk-hex-7e8b99: #7e8b99;   /* x16 */
  --tk-hex-8faecb: #8faecb;   /* x14 */
  --tk-hex-c9d3de: #c9d3de;   /* x14 */
  --tk-hex-d8e0e8: #d8e0e8;   /* x13 */
  --tk-hex-4c5a69: #4c5a69;   /* x13 */
  --tk-hex-dce6f0: #dce6f0;   /* x13 */
  --tk-hex-eef2f7: #eef2f7;   /* x13 */
  --tk-hex-e8eef4: #e8eef4;   /* x12 */
  --tk-hex-a9b4c0: #a9b4c0;   /* x11 */
  --tk-hex-f7f9fc: #f7f9fc;   /* x11 */
  --tk-hex-edf1f6: #edf1f6;   /* x11 */
  --tk-hex-9aa7b4: #9aa7b4;   /* x11 */
  --tk-hex-9fc0de: #9fc0de;   /* x11 */
  --tk-hex-0e4e8e: #0e4e8e;   /* x10 */
  --tk-hex-0e5293: #0e5293;   /* x10 */
  --tk-hex-bdd4e9: #bdd4e9;   /* x10 */
  --tk-hex-c9dff3: #c9dff3;   /* x9 */
  --tk-hex-36454f: #36454f;   /* x9 */
  --tk-hex-0b4278: #0b4278;   /* x8 */
  --tk-hex-edf3fa: #edf3fa;   /* x8 */
  --tk-hex-6c8dad: #7d9ebd;   /* x8 */
  --tk-hex-6b7c8f: #6b7c8f;   /* x8 */
  --tk-hex-3fa0e8: #3fa0e8;   /* x7 */
  --tk-hex-b3bec9: #b3bec9;   /* x7 */
  --tk-hex-f4f8fc: #f4f8fc;   /* x7 */
  --tk-hex-8fb6da: #8fb6da;   /* x6 */
  --tk-hex-fbfcfd: #fbfcfd;   /* x6 */
  --tk-hex-3f6e9c: #3f6e9c;   /* x6 */
  --tk-hex-0a4173: #0a4173;   /* x6 */
  --tk-hex-8faec9: #8faec9;   /* x6 */
  --tk-hex-b9c7d6: #b9c7d6;   /* x6 */
  --tk-hex-d7e4f0: #d7e4f0;   /* x6 */
  --tk-hex-f5faff: #f5faff;   /* x6 */

  /* 语义字号（指向原始刻度；移动端在文件末尾覆盖） */
  --tk-fs-h1: var(--tk-fs-44);
  --tk-fs-h2: var(--tk-fs-26);
  --tk-fs-h3: var(--tk-fs-18);
  --tk-fs-body: var(--tk-fs-13);
  --tk-fs-sm: var(--tk-fs-12);
  --tk-fs-note: var(--tk-fs-11);
  --tk-fs-num: var(--tk-fs-33);

  /* 语义行高 */
  --tk-lh-h: var(--tk-lh-1-3);
  --tk-lh-body: var(--tk-lh-1-6);
  --tk-lh-sm: var(--tk-lh-1-5);
}

/* ---------- 3 移动端覆盖：镜像 m-pages.css:1230 的实测值 ---------- */
@media (max-width:1239px) {
  :root {
    --tk-fs-h1: var(--tk-fs-32);
    --tk-fs-h2: var(--tk-fs-22);
    --tk-fs-h3: var(--tk-fs-15);
    --tk-fs-body: var(--tk-fs-13);
    --tk-fs-sm: var(--tk-fs-12);
    --tk-fs-note: var(--tk-fs-12);
    --tk-fs-num: var(--tk-fs-22);
  }
}
