# (c) 2026 Jose AI (https://www.linhut.cn)
# https://github.com/linhut/gongwen-skill
# Licensed under the MIT License. See the LICENSE file for details.

# ============================================================
# 公共基础规则 - 所有公文类型共享
# ============================================================
# 基于 GB/T 9704-2012 党政机关公文格式
# 所有文档类型通过三层合并继承此文件
# ============================================================

template_name: "公共基础规则"
document_type: common

# --- 页面设置 (A4) ---
# 页边距基于省筹委会排版规范（改动1）：上2.8/下2.8/左2.7/右2.7cm
# 红头文件红头区占用页面上部，正文区页边距较 GB/T 9704 国标收窄
page_setup:
  paper_size: A4
  paper_width_mm: 210
  paper_height_mm: 297
  margins:
    top: 2.8cm
    bottom: 2.8cm
    left: 2.7cm
    right: 2.7cm
  header_distance: 1.5cm   # 页眉距页边界（PDF 规范 0.59 英寸 ≈1.5cm）
  footer_distance: 2.3cm   # 页脚距页边界（PDF 规范 0.91 英寸 ≈2.3cm）

# --- 公文大标题格式 ---
doc_title:
  font: "方正小标宋简体"
  font_fallback: "SimSun"
  size: 22pt
  align: center
  bold: false
  line_spacing: 33pt

# --- 新闻稿标题规范（文种分叉，P3 方案 2.3.2）---
# 法定公文标题：事由+文种式，≤20 字；新闻稿标题：事件陈述式，≤35 字
title_spec:
  official_doc:
    max_length: 20
    style: "事由+文种"
    example: "关于召开XX会议的通知"
  news_doc:
    max_length: 35
    style: "事件陈述式"
    example: "XX会议在XX召开"
    note: "新闻稿标题应完整陈述事件事实，包含时间/地点/事件核心要素，不做精简"

# --- 一级标题格式（一、二、三…）---
heading_1:
  font: "黑体"
  font_fallback: "SimHei"
  size: 16pt
  bold: false
  line_spacing: 33pt
  first_line_indent: 2em

# --- 二级标题格式（（一）（二）…）---
heading_2:
  font: "楷体_GB2312"
  font_fallback: "KaiTi"
  size: 16pt
  bold: false
  line_spacing: 33pt
  first_line_indent: 2em

# --- 三级标题格式（1. 2. 3.…）---
heading_3:
  font: "仿宋_GB2312"
  font_fallback: "FangSong"
  size: 16pt
  bold: true
  line_spacing: 33pt
  first_line_indent: 2em

# --- 四级标题格式（（1）（2）…，改动3 新增）---
heading_4:
  font: "仿宋_GB2312"
  font_fallback: "FangSong"
  size: 16pt
  bold: false
  line_spacing: 33pt
  first_line_indent: 2em

# --- 序号体系（改动5 新增，省筹委会规范）---
# 中文序号体系：法定公文默认；罗马数字/英文序号体系：附件/法规/技术方案
numbering_systems:
  chinese:
    level_1: "一、二、三…"
    level_2: "（一）（二）…"
    level_3: "1. 2. 3.…"
    level_4: "（1）（2）…"
    default: true
  western:
    level_1: "I. II. III.…"
    level_2: "A. B. C.…"
    level_3: "1. 2. 3.…"
    level_4: "a. b. c.…"
    default: false

# --- 空行规则（改动6 新增，省筹委会规范）---
# 供 modifier._insert_blank_lines 在 optimize 路径A中主动插入必要空行
blank_line_rules:
  doc_title_before: 1    # 公文大标题前空1行
  doc_title_after: 1     # 公文大标题后空1行
  heading_before: 0      # 各级标题前不额外空行（行距已含间距）
  body_to_signature: 2   # 正文末尾与落款空2行
  attachment_gap: 1      # 附件标题与正文空1行

# --- 正文默认格式 ---
body:
  font: "仿宋_GB2312"
  font_fallback: "FangSong"
  size: 16pt
  line_spacing: 33pt
  first_line_indent: 2em
  align: justify

