/* ============================================================
   智讯前沿 SOFTWIRE - 前台样式（杂志式门户）
   深色导航与 Hero / 白底黑字内容区 / 深色页脚 / 靛蓝强调色
   设计 Token 集中管理：第一个 :root 为基础白色系（与后台一致），
   第二个 :root 为本次杂志式改版扩展（深色系 / 靛蓝 / 榜单编号色）。
   ============================================================ */

:root {
  --bg:         #FFFFFF;
  --bg-soft:    #F5F7FA;
  --bg-inset:   #EEF1F5;
  --text-1:     #111827;
  --text-2:     #4B5563;
  --text-3:     #9CA3AF;
  --text-inverse: #FFFFFF;
  --border:        #E5E7EB;
  --border-strong: #D1D5DB;
  --brand:       #165DFF;
  --brand-dark:  #0E42D2;
  --brand-tint:  #EBF1FF;
  --ok:          #16A34A;  --ok-tint:     #E8F7EE;
  --warn:        #D97706;  --warn-tint:   #FBF3E4;
  --danger:      #DC2626;  --danger-tint: #FDEBEB;
  --radius-card: 14px;
  --radius-ctrl: 6px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-2: 0 4px 12px rgba(16, 24, 40, .08);
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --container: 1200px;
  --header-h: 72px;
  --font-sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

/* ============================================================
   主题系统：data-theme 三套（html 标签上切换，localStorage 记忆）
   - navy（默认）：深邃蓝 + 靛蓝，深色头部/Hero/页脚
   - sunset：橙色 + 白色，浅色头部/Hero + 暖棕深色页脚
   - sky：白色 + 蓝色，浅色头部/Hero + 深蓝页脚
   ============================================================ */
:root,
[data-theme="navy"] {
  --accent:      #4F46E5;
  --accent-2:    #6366F1;
  --accent-hover:var(--accent-hover);
  --accent-tint: #EEF0FF;
  --accent-tint-strong: var(--accent-tint-strong);
  --header-bg:   linear-gradient(90deg, #0A1533 0%, #12224B 100%);
  --header-text: #FFFFFF;
  --header-text-2: #A9B6D6;
  --header-line: rgba(255, 255, 255, .14);
  --header-ctrl-bg: rgba(255, 255, 255, .10);
  --header-ctrl-bg-hover: rgba(255, 255, 255, .20);
  --header-shadow: 0 10px 28px rgba(6, 12, 32, .38);
  --drawer-bg:   linear-gradient(180deg, #12224B, #0A1533);
  --drawer-text: #E7ECF7;
  --drawer-line: rgba(255, 255, 255, .14);
  --drawer-shadow: 0 20px 44px rgba(3, 8, 26, .55);
  --hero-bg:     linear-gradient(135deg, #0A1533 0%, #12224B 55%, #1B2F63 100%);
  --hero-text:   #FFFFFF;
  --hero-text-2: #A9B6D6;
  --hero-rule:   rgba(255, 255, 255, .32);
  --hero-line:   rgba(255, 255, 255, .14);
  --hero-glow-1: rgba(99, 102, 241, .35);
  --hero-glow-2: rgba(37, 99, 235, .30);
  --hero-card-shadow: 0 26px 60px rgba(3, 8, 26, .55);
  --footer-bg:   linear-gradient(180deg, #0A1533 0%, #060D20 100%);
  --footer-heading: #FFFFFF;
  --footer-text: #E7ECF7;
  --footer-text-2: #A9B6D6;
  --footer-line: rgba(255, 255, 255, .14);
  --footer-glow: rgba(99, 102, 241, .26);
  --cta-grad:    linear-gradient(135deg, #4F46E5, #6366F1);
  --cta-shadow:  0 12px 26px rgba(79, 70, 229, .42);
  --cta-shadow-hover: 0 16px 32px rgba(79, 70, 229, .52);
  --stat-card-bg2: #F7F8FF;
  --stat-card-line: #E2E6FF;
  --rank-1:      #F59E0B;   /* 01 琥珀 */
  --rank-2:      #2563EB;   /* 02 蓝   */
  --rank-3:      #4F46E5;   /* 03 靛蓝 */
  --rank-rest:   #C3CBD9;   /* 04/05 灰 */
}

/* 橙色 + 白色 */
[data-theme="sunset"] {
  --accent:      #EA580C;
  --accent-2:    #F97316;
  --accent-hover:#C2410C;
  --accent-tint: #FFF1E7;
  --accent-tint-strong: #FFE4D0;
  --header-bg:   #FFFFFF;
  --header-text: #231407;
  --header-text-2: #8A7260;
  --header-line: #F3E3D3;
  --header-ctrl-bg: #FFF4EC;
  --header-ctrl-bg-hover: #FFE8D6;
  --header-shadow: 0 10px 28px rgba(120, 60, 10, .12);
  --drawer-bg:   #FFFFFF;
  --drawer-text: #231407;
  --drawer-line: #F3E3D3;
  --drawer-shadow: 0 20px 44px rgba(120, 60, 10, .18);
  --hero-bg:     linear-gradient(135deg, #FFF7EF 0%, #FFEEDD 55%, #FFE3CC 100%);
  --hero-text:   #231407;
  --hero-text-2: #8A6A52;
  --hero-rule:   rgba(180, 100, 40, .40);
  --hero-line:   rgba(180, 100, 40, .22);
  --hero-glow-1: rgba(249, 115, 22, .20);
  --hero-glow-2: rgba(234, 88, 12, .14);
  --hero-card-shadow: 0 26px 60px rgba(160, 80, 20, .22);
  --footer-bg:   linear-gradient(180deg, #2B1708 0%, #1D0F05 100%);
  --footer-heading: #FFFFFF;
  --footer-text: #F5E8DC;
  --footer-text-2: #C4A58C;
  --footer-line: rgba(255, 255, 255, .12);
  --footer-glow: rgba(249, 115, 22, .20);
  --cta-grad:    linear-gradient(135deg, #EA580C, #F97316);
  --cta-shadow:  0 12px 26px rgba(234, 88, 12, .40);
  --cta-shadow-hover: 0 16px 32px rgba(234, 88, 12, .50);
  --stat-card-bg2: #FFF8F3;
  --stat-card-line: #FFE1C9;
  --rank-1:      #F59E0B;
  --rank-2:      #EA580C;
  --rank-3:      #C2410C;
  --rank-rest:   #D8C7B8;
}

/* 白色 + 蓝色 */
[data-theme="sky"] {
  --accent:      #2563EB;
  --accent-2:    #3B82F6;
  --accent-hover:#1D4ED8;
  --accent-tint: #EBF2FF;
  --accent-tint-strong: #D8E6FF;
  --header-bg:   #FFFFFF;
  --header-text: #111827;
  --header-text-2: #64748B;
  --header-line: #E3EAF6;
  --header-ctrl-bg: #F0F5FF;
  --header-ctrl-bg-hover: #E2ECFF;
  --header-shadow: 0 10px 28px rgba(20, 60, 140, .12);
  --drawer-bg:   #FFFFFF;
  --drawer-text: #111827;
  --drawer-line: #E3EAF6;
  --drawer-shadow: 0 20px 44px rgba(20, 60, 140, .16);
  --hero-bg:     linear-gradient(135deg, #F4F8FF 0%, #E7F0FF 55%, #DCE9FF 100%);
  --hero-text:   #0B1E3F;
  --hero-text-2: #5A708F;
  --hero-rule:   rgba(37, 99, 235, .35);
  --hero-line:   rgba(37, 99, 235, .18);
  --hero-glow-1: rgba(59, 130, 246, .20);
  --hero-glow-2: rgba(37, 99, 235, .14);
  --hero-card-shadow: 0 26px 60px rgba(20, 60, 140, .22);
  --footer-bg:   linear-gradient(180deg, #0B1E3F 0%, #081226 100%);
  --footer-heading: #FFFFFF;
  --footer-text: #E3ECF9;
  --footer-text-2: #93A9CC;
  --footer-line: rgba(255, 255, 255, .12);
  --footer-glow: rgba(59, 130, 246, .22);
  --cta-grad:    linear-gradient(135deg, #2563EB, #3B82F6);
  --cta-shadow:  0 12px 26px rgba(37, 99, 235, .40);
  --cta-shadow-hover: 0 16px 32px rgba(37, 99, 235, .50);
  --stat-card-bg2: #F5F9FF;
  --stat-card-line: #D5E4FF;
  --rank-1:      #F59E0B;
  --rank-2:      #3B82F6;
  --rank-3:      #2563EB;
  --rank-rest:   #C3D2E8;
}

/* ---------- 重置与基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body{background:var(--bg);color:var(--text-1);font-family:var(--font-sans)}
body { font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--accent-tint); color: var(--accent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-inset); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

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

/* ---------- 深色吸顶导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: var(--header-shadow); }

/* 移动端抽屉遮罩（低于 header z-index:100、高于页面内容） */
.nav-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.nav-mask.show { opacity: 1; visibility: visible; }
.header-inner { display: flex; align-items: center; gap: var(--sp-6); height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--cta-shadow);
}
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-cn { font-size: 19px; font-weight: 700; letter-spacing: .02em; color: var(--header-text); }
.brand-en { font-size: 10px; letter-spacing: .2em; color: var(--header-text-2); text-transform: uppercase; margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 胶囊式导航：当前栏目填充主题色，重点突出 */
.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--header-text-2);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--header-text); background: var(--header-ctrl-bg-hover); }
.nav-link.active {
  color: #fff;
  background: var(--accent);
  font-weight: 600;
  box-shadow: 0 6px 14px var(--cta-shadow);
}

/* 桌面端（≥1200，容器即 1200）：导航减至 7 项后空间充足，使用舒适间距 */
@media (min-width: 1200px) {
  .header-inner { gap: var(--sp-6); }
  .main-nav { flex-wrap: nowrap; }
}

.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* 深色半透明胶囊搜索框 */
.search-box {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--header-line);
  border-radius: 999px;
  background: var(--header-ctrl-bg);
  transition: background .2s ease, border-color .2s ease;
}
.search-box input { width: 190px; border: 0; background: transparent; outline: none; font-size: 14px; color: var(--header-text); }
.search-box input::placeholder { color: var(--header-text-2); }
.search-box button { display: flex; align-items: center; border: 0; background: none; color: var(--header-text-2); padding: 6px; }
.search-box button:hover { color: var(--header-text); }
.search-box:focus-within { border-color: var(--accent-2); background: var(--header-ctrl-bg-hover); }

/* 圆形图标按钮（站点地图 / 移动端菜单） */
.header-round {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--header-ctrl-bg);
  border: 1px solid var(--header-line);
  color: var(--header-text);
  transition: background .2s ease, color .2s ease;
}
.header-round:hover { background: var(--header-ctrl-bg-hover); color: var(--header-text); }
.menu-toggle { display: none; border: 1px solid var(--header-line); }

/* ---------- 按钮 ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 20px;
  background: var(--accent); color: var(--text-inverse);
  border: 1px solid var(--accent); border-radius: var(--radius-ctrl);
  font-size: 14px; font-weight: 600; transition: background .2s ease, transform .1s ease;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active { transform: translateY(1px); }

.btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 20px;
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius-ctrl);
  font-size: 14px; font-weight: 600; transition: background .2s ease;
}
.btn-line:hover { background: var(--accent-tint); }

.btn-text { color: var(--accent); font-size: 14px; font-weight: 500; white-space: nowrap; }
.btn-text:hover { color: var(--accent-hover); }

/* ---------- 栏目标签 ---------- */
.cat-badge {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 500; line-height: 1.6;
  padding: 3px 10px;
  border-radius: var(--radius-ctrl);
  color: var(--accent); background: var(--accent-tint);
  transition: background .2s ease, color .2s ease;
}
.cat-badge:hover { background: var(--accent-tint-strong); color: var(--accent-hover); }

/* ---------- 杂志式 Hero（深色全宽） ---------- */
.hero-mag {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: var(--sp-7) 0;
}
.hero-mag::before {
  content: '';
  position: absolute; top: -150px; left: -120px;
  width: 440px; height: 440px; border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow-1), transparent 70%);
  pointer-events: none;
}
.hero-mag::after {
  content: '';
  position: absolute; bottom: -190px; right: -110px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow-2), transparent 70%);
  pointer-events: none;
}
.mag-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--sp-7);
  align-items: center;
}

.mag-issue {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--hero-text-2);
  margin-bottom: var(--sp-5);
}
.mag-rule { flex: 0 0 56px; height: 1px; background: var(--hero-rule); }
.mag-title { font-size: 46px; line-height: 1.22; font-weight: 700; letter-spacing: .01em; margin-bottom: var(--sp-4); }
.mag-desc { font-size: 15px; line-height: 1.8; color: var(--hero-text-2); max-width: 34em; margin-bottom: var(--sp-6); }
.mag-cta {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 26px;
  border-radius: 999px;
  background: var(--cta-grad);
  color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: var(--cta-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.mag-cta:hover { transform: translateY(-2px); box-shadow: var(--cta-shadow-hover); }
.mag-cta:active { transform: translateY(0); }

/* 精选轮播大卡 */
.mag-carousel {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--hero-line);
  box-shadow: var(--hero-card-shadow);
}
.mag-single-link { display: block; height: 100%; }
.carousel { position: relative; }
.carousel-track { position: relative; height: 100%; }
.carousel-item { display: none; height: 100%; }
.carousel-item.active { display: block; animation: carouselIn .5s ease both; }
@keyframes carouselIn { from { opacity: 0; } to { opacity: 1; } }
.carousel-item a { display: block; height: 100%; position: relative; }
.carousel-item img, .mag-single-link img { width: 100%; height: 100%; object-fit: cover; }
.carousel-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 60px 22px 18px;
  background: linear-gradient(to top, rgba(6, 12, 32, .92) 25%, rgba(6, 12, 32, 0));
  color: #fff;
}
.carousel-cap h3 {
  font-size: 21px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cap-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent-2); color: #fff;
  font-size: 12px; font-weight: 500;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.carousel-ctrl { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; z-index: 2; }
