/* generated from templates/*.css — scoped per-template for landing showcase */

/* ===== editorial ===== */
/* ============================================================
   模版 4 · 杂志编辑  Magazine Editorial
   标题 Playfair Display · 正文 Spectral · 中 Noto Serif SC
   模数比例 1.333 (Perfect Fourth) · 基准 20px · 行高 1.7
   特征:大字号高对比标题、首字下沉、强烈层级落差
   ============================================================ */
/*  */

.tpl-editorial {
  --md-base: 20px;
  --md-ratio: 1.333;
  --md-lh: 1.7;
  --md-measure: 66ch;
  --md-h1: 63.2px;
  --md-h2: 35.6px;
  --md-h3: 26.7px;
  --md-h4: 20px;
  --md-h5: 16px;
  --md-h6: 15px;

  --md-display: "Playfair Display", "Noto Serif SC", Georgia, serif;
  --md-body: "Spectral", "Noto Serif SC", Georgia, serif;
  --md-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --bg: #fffdf8;
  --fg: #1a1614;
  --muted: #7a6f64;
  --faint: #f5f0e6;
  --accent: #b91c1c;
  --accent-soft: #f7e8e6;
  --rule: #e2d9c8;
  --code-bg: #f3eee2;
  --code-fg: #4a4036;

  font-family: var(--md-body);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "onum" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4rem 2rem 7rem;
}

.tpl-editorial[data-theme="dark"] {
  --bg: #17120f;
  --fg: #ece3d6;
  --muted: #a1968a;
  --faint: #221b16;
  --accent: #f08a7c;
  --accent-soft: #2c1d1a;
  --rule: #342a22;
  --code-bg: #221b16;
  --code-fg: #cdbfae;
}

.tpl-editorial > * { margin: 0 0 1.1em; }
.tpl-editorial > *:first-child { margin-top: 0; }

