
/* ===== 打印样式 ===== */
@media print {
  @page {
    /* 为页面预留出放置自定义内容的边距空间 */
    margin: 20mm 20mm 20mm 25mm;
    /* margin: 0; */

    /* 自定义页眉：左上角 */
    @top-left {
        content: url('https://lh3.googleusercontent.com/a/ACg8ocK36SGosjEhDNrztjR2ky2-ZVXj2nnCO7GdyrRdxR93MujjhQU=s25-c-no');;
        font-size: 11pt;
        color: #333;
        border-bottom: 1px solid #000;  
        padding-bottom: 1px;
        vertical-align: bottom;
    }

    /* 自定义页眉：右上角，并显示当前页码 */
    @top-right {
        content: "内部资料*禁止外传";
        font-size: 11pt;
        color: #a00;
        border-bottom: 1px solid #000;  
        padding-bottom: 1px;
        vertical-align: bottom;
    }

    @top-center {
      content: "公司";
      font-size: 11pt;
      color: #333;
      border-bottom: 1px solid #000;  
      padding-bottom: 1px;
      vertical-align: bottom;
    }

    @bottom-left {
      content: "Bangguo Chen(mail@cbguo.com)";
      font-size: 11pt;
      border-top: 1px solid #999;   
      vertical-align: top;
    }

    @bottom-right {
      content: "2026-05-01";
      font-size: 11pt;
      border-top: 1px solid #999;   
      vertical-align: top;
    }

    /* 自定义页脚：左下角，显示总页数 */
    @bottom-center {
        content: "第 " counter(page) " 页" " / " "共 " counter(pages) " 页";
        font-size: 11pt;
        border-top: 1px solid #999;   
        vertical-align: top;
    }


}

  /* body {
    width: 100%;
    max-width: 100%;
    overflow-x: visible !important;
    margin: 0 auto;
  } */

  /* ====== 内容安全区（关键） ====== */
  /* .markdown-body {
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 15px;
    margin-right: 15px;
    padding: 0;
  } */

  /* 强制重置内容区域的内外边距，覆盖 Docsify 默认样式 */
  body, .markdown-section, .content, main {
      margin: 0 !important;
      padding: 0 !important;
      max-width: none !important;
  }

  /* 如果有侧边栏等干扰元素，建议在打印时隐藏 */
  .sidebar, .app-nav, .search {
      display: none !important;
  }

  /* ====== 标题优化 ====== */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  h1 { font-size: 20pt; }
  h2 { font-size: 18pt; }
  h3 { font-size: 16pt; }

  /* ====== 段落 ====== */
  p {
    orphans: 3;
    widows: 3;
  }

  /* ====== 列表 ====== */
  ul, ol {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  li {
    margin-bottom: 4px;
  }

  /* ====== 代码块 ====== */
  pre, code {
    font-family: Consolas, monospace;
  }

  pre {
    padding: 10px;
    background: #f6f6f6;
    border: 1px solid #ddd;
    border-radius: 4px;

    white-space: pre-wrap;
    word-break: break-word;

    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ====== 表格 ====== */
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;

    page-break-inside: auto;
  }

  thead {
    display: table-header-group; /* ✅ 每页重复表头 */
  }

  tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  th, td {
    border: 1px solid #ccc;
    padding: 6px 8px;
    font-size: 11pt;
  }

  /* ====== 图片 ====== */
  img {
    max-width: 100%;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ====== 引用 ====== */
  blockquote {
    border-left: 4px solid #ccc;
    padding-left: 10px;
    color: #666;

    page-break-inside: avoid;
  }

  /* ====== 分页控制 ====== */

  .page-break {
    page-break-before: always;
    break-before: page;
  }

  .no-break {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ====== 链接处理（打印友好） ====== */
  a {
    color: #000;
    text-decoration: none;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
  }
}