.carousel-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(10, 21, 51, .55); color: #fff;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background .2s ease, border-color .2s ease;
}
.carousel-btn:hover { background: var(--accent); border-color: var(--accent); }
.carousel-foot {
  position: absolute; right: 18px; bottom: 14px; z-index: 2;
  display: flex; align-items: center; gap: 12px;
}
.carousel-counter {
  font-size: 12px; letter-spacing: .1em;
  color: rgba(255, 255, 255, .88);
  font-variant-numeric: tabular-nums;
}
/* 分段进度条（由 main.js 生成 .carousel-dot） */
.carousel-dots { display: flex; gap: 6px; }
.carousel-dot {
  position: relative;
  width: 26px; height: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  overflow: hidden;
  cursor: pointer;
}
.carousel-dot.active::after {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 999px;
  background: #fff;
  transform-origin: left;
  animation: dotFill 5s linear forwards;
}
.mag-carousel:hover .carousel-dot.active::after { animation-play-state: paused; }
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- 版块 ---------- */
.section { padding: var(--sp-7) 0; border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-soft); }
.section-latest { border-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.section-title { display: flex; align-items: baseline; gap: 12px; }
.section-title h2 { font-size: 24px; line-height: 1.35; font-weight: 700; }
.section-en { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }

/* ---------- 卡片网格（编辑推荐 / 栏目聚合） ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6) var(--sp-5); }
.article-card {
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.article-card:hover { border-color: #DCE0FA; box-shadow: var(--shadow-2); transform: translateY(-2px); }
.card-img-wrap { display: block; }
.card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-inset); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22, .61, .36, 1); }
.article-card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.card-body .cat-badge { align-self: flex-start; }
.card-body h3 { font-size: 18px; line-height: 1.45; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body h3 a:hover { color: var(--accent); }
.card-summary { font-size: 14px; line-height: 1.75; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 13px; line-height: 1.5; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- 最新发布 + 热门排行榜 ---------- */
.home-latest { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--sp-7); align-items: start; }
.list-feed { display: flex; flex-direction: column; }
.feed-item {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.feed-item:first-child { padding-top: 0; }
.feed-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-inset);
}
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22, .61, .36, 1); }
.feed-item:hover .feed-thumb img { transform: scale(1.04); }
/* 分类页列表缩略图（与首页 feed-thumb 同语言：圆角 + 统一比例 + 悬停微缩放） */
.feed-img {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-inset);
}
.feed-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22, .61, .36, 1); }
.feed-item:hover .feed-img img { transform: scale(1.04); }
.thumb-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(10, 21, 51, .74); color: #fff;
  font-size: 11px; line-height: 1.6;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.feed-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.feed-date { font-size: 12px; color: var(--text-3); }
