/* ==========================================================================
   蒋的实验室 Jiang's Lab · 全局样式表
   设计基调：浅灰背景 / 白色卡片 / 蓝色主色 / 简洁现代 / 移动端自适应
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;

  --primary:        var(--blue-600);
  --primary-hover:  var(--blue-700);
  --primary-soft:   var(--blue-50);
  --primary-border: var(--blue-200);

  --bg:        #f4f6fa;
  --surface:   #ffffff;
  --surface-2: #f8fafc;
  --border:    #e5e9f0;
  --border-strong: #d5dbe6;

  --text:    #1a2233;
  --text-2:  #4b5563;
  --text-3:  #7c8698;
  --on-primary: #ffffff;

  --success: #0d9488;
  --warn:    #d97706;
  --danger:  #dc2626;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;

  --shadow-xs: 0 1px 2px rgba(16, 30, 54, .06);
  --shadow-sm: 0 2px 8px rgba(16, 30, 54, .06);
  --shadow-md: 0 6px 20px rgba(16, 30, 54, .09);
  --shadow-lg: 0 14px 38px rgba(16, 30, 54, .13);

  --container: 1200px;
  --gap: 24px;
  --header-h: 68px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC",
    Arial, sans-serif;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* 深色模式（可选，默认关闭） */
[data-theme="dark"] {
  --bg:        #0f1521;
  --surface:   #161d2b;
  --surface-2: #1c2434;
  --border:    #263043;
  --border-strong: #33405a;
  --text:      #e8edf6;
  --text-2:    #aeb9cc;
  --text-3:    #8593aa;
  --primary:        #60a5fa;
  --primary-hover:  #93c5fd;
  --primary-soft:   #17253d;
  --primary-border: #2b4570;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .42);
  --shadow-lg: 0 14px 38px rgba(0, 0, 0, .5);
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4, h5 {
  margin: 0 0 .6em;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.3rem); }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--blue-200); color: #0b1220; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ---------- 3. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.page-main { padding: 32px 0 64px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
.layout > * { min-width: 0; }
.layout-main { min-width: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- 4. 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header { background: rgba(22, 29, 43, .88); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.06rem; font-weight: 800; letter-spacing: -.01em; }
.brand-sub { font-size: .68rem; color: var(--text-3); letter-spacing: .09em; text-transform: uppercase; }

.nav { margin-left: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list li { margin: 0; }
.nav-link {
  position: relative;
  display: block;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: .94rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-link:hover { color: var(--primary); background: var(--primary-soft); }
.nav-link.is-active { color: var(--primary); background: var(--primary-soft); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: all .18s var(--ease);
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary-border); background: var(--primary-soft); }
.icon-btn svg { width: 18px; height: 18px; }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.lang-switch button {
  padding: 4px 11px;
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: .02em;
  transition: all .18s var(--ease);
}
.lang-switch button:hover { color: var(--primary); }
.lang-switch button.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.nav-toggle { display: none; }

/* 移动端抽屉菜单 */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 10px 0 16px; }
.mobile-nav li { margin: 0; }
.mobile-nav a {
  display: block;
  padding: 12px 4px;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.mobile-nav li:last-child a { border-bottom: none; }
.mobile-nav a.is-active { color: var(--primary); }

/* ---------- 5. 轮播 Banner ---------- */
.hero {
  position: relative;
  margin: 28px 0 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.hero-viewport { overflow: hidden; }
.hero-track {
  display: flex;
  transition: transform .55s var(--ease);
  will-change: transform;
}
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  height: clamp(300px, 34vw, 430px);
  display: block;
  color: #fff;
  overflow: hidden;
}
.hero-slide:hover { color: #fff; }
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s var(--ease);
}
.hero-slide:hover img { transform: scale(1.04); }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 18, 36, .12) 0%, rgba(9, 18, 36, .55) 52%, rgba(9, 18, 36, .88) 100%);
}
.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px clamp(20px, 4vw, 48px) 60px;
  max-width: 720px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(6px);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.hero-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.3rem, 1rem + 1.6vw, 2.1rem);
  line-height: 1.3;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}
