/* ===== 锂电装备知识库 共享样式 ===== */
:root {
  --bg: #f4f6f9;
  --sidebar-bg: #1e2a3a;
  --sidebar-active: #2a6df4;
  --accent: #2a6df4;
  --accent-2: #13b58b;
  --danger: #e0564a;
  --text: #1f2937;
  --text-light: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;
  --code-bg: #f0f4fa;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--sidebar-bg);
  color: #cbd5e1;
  padding: 28px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 0 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 16px;
}
.sidebar-brand .logo { font-size: 18px; font-weight: 700; color: #fff; }
.sidebar-brand .sub { font-size: 12px; color: #8197b1; margin-top: 4px; }
.sidebar .nav-group { margin-bottom: 8px; }
.sidebar .nav-group-title {
  padding: 8px 24px; font-size: 11px; letter-spacing: 1px;
  color: #5d7390; text-transform: uppercase; font-weight: 600;
}
.sidebar a.nav-link {
  display: block; padding: 10px 24px; color: #cbd5e1;
  text-decoration: none; font-size: 14px; transition: .2s;
  border-left: 3px solid transparent;
}
.sidebar a.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar a.nav-link.active { background: rgba(42,109,244,.15); color: #fff; border-left-color: var(--accent); }

/* ===== 主内容 ===== */
.main { flex: 1; padding: 40px 48px; max-width: 1000px; }
.toolbar {
  display: flex; align-items: center; gap: 16px; margin-bottom: 28px;
  font-size: 13px; color: var(--text-light);
}
.toolbar .crumb a { color: var(--accent); text-decoration: none; }
.breadcrumb { display: flex; gap: 6px; align-items: center; }

/* ===== 页头 ===== */
.page-header { margin-bottom: 32px; }
.page-header h1 {
  font-size: 30px; font-weight: 700; color: #111827;
  margin-bottom: 10px;
}
.page-header .tagline { font-size: 15px; color: var(--text-light); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; margin-left: 8px; vertical-align: middle;
}
.badge-blue { background: #e8f0fe; color: #1a56db; }
.badge-green { background: #e6f7f1; color: #0e9f74; }
.badge-red { background: #fdecea; color: #c0392b; }

/* ===== 卡片/章节 ===== */
.chapter {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px 32px; margin-bottom: 24px;
}
.chapter h2 {
  font-size: 21px; font-weight: 700; color: #111827;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--accent); display: inline-block;
}
.chapter h3 { font-size: 17px; margin: 22px 0 10px; color: #1f2937; }
.chapter p { margin-bottom: 12px; color: #374151; }
.chapter ul, .chapter ol { margin: 0 0 14px 22px; color: #374151; }
.chapter li { margin-bottom: 6px; }
.chapter strong { color: #111827; }

/* ===== 表格 ===== */
table {
  width: 100%; border-collapse: collapse; margin: 14px 0 18px;
  font-size: 14px;
}
th, td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
th { background: #f0f4fa; font-weight: 600; color: #1f2937; }
tr:nth-child(even) td { background: #fafbfc; }

/* ===== 提示框 ===== */
.note {
  border-left: 4px solid var(--accent); background: #eef4ff;
  padding: 14px 18px; border-radius: 6px; margin: 16px 0; font-size: 14px;
}
.note.success { border-left-color: var(--accent-2); background: #e8f7f2; }
.note.warn { border-left-color: var(--danger); background: #fdf0ee; }
.note.lightning { border-left-color: #f5a623; background: #fef7ec; }

/* ===== 卡片网格 ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 18px 0; }
.grid-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 20px; text-decoration: none; color: var(--text);
  transition: .2s; display: block;
}
.grid-card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.06); transform: translateY(-2px); }
.grid-card .g-title { font-size: 15px; font-weight: 700; color: #111827; margin-bottom: 6px; }
.grid-card .g-sub { font-size: 13px; color: var(--text-light); }
.grid-card .g-icon { font-size: 26px; margin-bottom: 10px; }

/* ===== 流程步骤 ===== */
.process-steps { list-style: none; margin: 18px 0; }
.process-steps li {
  display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border);
  align-items: flex-start;
}
.process-steps .step-num {
  min-width: 30px; height: 30px; border-radius: 50%; background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.process-steps .step-num.mine { background: var(--accent-2); }
.process-steps li.ours { background: #f4fbf8; border-radius: 8px; padding: 10px 12px; }
.process-steps .step-body h4 { font-size: 15px; margin-bottom: 4px; }
.process-steps .step-body p { font-size: 13px; color: #555; margin: 0; }
.ours-tag { font-size: 11px; color: #0e9f74; font-weight: 700; }

/* ===== 对比两栏 ===== */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 18px 0; }
.compare-col { border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.compare-col h4 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* ===== 关键词/小标签 ===== */
.kw { display: inline-block; background: #eef2f7; color: #374151; border-radius: 4px; padding: 1px 7px; font-size: 12px; margin-right: 6px; } 

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .main { padding: 24px 18px; }
  .compare { grid-template-columns: 1fr; }
}