.feed-body h3 { font-size: 19px; line-height: 1.4; font-weight: 700; }
.feed-body h3 a:hover { color: var(--accent); }
.feed-summary { font-size: 14px; line-height: 1.75; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.meta-ico { display: inline-flex; align-items: center; gap: 5px; }
.meta-ico svg { color: var(--text-3); }
.feed-arrow { color: var(--text-3); display: inline-flex; transition: transform .2s ease, color .2s ease; }
.feed-item:hover .feed-arrow { color: var(--accent); transform: translateX(4px); }

/* 侧栏：排行榜 + 数据卡 */
.rank-side { display: flex; flex-direction: column; gap: var(--sp-5); }
.rank-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--sp-5); }
.side-block > h3 {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 18px; font-weight: 700;
  padding-bottom: var(--sp-3); margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border-strong);
}
.rank-list li { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.rank-list li:last-child { border-bottom: 0; }
.rank-no {
  flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  background: var(--rank-rest);
  font-variant-numeric: tabular-nums;
}
.rank-list li:nth-child(1) .rank-no { background: var(--rank-1); }
.rank-list li:nth-child(2) .rank-no { background: var(--rank-2); }
.rank-list li:nth-child(3) .rank-no { background: var(--rank-3); }
.rank-body { min-width: 0; }
.rank-body h4 { font-size: 15px; line-height: 1.5; font-weight: 600; }
.rank-body h4 a:hover { color: var(--accent); }
.meta-line { font-size: 13px; line-height: 1.5; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; }

/* 数据卡（浅靛蓝渐变） */
.stat-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-4);
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, var(--accent-tint) 0%, #F7F8FF 100%);
  border: 1px solid #E2E6FF;
  text-align: center;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.stat-ico { display: inline-flex; color: var(--accent); }