# --- 落款区（P4：署名段居中、18pt、不加粗）---
signature:
  font: "仿宋_GB2312"
  font_fallback: "FangSong"
  size: 18pt
  align: center

# --- 日期 ---
date:
  font: "仿宋_GB2312"
  font_fallback: "FangSong"
  size: 16pt
  format: "YYYY年MM月DD日"
  align: right
  right_indent: 4em

# --- 称呼段（P5：左对齐、无首行缩进）---
salutation:
  font: "仿宋_GB2312"
  font_fallback: "FangSong"
  size: 16pt
  align: left
  first_line_indent: 0
  bold: false

# --- 导语段（P2：按照/根据/为贯彻...开头，首句不加粗）---
introduction:
  font: "仿宋_GB2312"
  font_fallback: "FangSong"
  size: 16pt
  align: justify
  first_line_indent: 2em
  bold: false

# --- 过渡段（P2：针对/基于/综上...开头，首句不加粗）---
transition:
  font: "仿宋_GB2312"
  font_fallback: "FangSong"
  size: 16pt
  align: justify
  first_line_indent: 2em
  bold: false

# --- 会议日期段（P8：居中、仿宋_GB2312、18pt、不加粗）---
meeting_date:
  font: "仿宋_GB2312"
  font_fallback: "FangSong"
  size: 18pt
  align: center
  bold: false

# --- 表格格式 ---
table:
  header:
    font: "黑体"
    size: 12pt
    bold: true
    align: center
    border: "single"
    fill: "D9E2F3"       # 浅蓝灰底色
  body:
    font: "仿宋_GB2312"
    size: 12pt
    bold: false
    align: left           # 默认左对齐，智能对齐规则覆盖
  cell_margin:
    top: 0
    left: 80              # 单元格左右边距（twips）
    bottom: 0
    right: 80

