/* generated by scripts/build-font-gallery.mjs — do not edit by hand */

/* ===== default ===== */
/* ============================================================
   模版 0 · 默认  Default
   与软件原生预览(.prose)一致的外观,但改为基于 --md-* 变量,
   作用于 .tpl-default,以便接入统一的渲染参数控件。
   颜色跟随 App 主题(--fg / --bg / --line / --accent …),
   因此明暗模式由 App 控制,无需自带调色板。
   ============================================================ */
.tpl-default {
  /* Default skin inherits the app's shared editor/preview vars so the existing
     Typography controls keep driving the default preview with zero regression.
     The render panel can still override --md-* per-template (overrides win). */
  --md-base: var(--prose-fs, 17px);
  --md-ratio: 1.2;
  --md-lh: var(--prose-lh, 1.75);
  --md-measure: var(--content-width, 720px);
  --md-h1: calc(var(--md-base) * 2.1);
  --md-h2: calc(var(--md-base) * 1.5);
  --md-h3: calc(var(--md-base) * 1.2);
  --md-h4: calc(var(--md-base) * 1);
  --md-h5: calc(var(--md-base) * 0.92);
  --md-h6: calc(var(--md-base) * 0.92);

  --md-serif: var(--font-prose);
  --md-sans:  var(--font-ui);
  --md-mono:  var(--font-mono);

  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 32px 48px 240px;
  font-family: var(--md-serif);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  word-wrap: break-word;
}

.tpl-default > *:first-child { margin-top: 0; }

.tpl-default h1, .tpl-default h2, .tpl-default h3,
.tpl-default h4, .tpl-default h5, .tpl-default h6 {
  font-family: var(--md-sans);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 2em 0 0.6em;
  scroll-margin-top: 24px;
  color: var(--fg);
}
.tpl-default h1 {
  font-size: var(--md-h1); margin-top: 0; letter-spacing: -0.03em;
  padding-bottom: 0.4em; border-bottom: 1px solid var(--line);
}
.tpl-default h2 {
  font-size: var(--md-h2); letter-spacing: -0.02em; margin-top: 2.2em;
  padding-bottom: 0.3em; border-bottom: 1px solid var(--line);
}
.tpl-default h3 { font-size: var(--md-h3); }
.tpl-default h4 { font-size: var(--md-h4); color: var(--fg-2); }
.tpl-default h5, .tpl-default h6 {
  font-size: var(--md-h5); color: var(--fg-3);
  text-transform: uppercase; letter-spacing: .06em;
}
.tpl-default h6 { font-size: var(--md-h6); }

.tpl-default p { margin: 0 0 1em; }
.tpl-default a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--accent) 35%, transparent);
}
.tpl-default a:hover { border-bottom-color: var(--accent); }
.tpl-default strong { font-weight: 700; color: var(--fg); }
.tpl-default em { font-style: italic; }

.tpl-default blockquote {
  margin: 1.2em 0; padding: 0.4em 1.2em;
  border-left: 3px solid var(--accent); background: var(--bg-2);
  color: var(--fg-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}
.tpl-default blockquote p:last-child { margin-bottom: 0; }

.tpl-default ul, .tpl-default ol { margin: 0 0 1em; padding-left: 1.5em; }
.tpl-default li { margin: 0.25em 0; }
.tpl-default li > ul, .tpl-default li > ol { margin: 0.25em 0; }
.tpl-default ol ol { list-style-type: lower-alpha; }
.tpl-default ol ol ol { list-style-type: lower-roman; }
.tpl-default ol ol ol ol { list-style-type: decimal; }
.tpl-default .task-list-item { list-style: none; margin-left: -1.2em; }
.tpl-default .task-list-item input { margin-right: 8px; }

.tpl-default hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }

.tpl-default code:not(pre code) {
  font-family: var(--md-mono); font-size: 0.86em;
  padding: 0.15em 0.4em; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 4px; color: var(--accent);
}
.tpl-default pre {
  margin: 1.2em 0; padding: 16px 18px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow-x: auto; font-size: 0.82em; line-height: 1.55; position: relative;
}
.tpl-default pre code { font-family: var(--md-mono); background: transparent; padding: 0; border: 0; }

.tpl-default table {
  width: 100%; border-collapse: collapse; margin: 1.4em 0;
  font-size: 0.92em; display: block; overflow-x: auto;
}
.tpl-default th, .tpl-default td {
  text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.tpl-default th { font-family: var(--md-sans); font-weight: 600; color: var(--fg); background: var(--bg-2); }
.tpl-default td { color: var(--fg-2); }

.tpl-default img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1em 0; display: block; }


/* ===== minimal ===== */
/* ============================================================
   模版 2 · 现代极简  Modern Minimal
   英 Hanken Grotesk · 中 Noto Sans SC · 代码 JetBrains Mono
   模数比例 1.2 (Minor Third) · 基准 17px · 行高 1.7
   特征:无衬线、克制留白、极少装饰线、靠间距分层
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-minimal {
  --md-base: 17px;
  --md-ratio: 1.2;
  --md-lh: 1.7;
  --md-measure: 70ch;
  --md-h1: 35.3px;
  --md-h2: 24.5px;
  --md-h3: 20.4px;
  --md-h4: 17px;
  --md-h5: 14.2px;
  --md-h6: 13.6px;

  --md-sans: "Hanken Grotesk", "Noto Sans SC", system-ui, sans-serif;
  --md-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --bg: #ffffff;
  --fg: #18181b;
  --muted: #71717a;
  --faint: #f4f4f5;
  --accent: #4f46e5;
  --accent-soft: #eef0fe;
  --rule: #e7e7ea;
  --code-bg: #f7f7f8;
  --code-fg: #3f3f46;

  font-family: var(--md-sans);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4.5rem 2rem 7rem;
}

.tpl-minimal[data-theme="dark"] {
  --bg: #0c0c0e;
  --fg: #e4e4e7;
  --muted: #8a8a93;
  --faint: #18181b;
  --accent: #818cf8;
  --accent-soft: #1c1d2e;
  --rule: #232327;
  --code-bg: #161618;
  --code-fg: #c4c4cc;
}

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

.tpl-minimal h1, .tpl-minimal h2, .tpl-minimal h3,
.tpl-minimal h4, .tpl-minimal h5, .tpl-minimal h6 {
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.022em;
  color: var(--fg);
  text-wrap: balance;
}
.tpl-minimal h1 { font-size: var(--md-h1); font-weight: 800; margin: 0 0 0.5em; letter-spacing: -0.035em; }
.tpl-minimal h2 { font-size: var(--md-h2); margin: 2.6em 0 0.6em; }
.tpl-minimal h3 { font-size: var(--md-h3); margin: 2em 0 0.5em; }
.tpl-minimal h4 { font-size: var(--md-h4); margin: 1.6em 0 0.4em; }
.tpl-minimal h5 { font-size: var(--md-h5); margin: 1.5em 0 0.3em; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.tpl-minimal h6 { font-size: var(--md-h6); margin: 1.5em 0 0.3em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.tpl-minimal p { margin: 0 0 1.1em; }
.tpl-minimal .lead { font-size: 1.22em; line-height: 1.55; color: var(--muted); font-weight: 400; letter-spacing: -0.01em; }

.tpl-minimal strong { font-weight: 700; color: var(--fg); }
.tpl-minimal em { font-style: italic; }
.tpl-minimal s, .tpl-minimal del { color: var(--muted); }
.tpl-minimal a {
  color: var(--accent); text-decoration: none; font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .2s;
}
.tpl-minimal a:hover { background-size: 100% 1.5px; }
.tpl-minimal code {
  font-family: var(--md-mono); font-size: 0.86em;
  background: var(--code-bg); color: var(--code-fg);
  padding: 0.15em 0.4em; border-radius: 5px;
  border: 1px solid var(--rule);
}

.tpl-minimal blockquote {
  margin: 1.8em 0; padding-left: 1.4em;
  border-left: 2px solid var(--rule); color: var(--muted);
}
.tpl-minimal blockquote p { margin: 0 0 0.5em; }
.tpl-minimal blockquote p:last-child { margin: 0; font-size: 0.9em; }

.tpl-minimal ul, .tpl-minimal ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.tpl-minimal li { margin: 0.35em 0; }
.tpl-minimal li::marker { color: var(--muted); }
.tpl-minimal ul ul, .tpl-minimal ol ol, .tpl-minimal ul ol, .tpl-minimal ol ul { margin: 0.35em 0; }

.tpl-minimal .contains-task-list { list-style: none; padding-left: 0; }
.tpl-minimal .task-list-item { display: flex; align-items: baseline; gap: 0.65em; }
.tpl-minimal .task-list-item input {
  appearance: none; -webkit-appearance: none;
  width: 1.1em; height: 1.1em; margin: 0; flex: none;
  border: 1.5px solid var(--rule); border-radius: 5px;
  position: relative; top: 0.16em; background: var(--bg); transition: .12s;
}
.tpl-minimal .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-minimal .task-list-item input:checked::after {
  content: ""; position: absolute; left: 0.33em; top: 0.12em;
  width: 0.26em; height: 0.55em; border: solid #fff;
  border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.tpl-minimal li:has(input:checked) { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule); }

.tpl-minimal pre {
  font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg);
  padding: 1.2em 1.4em; border-radius: 10px; border: 1px solid var(--rule);
  overflow-x: auto; line-height: 1.65; font-size: 0.82em;
}
.tpl-minimal pre code { background: none; padding: 0; border: none; font-size: 1em; }

.tpl-minimal .tok-com  { color: #9a9aa5; font-style: italic; }
.tpl-minimal .tok-kw   { color: #7c3aed; font-weight: 600; }
.tpl-minimal .tok-fn   { color: #2563eb; }
.tpl-minimal .tok-str  { color: #16a34a; }
.tpl-minimal .tok-num  { color: #d97706; }
.tpl-minimal .tok-type { color: #0891b2; }
.tpl-minimal .tok-op, .tpl-minimal .tok-punc { color: var(--muted); }
.tpl-minimal .tok-var  { color: var(--code-fg); }
.tpl-minimal[data-theme="dark"] .tok-com  { color: #6b6b75; }
.tpl-minimal[data-theme="dark"] .tok-kw   { color: #a78bfa; }
.tpl-minimal[data-theme="dark"] .tok-fn   { color: #60a5fa; }
.tpl-minimal[data-theme="dark"] .tok-str  { color: #4ade80; }
.tpl-minimal[data-theme="dark"] .tok-num  { color: #fbbf24; }
.tpl-minimal[data-theme="dark"] .tok-type { color: #22d3ee; }

.tpl-minimal table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 0.92em; }
.tpl-minimal thead th { text-align: left; font-weight: 600; padding: 0.6em 0.9em; color: var(--muted); border-bottom: 1px solid var(--rule); font-size: 0.86em; text-transform: uppercase; letter-spacing: 0.04em; }
.tpl-minimal tbody td { padding: 0.6em 0.9em; border-bottom: 1px solid var(--rule); }
.tpl-minimal tbody tr:last-child td { border-bottom: none; }

.tpl-minimal .callout { margin: 1.5em 0; padding: 1em 1.2em; border-radius: 10px; background: var(--faint); }
.tpl-minimal .callout p { margin: 0 0 0.4em; }
.tpl-minimal .callout p:last-child { margin: 0; }
.tpl-minimal .callout-title { font-weight: 600; font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5em !important; }
.tpl-minimal .callout-note    { background: color-mix(in srgb, #3b82f6 9%, var(--bg)); }
.tpl-minimal .callout-note .callout-title { color: #3b82f6; }
.tpl-minimal .callout-tip     { background: color-mix(in srgb, #10b981 9%, var(--bg)); }
.tpl-minimal .callout-tip .callout-title { color: #10b981; }
.tpl-minimal .callout-warning { background: color-mix(in srgb, #f59e0b 11%, var(--bg)); }
.tpl-minimal .callout-warning .callout-title { color: #d97706; }

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

.tpl-minimal figure { margin: 2.2em 0; }
.tpl-minimal img { max-width: 100%; border-radius: 10px; }
.tpl-minimal .img-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 220px; border-radius: 10px; background: var(--faint); color: var(--muted);
}
.tpl-minimal figcaption { font-size: 0.84em; color: var(--muted); margin-top: 0.8em; line-height: 1.5; text-wrap: pretty; }

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

.tpl-minimal .footnote-ref a { font-size: 0.72em; vertical-align: super; padding: 0 0.12em; background: none; font-weight: 600; }
.tpl-minimal .footnotes { margin-top: 3.5em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 0.86em; color: var(--muted); }
.tpl-minimal .footnotes ol { padding-left: 1.3em; }
.tpl-minimal .footnotes li { margin: 0.4em 0; }
.tpl-minimal .footnote-backref { background: none; }


/* ===== classic ===== */
/* ============================================================
   模版 1 · 经典书卷  Classic Editorial
   英 Source Serif 4 · 中 Noto Serif SC
   模数比例 1.25 (Major Third) · 基准 19px · 行高 1.78
   把渲染后的 Markdown 包进 <div class="markdown-body"> 即可
   暗色:给容器加 data-theme="dark"
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-classic {
  /* —— 比例系统 —— */
  --md-base: 19px;
  --md-ratio: 1.25;
  --md-lh: 1.78;
  --md-measure: 68ch;
  --md-h1: 41.5px;  /* base ×4 步 */
  --md-h2: 30.4px;
  --md-h3: 24.3px;
  --md-h4: 19px;
  --md-h5: 16.6px;
  --md-h6: 15px;

  /* —— 字体 —— */
  --md-serif: "Source Serif 4", "Noto Serif SC", Georgia, serif;
  --md-mono: "Source Serif 4", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* —— 亮色配色 —— */
  --bg: #faf6ee;
  --fg: #2b2521;
  --muted: #6f655b;
  --faint: #ece3d4;
  --accent: #9a3412;
  --accent-soft: #f0e2d4;
  --rule: #ddd0bd;
  --code-bg: #f3ebdd;
  --code-fg: #5a4a3a;
  --mark: #f7e2b8;

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

.tpl-classic[data-theme="dark"] {
  --bg: #1c1916;
  --fg: #e7ddcf;
  --muted: #a3978a;
  --faint: #2a2521;
  --accent: #e8956b;
  --accent-soft: #2e231b;
  --rule: #3a332c;
  --code-bg: #26221d;
  --code-fg: #cdbfa9;
  --mark: #5c4a26;
}

/* —— 块节奏 —— */
.tpl-classic > * { margin: 0 0 1.15em; }
.tpl-classic > *:first-child { margin-top: 0; }

/* —— 标题 —— */
.tpl-classic h1, .tpl-classic h2, .tpl-classic h3,
.tpl-classic h4, .tpl-classic h5, .tpl-classic h6 {
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--fg);
}
.tpl-classic h1 {
  font-size: var(--md-h1);
  font-weight: 600;
  margin: 0 0 0.6em;
  letter-spacing: -0.02em;
}
.tpl-classic h2 {
  font-size: var(--md-h2);
  margin: 2.2em 0 0.7em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--rule);
}
.tpl-classic h3 { font-size: var(--md-h3); margin: 1.9em 0 0.5em; }
.tpl-classic h4 { font-size: var(--md-h4); margin: 1.6em 0 0.4em; }
.tpl-classic h5 { font-size: var(--md-h5); margin: 1.4em 0 0.4em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tpl-classic h6 { font-size: var(--md-h6); margin: 1.4em 0 0.4em; color: var(--muted); }

/* —— 正文 —— */
.tpl-classic p { margin: 0 0 1.15em; }
.tpl-classic .lead {
  font-size: 1.18em;
  line-height: 1.6;
  color: var(--muted);
  font-style: italic;
}

/* —— 行内格式 —— */
.tpl-classic strong { font-weight: 700; }
.tpl-classic em { font-style: italic; }
.tpl-classic s, .tpl-classic del { color: var(--muted); text-decoration-thickness: 1px; }
.tpl-classic a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color .15s, background .15s;
}
.tpl-classic a:hover { border-bottom-color: var(--accent); background: var(--accent-soft); }
.tpl-classic mark { background: var(--mark); color: inherit; padding: 0 .15em; border-radius: 2px; }
.tpl-classic code {
  font-family: var(--md-mono);
  font-size: 0.92em;
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 0.12em 0.38em;
  border-radius: 3px;
  font-style: italic;
}

