/* ===== 工业风主题变量 ===== */
:root {
  --bg: #eceff2;
  --card: #ffffff;
  --ink: #161c22;
  --muted: #5c6873;
  --line: #cfd6dd;
  --line-strong: #b6c0ca;
  --accent: #0e63d6;
  --accent-ink: #ffffff;
  --accent-2: #ff7a1a;          /* 工业橙 */
  --ok: #0e8345;
  --header: #12181f;
  --header-ink: #e8edf3;
  --chip-bg: #e7ebef;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 2px 8px rgba(16, 24, 32, .04);
  --stat-bg: #fafbfd;
  --stat-accent-bg: #eef4ff;
  --stat-accent-border: #c9dcff;
  --row-hover: #f5f9ff;
}
html[data-theme="dark"] {
  --bg: #0c1116;
  --card: #151c24;
  --ink: #e6edf3;
  --muted: #94a3b1;
  --line: #2a343e;
  --line-strong: #3a4652;
  --accent: #4d9dff;
  --accent-ink: #07111d;
  --accent-2: #ff8f3d;
  --ok: #34c27a;
  --header: #0a0f14;
  --header-ink: #dce5ee;
  --chip-bg: #1d262f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --stat-bg: #1a232c;
  --stat-accent-bg: #152a44;
  --stat-accent-border: #24486e;
  --row-hover: #1a2430;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15.5px; line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex; align-items: center; gap: 22px;
  background: var(--header); color: var(--header-ink);
  padding: 0 24px; height: 58px;
  border-bottom: 3px solid var(--accent);
  position: sticky; top: 0; z-index: 50;
}
.logo {
  color: var(--header-ink); font-size: 18px; font-weight: 800;
  letter-spacing: .02em; white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
}
.logo::before {
  content: ""; width: 27px; height: 27px; flex: none;
  background: url("/logo-mark.svg") no-repeat center / contain;
}
.topbar-search { flex: 1; max-width: 640px; }
.topbar-search input {
  width: 100%; padding: 9px 14px; border-radius: var(--radius);
  border: 1px solid #2c3742; background: #1a222c; color: #e8edf3;
  font-size: 15px; outline: none;
}
.topbar-search input::placeholder { color: #7d8a97; }
.topbar-search input:focus { border-color: var(--accent); }
.topbar-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.toolbtn {
  height: 34px; min-width: 34px; padding: 0 10px;
  border: 1px solid #2c3742; border-radius: var(--radius);
  background: #1a222c; color: #cfd8e2; cursor: pointer;
  font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center;
  gap: 4px; user-select: none;
}
.toolbtn:hover { border-color: var(--accent); color: #fff; }
.toolbtn.active { border-color: var(--accent); color: #fff; background: #1f2c3a; }

main { max-width: 1360px; margin: 26px auto 80px; padding: 0 26px; }

/* ---------- 首页 ---------- */
.hero { text-align: center; padding: 30px 0 8px; }
.hero h1 { font-size: 30px; margin: 0 0 6px; }
.hero p { color: var(--muted); margin: 0; }
.tabs { display: flex; gap: 0; margin: 26px auto 0; max-width: 640px; }
.tabs button {
  flex: 1; padding: 10px; border: 1px solid var(--line); background: var(--chip-bg);
  color: var(--muted); cursor: pointer; font-size: 15px;
}
.tabs button.active { background: var(--card); color: var(--ink); border-bottom-color: transparent; font-weight: 700; }
.panel {
  max-width: 640px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 20px;
}
.panel .row { display: flex; gap: 10px; }
.panel input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); font-size: 15px;
}
.panel input:focus, textarea:focus { border-color: var(--accent); outline: none; }
button.go {
  padding: 10px 22px; border: none; border-radius: 8px; background: var(--accent);
  color: var(--accent-ink); font-size: 15px; cursor: pointer;
}
button.go:hover { filter: brightness(1.08); }
button.go:disabled { opacity: .5; cursor: not-allowed; }
.panel .hint { color: var(--muted); font-size: 13px; margin-top: 10px; }

.typegrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px; margin-top: 34px;
}
.typecard {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: center;
  color: var(--ink);
}
.typecard:hover { border-color: var(--accent); text-decoration: none; }
.typecard .n { color: var(--muted); font-size: 13px; }
.typecard .series { color: var(--muted); font-size: 12px; }