.stat b { font-size: 22px; line-height: 1.2; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.stat > span:last-child { font-size: 11px; color: var(--text-3); }

/* ---------- 分类页 ---------- */
.category-hero { padding: var(--sp-7) 0 var(--sp-6); border-bottom: 1px solid var(--border); }
.cat-hero-name { font-size: 34px; line-height: 1.3; font-weight: 700; margin-bottom: var(--sp-3); }
.cat-hero-desc { font-size: 15px; line-height: 1.75; color: var(--text-2); max-width: 46em; }
.cat-hero-meta { display: flex; gap: var(--sp-5); margin-top: var(--sp-4); font-size: 13px; color: var(--text-3); }
.category-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--sp-7); padding: var(--sp-7) 0 var(--sp-8); align-items: start; }
.cat-list { min-width: 0; }

/* ---------- 分页 ---------- */
.pagination .page-info { text-align: center; padding: 36px 0 0; font-size: 13px; color: var(--text-3); }
.pagination ul { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 14px 0 8px; }
.pagination li a, .pagination li span {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-ctrl);
  background: var(--bg); font-size: 13px; color: var(--text-2);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.pagination li a:hover { border-color: var(--accent); color: var(--accent); }
.pagination li.on a, .pagination li.on span { background: var(--accent); border-color: var(--accent); color: var(--text-inverse); }
.pagination li.dis span { color: var(--text-3); cursor: default; }
.pagination li.gap span { border: 0; background: none; }