.tpl-editorial h1, .tpl-editorial h2, .tpl-editorial h3, .tpl-editorial h4 {
  font-family: var(--md-display);
  color: var(--fg);
  text-wrap: balance;
}
.tpl-editorial h1 {
  font-size: var(--md-h1); font-weight: 800; line-height: 1.02;
  letter-spacing: -0.015em; margin: 0 0 0.4em;
}
.tpl-editorial h2 {
  font-size: var(--md-h2); font-weight: 700; line-height: 1.12;
  margin: 2em 0 0.5em;
}
.tpl-editorial h3 { font-size: var(--md-h3); font-weight: 700; line-height: 1.2; margin: 1.7em 0 0.4em; }
.tpl-editorial h4 { font-size: var(--md-h4); font-weight: 700; font-style: italic; margin: 1.5em 0 0.3em; }
.tpl-editorial h5 { font-family: var(--md-body); font-size: var(--md-h5); font-weight: 600; margin: 1.4em 0 0.3em; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.tpl-editorial h6 { font-family: var(--md-body); font-size: var(--md-h6); font-weight: 600; margin: 1.4em 0 0.3em; color: var(--muted); letter-spacing: 0.06em; }

.tpl-editorial p { margin: 0 0 1.1em; }
.tpl-editorial .lead {
  font-family: var(--md-display); font-size: 1.4em; line-height: 1.4;
  font-weight: 500; font-style: italic; color: var(--fg); margin-bottom: 1em;
}
/* 首字下沉 */
.tpl-editorial .lead + p::first-letter {
  font-family: var(--md-display); font-weight: 800;
  font-size: 3.4em; line-height: 0.78; float: left;
  padding: 0.06em 0.12em 0 0; color: var(--accent);
}

.tpl-editorial strong { font-weight: 600; }
.tpl-editorial em { font-style: italic; }
.tpl-editorial s, .tpl-editorial del { color: var(--muted); }
.tpl-editorial a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.tpl-editorial a:hover { background: var(--accent-soft); border-bottom-color: var(--accent); }
.tpl-editorial code { font-family: var(--md-mono); font-size: 0.82em; background: var(--code-bg); color: var(--code-fg); padding: 0.12em 0.4em; border-radius: 3px; }

.tpl-editorial blockquote {
  margin: 1.8em 0; padding: 0; border: none;
  font-family: var(--md-display); font-style: italic;
  font-size: 1.5em; line-height: 1.35; color: var(--fg);
  text-align: center;
}
.tpl-editorial blockquote::before { content: "“"; display: block; font-size: 2.2em; line-height: 0.5; color: var(--accent); margin-bottom: 0.1em; }
.tpl-editorial blockquote p { margin: 0 0 0.3em; }
.tpl-editorial blockquote p:last-child { font-family: var(--md-body); font-style: normal; font-size: 0.5em; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.tpl-editorial ul, .tpl-editorial ol { padding-left: 1.5em; margin: 0 0 1.1em; }
.tpl-editorial li { margin: 0.35em 0; }
.tpl-editorial li::marker { color: var(--accent); }
.tpl-editorial ul ul, .tpl-editorial ol ol, .tpl-editorial ul ol, .tpl-editorial ol ul { margin: 0.35em 0; }

.tpl-editorial .contains-task-list { list-style: none; padding-left: 0; }
.tpl-editorial .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-editorial .task-list-item input {
  appearance: none; -webkit-appearance: none; width: 1.05em; height: 1.05em; margin: 0; flex: none;
  border: 1.5px solid var(--muted); border-radius: 50%; position: relative; top: 0.15em; background: var(--bg);
}
.tpl-editorial .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-editorial .task-list-item input:checked::after { content: ""; position: absolute; left: 0.3em; top: 0.1em; width: 0.26em; height: 0.5em; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.tpl-editorial li:has(input:checked) { color: var(--muted); }

.tpl-editorial pre { font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg); padding: 1.1em 1.3em; border-radius: 4px; border: 1px solid var(--rule); overflow-x: auto; line-height: 1.6; font-size: 0.72em; }
.tpl-editorial pre code { background: none; padding: 0; font-size: 1em; color: inherit; }

.tpl-editorial .tok-com  { color: #a89878; font-style: italic; }
.tpl-editorial .tok-kw   { color: #b91c1c; font-weight: 600; }
.tpl-editorial .tok-fn   { color: #1d4ed8; }
.tpl-editorial .tok-str  { color: #15803d; }
.tpl-editorial .tok-num  { color: #a16207; }
.tpl-editorial .tok-type { color: #7c2d92; }
.tpl-editorial .tok-op, .tpl-editorial .tok-punc { color: var(--muted); }
.tpl-editorial .tok-var  { color: var(--code-fg); }
.tpl-editorial[data-theme="dark"] .tok-com  { color: #8c7c5e; }
.tpl-editorial[data-theme="dark"] .tok-kw   { color: #f08a7c; }
.tpl-editorial[data-theme="dark"] .tok-fn   { color: #7fa6ee; }
.tpl-editorial[data-theme="dark"] .tok-str  { color: #93d09a; }
.tpl-editorial[data-theme="dark"] .tok-num  { color: #e3b35e; }
.tpl-editorial[data-theme="dark"] .tok-type { color: #cd9fd8; }

.tpl-editorial table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 0.86em; }
.tpl-editorial thead th { text-align: left; font-family: var(--md-body); font-weight: 600; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.5em 0.8em; border-bottom: 2px solid var(--accent); color: var(--muted); }
.tpl-editorial tbody td { padding: 0.55em 0.8em; border-bottom: 1px solid var(--rule); }
.tpl-editorial tbody tr:last-child td { border-bottom: none; }

.tpl-editorial .callout { margin: 1.6em 0; padding: 1.1em 1.3em; border-radius: 4px; background: var(--faint); border-top: 2px solid var(--rule); }
.tpl-editorial .callout p { margin: 0 0 0.5em; }
.tpl-editorial .callout p:last-child { margin: 0; }
.tpl-editorial .callout-title { font-family: var(--md-body); font-weight: 600; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.1em; }
.tpl-editorial .callout-note    { border-top-color: #2563eb; }
.tpl-editorial .callout-note .callout-title { color: #2563eb; }
.tpl-editorial .callout-tip     { border-top-color: #15803d; }
.tpl-editorial .callout-tip .callout-title { color: #15803d; }
.tpl-editorial .callout-warning { border-top-color: #c2410c; }
.tpl-editorial .callout-warning .callout-title { color: #c2410c; }

.tpl-editorial hr { border: none; background: none; height: auto; margin: 2.6em 0; text-align: center; overflow: visible; line-height: 1; }
.tpl-editorial hr::before { content: "§"; display: block; line-height: 1; font-family: var(--md-display); font-style: italic; font-size: 1.3em; color: var(--accent); }

.tpl-editorial figure { margin: 2.2em 0; }
.tpl-editorial img { max-width: 100%; }
.tpl-editorial .img-placeholder { display: flex; align-items: center; justify-content: center; height: 240px; background: var(--faint); color: var(--muted); }
.tpl-editorial figcaption { font-family: var(--md-body); font-size: 0.8em; color: var(--muted); margin-top: 0.7em; line-height: 1.5; border-left: 2px solid var(--accent); padding-left: 0.8em; text-wrap: pretty; }

.tpl-editorial math { font-size: 1.02em; }
.tpl-editorial .math-block { margin: 2em 0; text-align: center; overflow-x: auto; font-size: 1.2em; }

.tpl-editorial .footnote-ref a { font-family: var(--md-body); font-size: 0.7em; vertical-align: super; border: none; font-weight: 600; color: var(--accent); }
.tpl-editorial .footnotes { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 0.82em; color: var(--muted); }
.tpl-editorial .footnotes ol { padding-left: 1.4em; }
.tpl-editorial .footnotes li { margin: 0.4em 0; }
.tpl-editorial .footnote-backref { border: none; }


/* ===== golden-canon ===== */
/* ============================================================
   模版 13 · 金卷  Golden Canon
   标题 Cormorant Garamond · 正文 EB Garamond · 中 Noto Serif SC
   —— 古典书页 · 黄金分割版心 ——
   · 版心四边留白 内:上:外:下 = 2:3:4:6(经典书籍黄金比例,文本块偏左上)
   · 字号阶梯 √φ ≈ 1.272 · 行高 1.618(φ)· 两端对齐
   基准 20px · 暖羊皮纸 · 朱批红首字
   ============================================================ */
/*  */

.tpl-golden-canon {
  --phi: 1.618;
  --md-base: 20px;
  --md-ratio: 1.272;
  --md-lh: 1.618;
  --md-measure: 60ch;
  --md-h1: 49px;     /* base × φ²(略收) */
  --md-h2: 32.4px;   /* base × φ  */
  --md-h3: 25.4px;   /* base × √φ */
  --md-h4: 20px;     /* base      */
  --md-h5: 15.7px;   /* base ÷ √φ */
  --md-h6: 14px;

  --md-display: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --md-body: "EB Garamond", "Noto Serif SC", Georgia, serif;
  --md-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --bg: #f7f2e8;
  --fg: #2a2519;
  --muted: #786e57;
  --faint: #ede5d3;
  --accent: #9c3b2e;          /* 朱批红 */
  --accent-soft: #f0e2d0;
  --rule: #ddd2bc;
  --code-bg: #ece3d0;
  --code-fg: #564c38;

  font-family: var(--md-body);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "onum" 1, "liga" 1, "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  hyphens: auto;
  max-width: var(--md-measure);
  margin: 0 auto;
  /* 黄金版心:内(左):上:外(右):下 = 2:3:4:6 */
  padding: 3.6rem 4.8rem 7.2rem 2.4rem;
}

.tpl-golden-canon[data-theme="dark"] {
  --bg: #1a1611;
  --fg: #e7ddc9;
  --muted: #a1957a;
  --faint: #241e15;
  --accent: #d2785f;
  --accent-soft: #2c2117;
  --rule: #38301f;
  --code-bg: #241e15;
  --code-fg: #cdc0a6;
}

.tpl-golden-canon > * { margin: 0 0 1em; }
.tpl-golden-canon > *:first-child { margin-top: 0; }

.tpl-golden-canon h1, .tpl-golden-canon h2, .tpl-golden-canon h3, .tpl-golden-canon h4 {
  font-family: var(--md-display); color: var(--fg); text-wrap: balance; line-height: 1.12;
}
.tpl-golden-canon h1 {
  font-size: var(--md-h1); font-weight: 500; text-align: center; margin: 0 0 0.8em;
  letter-spacing: 0.01em; line-height: 1.08; padding-bottom: 0.4em;
  border-bottom: 1px solid var(--rule);
}
.tpl-golden-canon h2 {
  font-size: var(--md-h2); font-weight: 600; text-align: center; margin: 1.618em 0 0.7em;
  letter-spacing: 0.04em;
}
.tpl-golden-canon h2::after { content: "❦"; display: block; font-size: 0.5em; color: var(--accent); margin-top: 0.3em; font-weight: 400; }
.tpl-golden-canon h3 { font-size: var(--md-h3); font-weight: 600; margin: 1.272em 0 0.4em; }
.tpl-golden-canon h4 { font-size: var(--md-h4); font-weight: 600; font-style: italic; margin: 1em 0 0.382em; }
.tpl-golden-canon h5 { font-family: var(--md-body); font-size: var(--md-h5); font-weight: 600; margin: 1em 0 0.3em; font-variant: small-caps; letter-spacing: 0.08em; color: var(--accent); }
.tpl-golden-canon h6 { font-family: var(--md-body); font-size: var(--md-h6); font-weight: 600; margin: 1em 0 0.3em; font-variant: small-caps; letter-spacing: 0.06em; color: var(--muted); }

.tpl-golden-canon p { margin: 0 0 0; text-align: justify; }
.tpl-golden-canon p + p { text-indent: 1.618em; }
.tpl-golden-canon .lead {
  font-family: var(--md-display); font-size: 1.4em; line-height: 1.35; font-style: italic;
  text-align: center; color: var(--muted); text-indent: 0; margin-bottom: 0.8em;
}
/* 朱批首字下沉(三行) */
.tpl-golden-canon .lead + p { text-indent: 0; }
.tpl-golden-canon .lead + p::first-letter {
  font-family: var(--md-display); font-weight: 600; color: var(--accent);
  font-size: 3.236em; line-height: 0.8; float: left; padding: 0.06em 0.12em 0 0;
}
.tpl-golden-canon .lead + p::first-line { font-variant: small-caps; letter-spacing: 0.03em; }

.tpl-golden-canon strong { font-weight: 600; }
.tpl-golden-canon em { font-style: italic; }
.tpl-golden-canon s, .tpl-golden-canon del { color: var(--muted); }
.tpl-golden-canon a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.tpl-golden-canon a:hover { background: var(--accent-soft); }
.tpl-golden-canon code { font-family: var(--md-mono); font-size: 0.74em; background: var(--code-bg); color: var(--code-fg); padding: 0.1em 0.4em; border-radius: 2px; }

.tpl-golden-canon blockquote {
  margin: 1.618em 1.618em; padding: 0; border: none; font-style: italic; color: var(--muted); font-size: 1.05em;
}
.tpl-golden-canon blockquote p { margin: 0 0 0.5em; text-align: justify; text-indent: 0; }
.tpl-golden-canon blockquote p:last-child { margin: 0; font-style: normal; text-align: right; font-variant: small-caps; letter-spacing: 0.05em; font-size: 0.85em; }

.tpl-golden-canon ul, .tpl-golden-canon ol { padding-left: 1.618em; margin: 0.618em 0 1em; }
.tpl-golden-canon li { margin: 0.3em 0; text-align: justify; }
.tpl-golden-canon li::marker { color: var(--accent); }
.tpl-golden-canon ul ul, .tpl-golden-canon ol ol, .tpl-golden-canon ul ol, .tpl-golden-canon ol ul { margin: 0.3em 0; }

.tpl-golden-canon .contains-task-list { list-style: none; padding-left: 0.2em; }
.tpl-golden-canon .task-list-item { display: flex; align-items: baseline; gap: 0.55em; text-align: left; }
.tpl-golden-canon .task-list-item input { appearance: none; -webkit-appearance: none; width: 1em; height: 1em; margin: 0; flex: none; border: 1px solid var(--accent); border-radius: 2px; position: relative; top: 0.13em; background: var(--bg); }
.tpl-golden-canon .task-list-item input:checked { background: var(--accent); }
.tpl-golden-canon .task-list-item input:checked::after { content: ""; position: absolute; left: 0.3em; top: 0.08em; width: 0.24em; height: 0.5em; border: solid var(--bg); border-width: 0 1.5px 1.5px 0; transform: rotate(42deg); }
.tpl-golden-canon li:has(input:checked) { color: var(--muted); }

.tpl-golden-canon pre { font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg); padding: 1.272em 1.618em; border-radius: 3px; border: 1px solid var(--rule); overflow-x: auto; line-height: 1.6; font-size: 0.66em; }
.tpl-golden-canon pre code { background: none; padding: 0; font-size: 1em; color: inherit; }

.tpl-golden-canon .tok-com  { color: #9c8f72; font-style: italic; }
.tpl-golden-canon .tok-kw   { color: #9c3b2e; }
.tpl-golden-canon .tok-fn   { color: #3a5a82; }
.tpl-golden-canon .tok-str  { color: #54743e; }
.tpl-golden-canon .tok-num  { color: #936a2a; }
.tpl-golden-canon .tok-type { color: #76427e; }
.tpl-golden-canon .tok-op, .tpl-golden-canon .tok-punc { color: var(--muted); }
.tpl-golden-canon .tok-var  { color: var(--code-fg); }
.tpl-golden-canon[data-theme="dark"] .tok-com  { color: #897c60; }
.tpl-golden-canon[data-theme="dark"] .tok-kw   { color: #d2785f; }
.tpl-golden-canon[data-theme="dark"] .tok-fn   { color: #8aa6cc; }
.tpl-golden-canon[data-theme="dark"] .tok-str  { color: #a4c084; }
.tpl-golden-canon[data-theme="dark"] .tok-num  { color: #d4a860; }
.tpl-golden-canon[data-theme="dark"] .tok-type { color: #c596cc; }

.tpl-golden-canon table { width: 100%; border-collapse: collapse; margin: 1.618em 0; font-size: 0.85em; }
.tpl-golden-canon thead th { text-align: left; font-variant: small-caps; font-weight: 600; letter-spacing: 0.04em; padding: 0.4em 0.7em; border-top: 1px solid var(--fg); border-bottom: 1px solid var(--fg); }
.tpl-golden-canon tbody td { padding: 0.45em 0.7em; }
.tpl-golden-canon tbody tr:last-child td { border-bottom: 1px solid var(--fg); }

.tpl-golden-canon .callout { margin: 1.618em 0; padding: 0.9em 1.272em; border: 1px solid var(--rule); background: var(--faint); border-radius: 2px; }
.tpl-golden-canon .callout p { margin: 0 0 0.4em; text-align: justify; text-indent: 0; }
.tpl-golden-canon .callout p:last-child { margin: 0; }
.tpl-golden-canon .callout-title { font-variant: small-caps; font-weight: 600; font-size: 0.9em; letter-spacing: 0.05em; }
.tpl-golden-canon .callout-note    { border-left: 3px solid #4a6c95; }
.tpl-golden-canon .callout-note .callout-title { color: #4a6c95; }
.tpl-golden-canon .callout-tip     { border-left: 3px solid #4f8050; }
.tpl-golden-canon .callout-tip .callout-title { color: #4f8050; }
.tpl-golden-canon .callout-warning { border-left: 3px solid var(--accent); }
.tpl-golden-canon .callout-warning .callout-title { color: var(--accent); }

.tpl-golden-canon hr { border: none; height: 1.618em; margin: 1em 0; text-align: center; }
.tpl-golden-canon hr::before { content: "❦ ❦ ❦"; color: var(--accent); font-size: 0.9em; letter-spacing: 0.4em; }

.tpl-golden-canon figure { margin: 1.618em 0; text-align: center; }
.tpl-golden-canon img { max-width: 100%; }
.tpl-golden-canon .img-placeholder { display: flex; align-items: center; justify-content: center; height: 220px; border: 1px solid var(--rule); background: var(--faint); color: var(--accent); }
.tpl-golden-canon figcaption { font-style: italic; font-size: 0.85em; color: var(--muted); margin-top: 0.5em; line-height: 1.4; text-align: center; text-wrap: pretty; }

.tpl-golden-canon math { font-size: 1.05em; }
.tpl-golden-canon .math-block { margin: 1.618em 0; text-align: center; overflow-x: auto; font-size: 1.15em; }

.tpl-golden-canon .footnote-ref a { font-size: 0.72em; vertical-align: super; border: none; color: var(--accent); }
.tpl-golden-canon .footnotes { margin-top: 2.618em; padding-top: 1em; border-top: 1px solid var(--rule); font-size: 0.78em; color: var(--muted); }
.tpl-golden-canon .footnotes p { text-align: left; text-indent: 0; }
.tpl-golden-canon .footnotes ol { padding-left: 1.4em; }
.tpl-golden-canon .footnotes li { margin: 0.382em 0; }
.tpl-golden-canon .footnote-backref { border: none; }


/* ===== swiss ===== */
/* ============================================================
   模版 8 · 瑞士国际  Swiss / International
   Archivo · 中 Noto Sans SC · 代码 JetBrains Mono
   模数比例 1.25 · 基准 17px · 行高 1.55 · 网格 · 红色重点
   特征:无衬线、强字重对比、齐左不缩进、克制红黑灰
   ============================================================ */
/*  */

.tpl-swiss {
  --md-base: 17px;
  --md-ratio: 1.25;
  --md-lh: 1.55;
  --md-measure: 72ch;
  --md-h1: 41.5px;
  --md-h2: 30.4px;
  --md-h3: 22.8px;
  --md-h4: 17px;
  --md-h5: 14.5px;
  --md-h6: 13.6px;

  --md-sans: "Archivo", "Noto Sans SC", Helvetica, Arial, sans-serif;
  --md-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --faint: #f2f2f2;
  --accent: #e2231a;
  --accent-soft: #fdeceb;
  --rule: #111111;
  --hair: #d8d8d8;
  --code-bg: #f2f2f2;
  --code-fg: #2a2a2a;

  font-family: var(--md-sans);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4rem 2.2rem 7rem;
}

.tpl-swiss[data-theme="dark"] {
  --bg: #0e0e0e;
  --fg: #f0f0f0;
  --muted: #9a9a9a;
  --faint: #1a1a1a;
  --accent: #ff4438;
  --accent-soft: #2a1413;
  --rule: #f0f0f0;
  --hair: #2c2c2c;
  --code-bg: #1a1a1a;
  --code-fg: #d4d4d4;
}

.tpl-swiss > * { margin: 0 0 1em; }
.tpl-swiss > *:first-child { margin-top: 0; }

.tpl-swiss h1, .tpl-swiss h2, .tpl-swiss h3,
.tpl-swiss h4, .tpl-swiss h5, .tpl-swiss h6 {
  font-family: var(--md-sans); color: var(--fg);
  line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance;
}
.tpl-swiss h1 { font-size: var(--md-h1); font-weight: 900; margin: 0 0 0.4em; letter-spacing: -0.035em; }
.tpl-swiss h2 { font-size: var(--md-h2); font-weight: 800; margin: 1.9em 0 0.5em; padding-top: 0.4em; border-top: 3px solid var(--rule); letter-spacing: -0.03em; }
.tpl-swiss h3 { font-size: var(--md-h3); font-weight: 700; margin: 1.6em 0 0.4em; }
.tpl-swiss h4 { font-size: var(--md-h4); font-weight: 700; margin: 1.3em 0 0.3em; }
.tpl-swiss h5 { font-size: var(--md-h5); font-weight: 700; margin: 1.2em 0 0.3em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.tpl-swiss h6 { font-size: var(--md-h6); font-weight: 700; margin: 1.2em 0 0.3em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.tpl-swiss p { margin: 0 0 1em; }
.tpl-swiss .lead { font-size: 1.32em; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }

.tpl-swiss strong { font-weight: 800; }
.tpl-swiss em { font-style: italic; }
.tpl-swiss s, .tpl-swiss del { color: var(--muted); }
.tpl-swiss a { color: var(--accent); text-decoration: none; font-weight: 600; }
.tpl-swiss a:hover { background: var(--accent); color: #fff; }
.tpl-swiss[data-theme="dark"] a:hover { color: #0e0e0e; }
.tpl-swiss code { font-family: var(--md-mono); font-size: 0.85em; background: var(--code-bg); color: var(--code-fg); padding: 0.12em 0.4em; }

.tpl-swiss blockquote {
  margin: 1.6em 0; padding: 0 0 0 1.2em; border-left: 4px solid var(--accent);
  font-size: 1.2em; font-weight: 600; line-height: 1.35; color: var(--fg);
}
.tpl-swiss blockquote p { margin: 0 0 0.4em; }
.tpl-swiss blockquote p:last-child { font-size: 0.62em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.tpl-swiss ul, .tpl-swiss ol { padding-left: 0; margin: 0 0 1em; list-style: none; }
.tpl-swiss li { margin: 0.4em 0; padding-left: 1.6em; position: relative; }
.tpl-swiss ul > li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.7em; height: 2px; background: var(--accent); }
.tpl-swiss ol { counter-reset: sw; }
.tpl-swiss ol > li { counter-increment: sw; }
.tpl-swiss ol > li::before { content: counter(sw, decimal-leading-zero); position: absolute; left: 0; top: 0; font-weight: 700; font-size: 0.8em; color: var(--accent); font-variant-numeric: tabular-nums; }
.tpl-swiss ul ul, .tpl-swiss ol ol, .tpl-swiss ul ol, .tpl-swiss ol ul { margin: 0.4em 0; }

.tpl-swiss .contains-task-list { padding-left: 0; }
.tpl-swiss .contains-task-list > li { padding-left: 0; }
.tpl-swiss .contains-task-list > li::before { content: none; }
.tpl-swiss .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-swiss .task-list-item input { appearance: none; -webkit-appearance: none; width: 1.05em; height: 1.05em; margin: 0; flex: none; border: 2px solid var(--fg); position: relative; top: 0.15em; background: var(--bg); }
.tpl-swiss .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-swiss .task-list-item input:checked::after { content: ""; position: absolute; left: 0.28em; top: 0.08em; width: 0.26em; height: 0.52em; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.tpl-swiss li:has(input:checked) { color: var(--muted); }

.tpl-swiss pre { font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg); padding: 1.1em 1.3em; overflow-x: auto; line-height: 1.6; font-size: 0.82em; border-left: 3px solid var(--accent); }
.tpl-swiss pre code { background: none; padding: 0; font-size: 1em; color: inherit; }

.tpl-swiss .tok-com  { color: #9a9a9a; font-style: italic; }
.tpl-swiss .tok-kw   { color: #e2231a; font-weight: 600; }
.tpl-swiss .tok-fn   { color: #1a1a1a; font-weight: 600; }
.tpl-swiss .tok-str  { color: #0a7d33; }
.tpl-swiss .tok-num  { color: #0550ae; }
.tpl-swiss .tok-type { color: #6639ba; }
.tpl-swiss .tok-op, .tpl-swiss .tok-punc { color: var(--muted); }
.tpl-swiss .tok-var  { color: var(--code-fg); }
.tpl-swiss[data-theme="dark"] .tok-com  { color: #777; }
.tpl-swiss[data-theme="dark"] .tok-kw   { color: #ff5b50; }
.tpl-swiss[data-theme="dark"] .tok-fn   { color: #f0f0f0; }
.tpl-swiss[data-theme="dark"] .tok-str  { color: #5fd07a; }
.tpl-swiss[data-theme="dark"] .tok-num  { color: #6cb6ff; }
.tpl-swiss[data-theme="dark"] .tok-type { color: #c792ea; }

.tpl-swiss table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 0.9em; }
.tpl-swiss thead th { text-align: left; font-weight: 800; padding: 0.5em 0.8em 0.5em 0; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.82em; border-bottom: 2px solid var(--rule); }
.tpl-swiss tbody td { padding: 0.55em 0.8em 0.55em 0; border-bottom: 1px solid var(--hair); }
.tpl-swiss tbody tr:last-child td { border-bottom: 2px solid var(--rule); }

.tpl-swiss .callout { margin: 1.6em 0; padding: 1em 1.2em; background: var(--faint); border-left: 4px solid var(--rule); }
.tpl-swiss .callout p { margin: 0 0 0.4em; }
.tpl-swiss .callout p:last-child { margin: 0; }
.tpl-swiss .callout-title { font-weight: 800; font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.1em; }
.tpl-swiss .callout-note    { border-left-color: #0a4fd0; }
.tpl-swiss .callout-note .callout-title { color: #0a4fd0; }
.tpl-swiss .callout-tip     { border-left-color: #0a7d33; }
.tpl-swiss .callout-tip .callout-title { color: #0a7d33; }
.tpl-swiss .callout-warning { border-left-color: var(--accent); }
.tpl-swiss .callout-warning .callout-title { color: var(--accent); }

.tpl-swiss hr { border: none; border-top: 3px solid var(--rule); margin: 2.4em 0; }

.tpl-swiss figure { margin: 2em 0; }
.tpl-swiss img { max-width: 100%; }
.tpl-swiss .img-placeholder { display: flex; align-items: center; justify-content: center; height: 220px; background: var(--faint); color: var(--muted); }
.tpl-swiss figcaption { font-size: 0.8em; font-weight: 600; color: var(--muted); margin-top: 0.6em; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.45; }

.tpl-swiss math { font-size: 1.02em; }
.tpl-swiss .math-block { margin: 1.8em 0; text-align: left; overflow-x: auto; font-size: 1.18em; padding-left: 1.2em; border-left: 4px solid var(--accent); }

.tpl-swiss .footnote-ref a { font-size: 0.72em; vertical-align: super; font-weight: 700; }
.tpl-swiss .footnote-ref a:hover { background: none; color: var(--accent); }
.tpl-swiss .footnotes { margin-top: 3em; padding-top: 1em; border-top: 2px solid var(--rule); font-size: 0.85em; color: var(--muted); }
.tpl-swiss .footnotes ol { counter-reset: fn; }
.tpl-swiss .footnotes li { margin: 0.4em 0; padding-left: 1.6em; }
.tpl-swiss .footnotes li::before { color: var(--muted); }
.tpl-swiss .footnote-backref:hover { background: none; }


/* ===== notebook ===== */
/* ============================================================
   模版 10 · 柔彩笔记  Pastel Notebook
   标题 Baloo 2(圆体) · 正文 Nunito · 手写 Caveat · 中 Noto Sans SC
   模数比例 1.2 · 基准 18px · 行高 1.8
   特征:圆润、马克笔高亮、柔和粉彩、便签式提示框、手帐感
   ============================================================ */
/*  */

.tpl-notebook {
  --md-base: 18px;
  --md-ratio: 1.2;
  --md-lh: 1.8;
  --md-measure: 66ch;
  --md-h1: 37.3px;
  --md-h2: 31.1px;
  --md-h3: 25.9px;
  --md-h4: 21.6px;
  --md-h5: 18px;
  --md-h6: 15px;

  --md-head: "Baloo 2", "Noto Sans SC", system-ui, sans-serif;
  --md-body: "Nunito", "Noto Sans SC", system-ui, sans-serif;
  --md-hand: "Caveat", "Noto Sans SC", cursive;
  --md-mono: "Fira Code", ui-monospace, Menlo, monospace;

  --bg: #fffdf8;
  --fg: #4b4660;
  --muted: #8b85a0;
  --faint: #f4f1fb;
  --accent: #8b5cf6;
  --accent-soft: #efe9fe;
  --hl: #fff1a8;
  --pink: #f9a8d4;
  --mint: #6ee7b7;
  --peach: #fdba74;
  --rule: #e7e2f2;
  --code-bg: #f5f2fc;
  --code-fg: #5b5470;

  font-family: var(--md-body);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4rem 2.2rem 7rem;
}

.tpl-notebook[data-theme="dark"] {
  --bg: #1d1a26;
  --fg: #ddd7ea;
  --muted: #948daa;
  --faint: #262234;
  --accent: #b69dff;
  --accent-soft: #2c2640;
  --hl: #5a5326;
  --rule: #332e44;
  --code-bg: #262234;
  --code-fg: #c4bcd9;
}

.tpl-notebook > * { margin: 0 0 1.15em; }
.tpl-notebook > *:first-child { margin-top: 0; }

.tpl-notebook h1, .tpl-notebook h2, .tpl-notebook h3,
.tpl-notebook h4, .tpl-notebook h5, .tpl-notebook h6 {
  font-family: var(--md-head); color: var(--fg); line-height: 1.25; font-weight: 700; text-wrap: balance;
}
.tpl-notebook h1 { font-size: var(--md-h1); font-weight: 800; margin: 0 0 0.5em; color: var(--accent); }
.tpl-notebook h2 { font-size: var(--md-h2); margin: 1.8em 0 0.5em; }
.tpl-notebook h2::before { content: "✏️"; font-size: 0.7em; margin-right: 0.4em; -webkit-text-fill-color: initial; }
.tpl-notebook h3 { font-size: var(--md-h3); margin: 1.5em 0 0.4em; color: var(--accent); }
.tpl-notebook h4 { font-size: var(--md-h4); margin: 1.3em 0 0.3em; }
.tpl-notebook h5 { font-size: var(--md-h5); margin: 1.2em 0 0.3em; }
.tpl-notebook h6 { font-size: var(--md-h6); margin: 1.2em 0 0.3em; color: var(--muted); }

.tpl-notebook p { margin: 0 0 1.15em; }
.tpl-notebook .lead { font-family: var(--md-hand); font-size: 1.6em; line-height: 1.4; color: var(--accent); }

.tpl-notebook strong { font-weight: 700; color: inherit; background: linear-gradient(transparent 58%, var(--hl) 58%); padding: 0 0.1em; }
.tpl-notebook em { font-style: italic; color: var(--accent); }
.tpl-notebook s, .tpl-notebook del { color: var(--muted); }
.tpl-notebook a { color: var(--accent); text-decoration: none; border-bottom: 2px dotted var(--accent); font-weight: 600; }
.tpl-notebook a:hover { background: var(--accent-soft); border-radius: 4px; }
.tpl-notebook code { font-family: var(--md-mono); font-size: 0.86em; background: var(--code-bg); color: var(--accent); padding: 0.12em 0.45em; border-radius: 6px; }

.tpl-notebook blockquote {
  margin: 1.6em 0; padding: 0.9em 1.3em; background: var(--accent-soft);
  border-radius: 14px; border: none; color: var(--fg); position: relative;
}
.tpl-notebook blockquote::before {
  content: "“"; font-family: var(--md-head); position: absolute; top: -0.05em; left: 0.25em;
  font-size: 2.6em; color: var(--accent); opacity: 0.35;
}
.tpl-notebook blockquote p { margin: 0 0 0.5em; padding-left: 0.6em; }
.tpl-notebook blockquote p:last-child { margin: 0; font-family: var(--md-hand); font-size: 1.15em; color: var(--accent); }

.tpl-notebook ul, .tpl-notebook ol { padding-left: 1.5em; margin: 0 0 1.15em; }
.tpl-notebook li { margin: 0.4em 0; }
.tpl-notebook li::marker { color: var(--accent); }
.tpl-notebook ul { list-style: none; padding-left: 1.5em; }
.tpl-notebook ul > li { position: relative; }
.tpl-notebook ul > li::before { content: "●"; position: absolute; left: -1.2em; font-size: 0.7em; top: 0.45em; color: var(--pink); }
.tpl-notebook ol li::marker { font-weight: 700; }
.tpl-notebook ul ul, .tpl-notebook ol ol, .tpl-notebook ul ol, .tpl-notebook ol ul { margin: 0.4em 0; }
.tpl-notebook ul ul > li::before { color: var(--mint); }

.tpl-notebook .contains-task-list { list-style: none; padding-left: 0; }
.tpl-notebook .contains-task-list > li::before { content: none; }
.tpl-notebook .task-list-item { display: flex; align-items: baseline; gap: 0.65em; }
.tpl-notebook .task-list-item input { appearance: none; -webkit-appearance: none; width: 1.2em; height: 1.2em; margin: 0; flex: none; border: 2px solid var(--rule); border-radius: 7px; position: relative; top: 0.22em; background: var(--bg); transition: .12s; }
.tpl-notebook .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-notebook .task-list-item input:checked::after { content: ""; position: absolute; left: 0.37em; top: 0.13em; width: 0.28em; height: 0.58em; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(42deg); }
.tpl-notebook li:has(input:checked) { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule); }

.tpl-notebook pre { font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg); padding: 1.2em 1.4em; border-radius: 14px; overflow-x: auto; line-height: 1.7; font-size: 0.8em; }
.tpl-notebook pre code { background: none; padding: 0; font-size: 1em; color: inherit; }

.tpl-notebook .tok-com  { color: #a59fbb; font-style: italic; }
.tpl-notebook .tok-kw   { color: #c026d3; }
.tpl-notebook .tok-fn   { color: #2563eb; }
.tpl-notebook .tok-str  { color: #059669; }
.tpl-notebook .tok-num  { color: #ea580c; }
.tpl-notebook .tok-type { color: #0891b2; }
.tpl-notebook .tok-op, .tpl-notebook .tok-punc { color: var(--muted); }
.tpl-notebook .tok-var  { color: var(--code-fg); }
.tpl-notebook[data-theme="dark"] .tok-com  { color: #6f6989; }
.tpl-notebook[data-theme="dark"] .tok-kw   { color: #f0abfc; }
.tpl-notebook[data-theme="dark"] .tok-fn   { color: #93c5fd; }
.tpl-notebook[data-theme="dark"] .tok-str  { color: #6ee7b7; }
.tpl-notebook[data-theme="dark"] .tok-num  { color: #fdba74; }
.tpl-notebook[data-theme="dark"] .tok-type { color: #67e8f9; }

.tpl-notebook table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.8em 0; font-size: 0.92em; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); }
.tpl-notebook thead th { text-align: left; font-family: var(--md-head); font-weight: 600; padding: 0.6em 0.9em; background: var(--accent-soft); color: var(--accent); border-bottom: 0; }
.tpl-notebook tbody td { padding: 0.55em 0.9em; border-top: 1px solid var(--rule); border-bottom: 0; }

.tpl-notebook .callout { margin: 1.6em 0; padding: 1em 1.2em 1em 1.3em; border-radius: 14px; border: none; }
.tpl-notebook .callout p { margin: 0 0 0.4em; }
.tpl-notebook .callout p:last-child { margin: 0; }
.tpl-notebook .callout-title { font-family: var(--md-head); font-weight: 700; font-size: 0.95em; margin-bottom: 0.3em !important; }
.tpl-notebook .callout-note    { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.tpl-notebook .callout-note .callout-title { color: var(--accent); }
.tpl-notebook .callout-note .callout-title::before { content: "📎 "; }
.tpl-notebook .callout-tip     { background: color-mix(in srgb, var(--mint) 22%, var(--bg)); }
.tpl-notebook .callout-tip .callout-title { color: #0f9d6e; }
.tpl-notebook .callout-tip .callout-title::before { content: "🌱 "; }
.tpl-notebook .callout-warning { background: color-mix(in srgb, var(--peach) 28%, var(--bg)); }
.tpl-notebook .callout-warning .callout-title { color: #d97706; }
.tpl-notebook .callout-warning .callout-title::before { content: "⚠️ "; }
.tpl-notebook[data-theme="dark"] .callout-tip .callout-title { color: #6ee7b7; }

.tpl-notebook hr { border: none; margin: 2.4em 0; text-align: center; height: 1em; }
.tpl-notebook hr::before { content: "• • •"; color: var(--pink); letter-spacing: 0.5em; font-size: 1.1em; }

.tpl-notebook figure { margin: 2em 0; text-align: center; }
.tpl-notebook img { max-width: 100%; border-radius: 14px; }
.tpl-notebook .img-placeholder { display: flex; align-items: center; justify-content: center; height: 220px; border-radius: 14px; background: var(--faint); color: var(--accent); border: 2px dashed var(--rule); }
.tpl-notebook figcaption { font-family: var(--md-hand); font-size: 1.2em; color: var(--muted); margin-top: 0.6em; line-height: 1.4; }

.tpl-notebook math { font-size: 1.02em; }
.tpl-notebook .math-block { margin: 1.8em 0; padding: 1.1em; text-align: center; overflow-x: auto; font-size: 1.18em; background: var(--faint); border-radius: 14px; }

.tpl-notebook .footnote-ref a { font-size: 0.72em; vertical-align: super; border: none; color: var(--accent); font-weight: 700; }
.tpl-notebook .footnotes { margin-top: 3em; padding-top: 1.2em; border-top: 2px dashed var(--rule); font-size: 0.86em; color: var(--muted); }
.tpl-notebook .footnotes ol { padding-left: 1.4em; }
.tpl-notebook .footnotes li { margin: 0.45em 0; }
.tpl-notebook .footnote-backref { border: none; }


/* ===== manuscript ===== */
/* ============================================================
   模版 23 · 打字稿  Manuscript
   Courier Prime(打字机等宽)· 中 Noto Serif SC
   文学手稿 · 基准 18px · 行高 1.9(近双倍)· 不两端对齐
   特征:等宽、下划线表强调、居中标题、朴素纸面
   ============================================================ */
/*  */

.tpl-manuscript {
  --md-base: 18px;
  --md-ratio: 1.15;
  --md-lh: 1.9;
  --md-measure: 66ch;
  --md-h1: 27px;
  --md-h2: 23px;
  --md-h3: 20px;
  --md-h4: 18px;
  --md-h5: 16px;
  --md-h6: 15px;

  --md-mono: "Courier Prime", "Noto Serif SC", "Courier New", monospace;

  --bg: #f7f4ea;
  --fg: #2a2620;
  --muted: #7c7263;
  --faint: #efeadd;
  --accent: #9a3b2e;
  --accent-soft: #f0e2dc;
  --rule: #ddd5c4;
  --code-bg: #ece6d6;
  --code-fg: #4a4339;

  font-family: var(--md-mono);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4rem 2.6rem 7rem;
}

.tpl-manuscript[data-theme="dark"] {
  --bg: #1b1813;
  --fg: #ddd5c6;
  --muted: #948a78;
  --faint: #242017;
  --accent: #d98a76;
  --accent-soft: #2c2118;
  --rule: #342e22;
  --code-bg: #242017;
  --code-fg: #c6bca8;
}

.tpl-manuscript > * { margin: 0 0 1.2em; }
.tpl-manuscript > *:first-child { margin-top: 0; }

.tpl-manuscript h1, .tpl-manuscript h2, .tpl-manuscript h3,
.tpl-manuscript h4, .tpl-manuscript h5, .tpl-manuscript h6 {
  font-family: var(--md-mono); color: var(--fg); line-height: 1.4; font-weight: 700; text-wrap: balance;
}
.tpl-manuscript h1 { font-size: var(--md-h1); margin: 0 0 1.2em; text-align: center; text-transform: uppercase; letter-spacing: 0.12em; }
.tpl-manuscript h1::after { content: ""; display: block; width: 6em; height: 1px; background: var(--fg); margin: 0.8em auto 0; }
.tpl-manuscript h2 { font-size: var(--md-h2); margin: 2.2em 0 0.8em; text-transform: uppercase; letter-spacing: 0.06em; }
.tpl-manuscript h3 { font-size: var(--md-h3); margin: 1.8em 0 0.6em; }
.tpl-manuscript h3::before { content: "— "; }
.tpl-manuscript h4 { font-size: var(--md-h4); margin: 1.5em 0 0.5em; text-decoration: underline; text-underline-offset: 3px; }
.tpl-manuscript h5 { font-size: var(--md-h5); margin: 1.4em 0 0.4em; color: var(--muted); }
.tpl-manuscript h6 { font-size: var(--md-h6); margin: 1.4em 0 0.4em; color: var(--muted); font-weight: 400; }

.tpl-manuscript p { margin: 0 0 1.2em; }
.tpl-manuscript .lead { text-align: center; color: var(--muted); font-style: italic; }
.tpl-manuscript .lead::before { content: "❝ "; }
.tpl-manuscript .lead::after { content: " ❞"; }

.tpl-manuscript strong { font-weight: 700; }
.tpl-manuscript em { font-style: normal; text-decoration: underline; text-underline-offset: 2px; }
.tpl-manuscript s, .tpl-manuscript del { color: var(--muted); }
.tpl-manuscript a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.tpl-manuscript a:hover { background: var(--accent-soft); }
.tpl-manuscript code { font-family: var(--md-mono); font-size: 0.92em; background: var(--code-bg); color: var(--code-fg); padding: 0.05em 0.3em; }

.tpl-manuscript blockquote {
  margin: 1.6em 0 1.6em 2em; padding: 0; border: none; color: var(--muted);
}
.tpl-manuscript blockquote p { margin: 0 0 0.6em; }
.tpl-manuscript blockquote p::before { content: "> "; color: var(--accent); }
.tpl-manuscript blockquote p:last-child { margin: 0; }
.tpl-manuscript blockquote p:last-child::before { content: "  — "; }

.tpl-manuscript ul, .tpl-manuscript ol { padding-left: 1.8em; margin: 0 0 1.2em; }
.tpl-manuscript li { margin: 0.3em 0; }
.tpl-manuscript ul { list-style: none; padding-left: 1.8em; }
.tpl-manuscript ul > li { position: relative; }
.tpl-manuscript ul > li::before { content: "*"; position: absolute; left: -1.4em; color: var(--accent); font-weight: 700; }
.tpl-manuscript ol li::marker { color: var(--accent); }
.tpl-manuscript ul ul, .tpl-manuscript ol ol, .tpl-manuscript ul ol, .tpl-manuscript ol ul { margin: 0.3em 0; }

.tpl-manuscript .contains-task-list { list-style: none; padding-left: 0; }
.tpl-manuscript .contains-task-list > li::before { content: none; }
.tpl-manuscript .task-list-item { display: flex; align-items: baseline; gap: 0.5em; }
.tpl-manuscript .task-list-item input { appearance: none; -webkit-appearance: none; width: 1em; height: 1em; margin: 0; flex: none; border: 1.5px solid var(--fg); border-radius: 0; position: relative; top: 0.14em; background: var(--bg); }
.tpl-manuscript .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-manuscript .task-list-item input:checked::after { content: ""; position: absolute; left: 0.28em; top: 0.06em; width: 0.24em; height: 0.5em; border: solid var(--bg); border-width: 0 1.5px 1.5px 0; transform: rotate(42deg); }
.tpl-manuscript li:has(input:checked) { color: var(--muted); }

.tpl-manuscript pre { font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg); padding: 1em 1.2em; border: 1px solid var(--rule); overflow-x: auto; line-height: 1.5; font-size: 0.84em; }
.tpl-manuscript pre code { background: none; padding: 0; font-size: 1em; color: inherit; }

/* 打字机:仅以加粗 / 暗淡区分,几乎无彩色 */
.tpl-manuscript .tok-com  { color: var(--muted); font-style: italic; }
.tpl-manuscript .tok-kw   { color: var(--accent); font-weight: 700; }
.tpl-manuscript .tok-fn   { color: var(--fg); font-weight: 700; }
.tpl-manuscript .tok-str  { color: #6a6250; }
.tpl-manuscript .tok-num  { color: #6a6250; }
.tpl-manuscript .tok-type { color: var(--fg); font-weight: 700; }
.tpl-manuscript .tok-op, .tpl-manuscript .tok-punc { color: var(--muted); }
.tpl-manuscript .tok-var  { color: var(--code-fg); }
.tpl-manuscript[data-theme="dark"] .tok-str { color: #a89e88; }
.tpl-manuscript[data-theme="dark"] .tok-num { color: #a89e88; }

.tpl-manuscript table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.86em; }
.tpl-manuscript thead th { text-align: left; font-weight: 700; padding: 0.4em 0.7em; border-top: 1px solid var(--fg); border-bottom: 1px solid var(--fg); }
.tpl-manuscript tbody td { padding: 0.4em 0.7em; border-bottom: 1px dashed var(--rule); }
.tpl-manuscript tbody tr:last-child td { border-bottom: 1px solid var(--fg); }

.tpl-manuscript .callout { margin: 1.6em 0; padding: 0.9em 1.1em; border: 1px dashed var(--rule); }
.tpl-manuscript .callout p { margin: 0 0 0.4em; }
.tpl-manuscript .callout p:last-child { margin: 0; }
.tpl-manuscript .callout-title { font-weight: 700; font-size: 0.92em; text-transform: uppercase; letter-spacing: 0.05em; }
.tpl-manuscript .callout-title::before { content: "* "; }
.tpl-manuscript .callout-note    { border-left: 3px solid #5a7a98; }
.tpl-manuscript .callout-note .callout-title { color: #5a7a98; }
.tpl-manuscript .callout-tip     { border-left: 3px solid #5e8a5e; }
.tpl-manuscript .callout-tip .callout-title { color: #5e8a5e; }
.tpl-manuscript .callout-warning { border-left: 3px solid var(--accent); }
.tpl-manuscript .callout-warning .callout-title { color: var(--accent); }

.tpl-manuscript hr { border: none; margin: 2.2em 0; text-align: center; color: var(--muted); }
.tpl-manuscript hr::before { content: "* * *"; letter-spacing: 0.5em; }

.tpl-manuscript figure { margin: 1.8em 0; text-align: center; }
.tpl-manuscript img { max-width: 100%; filter: grayscale(1); }
.tpl-manuscript .img-placeholder { display: flex; align-items: center; justify-content: center; height: 200px; border: 1px dashed var(--rule); background: var(--faint); color: var(--muted); }
.tpl-manuscript figcaption { font-size: 0.82em; color: var(--muted); margin-top: 0.5em; line-height: 1.5; font-style: italic; text-wrap: pretty; }
.tpl-manuscript figcaption::before { content: "[ FIG. ] "; font-style: normal; }

.tpl-manuscript math { font-size: 1.02em; }
.tpl-manuscript .math-block { margin: 1.6em 0; text-align: center; overflow-x: auto; font-size: 1.1em; }

.tpl-manuscript .footnote-ref a { font-size: 0.8em; vertical-align: super; }
.tpl-manuscript .footnotes { margin-top: 2.6em; padding-top: 1em; border-top: 1px solid var(--rule); font-size: 0.86em; color: var(--muted); }
.tpl-manuscript .footnotes ol { padding-left: 1.6em; }
.tpl-manuscript .footnotes li { margin: 0.4em 0; }


/* ===== newsprint ===== */
/* ============================================================
   模版 9 · 报章铅字  Newsprint
   标题 Oswald(窄体) · 正文 PT Serif · 中 Noto Serif SC
   模数比例 1.333 · 基准 18px · 行高 1.5 · 两端对齐
   特征:黑白油墨、大写窄体大标题、双线、首字下沉、报纸密排
   ============================================================ */
/*  */

.tpl-newsprint {
  --md-base: 18px;
  --md-ratio: 1.333;
  --md-lh: 1.5;
  --md-measure: 70ch;
  --md-h1: 56.9px;
  --md-h2: 32px;
  --md-h3: 24px;
  --md-h4: 18px;
  --md-h5: 15px;
  --md-h6: 13.5px;

  --md-head: "Oswald", "Noto Serif SC", "Arial Narrow", sans-serif;
  --md-body: "PT Serif", "Noto Serif SC", Georgia, serif;
  --md-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --bg: #fcfbf7;
  --fg: #1a1a1a;
  --muted: #5e5e5a;
  --faint: #efede6;
  --accent: #8b1a1a;
  --accent-soft: #f4e8e6;
  --rule: #1a1a1a;
  --hair: #cfcdc4;
  --code-bg: #efede6;
  --code-fg: #33332e;

  font-family: var(--md-body);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  hyphens: auto;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 3.5rem 2.4rem 7rem;
}

.tpl-newsprint[data-theme="dark"] {
  --bg: #181613;
  --fg: #e8e5dd;
  --muted: #9c988c;
  --faint: #221f1a;
  --accent: #e0746a;
  --accent-soft: #2a1c19;
  --rule: #e8e5dd;
  --hair: #38342c;
  --code-bg: #221f1a;
  --code-fg: #c9c5ba;
}

.tpl-newsprint > * { margin: 0 0 1em; }
.tpl-newsprint > *:first-child { margin-top: 0; }

.tpl-newsprint h1, .tpl-newsprint h2, .tpl-newsprint h3,
.tpl-newsprint h4, .tpl-newsprint h5, .tpl-newsprint h6 {
  font-family: var(--md-head); color: var(--fg); line-height: 1.08; text-wrap: balance;
}
.tpl-newsprint h1 {
  font-size: var(--md-h1); font-weight: 700; text-transform: uppercase;
  letter-spacing: -0.01em; text-align: center; margin: 0 0 0.3em;
  padding-bottom: 0.18em; border-bottom: 4px double var(--rule); line-height: 0.98;
}
.tpl-newsprint h2 {
  font-size: var(--md-h2); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.01em; margin: 1.7em 0 0.6em; padding-bottom: 0.2em;
  border-bottom: 2px solid var(--rule);
}
.tpl-newsprint h3 { font-size: var(--md-h3); font-weight: 600; margin: 1.4em 0 0.4em; }
.tpl-newsprint h4 { font-size: var(--md-h4); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin: 1.2em 0 0.3em; }
.tpl-newsprint h5 { font-size: var(--md-h5); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; margin: 1.1em 0 0.3em; color: var(--muted); }
.tpl-newsprint h6 { font-size: var(--md-h6); font-weight: 500; margin: 1.1em 0 0.3em; color: var(--muted); }

.tpl-newsprint p { margin: 0 0 1em; text-align: justify; }
.tpl-newsprint .lead {
  font-family: var(--md-head); font-weight: 400; font-size: 1.3em; line-height: 1.3;
  text-align: center; color: var(--muted); text-indent: 0; margin-bottom: 1.1em;
}
.tpl-newsprint .lead + p::first-letter {
  font-family: var(--md-head); font-weight: 700; float: left;
  font-size: 3.6em; line-height: 0.72; padding: 0.04em 0.1em 0 0; color: var(--accent);
}

.tpl-newsprint strong { font-weight: 700; }
.tpl-newsprint em { font-style: italic; }
.tpl-newsprint s, .tpl-newsprint del { color: var(--muted); }
.tpl-newsprint a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.tpl-newsprint a:hover { background: var(--accent-soft); }
.tpl-newsprint code { font-family: var(--md-mono); font-size: 0.82em; background: var(--code-bg); color: var(--code-fg); padding: 0.1em 0.35em; }

.tpl-newsprint blockquote {
  margin: 1.6em 0; padding: 0.6em 0; border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule);
  font-family: var(--md-head); font-weight: 500; font-size: 1.5em; line-height: 1.2; text-align: center; color: var(--fg);
}
.tpl-newsprint blockquote p { margin: 0 0 0.3em; text-align: center; text-indent: 0; }
.tpl-newsprint blockquote p:last-child { font-family: var(--md-body); font-size: 0.5em; font-weight: 400; font-style: italic; color: var(--muted); }

.tpl-newsprint ul, .tpl-newsprint ol { padding-left: 1.5em; margin: 0 0 1em; }
.tpl-newsprint li { margin: 0.25em 0; text-align: justify; }
.tpl-newsprint li::marker { color: var(--accent); }
.tpl-newsprint ul { list-style: square; }
.tpl-newsprint ul ul, .tpl-newsprint ol ol, .tpl-newsprint ul ol, .tpl-newsprint ol ul { margin: 0.25em 0; }

.tpl-newsprint .contains-task-list { list-style: none; padding-left: 0.2em; }
.tpl-newsprint .task-list-item { display: flex; align-items: baseline; gap: 0.55em; text-align: left; }
.tpl-newsprint .task-list-item input { appearance: none; -webkit-appearance: none; width: 1em; height: 1em; margin: 0; flex: none; border: 1.5px solid var(--fg); position: relative; top: 0.13em; background: var(--bg); }
.tpl-newsprint .task-list-item input:checked { background: var(--fg); }
.tpl-newsprint .task-list-item input:checked::after { content: ""; position: absolute; left: 0.28em; top: 0.06em; width: 0.24em; height: 0.5em; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.tpl-newsprint li:has(input:checked) { color: var(--muted); }

.tpl-newsprint pre { font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg); padding: 1em 1.2em; overflow-x: auto; line-height: 1.6; font-size: 0.72em; border: 1px solid var(--hair); }
.tpl-newsprint pre code { background: none; padding: 0; font-size: 1em; color: inherit; }

.tpl-newsprint .tok-com  { color: #8a8a82; font-style: italic; }
.tpl-newsprint .tok-kw   { color: #8b1a1a; font-weight: 700; }
.tpl-newsprint .tok-fn   { color: #1a1a1a; font-weight: 700; }
.tpl-newsprint .tok-str  { color: #2f5e2f; }
.tpl-newsprint .tok-num  { color: #4a4a8a; }
.tpl-newsprint .tok-type { color: #6b3a6b; }
.tpl-newsprint .tok-op, .tpl-newsprint .tok-punc { color: var(--muted); }
.tpl-newsprint .tok-var  { color: var(--code-fg); }
.tpl-newsprint[data-theme="dark"] .tok-com  { color: #7c786c; }
.tpl-newsprint[data-theme="dark"] .tok-kw   { color: #e0746a; }
.tpl-newsprint[data-theme="dark"] .tok-fn   { color: #e8e5dd; }
.tpl-newsprint[data-theme="dark"] .tok-str  { color: #8fbf8f; }
.tpl-newsprint[data-theme="dark"] .tok-num  { color: #9a9ae0; }
.tpl-newsprint[data-theme="dark"] .tok-type { color: #c79bc7; }

.tpl-newsprint table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.88em; }
.tpl-newsprint thead th { font-family: var(--md-head); text-align: left; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.92em; padding: 0.4em 0.7em; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tpl-newsprint tbody td { padding: 0.4em 0.7em; border-bottom: 1px solid var(--hair); }
.tpl-newsprint tbody tr:last-child td { border-bottom: 2px solid var(--rule); }

.tpl-newsprint .callout { margin: 1.5em 0; padding: 0; border: 2px solid var(--rule); }
.tpl-newsprint .callout-title { font-family: var(--md-head); font-weight: 600; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.35em 0.9em; background: var(--rule); color: var(--bg); margin: 0; }
.tpl-newsprint .callout p { margin: 0; padding: 0.4em 0.9em; text-align: justify; }
.tpl-newsprint .callout p + p { padding-top: 0; }
.tpl-newsprint .callout-note    { border-color: #1a3a6b; }
.tpl-newsprint .callout-note .callout-title { background: #1a3a6b; }
.tpl-newsprint .callout-tip     { border-color: #1f5e2f; }
.tpl-newsprint .callout-tip .callout-title { background: #1f5e2f; }
.tpl-newsprint .callout-warning { border-color: var(--accent); }
.tpl-newsprint .callout-warning .callout-title { background: var(--accent); }

.tpl-newsprint hr { border: none; border-top: 1px solid var(--rule); margin: 2.2em 0; }

.tpl-newsprint figure { margin: 1.8em 0; text-align: center; }
.tpl-newsprint img { max-width: 100%; filter: grayscale(1) contrast(1.05); }
.tpl-newsprint .img-placeholder { display: flex; align-items: center; justify-content: center; height: 210px; border: 1px solid var(--rule); background: var(--faint); color: var(--muted); }
.tpl-newsprint figcaption { font-family: var(--md-head); font-weight: 400; font-size: 0.82em; color: var(--muted); margin-top: 0.5em; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.02em; }

.tpl-newsprint math { font-size: 1.02em; }
.tpl-newsprint .math-block { margin: 1.6em 0; padding: 0.8em 0; text-align: center; overflow-x: auto; font-size: 1.15em; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }

.tpl-newsprint .footnote-ref a { font-size: 0.72em; vertical-align: super; text-decoration: none; }
.tpl-newsprint .footnotes { margin-top: 2.5em; padding-top: 1em; border-top: 2px solid var(--rule); font-size: 0.82em; color: var(--muted); }
.tpl-newsprint .footnotes p { text-align: left; text-indent: 0; }
.tpl-newsprint .footnotes ol { padding-left: 1.4em; }
.tpl-newsprint .footnotes li { margin: 0.35em 0; }