.hero-desc {
  margin: 0;
  font-size: clamp(.86rem, .8rem + .25vw, 1rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, .88);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta {
  margin-top: 12px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .72);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(8px);
  color: #fff;
  opacity: 0;
  transition: opacity .25s var(--ease), background .2s var(--ease);
}
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(255, 255, 255, .38); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }
.hero-arrow svg { width: 18px; height: 18px; }

.hero-dots {
  position: absolute;
  left: clamp(20px, 4vw, 48px);
  bottom: 26px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.hero-dots button {
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
  transition: all .25s var(--ease);
}
.hero-dots button:hover { background: rgba(255, 255, 255, .7); }
.hero-dots button.is-active { width: 42px; background: #fff; }

/* ---------- 6. 区块标题 ---------- */
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; line-height: 1.25; }
.section-title-wrap { min-width: 0; flex: 1; }
.section-eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
}
.section-desc { margin: 6px 0 0; color: var(--text-2); font-size: .94rem; }
.section-more {
  flex-shrink: 0;
  font-size: .88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.section-more svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.section-more:hover svg { transform: translateX(3px); }

.page-hero {
  padding: 40px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-hero h1 { margin-bottom: 10px; }
.page-hero p { color: var(--text-2); max-width: 720px; margin-bottom: 26px; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: .84rem;
  color: var(--text-3);
}
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--border-strong); }

/* ---------- 7. 文章卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  align-items: stretch;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}
.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.card:hover .card-media img { transform: scale(1.05); }
.card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--primary-hover);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: var(--shadow-xs);
}
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 18px 16px;
}
.card-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 700;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-excerpt {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: .9rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-3);
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  border: 1px solid var(--primary-border);
  font-size: .74rem;
  font-weight: 600;
  line-height: 1.6;
}
a.tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.meta-row { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.meta-row svg { width: 14px; height: 14px; opacity: .75; flex-shrink: 0; }

/* 横向卡片（列表视图） */
.card-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
.card-row:hover { box-shadow: var(--shadow-md); border-color: var(--primary-border); transform: translateY(-2px); }
.card-row .card-media { border-radius: 10px; }
.card-row .card-body { padding: 2px 0 0; }
.card-list { display: grid; gap: 20px; }

/* ---------- 8. 侧边栏 ---------- */
.sidebar { display: grid; gap: 22px; position: sticky; top: calc(var(--header-h) + 24px); }

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}
.widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
}
.widget-title svg { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }

.search-form { display: flex; gap: 8px; }
.search-input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: .9rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.search-btn {
  flex-shrink: 0;
  width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.search-btn:hover { background: var(--primary-hover); }
.search-btn:active { transform: scale(.96); }
.search-btn svg { width: 17px; height: 17px; }
.search-form-lg { max-width: 560px; }

.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rank-item { display: flex; gap: 12px; margin: 0; align-items: flex-start; }
.rank-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: .78rem;
  font-weight: 800;
  margin-top: 2px;
}
.rank-item:nth-child(1) .rank-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: var(--blue-100); border-color: var(--primary-border); color: var(--primary-hover); }
.rank-item:nth-child(3) .rank-num { background: var(--primary-soft); border-color: var(--primary-border); color: var(--primary-hover); }
.rank-body { min-width: 0; }
.rank-title {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rank-title:hover { color: var(--primary); }
.rank-meta { font-size: .76rem; color: var(--text-3); margin-top: 3px; }

.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cat-list li { margin: 0; }
.cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all .18s var(--ease);
}
.cat-link:hover { background: var(--primary-soft); color: var(--primary); }
.cat-link.is-active { background: var(--primary-soft); color: var(--primary); }
.cat-count {
  flex-shrink: 0;
  min-width: 26px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: .74rem;
  font-weight: 700;
  text-align: center;
}
.cat-link:hover .cat-count, .cat-link.is-active .cat-count {
  background: #fff; border-color: var(--primary-border); color: var(--primary);
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }

