/* ==========================================================================
   jichangwan.com - 设计主题：「杏桃留白」 (Apricot White Space)
   编制基准日: 2026-11-20
   适合知识分享、原理讲解、教程与测评文章
   ========================================================================== */

/* --- 1. CSS 变量与设计令牌 --- */
:root {
  /* 基础主色调 (暖白、近白、陶土与杏桃) */
  --bg-page: #FBF7F2;              /* 页面整体背景：温润柔和暖白 */
  --bg-panel: #FFFDFA;             /* 内容面板/卡片正面：近白 */
  --bg-card: #FFFDFA;
  --bg-subtle: #F6EFE8;            /* 浅暖灰底，用于代码、示例块 */
  
  --text-main: #3F342F;            /* 主文字：深焦茶灰，高对比易读 */
  --text-sub: #7D6E65;             /* 辅助文字：暖褐灰 */
  --text-muted: #9E8F86;           /* 弱化标注文字 */
  
  --brand-primary: #B85E3B;        /* 品牌主色：陶土橙红 */
  --brand-primary-hover: #9F4D2D;  /* 悬停加深 */
  --brand-primary-light: #FBF0EA;  /* 陶土浅底色 */
  
  --color-apricot: #F0C5AB;        /* 核心杏桃色 */
  --color-apricot-light: #F8E9DD;  /* 浅杏色衬板与高亮底 */
  --color-apricot-border: #E5C3AE;
  
  --border-color: #E8DDD3;         /* 主边框色：温润米灰细线 */
  --border-light: #F2EAE2;
  
  --shadow-subtle: 0 2px 8px rgba(63, 52, 47, 0.04);
  --shadow-card: 0 4px 16px rgba(63, 52, 47, 0.06);
  --shadow-hover: 0 8px 24px rgba(63, 52, 47, 0.10);
  
  --radius-card: 14px;             /* 卡片圆角 14px */
  --radius-btn: 10px;              /* 按钮圆角 10px */
  --radius-sm: 6px;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --font-mono: "IBM Plex Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  
  --site-max-width: 1160px;
  --article-max-width: 740px;
}

/* 深色模式（配套暖炭灰、米白与柔和杏色强调） */
html.dark-theme {
  --bg-page: #1E1B18;
  --bg-panel: #292420;
  --bg-card: #292420;
  --bg-subtle: #231E1A;
  
  --text-main: #EDE6DD;
  --text-sub: #A89D93;
  --text-muted: #7A7067;
  
  --brand-primary: #D27854;
  --brand-primary-hover: #E08964;
  --brand-primary-light: #382A22;
  
  --color-apricot: #E89A74;
  --color-apricot-light: #382F28;
  --color-apricot-border: #4D3D33;
  
  --border-color: #3D352F;
  --border-light: #4A4038;
  
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* --- 2. 基础重置与排版 --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background-color: var(--bg-page);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* ~17px */
  line-height: 1.85;     /* 约 1.85 行高 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 链接规范 */
a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--brand-primary-hover);
  text-decoration-thickness: 2px;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* 容器定义 */
.site-container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.article-container {
  max-width: var(--article-max-width);
  margin: 0 auto;
}

/* 标题基础层级 */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

h1 {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0;
}

h2 {
  font-size: 1.65rem;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-top: 2.2em;
}

h3 {
  font-size: 1.3rem;
  margin-top: 1.6em;
}

p {
  margin-top: 0;
  margin-bottom: 1.4em;
}

/* --- 3. 顶部导航与活跃三圆点指示器 --- */
.site-header {
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-subtle);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand-link {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.brand-link:hover {
  color: var(--brand-primary);
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--color-apricot-light);
  color: var(--brand-primary);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--brand-primary);
}

/* 当前栏目三颗小圆点按顺序点亮动画 */
.nav-dot-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 3px;
  height: 4px;
}

.nav-dot-indicator .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--brand-primary);
  opacity: 0.2;
}

.nav-link.active {
  color: var(--brand-primary);
  font-weight: 700;
}

.nav-link.active .dot {
  opacity: 1;
  animation: dot-light-up 450ms ease-out forwards;
}

.nav-link.active .dot-1 { animation-delay: 0ms; }
.nav-link.active .dot-2 { animation-delay: 90ms; }
.nav-link.active .dot-3 { animation-delay: 180ms; }

@keyframes dot-light-up {
  0% { transform: scale(0.6); opacity: 0.2; }
  50% { transform: scale(1.4); opacity: 1; background-color: var(--color-apricot); }
  100% { transform: scale(1); opacity: 1; background-color: var(--brand-primary); }
}

