/* 论文式静态页面：白底、衬线、双栏、可打印 */
:root {
  color-scheme: light only;
  --ink: #111111;
  --ink-soft: #3d3d3d;
  --muted: #555555;
  --rule: #1a1a1a;
  --hair: #cfcfcf;
  --hair-soft: #e6e6e6;
  --accent: #2f4a5a;
  --serif-cn: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC",
    "Songti TC", "PMingLiU", serif;
  --serif-en: "Times New Roman", "Nimbus Roman", "Liberation Serif", Times, serif;
  --body-size: 10pt;
  --col-gap: 6mm;
}

* {
  box-sizing: border-box;
}

html {
  background: #ffffff;
}

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--serif-en), var(--serif-cn);
  font-size: var(--body-size);
  line-height: 1.22;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

.page {
  width: 794px;
  margin: 0 auto;
  padding: 64px 68px 88px;
  background: #ffffff;
}

/* ---------- 题头 ---------- */
.masthead {
  margin-bottom: 12pt;
}

.paper-kind {
  margin: 0 0 10pt;
  font-family: var(--serif-cn);
  font-size: 8pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.9em;
  border-bottom: 0.5pt solid var(--hair);
  padding-bottom: 5pt;
}

.paper-kind span + span::before {
  content: "·";
  margin-right: 0.9em;
  color: var(--hair);
}

h1 {
  margin: 14pt 0 0;
  font-family: var(--serif-cn);
  font-size: 24pt;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.005em;
  text-align: center;
}

.affil {
  margin: 10pt 0 0;
  text-align: center;
  font-family: var(--serif-cn);
  font-size: 9pt;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- 摘要 ---------- */
.abstract {
  margin: 18pt 0 0;
  padding: 0 18pt;
  font-family: var(--serif-cn);
  font-size: 9pt;
  line-height: 1.45;
  text-align: justify;
  color: var(--ink-soft);
}

.abstract p {
  margin: 0;
}

.abstract b,
.keywords b {
  color: var(--ink);
  font-weight: 700;
}

.keywords {
  margin: 8pt 0 0;
  padding: 0 18pt;
  font-family: var(--serif-cn);
  font-size: 9pt;
  line-height: 1.45;
  color: var(--ink-soft);
}

.rule-double {
  margin: 16pt 0 0;
  border: 0;
  border-top: 1pt solid var(--rule);
  border-bottom: 0.4pt solid var(--rule);
  height: 2.4pt;
  background: transparent;
}

/* ---------- 正文栏 ---------- */
.columns {
  column-count: 2;
  column-gap: var(--col-gap);
  column-rule: 0;
  font-family: var(--serif-cn);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.columns > section:first-child {
  margin-top: 0;
}

section {
  margin: 0;
  break-inside: auto;
}

h2 {
  margin: 11pt 0 4pt;
  font-family: var(--serif-cn);
  font-size: 11pt;
  font-weight: 700;
  line-height: 1.3;
  break-after: avoid;
  page-break-after: avoid;
}

h3 {
  margin: 8pt 0 3pt;
  font-family: var(--serif-cn);
  font-size: 10pt;
  font-weight: 700;
  line-height: 1.3;
  break-after: avoid;
}

p {
  margin: 0 0 3.2pt;
  text-indent: 1.6em;
}

p.noindent,
.abstract p,
.keywords,
.caption,
.note,
.meta-line,
ol li::marker {
  text-indent: 0;
}

h2 + p,
h3 + p,
.caption + p,
figure + p,
table + p,
.note + p {
  text-indent: 0;
}

em {
  font-style: italic;
}

.nowrap {
  white-space: nowrap;
}

/* 方法步骤 */
ol.steps {
  margin: 2pt 0 4pt;
  padding-left: 1.5em;
  font-size: 9.6pt;
  line-height: 1.42;
  text-align: left;
}

ol.steps li {
  margin: 0 0 2pt;
}

ul.plain {
  margin: 2pt 0 4pt;
  padding-left: 1.1em;
  list-style: none;
  font-size: 9.6pt;
  line-height: 1.42;
}

ul.plain li {
  margin: 0 0 2.5pt;
  position: relative;
  padding-left: 0.8em;
}

ul.plain li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.formula {
  margin: 4pt 0 5pt;
  text-align: center;
  font-family: var(--serif-en), var(--serif-cn);
  font-size: 10pt;
  font-style: italic;
}

.formula .op {
  font-style: normal;
  padding: 0 0.25em;
}

/* ---------- 图 ---------- */
figure {
  margin: 14pt 0 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.figure-frame {
  border-top: 0.5pt solid var(--hair);
  border-bottom: 0.5pt solid var(--hair);
  padding: 10pt 0 8pt;
}

figure svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

figcaption,
.caption {
  margin: 6pt 0 0;
  font-family: var(--serif-cn);
  font-size: 8.5pt;
  line-height: 1.45;
  text-align: justify;
  color: var(--ink-soft);
  text-indent: 0;
}

figcaption b,
.caption b {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- 表 ---------- */
.table-block {
  margin: 10pt 0 6pt;
  break-inside: avoid;
  page-break-inside: avoid;
}

.table-title {
  margin: 0 0 3pt;
  font-family: var(--serif-cn);
  font-size: 8.5pt;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  color: var(--ink);
}

.table-title span {
  font-weight: 400;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--serif-en), var(--serif-cn);
  font-size: 8.5pt;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

caption {
  caption-side: top;
  text-align: left;
  font-family: var(--serif-cn);
  font-size: 8pt;
  color: var(--muted);
  padding-bottom: 2pt;
}

thead th {
  border-top: 1pt solid var(--rule);
  border-bottom: 0.5pt solid var(--rule);
  padding: 3pt 4pt;
  font-weight: 700;
  text-align: right;
  vertical-align: bottom;
  white-space: nowrap;
}

thead th:first-child {
  text-align: left;
}

tbody td {
  padding: 2.4pt 4pt;
  text-align: right;
  border-bottom: 0.3pt solid var(--hair-soft);
}

tbody td:first-child {
  text-align: left;
}

tbody tr.total td {
  border-top: 0.5pt solid var(--rule);
  border-bottom: 1pt solid var(--rule);
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: 1pt solid var(--rule);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.note {
  margin: 4pt 0 0;
  font-family: var(--serif-cn);
  font-size: 8pt;
  line-height: 1.5;
  color: var(--muted);
  text-align: left;
}

/* 交叉引用 */
a.xref {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 0.4pt dotted var(--muted);
  padding-bottom: 0.5pt;
}

a.xref:focus-visible,
a.xref:hover {
  border-bottom-style: solid;
  border-bottom-color: var(--accent);
}

figure:target,
.table-block:target {
  outline: 0.6pt dashed var(--accent);
  outline-offset: 6pt;
}

/* 页脚说明 */
.colophon {
  margin-top: 18pt;
  padding-top: 6pt;
  border-top: 0.5pt solid var(--hair);
  font-family: var(--serif-cn);
  font-size: 8pt;
  line-height: 1.55;
  color: var(--muted);
}

.colophon p {
  text-indent: 0;
  margin: 0 0 2pt;
}

/* ---------- 打印 ---------- */
@page {
  size: A4;
  margin: 18mm;
}

@media print {
  html,
  body {
    background: #ffffff;
  }

  .page {
    zoom: 1 !important;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  h1 {
    font-size: 23pt;
  }

  .columns {
    column-gap: 7mm;
  }

  a.xref {
    border-bottom: 0;
  }

  figure,
  .table-block,
  h2,
  h3 {
    break-inside: avoid;
  }
}