/* 标签聚合页的标签项（tags.html） */
.tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--text-1);
  border: 1px solid var(--primary-border);
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
a.tag-cloud-item:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}
.tag-cloud-item .tag-count {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 7px;
  line-height: 1.5;
}
a.tag-cloud-item:hover .tag-count { color: #fff; background: rgba(255,255,255,.15); border-color: transparent; }

.widget-cta {
  background: linear-gradient(150deg, var(--blue-700), var(--blue-500));
  border: none;
  color: #fff;
}
.widget-cta .widget-title { color: #fff; border-bottom-color: rgba(255, 255, 255, .25); }
.widget-cta .widget-title svg { color: #fff; }
.widget-cta p { color: rgba(255, 255, 255, .9); font-size: .9rem; margin-bottom: 16px; }

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .18s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.btn-white { background: #fff; color: var(--primary-hover); }
.btn-white:hover { background: var(--blue-50); color: var(--primary-hover); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- 10. 首页特色板块 ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0 0 44px;
}
.strip-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: all .2s var(--ease);
}
.strip-item:hover { border-color: var(--primary-border); box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.strip-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}
.strip-icon svg { width: 21px; height: 21px; }
.strip-text { min-width: 0; }
.strip-title { font-weight: 700; font-size: .96rem; color: var(--text); line-height: 1.4; }
.strip-desc { font-size: .82rem; color: var(--text-3); line-height: 1.5; }

.section { margin-bottom: 56px; clear: both; }
.section:last-child { margin-bottom: 0; }
.section-head { clear: both; }

/* ---------- 11. 装机配置单 ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}
.tab-btn {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-2);
  text-align: center;
  transition: all .18s var(--ease);
}
.tab-btn:hover { background: var(--primary-soft); color: var(--primary); }
.tab-btn.is-active { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.tab-price { display: block; font-size: .74rem; font-weight: 600; opacity: .75; margin-top: 1px; }

.build-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.build-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
}
.build-head h3 { margin: 0 0 4px; color: #fff; font-size: 1.2rem; }
.build-head p { margin: 0; color: rgba(255, 255, 255, .85); font-size: .88rem; }
.build-total { text-align: right; }
.build-total .amount { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.build-total .label { font-size: .78rem; opacity: .85; }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: .91rem;
}
table.data-table th, table.data-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data-table thead th {
  background: var(--surface-2);
  color: var(--text-3);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
table.data-table tbody tr { transition: background .16s var(--ease); }
table.data-table tbody tr:hover { background: var(--primary-soft); }
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.part-name { font-weight: 600; color: var(--text); }
.part-note { display: block; font-size: .8rem; color: var(--text-3); margin-top: 2px; line-height: 1.55; }
.part-kind { color: var(--text-2); white-space: nowrap; font-weight: 600; }

.build-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 24px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.build-foot > div { flex: 1 1 240px; min-width: 0; }
.build-foot h4 { margin: 0 0 8px; font-size: .86rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.build-foot ul { margin: 0; padding-left: 1.15em; font-size: .88rem; color: var(--text-2); }
.build-foot li { margin-bottom: 5px; }

/* ---------- 12. 产品推荐卡 ---------- */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }
.pick {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: all .2s var(--ease);
}
.pick:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-border); }
a.pick, a.pick:hover, a.pick:visited { color: inherit; text-decoration: none; cursor: pointer; }
.pick.is-best { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1), var(--shadow-sm); }
.pick-label {
  align-self: flex-start;
  padding: 4px 11px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary-hover);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.pick.is-best .pick-label { background: var(--primary); border-color: var(--primary); color: #fff; }
.pick h3 { margin: 0 0 4px; font-size: 1.1rem; }
.pick-price { font-size: .88rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.pick p { font-size: .89rem; color: var(--text-2); margin-bottom: 14px; }
.pick-specs { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 7px; }
.pick-specs li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: .85rem;
  color: var(--text-2);
  line-height: 1.6;
}
.pick-specs svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 4px; color: var(--success); }
.score {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.score span { font-size: .74rem; color: var(--text-3); font-weight: 600; }

/* ---------- 13. 文章正文 ---------- */
.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.article-header { padding: 30px clamp(20px, 4vw, 40px) 0; }
.article-header h1 { margin-bottom: 14px; line-height: 1.3; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  color: var(--text-3);
}
.article-cover { margin: 24px 0 0; aspect-ratio: 16 / 9; background: var(--surface-2); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.article-body {
  padding: 30px clamp(20px, 4vw, 40px) 36px;
  font-size: 1.0rem;
  line-height: 1.95;
  color: var(--text-2);
}
.article-body > *:first-child { margin-top: 0; }
.article-body h2 {
  margin: 2em 0 .8em;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  font-size: 1.34rem;
  color: var(--text);
}
.article-body h3 { margin: 1.7em 0 .7em; font-size: 1.12rem; color: var(--text); }
.article-body p { margin: 0 0 1.25em; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body ul, .article-body ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.article-body li { margin-bottom: .55em; }
.article-body img { border-radius: 10px; margin: 1.4em 0; }
.article-body a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body table { margin: 1.5em 0; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 2.2em 0; }

.callout {
  display: flex;
  gap: 13px;
  margin: 1.6em 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-left: 4px solid var(--primary);
  font-size: .93rem;
  line-height: 1.75;
  color: var(--text-2);
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--primary-hover); }

blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--border-strong);
  color: var(--text-3);
  font-style: normal;
}
blockquote p:last-child { margin-bottom: 0; }