/* 右侧功能区（搜索与深浅色模式切换） */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  min-width: 200px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-wrap:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(184, 94, 59, 0.2);
}

.search-input-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.88rem;
  color: var(--text-main);
  width: 100%;
}

.theme-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: var(--color-apricot-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 330px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
  margin-top: 6px;
  z-index: 1000;
  padding: 8px 0;
}

.search-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  display: block;
  text-decoration: none;
  color: var(--text-main);
  transition: background-color 0.15s ease;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover, .search-item:focus {
  background-color: var(--color-apricot-light);
  color: var(--brand-primary);
}

.search-item-title {
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
}

.search-item-badge {
  font-size: 0.72rem;
  background: var(--color-apricot);
  color: #3F342F;
  padding: 1px 6px;
  border-radius: 4px;
}

.search-item-desc {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-top: 3px;
}

/* --- 4. 标题动画——暖色字影合拢 --- */
.hero-converge-title {
  position: relative;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.title-line {
  display: block;
  position: relative;
  margin-bottom: 4px;
}

.title-line .text-real {
  position: relative;
  z-index: 2;
  color: var(--text-main);
}

.title-line .text-shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  user-select: none;
  animation-duration: 600ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: forwards;
}

.title-line .shadow-left {
  color: var(--color-apricot);
  transform: translateX(-3px);
  opacity: 0.85;
  animation-name: converge-left;
}

.title-line .shadow-right {
  color: #C97D5D;
  transform: translateX(3px);
  opacity: 0.8;
  animation-name: converge-right;
}

.title-line[data-line="2"] .shadow-left,
.title-line[data-line="2"] .shadow-right {
  animation-delay: 70ms;
}

@keyframes converge-left {
  0% { transform: translateX(-3px); opacity: 0.85; }
  100% { transform: translateX(0); opacity: 0; }
}

@keyframes converge-right {
  0% { transform: translateX(3px); opacity: 0.8; }
  100% { transform: translateX(0); opacity: 0; }
}

/* 模块标题与二级标题简化版字影合拢 */
.sub-converge-title {
  position: relative;
  display: inline-block;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
}

.sub-converge-title .text-real {
  position: relative;
  z-index: 2;
}

.sub-converge-title .text-shadow-sub {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: var(--color-apricot);
  pointer-events: none;
  z-index: 1;
  transform: translateX(-3px);
  opacity: 0.85;
}

