/* ============================================================================
   fonts-hinted.css —— 字形级烘焙字体（hinted webfont）接线
   ----------------------------------------------------------------------------
   关键词：字形级烘焙 / hinted webfont / ClearType 仿真 / 像素一致率 / 像素门 / PIXEL_PARITY

   为什么要有这个文件（详见 docs/PIXEL-PARITY.md「字形级烘焙」一节）：
   - 真机参考图的文字是 Windows ClearType + hinting 渲染：12px 汉字的横竖笔画是**整像素实心**；
   - Linux 无头 Chrome 用 FreeType 但没开 hinting（--font-render-hinting 在 headless shell 里是 no-op，
     fontconfig 的 hintstyle 也移不动栅格），同一字形只有 50-60% 覆盖率，逐像素比对必然大量超差；
   - 解决方式：由 tools/bake-hinted-fonts.py 把「官方字体在该像素号下的 hinted 轮廓」烘焙成网页字体
     （unitsPerEm = 64*ppem，1 unit = 1/64 px），页面照常用真实 DOM 文本 + 官方字体族，
     只是把 CJK 字形交给这份 hinted 字体渲染 —— 文字仍是文本，没有被转成图片。
   - 合规：字形数据只取自官方字体文件（/mnt/win-c/Windows/Fonts），不取自参考截图；
     字体清单与 sha256 见 web/assets/fonts/manifest.json（工具 --check 可复算）。

   接线规则（4 条 + 3 个微调，全部由像素门 A/B 实测择优；见 docs/PIXEL-PARITY.md 量测表）：
   1. 12px 功能区按钮标签：CJK 用 hinted 12px（西文仍落到官方字体）；
   2. 12px 小按钮单行标签：同上，并整体上移 1px（真机基线对齐）；
   3. 11px 组标题：hinted 11px + 上移 1px；组标题是 translateX(-50%) 居中的，必须整体保留；
   4. 12px 当前文件夹路径文本：hinted 12px + 上移 1px；
   5. 12px 搜索占位符：Segoe UI hinted 12px；
   6. 面板标题：真机是 Light 字重（A/B 实测优于 Regular）；
   7. 任务栏文字压深到 #05090d、命令行选项卡文字加 0.8px 白色描边、命令行提示条链接色 #1268b4、
      提示条字重 350 —— 都是逐类 A/B 实测的对比度/字重对齐，不是拍脑袋。
   ========================================================================== */

/* ---- 烘焙字体（由 tools/bake-hinted-fonts.py 生成，随仓提交；路径相对本 CSS 文件） ---- */
@font-face {
  font-family: "MatCjk11";
  src: url("../assets/fonts/cjk-11.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "MatCjk12";
  src: url("../assets/fonts/cjk-12.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "MatSegoe12";
  src: url("../assets/fonts/segoe-12.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

/* ---- 功能区：12px 按钮标签（大按钮两行/单行 + 小按钮单行） ---- */
#ribbon-home .btn-label {
  font-family: "MatCjk12", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif !important;
}
#ribbon-home .t12:not(.btn-label) {
  font-family: "MatCjk12", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif !important;
  transform: translateY(-1px);
}

/* ---- 功能区：11px 组标题（「文件/变量/代码/SIMULINK/环境/资源」） ---- */
#ribbon-home .group-label {
  font-family: "MatCjk11", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif !important;
}
#ribbon-home .group-label.tc {
  transform: translateX(-50%) translateY(-1px);
}

/* ---- 当前文件夹工具栏：12px 路径文本 ---- */
.path-text {
  font-family: "MatCjk12", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif !important;
  transform: translateY(-1px);
}

/* ---- 选项卡条：12px 搜索占位符 ---- */
#search-placeholder {
  font-family: "MatSegoe12", "Segoe UI", "Microsoft YaHei UI", sans-serif !important;
}

/* ---- 面板标题（文件 / 工作区）：真机为 Light 字重 ---- */
.panel-title .title-text {
  font-family: "Microsoft YaHei UI Light", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif !important;
}

/* ---- 状态栏「就绪」：真机为 Light 字重 ---- */
#status-ready {
  font-weight: 300 !important;
}

/* ---- 选项卡条「登录」：白色细描边补齐 ClearType 的墨量 ---- */
#login-btn {
  -webkit-text-stroke: 0.1px #ffffff;
}

/* ---- 命令行窗口：选项卡标签补墨、提示条字重/链接色 ---- */
#cmd-tab-label {
  text-shadow: 0 0 0.8px #ffffff;
}
#cmd-banner-text {
  font-weight: 350 !important;
}
#cmd-banner-text a {
  color: #1268b4 !important;
}

/* ---- OS 任务栏文字：真机墨色更深 ---- */
.tb-label,
.tb-clock-time,
.tb-clock-date {
  color: #05090d !important;
}