/* ---------- 结果表 ---------- */
.crumb { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
table.list {
  width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
table.list th, table.list td {
  padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left;
  white-space: nowrap;
}
table.list th { background: var(--chip-bg); font-weight: 600; font-size: 13.5px; }
table.list tr:hover td { background: var(--row-hover); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { max-height: 420px; overflow: auto; border-radius: 8px; min-width: 0; }

/* 评论区 */
.cmt { border-bottom: 1px dashed var(--line); padding: 10px 0; }
.cmt:first-child { padding-top: 0; }
.cmt-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.cmt-head .muted { font-size: 12.5px; }
.cmt-body { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12px;
  background: #e8f0fe; color: #174ea6;
}
.muted { color: var(--muted); }

/* ---------- 详情 ---------- */
.detail { display: grid; grid-template-columns: 400px 1fr; gap: 20px; align-items: start; }
.detail > div { min-width: 0; }   /* 允许 1fr 列收缩, 防止宽表格撑破布局 */
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }

/* 上下堆叠结构 */
.detail-stack { display: flex; flex-direction: column; gap: 16px; }
.detail-hero { padding: 16px 20px; }
.rate-summary { display: inline-flex; align-items: baseline; gap: 6px; font-size: 14px; }
.rate-summary .stars { color: #f5a623; letter-spacing: 1px; }

/* 评分输入 */
.rate-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.star-input { display: inline-flex; gap: 2px; }
.star-input button {
  background: none; border: none; cursor: pointer; font-size: 26px; line-height: 1;
  color: #d5dbe3; padding: 0 2px; transition: color .12s;
}
.star-input button:hover, .star-input button:hover ~ button { color: #f5a623; }
.star-input:hover button { color: #f5a623; }
.star-input button:disabled { cursor: not-allowed; opacity: .55; }
.star-input:hover button:disabled { color: #d5dbe3; }

/* 反馈 */
.fb-block { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.fb-title { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fb-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px;
  font-size: 13.5px; cursor: pointer; background: #fff; user-select: none;
}
.fb-chip input { accent-color: var(--accent); }
.fb-chip:has(input:checked) { border-color: var(--accent); background: #eef4ff; color: #0b4fd6; }
#fb-detail {
  width: 100%; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-family: inherit; font-size: 14px; margin-bottom: 10px; resize: vertical;
  background: var(--card); color: var(--ink);
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px;
}
.card h2 { margin: 0 0 4px; font-size: 22px; }
.card h3 { margin: 18px 0 8px; font-size: 15px; color: var(--muted); }

/* 详情页头 */
.detail-head h2 { font-size: 26px; letter-spacing: -0.01em; }
.head-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.alias-line { color: var(--muted); font-size: 13px; }

/* 参数区块 */
.param-section { margin-top: 20px; }
.param-title {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.06em; margin-bottom: 8px;
}
.stat-grid { display: grid; gap: 10px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.cols-auto { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stat {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: var(--stat-bg);
}
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.stat-value {
  font-size: 26px; font-weight: 700; line-height: 1.15;
  font-variant-numeric: tabular-nums; color: var(--ink);
  white-space: nowrap;
}
.stat-value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat-value .dash { color: #b6bfca; font-weight: 500; }
.stat-grid.big .stat-value { font-size: 30px; }
.stat-grid.accent .stat {
  background: var(--stat-accent-bg); border-color: var(--stat-accent-border);
}
.stat-grid.accent .stat-value { color: #0b4fd6; font-size: 24px; }
.stat-grid.small .stat { padding: 8px 12px; background: var(--stat-bg); }
.stat-grid.small .stat-value { font-size: 19px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-top: 12px; }
.kv div { border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.kv .k { color: var(--muted); font-size: 13px; }
.kv .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.sfx { margin-top: 10px; }
.sfx li { margin: 3px 0; }
.imgbox { text-align: center; }
.imgbox img { max-width: 100%; }
.imgtoggle {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  flex-wrap: wrap; text-align: center;
  margin-top: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.detail svg, .imgbox img { max-width: 100%; height: auto; }
.detail svg { color: var(--ink); }
.imgtoggle input { accent-color: var(--accent); }
textarea#bq {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; resize: vertical;
}

/* ---------- 移动端 ---------- */
@media (max-width: 700px) {
  .topbar { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .topbar-search { width: 100%; max-width: none; }
  main { margin-top: 14px; padding: 0 12px; }
  .hero h1 { font-size: 24px; }
  .panel { padding: 14px; }
  .panel .row, form.row { flex-wrap: wrap; }
  .panel .row input, form.row input { flex: 1 1 46%; min-width: 130px; }
  .panel button.go, form button.go { flex: 1 1 100%; padding: 12px; }
  .typegrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  table.list { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .detail { grid-template-columns: 1fr; gap: 14px; }
  .kv { grid-template-columns: 1fr 1fr; }
  .crumb { font-size: 13px; }
  .stat-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.big .stat-value { font-size: 24px; }
  .stat-grid.accent .stat-value { font-size: 20px; }
}

/* ===== 工业风细节覆盖 ===== */
.card, .typecard, .panel, .stat, table.list, .login-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.param-title {
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: .08em;
}
.param-title::before {
  content: ""; width: 4px; height: 14px; background: var(--accent-2);
  border-radius: 1px; flex: none;
}
.stat-value { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
table.list th { font-size: 12.5px; }
.badge {
  border-radius: 3px; background: var(--chip-bg); color: var(--accent);
  font-weight: 600;
}
::selection { background: rgba(14, 99, 214, .25); }

/* ===== 页脚 ===== */
.site-footer {
  margin-top: 40px;
  background: var(--header); color: #aeb9c4;
  border-top: 3px solid var(--accent);
}
.site-footer .wrap {
  max-width: 1360px; margin: 0 auto; padding: 34px 26px 22px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px;
}
.site-footer h4 {
  color: #e8edf3; font-size: 14px; margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: .08em;
  padding-left: 10px; border-left: 3px solid var(--accent-2);
}
.site-footer .about { font-size: 13.5px; line-height: 1.7; margin: 0; }
.site-footer .brandline { color: #e8edf3; font-weight: 800; font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.site-footer .brandline::before {
  content: ""; width: 24px; height: 24px; flex: none;
  background: url("/logo-mark.svg") no-repeat center / contain;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 7px 0; font-size: 13.5px; }
.site-footer a { color: #cfd8e2; }
.site-footer a:hover { color: #fff; }
.site-footer .stats { font-size: 13.5px; line-height: 1.9; }
.site-footer .stats b { color: #e8edf3; font-family: ui-monospace, Consolas, monospace; }
.site-footer .bottombar {
  border-top: 1px solid rgba(255,255,255,.08);
  max-width: 1360px; margin: 0 auto; padding: 14px 26px 18px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: #7d8a97; font-size: 12.5px;
}

/* ===== 悬浮控件: 返回顶部 ===== */
.backtop {
  position: fixed; right: 22px; bottom: 26px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); cursor: pointer; font-size: 18px;
  display: none; align-items: center; justify-content: center;
}
.backtop:hover { border-color: var(--accent); color: var(--accent); }
.backtop.show { display: inline-flex; }

/* 移动端顶栏工具换行 */
@media (max-width: 760px) {
  .topbar { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
  .topbar-search { order: 3; flex: 1 1 100%; max-width: none; }
  .topbar-tools { margin-left: 0; }
  main { padding: 0 14px; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; padding: 24px 18px 12px; }
  .site-footer .bottombar { padding: 14px 18px; }
}

/* ===== SEO 内容区 (首页介绍与 FAQ) ===== */
.seo-section {
  margin-top: 44px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow);
}
.seo-section h2 {
  font-size: 17px; margin: 18px 0 10px; padding-left: 10px;
  border-left: 3px solid var(--accent-2);
}
.seo-section h2:first-child { margin-top: 0; }
.seo-section p { color: var(--muted); line-height: 1.85; font-size: 14.5px; margin: 8px 0; }
.seo-section details { border-top: 1px dashed var(--line); padding: 10px 0; }
.seo-section summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.seo-section details p { margin: 8px 0 2px; }

/* ===== 分享栏 ===== */
.share-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.share-label { font-size: 13px; color: var(--muted); }
.share-btn {
  padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); font-size: 13px; cursor: pointer;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 轻提示 ===== */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 10px);
  background: rgba(17, 24, 32, .93); color: #fff; padding: 10px 18px;
  border-radius: 6px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== 品牌列表 ===== */
.page-title { font-size: 22px; margin: 0 0 6px; }
.brandgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px; margin-top: 16px;
}
.brandcard {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; color: var(--ink); box-shadow: var(--shadow);
}
.brandcard:hover { border-color: var(--accent); text-decoration: none; }
.brandcard b { font-size: 15.5px; }
.brand-meta { font-size: 12.5px; color: var(--muted); min-height: 18px; }
.brand-count { font-size: 13px; color: var(--accent); font-weight: 600; }

/* ===== 404 ===== */
.errpage { text-align: center; padding: 26px 0 10px; }
.err-code {
  font-family: ui-monospace, Consolas, monospace; font-size: 96px; font-weight: 800;
  color: var(--line-strong); line-height: 1; letter-spacing: .04em;
}
.errpage h1 { margin: 10px 0 6px; font-size: 26px; }
.err-search { display: flex; gap: 10px; max-width: 520px; margin: 22px auto; }
.err-search input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); font-size: 15px;
}
.err-actions { color: var(--muted); font-size: 14px; }
.err-actions a { margin: 0 4px; }
.errpage h2 { font-size: 16px; margin: 34px 0 0; color: var(--muted); }
.errpage .typegrid { margin-top: 14px; text-align: left; }

/* ===== 官方图切换容器 ===== */
.drawing-wrap { min-height: 120px; }

/* ===== 官方图固定尺寸 (与自绘 SVG 一致 300x284) ===== */
#drawing-official {
  width: 300px; height: 284px; margin: 4px auto;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#drawing-official .imgbox { width: 100%; height: 100%; }
#drawing-official img {
  width: 100%; height: 100%; max-width: 100%;
  object-fit: contain;
}
@media (max-width: 700px) {
  #drawing-official { width: 100%; max-width: 300px; }
}

/* ===== 评论验证码 ===== */
.captcha-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.captcha-img { line-height: 0; }
.captcha-img svg { display: block; }
#captcha-answer {
  width: 120px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); color: var(--ink); font-size: 14px;
}

/* ===== 分享/验证码按钮图标 ===== */
.share-btn, .captcha-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); font-size: 13px; cursor: pointer;
}
.share-btn svg, .captcha-btn svg { width: 16px; height: 16px; flex: none; }
.share-btn:hover, .captcha-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 返回顶部按钮 SVG 图标 ===== */
.backtop svg { width: 18px; height: 18px; display: block; }

/* ===== 分页组件 ===== */
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 6px; align-items: center; justify-content: center; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); font-size: 13.5px;
  text-decoration: none;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.page-gap { color: var(--muted); padding: 0 4px; }
.pager-info { color: var(--muted); font-size: 13px; margin: 4px 0 0; text-align: center; }

/* ===== 服务端渲染内容 (爬虫/无 JS 用户可见) ===== */
.seo-content { max-width: 1200px; margin: 0 auto; padding: 8px 0; }
.seo-content h1 { font-size: 26px; margin: 10px 0 14px; }
.seo-content h2 { font-size: 19px; margin: 22px 0 10px; padding-left: 10px; border-left: 3px solid var(--accent-2); }
.seo-content p { line-height: 1.8; color: var(--ink); }
.seo-content ul { line-height: 1.9; }
.seo-content table { width: 100%; border-collapse: collapse; margin: 12px 0; background: var(--card); }
.seo-content th, .seo-content td { border: 1px solid var(--line); padding: 8px 10px; font-size: 14px; text-align: left; }
.seo-content th { background: var(--chip-bg); }
.seo-content dl.seo-faq { margin: 10px 0; }
.seo-content dl.seo-faq dt { font-weight: 700; margin-top: 12px; }
.seo-content dl.seo-faq dd { margin: 4px 0 0; color: var(--muted); line-height: 1.8; }