.sub-converge-title.is-converged .text-shadow-sub {
  animation: converge-sub 350ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes converge-sub {
  0% { transform: translateX(-3px); opacity: 0.85; }
  100% { transform: translateX(0); opacity: 0; }
}

/* --- 5. 滚动动画——内容舒展 --- */
.scroll-expand {
  transform: scale(0.97);
  opacity: 0.8;
  transform-origin: center center;
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1), opacity 450ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.scroll-expand.is-visible {
  transform: scale(1);
  opacity: 1;
}

/* 同排卡片错开动画延时 (最大不超过 180ms) */
.grid-stagger > .scroll-expand:nth-child(1) { transition-delay: 0ms; }
.grid-stagger > .scroll-expand:nth-child(2) { transition-delay: 60ms; }
.grid-stagger > .scroll-expand:nth-child(3) { transition-delay: 120ms; }
.grid-stagger > .scroll-expand:nth-child(4) { transition-delay: 180ms; }

/* --- 6. 首页装饰——太阳微呼吸 --- */
.hero-sun-breathing {
  position: absolute;
  top: 24px;
  right: 32px;
  pointer-events: none;
  animation: sun-breathe 5s ease-in-out infinite;
  z-index: 1;
}

@keyframes sun-breathe {
  0%, 100% { transform: scale(0.98); opacity: 0.88; }
  50% { transform: scale(1.02); opacity: 1; }
}

/* --- 7. 文章卡片——杏色衬板展开 --- */
.apricot-card-wrapper {
  position: relative;
  border-radius: var(--radius-card);
}

.apricot-card-backplate {
  position: absolute;
  inset: 0;
  background-color: var(--color-apricot-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  transform: translate(2px, 2px);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), background-color 250ms ease;
  z-index: 1;
  pointer-events: none;
}

.apricot-card-front {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 24px 26px;
  z-index: 2;
  transition: border-color 250ms ease, box-shadow 250ms ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.apricot-card-wrapper:hover .apricot-card-backplate,
.apricot-card-wrapper:focus-within .apricot-card-backplate {
  transform: translate(5px, 5px);
  background-color: var(--color-apricot);
}

.apricot-card-wrapper:hover .apricot-card-front,
.apricot-card-wrapper:focus-within .apricot-card-front {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-card);
}

.card-read-arrow {
  display: inline-block;
  font-size: 1.15rem;
  color: var(--brand-primary);
  font-weight: 700;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.apricot-card-wrapper:hover .card-read-arrow,
.apricot-card-wrapper:focus-within .card-read-arrow {
  transform: translate(3px, -3px) rotate(-45deg);
}

/* 卡片内部元素 */
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-badge {
  font-size: 0.78rem;
  font-weight: 600;
  background-color: var(--color-apricot-light);
  color: var(--brand-primary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.card-title {
  margin: 0 0 10px 0;
  font-size: 1.25rem;
  line-height: 1.45;
}

.card-title a {
  color: var(--text-main);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--brand-primary);
}

.card-desc {
  font-size: 0.94rem;
  color: var(--text-sub);
  line-height: 1.68;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-primary);
}

/* --- 8. 重点文章卡片 (封面左+文字右 / 手机上下) --- */
.featured-article-card {
  position: relative;
  border-radius: var(--radius-card);
  margin: 28px 0 36px 0;
}

.featured-article-card .featured-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
}

.featured-cover-box {
  background: linear-gradient(135deg, var(--color-apricot-light) 0%, var(--color-apricot) 100%);
  border-radius: var(--radius-card);
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  border: 1px solid var(--border-color);
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

/* --- 9. 按钮与点击扩散涟漪 --- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #FFFDFA !important;
  border-color: var(--brand-primary);
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  color: #FFFDFA !important;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(184, 94, 59, 0.25);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--color-apricot-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  text-decoration: none;
}

/* 官方直达 CTA 醒目按钮 */
.btn-cta-aff {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #B85E3B 0%, #D27854 100%);
  color: #FFFDFA !important;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(184, 94, 59, 0.25);
  border: 1px solid #9F4D2D;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cta-aff:hover {
  background: linear-gradient(135deg, #9F4D2D 0%, #B85E3B 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(184, 94, 59, 0.35);
}

/* 涟漪节点 */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: ripple-anim 500ms ease-out forwards;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* 优惠码复制小部件 */
.coupon-box {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px dashed var(--color-apricot-border);
  border-radius: var(--radius-btn);
  padding: 5px 12px;
  margin: 6px 0;
  font-size: 0.88rem;
  gap: 8px;
}

.coupon-code-text {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-primary);
  background: var(--color-apricot-light);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-color);
}

.btn-copy-code {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 3px 8px;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-code:hover {
  background: var(--brand-primary);
  color: #FFFDFA;
  border-color: var(--brand-primary);
}

/* --- 10. 首页结构组件 --- */
.hero-section {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-subtle);
  text-align: center;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-sub);
  line-height: 1.8;
  max-width: 820px;
  margin: 0 auto 24px auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 分类快捷入口标签行 */
.category-chips-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 36px 0;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s ease;
}

.category-chip:hover {
  background: var(--color-apricot-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  text-decoration: none;
  transform: translateY(-1px);
}

/* 最新文章两列网格 */
.articles-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0 40px 0;
}

/* 专题学习合集模块 */
.series-collection-section {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 32px;
  margin: 40px 0;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.series-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 20px 22px;
}

.series-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-primary);
  background: var(--color-apricot-light);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 8px;
}

.series-title {
  font-size: 1.15rem;
  margin: 0 0 8px 0;
}

.series-card ol {
  padding-left: 20px;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
}

/* 作者与评测团队介绍 */
.author-profile-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 30px;
  margin: 36px 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.author-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--color-apricot);
  border: 2px solid var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

/* --- 11. 文章阅读页核心排版 (知识组件) --- */
.article-reading-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

.article-main-body {
  max-width: var(--article-max-width);
  font-size: 1.1rem; /* ~17.6px */
  line-height: 1.88;
}

.article-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-sub);
  margin-top: 10px;
  flex-wrap: wrap;
}

/* 知识组件 1：核心结论 (浅杏色底) */
.kc-takeaway {
  background-color: var(--color-apricot-light);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 1.02rem;
}

