/* ================= 使用手册页 - 扁平简约 ================= */
:root {
  --primary: #1e50e5;
  --primary-dark: #163db8;
  --primary-light: #eef2ff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg-soft: #f8fafc;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text); line-height: 1.7; background: #fff; -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
.m-container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ================= 顶部导航 ================= */
.m-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.m-nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.m-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--text); }
.m-brand__logo { width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.m-back { color: var(--primary); font-size: 14px; font-weight: 600; transition: opacity .2s; }
.m-back:hover { opacity: .75; }

/* ================= 列表页 Hero ================= */
.m-hero { background: #f6f8ff; padding: 64px 0 56px; }
.m-tag { display: inline-block; font-size: 13px; font-weight: 600; color: var(--primary); background: var(--primary-light); padding: 6px 14px; border-radius: 20px; margin-bottom: 18px; }
.m-hero h1 { font-size: 34px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 14px; }
.m-hero p { font-size: 16px; color: var(--text-muted); max-width: 560px; }

/* ================= 列表页 ================= */
.m-list { padding: 48px 0 80px; }
.m-master {
  display: flex; align-items: center; gap: 22px;
  border: 1.5px solid var(--primary); border-radius: var(--radius); padding: 28px 32px;
  background: var(--primary-light); transition: transform .25s;
}
.m-master:hover { transform: translateY(-4px); }
.m-master__icon { font-size: 42px; flex-shrink: 0; }
.m-master__body { flex: 1; min-width: 0; }
.m-master__tag { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--primary); padding: 2px 10px; border-radius: 10px; margin-bottom: 8px; }
.m-master h2 { font-size: 20px; margin-bottom: 6px; }
.m-master p { font-size: 14px; color: var(--text-muted); }
.m-master__more { color: var(--primary); font-weight: 600; font-size: 15px; flex-shrink: 0; }
.m-sec-title { font-size: 18px; font-weight: 700; margin: 46px 0 20px; }
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.m-card {
  display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; background: #fff;
  transition: transform .25s, border-color .25s;
}
.m-card:hover { transform: translateY(-4px); border-color: #b6c2f7; }
.m-card__icon { font-size: 26px; flex-shrink: 0; line-height: 1.4; }
.m-card__body { flex: 1; min-width: 0; }
.m-card__group { display: inline-block; font-size: 11px; color: var(--text-muted); background: var(--bg-soft); border: 1px solid var(--border); padding: 1px 8px; border-radius: 8px; margin-bottom: 8px; }
.m-card h3 { font-size: 16px; margin-bottom: 6px; color: var(--text); }
.m-card p { font-size: 13.5px; color: var(--text-muted); }
.m-card__more { color: var(--primary); font-size: 13px; font-weight: 600; align-self: center; flex-shrink: 0; }

/* ================= 详情页 ================= */
.m-crumb { padding: 28px 0 0; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.m-crumb a { color: var(--primary); }
.m-crumb a:hover { text-decoration: underline; }
.m-crumb__sep { color: var(--border); }
.m-detail { padding-bottom: 80px; }
.m-layout { display: grid; grid-template-columns: 250px 1fr; gap: 44px; margin-top: 22px; align-items: start; }
.m-toc {
  position: sticky; top: 88px; max-height: calc(100vh - 120px); overflow: auto;
  border: 1px solid var(--border); border-radius: 12px; padding: 18px; background: #fff;
}
.m-toc__title { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.m-toc ul { list-style: none; }
.m-toc li { margin: 2px 0; }
.m-toc a { display: block; font-size: 13px; color: var(--text-muted); padding: 5px 8px; border-radius: 6px; transition: all .2s; }
.m-toc a:hover { background: var(--primary-light); color: var(--primary); }
.m-toc .toc-l3 a { padding-left: 22px; font-size: 12.5px; }

/* ================= 内容排版 ================= */
.m-content { min-width: 0; }
.m-content h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 30px; scroll-margin-top: 84px; }
.m-content h2 { font-size: 22px; font-weight: 800; margin: 44px 0 16px; scroll-margin-top: 84px; }
.m-content h3 { font-size: 17px; font-weight: 700; margin: 30px 0 12px; scroll-margin-top: 84px; }
.m-content h4 { font-size: 15px; font-weight: 700; margin: 22px 0 10px; scroll-margin-top: 84px; }
.m-content p { font-size: 15px; margin: 12px 0; }
.m-content ul, .m-content ol { margin: 12px 0; padding-left: 26px; }
.m-content li { margin: 6px 0; font-size: 15px; }
.m-content a { color: var(--primary); }
.m-content a:hover { text-decoration: underline; }
.m-content strong { font-weight: 700; }
.m-content table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 14px; }
.m-content th, .m-content td { border: 1px solid var(--border); padding: 9px 13px; text-align: left; }
.m-content th { background: var(--bg-soft); font-weight: 600; }
.m-content code {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 6px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.m-content pre { background: #0f1b3d; color: #e2e8f0; border-radius: 12px; padding: 16px 18px; overflow-x: auto; margin: 16px 0; }
.m-content pre code { background: transparent; border: none; color: inherit; padding: 0; font-size: 13px; }
.m-content blockquote { border-left: 3px solid var(--primary); background: var(--primary-light); padding: 12px 16px; margin: 16px 0; border-radius: 0 10px 10px 0; }
.m-content img { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.m-content hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }

/* ================= 404 / 错误 ================= */
.m-404 { padding: 80px 0; text-align: center; }
.m-404 h1 { font-size: 24px; margin-bottom: 10px; }
.m-404 a { color: var(--primary); }

/* ================= 页脚 ================= */
.m-footer { background: #0f1b3d; color: #94a3b8; padding: 32px 0; font-size: 13px; }
.m-footer p { margin: 4px 0; }
.m-footer a { color: #64748b; transition: color .2s; }
.m-footer a:hover { color: #fff; }
.m-footer__icp { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================= 响应式 ================= */
@media (max-width: 960px) {
  .m-grid { grid-template-columns: repeat(2, 1fr); }
  .m-layout { grid-template-columns: 1fr; }
  .m-toc { position: static; max-height: none; }
  .m-toc ul { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 12px; }
}
@media (max-width: 600px) {
  .m-grid { grid-template-columns: 1fr; }
  .m-master { flex-direction: column; align-items: flex-start; }
  .m-hero h1 { font-size: 28px; }
  .m-toc ul { grid-template-columns: 1fr; }
  .m-content h1 { font-size: 25px; }
  .m-content h2 { font-size: 19px; }
}