/* ---------- 文章详情 ---------- */
.article-hero { padding: var(--sp-7) 0 var(--sp-6); border-bottom: 1px solid var(--border); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: var(--sp-4); }
.meta-item { font-size: 13px; color: var(--text-3); }
.meta-item b { color: var(--text-1); font-weight: 600; }
.article-title { font-size: 34px; line-height: 1.3; font-weight: 700; letter-spacing: .01em; }
.article-hero .lead { font-size: 17px; line-height: 1.8; color: var(--text-2); margin-top: var(--sp-4); }

.article-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--sp-7); padding: var(--sp-7) 0 var(--sp-8); align-items: start; }
.article-main { min-width: 0; }
.article-cover { margin: 0 0 var(--sp-7); border-radius: var(--radius-card); overflow: hidden; }
.article-cover img { width: 100%; }

.article-body { font-size: 17px; line-height: 1.9; color: var(--text-1); }
.article-body p { margin-bottom: 1.4em; }
.article-body h2 { font-size: 24px; line-height: 1.35; font-weight: 700; margin: 2em 0 .9em; }
.article-body h3 { font-size: 20px; font-weight: 600; margin: 1.8em 0 .8em; }
.article-body img { margin: 1.6em auto; border-radius: var(--radius-card); }
.article-body blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; margin: 1.8em 0; color: var(--text-2); }
.article-body a { color: var(--accent); }
.article-body a:hover { color: var(--accent-hover); }
.article-body ul, .article-body ol { margin: 0 0 1.4em 1.4em; }
.article-body ul li { list-style: disc; margin-bottom: .5em; }
.article-body ol li { list-style: decimal; margin-bottom: .5em; }