/* —— 引用 —— */
.tpl-classic blockquote {
  margin: 1.8em 0;
  padding: 0.2em 0 0.2em 1.6em;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
.tpl-classic blockquote p { margin: 0 0 0.6em; }
.tpl-classic blockquote p:last-child { margin: 0; font-style: normal; font-size: 0.92em; color: var(--muted); }

/* —— 列表 —— */
.tpl-classic ul, .tpl-classic ol { padding-left: 1.5em; margin: 0 0 1.15em; }
.tpl-classic li { margin: 0.3em 0; padding-left: 0.3em; }
.tpl-classic li::marker { color: var(--accent); }
.tpl-classic ul ul, .tpl-classic ol ol, .tpl-classic ul ol, .tpl-classic ol ul { margin: 0.3em 0; }
.tpl-classic ul { list-style: square; }

/* 任务清单 */
.tpl-classic .contains-task-list { list-style: none; padding-left: 0.2em; }
.tpl-classic .task-list-item { display: flex; align-items: baseline; gap: 0.6em; padding-left: 0; }
.tpl-classic .task-list-item input {
  appearance: none; -webkit-appearance: none;
  width: 1.05em; height: 1.05em; margin: 0; flex: none;
  border: 1.5px solid var(--rule); border-radius: 3px;
  position: relative; top: 0.18em; background: var(--bg);
}
.tpl-classic .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-classic .task-list-item input:checked::after {
  content: ""; position: absolute; left: 0.3em; top: 0.1em;
  width: 0.28em; height: 0.55em; border: solid var(--bg);
  border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.tpl-classic .task-list-item input:checked + * , .tpl-classic li:has(input:checked) { color: var(--muted); }

/* —— 代码块 —— */
.tpl-classic pre {
  font-family: var(--md-mono);
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1.1em 1.3em;
  border-radius: 6px;
  border: 1px solid var(--rule);
  overflow-x: auto;
  line-height: 1.6;
  font-size: 0.82em;
  font-style: normal;
}
.tpl-classic pre code { background: none; padding: 0; font-size: 1em; font-style: normal; color: inherit; }

/* 语法高亮 */
.tpl-classic .tok-com  { color: #a08c6e; font-style: italic; }
.tpl-classic .tok-kw   { color: #9a3412; }
.tpl-classic .tok-fn   { color: #1d4e89; }
.tpl-classic .tok-str  { color: #4a7c3f; }
.tpl-classic .tok-num  { color: #8a5a00; }
.tpl-classic .tok-type { color: #6b3fa0; }
.tpl-classic .tok-op, .tpl-classic .tok-punc { color: var(--muted); }
.tpl-classic .tok-var  { color: var(--code-fg); }
.tpl-classic[data-theme="dark"] .tok-com  { color: #8a7a5c; }
.tpl-classic[data-theme="dark"] .tok-kw   { color: #e8956b; }
.tpl-classic[data-theme="dark"] .tok-fn   { color: #7fb0e6; }
.tpl-classic[data-theme="dark"] .tok-str  { color: #9ec98a; }
.tpl-classic[data-theme="dark"] .tok-num  { color: #d8a657; }
.tpl-classic[data-theme="dark"] .tok-type { color: #c2a0e0; }

/* —— 表格 —— */
.tpl-classic table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 0.94em; }
.tpl-classic thead th {
  text-align: left; font-weight: 700; padding: 0.5em 0.8em;
  border-bottom: 2px solid var(--fg);
}
.tpl-classic tbody td { padding: 0.5em 0.8em; border-bottom: 1px solid var(--rule); }
.tpl-classic tbody tr:last-child td { border-bottom: none; }

/* —— 提示框 —— */
.tpl-classic .callout {
  margin: 1.6em 0; padding: 0.9em 1.2em;
  border-radius: 5px; border: 1px solid var(--rule);
  background: var(--code-bg);
}
.tpl-classic .callout p { margin: 0 0 0.5em; }
.tpl-classic .callout p:last-child { margin: 0; }
.tpl-classic .callout-title { font-weight: 700; font-style: normal; font-size: 0.92em; letter-spacing: 0.02em; }
.tpl-classic .callout-note    { border-left: 3px solid #3b6ea5; }
.tpl-classic .callout-note .callout-title { color: #3b6ea5; }
.tpl-classic .callout-tip     { border-left: 3px solid #3f8f5b; }
.tpl-classic .callout-tip .callout-title { color: #3f8f5b; }
.tpl-classic .callout-warning { border-left: 3px solid #b4791f; }
.tpl-classic .callout-warning .callout-title { color: #b4791f; }

/* —— 分割线 —— */
.tpl-classic hr {
  border: none; height: 1.5em; margin: 2.4em 0;
  background: none; text-align: center;
}
.tpl-classic hr::before {
  content: "✦"; color: var(--rule); font-size: 0.9em; letter-spacing: 0.6em;
}

/* —— 图片 + 图注 —— */
.tpl-classic figure { margin: 2em 0; text-align: center; }
.tpl-classic img { max-width: 100%; border-radius: 4px; }
.tpl-classic .img-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 220px; border: 1px solid var(--rule); border-radius: 4px;
  background: var(--faint); color: var(--muted);
}
.tpl-classic figcaption {
  font-size: 0.84em; color: var(--muted); margin-top: 0.7em;
  font-style: italic; line-height: 1.5; text-wrap: pretty;
}

/* —— 数学公式 —— */
.tpl-classic math { font-size: 1.02em; }
.tpl-classic .math-block {
  margin: 1.8em 0; text-align: center; overflow-x: auto;
  font-size: 1.2em; color: var(--fg);
}

/* —— 脚注 —— */
.tpl-classic .footnote-ref a {
  border: none; font-size: 0.75em; vertical-align: super;
  padding: 0 0.15em; color: var(--accent);
}
.tpl-classic .footnotes {
  margin-top: 3em; padding-top: 1em; border-top: 1px solid var(--rule);
  font-size: 0.85em; color: var(--muted);
}
.tpl-classic .footnotes ol { padding-left: 1.4em; }
.tpl-classic .footnotes li { margin: 0.4em 0; }
.tpl-classic .footnote-backref { border: none; }


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

.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; }


/* ===== technical ===== */
/* ============================================================
   模版 3 · 技术工程  Technical / Engineering
   标题/代码 JetBrains Mono · 正文 IBM Plex Sans + IBM Plex Sans SC
   模数比例 1.2 · 基准 15px · 行高 1.65 · 信息密集
   特征:等宽标题、方括号标记、左竖线提示、冷灰配色
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-technical {
  --md-base: 15px;
  --md-ratio: 1.2;
  --md-lh: 1.65;
  --md-measure: 78ch;
  --md-h1: 31.1px;
  --md-h2: 21.6px;
  --md-h3: 18px;
  --md-h4: 15px;
  --md-h5: 13px;
  --md-h6: 12.5px;

  --md-sans: "IBM Plex Sans", "IBM Plex Sans SC", system-ui, sans-serif;
  --md-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --bg: #fbfcfd;
  --fg: #1e2329;
  --muted: #687078;
  --faint: #f0f3f5;
  --accent: #0a7ea4;
  --accent-soft: #e3f1f6;
  --rule: #dfe4e8;
  --code-bg: #f4f6f8;
  --code-fg: #2d343b;

  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;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 3.5rem 2.2rem 6rem;
}

.tpl-technical[data-theme="dark"] {
  --bg: #0d1117;
  --fg: #c9d1d9;
  --muted: #7d8590;
  --faint: #161b22;
  --accent: #39bae6;
  --accent-soft: #15252e;
  --rule: #21262d;
  --code-bg: #161b22;
  --code-fg: #adbac7;
}

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

.tpl-technical h1, .tpl-technical h2, .tpl-technical h3,
.tpl-technical h4, .tpl-technical h5, .tpl-technical h6 {
  font-family: var(--md-mono);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.tpl-technical h1 { font-size: var(--md-h1); font-weight: 700; margin: 0 0 0.5em; }
.tpl-technical h2 {
  font-size: var(--md-h2); margin: 2.4em 0 0.7em;
  padding-bottom: 0.35em; border-bottom: 1px solid var(--rule);
}
.tpl-technical h2::before { content: "## "; color: var(--accent); font-weight: 400; }
.tpl-technical h3 { font-size: var(--md-h3); margin: 1.8em 0 0.5em; }
.tpl-technical h3::before { content: "### "; color: var(--muted); font-weight: 400; }
.tpl-technical h4 { font-size: var(--md-h4); margin: 1.5em 0 0.4em; }
.tpl-technical h5 { font-size: var(--md-h5); margin: 1.4em 0 0.3em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.tpl-technical h6 { font-size: var(--md-h6); margin: 1.4em 0 0.3em; color: var(--muted); }

.tpl-technical p { margin: 0 0 1em; }
.tpl-technical .lead { font-size: 1.15em; color: var(--muted); line-height: 1.55; border-left: 2px solid var(--accent); padding-left: 1em; }

.tpl-technical strong { font-weight: 600; color: var(--fg); }
.tpl-technical em { font-style: italic; }
.tpl-technical s, .tpl-technical del { color: var(--muted); }
.tpl-technical a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.tpl-technical a:hover { background: var(--accent-soft); }
.tpl-technical a::after { content: "↗"; font-size: 0.7em; vertical-align: super; opacity: 0.5; margin-left: 0.1em; }
.tpl-technical code {
  font-family: var(--md-mono); font-size: 0.88em;
  background: var(--code-bg); color: var(--accent);
  padding: 0.1em 0.35em; border-radius: 3px; border: 1px solid var(--rule);
}

.tpl-technical blockquote {
  margin: 1.4em 0; padding: 0.6em 1em;
  border-left: 3px solid var(--rule); background: var(--faint); color: var(--muted);
}
.tpl-technical blockquote p { margin: 0 0 0.4em; }
.tpl-technical blockquote p:last-child { margin: 0; font-family: var(--md-mono); font-size: 0.85em; }

.tpl-technical ul, .tpl-technical ol { padding-left: 1.5em; margin: 0 0 1em; }
.tpl-technical li { margin: 0.25em 0; }
.tpl-technical li::marker { color: var(--accent); font-family: var(--md-mono); }
.tpl-technical ul { list-style: none; padding-left: 1.5em; }
.tpl-technical ul > li { position: relative; }
.tpl-technical ul > li::before { content: "—"; position: absolute; left: -1.3em; color: var(--accent); }
.tpl-technical ul ul, .tpl-technical ol ol, .tpl-technical ul ol, .tpl-technical ol ul { margin: 0.25em 0; }

.tpl-technical .contains-task-list { list-style: none; padding-left: 0; }
.tpl-technical .contains-task-list > li::before { content: none; }
.tpl-technical .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-technical .task-list-item input {
  appearance: none; -webkit-appearance: none;
  width: 1em; height: 1em; margin: 0; flex: none;
  border: 1px solid var(--muted); border-radius: 2px;
  position: relative; top: 0.12em; background: var(--bg); font-family: var(--md-mono);
}
.tpl-technical .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-technical .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-technical li:has(input:checked) { color: var(--muted); }

.tpl-technical pre {
  font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg);
  padding: 1em 1.2em; border-radius: 6px; border: 1px solid var(--rule);
  overflow-x: auto; line-height: 1.6; font-size: 0.86em;
  position: relative;
}
.tpl-technical pre code { background: none; padding: 0; border: none; color: inherit; font-size: 1em; }

.tpl-technical .tok-com  { color: #8b949e; font-style: italic; }
.tpl-technical .tok-kw   { color: #cf222e; }
.tpl-technical .tok-fn   { color: #6639ba; }
.tpl-technical .tok-str  { color: #0a7d33; }
.tpl-technical .tok-num  { color: #0550ae; }
.tpl-technical .tok-type { color: #953800; }
.tpl-technical .tok-op, .tpl-technical .tok-punc { color: var(--muted); }
.tpl-technical .tok-var  { color: var(--code-fg); }
.tpl-technical[data-theme="dark"] .tok-com  { color: #768390; }
.tpl-technical[data-theme="dark"] .tok-kw   { color: #f47067; }
.tpl-technical[data-theme="dark"] .tok-fn   { color: #dcbdfb; }
.tpl-technical[data-theme="dark"] .tok-str  { color: #96d0ff; }
.tpl-technical[data-theme="dark"] .tok-num  { color: #6cb6ff; }
.tpl-technical[data-theme="dark"] .tok-type { color: #f69d50; }

.tpl-technical table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.88em; font-variant-numeric: tabular-nums; }
.tpl-technical thead th { text-align: left; font-weight: 600; padding: 0.45em 0.8em; background: var(--faint); border: 1px solid var(--rule); font-family: var(--md-mono); font-size: 0.92em; }
.tpl-technical tbody td { padding: 0.45em 0.8em; border: 1px solid var(--rule); }
.tpl-technical tbody tr:nth-child(even) { background: var(--faint); }

.tpl-technical .callout { margin: 1.4em 0; padding: 0.8em 1em 0.8em 1.1em; border-radius: 4px; border: 1px solid var(--rule); border-left-width: 3px; background: var(--faint); }
.tpl-technical .callout p { margin: 0 0 0.4em; }
.tpl-technical .callout p:last-child { margin: 0; }
.tpl-technical .callout-title { font-family: var(--md-mono); font-weight: 600; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.05em; }
.tpl-technical .callout-note    { border-left-color: #0a7ea4; }
.tpl-technical .callout-note .callout-title::before { content: "[i] "; }
.tpl-technical .callout-note .callout-title { color: #0a7ea4; }
.tpl-technical .callout-tip     { border-left-color: #1a8a4a; }
.tpl-technical .callout-tip .callout-title::before { content: "[+] "; }
.tpl-technical .callout-tip .callout-title { color: #1a8a4a; }
.tpl-technical .callout-warning { border-left-color: #c2820a; }
.tpl-technical .callout-warning .callout-title::before { content: "[!] "; }
.tpl-technical .callout-warning .callout-title { color: #c2820a; }

.tpl-technical hr { border: none; border-top: 1px dashed var(--rule); margin: 2.5em 0; }

.tpl-technical figure { margin: 1.8em 0; }
.tpl-technical img { max-width: 100%; border-radius: 4px; border: 1px solid var(--rule); }
.tpl-technical .img-placeholder { display: flex; align-items: center; justify-content: center; height: 200px; border: 1px solid var(--rule); border-radius: 4px; background: var(--faint); color: var(--muted); }
.tpl-technical figcaption { font-family: var(--md-mono); font-size: 0.78em; color: var(--muted); margin-top: 0.6em; line-height: 1.5; }

.tpl-technical math { font-size: 1.02em; }
.tpl-technical .math-block { margin: 1.6em 0; padding: 1em; text-align: center; overflow-x: auto; font-size: 1.15em; background: var(--faint); border-radius: 6px; border: 1px solid var(--rule); }

.tpl-technical .footnote-ref a { font-family: var(--md-mono); font-size: 0.72em; vertical-align: super; border: none; }
.tpl-technical .footnote-ref a::after { content: none; }
.tpl-technical .footnotes { margin-top: 3em; padding-top: 1em; border-top: 1px solid var(--rule); font-size: 0.85em; color: var(--muted); }
.tpl-technical .footnotes ol { padding-left: 1.4em; }
.tpl-technical .footnotes a::after { content: none; }
.tpl-technical .footnote-backref { border: none; }


/* ===== warm ===== */
/* ============================================================
   模版 5 · 柔和温暖  Soft & Warm
   英 Newsreader · 中 霞鹜文楷 LXGW WenKai · 代码 Cascadia/Mono
   模数比例 1.25 · 基准 19px · 行高 1.95 (舒展) · 阅读宽 60ch
   特征:温暖米色、宽松行距、柔和圆角、长时间阅读不累
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */
/* fonts bundled locally via templates/_fonts.css */
/* fonts bundled locally via templates/_fonts.css */

.tpl-warm {
  --md-base: 19px;
  --md-ratio: 1.25;
  --md-lh: 1.95;
  --md-measure: 62ch;
  --md-h1: 37.1px;
  --md-h2: 29.7px;
  --md-h3: 23.8px;
  --md-h4: 19px;
  --md-h5: 16.6px;
  --md-h6: 15.2px;

  --md-serif: "Newsreader", "LXGW WenKai", Georgia, serif;
  --md-cjk: "LXGW WenKai", "Newsreader", serif;
  --md-mono: "Fira Code", ui-monospace, Menlo, monospace;

  --bg: #fbf7f0;
  --fg: #43392f;
  --muted: #8c7d6b;
  --faint: #f2ebdf;
  --accent: #c2683a;
  --accent-soft: #f6e6d8;
  --rule: #e6dcc9;
  --code-bg: #f4ecdd;
  --code-fg: #6b5d4a;

  font-family: var(--md-serif);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4.5rem 2rem 7rem;
}

.tpl-warm[data-theme="dark"] {
  --bg: #221d17;
  --fg: #e6dccb;
  --muted: #a99a85;
  --faint: #2b251d;
  --accent: #e69a6b;
  --accent-soft: #33271d;
  --rule: #383025;
  --code-bg: #2b251d;
  --code-fg: #cabba2;
}

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

.tpl-warm h1, .tpl-warm h2, .tpl-warm h3,
.tpl-warm h4, .tpl-warm h5, .tpl-warm h6 {
  font-family: var(--md-serif); color: var(--fg);
  line-height: 1.35; font-weight: 600; text-wrap: balance;
}
.tpl-warm h1 { font-size: var(--md-h1); font-weight: 600; margin: 0 0 0.7em; line-height: 1.2; }
.tpl-warm h2 { font-size: var(--md-h2); margin: 1.9em 0 0.6em; }
.tpl-warm h2::after { content: ""; display: block; width: 2.2em; height: 2px; background: var(--accent); border-radius: 2px; margin-top: 0.35em; opacity: 0.6; }
.tpl-warm h3 { font-size: var(--md-h3); margin: 1.7em 0 0.5em; }
.tpl-warm h4 { font-size: var(--md-h4); margin: 1.5em 0 0.4em; }
.tpl-warm h5 { font-size: var(--md-h5); margin: 1.4em 0 0.3em; color: var(--accent); }
.tpl-warm h6 { font-size: var(--md-h6); margin: 1.4em 0 0.3em; color: var(--muted); }

.tpl-warm p { margin: 0 0 1.2em; }
.tpl-warm .lead { font-size: 1.18em; line-height: 1.7; color: var(--muted); }

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

.tpl-warm blockquote {
  margin: 1.8em 0; padding: 1em 1.4em;
  background: var(--faint); border-radius: 0 10px 10px 0;
  border-left: 3px solid var(--accent); color: var(--muted); font-style: italic;
}
.tpl-warm blockquote p { margin: 0 0 0.5em; }
.tpl-warm blockquote p:last-child { margin: 0; font-style: normal; font-size: 0.9em; }

.tpl-warm ul, .tpl-warm ol { padding-left: 1.5em; margin: 0 0 1.2em; }
.tpl-warm li { margin: 0.4em 0; }
.tpl-warm li::marker { color: var(--accent); }
.tpl-warm ul ul, .tpl-warm ol ol, .tpl-warm ul ol, .tpl-warm ol ul { margin: 0.4em 0; }

.tpl-warm .contains-task-list { list-style: none; padding-left: 0; }
.tpl-warm .task-list-item { display: flex; align-items: baseline; gap: 0.65em; }
.tpl-warm .task-list-item input {
  appearance: none; -webkit-appearance: none; width: 1.1em; height: 1.1em; margin: 0; flex: none;
  border: 1.5px solid var(--rule); border-radius: 6px; position: relative; top: 0.2em; background: var(--bg);
}
.tpl-warm .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-warm .task-list-item input:checked::after { content: ""; position: absolute; left: 0.34em; top: 0.13em; width: 0.26em; height: 0.52em; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.tpl-warm li:has(input:checked) { color: var(--muted); }

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

.tpl-warm .tok-com  { color: #b0a087; font-style: italic; }
.tpl-warm .tok-kw   { color: #c2683a; }
.tpl-warm .tok-fn   { color: #3a7ca5; }
.tpl-warm .tok-str  { color: #5b8c3e; }
.tpl-warm .tok-num  { color: #b07d2e; }
.tpl-warm .tok-type { color: #97588c; }
.tpl-warm .tok-op, .tpl-warm .tok-punc { color: var(--muted); }
.tpl-warm .tok-var  { color: var(--code-fg); }
.tpl-warm[data-theme="dark"] .tok-com  { color: #8c7e66; }
.tpl-warm[data-theme="dark"] .tok-kw   { color: #e69a6b; }
.tpl-warm[data-theme="dark"] .tok-fn   { color: #7fb3d4; }
.tpl-warm[data-theme="dark"] .tok-str  { color: #a6c47e; }
.tpl-warm[data-theme="dark"] .tok-num  { color: #d9aa5e; }
.tpl-warm[data-theme="dark"] .tok-type { color: #c79bbf; }

.tpl-warm table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 0.92em; }
.tpl-warm thead th { text-align: left; font-weight: 600; padding: 0.6em 0.9em; background: var(--faint); border-bottom: 1px solid var(--rule); }
.tpl-warm thead th:first-child { border-radius: 8px 0 0 0; }
.tpl-warm thead th:last-child { border-radius: 0 8px 0 0; }
.tpl-warm tbody td { padding: 0.6em 0.9em; border-bottom: 1px solid var(--rule); }
.tpl-warm tbody tr:last-child td { border-bottom: none; }

.tpl-warm .callout { margin: 1.6em 0; padding: 1em 1.3em; border-radius: 10px; background: var(--faint); }
.tpl-warm .callout p { margin: 0 0 0.4em; }
.tpl-warm .callout p:last-child { margin: 0; }
.tpl-warm .callout-title { font-weight: 600; font-size: 0.92em; }
.tpl-warm .callout-note    { background: color-mix(in srgb, #5a8cb0 14%, var(--bg)); }
.tpl-warm .callout-note .callout-title { color: #4a7ca0; }
.tpl-warm .callout-tip     { background: color-mix(in srgb, #6aa85b 14%, var(--bg)); }
.tpl-warm .callout-tip .callout-title { color: #588c4a; }
.tpl-warm .callout-warning { background: color-mix(in srgb, #d99a4a 16%, var(--bg)); }
.tpl-warm .callout-warning .callout-title { color: #b4791f; }

.tpl-warm hr { border: none; background: none; height: auto; margin: 2.6em 0; text-align: center; overflow: visible; line-height: 1; }
.tpl-warm hr::before { content: "❧"; display: block; line-height: 1; color: var(--accent); font-size: 1.2em; opacity: 0.7; }

.tpl-warm figure { margin: 2.2em 0; text-align: center; }
.tpl-warm img { max-width: 100%; border-radius: 12px; }
.tpl-warm .img-placeholder { display: flex; align-items: center; justify-content: center; height: 220px; border-radius: 12px; background: var(--faint); color: var(--muted); }
.tpl-warm figcaption { font-size: 0.84em; color: var(--muted); margin-top: 0.7em; font-style: italic; line-height: 1.5; text-wrap: pretty; }

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

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


/* ===== academic ===== */
/* ============================================================
   模版 6 · 学术论文  Academic Paper
   英 Spectral · 中 Noto Serif SC · 代码 Latin Modern/Mono
   模数比例 1.2 · 基准 18px · 行高 1.7 · 两端对齐
   特征:标题自动编号、公式右侧编号、脚注与引用突出、克制双色
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-academic {
  --md-base: 18px;
  --md-ratio: 1.2;
  --md-lh: 1.7;
  --md-measure: 70ch;
  --md-h1: 31.1px;
  --md-h2: 21.6px;
  --md-h3: 18px;
  --md-h4: 16px;
  --md-h5: 14.4px;
  --md-h6: 13.7px;

  --md-serif: "Spectral", "Noto Serif SC", "Times New Roman", serif;
  --md-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --bg: #ffffff;
  --fg: #1c1c1c;
  --muted: #5c5c5c;
  --faint: #f5f5f4;
  --accent: #1e40af;
  --accent-soft: #eaeefb;
  --rule: #d6d6d4;
  --code-bg: #f6f6f5;
  --code-fg: #3a3a38;

  /* 章节编号计数器 */
  counter-reset: h2;
  font-family: var(--md-serif);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  hyphens: auto;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4rem 2.4rem 7rem;
}

.tpl-academic[data-theme="dark"] {
  --bg: #131316;
  --fg: #dcdcdc;
  --muted: #9a9a9a;
  --faint: #1c1c20;
  --accent: #7da2f0;
  --accent-soft: #1a2030;
  --rule: #2a2a30;
  --code-bg: #1c1c20;
  --code-fg: #c2c2c2;
}

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

.tpl-academic h1, .tpl-academic h2, .tpl-academic h3,
.tpl-academic h4, .tpl-academic h5, .tpl-academic h6 {
  font-family: var(--md-serif); color: var(--fg);
  line-height: 1.3; font-weight: 700; text-wrap: balance;
}
.tpl-academic h1 { font-size: var(--md-h1); text-align: center; margin: 0 0 1em; line-height: 1.25; }
.tpl-academic h2 {
  font-size: var(--md-h2); font-weight: 600; margin: 2em 0 0.6em;
  counter-increment: h2; counter-reset: h3;
}
.tpl-academic h2::before { content: counter(h2) "\00a0\00a0"; color: var(--muted); font-weight: 500; }
.tpl-academic h3 { font-size: var(--md-h3); font-weight: 600; margin: 1.6em 0 0.5em; counter-increment: h3; }
.tpl-academic h3::before { content: counter(h2) "." counter(h3) "\00a0\00a0"; color: var(--muted); font-weight: 500; }
.tpl-academic h4 { font-size: var(--md-h4); font-weight: 600; font-style: italic; margin: 1.4em 0 0.4em; }
.tpl-academic h5 { font-size: var(--md-h5); font-weight: 600; margin: 1.3em 0 0.3em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tpl-academic h6 { font-size: var(--md-h6); font-weight: 600; margin: 1.3em 0 0.3em; color: var(--muted); font-style: italic; }

.tpl-academic p { margin: 0 0 1em; text-align: justify; }
/* 段落首行缩进(正文连续段落) */
.tpl-academic p + p { text-indent: 1.5em; }
.tpl-academic .lead { font-size: 1.1em; text-align: center; color: var(--muted); font-style: italic; line-height: 1.55; text-indent: 0; max-width: 56ch; margin-left: auto; margin-right: auto; }
.tpl-academic .lead + p { text-indent: 0; }

.tpl-academic strong { font-weight: 700; }
.tpl-academic em { font-style: italic; }
.tpl-academic s, .tpl-academic del { color: var(--muted); }
.tpl-academic a { color: var(--accent); text-decoration: none; }
.tpl-academic a:hover { text-decoration: underline; text-underline-offset: 2px; }
.tpl-academic code { font-family: var(--md-mono); font-size: 0.85em; background: var(--code-bg); color: var(--code-fg); padding: 0.1em 0.35em; border-radius: 3px; }

.tpl-academic blockquote {
  margin: 1.4em 1.5em; padding: 0; border: none;
  font-size: 0.95em; color: var(--muted); font-style: italic;
}
.tpl-academic blockquote p { margin: 0 0 0.4em; text-align: justify; text-indent: 0; }
.tpl-academic blockquote p:last-child { margin: 0; font-style: normal; text-align: right; font-size: 0.92em; }

.tpl-academic ul, .tpl-academic ol { padding-left: 1.6em; margin: 0 0 1em; }
.tpl-academic li { margin: 0.3em 0; text-align: justify; }
.tpl-academic li::marker { color: var(--fg); }
.tpl-academic ul ul, .tpl-academic ol ol, .tpl-academic ul ol, .tpl-academic ol ul { margin: 0.3em 0; }

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

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

.tpl-academic .tok-com  { color: #8a8a8a; font-style: italic; }
.tpl-academic .tok-kw   { color: #9b2226; }
.tpl-academic .tok-fn   { color: #1e40af; }
.tpl-academic .tok-str  { color: #15693a; }
.tpl-academic .tok-num  { color: #8a5a00; }
.tpl-academic .tok-type { color: #6b21a8; }
.tpl-academic .tok-op, .tpl-academic .tok-punc { color: var(--muted); }
.tpl-academic .tok-var  { color: var(--code-fg); }
.tpl-academic[data-theme="dark"] .tok-com  { color: #7a7a7a; }
.tpl-academic[data-theme="dark"] .tok-kw   { color: #e08a8d; }
.tpl-academic[data-theme="dark"] .tok-fn   { color: #7da2f0; }
.tpl-academic[data-theme="dark"] .tok-str  { color: #7fc99a; }
.tpl-academic[data-theme="dark"] .tok-num  { color: #d8aa5e; }
.tpl-academic[data-theme="dark"] .tok-type { color: #c79bf0; }

.tpl-academic table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.9em; }
.tpl-academic table caption { caption-side: top; font-size: 0.85em; color: var(--muted); margin-bottom: 0.5em; font-style: italic; }
.tpl-academic thead th { text-align: left; font-weight: 600; padding: 0.4em 0.7em; border-top: 1.5px solid var(--fg); border-bottom: 1px solid var(--fg); }
.tpl-academic tbody td { padding: 0.4em 0.7em; }
.tpl-academic tbody tr:last-child td { border-bottom: 1.5px solid var(--fg); }

.tpl-academic .callout { margin: 1.4em 0; padding: 0.8em 1.1em; border: 1px solid var(--rule); border-radius: 3px; background: var(--faint); }
.tpl-academic .callout p { margin: 0 0 0.4em; text-align: justify; text-indent: 0; }
.tpl-academic .callout p:last-child { margin: 0; }
.tpl-academic .callout-title { font-weight: 700; font-size: 0.85em; font-variant: small-caps; letter-spacing: 0.04em; }
.tpl-academic .callout-note    { border-left: 3px solid #1e40af; }
.tpl-academic .callout-note .callout-title { color: #1e40af; }
.tpl-academic .callout-tip     { border-left: 3px solid #15693a; }
.tpl-academic .callout-tip .callout-title { color: #15693a; }
.tpl-academic .callout-warning { border-left: 3px solid #9b2226; }
.tpl-academic .callout-warning .callout-title { color: #9b2226; }

.tpl-academic hr { border: none; border-top: 1px solid var(--rule); margin: 2.2em auto; width: 30%; }

.tpl-academic figure { margin: 1.8em 0; text-align: center; }
.tpl-academic img { max-width: 100%; }
.tpl-academic .img-placeholder { display: flex; align-items: center; justify-content: center; height: 200px; border: 1px solid var(--rule); background: var(--faint); color: var(--muted); }
.tpl-academic figcaption { font-size: 0.82em; color: var(--muted); margin-top: 0.6em; line-height: 1.5; text-align: center; text-wrap: pretty; }

/* 公式:容器右侧自动编号 (eq.) */
.tpl-academic { counter-reset: h2 eqn; }
.tpl-academic math { font-size: 1.05em; }
.tpl-academic .math-block {
  position: relative; margin: 1.6em 0; text-align: center; overflow-x: auto;
  font-size: 1.15em; counter-increment: eqn; padding: 0 2.5em;
}
.tpl-academic .math-block::after {
  content: "(" counter(eqn) ")"; position: absolute; right: 0.4em; top: 50%;
  transform: translateY(-50%); font-size: 0.8em; color: var(--muted); font-family: var(--md-serif);
}

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


/* ===== midnight ===== */
/* ============================================================
   模版 7 · 暗夜终端  Midnight Terminal
   全等宽 JetBrains Mono · 中 Noto Sans SC · 霓虹绿/青
   模数比例 1.2 · 基准 15px · 行高 1.7
   亮色 = 纸上终端;暗色 = 霓虹午夜终端(发光标题)
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-midnight {
  --md-base: 15px;
  --md-ratio: 1.2;
  --md-lh: 1.7;
  --md-measure: 76ch;
  --md-h1: 31.1px;
  --md-h2: 21.6px;
  --md-h3: 18px;
  --md-h4: 15px;
  --md-h5: 13px;
  --md-h6: 12.5px;

  --md-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --md-cjk: "Noto Sans SC", sans-serif;

  --bg: #f4f6f2;
  --fg: #243029;
  --muted: #6a786e;
  --faint: #e7ebe3;
  --accent: #0f7d3d;
  --accent2: #0a6e8c;
  --accent-soft: #e0eee2;
  --rule: #d4dacd;
  --code-bg: #eceee6;
  --code-fg: #3a463d;
  --glow: none;

  font-family: var(--md-mono), var(--md-cjk);
  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: 3.5rem 2.2rem 6rem;
}

.tpl-midnight[data-theme="dark"] {
  --bg: #0a0f0c;
  --fg: #b6c8bc;
  --muted: #5e7468;
  --faint: #111813;
  --accent: #39d98a;
  --accent2: #38c7e0;
  --accent-soft: #0f2118;
  --rule: #1c2a20;
  --code-bg: #0f1612;
  --code-fg: #9fc0ac;
  --glow: 0 0 14px rgba(57,217,138,.45);
}

.tpl-midnight > * { margin: 0 0 1.05em; }
.tpl-midnight > *:first-child { margin-top: 0; }

.tpl-midnight h1, .tpl-midnight h2, .tpl-midnight h3,
.tpl-midnight h4, .tpl-midnight h5, .tpl-midnight h6 {
  font-family: var(--md-mono), var(--md-cjk); font-weight: 700;
  line-height: 1.3; letter-spacing: -0.01em; color: var(--fg);
}
.tpl-midnight h1 { font-size: var(--md-h1); font-weight: 800; margin: 0 0 0.6em; color: var(--accent); text-shadow: var(--glow); }
.tpl-midnight h1::before { content: "# "; opacity: 0.5; }
.tpl-midnight h2 { font-size: var(--md-h2); margin: 2.2em 0 0.7em; padding-left: 0.7em; border-left: 3px solid var(--accent); }
.tpl-midnight h3 { font-size: var(--md-h3); margin: 1.7em 0 0.5em; color: var(--accent2); }
.tpl-midnight h3::before { content: "› "; }
.tpl-midnight h4 { font-size: var(--md-h4); margin: 1.4em 0 0.3em; }
.tpl-midnight h5 { font-size: var(--md-h5); margin: 1.3em 0 0.3em; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.tpl-midnight h6 { font-size: var(--md-h6); margin: 1.3em 0 0.3em; color: var(--muted); }

.tpl-midnight p { margin: 0 0 1.05em; }
.tpl-midnight .lead { color: var(--muted); font-size: 1.05em; }
.tpl-midnight .lead::before { content: "// "; color: var(--accent); }

.tpl-midnight strong { font-weight: 700; color: var(--accent); }
.tpl-midnight em { font-style: italic; color: var(--accent2); }
.tpl-midnight s, .tpl-midnight del { color: var(--muted); }
.tpl-midnight a { color: var(--accent2); text-decoration: none; border-bottom: 1px dashed var(--accent2); }
.tpl-midnight a:hover { background: var(--accent-soft); text-shadow: var(--glow); }
.tpl-midnight code { font-family: var(--md-mono); font-size: 0.9em; background: var(--code-bg); color: var(--accent); padding: 0.1em 0.4em; border-radius: 3px; border: 1px solid var(--rule); }

.tpl-midnight blockquote { margin: 1.4em 0; padding: 0.6em 1em; border-left: 3px solid var(--accent2); background: var(--faint); color: var(--muted); }
.tpl-midnight blockquote p { margin: 0 0 0.4em; }
.tpl-midnight blockquote p::before { content: "│ "; color: var(--accent2); }
.tpl-midnight blockquote p:last-child { margin: 0; color: var(--accent2); }

.tpl-midnight ul, .tpl-midnight ol { padding-left: 1.6em; margin: 0 0 1.05em; }
.tpl-midnight li { margin: 0.3em 0; }
.tpl-midnight ul { list-style: none; padding-left: 1.4em; }
.tpl-midnight ul > li { position: relative; }
.tpl-midnight ul > li::before { content: "▸"; position: absolute; left: -1.3em; color: var(--accent); }
.tpl-midnight ol li::marker { color: var(--accent); }
.tpl-midnight ul ul, .tpl-midnight ol ol, .tpl-midnight ul ol, .tpl-midnight ol ul { margin: 0.3em 0; }

.tpl-midnight .contains-task-list { list-style: none; padding-left: 0; }
.tpl-midnight .contains-task-list > li::before { content: none; }
.tpl-midnight .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-midnight .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.12em; background: var(--bg); }
.tpl-midnight .task-list-item input:checked { background: var(--accent); box-shadow: var(--glow); }
.tpl-midnight .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-midnight li:has(input:checked) { color: var(--muted); }

.tpl-midnight pre { font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg); padding: 1em 1.2em; border-radius: 6px; border: 1px solid var(--rule); overflow-x: auto; line-height: 1.6; font-size: 0.88em; }
.tpl-midnight[data-theme="dark"] pre { box-shadow: inset 0 0 0 1px rgba(57,217,138,.08); }
.tpl-midnight pre code { background: none; padding: 0; border: none; color: inherit; font-size: 1em; }

.tpl-midnight .tok-com  { color: #7e9488; font-style: italic; }
.tpl-midnight .tok-kw   { color: #0f7d3d; }
.tpl-midnight .tok-fn   { color: #0a6e8c; }
.tpl-midnight .tok-str  { color: #b06a00; }
.tpl-midnight .tok-num  { color: #9a4ec2; }
.tpl-midnight .tok-type { color: #b03a6e; }
.tpl-midnight .tok-op, .tpl-midnight .tok-punc { color: var(--muted); }
.tpl-midnight .tok-var  { color: var(--code-fg); }
.tpl-midnight[data-theme="dark"] .tok-com  { color: #4f6457; }
.tpl-midnight[data-theme="dark"] .tok-kw   { color: #39d98a; }
.tpl-midnight[data-theme="dark"] .tok-fn   { color: #38c7e0; }
.tpl-midnight[data-theme="dark"] .tok-str  { color: #e3b341; }
.tpl-midnight[data-theme="dark"] .tok-num  { color: #c792ea; }
.tpl-midnight[data-theme="dark"] .tok-type { color: #ff7eb6; }

.tpl-midnight table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.88em; font-variant-numeric: tabular-nums; }
.tpl-midnight thead th { text-align: left; font-weight: 700; padding: 0.45em 0.8em; border: 1px solid var(--rule); color: var(--accent); background: var(--faint); }
.tpl-midnight tbody td { padding: 0.45em 0.8em; border: 1px solid var(--rule); }
.tpl-midnight tbody tr:nth-child(even) { background: var(--faint); }

.tpl-midnight .callout { margin: 1.4em 0; padding: 0.8em 1em; border-radius: 4px; border: 1px solid var(--rule); border-left-width: 3px; background: var(--faint); }
.tpl-midnight .callout p { margin: 0 0 0.4em; }
.tpl-midnight .callout p:last-child { margin: 0; }
.tpl-midnight .callout-title { font-weight: 700; font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.08em; }
.tpl-midnight .callout-note    { border-left-color: var(--accent2); }
.tpl-midnight .callout-note .callout-title::before { content: "[ i ] "; }
.tpl-midnight .callout-note .callout-title { color: var(--accent2); }
.tpl-midnight .callout-tip     { border-left-color: var(--accent); }
.tpl-midnight .callout-tip .callout-title::before { content: "[ + ] "; }
.tpl-midnight .callout-tip .callout-title { color: var(--accent); }
.tpl-midnight .callout-warning { border-left-color: #c98a00; }
.tpl-midnight .callout-warning .callout-title::before { content: "[ ! ] "; }
.tpl-midnight .callout-warning .callout-title { color: #c98a00; }
.tpl-midnight[data-theme="dark"] .callout-warning .callout-title { color: #e3b341; }

.tpl-midnight hr { border: none; margin: 2.4em 0; color: var(--muted); text-align: center; }
.tpl-midnight hr::before { content: "· · · · · · · · · · · · · · · ·"; letter-spacing: 0.2em; color: var(--accent); opacity: 0.6; }

.tpl-midnight figure { margin: 1.8em 0; }
.tpl-midnight img { max-width: 100%; border-radius: 4px; border: 1px solid var(--rule); }
.tpl-midnight .img-placeholder { display: flex; align-items: center; justify-content: center; height: 200px; border: 1px dashed var(--rule); border-radius: 4px; background: var(--faint); color: var(--accent); }
.tpl-midnight figcaption { font-size: 0.8em; color: var(--muted); margin-top: 0.6em; line-height: 1.5; }
.tpl-midnight figcaption::before { content: "// "; color: var(--accent); }

.tpl-midnight math { font-size: 1.02em; }
.tpl-midnight .math-block { margin: 1.6em 0; padding: 1em; text-align: center; overflow-x: auto; font-size: 1.12em; background: var(--faint); border: 1px solid var(--rule); border-radius: 6px; }

.tpl-midnight .footnote-ref a { font-size: 0.78em; vertical-align: super; border: none; color: var(--accent); }
.tpl-midnight .footnotes { margin-top: 3em; padding-top: 1em; border-top: 1px dashed var(--rule); font-size: 0.85em; color: var(--muted); }
.tpl-midnight .footnotes ol { padding-left: 1.4em; }
.tpl-midnight .footnotes li::marker { color: var(--accent); }
.tpl-midnight .footnote-backref { border: none; }


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

.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; }


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

.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; }


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

.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; }


/* ===== golden-serif ===== */
/* ============================================================
   模版 11 · 金衡  Golden Serif
   标题 Cormorant Garamond · 正文 EB Garamond · 中 Noto Serif SC
   —— 黄金分割 φ = 1.618 驱动 ——
   · 字号阶梯比 √φ ≈ 1.272(每两级正好 ×φ:body→H2 = ×φ,body→H1 = ×φ²)
   · 行高 = 1.618(φ)
   · 版心 / 段距 / 引用缩进按 φ 比例
   基准 21px · 象牙纸 · 古铜金
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-golden-serif {
  --phi: 1.618;
  --md-base: 21px;
  --md-ratio: 1.272;            /* √φ */
  --md-lh: 1.618;               /* φ */
  --md-measure: 64ch;
  --md-h1: 55px;                /* base × φ²  */
  --md-h2: 34px;                /* base × φ   */
  --md-h3: 26.7px;              /* base × √φ  */
  --md-h4: 21px;                /* base       */
  --md-h5: 16.5px;              /* base ÷ √φ  */
  --md-h6: 13px;                /* base ÷ φ   */

  --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: #fbf8f1;
  --fg: #2c2722;
  --muted: #756b5d;
  --faint: #f1ebde;
  --accent: #9a7536;
  --accent-soft: #f0e7d4;
  --rule: #e0d6c2;
  --code-bg: #f2ecdf;
  --code-fg: #5a5040;

  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;
  max-width: var(--md-measure);
  margin: 0 auto;
  /* 上下留白 = 左右留白 × φ */
  padding: 5.24rem 3.24rem 7rem;
}

.tpl-golden-serif[data-theme="dark"] {
  --bg: #1b1813;
  --fg: #e9e1d2;
  --muted: #a4977f;
  --faint: #262017;
  --accent: #cda968;
  --accent-soft: #2e2517;
  --rule: #38301f;
  --code-bg: #241e15;
  --code-fg: #cdbfa6;
}

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

.tpl-golden-serif h1, .tpl-golden-serif h2, .tpl-golden-serif h3, .tpl-golden-serif h4 {
  font-family: var(--md-display); color: var(--fg);
  line-height: 1.1; font-weight: 600; text-wrap: balance; letter-spacing: 0.005em;
}
.tpl-golden-serif h1 { font-size: var(--md-h1); font-weight: 500; margin: 0 0 0.382em; line-height: 1.02; }
.tpl-golden-serif h2 { font-size: var(--md-h2); margin: 1.618em 0 0.618em; font-weight: 600; }
.tpl-golden-serif h3 { font-size: var(--md-h3); margin: 1.272em 0 0.5em; font-weight: 600; }
.tpl-golden-serif h4 { font-size: var(--md-h4); margin: 1em 0 0.382em; font-weight: 700; font-style: italic; }
.tpl-golden-serif h5 { font-family: var(--md-body); font-size: var(--md-h5); margin: 1em 0 0.382em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.tpl-golden-serif h6 { font-family: var(--md-body); font-size: var(--md-h6); margin: 1em 0 0.382em; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.tpl-golden-serif p { margin: 0 0 1em; }
.tpl-golden-serif .lead {
  font-family: var(--md-display); font-size: 1.618em; line-height: 1.3;
  font-weight: 400; font-style: italic; color: var(--muted); margin-bottom: 0.9em;
}
.tpl-golden-serif .lead + p::first-letter {
  font-family: var(--md-display); font-weight: 600; color: var(--accent);
  font-size: 3.236em; line-height: 0.84; float: left; padding: 0.08em 0.14em 0 0;
}

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

.tpl-golden-serif blockquote {
  margin: 1.618em 0; padding-left: 1.618em; border-left: 2px solid var(--accent);
  font-style: italic; color: var(--muted); font-size: 1.1em;
}
.tpl-golden-serif blockquote p { margin: 0 0 0.5em; }
.tpl-golden-serif blockquote p:last-child { margin: 0; font-style: normal; font-size: 0.78em; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.tpl-golden-serif ul, .tpl-golden-serif ol { padding-left: 1.618em; margin: 0 0 1em; }
.tpl-golden-serif li { margin: 0.382em 0; }
.tpl-golden-serif li::marker { color: var(--accent); }
.tpl-golden-serif ul { list-style: none; padding-left: 1.618em; }
.tpl-golden-serif ul > li { position: relative; }
.tpl-golden-serif ul > li::before { content: "—"; position: absolute; left: -1.3em; color: var(--accent); }
.tpl-golden-serif ul ul, .tpl-golden-serif ol ol, .tpl-golden-serif ul ol, .tpl-golden-serif ol ul { margin: 0.382em 0; }

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

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

.tpl-golden-serif .tok-com  { color: #a3936f; font-style: italic; }
.tpl-golden-serif .tok-kw   { color: #9a5b2c; }
.tpl-golden-serif .tok-fn   { color: #3a5e8c; }
.tpl-golden-serif .tok-str  { color: #5a7c46; }
.tpl-golden-serif .tok-num  { color: #9a7536; }
.tpl-golden-serif .tok-type { color: #7a4a82; }
.tpl-golden-serif .tok-op, .tpl-golden-serif .tok-punc { color: var(--muted); }
.tpl-golden-serif .tok-var  { color: var(--code-fg); }
.tpl-golden-serif[data-theme="dark"] .tok-com  { color: #8a7c5e; }
.tpl-golden-serif[data-theme="dark"] .tok-kw   { color: #d99a6a; }
.tpl-golden-serif[data-theme="dark"] .tok-fn   { color: #8aaad4; }
.tpl-golden-serif[data-theme="dark"] .tok-str  { color: #a6c486; }
.tpl-golden-serif[data-theme="dark"] .tok-num  { color: #cda968; }
.tpl-golden-serif[data-theme="dark"] .tok-type { color: #c39bcc; }

.tpl-golden-serif table { width: 100%; border-collapse: collapse; margin: 1.618em 0; font-size: 0.85em; }
.tpl-golden-serif thead th { text-align: left; font-family: var(--md-display); font-weight: 600; font-size: 1.1em; padding: 0.4em 0.8em; border-bottom: 1.5px solid var(--accent); }
.tpl-golden-serif tbody td { padding: 0.5em 0.8em; border-bottom: 1px solid var(--rule); }
.tpl-golden-serif tbody tr:last-child td { border-bottom: none; }

.tpl-golden-serif .callout { margin: 1.618em 0; padding: 1em 1.272em; border-radius: 4px; background: var(--faint); border-left: 2px solid var(--accent); }
.tpl-golden-serif .callout p { margin: 0 0 0.4em; }
.tpl-golden-serif .callout p:last-child { margin: 0; }
.tpl-golden-serif .callout-title { font-family: var(--md-display); font-weight: 600; font-size: 1.05em; }
.tpl-golden-serif .callout-note    { border-left-color: #4a6c95; }
.tpl-golden-serif .callout-note .callout-title { color: #4a6c95; }
.tpl-golden-serif .callout-tip     { border-left-color: #4f8050; }
.tpl-golden-serif .callout-tip .callout-title { color: #4f8050; }
.tpl-golden-serif .callout-warning { border-left-color: #a8702a; }
.tpl-golden-serif .callout-warning .callout-title { color: #a8702a; }

.tpl-golden-serif hr { border: none; height: 1.618em; margin: 1.618em 0; text-align: center; }
.tpl-golden-serif hr::before { content: "❧"; color: var(--accent); font-size: 1.3em; }

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

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

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


/* ===== golden-sans ===== */
/* ============================================================
   模版 12 · 金律  Golden Sans
   Epilogue · 中 Noto Sans SC · 代码 JetBrains Mono
   —— 黄金分割 φ = 1.618 驱动 ——
   · 字号阶梯比 √φ ≈ 1.272 · 行高 1.618 · 段距/留白按 φ
   基准 18px · 冷静中性 + 金色点缀 · 现代优雅
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-golden-sans {
  --phi: 1.618;
  --md-base: 18px;
  --md-ratio: 1.272;
  --md-lh: 1.618;
  --md-measure: 68ch;
  --md-h1: 47.1px;   /* base × φ² */
  --md-h2: 29.1px;   /* base × φ  */
  --md-h3: 22.9px;   /* base × √φ */
  --md-h4: 18px;     /* base      */
  --md-h5: 14.2px;   /* base ÷ √φ */
  --md-h6: 12px;     /* ~base ÷ φ */

  --md-sans: "Epilogue", "Noto Sans SC", system-ui, sans-serif;
  --md-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --bg: #fcfcfb;
  --fg: #21202a;
  --muted: #76747f;
  --faint: #f3f2f0;
  --accent: #a87d2e;
  --accent-soft: #f6efdf;
  --rule: #e6e4e0;
  --code-bg: #f5f4f2;
  --code-fg: #45434d;

  font-family: var(--md-sans);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  letter-spacing: -0.004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 5.24rem 3.24rem 7rem;   /* 上下 = 左右 × φ */
}

.tpl-golden-sans[data-theme="dark"] {
  --bg: #131318;
  --fg: #e7e6ec;
  --muted: #908e9a;
  --faint: #1d1d23;
  --accent: #d8b56a;
  --accent-soft: #2a2415;
  --rule: #2a2a31;
  --code-bg: #1b1b21;
  --code-fg: #c7c6cf;
}

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

.tpl-golden-sans h1, .tpl-golden-sans h2, .tpl-golden-sans h3,
.tpl-golden-sans h4, .tpl-golden-sans h5, .tpl-golden-sans h6 {
  font-family: var(--md-sans); color: var(--fg); line-height: 1.18;
  font-weight: 700; letter-spacing: -0.02em; text-wrap: balance;
}
.tpl-golden-sans h1 { font-size: var(--md-h1); font-weight: 800; margin: 0 0 0.618em; letter-spacing: -0.035em; line-height: 1.05; }
.tpl-golden-sans h1::after { content: ""; display: block; width: 2.618em; height: 3px; background: var(--accent); margin-top: 0.4em; border-radius: 2px; }
.tpl-golden-sans h2 { font-size: var(--md-h2); margin: 1.618em 0 0.5em; }
.tpl-golden-sans h3 { font-size: var(--md-h3); margin: 1.272em 0 0.4em; }
.tpl-golden-sans h4 { font-size: var(--md-h4); margin: 1em 0 0.382em; }
.tpl-golden-sans h5 { font-size: var(--md-h5); margin: 1em 0 0.382em; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.tpl-golden-sans h6 { font-size: var(--md-h6); margin: 1em 0 0.382em; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }

.tpl-golden-sans p { margin: 0 0 1em; }
.tpl-golden-sans .lead { font-size: 1.272em; line-height: 1.45; color: var(--muted); font-weight: 400; letter-spacing: -0.01em; }

.tpl-golden-sans strong { font-weight: 700; color: var(--fg); }
.tpl-golden-sans em { font-style: italic; }
.tpl-golden-sans s, .tpl-golden-sans del { color: var(--muted); }
.tpl-golden-sans a {
  color: var(--accent); text-decoration: none; font-weight: 600;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .2s;
}
.tpl-golden-sans a:hover { background-size: 100% 2px; }
.tpl-golden-sans code { font-family: var(--md-mono); font-size: 0.82em; background: var(--code-bg); color: var(--code-fg); padding: 0.14em 0.42em; border-radius: 5px; border: 1px solid var(--rule); }

.tpl-golden-sans blockquote {
  margin: 1.618em 0; padding: 0.2em 0 0.2em 1.618em; border-left: 2px solid var(--accent);
  color: var(--muted); font-size: 1.05em;
}
.tpl-golden-sans blockquote p { margin: 0 0 0.5em; }
.tpl-golden-sans blockquote p:last-child { margin: 0; font-size: 0.82em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

.tpl-golden-sans ul, .tpl-golden-sans ol { padding-left: 1.4em; margin: 0 0 1em; }
.tpl-golden-sans li { margin: 0.382em 0; }
.tpl-golden-sans li::marker { color: var(--accent); }
.tpl-golden-sans ul ul, .tpl-golden-sans ol ol, .tpl-golden-sans ul ol, .tpl-golden-sans ol ul { margin: 0.382em 0; }

.tpl-golden-sans .contains-task-list { list-style: none; padding-left: 0; }
.tpl-golden-sans .task-list-item { display: flex; align-items: baseline; gap: 0.618em; }
.tpl-golden-sans .task-list-item input { appearance: none; -webkit-appearance: none; width: 1.1em; height: 1.1em; margin: 0; flex: none; border: 1.5px solid var(--rule); border-radius: 5px; position: relative; top: 0.16em; background: var(--bg); }
.tpl-golden-sans .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-golden-sans .task-list-item input:checked::after { content: ""; position: absolute; left: 0.34em; top: 0.12em; width: 0.26em; height: 0.55em; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.tpl-golden-sans li:has(input:checked) { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule); }

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

.tpl-golden-sans .tok-com  { color: #9b99a2; font-style: italic; }
.tpl-golden-sans .tok-kw   { color: #a8662e; }
.tpl-golden-sans .tok-fn   { color: #3a5fa8; }
.tpl-golden-sans .tok-str  { color: #3f8052; }
.tpl-golden-sans .tok-num  { color: #a87d2e; }
.tpl-golden-sans .tok-type { color: #7a4fa0; }
.tpl-golden-sans .tok-op, .tpl-golden-sans .tok-punc { color: var(--muted); }
.tpl-golden-sans .tok-var  { color: var(--code-fg); }
.tpl-golden-sans[data-theme="dark"] .tok-com  { color: #6f6d78; }
.tpl-golden-sans[data-theme="dark"] .tok-kw   { color: #e0a060; }
.tpl-golden-sans[data-theme="dark"] .tok-fn   { color: #8aa6e0; }
.tpl-golden-sans[data-theme="dark"] .tok-str  { color: #84c89a; }
.tpl-golden-sans[data-theme="dark"] .tok-num  { color: #d8b56a; }
.tpl-golden-sans[data-theme="dark"] .tok-type { color: #c0a0e0; }

.tpl-golden-sans table { width: 100%; border-collapse: collapse; margin: 1.618em 0; font-size: 0.92em; }
.tpl-golden-sans thead th { text-align: left; font-weight: 700; padding: 0.55em 0.9em; color: var(--muted); border-bottom: 1px solid var(--rule); font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.05em; }
.tpl-golden-sans tbody td { padding: 0.55em 0.9em; border-bottom: 1px solid var(--rule); }
.tpl-golden-sans tbody tr:last-child td { border-bottom: none; }

.tpl-golden-sans .callout { margin: 1.618em 0; padding: 1em 1.272em; border-radius: 10px; background: var(--faint); }
.tpl-golden-sans .callout p { margin: 0 0 0.4em; }
.tpl-golden-sans .callout p:last-child { margin: 0; }
.tpl-golden-sans .callout-title { font-weight: 700; font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.45em !important; }
.tpl-golden-sans .callout-note    { background: color-mix(in srgb, #3b6ea5 9%, var(--bg)); }
.tpl-golden-sans .callout-note .callout-title { color: #3b6ea5; }
.tpl-golden-sans .callout-tip     { background: color-mix(in srgb, #3f8f5b 9%, var(--bg)); }
.tpl-golden-sans .callout-tip .callout-title { color: #3f8f5b; }
.tpl-golden-sans .callout-warning { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.tpl-golden-sans .callout-warning .callout-title { color: var(--accent); }

.tpl-golden-sans hr { border: none; height: 1px; background: var(--rule); margin: 2.618em 0; position: relative; }
.tpl-golden-sans hr::before { content: "◆"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--bg); padding: 0 0.7em; color: var(--accent); font-size: 0.7em; }

.tpl-golden-sans figure { margin: 1.618em 0; }
.tpl-golden-sans img { max-width: 100%; border-radius: 10px; }
.tpl-golden-sans .img-placeholder { display: flex; align-items: center; justify-content: center; height: 230px; border-radius: 10px; background: var(--faint); color: var(--accent); }
.tpl-golden-sans figcaption { font-size: 0.82em; color: var(--muted); margin-top: 0.618em; line-height: 1.45; text-wrap: pretty; }

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

.tpl-golden-sans .footnote-ref a { font-size: 0.72em; vertical-align: super; background: none; font-weight: 700; color: var(--accent); }
.tpl-golden-sans .footnotes { margin-top: 2.618em; padding-top: 1.272em; border-top: 1px solid var(--rule); font-size: 0.85em; color: var(--muted); }
.tpl-golden-sans .footnotes ol { padding-left: 1.3em; }
.tpl-golden-sans .footnotes li { margin: 0.382em 0; }
.tpl-golden-sans .footnote-backref { background: none; }


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

.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; }


/* ===== cupertino ===== */
/* ============================================================
   模版 14 · Cupertino · SF
   Apple 系统字体:SF Pro( -apple-system )· 中 PingFang SC · SF Mono
   采用 Apple HIG 真实字号阶梯(34/28/22/20/17)· 行高 1.5
   说明:在 Mac / iPhone 上原生渲染 SF Pro;其它设备回退 system-ui
   ============================================================ */
.tpl-cupertino {
  --md-base: 17px;
  --md-ratio: 1.18;
  --md-lh: 1.5;
  --md-measure: 70ch;
  --md-h1: 34px;   /* Large Title */
  --md-h2: 28px;   /* Title 1 */
  --md-h3: 22px;   /* Title 2 */
  --md-h4: 20px;   /* Title 3 */
  --md-h5: 15px;   /* Subhead */
  --md-h6: 13px;   /* Footnote */

  --md-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", system-ui, sans-serif;
  --md-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;

  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --faint: #f5f5f7;
  --accent: #0071e3;
  --accent-soft: #e8f1fd;
  --rule: #d2d2d7;
  --code-bg: #f5f5f7;
  --code-fg: #3a3a3c;

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

.tpl-cupertino[data-theme="dark"] {
  --bg: #000000;
  --fg: #f5f5f7;
  --muted: #98989d;
  --faint: #1c1c1e;
  --accent: #0a84ff;
  --accent-soft: #16263b;
  --rule: #38383a;
  --code-bg: #1c1c1e;
  --code-fg: #d1d1d6;
}

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

.tpl-cupertino h1, .tpl-cupertino h2, .tpl-cupertino h3,
.tpl-cupertino h4, .tpl-cupertino h5, .tpl-cupertino h6 {
  font-family: var(--md-sans); color: var(--fg); line-height: 1.2;
  font-weight: 700; letter-spacing: -0.022em; text-wrap: balance;
}
.tpl-cupertino h1 { font-size: var(--md-h1); font-weight: 700; margin: 0 0 0.5em; letter-spacing: -0.03em; }
.tpl-cupertino h2 { font-size: var(--md-h2); margin: 1.8em 0 0.5em; }
.tpl-cupertino h3 { font-size: var(--md-h3); margin: 1.5em 0 0.4em; }
.tpl-cupertino h4 { font-size: var(--md-h4); margin: 1.3em 0 0.3em; }
.tpl-cupertino h5 { font-size: var(--md-h5); margin: 1.2em 0 0.3em; font-weight: 600; color: var(--muted); }
.tpl-cupertino h6 { font-size: var(--md-h6); margin: 1.2em 0 0.3em; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.tpl-cupertino p { margin: 0 0 1em; }
.tpl-cupertino .lead { font-size: 1.29em; line-height: 1.4; color: var(--muted); font-weight: 400; letter-spacing: -0.015em; }

.tpl-cupertino strong { font-weight: 600; color: var(--fg); }
.tpl-cupertino em { font-style: italic; }
.tpl-cupertino s, .tpl-cupertino del { color: var(--muted); }
.tpl-cupertino a { color: var(--accent); text-decoration: none; }
.tpl-cupertino a:hover { text-decoration: underline; text-underline-offset: 2px; }
.tpl-cupertino code { font-family: var(--md-mono); font-size: 0.86em; background: var(--code-bg); color: var(--code-fg); padding: 0.15em 0.4em; border-radius: 6px; }

.tpl-cupertino blockquote {
  margin: 1.5em 0; padding: 0.1em 0 0.1em 1.2em; border-left: 3px solid var(--accent);
  color: var(--muted);
}
.tpl-cupertino blockquote p { margin: 0 0 0.5em; }
.tpl-cupertino blockquote p:last-child { margin: 0; font-size: 0.92em; }

.tpl-cupertino ul, .tpl-cupertino ol { padding-left: 1.4em; margin: 0 0 1em; }
.tpl-cupertino li { margin: 0.35em 0; }
.tpl-cupertino li::marker { color: var(--accent); }
.tpl-cupertino ul ul, .tpl-cupertino ol ol, .tpl-cupertino ul ol, .tpl-cupertino ol ul { margin: 0.35em 0; }

.tpl-cupertino .contains-task-list { list-style: none; padding-left: 0; }
.tpl-cupertino .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-cupertino .task-list-item input { appearance: none; -webkit-appearance: none; width: 1.15em; height: 1.15em; margin: 0; flex: none; border: 1.5px solid var(--rule); border-radius: 50%; position: relative; top: 0.18em; background: var(--bg); transition: .12s; }
.tpl-cupertino .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-cupertino .task-list-item input:checked::after { content: ""; position: absolute; left: 0.37em; top: 0.16em; width: 0.26em; height: 0.5em; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.tpl-cupertino li:has(input:checked) { color: var(--muted); }

.tpl-cupertino pre { font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg); padding: 1.1em 1.3em; border-radius: 12px; overflow-x: auto; line-height: 1.55; font-size: 0.84em; }
.tpl-cupertino pre code { background: none; padding: 0; font-size: 1em; color: inherit; }

.tpl-cupertino .tok-com  { color: #8e8e93; font-style: italic; }
.tpl-cupertino .tok-kw   { color: #ad3da4; }
.tpl-cupertino .tok-fn   { color: #0066cc; }
.tpl-cupertino .tok-str  { color: #c41a16; }
.tpl-cupertino .tok-num  { color: #1c00cf; }
.tpl-cupertino .tok-type { color: #3900a0; }
.tpl-cupertino .tok-op, .tpl-cupertino .tok-punc { color: var(--muted); }
.tpl-cupertino .tok-var  { color: var(--code-fg); }
.tpl-cupertino[data-theme="dark"] .tok-com  { color: #7f8c98; }
.tpl-cupertino[data-theme="dark"] .tok-kw   { color: #ff7ab2; }
.tpl-cupertino[data-theme="dark"] .tok-fn   { color: #6bdfff; }
.tpl-cupertino[data-theme="dark"] .tok-str  { color: #ff8170; }
.tpl-cupertino[data-theme="dark"] .tok-num  { color: #d9c97c; }
.tpl-cupertino[data-theme="dark"] .tok-type { color: #dabaff; }

.tpl-cupertino table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.94em; }
.tpl-cupertino thead th { text-align: left; font-weight: 600; padding: 0.55em 0.9em; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 0.9em; }
.tpl-cupertino tbody td { padding: 0.55em 0.9em; border-bottom: 1px solid var(--rule); }
.tpl-cupertino tbody tr:last-child td { border-bottom: none; }

.tpl-cupertino .callout { margin: 1.5em 0; padding: 1em 1.2em; border-radius: 14px; background: var(--faint); }
.tpl-cupertino .callout p { margin: 0 0 0.4em; }
.tpl-cupertino .callout p:last-child { margin: 0; }
.tpl-cupertino .callout-title { font-weight: 600; font-size: 0.88em; margin-bottom: 0.4em !important; }
.tpl-cupertino .callout-note    { background: color-mix(in srgb, #0071e3 9%, var(--bg)); }
.tpl-cupertino .callout-note .callout-title { color: #0071e3; }
.tpl-cupertino .callout-tip     { background: color-mix(in srgb, #34c759 13%, var(--bg)); }
.tpl-cupertino .callout-tip .callout-title { color: #248a3d; }
.tpl-cupertino .callout-warning { background: color-mix(in srgb, #ff9500 15%, var(--bg)); }
.tpl-cupertino .callout-warning .callout-title { color: #c93400; }
.tpl-cupertino[data-theme="dark"] .callout-tip .callout-title { color: #30d158; }
.tpl-cupertino[data-theme="dark"] .callout-warning .callout-title { color: #ff9f0a; }

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

.tpl-cupertino figure { margin: 1.8em 0; }
.tpl-cupertino img { max-width: 100%; border-radius: 14px; }
.tpl-cupertino .img-placeholder { display: flex; align-items: center; justify-content: center; height: 220px; border-radius: 14px; background: var(--faint); color: var(--muted); }
.tpl-cupertino figcaption { font-size: 0.84em; color: var(--muted); margin-top: 0.7em; line-height: 1.45; text-align: center; text-wrap: pretty; }

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

.tpl-cupertino .footnote-ref a { font-size: 0.72em; vertical-align: super; font-weight: 600; }
.tpl-cupertino .footnotes { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 0.86em; color: var(--muted); }
.tpl-cupertino .footnotes ol { padding-left: 1.3em; }
.tpl-cupertino .footnotes li { margin: 0.4em 0; }


/* ===== newyork ===== */
/* ============================================================
   模版 15 · 纽约 New York
   Apple 衬线 New York( ui-serif )· 中 Songti SC · SF Mono
   编辑阅读感 · 基准 20px · 比例 1.25 · 行高 1.66
   说明:Apple 设备原生渲染 New York 衬线;其它设备回退 Georgia
   ============================================================ */
.tpl-newyork {
  --md-base: 20px;
  --md-ratio: 1.25;
  --md-lh: 1.66;
  --md-measure: 65ch;
  --md-h1: 44px;
  --md-h2: 31px;
  --md-h3: 25px;
  --md-h4: 20px;
  --md-h5: 16px;
  --md-h6: 14px;

  --md-serif: ui-serif, "New York", "Songti SC", "Noto Serif SC", Georgia, serif;
  --md-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", system-ui, sans-serif;
  --md-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;

  --bg: #fcfbf9;
  --fg: #232020;
  --muted: #6f6863;
  --faint: #f1eee8;
  --accent: #9a3b2d;
  --accent-soft: #f2e4e0;
  --rule: #e2ddd3;
  --code-bg: #f1ede5;
  --code-fg: #544d45;

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

.tpl-newyork[data-theme="dark"] {
  --bg: #1a1817;
  --fg: #e9e3da;
  --muted: #a1988c;
  --faint: #252220;
  --accent: #e0917f;
  --accent-soft: #2d211d;
  --rule: #363029;
  --code-bg: #242120;
  --code-fg: #cabfb0;
}

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

.tpl-newyork h1, .tpl-newyork h2, .tpl-newyork h3,
.tpl-newyork h4, .tpl-newyork h5, .tpl-newyork h6 {
  font-family: var(--md-serif); color: var(--fg); line-height: 1.18; font-weight: 700; text-wrap: balance; letter-spacing: -0.01em;
}
.tpl-newyork h1 { font-size: var(--md-h1); margin: 0 0 0.5em; line-height: 1.1; letter-spacing: -0.02em; }
.tpl-newyork h2 { font-size: var(--md-h2); margin: 1.7em 0 0.5em; }
.tpl-newyork h3 { font-size: var(--md-h3); margin: 1.5em 0 0.4em; }
.tpl-newyork h4 { font-size: var(--md-h4); margin: 1.3em 0 0.3em; font-style: italic; }
.tpl-newyork h5 { font-family: var(--md-sans); font-size: var(--md-h5); margin: 1.2em 0 0.3em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.tpl-newyork h6 { font-family: var(--md-sans); font-size: var(--md-h6); margin: 1.2em 0 0.3em; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.tpl-newyork p { margin: 0 0 1em; }
.tpl-newyork .lead { font-size: 1.2em; line-height: 1.5; color: var(--muted); font-style: italic; }

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

.tpl-newyork blockquote {
  margin: 1.6em 0; padding-left: 1.4em; border-left: 2px solid var(--accent);
  font-style: italic; color: var(--muted);
}
.tpl-newyork blockquote p { margin: 0 0 0.5em; }
.tpl-newyork blockquote p:last-child { margin: 0; font-style: normal; font-size: 0.85em; font-family: var(--md-sans); letter-spacing: 0.03em; }

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

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

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

.tpl-newyork .tok-com  { color: #a2988a; font-style: italic; }
.tpl-newyork .tok-kw   { color: #9a3b2d; }
.tpl-newyork .tok-fn   { color: #3a5e8c; }
.tpl-newyork .tok-str  { color: #5a7c46; }
.tpl-newyork .tok-num  { color: #9a6e2e; }
.tpl-newyork .tok-type { color: #7a4a82; }
.tpl-newyork .tok-op, .tpl-newyork .tok-punc { color: var(--muted); }
.tpl-newyork .tok-var  { color: var(--code-fg); }
.tpl-newyork[data-theme="dark"] .tok-com  { color: #8c8174; }
.tpl-newyork[data-theme="dark"] .tok-kw   { color: #e0917f; }
.tpl-newyork[data-theme="dark"] .tok-fn   { color: #8aaad4; }
.tpl-newyork[data-theme="dark"] .tok-str  { color: #a6c486; }
.tpl-newyork[data-theme="dark"] .tok-num  { color: #d4ad6a; }
.tpl-newyork[data-theme="dark"] .tok-type { color: #c39bcc; }

.tpl-newyork table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.9em; }
.tpl-newyork thead th { text-align: left; font-weight: 700; padding: 0.5em 0.8em; border-bottom: 1.5px solid var(--accent); }
.tpl-newyork tbody td { padding: 0.5em 0.8em; border-bottom: 1px solid var(--rule); }
.tpl-newyork tbody tr:last-child td { border-bottom: none; }

.tpl-newyork .callout { margin: 1.6em 0; padding: 1em 1.2em; border-radius: 6px; background: var(--faint); border-left: 2px solid var(--accent); }
.tpl-newyork .callout p { margin: 0 0 0.4em; }
.tpl-newyork .callout p:last-child { margin: 0; }
.tpl-newyork .callout-title { font-family: var(--md-sans); font-weight: 600; font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.05em; }
.tpl-newyork .callout-note    { border-left-color: #3b6ea5; }
.tpl-newyork .callout-note .callout-title { color: #3b6ea5; }
.tpl-newyork .callout-tip     { border-left-color: #4f8050; }
.tpl-newyork .callout-tip .callout-title { color: #4f8050; }
.tpl-newyork .callout-warning { border-left-color: #b4791f; }
.tpl-newyork .callout-warning .callout-title { color: #b4791f; }

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

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

.tpl-newyork math { font-size: 1.04em; }
.tpl-newyork .math-block { margin: 1.6em 0; text-align: center; overflow-x: auto; font-size: 1.18em; }

.tpl-newyork .footnote-ref a { font-size: 0.72em; vertical-align: super; border: none; color: var(--accent); }
.tpl-newyork .footnotes { margin-top: 2.8em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 0.82em; color: var(--muted); }
.tpl-newyork .footnotes ol { padding-left: 1.4em; }
.tpl-newyork .footnotes li { margin: 0.4em 0; }
.tpl-newyork .footnote-backref { border: none; }


/* ===== apple-books ===== */
/* ============================================================
   模版 16 · 苹果阅读 Apple Books
   Apple 衬线 New York( ui-serif )· 中 Songti SC
   书籍阅读模式 · 米色护眼 · 基准 21px · 行高 1.72 · 窄栏 60ch
   说明:仿 Apple Books 阅读体验;非苹果设备回退 Georgia
   ============================================================ */
.tpl-apple-books {
  --md-base: 21px;
  --md-ratio: 1.2;
  --md-lh: 1.72;
  --md-measure: 60ch;
  --md-h1: 38px;
  --md-h2: 28px;
  --md-h3: 23px;
  --md-h4: 21px;
  --md-h5: 17px;
  --md-h6: 15px;

  --md-serif: ui-serif, "New York", "Songti SC", "Noto Serif SC", Georgia, serif;
  --md-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", system-ui, sans-serif;
  --md-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #f3e8d2;
  --fg: #3a2f20;
  --muted: #847055;
  --faint: #ecdfc4;
  --accent: #9c5a2a;
  --accent-soft: #ecdcc0;
  --rule: #ddcca8;
  --code-bg: #ecdfc4;
  --code-fg: #5e4d36;

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

.tpl-apple-books[data-theme="dark"] {
  --bg: #221c14;
  --fg: #ddd0bb;
  --muted: #9c8b72;
  --faint: #2b241a;
  --accent: #d49a5e;
  --accent-soft: #312818;
  --rule: #3b3122;
  --code-bg: #2b241a;
  --code-fg: #c7b89e;
}

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

.tpl-apple-books h1, .tpl-apple-books h2, .tpl-apple-books h3,
.tpl-apple-books h4, .tpl-apple-books h5, .tpl-apple-books h6 {
  font-family: var(--md-serif); color: var(--fg); line-height: 1.22; font-weight: 700; text-wrap: balance;
}
.tpl-apple-books h1 { font-size: var(--md-h1); margin: 0 0 0.7em; text-align: center; line-height: 1.15; }
.tpl-apple-books h2 { font-size: var(--md-h2); margin: 1.7em 0 0.5em; }
.tpl-apple-books h3 { font-size: var(--md-h3); margin: 1.5em 0 0.4em; }
.tpl-apple-books h4 { font-size: var(--md-h4); margin: 1.3em 0 0.3em; font-style: italic; }
.tpl-apple-books h5 { font-size: var(--md-h5); margin: 1.2em 0 0.3em; font-variant: small-caps; letter-spacing: 0.06em; color: var(--accent); }
.tpl-apple-books h6 { font-size: var(--md-h6); margin: 1.2em 0 0.3em; color: var(--muted); font-style: italic; }

.tpl-apple-books p { margin: 0 0 1em; }
.tpl-apple-books p + p { text-indent: 1.4em; }
.tpl-apple-books .lead { font-size: 1.16em; line-height: 1.55; color: var(--muted); font-style: italic; text-align: center; }
.tpl-apple-books .lead + p { text-indent: 0; }
.tpl-apple-books .lead + p::first-letter { font-weight: 700; font-size: 3.2em; line-height: 0.82; float: left; padding: 0.06em 0.12em 0 0; color: var(--accent); }

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

.tpl-apple-books blockquote { margin: 1.6em 1.2em; padding-left: 1.2em; border-left: 2px solid var(--accent); font-style: italic; color: var(--muted); }
.tpl-apple-books blockquote p { margin: 0 0 0.5em; text-indent: 0; }
.tpl-apple-books blockquote p:last-child { margin: 0; font-style: normal; text-align: right; font-size: 0.85em; }

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

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

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

.tpl-apple-books .tok-com  { color: #a3906e; font-style: italic; }
.tpl-apple-books .tok-kw   { color: #9c5a2a; }
.tpl-apple-books .tok-fn   { color: #4a6c95; }
.tpl-apple-books .tok-str  { color: #5e7c42; }
.tpl-apple-books .tok-num  { color: #9a6e2e; }
.tpl-apple-books .tok-type { color: #7a4a82; }
.tpl-apple-books .tok-op, .tpl-apple-books .tok-punc { color: var(--muted); }
.tpl-apple-books .tok-var  { color: var(--code-fg); }
.tpl-apple-books[data-theme="dark"] .tok-com  { color: #8a7a5e; }
.tpl-apple-books[data-theme="dark"] .tok-kw   { color: #d49a5e; }
.tpl-apple-books[data-theme="dark"] .tok-fn   { color: #8aa6cc; }
.tpl-apple-books[data-theme="dark"] .tok-str  { color: #a6c486; }
.tpl-apple-books[data-theme="dark"] .tok-num  { color: #d4ad6a; }
.tpl-apple-books[data-theme="dark"] .tok-type { color: #c39bcc; }

.tpl-apple-books table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.88em; }
.tpl-apple-books thead th { text-align: left; font-weight: 700; padding: 0.45em 0.8em; border-bottom: 1.5px solid var(--accent); }
.tpl-apple-books tbody td { padding: 0.5em 0.8em; border-bottom: 1px solid var(--rule); }
.tpl-apple-books tbody tr:last-child td { border-bottom: none; }

.tpl-apple-books .callout { margin: 1.6em 0; padding: 0.9em 1.2em; border-radius: 6px; background: var(--faint); border-left: 2px solid var(--accent); }
.tpl-apple-books .callout p { margin: 0 0 0.4em; text-indent: 0; }
.tpl-apple-books .callout p:last-child { margin: 0; }
.tpl-apple-books .callout-title { font-variant: small-caps; font-weight: 700; font-size: 0.9em; letter-spacing: 0.04em; }
.tpl-apple-books .callout-note    { border-left-color: #4a6c95; }
.tpl-apple-books .callout-note .callout-title { color: #4a6c95; }
.tpl-apple-books .callout-tip     { border-left-color: #4f8050; }
.tpl-apple-books .callout-tip .callout-title { color: #4f8050; }
.tpl-apple-books .callout-warning { border-left-color: #b4791f; }
.tpl-apple-books .callout-warning .callout-title { color: #b4791f; }

.tpl-apple-books hr { border: none; height: 1em; margin: 2em 0; text-align: center; }
.tpl-apple-books hr::before { content: "❧"; color: var(--accent); font-size: 1.2em; }

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

.tpl-apple-books math { font-size: 1.04em; }
.tpl-apple-books .math-block { margin: 1.6em 0; text-align: center; overflow-x: auto; font-size: 1.16em; }

.tpl-apple-books .footnote-ref a { font-size: 0.72em; vertical-align: super; border: none; color: var(--accent); }
.tpl-apple-books .footnotes { margin-top: 2.8em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 0.82em; color: var(--muted); }
.tpl-apple-books .footnotes p { text-indent: 0; }
.tpl-apple-books .footnotes ol { padding-left: 1.4em; }
.tpl-apple-books .footnotes li { margin: 0.4em 0; }
.tpl-apple-books .footnote-backref { border: none; }


/* ===== graphite ===== */
/* ============================================================
   模版 17 · 石墨 Graphite
   Helvetica Neue( Apple 经典无衬线 )· 中 PingFang SC · SF Mono
   高级灰阶 · 画廊感单色 · 基准 17px · 比例 1.2 · 行高 1.6
   特征:无彩色、发丝线、小号字距大写标签、克制留白
   ============================================================ */
.tpl-graphite {
  --md-base: 17px;
  --md-ratio: 1.2;
  --md-lh: 1.6;
  --md-measure: 72ch;
  --md-h1: 35.2px;
  --md-h2: 24.5px;
  --md-h3: 20.4px;
  --md-h4: 17px;
  --md-h5: 14.2px;
  --md-h6: 13px;

  --md-sans: "Helvetica Neue", Helvetica, -apple-system, "PingFang SC", system-ui, sans-serif;
  --md-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;

  --bg: #ffffff;
  --fg: #161616;
  --muted: #8a8a8a;
  --faint: #f4f4f4;
  --accent: #161616;
  --accent-soft: #ececec;
  --rule: #e2e2e2;
  --hair: #161616;
  --code-bg: #f4f4f4;
  --code-fg: #2c2c2c;

  font-family: var(--md-sans);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4.5rem 2.2rem 7rem;
}

.tpl-graphite[data-theme="dark"] {
  --bg: #0f0f0f;
  --fg: #ededed;
  --muted: #7c7c7c;
  --faint: #1a1a1a;
  --accent: #ededed;
  --accent-soft: #222222;
  --rule: #2a2a2a;
  --hair: #ededed;
  --code-bg: #1a1a1a;
  --code-fg: #cccccc;
}

.tpl-graphite > * { margin: 0 0 1.05em; }
.tpl-graphite > *:first-child { margin-top: 0; }

.tpl-graphite h1, .tpl-graphite h2, .tpl-graphite h3,
.tpl-graphite h4, .tpl-graphite h5, .tpl-graphite h6 {
  font-family: var(--md-sans); color: var(--fg); line-height: 1.16; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance;
}
.tpl-graphite { counter-reset: h1; }
.tpl-graphite h1 { counter-increment: h1; font-size: var(--md-h1); margin: 0 0 0.5em; letter-spacing: -0.03em; }
.tpl-graphite h1::before { content: counter(h1, decimal-leading-zero) " — "; font-size: 0.42em; font-weight: 500; letter-spacing: 0.1em; color: var(--muted); vertical-align: middle; display: inline-block; margin-right: 0.4em; }
.tpl-graphite h2 { font-size: var(--md-h2); margin: 2.4em 0 0.5em; padding-top: 0.7em; border-top: 1px solid var(--hair); }
.tpl-graphite h3 { font-size: var(--md-h3); margin: 1.8em 0 0.4em; }
.tpl-graphite h4 { font-size: var(--md-h4); margin: 1.4em 0 0.3em; }
.tpl-graphite h5 { font-size: var(--md-h5); margin: 1.3em 0 0.3em; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 500; }
.tpl-graphite h6 { font-size: var(--md-h6); margin: 1.3em 0 0.3em; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; }

.tpl-graphite p { margin: 0 0 1.05em; }
.tpl-graphite .lead { font-size: 1.24em; line-height: 1.45; color: var(--muted); font-weight: 400; letter-spacing: -0.01em; }

.tpl-graphite strong { font-weight: 700; }
.tpl-graphite em { font-style: italic; }
.tpl-graphite s, .tpl-graphite del { color: var(--muted); }
.tpl-graphite a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--fg); }
.tpl-graphite a:hover { background: var(--accent-soft); }
.tpl-graphite code { font-family: var(--md-mono); font-size: 0.84em; background: var(--code-bg); color: var(--code-fg); padding: 0.12em 0.4em; border-radius: 2px; }

.tpl-graphite blockquote {
  margin: 1.6em 0; padding-left: 1.4em; border-left: 1px solid var(--hair); color: var(--muted);
  font-size: 1.1em; line-height: 1.5;
}
.tpl-graphite blockquote p { margin: 0 0 0.5em; }
.tpl-graphite blockquote p:last-child { margin: 0; font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.08em; }

.tpl-graphite ul, .tpl-graphite ol { padding-left: 1.4em; margin: 0 0 1.05em; }
.tpl-graphite li { margin: 0.35em 0; }
.tpl-graphite li::marker { color: var(--muted); }
.tpl-graphite ul { list-style: none; padding-left: 1.3em; }
.tpl-graphite ul > li { position: relative; }
.tpl-graphite ul > li::before { content: ""; position: absolute; left: -1.1em; top: 0.72em; width: 0.5em; height: 1px; background: var(--fg); }
.tpl-graphite ul ul, .tpl-graphite ol ol, .tpl-graphite ul ol, .tpl-graphite ol ul { margin: 0.35em 0; }

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

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

/* 单色高亮:仅用字重与灰阶,不引入彩色 */
.tpl-graphite .tok-com  { color: var(--muted); font-style: italic; }
.tpl-graphite .tok-kw   { color: var(--fg); font-weight: 700; }
.tpl-graphite .tok-fn   { color: var(--fg); }
.tpl-graphite .tok-str  { color: #5a5a5a; }
.tpl-graphite .tok-num  { color: #5a5a5a; }
.tpl-graphite .tok-type { color: var(--fg); font-weight: 700; }
.tpl-graphite .tok-op, .tpl-graphite .tok-punc { color: var(--muted); }
.tpl-graphite .tok-var  { color: var(--code-fg); }
.tpl-graphite[data-theme="dark"] .tok-str { color: #a0a0a0; }
.tpl-graphite[data-theme="dark"] .tok-num { color: #a0a0a0; }

.tpl-graphite table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.92em; }
.tpl-graphite thead th { text-align: left; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8em; padding: 0.5em 0.8em; border-bottom: 1px solid var(--hair); color: var(--muted); }
.tpl-graphite tbody td { padding: 0.55em 0.8em; border-bottom: 1px solid var(--rule); }
.tpl-graphite tbody tr:last-child td { border-bottom: 1px solid var(--hair); }

.tpl-graphite .callout { margin: 1.6em 0; padding: 1em 1.2em; border: 1px solid var(--rule); }
.tpl-graphite .callout p { margin: 0 0 0.4em; }
.tpl-graphite .callout p:last-child { margin: 0; }
.tpl-graphite .callout-title { font-weight: 500; font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 0.5em !important; }
.tpl-graphite .callout-note    { border-left: 2px solid var(--hair); }
.tpl-graphite .callout-tip     { border-left: 2px solid var(--hair); }
.tpl-graphite .callout-warning { border-left: 2px solid var(--hair); }

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

.tpl-graphite figure { margin: 1.8em 0; }
.tpl-graphite img { max-width: 100%; filter: grayscale(1); }
.tpl-graphite .img-placeholder { display: flex; align-items: center; justify-content: center; height: 220px; border: 1px solid var(--rule); background: var(--faint); color: var(--muted); }
.tpl-graphite figcaption { font-size: 0.78em; color: var(--muted); margin-top: 0.7em; line-height: 1.45; text-transform: uppercase; letter-spacing: 0.04em; text-wrap: pretty; }

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

.tpl-graphite .footnote-ref a { font-size: 0.72em; vertical-align: super; border: none; }
.tpl-graphite .footnotes { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--hair); font-size: 0.84em; color: var(--muted); }
.tpl-graphite .footnotes ol { padding-left: 1.3em; }
.tpl-graphite .footnotes li { margin: 0.4em 0; }
.tpl-graphite .footnote-backref { border: none; }


/* ===== didone ===== */
/* ============================================================
   模版 18 · 黛 Didone 时尚
   标题 Bodoni Moda(高反差 Didone)· 正文 Jost(几何无衬线)· 中 Noto Serif SC
   时装杂志 · 基准 19px · 比例 1.333 · 发丝线 · 字距大写
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-didone {
  --md-base: 19px;
  --md-ratio: 1.333;
  --md-lh: 1.6;
  --md-measure: 66ch;
  --md-h1: 60px;
  --md-h2: 33.8px;
  --md-h3: 25.3px;
  --md-h4: 19px;
  --md-h5: 15px;
  --md-h6: 13.5px;

  --md-display: "Bodoni Moda", "Noto Serif SC", Didot, Georgia, serif;
  --md-body: "Jost", "Noto Serif SC", system-ui, sans-serif;
  --md-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #8a8480;
  --faint: #f5f3f1;
  --accent: #b08585;
  --accent-soft: #f6ecec;
  --rule: #1a1a1a;
  --hair: #e0ddda;
  --code-bg: #f5f3f1;
  --code-fg: #43403d;

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

.tpl-didone[data-theme="dark"] {
  --bg: #121011;
  --fg: #f0ece9;
  --muted: #948d88;
  --faint: #1d1a1b;
  --accent: #d3a3a3;
  --accent-soft: #2a1f1f;
  --rule: #f0ece9;
  --hair: #2e2a2b;
  --code-bg: #1d1a1b;
  --code-fg: #c9c2bd;
}

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

.tpl-didone h1, .tpl-didone h2, .tpl-didone h3, .tpl-didone h4 {
  font-family: var(--md-display); color: var(--fg); text-wrap: balance; line-height: 1.08;
}
.tpl-didone h1 { font-size: var(--md-h1); font-weight: 400; text-align: center; margin: 0 0 0.5em; line-height: 1; letter-spacing: 0.005em; }
.tpl-didone h2 { font-size: var(--md-h2); font-weight: 500; margin: 1.8em 0 0.6em; }
.tpl-didone h3 { font-size: var(--md-h3); font-weight: 500; margin: 1.5em 0 0.4em; font-style: italic; }
.tpl-didone h4 { font-family: var(--md-body); font-size: var(--md-h4); font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; margin: 1.4em 0 0.4em; }
.tpl-didone h5 { font-family: var(--md-body); font-size: var(--md-h5); font-weight: 500; text-transform: uppercase; letter-spacing: 0.24em; margin: 1.3em 0 0.3em; color: var(--accent); }
.tpl-didone h6 { font-family: var(--md-body); font-size: var(--md-h6); font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; margin: 1.3em 0 0.3em; color: var(--muted); }

.tpl-didone p { margin: 0 0 1.1em; }
.tpl-didone .lead {
  font-family: var(--md-body); font-weight: 300; font-size: 1.2em; line-height: 1.55;
  text-align: center; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase;
}

.tpl-didone strong { font-weight: 600; }
.tpl-didone em { font-style: italic; }
.tpl-didone s, .tpl-didone del { color: var(--muted); }
.tpl-didone a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--accent); }
.tpl-didone a:hover { color: var(--accent); }
.tpl-didone 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: 2px; }

.tpl-didone blockquote {
  margin: 2em 0; padding: 0; border: none; text-align: center;
  font-family: var(--md-display); font-style: italic; font-weight: 400; font-size: 1.7em; line-height: 1.3; color: var(--fg);
}
.tpl-didone blockquote::before { content: ""; display: block; width: 2.5em; height: 1px; background: var(--accent); margin: 0 auto 0.7em; }
.tpl-didone blockquote p { margin: 0 0 0.3em; }
.tpl-didone blockquote p:last-child { font-family: var(--md-body); font-style: normal; font-size: 0.42em; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); }

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

.tpl-didone .contains-task-list { list-style: none; padding-left: 0; }
.tpl-didone .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-didone .task-list-item input { appearance: none; -webkit-appearance: none; width: 1em; height: 1em; margin: 0; flex: none; border: 1px solid var(--fg); position: relative; top: 0.15em; background: var(--bg); }
.tpl-didone .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-didone .task-list-item input:checked::after { content: ""; position: absolute; left: 0.3em; top: 0.08em; width: 0.22em; height: 0.48em; border: solid var(--bg); border-width: 0 1.5px 1.5px 0; transform: rotate(42deg); }
.tpl-didone li:has(input:checked) { color: var(--muted); }

.tpl-didone 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.55; font-size: 0.74em; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tpl-didone pre code { background: none; padding: 0; font-size: 1em; color: inherit; }

.tpl-didone .tok-com  { color: #a8a29c; font-style: italic; }
.tpl-didone .tok-kw   { color: #a35a5a; }
.tpl-didone .tok-fn   { color: #5a6a8a; }
.tpl-didone .tok-str  { color: #5e7a52; }
.tpl-didone .tok-num  { color: #9a7a4a; }
.tpl-didone .tok-type { color: #7a5a82; }
.tpl-didone .tok-op, .tpl-didone .tok-punc { color: var(--muted); }
.tpl-didone .tok-var  { color: var(--code-fg); }
.tpl-didone[data-theme="dark"] .tok-com  { color: #8a847e; }
.tpl-didone[data-theme="dark"] .tok-kw   { color: #d3a3a3; }
.tpl-didone[data-theme="dark"] .tok-fn   { color: #9aaad0; }
.tpl-didone[data-theme="dark"] .tok-str  { color: #a6c498; }
.tpl-didone[data-theme="dark"] .tok-num  { color: #d4b482; }
.tpl-didone[data-theme="dark"] .tok-type { color: #c4a0cc; }

.tpl-didone table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 0.86em; }
.tpl-didone thead th { font-family: var(--md-body); text-align: left; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85em; padding: 0.5em 0.8em; border-bottom: 1px solid var(--rule); }
.tpl-didone tbody td { padding: 0.6em 0.8em; border-bottom: 1px solid var(--hair); }
.tpl-didone tbody tr:last-child td { border-bottom: 1px solid var(--rule); }

.tpl-didone .callout { margin: 1.8em 0; padding: 1.2em 1.4em; border: 1px solid var(--hair); }
.tpl-didone .callout p { margin: 0 0 0.4em; }
.tpl-didone .callout p:last-child { margin: 0; }
.tpl-didone .callout-title { font-family: var(--md-body); font-weight: 600; font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.18em; }
.tpl-didone .callout-note    { border-top: 2px solid #6a7a9a; }
.tpl-didone .callout-note .callout-title { color: #6a7a9a; }
.tpl-didone .callout-tip     { border-top: 2px solid #6a8a5e; }
.tpl-didone .callout-tip .callout-title { color: #6a8a5e; }
.tpl-didone .callout-warning { border-top: 2px solid var(--accent); }
.tpl-didone .callout-warning .callout-title { color: var(--accent); }

.tpl-didone hr { border: none; height: 1em; margin: 2.6em 0; text-align: center; }
.tpl-didone hr::before { content: "✕"; color: var(--accent); font-size: 0.8em; letter-spacing: 0.3em; }

.tpl-didone figure { margin: 2.2em 0; text-align: center; }
.tpl-didone img { max-width: 100%; }
.tpl-didone .img-placeholder { display: flex; align-items: center; justify-content: center; height: 250px; background: var(--faint); color: var(--muted); }
.tpl-didone figcaption { font-family: var(--md-body); font-size: 0.78em; color: var(--muted); margin-top: 0.7em; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.1em; text-wrap: pretty; }

.tpl-didone math { font-size: 1.04em; }
.tpl-didone .math-block { margin: 2em 0; text-align: center; overflow-x: auto; font-size: 1.18em; }

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


/* ===== inkair ===== */
/* ============================================================
   模版 19 · 东方留白  Ink & Air
   中文优先:Noto Serif SC(宋)· 西文 Spectral · 等宽 SF Mono
   禅意留白 · 基准 18px · 行高 2.0(大量呼吸)· 窄栏 · 印泥红
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-inkair {
  --md-base: 18px;
  --md-ratio: 1.25;
  --md-lh: 2.0;
  --md-measure: 40em;
  --md-h1: 35px;
  --md-h2: 26px;
  --md-h3: 21px;
  --md-h4: 18px;
  --md-h5: 15px;
  --md-h6: 14px;

  --md-serif: "Spectral", "Noto Serif SC", Georgia, serif;
  --md-cjk: "Noto Serif SC", "Spectral", serif;
  --md-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #fbfaf7;
  --fg: #2b2926;
  --muted: #8c887f;
  --faint: #f1efe9;
  --accent: #a8332a;          /* 印泥红 */
  --accent-soft: #f2e6e2;
  --rule: #e4e1d8;
  --code-bg: #f1efe9;
  --code-fg: #56524a;

  font-family: var(--md-serif), var(--md-cjk);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 6rem 3rem 8rem;
}

.tpl-inkair[data-theme="dark"] {
  --bg: #1a1917;
  --fg: #ddd9d0;
  --muted: #908b80;
  --faint: #232220;
  --accent: #d97a6c;
  --accent-soft: #2c211e;
  --rule: #333128;
  --code-bg: #232220;
  --code-fg: #c5bfb2;
}

.tpl-inkair > * { margin: 0 0 1.4em; }
.tpl-inkair > *:first-child { margin-top: 0; }

.tpl-inkair h1, .tpl-inkair h2, .tpl-inkair h3,
.tpl-inkair h4, .tpl-inkair h5, .tpl-inkair h6 {
  font-family: var(--md-cjk); color: var(--fg); line-height: 1.5; font-weight: 500; letter-spacing: 0.04em; text-wrap: balance;
}
.tpl-inkair h1 { font-size: var(--md-h1); font-weight: 500; margin: 0 0 1.2em; letter-spacing: 0.08em; }
.tpl-inkair h2 { font-size: var(--md-h2); margin: 2.4em 0 0.9em; padding-left: 0.7em; border-left: 3px solid var(--accent); }
.tpl-inkair h3 { font-size: var(--md-h3); margin: 2em 0 0.7em; }
.tpl-inkair h4 { font-size: var(--md-h4); margin: 1.6em 0 0.5em; color: var(--muted); }
.tpl-inkair h5 { font-size: var(--md-h5); margin: 1.5em 0 0.4em; color: var(--accent); letter-spacing: 0.1em; }
.tpl-inkair h6 { font-size: var(--md-h6); margin: 1.5em 0 0.4em; color: var(--muted); letter-spacing: 0.1em; }

.tpl-inkair p { margin: 0 0 1.4em; }
.tpl-inkair .lead { font-size: 1.1em; line-height: 1.9; color: var(--muted); letter-spacing: 0.05em; }

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

.tpl-inkair blockquote {
  margin: 2em 0; padding: 0 0 0 1.6em; border-left: 1px solid var(--rule);
  color: var(--muted); font-size: 1.02em;
}
.tpl-inkair blockquote p { margin: 0 0 0.6em; }
.tpl-inkair blockquote p:last-child { margin: 0; font-size: 0.85em; letter-spacing: 0.06em; }

.tpl-inkair ul, .tpl-inkair ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.tpl-inkair li { margin: 0.5em 0; }
.tpl-inkair li::marker { color: var(--accent); }
.tpl-inkair ul { list-style: none; padding-left: 1.3em; }
.tpl-inkair ul > li { position: relative; }
.tpl-inkair ul > li::before { content: "·"; position: absolute; left: -1em; color: var(--accent); font-weight: 700; font-size: 1.4em; line-height: 1.1; }
.tpl-inkair ul ul, .tpl-inkair ol ol, .tpl-inkair ul ol, .tpl-inkair ol ul { margin: 0.5em 0; }

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

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

.tpl-inkair .tok-com  { color: #a39e93; font-style: italic; }
.tpl-inkair .tok-kw   { color: #a8332a; }
.tpl-inkair .tok-fn   { color: #3a6080; }
.tpl-inkair .tok-str  { color: #5e7c4a; }
.tpl-inkair .tok-num  { color: #997a3a; }
.tpl-inkair .tok-type { color: #7a5280; }
.tpl-inkair .tok-op, .tpl-inkair .tok-punc { color: var(--muted); }
.tpl-inkair .tok-var  { color: var(--code-fg); }
.tpl-inkair[data-theme="dark"] .tok-com  { color: #8a857a; }
.tpl-inkair[data-theme="dark"] .tok-kw   { color: #d97a6c; }
.tpl-inkair[data-theme="dark"] .tok-fn   { color: #8aa8c4; }
.tpl-inkair[data-theme="dark"] .tok-str  { color: #a4c490; }
.tpl-inkair[data-theme="dark"] .tok-num  { color: #d0ad6a; }
.tpl-inkair[data-theme="dark"] .tok-type { color: #c49bc8; }

.tpl-inkair table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 0.9em; }
.tpl-inkair thead th { text-align: left; font-weight: 500; padding: 0.5em 0.9em; border-bottom: 1px solid var(--accent); letter-spacing: 0.04em; }
.tpl-inkair tbody td { padding: 0.6em 0.9em; border-bottom: 1px solid var(--rule); }
.tpl-inkair tbody tr:last-child td { border-bottom: none; }

.tpl-inkair .callout { margin: 2em 0; padding: 1.1em 1.4em; background: var(--faint); border-left: 2px solid var(--accent); }
.tpl-inkair .callout p { margin: 0 0 0.5em; }
.tpl-inkair .callout p:last-child { margin: 0; }
.tpl-inkair .callout-title { font-weight: 600; font-size: 0.92em; letter-spacing: 0.06em; }
.tpl-inkair .callout-note    { border-left-color: #5a7a98; }
.tpl-inkair .callout-note .callout-title { color: #5a7a98; }
.tpl-inkair .callout-tip     { border-left-color: #5e8a5e; }
.tpl-inkair .callout-tip .callout-title { color: #5e8a5e; }
.tpl-inkair .callout-warning { border-left-color: var(--accent); }
.tpl-inkair .callout-warning .callout-title { color: var(--accent); }

.tpl-inkair hr { border: none; height: 1em; margin: 3em 0; text-align: center; }
.tpl-inkair hr::before { content: "○"; color: var(--accent); font-size: 0.7em; }

.tpl-inkair figure { margin: 2.4em 0; text-align: center; }
.tpl-inkair img { max-width: 100%; }
.tpl-inkair .img-placeholder { display: flex; align-items: center; justify-content: center; height: 220px; border: 1px solid var(--rule); background: var(--faint); color: var(--accent); }
.tpl-inkair figcaption { font-size: 0.84em; color: var(--muted); margin-top: 0.9em; line-height: 1.6; letter-spacing: 0.05em; text-wrap: pretty; }

.tpl-inkair math { font-size: 1.04em; }
.tpl-inkair .math-block { margin: 2em 0; text-align: center; overflow-x: auto; font-size: 1.15em; }

.tpl-inkair .footnote-ref a { font-size: 0.74em; vertical-align: super; border: none; color: var(--accent); }
.tpl-inkair .footnotes { margin-top: 3.2em; padding-top: 1.4em; border-top: 1px solid var(--rule); font-size: 0.84em; color: var(--muted); line-height: 1.8; }
.tpl-inkair .footnotes ol { padding-left: 1.4em; }
.tpl-inkair .footnotes li { margin: 0.5em 0; }
.tpl-inkair .footnote-backref { border: none; }


/* ===== inkblue ===== */
/* ============================================================
   模版 20 · 午夜墨蓝  Midnight Ink
   Newsreader(优雅衬线)· 中 Noto Serif SC · SF Mono
   优雅暗色衬线 · 墨蓝纸 + 暖金 · 基准 19px · 比例 1.25 · 行高 1.7
   亮色 = 冷调蓝灰纸;暗色 = 深墨蓝 + 暖金
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-inkblue {
  --md-base: 19px;
  --md-ratio: 1.25;
  --md-lh: 1.7;
  --md-measure: 66ch;
  --md-h1: 42px;
  --md-h2: 30px;
  --md-h3: 24px;
  --md-h4: 19px;
  --md-h5: 15.5px;
  --md-h6: 14px;

  --md-serif: "Newsreader", "Noto Serif SC", Georgia, serif;
  --md-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #f4f6fa;
  --fg: #1e2638;
  --muted: #6a7488;
  --faint: #e8ecf4;
  --accent: #2f4f86;
  --accent-soft: #e2e8f4;
  --rule: #d8deea;
  --code-bg: #e9edf5;
  --code-fg: #44506a;

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

.tpl-inkblue[data-theme="dark"] {
  --bg: #0e1525;
  --fg: #dde3f0;
  --muted: #8b96ad;
  --faint: #161f33;
  --accent: #cba96a;          /* 暖金 */
  --accent-soft: #1c2740;
  --rule: #25304a;
  --code-bg: #141d30;
  --code-fg: #c3cbdc;
}

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

.tpl-inkblue h1, .tpl-inkblue h2, .tpl-inkblue h3,
.tpl-inkblue h4, .tpl-inkblue h5, .tpl-inkblue h6 {
  font-family: var(--md-serif); color: var(--fg); line-height: 1.2; font-weight: 600; text-wrap: balance; letter-spacing: -0.01em;
}
.tpl-inkblue h1 { font-size: var(--md-h1); font-weight: 500; margin: 0 0 0.5em; line-height: 1.1; }
.tpl-inkblue h2 { font-size: var(--md-h2); margin: 1.7em 0 0.5em; }
.tpl-inkblue h3 { font-size: var(--md-h3); margin: 1.5em 0 0.4em; }
.tpl-inkblue h4 { font-size: var(--md-h4); margin: 1.3em 0 0.3em; font-style: italic; }
.tpl-inkblue h5 { font-size: var(--md-h5); margin: 1.2em 0 0.3em; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 600; }
.tpl-inkblue h6 { font-size: var(--md-h6); margin: 1.2em 0 0.3em; color: var(--muted); font-style: italic; }

.tpl-inkblue p { margin: 0 0 1em; }
.tpl-inkblue .lead { font-size: 1.2em; line-height: 1.5; color: var(--muted); font-style: italic; }

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

.tpl-inkblue blockquote {
  margin: 1.6em 0; padding-left: 1.4em; border-left: 2px solid var(--accent);
  font-style: italic; color: var(--muted);
}
.tpl-inkblue blockquote p { margin: 0 0 0.5em; }
.tpl-inkblue blockquote p:last-child { margin: 0; font-style: normal; font-size: 0.85em; letter-spacing: 0.04em; }

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

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

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

.tpl-inkblue .tok-com  { color: #97a0b3; font-style: italic; }
.tpl-inkblue .tok-kw   { color: #2f4f86; }
.tpl-inkblue .tok-fn   { color: #1f6f8b; }
.tpl-inkblue .tok-str  { color: #4f7c50; }
.tpl-inkblue .tok-num  { color: #9a6e2e; }
.tpl-inkblue .tok-type { color: #6b4a8a; }
.tpl-inkblue .tok-op, .tpl-inkblue .tok-punc { color: var(--muted); }
.tpl-inkblue .tok-var  { color: var(--code-fg); }
.tpl-inkblue[data-theme="dark"] .tok-com  { color: #6a7488; }
.tpl-inkblue[data-theme="dark"] .tok-kw   { color: #cba96a; }
.tpl-inkblue[data-theme="dark"] .tok-fn   { color: #7fb4d4; }
.tpl-inkblue[data-theme="dark"] .tok-str  { color: #93c79a; }
.tpl-inkblue[data-theme="dark"] .tok-num  { color: #d8b478; }
.tpl-inkblue[data-theme="dark"] .tok-type { color: #b69ad8; }

.tpl-inkblue table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.9em; }
.tpl-inkblue thead th { text-align: left; font-weight: 600; padding: 0.5em 0.8em; border-bottom: 1.5px solid var(--accent); }
.tpl-inkblue tbody td { padding: 0.55em 0.8em; border-bottom: 1px solid var(--rule); }
.tpl-inkblue tbody tr:last-child td { border-bottom: none; }

.tpl-inkblue .callout { margin: 1.6em 0; padding: 1em 1.2em; border-radius: 8px; background: var(--faint); border-left: 2px solid var(--accent); }
.tpl-inkblue .callout p { margin: 0 0 0.4em; }
.tpl-inkblue .callout p:last-child { margin: 0; }
.tpl-inkblue .callout-title { font-weight: 600; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.05em; }
.tpl-inkblue .callout-note    { border-left-color: #4a78b0; }
.tpl-inkblue .callout-note .callout-title { color: #4a78b0; }
.tpl-inkblue .callout-tip     { border-left-color: #4f8a66; }
.tpl-inkblue .callout-tip .callout-title { color: #4f8a66; }
.tpl-inkblue .callout-warning { border-left-color: var(--accent); }
.tpl-inkblue .callout-warning .callout-title { color: var(--accent); }

.tpl-inkblue hr { border: none; height: 1em; margin: 2.4em 0; text-align: center; }
.tpl-inkblue hr::before { content: "◆"; color: var(--accent); font-size: 0.7em; letter-spacing: 0.4em; }

.tpl-inkblue figure { margin: 1.8em 0; text-align: center; }
.tpl-inkblue img { max-width: 100%; border-radius: 6px; }
.tpl-inkblue .img-placeholder { display: flex; align-items: center; justify-content: center; height: 230px; border: 1px solid var(--rule); border-radius: 6px; background: var(--faint); color: var(--accent); }
.tpl-inkblue figcaption { font-style: italic; font-size: 0.84em; color: var(--muted); margin-top: 0.6em; line-height: 1.45; text-wrap: pretty; }

.tpl-inkblue math { font-size: 1.04em; }
.tpl-inkblue .math-block { margin: 1.6em 0; text-align: center; overflow-x: auto; font-size: 1.18em; }

.tpl-inkblue .footnote-ref a { font-size: 0.72em; vertical-align: super; border: none; color: var(--accent); }
.tpl-inkblue .footnotes { margin-top: 2.8em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 0.82em; color: var(--muted); }
.tpl-inkblue .footnotes ol { padding-left: 1.4em; }
.tpl-inkblue .footnotes li { margin: 0.4em 0; }
.tpl-inkblue .footnote-backref { border: none; }


/* ===== terracotta ===== */
/* ============================================================
   模版 21 · 赤陶  Terracotta
   标题 Spectral(衬线)· 正文 Hanken Grotesk(无衬线)· 中 Noto Serif SC
   大地色温暖现代编辑 · 基准 18px · 比例 1.25 · 行高 1.7
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-terracotta {
  --md-base: 18px;
  --md-ratio: 1.25;
  --md-lh: 1.7;
  --md-measure: 68ch;
  --md-h1: 42px;
  --md-h2: 30px;
  --md-h3: 24px;
  --md-h4: 19px;
  --md-h5: 15px;
  --md-h6: 13.5px;

  --md-head: "Spectral", "Noto Serif SC", Georgia, serif;
  --md-body: "Hanken Grotesk", "Noto Serif SC", system-ui, sans-serif;
  --md-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #faf4ea;
  --fg: #3a2e25;
  --muted: #8a7560;
  --faint: #f1e7d6;
  --accent: #b9543d;
  --accent-soft: #f5e2d8;
  --rule: #e4d6c0;
  --code-bg: #f1e7d6;
  --code-fg: #5a4a3a;

  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;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4.5rem 2.2rem 7rem;
}

.tpl-terracotta[data-theme="dark"] {
  --bg: #20170f;
  --fg: #ece0d0;
  --muted: #a8917a;
  --faint: #2a1f15;
  --accent: #e07a5f;
  --accent-soft: #321f17;
  --rule: #3a2c1f;
  --code-bg: #2a1f15;
  --code-fg: #cdbca6;
}

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

.tpl-terracotta h1, .tpl-terracotta h2, .tpl-terracotta h3,
.tpl-terracotta h4, .tpl-terracotta h5, .tpl-terracotta h6 {
  color: var(--fg); line-height: 1.2; text-wrap: balance;
}
.tpl-terracotta h1, .tpl-terracotta h2, .tpl-terracotta h3, .tpl-terracotta h4 { font-family: var(--md-head); font-weight: 600; }
.tpl-terracotta h1 { font-size: var(--md-h1); margin: 0 0 0.5em; line-height: 1.1; letter-spacing: -0.01em; }
.tpl-terracotta h2 { font-size: var(--md-h2); margin: 1.7em 0 0.5em; }
.tpl-terracotta h3 { font-size: var(--md-h3); margin: 1.5em 0 0.4em; }
.tpl-terracotta h4 { font-size: var(--md-h4); margin: 1.3em 0 0.3em; font-style: italic; }
.tpl-terracotta h5 { font-family: var(--md-body); font-size: var(--md-h5); margin: 1.2em 0 0.3em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.tpl-terracotta h6 { font-family: var(--md-body); font-size: var(--md-h6); margin: 1.2em 0 0.3em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.tpl-terracotta p { margin: 0 0 1em; }
.tpl-terracotta .lead { font-family: var(--md-head); font-size: 1.32em; line-height: 1.45; color: var(--muted); font-style: italic; }

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

.tpl-terracotta blockquote {
  margin: 1.6em 0; padding: 0.2em 0 0.2em 1.4em; border-left: 3px solid var(--accent);
  font-family: var(--md-head); font-style: italic; color: var(--muted); font-size: 1.1em;
}
.tpl-terracotta blockquote p { margin: 0 0 0.5em; }
.tpl-terracotta blockquote p:last-child { margin: 0; font-family: var(--md-body); font-style: normal; font-size: 0.78em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.tpl-terracotta ul, .tpl-terracotta ol { padding-left: 1.4em; margin: 0 0 1em; }
.tpl-terracotta li { margin: 0.4em 0; }
.tpl-terracotta li::marker { color: var(--accent); }
.tpl-terracotta ul ul, .tpl-terracotta ol ol, .tpl-terracotta ul ol, .tpl-terracotta ol ul { margin: 0.4em 0; }

.tpl-terracotta .contains-task-list { list-style: none; padding-left: 0; }
.tpl-terracotta .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-terracotta .task-list-item input { appearance: none; -webkit-appearance: none; width: 1.1em; height: 1.1em; margin: 0; flex: none; border: 1.5px solid var(--rule); border-radius: 5px; position: relative; top: 0.16em; background: var(--bg); }
.tpl-terracotta .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-terracotta .task-list-item input:checked::after { content: ""; position: absolute; left: 0.34em; top: 0.12em; width: 0.26em; height: 0.5em; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.tpl-terracotta li:has(input:checked) { color: var(--muted); }

.tpl-terracotta pre { font-family: var(--md-mono); background: var(--code-bg); color: var(--code-fg); padding: 1.1em 1.3em; border-radius: 8px; overflow-x: auto; line-height: 1.55; font-size: 0.78em; }
.tpl-terracotta pre code { background: none; padding: 0; font-size: 1em; color: inherit; }

.tpl-terracotta .tok-com  { color: #a8927a; font-style: italic; }
.tpl-terracotta .tok-kw   { color: #b9543d; }
.tpl-terracotta .tok-fn   { color: #3a6a82; }
.tpl-terracotta .tok-str  { color: #5e7c42; }
.tpl-terracotta .tok-num  { color: #a87a2e; }
.tpl-terracotta .tok-type { color: #8a5278; }
.tpl-terracotta .tok-op, .tpl-terracotta .tok-punc { color: var(--muted); }
.tpl-terracotta .tok-var  { color: var(--code-fg); }
.tpl-terracotta[data-theme="dark"] .tok-com  { color: #8c7866; }
.tpl-terracotta[data-theme="dark"] .tok-kw   { color: #e07a5f; }
.tpl-terracotta[data-theme="dark"] .tok-fn   { color: #84acc4; }
.tpl-terracotta[data-theme="dark"] .tok-str  { color: #a8c488; }
.tpl-terracotta[data-theme="dark"] .tok-num  { color: #d8b06a; }
.tpl-terracotta[data-theme="dark"] .tok-type { color: #cc9ac0; }

.tpl-terracotta table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.92em; }
.tpl-terracotta thead th { text-align: left; font-weight: 700; padding: 0.55em 0.9em; background: var(--faint); border-bottom: 2px solid var(--accent); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.04em; }
.tpl-terracotta tbody td { padding: 0.55em 0.9em; border-bottom: 1px solid var(--rule); }
.tpl-terracotta tbody tr:last-child td { border-bottom: none; }

.tpl-terracotta .callout { margin: 1.6em 0; padding: 1em 1.2em; border-radius: 8px; background: var(--faint); border-left: 3px solid var(--accent); }
.tpl-terracotta .callout p { margin: 0 0 0.4em; }
.tpl-terracotta .callout p:last-child { margin: 0; }
.tpl-terracotta .callout-title { font-weight: 700; font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.06em; }
.tpl-terracotta .callout-note    { border-left-color: #5a7a98; }
.tpl-terracotta .callout-note .callout-title { color: #5a7a98; }
.tpl-terracotta .callout-tip     { border-left-color: #6a8a4e; }
.tpl-terracotta .callout-tip .callout-title { color: #6a8a4e; }
.tpl-terracotta .callout-warning { border-left-color: var(--accent); }
.tpl-terracotta .callout-warning .callout-title { color: var(--accent); }

.tpl-terracotta hr { border: none; height: 1em; margin: 2.4em 0; text-align: center; }
.tpl-terracotta hr::before { content: "❡"; color: var(--accent); font-size: 1.1em; }

.tpl-terracotta figure { margin: 1.8em 0; text-align: center; }
.tpl-terracotta img { max-width: 100%; border-radius: 8px; }
.tpl-terracotta .img-placeholder { display: flex; align-items: center; justify-content: center; height: 220px; border-radius: 8px; background: var(--faint); color: var(--accent); }
.tpl-terracotta figcaption { font-family: var(--md-head); font-style: italic; font-size: 0.86em; color: var(--muted); margin-top: 0.6em; line-height: 1.45; text-wrap: pretty; }

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

.tpl-terracotta .footnote-ref a { font-size: 0.72em; vertical-align: super; border: none; color: var(--accent); font-weight: 700; }
.tpl-terracotta .footnotes { margin-top: 2.8em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 0.85em; color: var(--muted); }
.tpl-terracotta .footnotes ol { padding-left: 1.4em; }
.tpl-terracotta .footnotes li { margin: 0.4em 0; }
.tpl-terracotta .footnote-backref { border: none; }


/* ===== mint ===== */
/* ============================================================
   模版 22 · 薄荷  Mint
   Hanken Grotesk · 中 Noto Sans SC · 代码 JetBrains Mono
   清冷薄荷绿 · 干净无衬线 · 基准 17px · 比例 1.2 · 行高 1.7
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-mint {
  --md-base: 17px;
  --md-ratio: 1.2;
  --md-lh: 1.7;
  --md-measure: 70ch;
  --md-h1: 35.2px;
  --md-h2: 24.5px;
  --md-h3: 20.4px;
  --md-h4: 17px;
  --md-h5: 14.2px;
  --md-h6: 13px;

  --md-sans: "Hanken Grotesk", "Noto Sans SC", system-ui, sans-serif;
  --md-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #f7fbfa;
  --fg: #1b2b29;
  --muted: #5f7a76;
  --faint: #e9f4f1;
  --accent: #0d9488;
  --accent-soft: #d7efeb;
  --rule: #d6e8e3;
  --code-bg: #ebf5f2;
  --code-fg: #35514c;

  font-family: var(--md-sans);
  font-size: var(--md-base);
  line-height: var(--md-lh);
  color: var(--fg);
  background: var(--bg);
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4.5rem 2.2rem 7rem;
}

.tpl-mint[data-theme="dark"] {
  --bg: #0c1413;
  --fg: #dcebe8;
  --muted: #7e9a95;
  --faint: #131f1d;
  --accent: #2dd4bf;
  --accent-soft: #11302c;
  --rule: #1e2e2b;
  --code-bg: #121d1b;
  --code-fg: #bcd4cf;
}

.tpl-mint > * { margin: 0 0 1.05em; }
.tpl-mint > *:first-child { margin-top: 0; }

.tpl-mint h1, .tpl-mint h2, .tpl-mint h3,
.tpl-mint h4, .tpl-mint h5, .tpl-mint h6 {
  font-family: var(--md-sans); color: var(--fg); line-height: 1.22; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance;
}
.tpl-mint h1 { font-size: var(--md-h1); font-weight: 800; margin: 0 0 0.5em; letter-spacing: -0.03em; }
.tpl-mint h2 { font-size: var(--md-h2); margin: 2.2em 0 0.5em; }
.tpl-mint h2::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 2px; background: var(--accent); margin-right: 0.45em; vertical-align: middle; }
.tpl-mint h3 { font-size: var(--md-h3); margin: 1.8em 0 0.4em; }
.tpl-mint h4 { font-size: var(--md-h4); margin: 1.4em 0 0.3em; }
.tpl-mint h5 { font-size: var(--md-h5); margin: 1.3em 0 0.3em; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 600; }
.tpl-mint h6 { font-size: var(--md-h6); margin: 1.3em 0 0.3em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }

.tpl-mint p { margin: 0 0 1.05em; }
.tpl-mint .lead { font-size: 1.22em; line-height: 1.5; color: var(--muted); font-weight: 400; letter-spacing: -0.01em; }

.tpl-mint strong { font-weight: 700; color: var(--fg); }
.tpl-mint em { font-style: italic; }
.tpl-mint s, .tpl-mint del { color: var(--muted); }
.tpl-mint a { color: var(--accent); text-decoration: none; font-weight: 600; background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .2s; }
.tpl-mint a:hover { background-size: 100% 2px; }
.tpl-mint code { font-family: var(--md-mono); font-size: 0.85em; background: var(--code-bg); color: var(--accent); padding: 0.14em 0.42em; border-radius: 5px; }

.tpl-mint blockquote {
  margin: 1.6em 0; padding: 0.8em 1.2em; background: var(--accent-soft); border-radius: 0 10px 10px 0;
  border-left: 3px solid var(--accent); color: var(--fg);
}
.tpl-mint blockquote p { margin: 0 0 0.5em; }
.tpl-mint blockquote p:last-child { margin: 0; font-size: 0.88em; color: var(--muted); }

.tpl-mint ul, .tpl-mint ol { padding-left: 1.4em; margin: 0 0 1.05em; }
.tpl-mint li { margin: 0.35em 0; }
.tpl-mint li::marker { color: var(--accent); }
.tpl-mint ul ul, .tpl-mint ol ol, .tpl-mint ul ol, .tpl-mint ol ul { margin: 0.35em 0; }

.tpl-mint .contains-task-list { list-style: none; padding-left: 0; }
.tpl-mint .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-mint .task-list-item input { appearance: none; -webkit-appearance: none; width: 1.1em; height: 1.1em; margin: 0; flex: none; border: 1.5px solid var(--rule); border-radius: 5px; position: relative; top: 0.16em; background: var(--bg); }
.tpl-mint .task-list-item input:checked { background: var(--accent); border-color: var(--accent); }
.tpl-mint .task-list-item input:checked::after { content: ""; position: absolute; left: 0.34em; top: 0.12em; width: 0.26em; height: 0.52em; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.tpl-mint li:has(input:checked) { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule); }

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

.tpl-mint .tok-com  { color: #82a39d; font-style: italic; }
.tpl-mint .tok-kw   { color: #0d9488; }
.tpl-mint .tok-fn   { color: #2563eb; }
.tpl-mint .tok-str  { color: #15803d; }
.tpl-mint .tok-num  { color: #c2682e; }
.tpl-mint .tok-type { color: #7c3aed; }
.tpl-mint .tok-op, .tpl-mint .tok-punc { color: var(--muted); }
.tpl-mint .tok-var  { color: var(--code-fg); }
.tpl-mint[data-theme="dark"] .tok-com  { color: #5f7a75; }
.tpl-mint[data-theme="dark"] .tok-kw   { color: #2dd4bf; }
.tpl-mint[data-theme="dark"] .tok-fn   { color: #7fb0f0; }
.tpl-mint[data-theme="dark"] .tok-str  { color: #6ee79f; }
.tpl-mint[data-theme="dark"] .tok-num  { color: #f0b070; }
.tpl-mint[data-theme="dark"] .tok-type { color: #c4a0f0; }

.tpl-mint table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.92em; }
.tpl-mint thead th { text-align: left; font-weight: 600; padding: 0.55em 0.9em; background: var(--faint); border-bottom: 1px solid var(--rule); color: var(--accent); font-size: 0.86em; text-transform: uppercase; letter-spacing: 0.04em; }
.tpl-mint tbody td { padding: 0.55em 0.9em; border-bottom: 1px solid var(--rule); }
.tpl-mint tbody tr:last-child td { border-bottom: none; }

.tpl-mint .callout { margin: 1.5em 0; padding: 1em 1.2em; border-radius: 10px; background: var(--faint); }
.tpl-mint .callout p { margin: 0 0 0.4em; }
.tpl-mint .callout p:last-child { margin: 0; }
.tpl-mint .callout-title { font-weight: 700; font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.45em !important; }
.tpl-mint .callout-note    { background: color-mix(in srgb, #3b82f6 9%, var(--bg)); }
.tpl-mint .callout-note .callout-title { color: #3b82f6; }
.tpl-mint .callout-tip     { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); }
.tpl-mint .callout-tip .callout-title { color: var(--accent); }
.tpl-mint .callout-warning { background: color-mix(in srgb, #f59e0b 13%, var(--bg)); }
.tpl-mint .callout-warning .callout-title { color: #c2780a; }

.tpl-mint hr { border: none; height: 1px; background: var(--rule); margin: 2.6em 0; position: relative; }
.tpl-mint hr::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--accent); }

.tpl-mint figure { margin: 1.8em 0; }
.tpl-mint img { max-width: 100%; border-radius: 10px; }
.tpl-mint .img-placeholder { display: flex; align-items: center; justify-content: center; height: 220px; border-radius: 10px; background: var(--faint); color: var(--accent); }
.tpl-mint figcaption { font-size: 0.84em; color: var(--muted); margin-top: 0.7em; line-height: 1.45; text-wrap: pretty; }

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

.tpl-mint .footnote-ref a { font-size: 0.72em; vertical-align: super; background: none; font-weight: 700; color: var(--accent); }
.tpl-mint .footnotes { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 0.86em; color: var(--muted); }
.tpl-mint .footnotes ol { padding-left: 1.3em; }
.tpl-mint .footnotes li { margin: 0.4em 0; }
.tpl-mint .footnote-backref { background: none; }


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

.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; }


/* ===== noir ===== */
/* ============================================================
   模版 24 · 黑金 Noir
   标题 Cormorant Garamond · 正文 EB Garamond · 中 Noto Serif SC
   奢华黑金 · 戏剧高级感 · 基准 19px · 比例 1.25 · 行高 1.7
   亮色 = 象牙金;暗色 = 纯黑 + 暖金(本组主场)
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-noir {
  --md-base: 19px;
  --md-ratio: 1.25;
  --md-lh: 1.7;
  --md-measure: 64ch;
  --md-h1: 52px;
  --md-h2: 33px;
  --md-h3: 25px;
  --md-h4: 19px;
  --md-h5: 14.5px;
  --md-h6: 13px;

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

  --bg: #f6f2e8;
  --fg: #1d1a14;
  --muted: #807458;
  --faint: #ede6d4;
  --accent: #9a7424;
  --accent-soft: #efe6cf;
  --rule: #ddd2b8;
  --code-bg: #ece5d2;
  --code-fg: #544c38;

  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: 4.5rem 2.6rem 7rem;
}

.tpl-noir[data-theme="dark"] {
  --bg: #0a0907;
  --fg: #e9e2d2;
  --muted: #9a8f74;
  --faint: #15130d;
  --accent: #c9a86a;
  --accent-soft: #1c1810;
  --rule: #2c2618;
  --code-bg: #14120c;
  --code-fg: #cabfa4;
}

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

.tpl-noir h1, .tpl-noir h2, .tpl-noir h3, .tpl-noir h4 {
  font-family: var(--md-display); color: var(--fg); text-wrap: balance; line-height: 1.1;
}
.tpl-noir h1 { font-size: var(--md-h1); font-weight: 500; text-align: center; margin: 0 0 0.5em; line-height: 1.02; letter-spacing: 0.01em; }
.tpl-noir h1::after { content: ""; display: block; width: 3em; height: 1px; background: var(--accent); margin: 0.5em auto 0; }
.tpl-noir h2 { font-size: var(--md-h2); font-weight: 600; margin: 1.8em 0 0.5em; }
.tpl-noir h3 { font-size: var(--md-h3); font-weight: 600; margin: 1.5em 0 0.4em; font-style: italic; }
.tpl-noir h4 { font-family: var(--md-body); font-size: var(--md-h4); font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; margin: 1.3em 0 0.3em; color: var(--accent); }
.tpl-noir h5 { font-family: var(--md-body); font-size: var(--md-h5); font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; margin: 1.2em 0 0.3em; color: var(--accent); }
.tpl-noir h6 { font-family: var(--md-body); font-size: var(--md-h6); font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; margin: 1.2em 0 0.3em; color: var(--muted); }

.tpl-noir p { margin: 0 0 1em; }
.tpl-noir .lead { font-family: var(--md-display); font-size: 1.5em; line-height: 1.35; font-style: italic; font-weight: 400; color: var(--muted); text-align: center; }

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

.tpl-noir blockquote {
  margin: 2em 0; padding: 0; border: none; text-align: center;
  font-family: var(--md-display); font-style: italic; font-size: 1.6em; line-height: 1.3; color: var(--fg);
}
.tpl-noir blockquote::before { content: ""; display: block; width: 2em; height: 1px; background: var(--accent); margin: 0 auto 0.7em; }
.tpl-noir blockquote p { margin: 0 0 0.3em; }
.tpl-noir blockquote p:last-child { font-family: var(--md-body); font-style: normal; font-size: 0.46em; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); }

.tpl-noir ul, .tpl-noir ol { padding-left: 1.5em; margin: 0 0 1em; }
.tpl-noir li { margin: 0.4em 0; }
.tpl-noir li::marker { color: var(--accent); }
.tpl-noir ul { list-style: none; padding-left: 1.4em; }
.tpl-noir ul > li { position: relative; }
.tpl-noir ul > li::before { content: "◆"; position: absolute; left: -1.4em; color: var(--accent); font-size: 0.6em; top: 0.5em; }
.tpl-noir ul ul, .tpl-noir ol ol, .tpl-noir ul ol, .tpl-noir ol ul { margin: 0.4em 0; }

.tpl-noir .contains-task-list { list-style: none; padding-left: 0; }
.tpl-noir .contains-task-list > li::before { content: none; }
.tpl-noir .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-noir .task-list-item input { appearance: none; -webkit-appearance: none; width: 1em; height: 1em; margin: 0; flex: none; border: 1px solid var(--accent); position: relative; top: 0.15em; background: transparent; }
.tpl-noir .task-list-item input:checked { background: var(--accent); }
.tpl-noir .task-list-item input:checked::after { content: ""; position: absolute; left: 0.3em; top: 0.08em; width: 0.22em; height: 0.48em; border: solid var(--bg); border-width: 0 1.5px 1.5px 0; transform: rotate(42deg); }
.tpl-noir li:has(input:checked) { color: var(--muted); }

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

.tpl-noir .tok-com  { color: #a3946e; font-style: italic; }
.tpl-noir .tok-kw   { color: #9a7424; }
.tpl-noir .tok-fn   { color: #6a6a8a; }
.tpl-noir .tok-str  { color: #5e7250; }
.tpl-noir .tok-num  { color: #8a6a2a; }
.tpl-noir .tok-type { color: #7a5a6a; }
.tpl-noir .tok-op, .tpl-noir .tok-punc { color: var(--muted); }
.tpl-noir .tok-var  { color: var(--code-fg); }
.tpl-noir[data-theme="dark"] .tok-com  { color: #8a7d5e; }
.tpl-noir[data-theme="dark"] .tok-kw   { color: #c9a86a; }
.tpl-noir[data-theme="dark"] .tok-fn   { color: #a8a8c8; }
.tpl-noir[data-theme="dark"] .tok-str  { color: #a0b488; }
.tpl-noir[data-theme="dark"] .tok-num  { color: #d4b478; }
.tpl-noir[data-theme="dark"] .tok-type { color: #c4a0b4; }

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

.tpl-noir .callout { margin: 1.8em 0; padding: 1.1em 1.3em; border: 1px solid var(--rule); background: var(--faint); }
.tpl-noir .callout p { margin: 0 0 0.4em; }
.tpl-noir .callout p:last-child { margin: 0; }
.tpl-noir .callout-title { font-family: var(--md-body); font-weight: 500; font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.16em; }
.tpl-noir .callout-note    { border-left: 2px solid #6a7a9a; }
.tpl-noir .callout-note .callout-title { color: #6a7a9a; }
.tpl-noir .callout-tip     { border-left: 2px solid #6a8a5e; }
.tpl-noir .callout-tip .callout-title { color: #6a8a5e; }
.tpl-noir .callout-warning { border-left: 2px solid var(--accent); }
.tpl-noir .callout-warning .callout-title { color: var(--accent); }

.tpl-noir hr { border: none; height: 1em; margin: 2.6em 0; text-align: center; }
.tpl-noir hr::before { content: "❖"; color: var(--accent); letter-spacing: 0.4em; }

.tpl-noir figure { margin: 2.2em 0; text-align: center; }
.tpl-noir img { max-width: 100%; }
.tpl-noir .img-placeholder { display: flex; align-items: center; justify-content: center; height: 250px; border: 1px solid var(--accent); background: var(--faint); color: var(--accent); }
.tpl-noir figcaption { font-family: var(--md-body); font-style: italic; font-size: 0.82em; color: var(--muted); margin-top: 0.7em; line-height: 1.4; text-wrap: pretty; }

.tpl-noir math { font-size: 1.04em; }
.tpl-noir .math-block { margin: 2em 0; text-align: center; overflow-x: auto; font-size: 1.18em; }

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


/* ===== marcellus ===== */
/* ============================================================
   模版 25 · 碑铭 Marcellus
   标题 Marcellus(古典罗马大写)· 正文 Spectral · 中 Noto Serif SC
   建筑铭文感 · 基准 19px · 比例 1.25 · 行高 1.72 · 石色 + 古铜
   ============================================================ */
/* fonts bundled locally via templates/_fonts.css */

.tpl-marcellus {
  --md-base: 19px;
  --md-ratio: 1.25;
  --md-lh: 1.72;
  --md-measure: 66ch;
  --md-h1: 44px;
  --md-h2: 31px;
  --md-h3: 24px;
  --md-h4: 19px;
  --md-h5: 15px;
  --md-h6: 13.5px;

  --md-display: "Marcellus", "Noto Serif SC", "Trajan Pro", Georgia, serif;
  --md-body: "Spectral", "Noto Serif SC", Georgia, serif;
  --md-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #f7f5ef;
  --fg: #2d2b25;
  --muted: #837c6c;
  --faint: #eeeae0;
  --accent: #8a6d3b;
  --accent-soft: #ece3d2;
  --rule: #ddd6c6;
  --code-bg: #ece8dd;
  --code-fg: #54503f;

  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;
  text-rendering: optimizeLegibility;
  max-width: var(--md-measure);
  margin: 0 auto;
  padding: 4.5rem 2.6rem 7rem;
}

.tpl-marcellus[data-theme="dark"] {
  --bg: #1a1813;
  --fg: #e6e0d2;
  --muted: #a09782;
  --faint: #232017;
  --accent: #c5a063;
  --accent-soft: #2a2417;
  --rule: #353020;
  --code-bg: #232017;
  --code-fg: #cabfa6;
}

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

.tpl-marcellus h1, .tpl-marcellus h2, .tpl-marcellus h3, .tpl-marcellus h4 {
  font-family: var(--md-display); color: var(--fg); text-wrap: balance; line-height: 1.16; font-weight: 400;
}
.tpl-marcellus h1 { font-size: var(--md-h1); text-align: center; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.6em; line-height: 1.1; }
.tpl-marcellus h2 { font-size: var(--md-h2); text-transform: uppercase; letter-spacing: 0.05em; margin: 1.8em 0 0.5em; padding-bottom: 0.25em; border-bottom: 1px solid var(--rule); }
.tpl-marcellus h3 { font-size: var(--md-h3); letter-spacing: 0.03em; margin: 1.5em 0 0.4em; }
.tpl-marcellus h4 { font-size: var(--md-h4); letter-spacing: 0.06em; text-transform: uppercase; margin: 1.3em 0 0.3em; color: var(--accent); }
.tpl-marcellus h5 { font-family: var(--md-body); font-size: var(--md-h5); font-weight: 600; font-variant: small-caps; letter-spacing: 0.08em; margin: 1.2em 0 0.3em; color: var(--accent); }
.tpl-marcellus h6 { font-family: var(--md-body); font-size: var(--md-h6); font-weight: 600; font-variant: small-caps; letter-spacing: 0.06em; margin: 1.2em 0 0.3em; color: var(--muted); }

.tpl-marcellus p { margin: 0 0 1em; }
.tpl-marcellus .lead { font-size: 1.18em; line-height: 1.5; color: var(--muted); font-style: italic; text-align: center; }

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

.tpl-marcellus blockquote {
  margin: 1.8em 0; padding: 0 1.5em; border: none; text-align: center;
  font-style: italic; color: var(--muted); font-size: 1.12em;
}
.tpl-marcellus blockquote p { margin: 0 0 0.4em; }
.tpl-marcellus blockquote p:last-child { margin: 0; font-style: normal; font-family: var(--md-display); font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }

.tpl-marcellus ul, .tpl-marcellus ol { padding-left: 1.5em; margin: 0 0 1em; }
.tpl-marcellus li { margin: 0.4em 0; }
.tpl-marcellus li::marker { color: var(--accent); }
.tpl-marcellus ul ul, .tpl-marcellus ol ol, .tpl-marcellus ul ol, .tpl-marcellus ol ul { margin: 0.4em 0; }

.tpl-marcellus .contains-task-list { list-style: none; padding-left: 0; }
.tpl-marcellus .task-list-item { display: flex; align-items: baseline; gap: 0.6em; }
.tpl-marcellus .task-list-item input { appearance: none; -webkit-appearance: none; width: 1.05em; height: 1.05em; margin: 0; flex: none; border: 1px solid var(--accent); position: relative; top: 0.16em; background: var(--bg); }
.tpl-marcellus .task-list-item input:checked { background: var(--accent); }
.tpl-marcellus .task-list-item input:checked::after { content: ""; position: absolute; left: 0.32em; top: 0.1em; width: 0.22em; height: 0.48em; border: solid var(--bg); border-width: 0 1.5px 1.5px 0; transform: rotate(42deg); }
.tpl-marcellus li:has(input:checked) { color: var(--muted); }

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

.tpl-marcellus .tok-com  { color: #a3987c; font-style: italic; }
.tpl-marcellus .tok-kw   { color: #8a6d3b; }
.tpl-marcellus .tok-fn   { color: #4a6080; }
.tpl-marcellus .tok-str  { color: #5e7450; }
.tpl-marcellus .tok-num  { color: #946e2e; }
.tpl-marcellus .tok-type { color: #7a5278; }
.tpl-marcellus .tok-op, .tpl-marcellus .tok-punc { color: var(--muted); }
.tpl-marcellus .tok-var  { color: var(--code-fg); }
.tpl-marcellus[data-theme="dark"] .tok-com  { color: #8a8068; }
.tpl-marcellus[data-theme="dark"] .tok-kw   { color: #c5a063; }
.tpl-marcellus[data-theme="dark"] .tok-fn   { color: #8aa6c4; }
.tpl-marcellus[data-theme="dark"] .tok-str  { color: #a4c090; }
.tpl-marcellus[data-theme="dark"] .tok-num  { color: #d4ad6a; }
.tpl-marcellus[data-theme="dark"] .tok-type { color: #c49bc0; }

.tpl-marcellus table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 0.88em; }
.tpl-marcellus thead th { font-family: var(--md-display); text-align: left; font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.45em 0.8em; border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.tpl-marcellus tbody td { padding: 0.5em 0.8em; border-bottom: 1px solid var(--rule); }
.tpl-marcellus tbody tr:last-child td { border-bottom: 1px solid var(--accent); }

.tpl-marcellus .callout { margin: 1.8em 0; padding: 1em 1.2em; border: 1px solid var(--rule); background: var(--faint); border-left: 3px solid var(--accent); }
.tpl-marcellus .callout p { margin: 0 0 0.4em; }
.tpl-marcellus .callout p:last-child { margin: 0; }
.tpl-marcellus .callout-title { font-variant: small-caps; font-weight: 600; font-size: 0.92em; letter-spacing: 0.05em; }
.tpl-marcellus .callout-note    { border-left-color: #5a7090; }
.tpl-marcellus .callout-note .callout-title { color: #5a7090; }
.tpl-marcellus .callout-tip     { border-left-color: #5e8056; }
.tpl-marcellus .callout-tip .callout-title { color: #5e8056; }
.tpl-marcellus .callout-warning { border-left-color: var(--accent); }
.tpl-marcellus .callout-warning .callout-title { color: var(--accent); }

.tpl-marcellus hr { border: none; height: 1em; margin: 2.4em 0; text-align: center; }
.tpl-marcellus hr::before { content: "· I · I ·"; color: var(--accent); letter-spacing: 0.3em; font-family: var(--md-display); }

.tpl-marcellus figure { margin: 2em 0; text-align: center; }
.tpl-marcellus img { max-width: 100%; }
.tpl-marcellus .img-placeholder { display: flex; align-items: center; justify-content: center; height: 230px; border: 1px solid var(--rule); background: var(--faint); color: var(--accent); }
.tpl-marcellus figcaption { font-variant: small-caps; font-size: 0.85em; letter-spacing: 0.05em; color: var(--muted); margin-top: 0.6em; line-height: 1.4; text-wrap: pretty; }

.tpl-marcellus math { font-size: 1.04em; }
.tpl-marcellus .math-block { margin: 1.8em 0; text-align: center; overflow-x: auto; font-size: 1.16em; }

.tpl-marcellus .footnote-ref a { font-size: 0.72em; vertical-align: super; border: none; color: var(--accent); }
.tpl-marcellus .footnotes { margin-top: 2.8em; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 0.82em; color: var(--muted); }
.tpl-marcellus .footnotes ol { padding-left: 1.4em; }
.tpl-marcellus .footnotes li { margin: 0.4em 0; }
.tpl-marcellus .footnote-backref { border: none; }


/* ===== songti ===== */
/* ============================================================
   模版 55 · 宋韵  Songti Elegant
   标题 Noto Serif SC · 正文 Noto Serif SC
   中文优先·宋体雅致·左竖线标题·宽行距
   作用域 .tpl-songti · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-songti{
  --md-base:18px; --md-ratio:1.25; --md-lh:1.95; --md-measure:39em;
  --md-h1:35.2px; --md-h2:28.1px; --md-h3:22.5px; --md-h4:18px; --md-h5:14.4px; --md-h6:13.6px;
  --md-head:"Noto Serif SC","Noto Serif SC",Georgia,serif; --md-body:"Noto Serif SC","Noto Serif SC",Georgia,serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#faf7f4; --fg:#2a2420; --muted:#857a70; --faint:#f0e9e2;
  --accent:#9c4a3a; --accent-soft:#f3e3de; --rule:#e7ddd2; --code-bg:#f0e9e2; --code-fg:#52483f;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:5.5rem 3rem 8rem;
}
.tpl-songti[data-theme="dark"]{
  --bg:#181410; --fg:#e6ddd2; --muted:#a09386; --faint:#201a15;
  --accent:#d4806c; --accent-soft:#281d18; --rule:#322820; --code-bg:#201a15; --code-fg:#cbbfb0;
}
.tpl-songti>*{margin:0 0 1em;} .tpl-songti>*:first-child{margin-top:0;}

.tpl-songti h1,.tpl-songti h2,.tpl-songti h3,.tpl-songti h4,.tpl-songti h5,.tpl-songti h6{color:var(--fg);text-wrap:balance;}
.tpl-songti h1,.tpl-songti h2,.tpl-songti h3,.tpl-songti h4{font-family:var(--md-head);}
.tpl-songti h5{font-family:var(--md-body);font-size:14.4px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-songti h6{font-family:var(--md-body);font-size:13.6px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-songti h1{font-size:35.2px;font-weight:600;line-height:1.25;letter-spacing:.04em;margin:0 0 .7em;padding-left:.55em;border-left:5px solid var(--accent);}
.tpl-songti h2{font-size:28.1px;font-weight:600;line-height:1.45;letter-spacing:.03em;margin:2em 0 .6em;padding-left:.5em;border-left:3px solid var(--accent);}
.tpl-songti h3{font-size:22.5px;font-weight:600;line-height:1.5;margin:1.6em 0 .4em;color:var(--muted);}
.tpl-songti h4{font-size:18px;font-weight:600;line-height:1.5;margin:1.3em 0 .3em;}

.tpl-songti p{margin:0 0 1em;}
.tpl-songti .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;}
.tpl-songti strong{font-weight:600;color:var(--fg);}
.tpl-songti em{font-style:italic;}
.tpl-songti s,.tpl-songti del{color:var(--muted);}
.tpl-songti mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-songti code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-songti a{color:var(--accent);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;}.tpl-songti a:hover{background:var(--accent-soft);}

.tpl-songti blockquote{margin:1.6em 0;padding:1em 1.3em;background:var(--accent-soft);border-radius:10px;color:var(--fg);}
.tpl-songti blockquote p{margin:0 0 .5em;}.tpl-songti blockquote p:last-child{margin:0;font-size:.86em;color:var(--muted);}

.tpl-songti ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-songti ul>li{margin:.4em 0;position:relative;}.tpl-songti ul>li::before{content:"";position:absolute;left:-1.05em;top:.62em;width:.4em;height:.4em;border-radius:50%;background:var(--accent);}
.tpl-songti ol{padding-left:1.5em;margin:0 0 1em;}.tpl-songti ol li{margin:.4em 0;}.tpl-songti ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-songti ul ul,.tpl-songti ol ol,.tpl-songti ul ol,.tpl-songti ol ul{margin:.4em 0;}
.tpl-songti .contains-task-list{list-style:none;padding-left:0;}
.tpl-songti .contains-task-list>li::before{content:none;}
.tpl-songti .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-songti .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-songti .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-songti .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-songti li:has(input:checked){color:var(--muted);}

.tpl-songti pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-songti pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-songti .tok-com{color:#b0a09e;font-style:italic;}
.tpl-songti .tok-kw{color:#b03030;}
.tpl-songti .tok-fn{color:#4a6a9a;}
.tpl-songti .tok-str{color:#4f8050;}
.tpl-songti .tok-num{color:#a87a3e;}
.tpl-songti .tok-type{color:#8a4a72;}
.tpl-songti .tok-op,.tpl-songti .tok-punc{color:var(--muted);}
.tpl-songti .tok-var{color:var(--code-fg);}
.tpl-songti[data-theme="dark"] .tok-com{color:#9a8c8a;}
.tpl-songti[data-theme="dark"] .tok-kw{color:#e87a7a;}
.tpl-songti[data-theme="dark"] .tok-fn{color:#9aa6e0;}
.tpl-songti[data-theme="dark"] .tok-str{color:#a4c490;}
.tpl-songti[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-songti[data-theme="dark"] .tok-type{color:#c79bbf;}

.tpl-songti table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-songti thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-songti tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-songti tbody tr:last-child td{border-bottom:none;}

.tpl-songti .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-songti .callout p{margin:0 0 .4em;} .tpl-songti .callout p:last-child{margin:0;}
.tpl-songti .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-songti .callout-note{border-left-color:#4a6f8a;} .tpl-songti .callout-note .callout-title{color:#4a6f8a;}
.tpl-songti .callout-tip{border-left-color:#5f7a4e;} .tpl-songti .callout-tip .callout-title{color:#5f7a4e;}
.tpl-songti .callout-warning{border-left-color:#a8702a;} .tpl-songti .callout-warning .callout-title{color:#a8702a;}

.tpl-songti hr{border:none;height:1px;background:var(--rule);margin:2.6em 0;position:relative;}.tpl-songti hr::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:.5em;height:.5em;border-radius:50%;background:var(--accent);}

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

.tpl-songti math{font-size:1.04em;}
.tpl-songti .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-songti .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-songti .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-songti .footnotes p{}
.tpl-songti .footnotes ol{padding-left:1.4em;} .tpl-songti .footnotes li{margin:.4em 0;}
.tpl-songti .footnote-backref{border:none;background:none;}


/* ===== inkwash ===== */
/* ============================================================
   模版 85 · 水墨  Ink Wash
   标题 霞鹜文楷 · 正文 霞鹜文楷 · 霞鹜文楷
   中文优先·文楷水墨·单色·中心结分隔·宽行距
   作用域 .tpl-inkwash · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-inkwash{
  --md-base:18px; --md-ratio:1.25; --md-lh:2; --md-measure:39em;
  --md-h1:35.2px; --md-h2:28.1px; --md-h3:22.5px; --md-h4:18px; --md-h5:14.4px; --md-h6:13.6px;
  --md-head:"LXGW WenKai","Noto Serif SC",serif; --md-body:"LXGW WenKai","Noto Serif SC",serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#f6f6f4; --fg:#262628; --muted:#6e6e70; --faint:#ececea;
  --accent:#404044; --accent-soft:#e8e8e8; --rule:#dcdcda; --code-bg:#ececea; --code-fg:#44444a;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:5.5rem 3rem 8rem;
}
.tpl-inkwash[data-theme="dark"]{
  --bg:#121213; --fg:#d8d8da; --muted:#84848a; --faint:#1a1a1b;
  --accent:#9c9ca6; --accent-soft:#1f1f21; --rule:#28282b; --code-bg:#1a1a1b; --code-fg:#c0c0c4;
}
.tpl-inkwash>*{margin:0 0 1em;} .tpl-inkwash>*:first-child{margin-top:0;}

.tpl-inkwash h1,.tpl-inkwash h2,.tpl-inkwash h3,.tpl-inkwash h4,.tpl-inkwash h5,.tpl-inkwash h6{color:var(--fg);text-wrap:balance;}
.tpl-inkwash h1,.tpl-inkwash h2,.tpl-inkwash h3,.tpl-inkwash h4{font-family:var(--md-head);}
.tpl-inkwash h5{font-family:var(--md-body);font-size:14.4px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-inkwash h6{font-family:var(--md-body);font-size:13.6px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-inkwash h1{font-size:35.2px;font-weight:600;line-height:1.25;letter-spacing:.04em;margin:0 0 .7em;padding-left:.55em;border-left:5px solid var(--accent);}
.tpl-inkwash h2{font-size:28.1px;font-weight:600;line-height:1.45;letter-spacing:.03em;margin:2em 0 .6em;padding-left:.5em;border-left:3px solid var(--accent);}
.tpl-inkwash h3{font-size:22.5px;font-weight:600;line-height:1.5;margin:1.6em 0 .4em;color:var(--muted);}
.tpl-inkwash h4{font-size:18px;font-weight:600;line-height:1.5;margin:1.3em 0 .3em;}

.tpl-inkwash p{margin:0 0 1em;}
.tpl-inkwash .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;}
.tpl-inkwash strong{font-weight:600;color:var(--fg);}
.tpl-inkwash em{font-style:italic;}
.tpl-inkwash s,.tpl-inkwash del{color:var(--muted);}
.tpl-inkwash mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-inkwash code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-inkwash a{color:var(--accent);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;}.tpl-inkwash a:hover{background:var(--accent-soft);}

.tpl-inkwash blockquote{margin:1.7em 0;padding-left:1.5em;border-left:1px solid var(--rule);font-style:italic;color:var(--muted);font-size:1.05em;}
.tpl-inkwash blockquote p{margin:0 0 .5em;}.tpl-inkwash blockquote p:last-child{margin:0;font-style:normal;font-size:.82em;letter-spacing:.04em;text-transform:uppercase;}

.tpl-inkwash ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-inkwash ul>li{margin:.4em 0;position:relative;}.tpl-inkwash ul>li::before{content:"";position:absolute;left:-1.05em;top:.62em;width:.4em;height:.4em;border-radius:50%;background:var(--accent);}
.tpl-inkwash ol{padding-left:1.5em;margin:0 0 1em;}.tpl-inkwash ol li{margin:.4em 0;}.tpl-inkwash ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-inkwash ul ul,.tpl-inkwash ol ol,.tpl-inkwash ul ol,.tpl-inkwash ol ul{margin:.4em 0;}
.tpl-inkwash .contains-task-list{list-style:none;padding-left:0;}
.tpl-inkwash .contains-task-list>li::before{content:none;}
.tpl-inkwash .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-inkwash .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-inkwash .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-inkwash .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-inkwash li:has(input:checked){color:var(--muted);}

.tpl-inkwash pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-inkwash pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-inkwash .tok-com{color:#6e6e72;font-style:italic;}
.tpl-inkwash .tok-kw{color:#2a2a2c;}
.tpl-inkwash .tok-fn{color:#2a2a2c;}
.tpl-inkwash .tok-str{color:#6a6a6a;}
.tpl-inkwash .tok-num{color:#6a6a6a;}
.tpl-inkwash .tok-type{color:#2a2a2c;}
.tpl-inkwash .tok-op,.tpl-inkwash .tok-punc{color:var(--muted);}
.tpl-inkwash .tok-var{color:var(--code-fg);}
.tpl-inkwash[data-theme="dark"] .tok-com{color:#6e6e72;}
.tpl-inkwash[data-theme="dark"] .tok-kw{color:#2a2a2c;}
.tpl-inkwash[data-theme="dark"] .tok-fn{color:#2a2a2c;}
.tpl-inkwash[data-theme="dark"] .tok-str{color:#9a9a9a;}
.tpl-inkwash[data-theme="dark"] .tok-num{color:#9a9a9a;}
.tpl-inkwash[data-theme="dark"] .tok-type{color:#2a2a2c;}

.tpl-inkwash table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-inkwash thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-inkwash tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-inkwash tbody tr:last-child td{border-bottom:none;}

.tpl-inkwash .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-inkwash .callout p{margin:0 0 .4em;} .tpl-inkwash .callout p:last-child{margin:0;}
.tpl-inkwash .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-inkwash .callout-note{border-left-color:#566;} .tpl-inkwash .callout-note .callout-title{color:#566;}
.tpl-inkwash .callout-tip{border-left-color:#4f6a52;} .tpl-inkwash .callout-tip .callout-title{color:#4f6a52;}
.tpl-inkwash .callout-warning{border-left-color:#9a7a3a;} .tpl-inkwash .callout-warning .callout-title{color:#9a7a3a;}

.tpl-inkwash hr{border:none;height:1px;background:var(--rule);margin:2.6em 0;position:relative;}.tpl-inkwash hr::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:.5em;height:.5em;border-radius:50%;background:var(--accent);}

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

.tpl-inkwash math{font-size:1.04em;}
.tpl-inkwash .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-inkwash .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-inkwash .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-inkwash .footnotes p{}
.tpl-inkwash .footnotes ol{padding-left:1.4em;} .tpl-inkwash .footnotes li{margin:.4em 0;}
.tpl-inkwash .footnote-backref{border:none;background:none;}


/* ===== celadon ===== */
/* ============================================================
   模版 30 · 青瓷  Celadon
   标题 霞鹜文楷 · 正文 霞鹜文楷 · 霞鹜文楷
   中式青灰·文楷·竖向呼吸·左竖线标题·淡卡片引用
   作用域 .tpl-celadon · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-celadon{
  --md-base:18px; --md-ratio:1.25; --md-lh:1.95; --md-measure:40em;
  --md-h1:35.2px; --md-h2:28.1px; --md-h3:22.5px; --md-h4:18px; --md-h5:14.4px; --md-h6:13.6px;
  --md-head:"LXGW WenKai","Noto Serif SC",serif; --md-body:"LXGW WenKai","Noto Serif SC",serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#eef3f0; --fg:#26302c; --muted:#6f827b; --faint:#e2ebe6;
  --accent:#3f7a6a; --accent-soft:#dfeae5; --rule:#d4e0da; --code-bg:#e2ebe6; --code-fg:#44524d;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:5.5rem 3rem 8rem;
}
.tpl-celadon[data-theme="dark"]{
  --bg:#101714; --fg:#d6e0db; --muted:#809289; --faint:#172019;
  --accent:#6fb0a0; --accent-soft:#16241e; --rule:#23302a; --code-bg:#172019; --code-fg:#bccbc4;
}
.tpl-celadon>*{margin:0 0 1em;} .tpl-celadon>*:first-child{margin-top:0;}

.tpl-celadon h1,.tpl-celadon h2,.tpl-celadon h3,.tpl-celadon h4,.tpl-celadon h5,.tpl-celadon h6{color:var(--fg);text-wrap:balance;}
.tpl-celadon h1,.tpl-celadon h2,.tpl-celadon h3,.tpl-celadon h4{font-family:var(--md-head);}
.tpl-celadon h5{font-family:var(--md-body);font-size:14.4px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-celadon h6{font-family:var(--md-body);font-size:13.6px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-celadon h1{font-size:35.2px;font-weight:600;line-height:1.25;letter-spacing:.04em;margin:0 0 .7em;padding-left:.55em;border-left:5px solid var(--accent);}
.tpl-celadon h2{font-size:28.1px;font-weight:600;line-height:1.45;letter-spacing:.03em;margin:2em 0 .6em;padding-left:.5em;border-left:3px solid var(--accent);}
.tpl-celadon h3{font-size:22.5px;font-weight:600;line-height:1.5;margin:1.6em 0 .4em;color:var(--muted);}
.tpl-celadon h4{font-size:18px;font-weight:600;line-height:1.5;margin:1.3em 0 .3em;}

.tpl-celadon p{margin:0 0 1em;}
.tpl-celadon .lead{font-size:1.2em;line-height:1.5;color:var(--muted);}
.tpl-celadon strong{font-weight:700;color:var(--fg);}
.tpl-celadon em{font-style:italic;}
.tpl-celadon s,.tpl-celadon del{color:var(--muted);}
.tpl-celadon mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-celadon code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-celadon a{color:var(--accent);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;}.tpl-celadon a:hover{background:var(--accent-soft);}

.tpl-celadon blockquote{margin:1.6em 0;padding:1em 1.3em;background:var(--accent-soft);border-radius:10px;color:var(--fg);}
.tpl-celadon blockquote p{margin:0 0 .5em;}.tpl-celadon blockquote p:last-child{margin:0;font-size:.86em;color:var(--muted);}

.tpl-celadon ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-celadon ul>li{margin:.4em 0;position:relative;}.tpl-celadon ul>li::before{content:"";position:absolute;left:-1.05em;top:.62em;width:.4em;height:.4em;border-radius:50%;background:var(--accent);}
.tpl-celadon ol{padding-left:1.5em;margin:0 0 1em;}.tpl-celadon ol li{margin:.4em 0;}.tpl-celadon ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-celadon ul ul,.tpl-celadon ol ol,.tpl-celadon ul ol,.tpl-celadon ol ul{margin:.4em 0;}
.tpl-celadon .contains-task-list{list-style:none;padding-left:0;}
.tpl-celadon .contains-task-list>li::before{content:none;}
.tpl-celadon .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-celadon .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-celadon .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-celadon .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-celadon li:has(input:checked){color:var(--muted);}

.tpl-celadon pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-celadon pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-celadon .tok-com{color:#9aa089;font-style:italic;}
.tpl-celadon .tok-kw{color:#5f7a3e;}
.tpl-celadon .tok-fn{color:#3a7a6a;}
.tpl-celadon .tok-str{color:#7a7a2e;}
.tpl-celadon .tok-num{color:#a07a2e;}
.tpl-celadon .tok-type{color:#7a5a82;}
.tpl-celadon .tok-op,.tpl-celadon .tok-punc{color:var(--muted);}
.tpl-celadon .tok-var{color:var(--code-fg);}
.tpl-celadon[data-theme="dark"] .tok-com{color:#88927e;}
.tpl-celadon[data-theme="dark"] .tok-kw{color:#9cc07e;}
.tpl-celadon[data-theme="dark"] .tok-fn{color:#7fc0aa;}
.tpl-celadon[data-theme="dark"] .tok-str{color:#c0c070;}
.tpl-celadon[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-celadon[data-theme="dark"] .tok-type{color:#c4a0cc;}

.tpl-celadon table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-celadon thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-celadon tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-celadon tbody tr:last-child td{border-bottom:none;}

.tpl-celadon .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-celadon .callout p{margin:0 0 .4em;} .tpl-celadon .callout p:last-child{margin:0;}
.tpl-celadon .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-celadon .callout-note{border-left-color:#4a7a8a;} .tpl-celadon .callout-note .callout-title{color:#4a7a8a;}
.tpl-celadon .callout-tip{border-left-color:#3f7a6a;} .tpl-celadon .callout-tip .callout-title{color:#3f7a6a;}
.tpl-celadon .callout-warning{border-left-color:#a8762e;} .tpl-celadon .callout-warning .callout-title{color:#a8762e;}

.tpl-celadon hr{border:none;height:1px;background:var(--rule);margin:2.6em 0;position:relative;}.tpl-celadon hr::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:.5em;height:.5em;border-radius:50%;background:var(--accent);}

.tpl-celadon figure{margin:1.8em 0;text-align:center;}
.tpl-celadon img{max-width:100%;border-radius:6px;}
.tpl-celadon .img-placeholder{display:flex;align-items:center;justify-content:center;height:220px;border-radius:6px;background:var(--faint);color:var(--accent);border:1px solid var(--rule);}
.tpl-celadon figcaption{font-size:.84em;color:var(--muted);margin-top:.6em;line-height:1.45;text-wrap:pretty;}

.tpl-celadon math{font-size:1.04em;}
.tpl-celadon .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-celadon .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-celadon .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-celadon .footnotes p{}
.tpl-celadon .footnotes ol{padding-left:1.4em;} .tpl-celadon .footnotes li{margin:.4em 0;}
.tpl-celadon .footnote-backref{border:none;background:none;}


/* ===== almanac ===== */
/* ============================================================
   模版 59 · 历书  Almanac
   标题 Domine · 正文 Domine
   复古暖灰·尾随细线标题·破折列表
   作用域 .tpl-almanac · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-almanac{
  --md-base:18px; --md-ratio:1.2; --md-lh:1.7; --md-measure:68ch;
  --md-h1:31.1px; --md-h2:25.9px; --md-h3:21.6px; --md-h4:18px; --md-h5:15px; --md-h6:14.2px;
  --md-head:"Domine","Noto Serif SC",Georgia,serif; --md-body:"Domine","Noto Serif SC",Georgia,serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#f9f7f1; --fg:#2b271f; --muted:#7a7263; --faint:#efebe0;
  --accent:#8a6a3a; --accent-soft:#efe6d4; --rule:#e5ddcd; --code-bg:#efebe0; --code-fg:#4e483c;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-almanac[data-theme="dark"]{
  --bg:#161309; --fg:#e5ddcd; --muted:#988e7a; --faint:#1d190f;
  --accent:#c4a064; --accent-soft:#251f12; --rule:#2f291b; --code-bg:#1d190f; --code-fg:#c9bfa6;
}
.tpl-almanac>*{margin:0 0 1em;} .tpl-almanac>*:first-child{margin-top:0;}

.tpl-almanac h1,.tpl-almanac h2,.tpl-almanac h3,.tpl-almanac h4,.tpl-almanac h5,.tpl-almanac h6{color:var(--fg);text-wrap:balance;}
.tpl-almanac h1,.tpl-almanac h2,.tpl-almanac h3,.tpl-almanac h4{font-family:var(--md-head);}
.tpl-almanac h5{font-family:var(--md-body);font-size:15px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-almanac h6{font-family:var(--md-body);font-size:14.2px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-almanac h1{font-size:31.1px;font-weight:700;line-height:1.05;letter-spacing:-.02em;margin:0 0 .5em;}
.tpl-almanac h2{font-size:25.9px;font-weight:600;line-height:1.18;margin:2em 0 .55em;display:flex;align-items:center;gap:.7em;}
.tpl-almanac h2::after{content:"";flex:1;height:1px;background:var(--rule);}
.tpl-almanac h3{font-size:21.6px;font-weight:600;line-height:1.24;margin:1.6em 0 .4em;}
.tpl-almanac h4{font-size:18px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;font-style:italic;}

.tpl-almanac p{margin:0 0 1em;}
.tpl-almanac .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;}
.tpl-almanac strong{font-weight:600;color:var(--fg);}
.tpl-almanac em{font-style:italic;}
.tpl-almanac s,.tpl-almanac del{color:var(--muted);}
.tpl-almanac mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-almanac code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-almanac a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-almanac a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-almanac blockquote{margin:1.7em 0;padding-left:1.5em;border-left:1px solid var(--rule);font-style:italic;color:var(--muted);font-size:1.05em;}
.tpl-almanac blockquote p{margin:0 0 .5em;}.tpl-almanac blockquote p:last-child{margin:0;font-style:normal;font-size:.82em;letter-spacing:.04em;text-transform:uppercase;}

.tpl-almanac ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-almanac ul>li{margin:.4em 0;position:relative;}.tpl-almanac ul>li::before{content:"\2014";position:absolute;left:-1.3em;color:var(--accent);}
.tpl-almanac ol{padding-left:1.5em;margin:0 0 1em;}.tpl-almanac ol li{margin:.4em 0;}.tpl-almanac ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-almanac ul ul,.tpl-almanac ol ol,.tpl-almanac ul ol,.tpl-almanac ol ul{margin:.4em 0;}
.tpl-almanac .contains-task-list{list-style:none;padding-left:0;}
.tpl-almanac .contains-task-list>li::before{content:none;}
.tpl-almanac .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-almanac .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-almanac .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-almanac .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-almanac li:has(input:checked){color:var(--muted);}

.tpl-almanac pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-almanac pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-almanac .tok-com{color:#a89a86;font-style:italic;}
.tpl-almanac .tok-kw{color:#b06a2e;}
.tpl-almanac .tok-fn{color:#3a6a8c;}
.tpl-almanac .tok-str{color:#5e7c46;}
.tpl-almanac .tok-num{color:#9a7a2e;}
.tpl-almanac .tok-type{color:#8a5278;}
.tpl-almanac .tok-op,.tpl-almanac .tok-punc{color:var(--muted);}
.tpl-almanac .tok-var{color:var(--code-fg);}
.tpl-almanac[data-theme="dark"] .tok-com{color:#8a8276;}
.tpl-almanac[data-theme="dark"] .tok-kw{color:#e0a060;}
.tpl-almanac[data-theme="dark"] .tok-fn{color:#84acc8;}
.tpl-almanac[data-theme="dark"] .tok-str{color:#a4c490;}
.tpl-almanac[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-almanac[data-theme="dark"] .tok-type{color:#cc9ac0;}

.tpl-almanac table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-almanac thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-almanac tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-almanac tbody tr:last-child td{border-bottom:none;}

.tpl-almanac .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-almanac .callout p{margin:0 0 .4em;} .tpl-almanac .callout p:last-child{margin:0;}
.tpl-almanac .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-almanac .callout-note{border-left-color:#4a6f8a;} .tpl-almanac .callout-note .callout-title{color:#4a6f8a;}
.tpl-almanac .callout-tip{border-left-color:#5f7a4e;} .tpl-almanac .callout-tip .callout-title{color:#5f7a4e;}
.tpl-almanac .callout-warning{border-left-color:#a8702a;} .tpl-almanac .callout-warning .callout-title{color:#a8702a;}

.tpl-almanac hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-almanac hr::before{content:"❧";color:var(--accent);font-size:1.15em;letter-spacing:.3em;}

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

.tpl-almanac math{font-size:1.04em;}
.tpl-almanac .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-almanac .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-almanac .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-almanac .footnotes p{}
.tpl-almanac .footnotes ol{padding-left:1.4em;} .tpl-almanac .footnotes li{margin:.4em 0;}
.tpl-almanac .footnote-backref{border:none;background:none;}


/* ===== citrus ===== */
/* ============================================================
   模版 58 · 柑橘  Citrus
   标题 Figtree · 正文 Figtree
   清新黄绿·色块标题·加号列表
   作用域 .tpl-citrus · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-citrus{
  --md-base:17px; --md-ratio:1.2; --md-lh:1.68; --md-measure:68ch;
  --md-h1:29.4px; --md-h2:24.5px; --md-h3:20.4px; --md-h4:17px; --md-h5:14.2px; --md-h6:13.4px;
  --md-head:"Figtree","Noto Sans SC",system-ui,sans-serif; --md-body:"Figtree","Noto Sans SC",system-ui,sans-serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#fbfcf4; --fg:#28301a; --muted:#6c7656; --faint:#eff2df;
  --accent:#6a9a1e; --accent-soft:#e9f1d4; --rule:#e0e7cb; --code-bg:#eff2df; --code-fg:#454d36;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-citrus[data-theme="dark"]{
  --bg:#11150a; --fg:#dde4cc; --muted:#8a9472; --faint:#181d10;
  --accent:#a4cc56; --accent-soft:#1b2210; --rule:#272e18; --code-bg:#181d10; --code-fg:#c5ccb0;
}
.tpl-citrus>*{margin:0 0 1em;} .tpl-citrus>*:first-child{margin-top:0;}

.tpl-citrus h1,.tpl-citrus h2,.tpl-citrus h3,.tpl-citrus h4,.tpl-citrus h5,.tpl-citrus h6{color:var(--fg);text-wrap:balance;}
.tpl-citrus h1,.tpl-citrus h2,.tpl-citrus h3,.tpl-citrus h4{font-family:var(--md-head);}
.tpl-citrus h5{font-family:var(--md-body);font-size:14.2px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-citrus h6{font-family:var(--md-body);font-size:13.4px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-citrus h1{font-size:29.4px;font-weight:700;line-height:1.05;letter-spacing:-.02em;margin:0 0 .5em;}
.tpl-citrus h2{font-size:24.5px;font-weight:600;line-height:1.2;margin:2em 0 .6em;background:var(--accent-soft);padding:.4em .7em;border-radius:6px;}
.tpl-citrus h3{font-size:20.4px;font-weight:600;line-height:1.24;margin:1.6em 0 .4em;}
.tpl-citrus h4{font-size:17px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;}

.tpl-citrus p{margin:0 0 1em;}
.tpl-citrus .lead{font-size:1.2em;line-height:1.5;color:var(--muted);}
.tpl-citrus strong{font-weight:700;color:var(--fg);}
.tpl-citrus em{font-style:italic;}
.tpl-citrus s,.tpl-citrus del{color:var(--muted);}
.tpl-citrus mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-citrus code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-citrus a{color:var(--accent);text-decoration:none;font-weight:500;background-image:linear-gradient(currentColor,currentColor);background-size:100% 1px;background-repeat:no-repeat;background-position:0 100%;transition:background-size .2s;}.tpl-citrus a:hover{background-size:100% 2px;}

.tpl-citrus blockquote{margin:1.6em 0;padding:1em 1.3em;background:var(--accent-soft);border-radius:10px;color:var(--fg);}
.tpl-citrus blockquote p{margin:0 0 .5em;}.tpl-citrus blockquote p:last-child{margin:0;font-size:.86em;color:var(--muted);}

.tpl-citrus ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-citrus ul>li{margin:.4em 0;position:relative;}.tpl-citrus ul>li::before{content:"+";position:absolute;left:-1.3em;color:var(--accent);font-weight:600;}
.tpl-citrus ol{padding-left:1.5em;margin:0 0 1em;}.tpl-citrus ol li{margin:.4em 0;}.tpl-citrus ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-citrus ul ul,.tpl-citrus ol ol,.tpl-citrus ul ol,.tpl-citrus ol ul{margin:.4em 0;}
.tpl-citrus .contains-task-list{list-style:none;padding-left:0;}
.tpl-citrus .contains-task-list>li::before{content:none;}
.tpl-citrus .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-citrus .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-citrus .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-citrus .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-citrus li:has(input:checked){color:var(--muted);}

.tpl-citrus pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-citrus pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-citrus .tok-com{color:#9aa089;font-style:italic;}
.tpl-citrus .tok-kw{color:#5f7a3e;}
.tpl-citrus .tok-fn{color:#3a7a6a;}
.tpl-citrus .tok-str{color:#7a7a2e;}
.tpl-citrus .tok-num{color:#a07a2e;}
.tpl-citrus .tok-type{color:#7a5a82;}
.tpl-citrus .tok-op,.tpl-citrus .tok-punc{color:var(--muted);}
.tpl-citrus .tok-var{color:var(--code-fg);}
.tpl-citrus[data-theme="dark"] .tok-com{color:#88927e;}
.tpl-citrus[data-theme="dark"] .tok-kw{color:#9cc07e;}
.tpl-citrus[data-theme="dark"] .tok-fn{color:#7fc0aa;}
.tpl-citrus[data-theme="dark"] .tok-str{color:#c0c070;}
.tpl-citrus[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-citrus[data-theme="dark"] .tok-type{color:#c4a0cc;}

.tpl-citrus table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-citrus thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-citrus tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-citrus tbody tr:last-child td{border-bottom:none;}

.tpl-citrus .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-citrus .callout p{margin:0 0 .4em;} .tpl-citrus .callout p:last-child{margin:0;}
.tpl-citrus .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-citrus .callout-note{border-left-color:#4a8a8a;} .tpl-citrus .callout-note .callout-title{color:#4a8a8a;}
.tpl-citrus .callout-tip{border-left-color:#6a9a1e;} .tpl-citrus .callout-tip .callout-title{color:#6a9a1e;}
.tpl-citrus .callout-warning{border-left-color:#b07a2e;} .tpl-citrus .callout-warning .callout-title{color:#b07a2e;}

.tpl-citrus hr{border:none;height:1px;background:var(--rule);margin:2.6em 0;position:relative;}.tpl-citrus hr::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:.5em;height:.5em;border-radius:50%;background:var(--accent);}

.tpl-citrus figure{margin:1.8em 0;text-align:center;}
.tpl-citrus img{max-width:100%;border-radius:6px;}
.tpl-citrus .img-placeholder{display:flex;align-items:center;justify-content:center;height:220px;border-radius:6px;background:var(--faint);color:var(--accent);border:1px solid var(--rule);}
.tpl-citrus figcaption{font-size:.84em;color:var(--muted);margin-top:.6em;line-height:1.45;text-wrap:pretty;}

.tpl-citrus math{font-size:1.04em;}
.tpl-citrus .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-citrus .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-citrus .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-citrus .footnotes p{}
.tpl-citrus .footnotes ol{padding-left:1.4em;} .tpl-citrus .footnotes li{margin:.4em 0;}
.tpl-citrus .footnote-backref{border:none;background:none;}


/* ===== clay ===== */
/* ============================================================
   模版 36 · 陶土  Clay
   标题 Bitter · 正文 Bitter
   暖橙陶·厚重板状衬线·卡片引用·破折列表
   作用域 .tpl-clay · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-clay{
  --md-base:18px; --md-ratio:1.25; --md-lh:1.7; --md-measure:66ch;
  --md-h1:35.2px; --md-h2:28.1px; --md-h3:22.5px; --md-h4:18px; --md-h5:14.4px; --md-h6:13.6px;
  --md-head:"Bitter","Noto Serif SC",Georgia,serif; --md-body:"Bitter","Noto Serif SC",Georgia,serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#faf5ef; --fg:#33271f; --muted:#86705f; --faint:#f1e7da;
  --accent:#b15e2e; --accent-soft:#f4e3d4; --rule:#e7d9c8; --code-bg:#f1e7da; --code-fg:#544439;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-clay[data-theme="dark"]{
  --bg:#1a130d; --fg:#e8dccf; --muted:#a48f7c; --faint:#221911;
  --accent:#dd8852; --accent-soft:#2a1d13; --rule:#332518; --code-bg:#221911; --code-fg:#cdbca8;
}
.tpl-clay>*{margin:0 0 1em;} .tpl-clay>*:first-child{margin-top:0;}

.tpl-clay h1,.tpl-clay h2,.tpl-clay h3,.tpl-clay h4,.tpl-clay h5,.tpl-clay h6{color:var(--fg);text-wrap:balance;}
.tpl-clay h1,.tpl-clay h2,.tpl-clay h3,.tpl-clay h4{font-family:var(--md-head);}
.tpl-clay h5{font-family:var(--md-body);font-size:14.4px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-clay h6{font-family:var(--md-body);font-size:13.6px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-clay h1{font-size:35.2px;font-weight:700;line-height:1.03;letter-spacing:-.03em;margin:0 0 .5em;}
.tpl-clay h2{font-size:28.1px;font-weight:700;line-height:1.12;letter-spacing:-.02em;margin:2em 0 .5em;}
.tpl-clay h3{font-size:22.5px;font-weight:600;line-height:1.22;margin:1.6em 0 .4em;}
.tpl-clay h4{font-size:18px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;}

.tpl-clay p{margin:0 0 1em;}
.tpl-clay .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;}
.tpl-clay strong{font-weight:600;color:var(--fg);}
.tpl-clay em{font-style:italic;}
.tpl-clay s,.tpl-clay del{color:var(--muted);}
.tpl-clay mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-clay code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-clay a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-clay a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-clay blockquote{margin:1.6em 0;padding:1em 1.3em;background:var(--accent-soft);border-radius:10px;color:var(--fg);}
.tpl-clay blockquote p{margin:0 0 .5em;}.tpl-clay blockquote p:last-child{margin:0;font-size:.86em;color:var(--muted);}

.tpl-clay ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-clay ul>li{margin:.4em 0;position:relative;}.tpl-clay ul>li::before{content:"\2014";position:absolute;left:-1.3em;color:var(--accent);}
.tpl-clay ol{padding-left:1.5em;margin:0 0 1em;}.tpl-clay ol li{margin:.4em 0;}.tpl-clay ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-clay ul ul,.tpl-clay ol ol,.tpl-clay ul ol,.tpl-clay ol ul{margin:.4em 0;}
.tpl-clay .contains-task-list{list-style:none;padding-left:0;}
.tpl-clay .contains-task-list>li::before{content:none;}
.tpl-clay .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-clay .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-clay .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-clay .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-clay li:has(input:checked){color:var(--muted);}

.tpl-clay pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-clay pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-clay .tok-com{color:#a89a86;font-style:italic;}
.tpl-clay .tok-kw{color:#b06a2e;}
.tpl-clay .tok-fn{color:#3a6a8c;}
.tpl-clay .tok-str{color:#5e7c46;}
.tpl-clay .tok-num{color:#9a7a2e;}
.tpl-clay .tok-type{color:#8a5278;}
.tpl-clay .tok-op,.tpl-clay .tok-punc{color:var(--muted);}
.tpl-clay .tok-var{color:var(--code-fg);}
.tpl-clay[data-theme="dark"] .tok-com{color:#8a8276;}
.tpl-clay[data-theme="dark"] .tok-kw{color:#e0a060;}
.tpl-clay[data-theme="dark"] .tok-fn{color:#84acc8;}
.tpl-clay[data-theme="dark"] .tok-str{color:#a4c490;}
.tpl-clay[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-clay[data-theme="dark"] .tok-type{color:#cc9ac0;}

.tpl-clay table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-clay thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-clay tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-clay tbody tr:last-child td{border-bottom:none;}

.tpl-clay .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-clay .callout p{margin:0 0 .4em;} .tpl-clay .callout p:last-child{margin:0;}
.tpl-clay .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-clay .callout-note{border-left-color:#4a6f8a;} .tpl-clay .callout-note .callout-title{color:#4a6f8a;}
.tpl-clay .callout-tip{border-left-color:#5f7a4e;} .tpl-clay .callout-tip .callout-title{color:#5f7a4e;}
.tpl-clay .callout-warning{border-left-color:#b15e2e;} .tpl-clay .callout-warning .callout-title{color:#b15e2e;}

.tpl-clay hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-clay hr::before{content:"❧";color:var(--accent);font-size:1.15em;letter-spacing:.3em;}

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

.tpl-clay math{font-size:1.04em;}
.tpl-clay .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-clay .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-clay .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-clay .footnotes p{}
.tpl-clay .footnotes ol{padding-left:1.4em;} .tpl-clay .footnotes li{margin:.4em 0;}
.tpl-clay .footnote-backref{border:none;background:none;}


/* ===== cocoa ===== */
/* ============================================================
   模版 114 · 可可  Cocoa
   标题 Rozha One · 正文 Spline Sans
   深可可棕·高反差展示标题·无衬线正文·巨引号
   作用域 .tpl-cocoa · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-cocoa{
  --md-base:17.5px; --md-ratio:1.3; --md-lh:1.68; --md-measure:66ch;
  --md-h1:38.4px; --md-h2:29.6px; --md-h3:22.8px; --md-h4:17.5px; --md-h5:13.5px; --md-h6:12.7px;
  --md-head:"Rozha One","Noto Serif SC",Georgia,serif; --md-body:"Spline Sans","Noto Sans SC",system-ui,sans-serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#f9f5f1; --fg:#2a2019; --muted:#7e6c5e; --faint:#f0e6dd;
  --accent:#8a5230; --accent-soft:#f1e3d8; --rule:#e8d9cc; --code-bg:#f0e6dd; --code-fg:#4e3f36;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-cocoa[data-theme="dark"]{
  --bg:#161009; --fg:#e8dccf; --muted:#9c8676; --faint:#1e150f;
  --accent:#cc865a; --accent-soft:#271811; --rule:#332419; --code-bg:#1e150f; --code-fg:#ccbaa8;
}
.tpl-cocoa>*{margin:0 0 1em;} .tpl-cocoa>*:first-child{margin-top:0;}

.tpl-cocoa h1,.tpl-cocoa h2,.tpl-cocoa h3,.tpl-cocoa h4,.tpl-cocoa h5,.tpl-cocoa h6{color:var(--fg);text-wrap:balance;}
.tpl-cocoa h1,.tpl-cocoa h2,.tpl-cocoa h3,.tpl-cocoa h4{font-family:var(--md-head);}
.tpl-cocoa h5{font-family:var(--md-body);font-size:13.5px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-cocoa h6{font-family:var(--md-body);font-size:12.7px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-cocoa h1{font-size:38.4px;font-weight:700;line-height:1.03;letter-spacing:-.03em;margin:0 0 .5em;}
.tpl-cocoa h2{font-size:29.6px;font-weight:700;line-height:1.12;letter-spacing:-.02em;margin:2em 0 .5em;}
.tpl-cocoa h3{font-size:22.8px;font-weight:600;line-height:1.22;margin:1.6em 0 .4em;}
.tpl-cocoa h4{font-size:17.5px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;}

.tpl-cocoa p{margin:0 0 1em;}
.tpl-cocoa .lead{font-size:1.2em;line-height:1.5;color:var(--muted);}
.tpl-cocoa strong{font-weight:700;color:var(--fg);}
.tpl-cocoa em{font-style:italic;}
.tpl-cocoa s,.tpl-cocoa del{color:var(--muted);}
.tpl-cocoa mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-cocoa code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-cocoa a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-cocoa a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-cocoa blockquote{margin:1.8em 0;padding:.5em 0 .2em;font-family:var(--md-head);font-size:1.4em;line-height:1.34;color:var(--fg);position:relative;}
.tpl-cocoa blockquote::before{content:"\201C";font-family:var(--md-head);font-size:2em;line-height:0;color:var(--accent);opacity:.5;margin-right:.06em;vertical-align:-.38em;}
.tpl-cocoa blockquote p{margin:0 0 .3em;display:inline;}.tpl-cocoa blockquote p:last-child{display:block;margin-top:.5em;font-family:var(--md-body);font-size:.5em;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);}

.tpl-cocoa ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-cocoa ul>li{margin:.4em 0;position:relative;}.tpl-cocoa ul>li::before{content:"";position:absolute;left:-1.05em;top:.62em;width:.4em;height:.4em;border-radius:50%;background:var(--accent);}
.tpl-cocoa ol{padding-left:1.5em;margin:0 0 1em;}.tpl-cocoa ol li{margin:.4em 0;}.tpl-cocoa ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-cocoa ul ul,.tpl-cocoa ol ol,.tpl-cocoa ul ol,.tpl-cocoa ol ul{margin:.4em 0;}
.tpl-cocoa .contains-task-list{list-style:none;padding-left:0;}
.tpl-cocoa .contains-task-list>li::before{content:none;}
.tpl-cocoa .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-cocoa .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-cocoa .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-cocoa .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-cocoa li:has(input:checked){color:var(--muted);}

.tpl-cocoa pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-cocoa pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-cocoa .tok-com{color:#a89a86;font-style:italic;}
.tpl-cocoa .tok-kw{color:#b06a2e;}
.tpl-cocoa .tok-fn{color:#3a6a8c;}
.tpl-cocoa .tok-str{color:#5e7c46;}
.tpl-cocoa .tok-num{color:#9a7a2e;}
.tpl-cocoa .tok-type{color:#8a5278;}
.tpl-cocoa .tok-op,.tpl-cocoa .tok-punc{color:var(--muted);}
.tpl-cocoa .tok-var{color:var(--code-fg);}
.tpl-cocoa[data-theme="dark"] .tok-com{color:#8a8276;}
.tpl-cocoa[data-theme="dark"] .tok-kw{color:#e0a060;}
.tpl-cocoa[data-theme="dark"] .tok-fn{color:#84acc8;}
.tpl-cocoa[data-theme="dark"] .tok-str{color:#a4c490;}
.tpl-cocoa[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-cocoa[data-theme="dark"] .tok-type{color:#cc9ac0;}

.tpl-cocoa table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-cocoa thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-cocoa tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-cocoa tbody tr:last-child td{border-bottom:none;}

.tpl-cocoa .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-cocoa .callout p{margin:0 0 .4em;} .tpl-cocoa .callout p:last-child{margin:0;}
.tpl-cocoa .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-cocoa .callout-note{border-left-color:#4a6f8a;} .tpl-cocoa .callout-note .callout-title{color:#4a6f8a;}
.tpl-cocoa .callout-tip{border-left-color:#5f7a4e;} .tpl-cocoa .callout-tip .callout-title{color:#5f7a4e;}
.tpl-cocoa .callout-warning{border-left-color:#8a5230;} .tpl-cocoa .callout-warning .callout-title{color:#8a5230;}

.tpl-cocoa hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-cocoa hr::before{content:"❦";color:var(--accent);font-size:1.15em;letter-spacing:.3em;}

.tpl-cocoa figure{margin:1.8em 0;text-align:center;}
.tpl-cocoa img{max-width:100%;border-radius:6px;}
.tpl-cocoa .img-placeholder{display:flex;align-items:center;justify-content:center;height:220px;border-radius:6px;background:var(--faint);color:var(--accent);border:1px solid var(--rule);}
.tpl-cocoa figcaption{font-size:.84em;color:var(--muted);margin-top:.6em;line-height:1.45;text-wrap:pretty;}

.tpl-cocoa math{font-size:1.04em;}
.tpl-cocoa .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-cocoa .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-cocoa .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-cocoa .footnotes p{}
.tpl-cocoa .footnotes ol{padding-left:1.4em;} .tpl-cocoa .footnotes li{margin:.4em 0;}
.tpl-cocoa .footnote-backref{border:none;background:none;}


/* ===== couture ===== */
/* ============================================================
   模版 48 · 高定  Couture
   标题 Bodoni Moda · 正文 Jost
   时装黑白·高反差展示·居中提句
   作用域 .tpl-couture · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-couture{
  --md-base:18px; --md-ratio:1.333; --md-lh:1.62; --md-measure:66ch;
  --md-h1:44.8px; --md-h2:32px; --md-h3:24px; --md-h4:18px; --md-h5:13.5px; --md-h6:12.7px;
  --md-head:"Bodoni Moda","Noto Serif SC",Georgia,serif; --md-body:"Jost","Noto Sans SC",system-ui,sans-serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#ffffff; --fg:#161616; --muted:#8c8c8c; --faint:#f3f3f3;
  --accent:#161616; --accent-soft:#eee; --rule:#e2e2e2; --code-bg:#f3f3f3; --code-fg:#2c2c2c;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-couture[data-theme="dark"]{
  --bg:#0c0c0c; --fg:#f0f0f0; --muted:#8e8e8e; --faint:#181818;
  --accent:#f0f0f0; --accent-soft:#1f1f1f; --rule:#2a2a2a; --code-bg:#181818; --code-fg:#cccccc;
}
.tpl-couture>*{margin:0 0 1em;} .tpl-couture>*:first-child{margin-top:0;}

.tpl-couture h1,.tpl-couture h2,.tpl-couture h3,.tpl-couture h4,.tpl-couture h5,.tpl-couture h6{color:var(--fg);text-wrap:balance;}
.tpl-couture h1,.tpl-couture h2,.tpl-couture h3,.tpl-couture h4{font-family:var(--md-head);}
.tpl-couture h5{font-family:var(--md-body);font-size:13.5px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-couture h6{font-family:var(--md-body);font-size:12.7px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-couture h1{font-size:44.8px;font-weight:700;line-height:1.05;letter-spacing:-.025em;margin:0 0 .55em;text-align:center;}
.tpl-couture h2{font-size:32px;font-weight:600;line-height:1.14;margin:2em 0 .5em;}
.tpl-couture h3{font-size:24px;font-weight:600;line-height:1.24;margin:1.6em 0 .4em;}
.tpl-couture h4{font-size:18px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;font-style:italic;}

.tpl-couture p{margin:0 0 1em;}
.tpl-couture .lead{font-size:1.2em;line-height:1.5;color:var(--muted);text-align:center;}
.tpl-couture strong{font-weight:700;color:var(--fg);}
.tpl-couture em{font-style:italic;}
.tpl-couture s,.tpl-couture del{color:var(--muted);}
.tpl-couture mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-couture code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-couture a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-couture a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-couture blockquote{margin:2em 0;padding:0 1em;text-align:center;font-family:var(--md-head);font-style:italic;font-size:1.5em;line-height:1.32;color:var(--fg);}
.tpl-couture blockquote::before{content:"";display:block;width:2.4em;height:2px;background:var(--accent);margin:0 auto .7em;border-radius:2px;}
.tpl-couture blockquote p{margin:0 0 .3em;}.tpl-couture blockquote p:last-child{font-family:var(--md-body);font-style:normal;font-size:.46em;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);}

.tpl-couture ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-couture ul>li{margin:.4em 0;position:relative;}.tpl-couture ul>li::before{content:"\2014";position:absolute;left:-1.3em;color:var(--accent);}
.tpl-couture ol{padding-left:1.5em;margin:0 0 1em;}.tpl-couture ol li{margin:.4em 0;}.tpl-couture ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-couture ul ul,.tpl-couture ol ol,.tpl-couture ul ol,.tpl-couture ol ul{margin:.4em 0;}
.tpl-couture .contains-task-list{list-style:none;padding-left:0;}
.tpl-couture .contains-task-list>li::before{content:none;}
.tpl-couture .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-couture .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-couture .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-couture .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-couture li:has(input:checked){color:var(--muted);}

.tpl-couture pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-couture pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-couture .tok-com{color:#8a8a8a;font-style:italic;}
.tpl-couture .tok-kw{color:#1a1a1a;}
.tpl-couture .tok-fn{color:#1a1a1a;}
.tpl-couture .tok-str{color:#6a6a6a;}
.tpl-couture .tok-num{color:#6a6a6a;}
.tpl-couture .tok-type{color:#1a1a1a;}
.tpl-couture .tok-op,.tpl-couture .tok-punc{color:var(--muted);}
.tpl-couture .tok-var{color:var(--code-fg);}
.tpl-couture[data-theme="dark"] .tok-com{color:#8a8a8a;}
.tpl-couture[data-theme="dark"] .tok-kw{color:#1a1a1a;}
.tpl-couture[data-theme="dark"] .tok-fn{color:#1a1a1a;}
.tpl-couture[data-theme="dark"] .tok-str{color:#9a9a9a;}
.tpl-couture[data-theme="dark"] .tok-num{color:#9a9a9a;}
.tpl-couture[data-theme="dark"] .tok-type{color:#1a1a1a;}

.tpl-couture table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-couture thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-couture tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-couture tbody tr:last-child td{border-bottom:none;}

.tpl-couture .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-couture .callout p{margin:0 0 .4em;} .tpl-couture .callout p:last-child{margin:0;}
.tpl-couture .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-couture .callout-note{border-left-color:#5a7090;} .tpl-couture .callout-note .callout-title{color:#5a7090;}
.tpl-couture .callout-tip{border-left-color:#5a8060;} .tpl-couture .callout-tip .callout-title{color:#5a8060;}
.tpl-couture .callout-warning{border-left-color:#a07840;} .tpl-couture .callout-warning .callout-title{color:#a07840;}

.tpl-couture hr{border:none;border-top:1px solid var(--accent);width:18%;margin:2.4em auto;opacity:.6;}

.tpl-couture figure{margin:1.8em 0;text-align:center;}
.tpl-couture img{max-width:100%;border-radius:6px;}
.tpl-couture .img-placeholder{display:flex;align-items:center;justify-content:center;height:220px;border-radius:6px;background:var(--faint);color:var(--accent);border:1px solid var(--rule);}
.tpl-couture figcaption{font-size:.84em;color:var(--muted);margin-top:.6em;line-height:1.45;text-wrap:pretty;}

.tpl-couture math{font-size:1.04em;}
.tpl-couture .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-couture .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-couture .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-couture .footnotes p{}
.tpl-couture .footnotes ol{padding-left:1.4em;} .tpl-couture .footnotes li{margin:.4em 0;}
.tpl-couture .footnote-backref{border:none;background:none;}


/* ===== fjord ===== */
/* ============================================================
   模版 56 · 峡湾  Fjord
   标题 Work Sans · 正文 Work Sans
   北欧冷青·顶线标题·箭头列表
   作用域 .tpl-fjord · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-fjord{
  --md-base:17px; --md-ratio:1.2; --md-lh:1.66; --md-measure:70ch;
  --md-h1:29.4px; --md-h2:24.5px; --md-h3:20.4px; --md-h4:17px; --md-h5:14.2px; --md-h6:13.4px;
  --md-head:"Work Sans","Noto Sans SC",system-ui,sans-serif; --md-body:"Work Sans","Noto Sans SC",system-ui,sans-serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#f5f8f8; --fg:#1e2c2e; --muted:#5e7274; --faint:#e7f0f0;
  --accent:#2f7d7a; --accent-soft:#dff0ee; --rule:#d7e6e5; --code-bg:#e7f0f0; --code-fg:#374a4b;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-fjord[data-theme="dark"]{
  --bg:#0b1516; --fg:#d4e3e3; --muted:#7c9293; --faint:#121f20;
  --accent:#56b6b0; --accent-soft:#12241f; --rule:#1e2e2e; --code-bg:#121f20; --code-fg:#bccbcb;
}
.tpl-fjord>*{margin:0 0 1em;} .tpl-fjord>*:first-child{margin-top:0;}

.tpl-fjord h1,.tpl-fjord h2,.tpl-fjord h3,.tpl-fjord h4,.tpl-fjord h5,.tpl-fjord h6{color:var(--fg);text-wrap:balance;}
.tpl-fjord h1,.tpl-fjord h2,.tpl-fjord h3,.tpl-fjord h4{font-family:var(--md-head);}
.tpl-fjord h5{font-family:var(--md-body);font-size:14.2px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-fjord h6{font-family:var(--md-body);font-size:13.4px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-fjord h1{font-size:29.4px;font-weight:700;line-height:1.06;letter-spacing:-.02em;margin:0 0 .5em;}
.tpl-fjord h2{font-size:24.5px;font-weight:600;line-height:1.16;margin:2.1em 0 .55em;padding-top:.6em;border-top:2px solid var(--accent);}
.tpl-fjord h3{font-size:20.4px;font-weight:600;line-height:1.24;margin:1.6em 0 .4em;}
.tpl-fjord h4{font-size:17px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;}

.tpl-fjord p{margin:0 0 1em;}
.tpl-fjord .lead{font-size:1.2em;line-height:1.5;color:var(--muted);}
.tpl-fjord strong{font-weight:700;color:var(--fg);}
.tpl-fjord em{font-style:italic;}
.tpl-fjord s,.tpl-fjord del{color:var(--muted);}
.tpl-fjord mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-fjord code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-fjord a{color:var(--accent);text-decoration:none;font-weight:500;background-image:linear-gradient(currentColor,currentColor);background-size:100% 1px;background-repeat:no-repeat;background-position:0 100%;transition:background-size .2s;}.tpl-fjord a:hover{background-size:100% 2px;}

.tpl-fjord blockquote{margin:1.6em 0;padding:.5em 1.3em;border-left:4px solid var(--accent);background:var(--faint);border-radius:0 6px 6px 0;color:var(--fg);}
.tpl-fjord blockquote p{margin:0 0 .5em;}.tpl-fjord blockquote p:last-child{margin:0;font-size:.88em;color:var(--muted);}

.tpl-fjord ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-fjord ul>li{margin:.4em 0;position:relative;}.tpl-fjord ul>li::before{content:"\203A";position:absolute;left:-1.2em;color:var(--accent);font-weight:700;}
.tpl-fjord ol{padding-left:1.5em;margin:0 0 1em;}.tpl-fjord ol li{margin:.4em 0;}.tpl-fjord ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-fjord ul ul,.tpl-fjord ol ol,.tpl-fjord ul ol,.tpl-fjord ol ul{margin:.4em 0;}
.tpl-fjord .contains-task-list{list-style:none;padding-left:0;}
.tpl-fjord .contains-task-list>li::before{content:none;}
.tpl-fjord .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-fjord .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-fjord .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-fjord .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-fjord li:has(input:checked){color:var(--muted);}

.tpl-fjord pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-fjord pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-fjord .tok-com{color:#8aa09c;font-style:italic;}
.tpl-fjord .tok-kw{color:#2f8a7a;}
.tpl-fjord .tok-fn{color:#3a6a9a;}
.tpl-fjord .tok-str{color:#6a8a3e;}
.tpl-fjord .tok-num{color:#a87a3e;}
.tpl-fjord .tok-type{color:#7a5a8a;}
.tpl-fjord .tok-op,.tpl-fjord .tok-punc{color:var(--muted);}
.tpl-fjord .tok-var{color:var(--code-fg);}
.tpl-fjord[data-theme="dark"] .tok-com{color:#7e9490;}
.tpl-fjord[data-theme="dark"] .tok-kw{color:#5fc2ac;}
.tpl-fjord[data-theme="dark"] .tok-fn{color:#7fb0e6;}
.tpl-fjord[data-theme="dark"] .tok-str{color:#b0c878;}
.tpl-fjord[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-fjord[data-theme="dark"] .tok-type{color:#bd9ad0;}

.tpl-fjord table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-fjord thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-fjord tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-fjord tbody tr:last-child td{border-bottom:none;}

.tpl-fjord .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-fjord .callout p{margin:0 0 .4em;} .tpl-fjord .callout p:last-child{margin:0;}
.tpl-fjord .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-fjord .callout-note{border-left-color:#3a8a9a;} .tpl-fjord .callout-note .callout-title{color:#3a8a9a;}
.tpl-fjord .callout-tip{border-left-color:#2f7d7a;} .tpl-fjord .callout-tip .callout-title{color:#2f7d7a;}
.tpl-fjord .callout-warning{border-left-color:#a8762e;} .tpl-fjord .callout-warning .callout-title{color:#a8762e;}

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

.tpl-fjord figure{margin:1.8em 0;text-align:center;}
.tpl-fjord img{max-width:100%;border-radius:6px;}
.tpl-fjord .img-placeholder{display:flex;align-items:center;justify-content:center;height:220px;border-radius:6px;background:var(--faint);color:var(--accent);border:1px solid var(--rule);}
.tpl-fjord figcaption{font-size:.84em;color:var(--muted);margin-top:.6em;line-height:1.45;text-wrap:pretty;}

.tpl-fjord math{font-size:1.04em;}
.tpl-fjord .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-fjord .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-fjord .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-fjord .footnotes p{}
.tpl-fjord .footnotes ol{padding-left:1.4em;} .tpl-fjord .footnotes li{margin:.4em 0;}
.tpl-fjord .footnote-backref{border:none;background:none;}


/* ===== honey ===== */
/* ============================================================
   模版 39 · 蜜茶  Honey
   标题 Newsreader · 正文 Newsreader
   暖琥珀·温柔·卡片引用·圆点列表
   作用域 .tpl-honey · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-honey{
  --md-base:19px; --md-ratio:1.25; --md-lh:1.72; --md-measure:64ch;
  --md-h1:37.1px; --md-h2:29.7px; --md-h3:23.8px; --md-h4:19px; --md-h5:15.2px; --md-h6:14.3px;
  --md-head:"Newsreader","Noto Serif SC",Georgia,serif; --md-body:"Newsreader","Noto Serif SC",Georgia,serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#fbf6ec; --fg:#322a1d; --muted:#867254; --faint:#f2e9d6;
  --accent:#bb7d2a; --accent-soft:#f5e9d2; --rule:#e8dcc2; --code-bg:#f2e9d6; --code-fg:#544935;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-honey[data-theme="dark"]{
  --bg:#181308; --fg:#e8ddc9; --muted:#a08f70; --faint:#201a0f;
  --accent:#d8aa55; --accent-soft:#272016; --rule:#312818; --code-bg:#201a0f; --code-fg:#cdbfa4;
}
.tpl-honey>*{margin:0 0 1em;} .tpl-honey>*:first-child{margin-top:0;}

.tpl-honey h1,.tpl-honey h2,.tpl-honey h3,.tpl-honey h4,.tpl-honey h5,.tpl-honey h6{color:var(--fg);text-wrap:balance;}
.tpl-honey h1,.tpl-honey h2,.tpl-honey h3,.tpl-honey h4{font-family:var(--md-head);}
.tpl-honey h5{font-family:var(--md-body);font-size:15.2px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-honey h6{font-family:var(--md-body);font-size:14.3px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-honey h1{font-size:37.1px;font-weight:700;line-height:1.03;letter-spacing:-.03em;margin:0 0 .5em;}
.tpl-honey h2{font-size:29.7px;font-weight:700;line-height:1.12;letter-spacing:-.02em;margin:2em 0 .5em;}
.tpl-honey h3{font-size:23.8px;font-weight:600;line-height:1.22;margin:1.6em 0 .4em;}
.tpl-honey h4{font-size:19px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;}

.tpl-honey p{margin:0 0 1em;}
.tpl-honey .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;}
.tpl-honey strong{font-weight:600;color:var(--fg);}
.tpl-honey em{font-style:italic;}
.tpl-honey s,.tpl-honey del{color:var(--muted);}
.tpl-honey mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-honey code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-honey a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-honey a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-honey blockquote{margin:1.6em 0;padding:1em 1.3em;background:var(--accent-soft);border-radius:10px;color:var(--fg);}
.tpl-honey blockquote p{margin:0 0 .5em;}.tpl-honey blockquote p:last-child{margin:0;font-size:.86em;color:var(--muted);}

.tpl-honey ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-honey ul>li{margin:.4em 0;position:relative;}.tpl-honey ul>li::before{content:"";position:absolute;left:-1.05em;top:.62em;width:.4em;height:.4em;border-radius:50%;background:var(--accent);}
.tpl-honey ol{padding-left:1.5em;margin:0 0 1em;}.tpl-honey ol li{margin:.4em 0;}.tpl-honey ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-honey ul ul,.tpl-honey ol ol,.tpl-honey ul ol,.tpl-honey ol ul{margin:.4em 0;}
.tpl-honey .contains-task-list{list-style:none;padding-left:0;}
.tpl-honey .contains-task-list>li::before{content:none;}
.tpl-honey .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-honey .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-honey .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-honey .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-honey li:has(input:checked){color:var(--muted);}

.tpl-honey pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-honey pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-honey .tok-com{color:#a89a86;font-style:italic;}
.tpl-honey .tok-kw{color:#b06a2e;}
.tpl-honey .tok-fn{color:#3a6a8c;}
.tpl-honey .tok-str{color:#5e7c46;}
.tpl-honey .tok-num{color:#9a7a2e;}
.tpl-honey .tok-type{color:#8a5278;}
.tpl-honey .tok-op,.tpl-honey .tok-punc{color:var(--muted);}
.tpl-honey .tok-var{color:var(--code-fg);}
.tpl-honey[data-theme="dark"] .tok-com{color:#8a8276;}
.tpl-honey[data-theme="dark"] .tok-kw{color:#e0a060;}
.tpl-honey[data-theme="dark"] .tok-fn{color:#84acc8;}
.tpl-honey[data-theme="dark"] .tok-str{color:#a4c490;}
.tpl-honey[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-honey[data-theme="dark"] .tok-type{color:#cc9ac0;}

.tpl-honey table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-honey thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-honey tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-honey tbody tr:last-child td{border-bottom:none;}

.tpl-honey .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-honey .callout p{margin:0 0 .4em;} .tpl-honey .callout p:last-child{margin:0;}
.tpl-honey .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-honey .callout-note{border-left-color:#4a6f8a;} .tpl-honey .callout-note .callout-title{color:#4a6f8a;}
.tpl-honey .callout-tip{border-left-color:#5f7a4e;} .tpl-honey .callout-tip .callout-title{color:#5f7a4e;}
.tpl-honey .callout-warning{border-left-color:#bb7d2a;} .tpl-honey .callout-warning .callout-title{color:#bb7d2a;}

.tpl-honey hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-honey hr::before{content:"❧";color:var(--accent);font-size:1.15em;letter-spacing:.3em;}

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

.tpl-honey math{font-size:1.04em;}
.tpl-honey .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-honey .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-honey .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-honey .footnotes p{}
.tpl-honey .footnotes ol{padding-left:1.4em;} .tpl-honey .footnotes li{margin:.4em 0;}
.tpl-honey .footnote-backref{border:none;background:none;}


/* ===== indigo ===== */
/* ============================================================
   模版 37 · 靛蓝  Indigo
   标题 Lora · 正文 Lora
   深靛知性·小型大写标题·边注落款
   作用域 .tpl-indigo · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-indigo{
  --md-base:19px; --md-ratio:1.25; --md-lh:1.7; --md-measure:66ch;
  --md-h1:37.1px; --md-h2:29.7px; --md-h3:23.8px; --md-h4:19px; --md-h5:15.2px; --md-h6:14.3px;
  --md-head:"Lora","Noto Serif SC",Georgia,serif; --md-body:"Lora","Noto Serif SC",Georgia,serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#f6f6fb; --fg:#23263a; --muted:#646a82; --faint:#e9eaf3;
  --accent:#3a3f8a; --accent-soft:#e6e7f5; --rule:#dcdeec; --code-bg:#e9eaf3; --code-fg:#3f4358;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-indigo[data-theme="dark"]{
  --bg:#101220; --fg:#d6d9ec; --muted:#7e85a0; --faint:#171a2a;
  --accent:#8087d8; --accent-soft:#191c30; --rule:#252840; --code-bg:#171a2a; --code-fg:#bcc0d8;
}
.tpl-indigo>*{margin:0 0 1em;} .tpl-indigo>*:first-child{margin-top:0;}

.tpl-indigo h1,.tpl-indigo h2,.tpl-indigo h3,.tpl-indigo h4,.tpl-indigo h5,.tpl-indigo h6{color:var(--fg);text-wrap:balance;}
.tpl-indigo h1,.tpl-indigo h2,.tpl-indigo h3,.tpl-indigo h4{font-family:var(--md-head);}
.tpl-indigo h5{font-family:var(--md-body);font-size:15.2px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-indigo h6{font-family:var(--md-body);font-size:14.3px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-indigo h1{font-size:37.1px;font-weight:600;line-height:1.1;letter-spacing:-.01em;margin:0 0 .55em;}
.tpl-indigo h2{font-size:29.7px;font-weight:500;line-height:1.22;margin:2em 0 .55em;font-variant:small-caps;letter-spacing:.06em;padding-bottom:.25em;border-bottom:1px solid var(--rule);}
.tpl-indigo h3{font-size:23.8px;font-weight:600;line-height:1.28;margin:1.6em 0 .4em;}
.tpl-indigo h4{font-size:19px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;font-style:italic;}

.tpl-indigo p{margin:0 0 1em;}
.tpl-indigo .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;}
.tpl-indigo strong{font-weight:600;color:var(--fg);}
.tpl-indigo em{font-style:italic;}
.tpl-indigo s,.tpl-indigo del{color:var(--muted);}
.tpl-indigo mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-indigo code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-indigo a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-indigo a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-indigo blockquote{margin:1.7em 1.4em;padding:0;border:none;font-style:italic;color:var(--muted);font-size:1.05em;}
.tpl-indigo blockquote p{margin:0 0 .5em;}.tpl-indigo blockquote p:last-child{margin:0;font-style:normal;text-align:right;font-size:.85em;letter-spacing:.03em;}

.tpl-indigo ul{padding-left:1.4em;margin:0 0 1em;list-style:disc;}.tpl-indigo ul>li{margin:.4em 0;}.tpl-indigo ul>li::marker{color:var(--accent);}
.tpl-indigo ol{padding-left:1.5em;margin:0 0 1em;}.tpl-indigo ol li{margin:.4em 0;}.tpl-indigo ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-indigo ul ul,.tpl-indigo ol ol,.tpl-indigo ul ol,.tpl-indigo ol ul{margin:.4em 0;}
.tpl-indigo .contains-task-list{list-style:none;padding-left:0;}
.tpl-indigo .contains-task-list>li::before{content:none;}
.tpl-indigo .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-indigo .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-indigo .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-indigo .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-indigo li:has(input:checked){color:var(--muted);}

.tpl-indigo pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-indigo pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-indigo .tok-com{color:#94a0ad;font-style:italic;}
.tpl-indigo .tok-kw{color:#3a6aa5;}
.tpl-indigo .tok-fn{color:#2f7d8b;}
.tpl-indigo .tok-str{color:#4f8050;}
.tpl-indigo .tok-num{color:#9a6e2e;}
.tpl-indigo .tok-type{color:#6b4a8a;}
.tpl-indigo .tok-op,.tpl-indigo .tok-punc{color:var(--muted);}
.tpl-indigo .tok-var{color:var(--code-fg);}
.tpl-indigo[data-theme="dark"] .tok-com{color:#7e8a97;}
.tpl-indigo[data-theme="dark"] .tok-kw{color:#7fb0e6;}
.tpl-indigo[data-theme="dark"] .tok-fn{color:#6cc4d4;}
.tpl-indigo[data-theme="dark"] .tok-str{color:#8fcf9a;}
.tpl-indigo[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-indigo[data-theme="dark"] .tok-type{color:#b69ad8;}

.tpl-indigo table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-indigo thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-indigo tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-indigo tbody tr:last-child td{border-bottom:none;}

.tpl-indigo .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-indigo .callout p{margin:0 0 .4em;} .tpl-indigo .callout p:last-child{margin:0;}
.tpl-indigo .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-indigo .callout-note{border-left-color:#3a3f8a;} .tpl-indigo .callout-note .callout-title{color:#3a3f8a;}
.tpl-indigo .callout-tip{border-left-color:#3f7a5e;} .tpl-indigo .callout-tip .callout-title{color:#3f7a5e;}
.tpl-indigo .callout-warning{border-left-color:#a8702a;} .tpl-indigo .callout-warning .callout-title{color:#a8702a;}

.tpl-indigo hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-indigo hr::before{content:"✦";color:var(--accent);letter-spacing:.5em;font-size:.9em;}

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

.tpl-indigo math{font-size:1.04em;}
.tpl-indigo .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-indigo .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-indigo .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-indigo .footnotes p{}
.tpl-indigo .footnotes ol{padding-left:1.4em;} .tpl-indigo .footnotes li{margin:.4em 0;}
.tpl-indigo .footnote-backref{border:none;background:none;}


/* ===== ivoryforest ===== */
/* ============================================================
   模版 109 · 象牙森林  Ivory Forest
   标题 Old Standard TT · 正文 Old Standard TT
   象牙白配森绿·古典衬线·小型大写·两端对齐
   作用域 .tpl-ivoryforest · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-ivoryforest{
  --md-base:19px; --md-ratio:1.2; --md-lh:1.7; --md-measure:66ch;
  --md-h1:32.8px; --md-h2:27.4px; --md-h3:22.8px; --md-h4:19px; --md-h5:15.8px; --md-h6:14.9px;
  --md-head:"Old Standard TT","Noto Serif SC",Georgia,serif; --md-body:"Old Standard TT","Noto Serif SC",Georgia,serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#fbfaf4; --fg:#22281f; --muted:#6e7464; --faint:#eff0e6;
  --accent:#36603e; --accent-soft:#e4ede2; --rule:#e4e4d4; --code-bg:#eff0e6; --code-fg:#3e463a;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-ivoryforest[data-theme="dark"]{
  --bg:#0f130d; --fg:#dde2d4; --muted:#828a76; --faint:#161b13;
  --accent:#5e9a68; --accent-soft:#152018; --rule:#252b1e; --code-bg:#161b13; --code-fg:#c4cab8;
}
.tpl-ivoryforest>*{margin:0 0 1em;} .tpl-ivoryforest>*:first-child{margin-top:0;}

.tpl-ivoryforest h1,.tpl-ivoryforest h2,.tpl-ivoryforest h3,.tpl-ivoryforest h4,.tpl-ivoryforest h5,.tpl-ivoryforest h6{color:var(--fg);text-wrap:balance;}
.tpl-ivoryforest h1,.tpl-ivoryforest h2,.tpl-ivoryforest h3,.tpl-ivoryforest h4{font-family:var(--md-head);}
.tpl-ivoryforest h5{font-family:var(--md-body);font-size:15.8px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-ivoryforest h6{font-family:var(--md-body);font-size:14.9px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-ivoryforest h1{font-size:32.8px;font-weight:600;line-height:1.1;letter-spacing:-.01em;margin:0 0 .55em;}
.tpl-ivoryforest h2{font-size:27.4px;font-weight:500;line-height:1.22;margin:2em 0 .55em;font-variant:small-caps;letter-spacing:.06em;padding-bottom:.25em;border-bottom:1px solid var(--rule);}
.tpl-ivoryforest h3{font-size:22.8px;font-weight:600;line-height:1.28;margin:1.6em 0 .4em;}
.tpl-ivoryforest h4{font-size:19px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;font-style:italic;}

.tpl-ivoryforest p{margin:0 0 1em;text-align:justify;}
.tpl-ivoryforest .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;}
.tpl-ivoryforest strong{font-weight:600;color:var(--fg);}
.tpl-ivoryforest em{font-style:italic;}
.tpl-ivoryforest s,.tpl-ivoryforest del{color:var(--muted);}
.tpl-ivoryforest mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-ivoryforest code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-ivoryforest a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-ivoryforest a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-ivoryforest blockquote{margin:1.8em 0;padding:.3em 0 .3em 2.2em;position:relative;color:var(--muted);font-style:italic;font-size:1.06em;}
.tpl-ivoryforest blockquote::before{content:"\201C";position:absolute;left:0;top:-.02em;font-family:var(--md-head);font-size:3em;line-height:1;color:var(--accent);opacity:.4;}
.tpl-ivoryforest blockquote p{margin:0 0 .5em;}.tpl-ivoryforest blockquote p:last-child{margin:0;font-style:normal;font-size:.82em;letter-spacing:.04em;text-transform:uppercase;}

.tpl-ivoryforest ul{padding-left:1.4em;margin:0 0 1em;list-style:disc;}.tpl-ivoryforest ul>li{margin:.4em 0;}.tpl-ivoryforest ul>li::marker{color:var(--accent);}
.tpl-ivoryforest ol{padding-left:1.5em;margin:0 0 1em;}.tpl-ivoryforest ol li{margin:.4em 0;}.tpl-ivoryforest ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-ivoryforest ul ul,.tpl-ivoryforest ol ol,.tpl-ivoryforest ul ol,.tpl-ivoryforest ol ul{margin:.4em 0;}
.tpl-ivoryforest .contains-task-list{list-style:none;padding-left:0;}
.tpl-ivoryforest .contains-task-list>li::before{content:none;}
.tpl-ivoryforest .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-ivoryforest .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-ivoryforest .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-ivoryforest .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-ivoryforest li:has(input:checked){color:var(--muted);}

.tpl-ivoryforest pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-ivoryforest pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-ivoryforest .tok-com{color:#9aa089;font-style:italic;}
.tpl-ivoryforest .tok-kw{color:#5f7a3e;}
.tpl-ivoryforest .tok-fn{color:#3a7a6a;}
.tpl-ivoryforest .tok-str{color:#7a7a2e;}
.tpl-ivoryforest .tok-num{color:#a07a2e;}
.tpl-ivoryforest .tok-type{color:#7a5a82;}
.tpl-ivoryforest .tok-op,.tpl-ivoryforest .tok-punc{color:var(--muted);}
.tpl-ivoryforest .tok-var{color:var(--code-fg);}
.tpl-ivoryforest[data-theme="dark"] .tok-com{color:#88927e;}
.tpl-ivoryforest[data-theme="dark"] .tok-kw{color:#9cc07e;}
.tpl-ivoryforest[data-theme="dark"] .tok-fn{color:#7fc0aa;}
.tpl-ivoryforest[data-theme="dark"] .tok-str{color:#c0c070;}
.tpl-ivoryforest[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-ivoryforest[data-theme="dark"] .tok-type{color:#c4a0cc;}

.tpl-ivoryforest table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-ivoryforest thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-ivoryforest tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-ivoryforest tbody tr:last-child td{border-bottom:none;}

.tpl-ivoryforest .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-ivoryforest .callout p{margin:0 0 .4em;} .tpl-ivoryforest .callout p:last-child{margin:0;}
.tpl-ivoryforest .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-ivoryforest .callout-note{border-left-color:#4a6f8a;} .tpl-ivoryforest .callout-note .callout-title{color:#4a6f8a;}
.tpl-ivoryforest .callout-tip{border-left-color:#36603e;} .tpl-ivoryforest .callout-tip .callout-title{color:#36603e;}
.tpl-ivoryforest .callout-warning{border-left-color:#a8762e;} .tpl-ivoryforest .callout-warning .callout-title{color:#a8762e;}

.tpl-ivoryforest hr{border:none;border-top:3px double var(--rule);margin:2.6em 0;}

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

.tpl-ivoryforest math{font-size:1.04em;}
.tpl-ivoryforest .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-ivoryforest .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-ivoryforest .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-ivoryforest .footnotes p{text-align:left;}
.tpl-ivoryforest .footnotes ol{padding-left:1.4em;} .tpl-ivoryforest .footnotes li{margin:.4em 0;}
.tpl-ivoryforest .footnote-backref{border:none;background:none;}


/* ===== latte ===== */
/* ============================================================
   模版 49 · 拿铁  Latte
   标题 Vollkorn · 正文 Vollkorn
   暖咖奶·舒适衬线·色块卡片引用
   作用域 .tpl-latte · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-latte{
  --md-base:19px; --md-ratio:1.25; --md-lh:1.72; --md-measure:64ch;
  --md-h1:37.1px; --md-h2:29.7px; --md-h3:23.8px; --md-h4:19px; --md-h5:15.2px; --md-h6:14.3px;
  --md-head:"Vollkorn","Noto Serif SC",Georgia,serif; --md-body:"Vollkorn","Noto Serif SC",Georgia,serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#faf5ee; --fg:#312820; --muted:#857463; --faint:#f0e7da;
  --accent:#9c6b3e; --accent-soft:#f1e5d6; --rule:#e7dccc; --code-bg:#f0e7da; --code-fg:#52473b;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-latte[data-theme="dark"]{
  --bg:#181208; --fg:#e8dccc; --muted:#a08e78; --faint:#201810;
  --accent:#cf9a66; --accent-soft:#281d12; --rule:#322618; --code-bg:#201810; --code-fg:#cdbda4;
}
.tpl-latte>*{margin:0 0 1em;} .tpl-latte>*:first-child{margin-top:0;}

.tpl-latte h1,.tpl-latte h2,.tpl-latte h3,.tpl-latte h4,.tpl-latte h5,.tpl-latte h6{color:var(--fg);text-wrap:balance;}
.tpl-latte h1,.tpl-latte h2,.tpl-latte h3,.tpl-latte h4{font-family:var(--md-head);}
.tpl-latte h5{font-family:var(--md-body);font-size:15.2px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-latte h6{font-family:var(--md-body);font-size:14.3px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-latte h1{font-size:37.1px;font-weight:700;line-height:1.03;letter-spacing:-.03em;margin:0 0 .5em;}
.tpl-latte h2{font-size:29.7px;font-weight:700;line-height:1.12;letter-spacing:-.02em;margin:2em 0 .5em;}
.tpl-latte h3{font-size:23.8px;font-weight:600;line-height:1.22;margin:1.6em 0 .4em;}
.tpl-latte h4{font-size:19px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;}

.tpl-latte p{margin:0 0 1em;}
.tpl-latte .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;}
.tpl-latte strong{font-weight:600;color:var(--fg);}
.tpl-latte em{font-style:italic;}
.tpl-latte s,.tpl-latte del{color:var(--muted);}
.tpl-latte mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-latte code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-latte a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-latte a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-latte blockquote{margin:1.6em 0;padding:1em 1.3em;background:var(--accent-soft);border-radius:10px;color:var(--fg);}
.tpl-latte blockquote p{margin:0 0 .5em;}.tpl-latte blockquote p:last-child{margin:0;font-size:.86em;color:var(--muted);}

.tpl-latte ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-latte ul>li{margin:.4em 0;position:relative;}.tpl-latte ul>li::before{content:"";position:absolute;left:-1.05em;top:.62em;width:.4em;height:.4em;border-radius:50%;background:var(--accent);}
.tpl-latte ol{padding-left:1.5em;margin:0 0 1em;}.tpl-latte ol li{margin:.4em 0;}.tpl-latte ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-latte ul ul,.tpl-latte ol ol,.tpl-latte ul ol,.tpl-latte ol ul{margin:.4em 0;}
.tpl-latte .contains-task-list{list-style:none;padding-left:0;}
.tpl-latte .contains-task-list>li::before{content:none;}
.tpl-latte .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-latte .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-latte .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-latte .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-latte li:has(input:checked){color:var(--muted);}

.tpl-latte pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-latte pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-latte .tok-com{color:#a89a86;font-style:italic;}
.tpl-latte .tok-kw{color:#b06a2e;}
.tpl-latte .tok-fn{color:#3a6a8c;}
.tpl-latte .tok-str{color:#5e7c46;}
.tpl-latte .tok-num{color:#9a7a2e;}
.tpl-latte .tok-type{color:#8a5278;}
.tpl-latte .tok-op,.tpl-latte .tok-punc{color:var(--muted);}
.tpl-latte .tok-var{color:var(--code-fg);}
.tpl-latte[data-theme="dark"] .tok-com{color:#8a8276;}
.tpl-latte[data-theme="dark"] .tok-kw{color:#e0a060;}
.tpl-latte[data-theme="dark"] .tok-fn{color:#84acc8;}
.tpl-latte[data-theme="dark"] .tok-str{color:#a4c490;}
.tpl-latte[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-latte[data-theme="dark"] .tok-type{color:#cc9ac0;}

.tpl-latte table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-latte thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-latte tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-latte tbody tr:last-child td{border-bottom:none;}

.tpl-latte .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-latte .callout p{margin:0 0 .4em;} .tpl-latte .callout p:last-child{margin:0;}
.tpl-latte .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-latte .callout-note{border-left-color:#4a6f8a;} .tpl-latte .callout-note .callout-title{color:#4a6f8a;}
.tpl-latte .callout-tip{border-left-color:#5f7a4e;} .tpl-latte .callout-tip .callout-title{color:#5f7a4e;}
.tpl-latte .callout-warning{border-left-color:#a8702a;} .tpl-latte .callout-warning .callout-title{color:#a8702a;}

.tpl-latte hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-latte hr::before{content:"❦";color:var(--accent);font-size:1.15em;letter-spacing:.3em;}

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

.tpl-latte math{font-size:1.04em;}
.tpl-latte .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-latte .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-latte .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-latte .footnotes p{}
.tpl-latte .footnotes ol{padding-left:1.4em;} .tpl-latte .footnotes li{margin:.4em 0;}
.tpl-latte .footnote-backref{border:none;background:none;}


/* ===== mulberry ===== */
/* ============================================================
   模版 28 · 桑葚  Mulberry
   标题 Petrona · 正文 Petrona
   酒红紫·文学暖调·斜体展示标题·悬挂引号
   作用域 .tpl-mulberry · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-mulberry{
  --md-base:19px; --md-ratio:1.25; --md-lh:1.7; --md-measure:66ch;
  --md-h1:37.1px; --md-h2:29.7px; --md-h3:23.8px; --md-h4:19px; --md-h5:15.2px; --md-h6:14.3px;
  --md-head:"Petrona","Noto Serif SC",Georgia,serif; --md-body:"Petrona","Noto Serif SC",Georgia,serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#faf6f6; --fg:#322329; --muted:#867079; --faint:#f0e7ea;
  --accent:#8a3a52; --accent-soft:#f3e3e8; --rule:#e7dade; --code-bg:#f0e7ea; --code-fg:#54454c;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-mulberry[data-theme="dark"]{
  --bg:#1c151a; --fg:#e7dbe0; --muted:#a8909c; --faint:#241b21;
  --accent:#cf7d96; --accent-soft:#2a1f26; --rule:#332833; --code-bg:#241b21; --code-fg:#cdbcc4;
}
.tpl-mulberry>*{margin:0 0 1em;} .tpl-mulberry>*:first-child{margin-top:0;}

.tpl-mulberry h1,.tpl-mulberry h2,.tpl-mulberry h3,.tpl-mulberry h4,.tpl-mulberry h5,.tpl-mulberry h6{color:var(--fg);text-wrap:balance;}
.tpl-mulberry h1,.tpl-mulberry h2,.tpl-mulberry h3,.tpl-mulberry h4{font-family:var(--md-head);}
.tpl-mulberry h5{font-family:var(--md-body);font-size:15.2px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-mulberry h6{font-family:var(--md-body);font-size:14.3px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-mulberry h1{font-size:37.1px;font-weight:500;font-style:italic;line-height:1.06;letter-spacing:-.015em;margin:0 0 .55em;}
.tpl-mulberry h2{font-size:29.7px;font-weight:500;font-style:italic;line-height:1.16;margin:1.9em 0 .5em;}
.tpl-mulberry h3{font-size:23.8px;font-weight:600;line-height:1.25;margin:1.6em 0 .4em;}
.tpl-mulberry h4{font-size:19px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;font-style:italic;}

.tpl-mulberry p{margin:0 0 1em;}
.tpl-mulberry .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;}
.tpl-mulberry strong{font-weight:600;color:var(--fg);}
.tpl-mulberry em{font-style:italic;}
.tpl-mulberry s,.tpl-mulberry del{color:var(--muted);}
.tpl-mulberry mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-mulberry code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-mulberry a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-mulberry a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-mulberry blockquote{margin:1.8em 0;padding:.3em 0 .3em 2.2em;position:relative;color:var(--muted);font-style:italic;font-size:1.06em;}
.tpl-mulberry blockquote::before{content:"\201C";position:absolute;left:0;top:-.02em;font-family:var(--md-head);font-size:3em;line-height:1;color:var(--accent);opacity:.4;}
.tpl-mulberry blockquote p{margin:0 0 .5em;}.tpl-mulberry blockquote p:last-child{margin:0;font-style:normal;font-size:.82em;letter-spacing:.04em;text-transform:uppercase;}

.tpl-mulberry ul{padding-left:1.4em;margin:0 0 1em;list-style:disc;}.tpl-mulberry ul>li{margin:.4em 0;}.tpl-mulberry ul>li::marker{color:var(--accent);}
.tpl-mulberry ol{padding-left:1.5em;margin:0 0 1em;}.tpl-mulberry ol li{margin:.4em 0;}.tpl-mulberry ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-mulberry ul ul,.tpl-mulberry ol ol,.tpl-mulberry ul ol,.tpl-mulberry ol ul{margin:.4em 0;}
.tpl-mulberry .contains-task-list{list-style:none;padding-left:0;}
.tpl-mulberry .contains-task-list>li::before{content:none;}
.tpl-mulberry .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-mulberry .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-mulberry .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-mulberry .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-mulberry li:has(input:checked){color:var(--muted);}

.tpl-mulberry pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-mulberry pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-mulberry .tok-com{color:#a294a0;font-style:italic;}
.tpl-mulberry .tok-kw{color:#8a3a62;}
.tpl-mulberry .tok-fn{color:#4a5e9a;}
.tpl-mulberry .tok-str{color:#4f8050;}
.tpl-mulberry .tok-num{color:#a07a3e;}
.tpl-mulberry .tok-type{color:#7a4a82;}
.tpl-mulberry .tok-op,.tpl-mulberry .tok-punc{color:var(--muted);}
.tpl-mulberry .tok-var{color:var(--code-fg);}
.tpl-mulberry[data-theme="dark"] .tok-com{color:#9a8c98;}
.tpl-mulberry[data-theme="dark"] .tok-kw{color:#e090b0;}
.tpl-mulberry[data-theme="dark"] .tok-fn{color:#9aa6e0;}
.tpl-mulberry[data-theme="dark"] .tok-str{color:#a4c490;}
.tpl-mulberry[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-mulberry[data-theme="dark"] .tok-type{color:#c79bd8;}

.tpl-mulberry table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-mulberry thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-mulberry tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-mulberry tbody tr:last-child td{border-bottom:none;}

.tpl-mulberry .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-mulberry .callout p{margin:0 0 .4em;} .tpl-mulberry .callout p:last-child{margin:0;}
.tpl-mulberry .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-mulberry .callout-note{border-left-color:#5a6a9a;} .tpl-mulberry .callout-note .callout-title{color:#5a6a9a;}
.tpl-mulberry .callout-tip{border-left-color:#4f8050;} .tpl-mulberry .callout-tip .callout-title{color:#4f8050;}
.tpl-mulberry .callout-warning{border-left-color:#a8702a;} .tpl-mulberry .callout-warning .callout-title{color:#a8702a;}

.tpl-mulberry hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-mulberry hr::before{content:"❦";color:var(--accent);font-size:1.15em;letter-spacing:.3em;}

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

.tpl-mulberry math{font-size:1.04em;}
.tpl-mulberry .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-mulberry .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-mulberry .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-mulberry .footnotes p{}
.tpl-mulberry .footnotes ol{padding-left:1.4em;} .tpl-mulberry .footnotes li{margin:.4em 0;}
.tpl-mulberry .footnote-backref{border:none;background:none;}


/* ===== parchment ===== */
/* ============================================================
   模版 29 · 羊皮纸  Parchment
   标题 Cardo · 正文 Cardo
   古籍暖白·抄本·居中标题·双线引用·方块列表
   作用域 .tpl-parchment · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-parchment{
  --md-base:20px; --md-ratio:1.2; --md-lh:1.62; --md-measure:62ch;
  --md-h1:40.8px; --md-h2:28.8px; --md-h3:24px; --md-h4:20px; --md-h5:16.7px; --md-h6:15.7px;
  --md-head:"Cardo","Noto Serif SC",Georgia,serif; --md-body:"Cardo","Noto Serif SC",Georgia,serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#f5efe1; --fg:#33291a; --muted:#7e7058; --faint:#ece2cd;
  --accent:#7a5a2a; --accent-soft:#ece0c9; --rule:#ddd1b6; --code-bg:#ece2cd; --code-fg:#534734;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-parchment[data-theme="dark"]{
  --bg:#1b1710; --fg:#e6dcc6; --muted:#9c8d72; --faint:#241e15;
  --accent:#c5a363; --accent-soft:#2a2316; --rule:#352d1f; --code-bg:#241e15; --code-fg:#cabd9f;
}
.tpl-parchment>*{margin:0 0 1em;} .tpl-parchment>*:first-child{margin-top:0;}

.tpl-parchment h1,.tpl-parchment h2,.tpl-parchment h3,.tpl-parchment h4,.tpl-parchment h5,.tpl-parchment h6{color:var(--fg);text-wrap:balance;}
.tpl-parchment h1,.tpl-parchment h2,.tpl-parchment h3,.tpl-parchment h4{font-family:var(--md-head);}
.tpl-parchment h5{font-family:var(--md-body);font-size:16.7px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-parchment h6{font-family:var(--md-body);font-size:15.7px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-parchment h1{font-size:40.8px;font-weight:700;line-height:1.05;letter-spacing:-.025em;margin:0 0 .55em;text-align:center;}
.tpl-parchment h2{font-size:28.8px;font-weight:600;line-height:1.14;margin:2em 0 .5em;}
.tpl-parchment h3{font-size:24px;font-weight:600;line-height:1.24;margin:1.6em 0 .4em;}
.tpl-parchment h4{font-size:20px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;font-style:italic;}

.tpl-parchment p{margin:0 0 1em;text-align:justify;}
.tpl-parchment .lead{font-size:1.2em;line-height:1.5;color:var(--muted);font-style:italic;text-align:center;}
.tpl-parchment strong{font-weight:600;color:var(--fg);}
.tpl-parchment em{font-style:italic;}
.tpl-parchment s,.tpl-parchment del{color:var(--muted);}
.tpl-parchment mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-parchment code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-parchment a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-parchment a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-parchment blockquote{margin:1.8em 0;padding:.8em 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);text-align:center;font-family:var(--md-head);font-style:italic;font-size:1.3em;line-height:1.35;color:var(--fg);}
.tpl-parchment blockquote p{margin:0 0 .3em;}.tpl-parchment blockquote p:last-child{font-family:var(--md-body);font-style:normal;font-size:.55em;letter-spacing:.05em;color:var(--muted);}

.tpl-parchment ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-parchment ul>li{margin:.4em 0;position:relative;}.tpl-parchment ul>li::before{content:"";position:absolute;left:-1.0em;top:.56em;width:.4em;height:.4em;background:var(--accent);transform:rotate(45deg);}
.tpl-parchment ol{padding-left:1.5em;margin:0 0 1em;}.tpl-parchment ol li{margin:.4em 0;}.tpl-parchment ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-parchment ul ul,.tpl-parchment ol ol,.tpl-parchment ul ol,.tpl-parchment ol ul{margin:.4em 0;}
.tpl-parchment .contains-task-list{list-style:none;padding-left:0;}
.tpl-parchment .contains-task-list>li::before{content:none;}
.tpl-parchment .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-parchment .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-parchment .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-parchment .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-parchment li:has(input:checked){color:var(--muted);}

.tpl-parchment pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-parchment pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-parchment .tok-com{color:#a89a86;font-style:italic;}
.tpl-parchment .tok-kw{color:#b06a2e;}
.tpl-parchment .tok-fn{color:#3a6a8c;}
.tpl-parchment .tok-str{color:#5e7c46;}
.tpl-parchment .tok-num{color:#9a7a2e;}
.tpl-parchment .tok-type{color:#8a5278;}
.tpl-parchment .tok-op,.tpl-parchment .tok-punc{color:var(--muted);}
.tpl-parchment .tok-var{color:var(--code-fg);}
.tpl-parchment[data-theme="dark"] .tok-com{color:#8a8276;}
.tpl-parchment[data-theme="dark"] .tok-kw{color:#e0a060;}
.tpl-parchment[data-theme="dark"] .tok-fn{color:#84acc8;}
.tpl-parchment[data-theme="dark"] .tok-str{color:#a4c490;}
.tpl-parchment[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-parchment[data-theme="dark"] .tok-type{color:#cc9ac0;}

.tpl-parchment table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-parchment thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-parchment tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-parchment tbody tr:last-child td{border-bottom:none;}

.tpl-parchment .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-parchment .callout p{margin:0 0 .4em;} .tpl-parchment .callout p:last-child{margin:0;}
.tpl-parchment .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-parchment .callout-note{border-left-color:#4a6f8a;} .tpl-parchment .callout-note .callout-title{color:#4a6f8a;}
.tpl-parchment .callout-tip{border-left-color:#5f7a4e;} .tpl-parchment .callout-tip .callout-title{color:#5f7a4e;}
.tpl-parchment .callout-warning{border-left-color:#a8702a;} .tpl-parchment .callout-warning .callout-title{color:#a8702a;}

.tpl-parchment hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-parchment hr::before{content:"❧";color:var(--accent);font-size:1.15em;letter-spacing:.3em;}

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

.tpl-parchment math{font-size:1.04em;}
.tpl-parchment .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-parchment .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-parchment .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-parchment .footnotes p{text-align:left;}
.tpl-parchment .footnotes ol{padding-left:1.4em;} .tpl-parchment .footnotes li{margin:.4em 0;}
.tpl-parchment .footnote-backref{border:none;background:none;}


/* ===== sage ===== */
/* ============================================================
   模版 26 · 鼠尾草  Sage
   标题 Fraunces · 正文 Hanken Grotesk
   柔灰绿·植物感·悬挂编号标题·圆点列表
   作用域 .tpl-sage · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-sage{
  --md-base:18px; --md-ratio:1.25; --md-lh:1.72; --md-measure:68ch;
  --md-h1:35.2px; --md-h2:28.1px; --md-h3:22.5px; --md-h4:18px; --md-h5:14.4px; --md-h6:13.6px;
  --md-head:"Fraunces","Noto Serif SC",Georgia,serif; --md-body:"Hanken Grotesk","Noto Sans SC",system-ui,sans-serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#f4f6f0; --fg:#2b322a; --muted:#6f7d66; --faint:#e8ede0;
  --accent:#5c7a4e; --accent-soft:#e4ecdd; --rule:#dbe3d2; --code-bg:#e8ede0; --code-fg:#48513f;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-sage[data-theme="dark"]{
  --bg:#13160f; --fg:#dde3d2; --muted:#8a9680; --faint:#1b2015;
  --accent:#9cc07e; --accent-soft:#1f2618; --rule:#2a3020; --code-bg:#1b2015; --code-fg:#c2cbb6;
}
.tpl-sage>*{margin:0 0 1em;} .tpl-sage>*:first-child{margin-top:0;}

.tpl-sage h1,.tpl-sage h2,.tpl-sage h3,.tpl-sage h4,.tpl-sage h5,.tpl-sage h6{color:var(--fg);text-wrap:balance;}
.tpl-sage h1,.tpl-sage h2,.tpl-sage h3,.tpl-sage h4{font-family:var(--md-head);}
.tpl-sage h5{font-family:var(--md-body);font-size:14.4px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-sage h6{font-family:var(--md-body);font-size:13.6px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-sage{counter-reset:h2;}
.tpl-sage h1{font-size:35.2px;font-weight:600;line-height:1.08;letter-spacing:-.015em;margin:0 0 .6em;}
.tpl-sage h2{font-size:28.1px;font-weight:600;line-height:1.18;margin:2em 0 .55em;counter-increment:h2;display:flex;align-items:baseline;gap:.55em;}
.tpl-sage h2::before{content:counter(h2,decimal-leading-zero);font-size:.5em;font-weight:500;color:var(--accent);letter-spacing:.05em;font-variant-numeric:tabular-nums;}
.tpl-sage h3{font-size:22.5px;font-weight:600;line-height:1.25;margin:1.6em 0 .4em;}
.tpl-sage h4{font-size:18px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;font-style:italic;}

.tpl-sage p{margin:0 0 1em;}
.tpl-sage .lead{font-size:1.2em;line-height:1.5;color:var(--muted);}
.tpl-sage strong{font-weight:700;color:var(--fg);}
.tpl-sage em{font-style:italic;}
.tpl-sage s,.tpl-sage del{color:var(--muted);}
.tpl-sage mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-sage code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-sage a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-sage a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-sage blockquote{margin:1.7em 0;padding-left:1.5em;border-left:1px solid var(--rule);font-style:italic;color:var(--muted);font-size:1.05em;}
.tpl-sage blockquote p{margin:0 0 .5em;}.tpl-sage blockquote p:last-child{margin:0;font-style:normal;font-size:.82em;letter-spacing:.04em;text-transform:uppercase;}

.tpl-sage ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-sage ul>li{margin:.4em 0;position:relative;}.tpl-sage ul>li::before{content:"";position:absolute;left:-1.05em;top:.62em;width:.4em;height:.4em;border-radius:50%;background:var(--accent);}
.tpl-sage ol{padding-left:1.5em;margin:0 0 1em;}.tpl-sage ol li{margin:.4em 0;}.tpl-sage ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-sage ul ul,.tpl-sage ol ol,.tpl-sage ul ol,.tpl-sage ol ul{margin:.4em 0;}
.tpl-sage .contains-task-list{list-style:none;padding-left:0;}
.tpl-sage .contains-task-list>li::before{content:none;}
.tpl-sage .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-sage .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-sage .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-sage .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-sage li:has(input:checked){color:var(--muted);}

.tpl-sage pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-sage pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-sage .tok-com{color:#9aa089;font-style:italic;}
.tpl-sage .tok-kw{color:#5f7a3e;}
.tpl-sage .tok-fn{color:#3a7a6a;}
.tpl-sage .tok-str{color:#7a7a2e;}
.tpl-sage .tok-num{color:#a07a2e;}
.tpl-sage .tok-type{color:#7a5a82;}
.tpl-sage .tok-op,.tpl-sage .tok-punc{color:var(--muted);}
.tpl-sage .tok-var{color:var(--code-fg);}
.tpl-sage[data-theme="dark"] .tok-com{color:#88927e;}
.tpl-sage[data-theme="dark"] .tok-kw{color:#9cc07e;}
.tpl-sage[data-theme="dark"] .tok-fn{color:#7fc0aa;}
.tpl-sage[data-theme="dark"] .tok-str{color:#c0c070;}
.tpl-sage[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-sage[data-theme="dark"] .tok-type{color:#c4a0cc;}

.tpl-sage table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-sage thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-sage tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-sage tbody tr:last-child td{border-bottom:none;}

.tpl-sage .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-sage .callout p{margin:0 0 .4em;} .tpl-sage .callout p:last-child{margin:0;}
.tpl-sage .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-sage .callout-note{border-left-color:#4a6f8a;} .tpl-sage .callout-note .callout-title{color:#4a6f8a;}
.tpl-sage .callout-tip{border-left-color:#5c7a4e;} .tpl-sage .callout-tip .callout-title{color:#5c7a4e;}
.tpl-sage .callout-warning{border-left-color:#b07a2e;} .tpl-sage .callout-warning .callout-title{color:#b07a2e;}

.tpl-sage hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-sage hr::before{content:"❧";color:var(--accent);font-size:1.15em;letter-spacing:.3em;}

.tpl-sage figure{margin:1.8em 0;text-align:center;}
.tpl-sage img{max-width:100%;border-radius:6px;}
.tpl-sage .img-placeholder{display:flex;align-items:center;justify-content:center;height:220px;border-radius:6px;background:var(--faint);color:var(--accent);border:1px solid var(--rule);}
.tpl-sage figcaption{font-size:.84em;color:var(--muted);margin-top:.6em;line-height:1.45;text-wrap:pretty;}

.tpl-sage math{font-size:1.04em;}
.tpl-sage .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-sage .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-sage .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-sage .footnotes p{}
.tpl-sage .footnotes ol{padding-left:1.4em;} .tpl-sage .footnotes li{margin:.4em 0;}
.tpl-sage .footnote-backref{border:none;background:none;}


/* ===== seventies ===== */
/* ============================================================
   模版 53 · 七十年代  Seventies
   标题 DM Serif Display · 正文 Mulish
   复古橙棕·展示衬线标题·全大写小节
   作用域 .tpl-seventies · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-seventies{
  --md-base:18px; --md-ratio:1.333; --md-lh:1.68; --md-measure:66ch;
  --md-h1:42.6px; --md-h2:32px; --md-h3:24px; --md-h4:18px; --md-h5:13.5px; --md-h6:12.7px;
  --md-head:"DM Serif Display","Noto Serif SC",Georgia,serif; --md-body:"Mulish","Noto Sans SC",system-ui,sans-serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#faf3e8; --fg:#33271a; --muted:#857058; --faint:#f0e5d2;
  --accent:#c2682a; --accent-soft:#f4e3cf; --rule:#e8d9c2; --code-bg:#f0e5d2; --code-fg:#534436;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-seventies[data-theme="dark"]{
  --bg:#1a130a; --fg:#e8dcc8; --muted:#a08c72; --faint:#221910;
  --accent:#e08a44; --accent-soft:#2a1d10; --rule:#332617; --code-bg:#221910; --code-fg:#cdbda2;
}
.tpl-seventies>*{margin:0 0 1em;} .tpl-seventies>*:first-child{margin-top:0;}

.tpl-seventies h1,.tpl-seventies h2,.tpl-seventies h3,.tpl-seventies h4,.tpl-seventies h5,.tpl-seventies h6{color:var(--fg);text-wrap:balance;}
.tpl-seventies h1,.tpl-seventies h2,.tpl-seventies h3,.tpl-seventies h4{font-family:var(--md-head);}
.tpl-seventies h5{font-family:var(--md-body);font-size:13.5px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-seventies h6{font-family:var(--md-body);font-size:12.7px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-seventies h1{font-size:42.6px;font-weight:700;line-height:1.08;text-transform:uppercase;letter-spacing:.02em;margin:0 0 .55em;}
.tpl-seventies h2{font-size:27.5px;font-weight:600;line-height:1.2;text-transform:uppercase;letter-spacing:.1em;margin:2.1em 0 .55em;}
.tpl-seventies h3{font-size:24px;font-weight:600;line-height:1.26;margin:1.6em 0 .4em;}
.tpl-seventies h4{font-size:18px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;font-style:italic;}

.tpl-seventies p{margin:0 0 1em;}
.tpl-seventies .lead{font-size:1.2em;line-height:1.5;color:var(--muted);}
.tpl-seventies strong{font-weight:700;color:var(--fg);}
.tpl-seventies em{font-style:italic;}
.tpl-seventies s,.tpl-seventies del{color:var(--muted);}
.tpl-seventies mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-seventies code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-seventies a{color:var(--accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 38%,transparent);}.tpl-seventies a:hover{background:var(--accent-soft);border-bottom-color:var(--accent);}

.tpl-seventies blockquote{margin:1.6em 0;padding:.5em 1.3em;border-left:4px solid var(--accent);background:var(--faint);border-radius:0 6px 6px 0;color:var(--fg);}
.tpl-seventies blockquote p{margin:0 0 .5em;}.tpl-seventies blockquote p:last-child{margin:0;font-size:.88em;color:var(--muted);}

.tpl-seventies ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-seventies ul>li{margin:.4em 0;position:relative;}.tpl-seventies ul>li::before{content:"";position:absolute;left:-1.0em;top:.56em;width:.4em;height:.4em;background:var(--accent);transform:rotate(45deg);}
.tpl-seventies ol{padding-left:1.5em;margin:0 0 1em;}.tpl-seventies ol li{margin:.4em 0;}.tpl-seventies ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-seventies ul ul,.tpl-seventies ol ol,.tpl-seventies ul ol,.tpl-seventies ol ul{margin:.4em 0;}
.tpl-seventies .contains-task-list{list-style:none;padding-left:0;}
.tpl-seventies .contains-task-list>li::before{content:none;}
.tpl-seventies .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-seventies .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-seventies .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-seventies .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-seventies li:has(input:checked){color:var(--muted);}

.tpl-seventies pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-seventies pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-seventies .tok-com{color:#a89a86;font-style:italic;}
.tpl-seventies .tok-kw{color:#b06a2e;}
.tpl-seventies .tok-fn{color:#3a6a8c;}
.tpl-seventies .tok-str{color:#5e7c46;}
.tpl-seventies .tok-num{color:#9a7a2e;}
.tpl-seventies .tok-type{color:#8a5278;}
.tpl-seventies .tok-op,.tpl-seventies .tok-punc{color:var(--muted);}
.tpl-seventies .tok-var{color:var(--code-fg);}
.tpl-seventies[data-theme="dark"] .tok-com{color:#8a8276;}
.tpl-seventies[data-theme="dark"] .tok-kw{color:#e0a060;}
.tpl-seventies[data-theme="dark"] .tok-fn{color:#84acc8;}
.tpl-seventies[data-theme="dark"] .tok-str{color:#a4c490;}
.tpl-seventies[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-seventies[data-theme="dark"] .tok-type{color:#cc9ac0;}

.tpl-seventies table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-seventies thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-seventies tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-seventies tbody tr:last-child td{border-bottom:none;}

.tpl-seventies .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-seventies .callout p{margin:0 0 .4em;} .tpl-seventies .callout p:last-child{margin:0;}
.tpl-seventies .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-seventies .callout-note{border-left-color:#4a6f8a;} .tpl-seventies .callout-note .callout-title{color:#4a6f8a;}
.tpl-seventies .callout-tip{border-left-color:#5f7a4e;} .tpl-seventies .callout-tip .callout-title{color:#5f7a4e;}
.tpl-seventies .callout-warning{border-left-color:#c2682a;} .tpl-seventies .callout-warning .callout-title{color:#c2682a;}

.tpl-seventies hr{border:none;height:1em;margin:2.6em 0;text-align:center;}.tpl-seventies hr::before{content:"❧";color:var(--accent);font-size:1.15em;letter-spacing:.3em;}

.tpl-seventies figure{margin:1.8em 0;text-align:center;}
.tpl-seventies img{max-width:100%;border-radius:6px;}
.tpl-seventies .img-placeholder{display:flex;align-items:center;justify-content:center;height:220px;border-radius:6px;background:var(--faint);color:var(--accent);border:1px solid var(--rule);}
.tpl-seventies figcaption{font-size:.84em;color:var(--muted);margin-top:.6em;line-height:1.45;text-wrap:pretty;}

.tpl-seventies math{font-size:1.04em;}
.tpl-seventies .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-seventies .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-seventies .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-seventies .footnotes p{}
.tpl-seventies .footnotes ol{padding-left:1.4em;} .tpl-seventies .footnotes li{margin:.4em 0;}
.tpl-seventies .footnote-backref{border:none;background:none;}


/* ===== sky ===== */
/* ============================================================
   模版 84 · 晴空  Sky
   标题 Be Vietnam Pro · 正文 Be Vietnam Pro
   明亮晴蓝·清爽无衬线·下划重点·圆点
   作用域 .tpl-sky · 暗色加 data-theme="dark"
   ============================================================ */

.tpl-sky{
  --md-base:17px; --md-ratio:1.2; --md-lh:1.68; --md-measure:70ch;
  --md-h1:29.4px; --md-h2:24.5px; --md-h3:20.4px; --md-h4:17px; --md-h5:14.2px; --md-h6:13.4px;
  --md-head:"Be Vietnam Pro","Noto Sans SC",system-ui,sans-serif; --md-body:"Be Vietnam Pro","Noto Sans SC",system-ui,sans-serif; --md-mono:ui-monospace,"SF Mono",Menlo,monospace;
  --bg:#f5fafe; --fg:#1c2a36; --muted:#5e7080; --faint:#e6f1fa;
  --accent:#1f82c4; --accent-soft:#dceefa; --rule:#d7e7f1; --code-bg:#e6f1fa; --code-fg:#384753;
  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; text-rendering:optimizeLegibility; max-width:var(--md-measure); margin:0 auto; padding:4.5rem 2.4rem 7rem;
}
.tpl-sky[data-theme="dark"]{
  --bg:#0a131c; --fg:#d6e3ee; --muted:#7c909e; --faint:#121e29;
  --accent:#56aae0; --accent-soft:#11222f; --rule:#1f2e3a; --code-bg:#121e29; --code-fg:#bdcad4;
}
.tpl-sky>*{margin:0 0 1em;} .tpl-sky>*:first-child{margin-top:0;}

.tpl-sky h1,.tpl-sky h2,.tpl-sky h3,.tpl-sky h4,.tpl-sky h5,.tpl-sky h6{color:var(--fg);text-wrap:balance;}
.tpl-sky h1,.tpl-sky h2,.tpl-sky h3,.tpl-sky h4{font-family:var(--md-head);}
.tpl-sky h5{font-family:var(--md-body);font-size:14.2px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);}
.tpl-sky h6{font-family:var(--md-body);font-size:13.4px;margin:1.3em 0 .3em;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.tpl-sky h1{font-size:29.4px;font-weight:700;line-height:1.05;letter-spacing:-.025em;margin:0 0 .5em;}
.tpl-sky h2{font-size:24.5px;font-weight:700;line-height:1.16;margin:2em 0 .6em;padding-bottom:.3em;position:relative;}
.tpl-sky h2::after{content:"";position:absolute;left:0;bottom:0;width:1.8em;height:3px;border-radius:2px;background:var(--accent);}
.tpl-sky h3{font-size:20.4px;font-weight:600;line-height:1.24;margin:1.6em 0 .4em;}
.tpl-sky h4{font-size:17px;font-weight:600;line-height:1.3;margin:1.3em 0 .3em;}

.tpl-sky p{margin:0 0 1em;}
.tpl-sky .lead{font-size:1.2em;line-height:1.5;color:var(--muted);}
.tpl-sky strong{font-weight:700;color:var(--fg);}
.tpl-sky em{font-style:italic;}
.tpl-sky s,.tpl-sky del{color:var(--muted);}
.tpl-sky mark{background:var(--accent-soft);color:inherit;padding:0 .15em;border-radius:2px;}
.tpl-sky code{font-family:var(--md-mono);font-size:.84em;background:var(--code-bg);color:var(--code-fg);padding:.12em .42em;border-radius:4px;}
.tpl-sky a{color:var(--accent);text-decoration:none;font-weight:500;background-image:linear-gradient(currentColor,currentColor);background-size:100% 1px;background-repeat:no-repeat;background-position:0 100%;transition:background-size .2s;}.tpl-sky a:hover{background-size:100% 2px;}

.tpl-sky blockquote{margin:1.6em 0;padding:1em 1.3em;background:var(--accent-soft);border-radius:10px;color:var(--fg);}
.tpl-sky blockquote p{margin:0 0 .5em;}.tpl-sky blockquote p:last-child{margin:0;font-size:.86em;color:var(--muted);}

.tpl-sky ul{list-style:none;padding-left:1.4em;margin:0 0 1em;}.tpl-sky ul>li{margin:.4em 0;position:relative;}.tpl-sky ul>li::before{content:"";position:absolute;left:-1.05em;top:.62em;width:.4em;height:.4em;border-radius:50%;background:var(--accent);}
.tpl-sky ol{padding-left:1.5em;margin:0 0 1em;}.tpl-sky ol li{margin:.4em 0;}.tpl-sky ol li::marker{color:var(--accent);font-variant-numeric:tabular-nums;}
.tpl-sky ul ul,.tpl-sky ol ol,.tpl-sky ul ol,.tpl-sky ol ul{margin:.4em 0;}
.tpl-sky .contains-task-list{list-style:none;padding-left:0;}
.tpl-sky .contains-task-list>li::before{content:none;}
.tpl-sky .task-list-item{display:flex;align-items:baseline;gap:.6em;}
.tpl-sky .task-list-item input{appearance:none;-webkit-appearance:none;width:1.1em;height:1.1em;margin:0;flex:none;border:1.5px solid var(--rule);border-radius:5px;position:relative;top:.16em;background:var(--bg);}
.tpl-sky .task-list-item input:checked{background:var(--accent);border-color:var(--accent);}
.tpl-sky .task-list-item input:checked::after{content:"";position:absolute;left:.34em;top:.12em;width:.26em;height:.52em;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg);}
.tpl-sky li:has(input:checked){color:var(--muted);}

.tpl-sky pre{font-family:var(--md-mono);background:var(--code-bg);color:var(--code-fg);padding:1.1em 1.3em;border-radius:8px;border:1px solid var(--rule);overflow-x:auto;line-height:1.6;font-size:.8em;}
.tpl-sky pre code{background:none;padding:0;font-size:1em;color:inherit;}
.tpl-sky .tok-com{color:#94a0ad;font-style:italic;}
.tpl-sky .tok-kw{color:#3a6aa5;}
.tpl-sky .tok-fn{color:#2f7d8b;}
.tpl-sky .tok-str{color:#4f8050;}
.tpl-sky .tok-num{color:#9a6e2e;}
.tpl-sky .tok-type{color:#6b4a8a;}
.tpl-sky .tok-op,.tpl-sky .tok-punc{color:var(--muted);}
.tpl-sky .tok-var{color:var(--code-fg);}
.tpl-sky[data-theme="dark"] .tok-com{color:#7e8a97;}
.tpl-sky[data-theme="dark"] .tok-kw{color:#7fb0e6;}
.tpl-sky[data-theme="dark"] .tok-fn{color:#6cc4d4;}
.tpl-sky[data-theme="dark"] .tok-str{color:#8fcf9a;}
.tpl-sky[data-theme="dark"] .tok-num{color:#d8b06a;}
.tpl-sky[data-theme="dark"] .tok-type{color:#b69ad8;}

.tpl-sky table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92em;}
.tpl-sky thead th{text-align:left;font-weight:600;padding:.55em .9em;border-bottom:1.5px solid var(--accent);}
.tpl-sky tbody td{padding:.55em .9em;border-bottom:1px solid var(--rule);}
.tpl-sky tbody tr:last-child td{border-bottom:none;}

.tpl-sky .callout{margin:1.6em 0;padding:1em 1.2em;border-radius:8px;background:var(--faint);border-left:3px solid var(--accent);}
.tpl-sky .callout p{margin:0 0 .4em;} .tpl-sky .callout p:last-child{margin:0;}
.tpl-sky .callout-title{font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4em;}
.tpl-sky .callout-note{border-left-color:#1f82c4;} .tpl-sky .callout-note .callout-title{color:#1f82c4;}
.tpl-sky .callout-tip{border-left-color:#3f8a6a;} .tpl-sky .callout-tip .callout-title{color:#3f8a6a;}
.tpl-sky .callout-warning{border-left-color:#b07a2e;} .tpl-sky .callout-warning .callout-title{color:#b07a2e;}

.tpl-sky hr{border:none;height:1px;background:var(--rule);margin:2.6em 0;position:relative;}.tpl-sky hr::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:.5em;height:.5em;border-radius:50%;background:var(--accent);}

.tpl-sky figure{margin:1.8em 0;text-align:center;}
.tpl-sky img{max-width:100%;border-radius:6px;}
.tpl-sky .img-placeholder{display:flex;align-items:center;justify-content:center;height:220px;border-radius:6px;background:var(--faint);color:var(--accent);border:1px solid var(--rule);}
.tpl-sky figcaption{font-size:.84em;color:var(--muted);margin-top:.6em;line-height:1.45;text-wrap:pretty;}

.tpl-sky math{font-size:1.04em;}
.tpl-sky .math-block{margin:1.6em 0;text-align:center;overflow-x:auto;font-size:1.16em;}

.tpl-sky .footnote-ref a{font-size:.72em;vertical-align:super;border:none;color:var(--accent);font-weight:600;background:none;}
.tpl-sky .footnotes{margin-top:2.8em;padding-top:1.2em;border-top:1px solid var(--rule);font-size:.85em;color:var(--muted);}
.tpl-sky .footnotes p{}
.tpl-sky .footnotes ol{padding-left:1.4em;} .tpl-sky .footnotes li{margin:.4em 0;}
.tpl-sky .footnote-backref{border:none;background:none;}