.pros-cons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 1.6em 0; }
.pc-box { padding: 16px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.pc-box h4 { margin: 0 0 10px; font-size: .92rem; display: flex; align-items: center; gap: 7px; }
.pc-box ul { margin: 0; padding-left: 1.2em; font-size: .89rem; }
.pc-box li { margin-bottom: 5px; }
.pc-pro h4 { color: var(--success); }
.pc-con h4 { color: var(--warn); }

.article-foot {
  padding: 0 clamp(20px, 4vw, 40px) 30px;
}
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; border-top: 1px solid var(--border); }

.article-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 24px; }
.article-nav a {
  display: block;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all .2s var(--ease);
}
.article-nav a:hover { border-color: var(--primary-border); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.article-nav .dir { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 5px; }
.article-nav .t { display: block; font-weight: 600; color: var(--text); line-height: 1.5; }
.article-nav .next { text-align: right; }

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-700));
  transition: width .1s linear;
}

/* ---------- 14. 页脚 ---------- */
.site-footer {
  margin-top: 64px;
  background: #101827;
  color: #94a3b8;
  border-top: 1px solid var(--border);
}
[data-theme="dark"] .site-footer { background: #0b1120; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
  padding: 52px 0 40px;
}
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand:hover { color: #fff; }
.footer-brand .brand-sub { color: #64748b; }
.footer-about { font-size: .89rem; line-height: 1.8; color: #94a3b8; max-width: 340px; margin-bottom: 18px; }
.footer-col h4 {
  margin: 0 0 16px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #e2e8f0;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col li { margin: 0; }
.footer-col a { color: #94a3b8; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.social { display: flex; gap: 10px; }
.social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .07);
  color: #cbd5e1;
  transition: all .18s var(--ease);
}
.social a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.social svg { width: 17px; height: 17px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .84rem;
  color: #7c8aa0;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { color: #7c8aa0; }
.footer-links a:hover { color: #fff; }

/* ---------- 15. 其它 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary-hover); color: #fff; transform: translateY(-3px); }
.to-top svg { width: 19px; height: 19px; }

.empty-state {
  padding: 60px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-3);
}
.empty-state svg { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--border-strong); }
.empty-state h3 { color: var(--text-2); margin-bottom: 6px; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: .84rem;
  font-weight: 600;
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.result-count { font-size: .86rem; color: var(--text-3); }

.notice {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--text-2);
  font-size: .9rem;
}

.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: clamp(22px, 3vw, 34px);
}
.prose-card h2:first-child, .prose-card h3:first-child { margin-top: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 26px 0; }
.stat {
  padding: 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.stat .n { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .85rem; color: var(--text-3); margin-top: 2px; }

.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.step-list li { display: flex; gap: 14px; margin: 0; }
.step-n {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary-hover);
  font-weight: 800;
  font-size: .86rem;
}
.step-body strong { display: block; color: var(--text); margin-bottom: 2px; }
.step-body span { font-size: .9rem; color: var(--text-2); }

.hide { display: none !important; }
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }

/* 骨架占位，防止 JS 注入前布局跳动 */
#site-header { min-height: var(--header-h); }

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1080px) {
  :root { --gap: 20px; }
  .layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 26px; }
  .nav-link { padding: 8px 10px; font-size: .9rem; }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-about { max-width: 100%; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .card-row { grid-template-columns: 200px minmax(0, 1fr); }
  .hero-arrow { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .container { padding: 0 16px; }
  .page-main { padding: 24px 0 48px; }
  .section { margin-bottom: 40px; }
  .hero { margin: 20px 0 32px; border-radius: var(--radius); }
  .hero-slide { height: clamp(260px, 62vw, 340px); }
  .hero-caption { padding: 22px 18px 52px; }
  .hero-dots { left: 18px; bottom: 20px; }
  .card-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card-row .card-media { aspect-ratio: 16 / 9; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; padding: 40px 0 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .build-head { padding: 18px; }
  .build-total { text-align: left; }
  .article-body { font-size: .98rem; line-height: 1.9; }
  .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
  .brand-sub { display: none; }
}

@media (max-width: 460px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .pick-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .tab-btn { min-width: 0; flex: 1 1 45%; }
  .header-inner { gap: 10px; }
  .lang-switch button { padding: 4px 8px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 17. 动效与无障碍 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .sidebar, .to-top, .hero-arrow, .hero-dots { display: none !important; }
  body { background: #fff; }
  .article { border: none; box-shadow: none; }
}

/* ---------- 18. 移动端触控与无障碍增强 ---------- */
/* 数据表在窄屏下横向滚动而非压扁列（配合 .table-wrap overflow-x） */
table.data-table { min-width: 520px; }

/* 触控目标不小于 44px（WCAG 2.5.5），减小误触 */
.nav-toggle, .icon-btn { min-width: 44px; min-height: 44px; }
.lang-switch button { min-height: 36px; padding: 6px 10px; }
a, button { -webkit-tap-highlight-color: transparent; }

/* iPhone 刘海/底部横条安全区 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer-bottom { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .to-top { bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* 键盘焦点可见性（无障碍，Google 质量信号之一） */
:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.nav-toggle:focus-visible, .lang-switch button:focus-visible, .tab-btn:focus-visible { outline-offset: 3px; }

/* ==========================================================================
   19. 装机配置计算器（configurator.html）
   ========================================================================== */
.cfg-layout { display: grid; grid-template-columns: 1fr; gap: var(--gap); }

.cfg-form { padding: 20px; }
.cfg-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.cfg-field { display: flex; flex-direction: column; gap: 6px; }
.cfg-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.cfg-field select {
  width: 100%;
  min-height: 44px;
  padding: 8px 34px 8px 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: auto;
}
.cfg-field select:hover { border-color: var(--primary); }
.cfg-hint { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-3); }
.cfg-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

.cfg-results { display: grid; grid-template-columns: 1fr; gap: var(--gap); }

.cfg-price { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; padding: 20px; }
.cfg-price-main { display: flex; flex-direction: column; gap: 4px; }
.cfg-kicker { font-size: 13px; color: var(--text-3); }
.cfg-total { font-size: 34px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.cfg-price-detail { list-style: none; margin: 0; padding: 0; min-width: 240px; }
.cfg-price-detail li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.cfg-price-detail li.muted { border-bottom: none; font-size: 12px; color: var(--text-3); }

.cfg-section { padding: 20px; }
.cfg-title { margin: 0 0 12px; font-size: 17px; }

.cfg-bench { display: grid; gap: 14px; }
.cfg-bench-item { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cfg-bench-name { font-size: 14px; font-weight: 600; color: var(--text-2); flex: 1 1 160px; }
.cfg-bench-score { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }
.cfg-bench .cfg-bar-row { flex: 1 1 200px; min-width: 200px; }

.cfg-bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.cfg-bar-label { flex: 0 0 64px; font-size: 13px; color: var(--text-2); }
.cfg-bar-track { flex: 1; height: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.cfg-bar-fill { display: block; height: 100%; border-radius: 999px; transition: width .35s var(--ease); }
.cfg-bar-fill.is-blue   { background: var(--blue-500); }
.cfg-bar-fill.is-green  { background: var(--success); }
.cfg-bar-fill.is-danger { background: var(--danger); }
.cfg-bar-fill.is-warn2  { background: var(--warn); }
.cfg-bar-val { flex: 0 0 44px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

.cfg-verdict {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.cfg-verdict.is-cpu { background: rgba(220, 38, 38, .12); color: var(--danger); }
.cfg-verdict.is-gpu { background: rgba(217, 119, 6, .14); color: var(--warn); }
.cfg-verdict.is-ok  { background: rgba(13, 148, 136, .12); color: var(--success); }

.cfg-power { display: flex; flex-wrap: wrap; gap: 14px; }
.cfg-power-item {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.cfg-power-item span { font-size: 12px; color: var(--text-3); }
.cfg-power-item b { font-size: 20px; font-weight: 800; }

.cfg-warn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cfg-warn {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.55;
}
.cfg-warn.is-platform, .cfg-warn.is-psu { background: rgba(220, 38, 38, .1); color: var(--danger); }
.cfg-warn.is-ok { background: rgba(13, 148, 136, .1); color: var(--success); }

.cfg-disclaimer { margin-top: 18px; }

.cfg-amazon-list { display: grid; gap: 10px; margin-top: 12px; }
.cfg-amazon-item { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cfg-amazon-cat { flex: 0 0 90px; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .02em; }
.cfg-amazon-name { flex: 1 1 200px; font-size: 14px; font-weight: 600; }
.cfg-amazon-price { flex: 0 0 80px; font-size: 15px; font-weight: 700; text-align: right; color: var(--primary); }
.btn-amazon { background: #ff9900; border-color: #ff9900; color: #111; }
.btn-amazon:hover { background: #e68a00; border-color: #e68a00; }

@media (min-width: 1080px) {
  .cfg-layout { grid-template-columns: 380px 1fr; align-items: start; }
}

/* ==========================================================================
   20. 首页工具入口卡片（configurator.html 引流）
   ========================================================================== */
.tool-entry {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--primary-soft), var(--surface));
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tool-entry:hover, .tool-entry:focus-visible {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.tool-entry-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 12px;
}
.tool-entry-icon svg { width: 26px; height: 26px; }
.tool-entry-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tool-entry-title { font-size: 17px; font-weight: 700; color: var(--text); }
.tool-entry-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.tool-entry-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 999px;
  transition: background .2s var(--ease);
}
.tool-entry-btn svg { width: 16px; height: 16px; }
.tool-entry:hover .tool-entry-btn { background: var(--primary-hover); }

@media (max-width: 640px) {
  .tool-entry { flex-wrap: wrap; }
  .tool-entry-btn { width: 100%; justify-content: center; }
}

/* 帧数表里的瓶颈小标签 */
.cfg-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.cfg-tag.is-cpu { background: rgba(220, 38, 38, .12); color: var(--danger); }
.cfg-tag.is-gpu { background: rgba(217, 119, 6, .14); color: var(--warn); }
.cfg-tag.is-ok  { background: rgba(13, 148, 136, .12); color: var(--success); }

/* ==========================================================================
   21. 可搜索选择器（配置计算器）
   ========================================================================== */
.cfg-form.card { overflow: visible; } /* 下拉面板不被卡片裁剪 */
.cfg-sel { position: relative; }

.cfg-sel-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  text-align: left;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .2s var(--ease);
}
.cfg-sel-btn:hover, .cfg-sel-btn[aria-expanded="true"] { border-color: var(--primary); }
.cfg-sel-value {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cfg-sel-sub { flex: 0 0 auto; font-size: 12px; color: var(--text-3); }
.cfg-sel-caret { flex: 0 0 16px; width: 16px; height: 16px; color: var(--text-3); }

.cfg-sel-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cfg-sel-panel[hidden] { display: none; }

.cfg-sel-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.cfg-sel-search-wrap svg { width: 16px; height: 16px; color: var(--text-3); flex: 0 0 auto; }
.cfg-sel-search {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  outline: none;
}

.cfg-sel-list { max-height: 300px; overflow-y: auto; padding: 6px; }
.cfg-sel-group-label { padding: 8px 10px 4px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.cfg-sel-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  font-size: 13px;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.cfg-sel-opt:hover, .cfg-sel-opt:focus-visible { background: var(--primary-soft); color: var(--primary); }
.cfg-sel-opt-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-sel-opt-sub { flex: 0 0 auto; font-size: 12px; color: var(--text-3); }
.cfg-sel-empty { padding: 16px; text-align: center; font-size: 13px; color: var(--text-3); }

/* 「查看全部」按钮 */
.cfg-sel-more {
  width: 100%;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--primary);
  background: var(--primary-soft);
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background .2s var(--ease);
}
.cfg-sel-more:hover, .cfg-sel-more:focus-visible { background: var(--primary-border); }
.cfg-sel-more[hidden] { display: none; }

/* 热门精选项标记（小圆点） */
.cfg-sel-opt.is-hot .cfg-sel-opt-text::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--primary);
  vertical-align: 2px;
}

/* ==========================================================================
   22. 配置计算器增强（游戏快切 / 方案 / 导出 / 提示 / 打印）
   ========================================================================== */
.cfg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cfg-game-chip {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.cfg-game-chip:hover { border-color: var(--primary); color: var(--primary); }
.cfg-game-chip.is-active {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
}

/* 提示级兼容信息（蓝色） */
.cfg-warn.is-info { background: rgba(37, 99, 235, .08); color: var(--text-2); }

/* 方案列表 */
.cfg-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cfg-plan-head .cfg-title { margin: 0; }
.cfg-plan-form { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cfg-plan-form input {
  flex: 1 1 220px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.cfg-plan-form input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.cfg-plan-form[hidden] { display: none; }
.cfg-plan-list { display: grid; gap: 8px; margin-bottom: 12px; }
.cfg-plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.cfg-plan-check { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.cfg-plan-check input { width: 16px; height: 16px; accent-color: var(--primary); flex: 0 0 auto; }
.cfg-plan-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-plan-meta { font-size: 12px; color: var(--text-3); flex: 0 0 auto; }
.cfg-plan-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.cfg-compare-title { margin: 4px 0 12px; font-size: 15px; }

@media (max-width: 640px) {
  .cfg-plan-item { flex-direction: column; align-items: flex-start; }
  .cfg-plan-actions { width: 100%; }
}

/* 导出按钮组 */
.cfg-price .cfg-actions { margin-top: 10px; flex-wrap: wrap; }
.cfg-price .cfg-actions .btn { min-height: 40px; }

/* 打印：只输出配置结果，隐藏表单与站点框架 */
@media print {
  .cfg-form, .cfg-sel, .site-header, .announce-bar, .site-footer, .sidebar, .to-top, .hero-arrow, .hero-dots,
  .cfg-plan-list, #cfg-copy, #cfg-share, #cfg-print, #cfg-save-plan, #cfg-plans, #cfg-compare-btn, #cfg-compare,
  .cfg-game-chip, #ad-top { display: none !important; }
  body { background: #fff !important; }
  .cfg-price, .cfg-section { box-shadow: none !important; border-color: #ccc !important; break-inside: avoid; }
  .cfg-total { color: #000 !important; }
}

/* ============ 配置页侧边栏：为你推荐 ============ */
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.widget-desc { margin: -4px 0 12px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.widget-reco { border: 1px solid var(--border); background: var(--bg-2); }
.widget-reco .widget-title { display: flex; align-items: center; gap: 8px; }
.widget-reco .widget-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
  flex-shrink: 0;
}
.reco-list { display: grid; gap: 10px; }
.reco-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.reco-item:hover { border-color: var(--primary); transform: translateY(-1px); }
.reco-thumb {
  width: 88px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-2);
}
.reco-body { display: grid; gap: 3px; min-width: 0; }
.reco-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reco-item:hover .reco-title { color: var(--primary); }
.reco-meta { font-size: 11.5px; color: var(--text-3); }
.widget-reco > .btn { margin-top: 12px; }

/* ============ 顶部提示条（全站，配置计算器入口） ============ */
.announce-bar {
  background: linear-gradient(90deg, var(--primary), #4f46e5);
  color: #fff;
  font-size: 13px;
  position: relative;
  z-index: 60;
}
.announce-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: wrap;
  text-align: center;
}
.announce-bar-text { font-weight: 500; opacity: .96; }
.announce-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  padding: 5px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .2s, transform .2s;
  white-space: nowrap;
}
.announce-bar-btn svg { width: 14px; height: 14px; }
.announce-bar-btn:hover { background: rgba(255, 255, 255, .28); transform: translateY(-1px); }

/* ============ 首页公告栏 ============ */
.announce {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 28px;
}
.announce-badge {
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: .3px;
}
.announce-text { flex: 1; min-width: 220px; margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-1); }
.announce-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
}
.announce-link svg { width: 15px; height: 15px; }
.announce-link:hover { text-decoration: underline; }

/* ============ 配置结果底部更新说明 ============ */
.cfg-update-note {
  margin: 14px 2px 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
  text-align: center;
}
@media (max-width: 640px) {
  .announce { flex-direction: column; align-items: flex-start; gap: 10px; }
  .announce-bar-inner { justify-content: flex-start; text-align: left; }
}

/* ============ 首页本月推荐配图 ============ */
.pick-media {
  position: relative;
  margin: -22px -22px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
}
.pick-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s var(--ease);
}
.pick:hover .pick-media img { transform: scale(1.04); }

/* ============ 手机端：计算器入口首屏强化 ============ */
@media (max-width: 640px) {
  .tool-entry {
    flex-wrap: wrap;
    padding: 20px 16px;
    box-shadow: 0 6px 24px -12px rgba(37, 99, 235, .35);
  }
  .tool-entry-title { font-size: 19px; }
  .tool-entry-desc { font-size: 13.5px; }
  .tool-entry-btn { width: 100%; justify-content: center; padding: 13px 16px; font-size: 15px; margin-top: 4px; }
  .tool-entry-icon { flex-basis: 52px; width: 52px; height: 52px; }
}

/* ============ 文章正文配图 ============ */
.article-figure {
  margin: 26px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

/* ============ 装机配置单封面图 ============ */
.build-media {
  margin-bottom: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.build-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============ 配置单平台生命周期警示 ============ */
.build-warn {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(217, 119, 6, .12);
  border: 1px solid rgba(217, 119, 6, .35);
  color: var(--warn, #b45309);
  font-size: 13px;
  line-height: 1.65;
}

/* ============ 文章目录 TOC ============ */
.toc {
  margin: 16px 0 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  padding: 10px 14px;
  font-size: 13.5px;
}
.toc summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-1);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc summary::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.toc ol {
  margin: 10px 0 2px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--primary); text-decoration: underline; }

/* 视觉隐藏：保留给屏幕阅读器与搜索引擎（用于页面唯一 H1），不占布局 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 联盟商品卡片 ---------- */
.aff-card {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01));
}
.aff-card-label {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); font-weight: 700; margin-bottom: 6px;
}
.aff-name { font-size: 1.02rem; font-weight: 600; color: #e8eef7; }
.aff-price { margin-top: 4px; color: #9fb0c6; font-size: .92rem; }
.aff-btns { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.aff-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .9rem;
  text-decoration: none; transition: transform .15s var(--ease), opacity .15s;
}
.aff-btn:hover { transform: translateY(-1px); opacity: .92; }
.aff-amazon { background: #ff9900; color: #1a1a1a; }
.aff-jd { background: #e1251b; color: #fff; }