.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: var(--sp-6) 0; padding: var(--sp-5) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tags-label { font-size: 12px; color: var(--text-3); margin-right: 4px; }
.tag { font-size: 13px; padding: 4px 14px; border-radius: var(--radius-ctrl); background: var(--accent-tint); color: var(--accent); transition: background .2s ease, color .2s ease; }
.tag:hover { background: var(--accent-tint-strong); color: var(--accent-hover); }

.like-bar { display: flex; justify-content: center; padding: var(--sp-6) 0 var(--sp-5); }
.like-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 36px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg); font-size: 15px; color: var(--text-1);
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .1s ease;
}
.like-heart { color: var(--text-3); transition: color .2s ease, transform .25s ease; }
.like-btn:hover { border-color: #FB7185; color: #E11D48; }
.like-btn:hover .like-heart { color: #E11D48; transform: scale(1.15); }
.like-btn:active { transform: translateY(1px); }
.like-btn .like-count { font-variant-numeric: tabular-nums; }
.like-btn.liked { background: #FFF1F2; border-color: #FB7185; color: #E11D48; }
.like-btn.liked .like-heart {
  color: #E11D48;
  animation: heartPop .5s cubic-bezier(.17, .89, .32, 1.49), heartbeat 2s ease-in-out .8s infinite;
}
.like-btn[disabled] { cursor: default; opacity: .92; }
/* 点击点赞：按钮弹跳 + 爱心粒子飘散 */
.like-btn.pop { animation: btnPop .4s cubic-bezier(.17, .89, .32, 1.49); }
.like-spark {
  position: absolute; bottom: 55%; left: 50%;
  color: #E11D48; pointer-events: none; z-index: 2;
  animation: sparkFloat 1s ease-out forwards;
}
@keyframes btnPop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes heartPop { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.18); } 24% { transform: scale(1); } }
@keyframes sparkFloat {
  from { opacity: 1; transform: translate(0, 0) scale(.6); }
  to { opacity: 0; transform: translate(var(--dx, 0), -52px) scale(1.15); }
}

.prev-next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); border-top: 1px solid var(--border); padding-top: var(--sp-5); }
.prev-next a { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-card); transition: border-color .2s ease; }
.prev-next a:hover { border-color: var(--accent); }
.prev-next a:last-child { text-align: right; align-items: flex-end; }
.pn-label { font-size: 12px; color: var(--text-3); }
.pn-title { font-size: 15px; font-weight: 600; line-height: 1.5; }

/* ---------- 侧栏（小图文卡） ---------- */
.side-panel { display: flex; flex-direction: column; gap: var(--sp-5); }
.side-list { display: flex; flex-direction: column; }
.side-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.side-card:last-child { border-bottom: 0; }
.side-card-img { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; background: var(--bg-inset); }
.side-card-img img { width: 100%; height: 100%; object-fit: cover; }
.side-card-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.side-card-body h4 { font-size: 15px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-card-body h4 a:hover { color: var(--accent); }

/* ---------- 搜索页 ---------- */
.search-hero { padding: var(--sp-7) 0 var(--sp-6); border-bottom: 1px solid var(--border); }
.search-hero h1 { font-size: 34px; line-height: 1.3; font-weight: 700; margin-bottom: var(--sp-4); }
.search-big { display: flex; align-items: center; height: 48px; padding: 0 8px 0 16px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg); max-width: 560px; transition: border-color .2s ease, box-shadow .2s ease; }
.search-big input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; }
.search-big input::placeholder { color: var(--text-3); }
.search-big button { display: flex; align-items: center; border: 0; background: none; color: var(--text-2); padding: 8px; }
.search-big button:hover { color: var(--accent); }
.search-big:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.search-hero .kw { font-size: 14px; color: var(--text-2); margin-top: var(--sp-4); }