# ============================================================
#  通用检查规则（共29条）
# ============================================================
check_rules:
  # --- 页面设置检查 (CHK-C001~C003, C011, C018) ---
  # P0-6 修复：页边距期望值与 page_setup.margins 配置（省筹委会规范 2.8/2.8/2.7/2.7cm）对齐
  - id: CHK-C001
    name: "上边距检查"
    severity: P0
    field: page_setup.margins.top
    expected: "2.8cm"
    message: "上边距应为2.8cm（红头文件正文区收窄）"

  - id: CHK-C002
    name: "左边距检查"
    severity: P0
    field: page_setup.margins.left
    expected: "2.7cm"
    message: "左边距应为2.7cm"

  - id: CHK-C003
    name: "右边距检查"
    severity: P0
    field: page_setup.margins.right
    expected: "2.7cm"
    message: "右边距应为2.7cm"

  - id: CHK-C011
    name: "下边距检查"
    severity: P0
    field: page_setup.margins.bottom
    expected: "2.8cm"
    message: "下边距应为2.8cm"

  - id: CHK-C018
    name: "纸张大小检查"
    severity: P0
    field: page_setup.paper_width_mm
    expected: 210
    message: "纸张应为A4（宽210mm）"

  # --- 公文大标题检查 (CHK-C007~C008, C021, C033) ---
  - id: CHK-C007
    name: "公文大标题字体检查"
    severity: P0
    field: title.font
    expected: "方正小标宋简体"
    message: "公文标题应使用方正小标宋简体（GB/T 9704标准）"

  - id: CHK-C008
    name: "公文大标题字号检查"
    severity: P0
    field: title.size
    expected: 22pt
    message: "公文标题应使用二号字(22pt)（GB/T 9704标准）"

  - id: CHK-C021
    name: "公文大标题居中检查"
    severity: P0
    field: title.align
    expected: "center"
    message: "公文标题应居中排列"

  - id: CHK-C033
    name: "公文大标题行距检查"
    severity: P1
    field: title.line_spacing
    expected: 33pt
    message: "公文标题行距应为33磅（与 doc_title 模板定义一致，P1-9 统一）"

  # --- 一级标题检查 (CHK-C009, C014, C022, C032) ---
  - id: CHK-C009
    name: "一级标题字体检查"
    severity: P0
    field: heading_1.font
    expected: "黑体"
    message: "一级标题应使用黑体（GB/T 9704标准）"

  - id: CHK-C014
    name: "一级标题字号检查"
    severity: P0
    field: heading_1.size
    expected: 16pt
    message: "一级标题应使用三号字(16pt)（GB/T 9704标准）"

  - id: CHK-C022
    name: "一级标题左空二字检查"
    severity: P1
    field: heading_1.first_line_indent
    expected: "2em"
    message: "一级标题应左空二字编排（GB/T 9704标准）"

  - id: CHK-C032
    name: "一级标题行距检查"
    severity: P1
    field: heading_1.line_spacing
    expected: 33pt
    message: "一级标题行距应为33磅（与标题样式配置一致，改动2统一）"

  # --- 二级标题检查 (CHK-C010, C015) ---
  - id: CHK-C010
    name: "二级标题字体检查"
    severity: P0
    field: heading_2.font
    expected: "楷体_GB2312"
    message: "二级标题应使用楷体_GB2312（GB/T 9704标准）"

  - id: CHK-C015
    name: "二级标题字号检查"
    severity: P0
    field: heading_2.size
    expected: 16pt
    message: "二级标题应使用三号字(16pt)（GB/T 9704标准）"

  - id: CHK-C035
    name: "二级标题行距检查"
    severity: P1
    field: heading_2.line_spacing
    expected: 33pt
    message: "二级标题行距应为33磅（与标题样式配置一致，改动2统一）"

  - id: CHK-C036
    name: "二级标题左空二字检查"
    severity: P1
    field: heading_2.first_line_indent
    expected: "2em"
    message: "二级标题应左空二字编排（GB/T 9704标准）"

  # --- 三级标题检查 (CHK-C019, C020) ---
  - id: CHK-C019
    name: "三级标题字体检查"
    severity: P0
    field: heading_3.font
    expected: "仿宋_GB2312"
    message: "三级标题应使用仿宋_GB2312（GB/T 9704标准）"

  - id: CHK-C020
    name: "三级标题字号检查"
    severity: P0
    field: heading_3.size
    expected: 16pt
    message: "三级标题应使用三号字(16pt)加粗（GB/T 9704标准）"

  - id: CHK-C037
    name: "三级标题行距检查"
    severity: P1
    field: heading_3.line_spacing
    expected: 33pt
    message: "三级标题行距应为33磅（与标题样式配置一致，改动2统一）"

  - id: CHK-C038
    name: "三级标题左空二字检查"
    severity: P1
    field: heading_3.first_line_indent
    expected: "2em"
    message: "三级标题应左空二字编排（GB/T 9704标准）"

  # --- 四级标题检查（改动3 新增）---
  - id: CHK-C047
    name: "四级标题字体检查"
    severity: P1
    field: heading_4.font
    expected: "仿宋_GB2312"
    message: "四级标题应使用仿宋_GB2312"

  - id: CHK-C048
    name: "四级标题字号检查"
    severity: P1
    field: heading_4.size
    expected: 16pt
    message: "四级标题应使用三号字(16pt)"

  - id: CHK-C049
    name: "四级标题行距检查"
    severity: P1
    field: heading_4.line_spacing
    expected: 33pt
    message: "四级标题行距应为33磅（与标题样式配置一致）"

  - id: CHK-C050
    name: "四级标题左空二字检查"
    severity: P1
    field: heading_4.first_line_indent
    expected: "2em"
    message: "四级标题应左空二字编排（GB/T 9704标准）"

  # --- 正文格式检查 (CHK-C004~C006, C012~C013) ---
  - id: CHK-C004
    name: "正文字体检查"
    severity: P0
    field: body.font
    expected: "仿宋_GB2312"
    message: "正文应使用仿宋_GB2312字体（GB/T 9704标准）"

  - id: CHK-C005
    name: "正文字号检查"
    severity: P0
    field: body.size
    expected: 16pt
    message: "正文应使用三号字(16pt)（GB/T 9704标准）"

  - id: CHK-C006
    name: "正文行距检查"
    severity: P1
    field: body.line_spacing
    expected: 33pt
    message: "正文行距应为固定值33磅（与标题行距统一）"

  - id: CHK-C012
    name: "正文首行缩进检查"
    severity: P1
    field: body.first_line_indent
    expected: "2em"
    message: "正文首行应缩进2个字符（GB/T 9704标准）"

  - id: CHK-C013
    name: "正文对齐方式检查"
    severity: P1
    field: body.align
    expected: "justify"
    message: "正文应使用两端对齐（GB/T 9704标准）"

  # --- 落款和日期检查 (CHK-C016~C017, C039~C040) ---
  - id: CHK-C016
    name: "署名段对齐检查"
    severity: P1
    field: signature.align
    expected: "center"
    message: "署名段应居中编排（P4：署名段居中、18pt、不加粗）"

  - id: CHK-C017
    name: "日期右空四字检查"
    severity: P1
    field: date.align
    expected: "right"
    message: "成文日期应右空四字编排（GB/T 9704标准）"

  - id: CHK-C039
    name: "落款字体检查"
    severity: P1
    field: signature.font
    expected: "仿宋_GB2312"
    message: "落款应使用三号仿宋_GB2312（GB/T 9704标准）"

  # P2-22: 新增签名区字号检查（此前只有字体/对齐检查，无字号规则）
  - id: CHK-C046
    name: "署名段字号检查"
    severity: P1
    field: signature.size
    expected: 18pt
    message: "署名段应使用小三(18pt)（P4：署名段居中、18pt、不加粗）"

  - id: CHK-C040
    name: "日期字体检查"
    severity: P1
    field: date.font
    expected: "仿宋_GB2312"
    message: "成文日期应使用三号仿宋_GB2312（GB/T 9704标准）"

  # --- 段落类型格式检查 (P5/P8: CHK-C041~C045) ---
  - id: CHK-C041
    name: "称呼段格式检查"
    severity: P2
    field: salutation.align
    expected: "left"
    message: "称呼段（如'尊敬的各位领导'）应左对齐、无首行缩进"

  - id: CHK-C042
    name: "导语段首句加粗检查"
    severity: P2
    field: introduction.bold
    expected: false
    message: "导语段（如'按照''根据'开头）首句不应加粗"

  - id: CHK-C043
    name: "过渡段首句加粗检查"
    severity: P2
    field: transition.bold
    expected: false
    message: "过渡段（如'针对''综上'开头）首句不应加粗"

  - id: CHK-C044
    name: "编号正文首句加粗检查"
    severity: P2
    field: numbered_body.bold
    expected: true
    message: "编号正文段（如'一是''二是'开头）首句应加粗"

  - id: CHK-C045
    name: "会议日期段格式检查"
    severity: P2
    field: meeting_date.align
    expected: "center"
    message: "会议日期段（如'于2026年8月3日'）应居中、仿宋_GB2312、18pt、不加粗"

  # --- 标题加粗检查 (CHK-C025) ---
  - id: CHK-C025
    name: "公文标题不加粗检查"
    severity: P1
    field: title.bold
    expected: false
    message: "公文标题使用方正小标宋简体，不应额外加粗（GB/T 9704标准）"

  # --- 正文加粗范围检查 (CHK-C030) ---
  - id: CHK-C030
    name: "正文加粗范围检查"
    severity: P2
    field: body.bold_range
    expected: true
    message: "整段加粗不符合公文规范，通常仅首句或点题词需要加粗"

  # --- 文本框内容检查 (CHK-TBX001, V2.14) ---
  # 公文红头/发文字号常承载于文本框（w:txbxContent）；文本框存在但内容为空
  # 说明红头区域有缺失。仅"检测到文本框"时触发，无文本框的文档不报。
  - id: CHK-TBX001
    name: "文本框内容检查"
    severity: P2
    field: header.textbox
    expected: "文本框内容非空"
    message: "检测到文本框但内容为空（红头/发文字号可能在文本框中缺失）"

  # --- 主送机关格式检查 (CHK-C026) ---
  - id: CHK-C026
    name: "主送机关格式检查"
    severity: P1
    field: recipient.font
    expected: "仿宋_GB2312"
    message: "主送机关应使用三号仿宋_GB2312顶格编排（GB/T 9704标准）"

  # --- 附件说明格式检查 (CHK-C027) ---
  - id: CHK-C027
    name: "附件说明格式检查"
    severity: P2
    field: attachment.first_line_indent
    expected: "2em"
    message: "附件说明应左空二字编排（GB/T 9704标准）"

  # --- 抄送机关格式检查 (CHK-C028) ---
  - id: CHK-C028
    name: "抄送机关格式检查"
    severity: P2
    field: cc.font
    expected: "仿宋_GB2312"
    message: "抄送机关应使用四号仿宋_GB2312，左空一字（GB/T 9704标准）"

  # --- 页码检查 (CHK-C023~C024) ---
  - id: CHK-C023
    name: "页码格式检查"
    severity: P1
    field: page_number.font
    expected: "宋体"
    message: "页码应使用4号(14pt)半角宋体阿拉伯数字（GB/T 9704标准）"

  - id: CHK-C024
    name: "页码位置检查"
    severity: P1
    field: page_number.alignment
    expected: "center"
    message: "页码应居中标注，或多页文档采用翻页模式（单页码居右、双页码居左），格式为- X -（半角短横线）（GB/T 9704标准）"

  - id: CHK-C029
    name: "页码字号检查"
    severity: P1
    field: page_number.size
    expected: "14pt"
    message: "页码应使用四号字(14pt)（GB/T 9704标准）"

  # --- 表格样式检查 (CHK-C051~C058，V2.3) ---
  # 对应 _common.yaml table 配置块（表头黑体12pt加粗居中+浅蓝灰底色、表体仿宋12pt、
  # 单元格左右边距80twips）。此前为死配置，无 CHK 规则也从不被检查。
  - id: CHK-C051
    name: "表头字体检查"
    severity: P2
    field: table.header.font
    expected: "黑体"
    message: "表格表头应使用黑体（table 配置规范）"

  - id: CHK-C052
    name: "表头字号检查"
    severity: P2
    field: table.header.size
    expected: "12pt"
    message: "表格表头应使用小四号字(12pt)（table 配置规范）"

  - id: CHK-C053
    name: "表头加粗检查"
    severity: P2
    field: table.header.bold
    expected: true
    message: "表格表头应加粗（table 配置规范）"

  - id: CHK-C054
    name: "表头对齐检查"
    severity: P2
    field: table.header.align
    expected: "center"
    message: "表格表头应居中排列（table 配置规范）"

  - id: CHK-C055
    name: "表头底色检查"
    severity: P2
    field: table.header.fill
    expected: "D9E2F3"
    message: "表格表头应使用浅蓝灰底色 D9E2F3（table 配置规范）"

  - id: CHK-C056
    name: "表体字体检查"
    severity: P2
    field: table.body.font
    expected: "仿宋_GB2312"
    message: "表格表体应使用仿宋_GB2312（table 配置规范）"

  - id: CHK-C057
    name: "表体字号检查"
    severity: P2
    field: table.body.size
    expected: "12pt"
    message: "表格表体应使用小四号字(12pt)（table 配置规范）"

  - id: CHK-C058
    name: "单元格左边距检查"
    severity: P2
    field: table.cell_margin.left
    expected: 80
    message: "表格单元格左右边距应为80twips（table 配置规范）"