.kc-takeaway-title {
  font-weight: 700;
  color: var(--brand-primary);
  font-size: 1rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 知识组件 2：概念解释 (细边框) */
.kc-concept {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin: 28px 0;
}

.kc-concept-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

/* 知识组件 3：示例 (暖灰背景与编号) */
.kc-example {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin: 26px 0;
}

.kc-example-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.kc-example-num {
  background: var(--brand-primary);
  color: #FFFDFA;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 12px;
}

/* 知识组件 4：提示框 (提示/注意/警告) */
.kc-alert {
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin: 26px 0;
  font-size: 0.98rem;
  border: 1px solid transparent;
}

.kc-alert-note {
  background: var(--color-apricot-light);
  border-color: var(--color-apricot-border);
  color: var(--text-main);
}

.kc-alert-tip {
  background: #EFF6EE;
  border-color: #C3E2BF;
  color: #2D5A27;
}

.kc-alert-warn {
  background: #FFF8E7;
  border-color: #F8DF9E;
  color: #7A5305;
}

/* 知识组件 5：常见问题展开/折叠 */
.kc-faq-box {
  margin: 32px 0;
}

.kc-faq-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  margin-bottom: 14px;
  overflow: hidden;
}

.kc-faq-header {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kc-faq-content {
  padding: 0 20px 16px 20px;
  font-size: 0.96rem;
  line-height: 1.75;
}

/* 知识组件 6：参考资料真实来源 */
.kc-references {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin: 36px 0;
  font-size: 0.88rem;
  color: var(--text-sub);
}

/* 右侧粘性目录 */
.sticky-toc {
  position: sticky;
  top: 90px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sticky-toc-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--text-main);
}

.sticky-toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.88rem;
}

.sticky-toc li {
  margin-bottom: 8px;
}

.sticky-toc a {
  color: var(--text-sub);
  text-decoration: none;
  display: block;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.sticky-toc a:hover, .sticky-toc a.active {
  color: var(--brand-primary);
  background: var(--color-apricot-light);
  font-weight: 600;
}

/* 移动端可折叠目录 (默认收起，一键展开) */
.mobile-toc-box {
  display: none;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 12px 18px;
  margin: 16px 0 24px 0;
}

.mobile-toc-box summary {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-toc-box summary::-webkit-details-marker {
  display: none;
}

.mobile-toc-box summary::after {
  content: "▼";
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.mobile-toc-box[open] summary::after {
  transform: rotate(180deg);
}

.mobile-toc-content {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
  font-size: 0.92rem;
}

.mobile-toc-content ul {
  padding-left: 20px;
  margin: 0;
}

.mobile-toc-content li {
  margin-bottom: 6px;
}

/* 代码块与复制 */
.code-block-wrapper {
  position: relative;
  margin: 24px 0;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.code-copy-btn:hover {
  background: var(--brand-primary);
  color: #FFFDFA;
}

/* 图片灯箱放大 */
.zoomable-img {
  border-radius: 12px;
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.zoomable-img:hover {
  transform: scale(1.01);
}

.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 24, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* 返回顶部浮动按钮 */
.back-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 90;
}

.back-to-top-btn.is-show {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background: var(--brand-primary);
  color: #FFFDFA;
  transform: translateY(-2px);
}

/* 宽表格横向滚动容器 */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  margin: 24px 0 32px 0;
  box-shadow: var(--shadow-subtle);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  min-width: 960px;
}

.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table th {
  background-color: var(--color-apricot-light);
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.data-table tr:hover {
  background-color: var(--bg-subtle);
}

/* --- 12. 页尾与长尾词 --- */
.site-footer {
  background-color: var(--bg-panel);
  border-top: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 44px 0 32px 0;
  font-size: 0.92rem;
  margin-top: 60px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-col {
  flex: 1;
  min-width: 220px;
}

.footer-title {
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- 13. 尊重减少动态模式 (prefers-reduced-motion) --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-expand {
    transform: scale(1) !important;
    opacity: 1 !important;
  }
  .hero-sun-breathing {
    animation: none !important;
  }
  .title-line .text-shadow {
    display: none !important;
  }
  .btn-ripple {
    display: none !important;
  }
}

/* --- 14. 移动端自适应 --- */
@media (max-width: 860px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.35rem; }
  
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .site-nav {
    overflow-x: auto;
    padding-bottom: 6px;
    justify-content: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .header-search {
    flex-grow: 1;
  }
  
  .search-dropdown {
    width: 100%;
  }
  
  .hero-section {
    padding: 28px 20px;
  }
  
  .hero-sun-breathing {
    animation: none;
    opacity: 0.8;
    top: 12px;
    right: 12px;
  }
  
  .hero-sun-breathing svg {
    width: 60px;
    height: 60px;
  }
  
  .articles-two-col-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-article-card .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-cover-box {
    height: 180px;
  }
  
  .author-profile-box {
    flex-direction: column;
    text-align: center;
  }
  
  .article-reading-layout {
    grid-template-columns: 1fr;
  }
  
  .sticky-toc {
    display: none;
  }

  .mobile-toc-box {
    display: block;
  }
  
  .btn, .btn-cta-aff {
    width: 100%;
  }
}
