/* ============================================================
   post-minimal.css — 统一简洁模板
   用于 _posts/ 下 layout:null 的独立 HTML 长文。
   设计目标：单栏、无侧边栏、无 JS 依赖、内容优先。
   ============================================================ */

:root {
  --ink: #1c1c1e;
  --muted: #5f5f66;
  --faint: #9a9aa0;
  --rule: #e6e6e8;
  --bg: #ffffff;
  --soft: #f7f7f8;
  --accent: #3457d5;
  --accent-soft: #eef1fb;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; border-bottom: 1px solid var(--rule); }
.hero .eyebrow {
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 42px); font-weight: 700;
  line-height: 1.2; letter-spacing: -.01em; margin-bottom: 16px;
}
.hero .deck { font-size: 18px; line-height: 1.7; color: var(--muted); margin-bottom: 24px; }
.hero .meta {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: 13px; color: var(--faint);
}
.hero .meta b { color: var(--muted); font-weight: 600; margin-right: 4px; }

/* ---------- sections & headings ---------- */
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--rule); }

.sec-num {
  font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
h2 { font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; margin-bottom: 16px; }
h2 .sub { display: block; font-size: 15px; font-weight: 400; color: var(--faint); margin-top: 6px; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.35; margin: 36px 0 12px; }
h4 {
  font-size: 13px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin: 28px 0 10px;
}

p { margin-bottom: 1.2em; }
p.lead { font-size: 19px; color: var(--muted); }
strong { font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: .45em; }
li::marker { color: var(--faint); }

code {
  font-family: var(--mono); font-size: .85em;
  background: var(--soft); border: 1px solid var(--rule);
  padding: 1px 5px; border-radius: 4px;
}

/* ---------- blocks ---------- */
blockquote, .callout {
  background: var(--soft); border-left: 3px solid var(--accent);
  padding: 16px 20px; margin: 28px 0; font-size: 15.5px; color: var(--muted);
}
.callout .ct {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.callout p:last-child, blockquote p:last-child { margin-bottom: 0; }

pre {
  background: var(--soft); border: 1px solid var(--rule); border-radius: 8px;
  padding: 16px 18px; margin: 24px 0; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.65; color: var(--ink);
}
pre code { background: none; border: none; padding: 0; font-size: inherit; }

/* ---------- tables ---------- */
.tablewrap { margin: 28px 0; overflow-x: auto; border: 1px solid var(--rule); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.55; }
thead th {
  text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--soft);
}
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }

/* ---------- figures ---------- */
figure { margin: 32px 0; }
figure .fig-body {
  background: var(--soft); border: 1px solid var(--rule);
  border-radius: 8px; padding: 20px; overflow-x: auto;
}
figure svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
figcaption { font-size: 13px; color: var(--faint); margin-top: 12px; line-height: 1.6; }
figcaption b { color: var(--muted); }

/* mermaid 图：自然宽度渲染，容器内横向滚动 */
.mermaid { overflow-x: auto; }
.mermaid svg { max-width: none; }

/* ---------- stat row ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin: 28px 0; }
.stat { background: var(--bg); padding: 18px 16px; }
.stat .v { font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat .v small { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat .l { font-size: 12px; color: var(--faint); margin-top: 6px; line-height: 1.5; }

/* ---------- two-column compare ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.duo > div { background: var(--soft); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; }
.duo h5 { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--accent); margin-bottom: 10px; }
.duo p, .duo ul { font-size: 14.5px; }
.duo ul { margin-bottom: 0; }

/* ---------- card grid (细节卡片等) ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.card { border: 1px solid var(--rule); border-radius: 8px; padding: 16px 18px; }
.card .num { font-family: var(--mono); font-size: 11px; color: var(--accent); font-weight: 600; }
.card h5 { font-size: 15px; font-weight: 700; margin: 4px 0 8px; }
.card p { font-size: 14px; color: var(--muted); margin-bottom: 0; }
.card .take { font-size: 13.5px; color: var(--accent); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule); }

/* ---------- lang switch (中英切换) ---------- */
.lang-switch {
  position: fixed; top: 14px; right: 16px; z-index: 60;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  background: var(--bg); border: 1px solid var(--rule); color: var(--muted);
  padding: 5px 12px; border-radius: 100px; text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--rule); margin-top: 24px; padding: 40px 0 64px; }
footer h4 { margin-top: 0; }
footer .refs { font-size: 14px; color: var(--muted); }
footer .refs li { margin-bottom: .6em; }
footer .colophon { font-size: 13px; color: var(--faint); margin-top: 28px; line-height: 1.7; }
.endmark { text-align: center; color: var(--faint); letter-spacing: .5em; margin: 48px 0 0; font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 32px; }
  section { padding: 36px 0; }
  .duo, .cards { grid-template-columns: 1fr; }
  .lang-switch { top: auto; bottom: 14px; right: 14px; }
}
