/* ============================================================
   贵仕探测 QUEST 官网 — Design Tokens & 全站样式
   原则：克制配色 / 8px 栅格 / 清晰字阶 / 严格对齐 / 无动效
   ============================================================ */

:root {
  /* —— 颜色：中性灰阶 —— */
  --gray-50:  #f7f8f9;   /* 页面背景 */
  --gray-100: #f0f1f3;   /* 图片底、浅色填充 */
  --gray-200: #e6e8eb;   /* 边框、分隔线 */
  --gray-400: #9aa1ab;   /* 占位、弱化文字 */
  --gray-500: #6e7681;   /* 次要文字 */
  --gray-700: #3c434d;   /* 强次要文字 */
  --gray-900: #16181d;   /* 标题、深色底 */

  /* —— 颜色：品牌橙（克制使用：导航激活态 / 标签 / 关键链接） —— */
  --brand:        #f4731c;  /* 主色：深底上的强调 */
  --brand-strong: #c25708;  /* 深橙：浅底上的链接文字（对比度达标） */
  --brand-soft:   #fcefe4;  /* 浅橙：标签底色 */

  /* —— 字体 —— */
  --font-sans: "Helvetica Neue", Helvetica, Arial, -apple-system,
               "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
               "Microsoft YaHei", sans-serif;

  /* —— 字阶（size / line-height） —— */
  --text-xs: 13px;  --lh-xs: 1.5;
  --text-sm: 14px;  --lh-sm: 1.6;
  --text-md: 16px;  --lh-md: 1.75;   /* 正文 */
  --text-lg: 20px;  --lh-lg: 1.4;    /* 区块标题 */
  --text-xl: 28px;  --lh-xl: 1.3;    /* 页面标题 */
  --text-2xl: 40px; --lh-2xl: 1.15;  /* Hero 标题 */

  /* —— 间距（8px 栅格） —— */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s8: 64px; --s10: 80px;

  /* —— 圆角与边框 —— */
  --r-sm: 6px;
  --r-md: 10px;
  --border: 1px solid var(--gray-200);
}

/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--lh-md);
  background: var(--gray-50);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 600; }
.container { max-width: 1080px; margin: 0 auto; padding-left: var(--s3); padding-right: var(--s3); }
.muted { color: var(--gray-500); font-size: var(--text-xs); line-height: var(--lh-xs); }

/* ============ 顶部导航 ============ */
.site-header {
  background: var(--gray-900);
  color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.header-inner {
  display: flex; align-items: stretch; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center;
  font-size: 18px; font-weight: 700; letter-spacing: .06em;
  color: #c8cdd6;
}
.brand::before {
  content: "";
  width: 4px; height: 1em;     /* 与字高一致的橘色竖条 */
  background: var(--brand);
  margin-right: 10px;
  border-radius: 2px;
}
.nav { display: flex; align-items: stretch; }
.nav a {
  display: flex; align-items: center;
  margin-left: var(--s4);
  font-size: var(--text-sm); color: #aab2bd;
  border-bottom: 2px solid transparent;
  border-top: 2px solid transparent;   /* 平衡上下，文字垂直居中 */
}
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; border-bottom-color: var(--brand); }

/* ============ Hero ============ */
.hero {
  background: var(--gray-900);
  color: #fff;
  padding: var(--s10) 0 var(--s8);
}
.hero h1 {
  font-size: var(--text-2xl); line-height: var(--lh-2xl);
  letter-spacing: .02em;
  margin-bottom: var(--s3);
}
.hero p {
  max-width: 620px;
  font-size: var(--text-sm); line-height: 1.9;
  color: #b6bdc7;
}
.chips { margin-top: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s1); }
.chip {
  border: 1px solid #3a4049; color: #c3c9d2;
  border-radius: 999px;
  padding: 6px var(--s2);
  font-size: var(--text-xs); line-height: 1;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* ============ 区块 ============ */
.section { padding-top: var(--s6); padding-bottom: var(--s1); }
.section h1 { font-size: var(--text-xl); line-height: var(--lh-xl); margin-bottom: var(--s3); }
.section h2 { font-size: var(--text-lg); line-height: var(--lh-lg); margin-bottom: var(--s3); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--s3);
}
.section-head h2 { margin-bottom: 0; }
.section-head a {
  color: var(--brand-strong);
  font-size: var(--text-sm);
  padding: var(--s1) 0 var(--s1) var(--s2);  /* 扩大可点区域 */
}

/* ============ 卡片与网格 ============ */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff;
  border: var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--gray-400); }

