/* ZHL Docs — 极简文档样式（纯静态，无 JS） */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --text: #1a1c1e;
  --text-dim: #5c636a;
  --rule: #e3e5e8;
  --accent: #b3541e;
  --accent-deep: #8f4217;
  --code-bg: #f3f4f6;
  --maxw: 46rem;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC",
    -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "JetBrains Mono", monospace;
}

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.85;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* 顶栏 */
.site-head {
  border-bottom: 1px solid var(--rule);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.site-head .brand {
  font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none;
}
.site-head .brand em { font-style: normal; color: var(--accent); }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-dim); text-decoration: none; font-size: 13.5px;
  padding: 5px 10px; border-radius: 6px;
}
.site-nav a:hover { color: var(--accent-deep); background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--accent-deep); background: var(--bg-soft); }

/* 正文 */
main {
  flex: 1; width: 100%; max-width: var(--maxw);
  margin: 0 auto; padding: 36px 22px 56px;
}
article h1 {
  font-size: 26px; line-height: 1.35; font-weight: 700;
  margin-bottom: 6px; letter-spacing: 0.01em;
}
article .lead { color: var(--text-dim); margin-bottom: 28px; font-size: 15px; }
article h2 {
  font-size: 19px; font-weight: 700; margin: 40px 0 12px;
  padding-top: 18px; border-top: 1px solid var(--rule);
}
article h3 { font-size: 16px; font-weight: 700; margin: 26px 0 10px; }
article p { margin-bottom: 14px; }
article ul, article ol { padding-left: 1.4em; margin-bottom: 14px; }
article li { margin-bottom: 7px; }
article a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
article a:hover { color: var(--accent); }
article strong { font-weight: 700; }
article code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--code-bg); padding: 2px 6px; border-radius: 4px;
}
article pre {
  background: var(--code-bg); border: 1px solid var(--rule);
  border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin-bottom: 16px;
}
article pre code { background: none; padding: 0; }
article table { border-collapse: collapse; width: 100%; margin-bottom: 16px; font-size: 14.5px; }
article th, article td { border: 1px solid var(--rule); padding: 8px 12px; text-align: left; vertical-align: top; }
article th { background: var(--bg-soft); font-weight: 700; }
article hr { border: none; border-top: 1px solid var(--rule); margin: 28px 0; }
.tip {
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px;
}

/* 首页目录 */
.doc-list { list-style: none; padding: 0; margin-top: 8px; }
.doc-list li { border-bottom: 1px solid var(--rule); }
.doc-list li:first-child { border-top: 1px solid var(--rule); }
.doc-list a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 16px 6px; text-decoration: none; color: var(--text);
}
.doc-list a:hover { background: var(--bg-soft); }
.doc-list .t { font-weight: 600; font-size: 16px; }
.doc-list a:hover .t { color: var(--accent-deep); }
.doc-list .d { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* 页脚 */
.site-foot {
  border-top: 1px solid var(--rule);
  text-align: center; padding: 18px; font-size: 12.5px; color: var(--text-dim);
}

@media (max-width: 600px) {
  main { padding: 26px 16px 44px; }
  article h1 { font-size: 22px; }
  .site-nav { width: 100%; }
}