/* ---------- 空状态 ---------- */
.empty-tip { padding: var(--sp-8) 0; text-align: center; font-size: 14px; color: var(--text-2); }
.empty-tip .btn-text { margin-left: 4px; }

/* ---------- 404 ---------- */
.empty-404 { padding: 96px 0; text-align: center; }
.e-code { font-size: 56px; font-weight: 700; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.e-title { font-size: 24px; font-weight: 700; margin: var(--sp-5) 0 var(--sp-3); }
.e-desc { font-size: 14px; color: var(--text-2); }
.e-ops { display: flex; justify-content: center; gap: var(--sp-4); margin-top: var(--sp-6); }

/* ---------- 页脚（品牌栏 + 链接栏 + CTA 卡片 + 底部信息条） ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: var(--sp-7);
}
.footer-glow {
  position: absolute; left: 50%; top: -140px;
  width: 560px; height: 560px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--footer-glow), transparent 70%);
  pointer-events: none;
}
.footer-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: var(--sp-6);
  padding: var(--sp-8) 0 var(--sp-7);
}
.footer-brand .brand { margin-bottom: var(--sp-4); }
/* 页脚品牌区放大 logo 与站名 */
.footer-brand .brand-mark {
  width: 46px; height: 46px; border-radius: 13px;
}
.footer-brand .brand-mark svg { width: 26px; height: 26px; }
.footer-brand .brand-cn { color: var(--footer-heading); font-size: 26px; }
.footer-brand .brand-en { color: var(--footer-text-2); font-size: 12px; letter-spacing: .24em; margin-top: 5px; }
.footer-about { font-size: 13px; line-height: 1.85; color: var(--footer-text-2); max-width: 30em; }
.footer-col h4 { font-size: 13px; font-weight: 600; color: var(--footer-heading); margin-bottom: var(--sp-4); }
.footer-col li { margin-bottom: 8px; font-size: 14px; }
.footer-col a { color: var(--footer-text-2); transition: color .2s ease; }
.footer-col a:hover { color: #fff; }
.footer-cat-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 24px; }
/* CTA 卡片 */
.footer-cta {
  position: relative;
  border-radius: var(--radius-card);
  padding: var(--sp-5) var(--sp-4);
  background: var(--cta-grad);
  color: #fff;
  box-shadow: var(--cta-shadow);
  overflow: hidden;
}
.footer-cta::after {
  content: '';
  position: absolute; right: -46px; top: -46px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  pointer-events: none;
}
.footer-cta h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.footer-cta p { font-size: 13px; line-height: 1.75; color: rgba(255, 255, 255, .85); margin-bottom: var(--sp-4); }
.footer-cta-btn {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 18px; border-radius: 999px;
  background: #fff; color: var(--accent);
  font-size: 13px; font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}
.footer-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.footer-bottom { position: relative; border-top: 1px solid var(--footer-line); }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  min-height: 52px; padding: 8px 0;
  font-size: 12px; color: var(--footer-text-2);
}
.footer-bottom a { color: var(--footer-text-2); }
.footer-bottom a:hover { color: #fff; }

/* ---------- 主题切换轻提示（点击按钮循环切换主题） ---------- */
.theme-toast {
  position: fixed; top: 86px; right: 28px; z-index: 130;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--cta-shadow);
  opacity: 0; transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.theme-toast.show { opacity: 1; transform: none; }

/* ---------- 返回顶部（深色圆钮） ---------- */
.back-top {
  position: fixed; right: 28px; bottom: 28px;
  width: 44px; height: 44px;
  display: none; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%;
  background: rgba(10, 21, 51, .88); color: #fff;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  z-index: 60; transition: background .2s ease, transform .2s ease;
}
.back-top:hover { background: var(--accent); transform: translateY(-2px); }

/* ---------- 入场动效 ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, .61, .36, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   响应式断点（解耦：导航收起 / Hero 堆叠 / 内容单列各自独立）
   ≥1200 桌面紧凑导航；≤1199 头部与导航收起（内容栅格不动）；
   ≤1100 Hero 上下堆叠；≤900 内容区单列与紧凑排版；≤640 上下结构
   ============================================================ */

/* ① ≤1199：头部与导航收进汉堡菜单，内容栅格保持桌面双栏 */
@media (max-width: 1199px) {
  .container { padding: 0 18px; }

  .header-inner { gap: var(--sp-3); }
  .brand-cn { font-size: 17px; }
  .menu-toggle { display: inline-flex; }
  /* 右侧滑出抽屉：占屏约 2/3 宽，transform 滑入滑出 */
  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: 66.67vw;
    max-width: 360px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 16px;
    background: var(--drawer-bg);
    border-left: 1px solid var(--drawer-line);
    box-shadow: var(--drawer-shadow);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s ease;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav .nav-link { padding: 15px 4px; width: 100%; font-size: 16px; color: var(--drawer-text); border-bottom: 1px solid var(--drawer-line); border-radius: 0; background: none; }
  .main-nav .nav-link.active { color: var(--accent-2); background: none; box-shadow: none; }
  .main-nav .nav-link:hover { background: none; }
  .main-nav .nav-link:last-child { border-bottom: 0; }
  .main-nav .nav-link::after { display: none; }
  .search-box input { width: 140px; }
}

/* ③ ≤1100：Hero 上下堆叠（1101-1199 仍为双栏） */
@media (max-width: 1100px) {
  .mag-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .mag-editorial { order: 1; }
  .mag-carousel { order: 2; }
  .mag-title { font-size: 32px; }
  .mag-desc { font-size: 14px; margin-bottom: var(--sp-5); }
  .hero-mag { padding: var(--sp-6) 0; }
}

/* ④ ≤900：内容区单列与紧凑排版 */
@media (max-width: 900px) {
  .home-latest, .category-layout, .article-layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: var(--sp-6) 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: var(--sp-5); }
  .section-title h2 { font-size: 20px; }
  .feed-body h3 { font-size: 17px; }
  .side-panel { flex-direction: column; }
  .footer-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-cta { grid-column: 1 / -1; }
  .back-top { right: 16px; bottom: 16px; }
  .pagination li a, .pagination li span { min-width: 44px; height: 44px; font-size: 14px; }
  .btn-primary, .btn-line { height: 44px; }
  .article-title, .cat-hero-name, .search-hero h1 { font-size: 24px; }
  .cat-hero-name { font-size: 28px; }      /* 分类页大标题单独渐进放大 */
  .category-hero { padding-top: var(--sp-4); }  /* 标题上方空隙与下方对齐（16px） */
  .prev-next { grid-template-columns: minmax(0, 1fr); }
  .prev-next a:last-child { text-align: left; align-items: flex-start; }
}