/* 产品图：统一浅色底、统一比例、contain 居中，整排等高 */
.card-img { aspect-ratio: 4/3; overflow: hidden; background: #fff; border-bottom: var(--border); }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: var(--s2); }
/* 资讯封面是实拍照片：满铺裁切 */
.card-h .card-img img { object-fit: cover; padding: 0; }

.card-body { padding: var(--s2); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.card-body h3 {
  font-size: var(--text-md); line-height: 1.45;
  letter-spacing: .01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-body p {
  font-size: var(--text-xs); line-height: var(--lh-xs);
  color: var(--gray-500);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-h { flex-direction: row; align-items: stretch; }
/* 资讯卡片：图片统一固定高度，整列整齐 */
.card-h .card-img {
  width: 38%; flex: none; aspect-ratio: auto; height: 180px;
  border-bottom: none; border-right: var(--border);
}
.card-h .card-body { justify-content: center; }

/* 资讯 hero：最新一篇横跨两列 */
.card-hero { grid-column: 1 / -1; }
.card-hero .card-img { width: 52%; height: 320px; }
.card-hero .card-body { padding: var(--s3) var(--s4); gap: var(--s1); }
.card-hero .card-body h3 { font-size: var(--text-lg); line-height: var(--lh-lg); }
.card-hero .card-body p { -webkit-line-clamp: 3; }
.card-h .card-body { padding: var(--s2) var(--s2); }

/* 标签 / 分类胶囊：统一规则 */
.tag {
  display: inline-block;
  font-size: var(--text-xs); line-height: 1;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: var(--r-sm);
  padding: 4px var(--s1);
}

/* ============ 详情页 ============ */
.breadcrumb { font-size: var(--text-xs); color: var(--gray-500); margin-bottom: var(--s3); }
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--brand-strong); }
.detail-top { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-bottom: var(--s4); }
.detail-cover {
  background: #fff; border: var(--border);
  border-radius: var(--r-md); overflow: hidden;
}
.detail-cover img { width: 100%; aspect-ratio: 4/3; object-fit: contain; padding: var(--s3); background: #fff; }
.detail-info h1 { font-size: var(--text-xl); line-height: var(--lh-xl); letter-spacing: .01em; margin: var(--s2) 0; }
.lead { color: var(--gray-500); font-size: var(--text-sm); line-height: var(--lh-sm); }
.prose {
  background: #fff; border: var(--border);
  border-radius: var(--r-md);
  padding: var(--s4);
  margin-bottom: var(--s3);
  max-width: 760px;   /* 控制正文行长 */
}
.prose h2 { font-size: var(--text-lg); margin-bottom: var(--s2); }
.prose p { font-size: var(--text-sm); line-height: 1.9; margin-bottom: var(--s2); color: var(--gray-700); }
.prose p:last-child { margin-bottom: 0; }
.article-cover { border-radius: var(--r-md); overflow: hidden; margin: var(--s3) 0; border: var(--border); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); margin-bottom: var(--s4); }
.gallery img { border-radius: var(--r-md); border: var(--border); background: #fff; }

/* ============ 说明书列表 ============ */
.manual-list { display: flex; flex-direction: column; gap: var(--s2); max-width: 760px; }
.manual-item {
  display: flex; align-items: center; gap: var(--s2);
  background: #fff; border: var(--border);
  border-radius: var(--r-md);
  padding: var(--s2) var(--s3);
}
.manual-item:hover { border-color: var(--gray-400); }
.manual-icon {
  flex: none; width: 48px; height: 48px;
  border-radius: var(--r-sm);
  background: var(--brand-soft); color: var(--brand-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .06em;
}
.manual-info { flex: 1; min-width: 0; }
.manual-info h3 { font-size: var(--text-md); line-height: 1.45; letter-spacing: .01em; }
.manual-info p { margin-top: 2px; }
.manual-action { flex: none; color: var(--brand-strong); font-size: var(--text-sm); }

/* ============ 页脚 ============ */
.site-footer {
  margin-top: var(--s10);
  padding: var(--s5) 0;
  background: var(--gray-900);
  color: #aab2bd;
  font-size: var(--text-xs); line-height: var(--lh-xs);
  text-align: center;
}
.site-footer p + p { margin-top: var(--s1); }
.site-footer .muted { color: #6e7681; }
.site-footer .icp a { color: #6e7681; }
.site-footer .icp a:hover { color: var(--brand); }

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .detail-top { grid-template-columns: 1fr; gap: var(--s3); }
  .hero { padding: var(--s6) 0 var(--s5); }
  .hero h1 { font-size: var(--text-xl); }
  .nav a { margin-left: var(--s3); }
  /* 资讯卡片：上图下文，图片统一高度 */
  .card-h { flex-direction: column; }
  .card-h .card-img, .card-hero .card-img {
    width: 100%; height: 220px; aspect-ratio: auto;
    border-right: none; border-bottom: var(--border);
  }
  .card-hero .card-body { padding: var(--s2); }
  .card-hero .card-body h3 { font-size: var(--text-md); }
}
@media (max-width: 480px) {
  .container { padding-left: var(--s2); padding-right: var(--s2); }
  .header-inner { height: 56px; }
  .brand { font-size: var(--text-md); white-space: nowrap; }
  .nav a { margin-left: var(--s2); font-size: var(--text-xs); white-space: nowrap; }
  .section { padding-top: var(--s4); }
  .section h1 { font-size: 22px; }
  .section h2 { font-size: 18px; }
  .detail-info h1 { font-size: 22px; }
  .grid { grid-template-columns: 1fr 1fr; gap: var(--s1); }
  .card-body { padding: 12px; }
  .prose { padding: var(--s3) var(--s2); }
  .manual-item { padding: var(--s2); gap: 12px; }
  .manual-icon { width: 40px; height: 40px; }
  .manual-info h3 { font-size: var(--text-sm); }
  .manual-action { font-size: var(--text-xs); }
  .gallery { grid-template-columns: 1fr; }
}