# ============================================================
#  通用修复规则（共23条）
# ============================================================
fix_rules:
  # --- Markdown 格式识别与转换（优先执行，在格式修复之前） ---
  - id: FIX-C030
    action: convert_markdown
    target: all

  - id: FIX-C004
    action: remove_extra_spaces
    target: all

  # --- 正文修复 ---
  - id: FIX-C001
    ref_check: CHK-C004
    action: set_font
    target: body
    value: "仿宋_GB2312"

  - id: FIX-C002
    ref_check: CHK-C005
    action: set_size
    target: body
    value: 16pt

  - id: FIX-C009
    ref_check: CHK-C012
    action: set_first_line_indent
    target: body
    value: 2em

  - id: FIX-C010
    ref_check: CHK-C013
    action: set_alignment
    target: body
    value: "justify"

  - id: FIX-C015
    ref_check: CHK-C006
    action: set_line_spacing
    target: body
    value: 33pt

  # --- 页面设置修复 ---
  - id: FIX-C003
    action: set_page_margins
    target: page_setup
    value:
      top: 2.8cm
      bottom: 2.8cm
      left: 2.7cm
      right: 2.7cm

  # V2.3 修复：纸张归一为 A4（CHK-C018 此前无 FIX 规则，Letter/其他纸张 optimize 修不动）
  - id: FIX-C054
    ref_check: CHK-C018
    action: set_paper_size
    target: page_setup
    value:
      width_mm: 210
      height_mm: 297

  # V2.3：表格样式修复（set_table_style，对齐 _common.yaml table 配置块）
  - id: FIX-C055
    ref_check: CHK-C051
    action: set_table_style
    target: all
    value:
      header:
        font: "黑体"
        size: 12pt
        bold: true
        align: center
        fill: "D9E2F3"
      body:
        font: "仿宋_GB2312"
        size: 12pt
        align: left
      cell_margin:
        top: 0
        left: 80
        bottom: 0
        right: 80

  # --- 大标题修复 ---
  - id: FIX-C016
    ref_check: CHK-C007
    action: set_font
    target: doc_title
    value: "方正小标宋简体"

  - id: FIX-C017
    ref_check: CHK-C008
    action: set_size
    target: doc_title
    value: 22pt

  - id: FIX-C018
    ref_check: CHK-C021
    action: set_alignment
    target: doc_title
    value: "center"

  - id: FIX-C037
    ref_check: CHK-C033
    action: set_line_spacing
    target: doc_title
    value: 33pt

  # --- 一级标题修复 ---
  - id: FIX-C006
    ref_check: CHK-C009
    action: set_font
    target: heading_1
    value: "黑体"

  - id: FIX-C011
    ref_check: CHK-C014
    action: set_size
    target: heading_1
    value: 16pt

  - id: FIX-C021
    ref_check: CHK-C022
    action: set_first_line_indent
    target: heading_1
    value: "2em"

  - id: FIX-C032
    ref_check: CHK-C032
    action: set_line_spacing
    target: heading_1
    value: 33pt

  # --- 二级标题修复 ---
  - id: FIX-C007
    ref_check: CHK-C010
    action: set_font
    target: heading_2
    value: "楷体_GB2312"

  - id: FIX-C012
    ref_check: CHK-C015
    action: set_size
    target: heading_2
    value: 16pt

  - id: FIX-C033
    ref_check: CHK-C035
    action: set_line_spacing
    target: heading_2
    value: 33pt

  - id: FIX-C034
    ref_check: CHK-C036
    action: set_first_line_indent
    target: heading_2
    value: "2em"

  # --- 三级标题修复 ---
  - id: FIX-C008
    ref_check: CHK-C019
    action: set_font
    target: heading_3
    value: "仿宋_GB2312"

  - id: FIX-C022
    ref_check: CHK-C020
    action: set_size
    target: heading_3
    value: 16pt

  - id: FIX-C023
    action: set_bold
    target: heading_3
    value: true

  - id: FIX-C035
    ref_check: CHK-C037
    action: set_line_spacing
    target: heading_3
    value: 33pt

  - id: FIX-C036
    ref_check: CHK-C038
    action: set_first_line_indent
    target: heading_3
    value: "2em"

  # --- 四级标题修复（改动3 新增）---
  - id: FIX-C047
    ref_check: CHK-C047
    action: set_font
    target: heading_4
    value: "仿宋_GB2312"

  - id: FIX-C048
    ref_check: CHK-C048
    action: set_size
    target: heading_4
    value: 16pt

  - id: FIX-C049
    ref_check: CHK-C049
    action: set_line_spacing
    target: heading_4
    value: 33pt

  - id: FIX-C050
    ref_check: CHK-C050
    action: set_first_line_indent
    target: heading_4
    value: "2em"

  # --- 文字颜色统一（FIX-C051：正文区文字统一为黑色，跳过 annotation 标注段） ---
  - id: FIX-C051
    action: set_color
    target: all
    value: "000000"

  # --- 正文加粗范围修复（在 set_bold 之后执行，覆盖整段加粗） ---
  - id: FIX-C031
    action: fix_bold_range
    target: body
    value: true

  # --- 落款和日期修复 ---
  - id: FIX-C013
    ref_check: CHK-C016
    action: fix_paragraph_type
    target: signature
    value:
      alignment: center
      first_line_indent: 0

  - id: FIX-C038
    ref_check: CHK-C039
    action: set_font
    target: signature
    value: "仿宋_GB2312"

  - id: FIX-C039
    ref_check: CHK-C040
    action: set_font
    target: date
    value: "仿宋_GB2312"

  # V2.3 修复：日期右对齐（CHK-C017）此前无 FIX 规则，遇到日期段
  # alignment 非 right（或带异常大首行缩进，如 245pt）时 optimize 修不动。
  - id: FIX-C052
    ref_check: CHK-C017
    action: fix_paragraph_type
    target: date
    value:
      alignment: right
      first_line_indent: 0

  # V2.3 修复：附件说明左空二字（CHK-C027）此前无 FIX 规则且 target=attachment
  # 选择器缺失，附件说明缩进异常时 optimize 修不动。
  - id: FIX-C053
    ref_check: CHK-C027
    action: set_first_line_indent
    target: attachment
    value: "2em"

  - id: FIX-C024
    ref_check: CHK-C025
    action: set_bold
    target: doc_title
    value: false

  # --- 文本清理 ---
  - id: FIX-C005
    action: remove_extra_blank_lines
    target: all
    value:
      mode: delete_single
      protected_roles: ['signature', 'date', 'cc', 'attachment']

  - id: FIX-C019
    action: normalize_punctuation
    target: all

  - id: FIX-C020
    action: normalize_headings
    target: all

  # --- 页码修复 ---
  - id: FIX-C025
    ref_check: CHK-C023
    action: set_page_number
    target: page_footer
    value:
      font: "宋体"
      size: 14pt
      alignment: "right"
      format: "- {PAGE} -"   # 改动4：半角短横线（PDF 规范），原全角破折号；翻页模式（单右双左）

  # --- 段落类型格式修复 (P4/P5/P8: FIX-C013b/FIX-C041~C044) ---
  - id: FIX-C013b
    ref_check: CHK-C046
    action: set_size
    target: signature
    value: 18pt

  - id: FIX-C041
    ref_check: CHK-C041
    action: fix_paragraph_type
    target: salutation
    value:
      alignment: left
      first_line_indent: 0
      bold: false

  - id: FIX-C042
    ref_check: CHK-C042
    action: fix_paragraph_type
    target: introduction
    value:
      alignment: justify
      first_line_indent: 2em
      bold: false

  - id: FIX-C043
    ref_check: CHK-C043
    action: fix_paragraph_type
    target: transition
    value:
      alignment: justify
      first_line_indent: 2em
      bold: false

  - id: FIX-C044
    ref_check: CHK-C045
    action: fix_paragraph_type
    target: meeting_date
    value:
      alignment: center
      font: "仿宋_GB2312"
      size: 18pt
      bold: false
