/* ===== 基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --blue: #115199;
  --blue-deep: #2c4e70;
  --blue-light: #e8f0f8;
  --bg: #f2f5f8;
  --card: #ffffff;
  --card-alt: #f7f9fb;
  --line: #e3e8ee;
  --text: #33404f;
  --text-light: #6b7a8c;
  --red: #c0392b;
  --radius: 8px;
  --sidebar-w: 224px;
}

/* ===== 深色模式 ===== */
body.dark {
  --blue: #3a7bc8;
  --blue-deep: #7aa8d8;
  --blue-light: #1e2e42;
  --bg: #1a1f26;
  --card: #242c36;
  --card-alt: #1f2730;
  --line: #2e3742;
  --text: #d0d7e0;
  --text-light: #8895a5;
  --red: #e06050;
}
body.dark, body.dark * { transition: background-color .25s, border-color .25s, color .15s; }
body.dark .sidebar { background: #202832; }
body.dark .side-search input { background: var(--card); }
body.dark .menu-item { color: var(--blue-deep); }
body.dark .menu-item:hover { background: var(--blue-light); }
body.dark .menu-item.active { color: #fff; }
body.dark .submenu .menu-item.active { background: var(--blue-light); color: var(--blue); }
body.dark .topbar { background: var(--card); }
body.dark table { background: var(--card); }
body.dark .flow-step { background: var(--card); }
body.dark .filter-chip { background: var(--card); }
body.dark .term-card { background: var(--card); }
body.dark .search-result-item { background: var(--card); }
body.dark .search-result-item:hover { background: var(--blue-light); }
body.dark .search-result-item mark { background: #6b5a1f; color: #ffe9a8; }
body.dark .tool-panel { background: var(--card); }
body.dark .form-row select, body.dark .form-row input { background: var(--card); color: var(--text); }
body.dark .btn.gray { background: #2e3742; color: var(--blue-deep); }
body.dark .case-item { background: var(--card); }
body.dark .formula { background: var(--card-alt); }
body.dark .gallery-card { background: var(--card); }
body.dark .gallery-img { background: #1a2028; }
body.dark .tip.info { background: #1a2738; border-color: var(--blue); color: var(--blue-deep); }
body.dark .tip.warn { background: #3a2a1a; border-color: #d97c2b; color: #e0a060; }
body.dark .tip.danger { background: #3a1f1f; border-color: var(--red); color: #e89090; }
body.dark .article .lead { background: var(--blue-light); color: var(--blue-deep); }
body.dark .article strong { color: var(--blue-deep); }
body.dark .term-cat { background: var(--blue-light); color: var(--blue); }
body.dark .icon-btn { color: var(--text-light); }
body.dark .icon-btn.on { color: #f0c040; }
body.dark .fav-mini.on { color: #f0c040; }
body.dark .logo-mark { background: var(--blue); }
body.dark .logo-text { color: var(--blue-deep); }
body.dark .result-box { background: var(--card-alt); }
body.dark .calc-unit { color: var(--text-light); }
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}
.app { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-w);
  background: #f7f9fc;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  font-weight: bold;
  flex-shrink: 0;
}
.logo-text {
  font-size: 15px;
  font-weight: bold;
  color: var(--blue-deep);
}
.side-search { padding: 10px 12px; }
.side-search input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 13px;
  outline: none;
  color: var(--text);
}
.side-search input:focus { border-color: var(--blue); }

.menu { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.menu-group-title {
  font-size: 11px;
  color: var(--text-light);
  padding: 10px 10px 4px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--blue-deep);
  font-size: 13.5px;
  user-select: none;
  transition: background .15s;
}
.menu-item:hover { background: var(--blue-light); }
.menu-item.active { background: var(--blue); color: #fff; font-weight: bold; }
.menu-item .mi-icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 14px; }
.menu-item .arrow { margin-left: auto; font-size: 10px; transition: transform .2s; color: var(--text-light); }
.menu-item.active .arrow, .menu-item.active .mi-icon { color: #fff; }
.menu-item.open .arrow { transform: rotate(90deg); }

.submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
  margin-left: 14px;
  border-left: 1px dashed var(--line);
  padding-left: 6px;
}
.submenu.open { max-height: 600px; }
.submenu .menu-item {
  font-size: 13px;
  padding: 6px 10px;
  color: var(--text-light);
}
.submenu .menu-item.active { background: var(--blue-light); color: var(--blue); font-weight: bold; }

.sidebar-footer {
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-light);
  border-top: 1px solid var(--line);
  text-align: center;
}

/* ===== 主区域 ===== */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 48px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  position: sticky; top: 0; z-index: 50;
}
.menu-toggle {
  display: none;
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--blue-deep); padding: 4px 8px;
}
.page-title { font-size: 16px; color: var(--blue-deep); flex: 1; text-align: center; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  background: none; border: none; font-size: 18px; cursor: pointer;
  color: var(--text-light); padding: 4px 6px; line-height: 1;
}
.icon-btn.on { color: #e8a417; }

/* ===== 个人中心弹出面板 ===== */
.profile-wrap { position: relative; }
.profile-btn { display: flex; align-items: center; justify-content: center; }
.profile-btn svg { width: 19px; height: 19px; }
.profile-pop {
  position: absolute;
  top: 42px; right: -6px;
  width: 250px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(28, 42, 58, .16), 0 2px 6px rgba(28,42,58,.06);
  overflow: hidden;
  display: none;
  z-index: 100;
  padding-bottom: 6px;
}
.profile-pop.show { display: block; animation: popIn .18s cubic-bezier(.22,.8,.36,1); }
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

/* 头部 */
.pop-head {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 16px 16px 15px;
  background: linear-gradient(140deg, #0d437f 0%, #115199 60%, #1a63ad 100%);
  overflow: hidden;
}
.pop-head::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1.5px);
  background-size: 14px 14px;
}
.pop-avatar {
  position: relative; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}
.pop-avatar svg { width: 21px; height: 21px; }
.pop-head-info { position: relative; z-index: 1; flex: 1; min-width: 0; }
.pop-name { font-size: 14px; font-weight: bold; color: #fff; line-height: 1.35; }
.pop-sub {
  font-size: 11px; color: rgba(255,255,255,.72);
  margin-top: 2px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pop-ver {
  position: relative; z-index: 1;
  font-size: 10px; color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.3); border-radius: 5px;
  padding: 1px 6px; flex-shrink: 0;
}

/* 分组标题 */
.pop-group {
  font-size: 11px; color: var(--text-light);
  padding: 12px 16px 5px;
  letter-spacing: 1px;
}

/* 菜单项 */
.pop-item {
  display: flex; align-items: center; gap: 10px;
  margin: 1px 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px; color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s;
}
.pop-item:hover { background: var(--blue-light); color: var(--blue); }
.pop-ico {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--card-alt);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-deep);
  transition: background .15s, color .15s, border-color .15s;
}
.pop-ico svg { width: 15px; height: 15px; }
.pop-item:hover .pop-ico {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.pop-label { flex: 1; }
.pop-arrow { display: flex; color: #b0bcc9; transition: transform .15s, color .15s; }
.pop-arrow svg { width: 14px; height: 14px; }
.pop-item:hover .pop-arrow { color: var(--blue); transform: translateX(2px); }

/* 设置子页头 */
.pop-subhead {
  display: flex; align-items: center; gap: 2px;
  padding: 12px 12px 12px 8px;
  font-size: 13.5px; font-weight: bold; color: var(--blue-deep);
  border-bottom: 1px solid var(--line);
}
.pop-back {
  background: none; border: none; cursor: pointer;
  color: var(--blue-deep);
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.pop-back svg { width: 17px; height: 17px; }
.pop-back:hover { background: var(--blue-light); color: var(--blue); }

/* 设置行 */
.setting-row {
  display: flex; align-items: center; gap: 11px;
  margin: 12px 8px 0; padding: 10px;
  border-radius: 10px;
  transition: background .15s;
}
.setting-row:hover { background: var(--card-alt); }
.setting-ico {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.setting-ico svg { width: 16px; height: 16px; }
.setting-info { flex: 1; min-width: 0; }
.setting-name { font-size: 13px; color: var(--text); font-weight: bold; }
.setting-desc { font-size: 11px; color: var(--text-light); margin-top: 1px; }
.setting-foot {
  font-size: 10.5px; color: var(--text-light);
  text-align: center; padding: 14px 0 4px;
}

/* 开关 */
.switch {
  position: relative;
  width: 40px; height: 22px;
  background: #c2ccd6;
  border-radius: 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
.switch::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s;
}
.switch.on { background: var(--blue); }
.switch.on::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* 深色适配 */
body.dark .profile-pop { box-shadow: 0 12px 36px rgba(0,0,0,.55); border-color: #2e3742; }
body.dark .pop-ico { background: #2a333e; border-color: #38424e; color: var(--blue-deep); }
body.dark .pop-item:hover .pop-ico { background: var(--blue); border-color: var(--blue); color: #fff; }
body.dark .pop-subhead { border-color: #2e3742; }
body.dark .setting-row:hover { background: #1f2730; }
body.dark .switch { background: #46525f; }

.content { padding: 16px; max-width: 980px; width: 100%; margin: 0 auto; }

/* ===== 文章内容 ===== */
.article h2 {
  font-size: 19px;
  color: var(--blue-deep);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--blue);
  display: inline-block;
}
.article h3 {
  font-size: 15.5px;
  color: var(--blue);
  margin: 18px 0 8px;
  padding-left: 8px;
  border-left: 3px solid var(--blue);
}
.article p { margin-bottom: 10px; color: var(--text); }
.article ul, .article ol { margin: 0 0 10px 22px; }
.article li { margin-bottom: 5px; }
.article strong { color: var(--blue-deep); }
.article .lead {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  color: var(--blue-deep);
  font-size: 13.5px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}
.card.alt { background: var(--card-alt); }

/* 表格 */
.table-wrap { overflow-x: auto; margin-bottom: 12px; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
th {
  background: var(--blue);
  color: #fff;
  text-align: left;
  padding: 8px 12px;
  font-weight: bold;
  white-space: nowrap;
}
td { padding: 8px 12px; border-top: 1px solid var(--line); }
tr:nth-child(even) td { background: var(--card-alt); }

/* 提示框 */
.tip {
  border-radius: var(--radius);
  padding: 9px 12px;
  margin-bottom: 10px;
  font-size: 13px;
  border-left: 3px solid;
}
.tip.info { background: #eef5fb; border-color: var(--blue); color: var(--blue-deep); }
.tip.warn { background: #fdf3ec; border-color: #d97c2b; color: #9a5410; }
.tip.danger { background: #fdecec; border-color: var(--red); color: #8f2820; }

/* 工艺流程 */
.process-flow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.flow-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  position: relative;
}
.flow-step b { color: var(--blue); display: block; font-size: 13.5px; }
.flow-step span { color: var(--text-light); font-size: 12px; }
.flow-arrow { display: flex; align-items: center; color: var(--text-light); }

/* 术语卡片 */
.glossary-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.filter-chip {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text-light);
}
.filter-chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.term-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: box-shadow .15s;
}
.term-card:hover { box-shadow: 0 2px 10px rgba(44,78,112,.1); }
.term-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.term-zh { font-size: 14.5px; font-weight: bold; color: var(--blue-deep); }
.term-en { font-size: 12px; color: var(--text-light); font-style: italic; }
.term-desc { font-size: 13px; color: var(--text); }
.term-cat { font-size: 11px; color: var(--blue); background: var(--blue-light); padding: 1px 8px; border-radius: 10px; display: inline-block; margin-top: 6px; }
.fav-mini { float: right; cursor: pointer; color: #ccc; font-size: 15px; }
.fav-mini.on { color: #e8a417; }

/* 搜索结果 */
.search-result-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 13.5px;
}
.search-result-item:hover { border-color: var(--blue); background: var(--blue-light); }
.search-result-item .sr-title { font-weight: bold; color: var(--blue-deep); }
.search-result-item .sr-path { font-size: 12px; color: var(--text-light); }
.search-result-item mark { background: #ffe9a8; padding: 0 2px; border-radius: 2px; }
.empty-tip { text-align: center; color: var(--text-light); padding: 40px 0; font-size: 13.5px; }

/* 工具：选型助手 / 计算器 */
.tool-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.tool-panel h3 { border: none; padding: 0; margin: 0 0 12px; font-size: 15px; color: var(--blue-deep); }
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row label { width: 120px; color: var(--text); font-size: 13.5px; flex-shrink: 0; }
.form-row select, .form-row input {
  flex: 1; min-width: 140px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13.5px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.form-row select:focus, .form-row input:focus { border-color: var(--blue); }
.btn {
  background: var(--blue); color: #fff; border: none;
  padding: 8px 20px; border-radius: var(--radius);
  font-size: 13.5px; cursor: pointer;
}
.btn:hover { background: #0e4580; }
.btn.gray { background: #e8edf2; color: var(--blue-deep); }
.result-box {
  background: var(--card-alt);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 13.5px;
  display: none;
}
.result-box.show { display: block; }
.result-box .big { font-size: 22px; color: var(--blue); font-weight: bold; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-unit { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* 术语日文 */
.term-jp { font-size: 12px; color: var(--text-light); margin-left: auto; }
.term-head { flex-wrap: wrap; }

/* 案例 */
.case-item {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.case-item h4 { color: var(--blue-deep); font-size: 14px; margin-bottom: 4px; }
.case-item p { font-size: 13px; margin-bottom: 3px; }

/* 公式 */
.formula {
  background: var(--card-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 10px;
  font-family: Consolas, "Courier New", monospace;
  color: var(--blue-deep);
  font-size: 13.5px;
}

/* 图谱库 */
.gallery-cat {
  font-size: 15px;
  color: var(--blue-deep);
  margin: 14px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 8px; }
.gallery-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-img { aspect-ratio: 4/3; background: #edf1f5; display: flex; }
.gallery-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-card figcaption { padding: 8px 10px; }
.gallery-card figcaption b { display: block; font-size: 13.5px; color: var(--blue-deep); margin-bottom: 2px; }
.gallery-card figcaption span { font-size: 12px; color: var(--text-light); }

/* 学习路径 */
.path-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.path-tab {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 14px;
  cursor: pointer; font-size: 13px; color: var(--text-light);
  transition: all .15s;
}
.path-tab:hover { border-color: var(--blue); color: var(--blue); }
.path-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: bold; }
.path-tab-icon { font-size: 16px; }
.path-tab-pct { margin-left: 4px; font-size: 12px; opacity: .8; }

.path-header {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.path-title { font-size: 17px; color: var(--blue-deep); margin-bottom: 4px; }
.path-desc { font-size: 13px; color: var(--text-light); }
.path-progress { flex: 1; min-width: 180px; max-width: 280px; }
.path-progress-bar {
  height: 8px; background: var(--card-alt);
  border-radius: 4px; overflow: hidden; margin-bottom: 4px;
}
.path-progress-fill { height: 100%; background: var(--blue); border-radius: 4px; transition: width .3s; }
.path-progress-text { font-size: 12px; color: var(--text-light); text-align: right; }

.stage-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
}
.stage-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; user-select: none;
}
.stage-index { font-size: 12px; color: var(--blue); background: var(--blue-light); padding: 2px 8px; border-radius: 10px; }
.stage-title { flex: 1; font-weight: bold; color: var(--blue-deep); font-size: 14px; }
.stage-count { font-size: 12px; color: var(--text-light); }
.stage-arrow { font-size: 11px; color: var(--text-light); transition: transform .2s; }
.stage-card.open .stage-arrow { transform: rotate(180deg); }

.stage-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.stage-card.open .stage-body { max-height: 1000px; }
.stage-progress { height: 3px; background: var(--card-alt); }
.stage-progress-fill { height: 100%; background: var(--blue); transition: width .3s; }

.path-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer; border-top: 1px solid var(--line);
  transition: background .15s;
}
.path-item:hover { background: var(--card-alt); }
.path-item.done .pi-title { color: var(--text-light); text-decoration: line-through; }
.pi-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line); display: flex;
  align-items: center; justify-content: center;
  font-size: 11px; color: transparent; flex-shrink: 0;
}
.path-item.done .pi-check {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.pi-title { flex: 1; font-size: 13.5px; color: var(--text); }
.pi-go { font-size: 12px; color: var(--blue); }

/* 故障诊断 */
.diag-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
}
.diag-step {
  font-size: 12.5px; padding: 5px 12px; border-radius: 20px;
  background: var(--card-alt); color: var(--text-light);
  border: 1px solid var(--line);
}
.diag-step.active { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: bold; }
.diag-line { width: 24px; height: 1px; background: var(--line); }
.diag-subtitle { font-size: 14px; color: var(--blue-deep); font-weight: bold; margin-bottom: 10px; }
.diag-actions { margin-bottom: 12px; display: flex; gap: 8px; }

.diag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.diag-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 14px; text-align: center;
  cursor: pointer; transition: all .15s;
}
.diag-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(44,78,112,.08); }
.diag-card-icon { font-size: 32px; margin-bottom: 8px; }
.diag-card-name { font-weight: bold; color: var(--blue-deep); font-size: 14px; margin-bottom: 4px; }
.diag-card-count { font-size: 12px; color: var(--text-light); }

.diag-list { display: flex; flex-direction: column; gap: 8px; }
.diag-list-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px;
  cursor: pointer; transition: all .15s;
}
.diag-list-item:hover { border-color: var(--blue); background: var(--card-alt); }
.diag-list-icon { font-size: 22px; flex-shrink: 0; }
.diag-list-name { flex: 1; font-size: 14px; color: var(--text); }
.diag-list-arrow { color: var(--blue); font-size: 14px; }

.diag-result-head {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
}
.diag-result-icon { font-size: 34px; flex-shrink: 0; }
.diag-result-name { font-size: 16px; font-weight: bold; color: var(--blue-deep); margin-bottom: 2px; }
.diag-result-cat { font-size: 12px; color: var(--text-light); }
.diag-causes-title { font-size: 14px; font-weight: bold; color: var(--blue-deep); margin-bottom: 10px; }

.diag-cause-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px;
}
.diag-cause-rank {
  display: inline-block; font-size: 11px; font-weight: bold;
  background: var(--blue); color: #fff;
  padding: 2px 10px; border-radius: 10px; margin-bottom: 6px;
}
.diag-cause-name { font-size: 14px; font-weight: bold; color: var(--text); margin-bottom: 6px; }
.diag-cause-sol { font-size: 13px; color: var(--text); line-height: 1.7; }
.diag-cause-case { font-size: 12.5px; color: var(--text-light); margin-top: 6px; }
.diag-go-know {
  margin-top: 8px; background: none; border: 1px solid var(--blue);
  color: var(--blue); padding: 5px 14px; border-radius: var(--radius);
  font-size: 12.5px; cursor: pointer;
}
.diag-go-know:hover { background: var(--blue-light); }

/* ===== 响应式 ===== */
.mask { display: none; }

/* 外链菜单项（行业资讯） */
a.menu-item { text-decoration: none; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; width: 240px; }
  .sidebar.show { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .mask.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 90; }
  .page-title { font-size: 15px; }
  .content { padding: 12px; }
  .calc-grid { grid-template-columns: 1fr; }
  .form-row label { width: 100%; }
}
