/* paper.css — 论文中文译稿排版(离线渲染,无外部字体/CDN) */
@page { margin: 0; }

* { box-sizing: border-box; }

html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

body {
  font-family: "Noto Sans CJK SC", "Noto Serif CJK SC", "WenQuanYi Zen Hei", sans-serif;
  font-size: 10.5pt;
  line-height: 1.75;
  color: #1a1a1a;
  margin: 0;
  padding: 16mm 15mm;
  max-width: 210mm;
}

h1 {
  font-size: 17pt;
  line-height: 1.45;
  margin: 0 0 4pt;
}
h1 .en {
  display: block;
  font-size: 11.5pt;
  color: #555;
  font-weight: normal;
  font-style: italic;
  margin-top: 4pt;
}
h2 { font-size: 13.5pt; margin: 18pt 0 6pt; border-bottom: 1.5pt solid #333; padding-bottom: 3pt; }
h3 { font-size: 11.5pt; margin: 12pt 0 4pt; }
h4 { font-size: 10.5pt; margin: 10pt 0 3pt; }

p { margin: 5pt 0; text-align: justify; }

/* 说明横幅:署名 + 术语对照表 */
.banner {
  border: 1pt solid #888;
  background: #f5f5f0;
  padding: 7pt 10pt;
  margin: 10pt 0 12pt;
  font-size: 8.8pt;
  line-height: 1.6;
}
.banner .term-table { margin-top: 5pt; }
.banner table { border-collapse: collapse; width: 100%; font-size: 8.6pt; }
.banner th, .banner td { border: 0.5pt solid #bbb; padding: 2pt 5pt; text-align: left; }
.banner th { background: #eaeae2; }

/* 摘要 */
.abstract {
  background: #f7f7f7;
  border-left: 3pt solid #666;
  padding: 6pt 10pt;
  margin: 8pt 0;
}

/* 图 */
figure { margin: 10pt auto; text-align: center; page-break-inside: avoid; }
figure img { max-width: 100%; height: auto; }
figcaption {
  font-size: 8.8pt;
  color: #333;
  text-align: justify;
  margin-top: 4pt;
  line-height: 1.5;
}
figcaption .lab { font-weight: bold; }

/* 公式 */
.eq {
  margin: 6pt 0;
  padding: 2pt 6pt;
  font-family: "Noto Sans", "DejaVu Sans", serif;
  font-size: 10.5pt;
  overflow: hidden;
}
.eq .tag { float: right; color: #444; }

/* 表格 */
table { border-collapse: collapse; margin: 8pt auto; page-break-inside: avoid; }
caption { caption-side: top; font-size: 8.8pt; margin-bottom: 4pt; text-align: center; }
caption .lab { font-weight: bold; }
th, td { border: 0.5pt solid #999; padding: 3pt 8pt; font-size: 9.2pt; }
th { background: #eee; }
td.num, .num { font-family: "DejaVu Sans Mono", monospace; text-align: right; }
td.best { color: #0a7a2f; font-weight: bold; }
td.bad { color: #b02020; font-weight: bold; }

/* 译注 */
.tnote {
  background: #fff8e6;
  border-left: 3pt solid #d9a300;
  padding: 4pt 9pt;
  margin: 6pt 0;
  font-size: 9pt;
  line-height: 1.6;
}
.tnote::before { content: "译注:"; font-weight: bold; color: #9a7500; }

/* 伪代码/算法块 */
.algo {
  border: 0.75pt solid #888;
  background: #fafafa;
  font-family: "DejaVu Sans Mono", monospace;
  font-size: 8.6pt;
  padding: 7pt 10pt;
  margin: 8pt 0;
  line-height: 1.55;
  white-space: pre-wrap;
  page-break-inside: avoid;
}

/* 译者解读章 */
div.interp { page-break-before: always; }
div.interp > h2 {
  color: #b02020;
  border-bottom: 1.5pt solid #b02020;
}
.crack {
  border: 1pt solid #b02020;
  background: #fdf1f1;
  padding: 5pt 9pt;
  margin: 7pt 0;
  font-size: 9.3pt;
}
.crack::before { content: "裂缝:"; font-weight: bold; color: #b02020; }
.key {
  border: 1pt solid #0a7a2f;
  background: #f0faf2;
  padding: 5pt 9pt;
  margin: 7pt 0;
  font-size: 9.3pt;
}
.key::before { content: "关键结论:"; font-weight: bold; color: #0a7a2f; }

/* 参考文献 */
.refs { font-size: 8.8pt; line-height: 1.55; }
.refs p { margin: 3pt 0; text-indent: -14pt; padding-left: 14pt; }

code { font-family: "DejaVu Sans Mono", monospace; font-size: 9pt; }
a { color: #0645ad; text-decoration: none; }