@media (max-width: 640px) {
  .container { padding: 0 14px; }
  body { font-size: 15px; }
  .brand-text { display: none; }           /* 仅保留图标，避免挤压 */
  .search-box input { width: 140px; }
  .mag-title { font-size: 26px; }
  .mag-cta { height: 44px; padding: 0 20px; font-size: 14px; }
  .carousel-cap h3 { font-size: 16px; }
  /* 计数/进度条移到说明文字下方，避免与标题重叠 */
  .carousel-cap { padding-bottom: 56px; }
  .carousel-foot { right: 12px; bottom: 10px; }
  .carousel-dot { width: 18px; }

  /* 缩略图与文字改为上下结构 */
  .feed-item { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .feed-thumb { aspect-ratio: 16 / 9; }
  .feed-arrow { display: none; }
  .feed-summary { -webkit-line-clamp: 2; }

  .card-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
  .stat-card { padding: var(--sp-4) var(--sp-3); }
  .stat b { font-size: 18px; }
  .rank-no { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
  .footer-cat-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
  .pagination li a, .pagination li span { min-width: 40px; padding: 0 10px; }
  .article-body { font-size: 16px; }
  .article-title, .cat-hero-name, .search-hero h1 { font-size: 21px; }
  .cat-hero-name { font-size: 32px; }      /* 分类页大标题放大（约 1.5 倍），仅移动端 */
  .category-hero { padding-top: var(--sp-4); }  /* 标题上方空隙与下方对齐（16px） */
  /* 文章页标题区与正文间距减半（桌面 80/48px → 移动 40/24px） */
  .article-hero { padding: var(--sp-5) 0 var(--sp-4); }
  .article-layout { padding-top: var(--sp-4); }
  .article-cover { margin-bottom: var(--sp-5); }
}
