/* ============================================================
 * special-modern.css  ·  专题页面现代设计系统
 * 作用域：所有规则限定在 .sp 容器内，不污染其它页面。
 * 设计语言：渐变 / 柔和阴影 / 卡片化 / 留白 / 滚动揭示 / 暗色模式
 * 性能：仅用 transform / opacity / box-shadow 动画，GPU 友好。
 * 兼容：纯 CSS + IntersectionObserver（无 JS 时内容默认可见）。
 * ============================================================ */

.sp {
  /* —— 设计令牌 —— */
  --sp-bg: #f6f7fb;
  --sp-surface: #ffffff;
  --sp-surface-2: #f8fafc;
  --sp-text: #0f172a;
  --sp-text-soft: #475569;
  --sp-text-mute: #94a3b8;
  --sp-border: #e7ebf3;
  --sp-border-soft: #eef2f8;
  --sp-primary: #6366f1;
  --sp-primary-2: #8b5cf6;
  --sp-accent: #06b6d4;
  --sp-accent-2: #3b82f6;
  --sp-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 48%, #22d3ee 100%);
  --sp-grad-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  --sp-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 6px -2px rgba(15, 23, 42, .08);
  --sp-shadow: 0 4px 12px -4px rgba(15, 23, 42, .10), 0 12px 32px -16px rgba(15, 23, 42, .18);
  --sp-shadow-lg: 0 10px 24px -8px rgba(99, 102, 241, .22), 0 24px 60px -28px rgba(15, 23, 42, .30);
  --sp-radius: 18px;
  --sp-radius-sm: 12px;
  --sp-radius-lg: 26px;
  --sp-ring: 0 0 0 4px rgba(99, 102, 241, .16);
  --sp-ease: cubic-bezier(.22, .61, .36, 1);
  --sp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

/* —— 容器：把旧版 960px 固定布局升级为流体 + 大屏留白 —— */
.sp.main {
  width: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: block;
}

/* 旧 special/header.html 的 960px 外框也放开 */
.special-channel .special-bg {
  width: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 24px;
  background: var(--sp-bg);
  border-radius: 0 0 var(--sp-radius-lg) var(--sp-radius-lg);
  overflow: hidden;
}

/* 【修复#1】隐藏旧版 .header banner —— 已被 .sp-hero 取代，避免双 Hero 堆叠 */
.sp.main ~ .header,
.special-channel .special-bg > .header {
  display: none !important;
}

/* ============================  Hero  ============================ */
.sp-hero {
  position: relative;
  margin: 18px 0 26px;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: var(--sp-radius-lg);
  background: var(--sp-grad);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--sp-shadow-lg);
  isolation: isolate;
}
.sp-hero::before,
.sp-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  z-index: -1;
  opacity: .55;
  animation: sp-float 14s var(--sp-ease) infinite alternate;
}
.sp-hero::before {
  width: 320px; height: 320px;
  right: -60px; top: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%);
}
.sp-hero::after {
  width: 260px; height: 260px;
  left: -40px; bottom: -110px;
  background: radial-gradient(circle at 60% 40%, rgba(34,211,238,.55), rgba(34,211,238,0) 70%);
  animation-delay: -6s;
}
/* 编辑专题时上传的「专题横幅」字段 → 作为 Hero 背景图（覆盖默认渐变）。
   深色渐变蒙版保证白字在任何横幅上都清晰可读；无横幅时回落到 .sp-hero 渐变。 */
.sp-hero--banner {
  background-image:
    linear-gradient(180deg, rgba(15,23,42,.38), rgba(15,23,42,.66)),
    var(--sp-hero-img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@keyframes sp-float {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(18px,-14px,0) scale(1.12); }
}
.sp-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.30);
  backdrop-filter: blur(4px);
  margin-bottom: 16px;
}
.sp-hero-title {
  font-size: clamp(26px, 4.4vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 12px;
  text-shadow: 0 2px 18px rgba(15,23,42,.18);
}
.sp-hero-desc {
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.7;
  max-width: 62ch;
  color: rgba(255,255,255,.92);
  margin: 0 0 18px;
}
.sp-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: rgba(255,255,255,.85);
}
.sp-hero-meta b { font-weight: 700; color: #fff; }

/* ======================  布局栅格  ====================== */
.sp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 22px;
  align-items: start;
}
.sp-col-main { min-width: 0; }
.sp-col-side { min-width: 0; }

/* 解除旧主题的固定宽度浮动，交给栅格接管 */
.sp.main .col-left,
.sp.main .col-auto {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
}
.sp-col-main > .col-left + .col-left { margin-top: 22px !important; }

/* 区块之间垂直间距，避免堆叠紧贴导致错位（index/list 主列与侧栏通用） */
.sp .col-left > .box + .box,
.sp .col-auto > .box + .box { margin-top: 20px; }
/* 卡片 / 列表等内容块在卡片盒内留出左右内边距，避免贴边 */
.sp .box .sp-cards,
.sp .box .sp-posts,
.sp .box > ul.list,
.sp .box > .sp-empty { padding-left: 16px; padding-right: 16px; }

/* 【修复#2】确保旧主题的 float/width 不泄漏到栅格外层内容 */
.sp.main > *:not(.sp-hero):not(.sp-layout):not(script) {
  max-width: 100%;
  overflow: hidden;
}
/* 栅格外的 .box 也需要卡片化（底部 types 循环等） */
.sp.main > .box:not(.sp-layout .box) {
  border: 1px solid var(--sp-border) !important;
  border-radius: var(--sp-radius) !important;
  background: var(--sp-surface) !important;
  box-shadow: var(--sp-shadow-sm);
  padding: 0 0 14px !important;
}

/* ======================  卡片 / 区块  ====================== */
/* 把旧 .box 升级为现代卡片（保留原结构，仅换皮） */
.sp .box {
  border: 1px solid var(--sp-border) !important;
  border-radius: var(--sp-radius) !important;
  background: var(--sp-surface) !important;
  box-shadow: var(--sp-shadow-sm);
  padding: 0 0 14px !important;
  overflow: hidden;
  transition: transform .35s var(--sp-ease), box-shadow .35s var(--sp-ease), border-color .35s var(--sp-ease);
}
.sp .box:hover {
  transform: translateY(-4px);
  box-shadow: var(--sp-shadow);
  border-color: #d9def0 !important;
}
.sp .box h5,
.sp .box h6 {
  height: auto !important;
  line-height: 1.4 !important;
  margin: 0 0 14px !important;
  padding: 15px 18px 13px !important;
  color: var(--sp-text) !important;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--sp-border-soft) !important;
  background: var(--sp-grad-soft) !important;
  position: relative;
}
.sp .box h5::before {
  content: "";
  position: absolute;
  left: 0; top: 13px; bottom: 13px;
  width: 4px;
  border-radius: 4px;
  background: var(--sp-grad);
}
.sp .box h5 a, .sp .box h6 a { color: var(--sp-text) !important; }
.sp .box .content { padding: 0 18px !important; }
.sp .box a.more {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--sp-primary) !important;
  font-weight: 600;
  font-size: 12.5px;
  background: rgba(99,102,241,.10);
  padding: 3px 10px;
  border-radius: 999px;
  transition: background .25s var(--sp-ease), transform .25s var(--sp-ease);
}
.sp .box a.more:hover { background: rgba(99,102,241,.20); transform: translateX(2px); }

/* 通用现代卡片（用于自绘区域） */
.sp-card {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow-sm);
  padding: 18px;
  transition: transform .35s var(--sp-ease), box-shadow .35s var(--sp-ease);
}
.sp-card:hover { transform: translateY(-4px); box-shadow: var(--sp-shadow); }

/* 区块标题（渐变文字 / 左侧渐变条） */
.sp-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 800;
  margin: 4px 0 16px;
  color: var(--sp-text);
  letter-spacing: -.01em;
}
.sp-title::before {
  content: "";
  width: 6px; height: 22px;
  border-radius: 6px;
  background: var(--sp-grad);
}
.sp-title--grad {
  background: var(--sp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sp-title small { font-weight: 500; font-size: 13px; color: var(--sp-text-mute); }

/* ======================  列表  ====================== */
.sp-list { list-style: none; margin: 0; padding: 0; }
.sp-list li {
  position: relative;
  padding: 11px 12px 11px 26px;
  border-radius: 10px;
  line-height: 1.6;
  transition: background .25s var(--sp-ease), transform .25s var(--sp-ease);
}
.sp-list li::before {
  content: "";
  position: absolute;
  left: 12px; top: 50%;
  width: 6px; height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--sp-primary);
  transition: transform .25s var(--sp-ease), background .25s var(--sp-ease);
}
.sp-list li:hover { background: var(--sp-surface-2); transform: translateX(3px); }
.sp-list li:hover::before { transform: scale(1.5); background: var(--sp-accent); }
.sp-list a {
  color: var(--sp-text-soft);
  text-decoration: none;
  font-size: 14.5px;
  transition: color .25s var(--sp-ease);
}
.sp-list a:hover { color: var(--sp-primary); }
.sp-list .sp-count {
  float: right;
  font-size: 12px;
  color: var(--sp-text-mute);
  background: var(--sp-surface-2);
  border: 1px solid var(--sp-border-soft);
  padding: 1px 8px;
  border-radius: 999px;
}

/* 旧 .list 现代化（站点列表沿用 .list 类，统一为现代视觉） */
.sp .list { color: var(--sp-text-soft); }
.sp .list li {
  padding: 7px 0;
  border-bottom: 1px dashed var(--sp-border-soft);
  transition: background .25s var(--sp-ease);
}
/* 列表项「·」前缀：用伪元素渲染，与文字保持 8px 间距，颜色弱化不抢视线 */
.sp .list li::before {
  content: "·";
  margin-right: 8px;
  color: var(--sp-text-mute);
  font-weight: 700;
  flex-shrink: 0;
}
.sp .list li:last-child { border-bottom: none; }
.sp .list li a {
  color: var(--sp-text-soft);
  text-decoration: none;
  font-size: 14.5px;
  transition: color .25s var(--sp-ease);
}
.sp .list li a:hover { color: var(--sp-primary); }

/* 旧 .digg 数字列表现代化（侧栏「排行」） */
.sp .box .digg { background: none; padding-left: 0; }
.sp .box .digg li {
  height: auto;
  line-height: 1.8;
  padding: 7px 0;
  border-bottom: 1px dashed var(--sp-border-soft);
  transition: background .25s var(--sp-ease);
}
.sp .box .digg li:last-child { border-bottom: none; }
.sp .box .digg li a {
  color: var(--sp-text-soft);
  text-decoration: none;
  transition: color .25s var(--sp-ease);
}
.sp .box .digg li a:hover { color: var(--sp-primary); }

/* 双列行列表（row-2）现代化 */
.sp .list.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
}

/* 【修复#3】导读区（.box.intro）现代化 */
.sp .box.intro {
  background: var(--sp-grad-soft) !important;
  border-left: 4px solid var(--sp-primary) !important;
}
.sp .box.intro strong {
  color: var(--sp-primary);
  font-weight: 800;
  font-size: 15px;
}

/* 【修复#3】news-hot 热点新闻区现代化 */
.sp .news-hot {
  background: none !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 14px 18px !important;
}
.sp .news-hot h4 {
  margin: 0 0 10px !important;
  font-size: 17px !important;
  line-height: 1.4 !important;
}
.sp .news-hot h4 a {
  color: var(--sp-text) !important;
  text-decoration: none;
  transition: color .25s var(--sp-ease);
}
.sp .news-hot h4 a:hover { color: var(--sp-primary) !important; }
.sp .news-hot p {
  color: var(--sp-text-soft) !important;
  font-size: 13.5px !important;
  line-height: 1.7 !important;
  margin: 0 0 12px !important;
}
.sp .news-hot .hr { border: none; border-top: 1px dashed var(--sp-border-soft); margin: 12px 0 !important; }

/* 【修复#4】图片列表（picbig / news-photo）现代化 —— 去除旧 float 布局 */
.sp .box .news-photo {
  padding: 10px 18px 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px 12px;
}
.sp .box .news-photo li {
  float: none !important;
  width: auto !important;
  text-align: left !important;
  padding: 0 !important;
  vertical-align: top;
}
.sp .box .news-photo li .img-wrap {
  width: 100% !important;
  height: auto !important;
  margin: 0 0 8px !important;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--sp-radius-sm);
}
.sp .box .news-photo li .img-wrap a,
.sp .box .news-photo li .img-wrap img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
}
.sp .box .news-photo li > a:last-child {
  display: block;
  color: var(--sp-text-soft);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  transition: color .25s;
}
.sp .box .news-photo li > a:last-child:hover { color: var(--sp-primary); }

/* 【修复#5】FocusPic 焦点图尺寸适配栅格 */
.sp .FocusPic {
  width: 100% !important;
}
.sp .FocusPic .content,
.sp .FocusPic #main-slide {
  width: 100% !important;
  overflow: hidden !important;
}
.sp .changeDiv {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 310 / 260;
}
.sp .changeDiv a {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}
.sp .changeDiv a img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* ======================  图片 / 媒体  ====================== */
.sp-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--sp-radius-sm);
  background: var(--sp-surface-2);
}
.sp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s var(--sp-ease);
}
.sp-thumb:hover img { transform: scale(1.06); }
.sp-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0) 55%, rgba(15,23,42,.28));
  opacity: 0;
  transition: opacity .35s var(--sp-ease);
}
.sp-thumb:hover::after { opacity: 1; }

/* 焦点图（旧 .changeDiv #main-slide）现代处理 */
.sp .FocusPic,
.sp .content #main-slide,
.sp .changeDiv {
  border-radius: var(--sp-radius);
  overflow: hidden;
  box-shadow: var(--sp-shadow);
}
.sp .changeDiv a img { border-radius: var(--sp-radius-sm); }

/* ======================  按钮 / 标签  ====================== */
.sp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--sp-grad);
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--sp-shadow);
  transition: transform .25s var(--sp-ease), box-shadow .25s var(--sp-ease), filter .25s var(--sp-ease);
}
.sp-btn:hover { transform: translateY(-2px); box-shadow: var(--sp-shadow-lg); filter: brightness(1.04); }
.sp-btn:active { transform: translateY(0); }

.sp-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-primary);
  background: rgba(99,102,241,.10);
  border: 1px solid rgba(99,102,241,.18);
}

/* ======================  文章详情  ====================== */
.sp-article {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow-sm);
  padding: clamp(22px, 4vw, 44px);
}
.sp-article h1 {
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 14px;
  color: var(--sp-text);
}
.sp-article .sp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--sp-text-mute);
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px dashed var(--sp-border);
}
.sp-article .sp-meta b { color: var(--sp-text-soft); font-weight: 600; }
.sp-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--sp-text-soft);
}
.sp-content p { margin: 0 0 1.1em; }
.sp-content img { max-width: 100%; height: auto; border-radius: var(--sp-radius-sm); box-shadow: var(--sp-shadow-sm); }
.sp-content a { color: var(--sp-primary); text-decoration: none; background-image: linear-gradient(var(--sp-primary), var(--sp-primary)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s var(--sp-ease); }
.sp-content a:hover { background-size: 100% 2px; }
.sp-content blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--sp-primary-2);
  background: var(--sp-grad-soft);
  border-radius: 0 var(--sp-radius-sm) var(--sp-radius-sm) 0;
  color: var(--sp-text-soft);
}
.sp-content h2, .sp-content h3 { color: var(--sp-text); margin: 1.4em 0 .6em; }
.sp-content ul, .sp-content ol { padding-left: 1.4em; }
.sp-content li { margin: .4em 0; }

/* 面包屑 */
.sp .crumbs {
  background: none !important;
  border: none !important;
  padding: 14px 2px 6px !important;
  color: var(--sp-text-mute) !important;
  font-size: 13px;
}
.sp .crumbs a { color: var(--sp-text-soft) !important; text-decoration: none; transition: color .2s; }
.sp .crumbs a:hover { color: var(--sp-primary); }

/* 分享工具条 */
.sp-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: var(--sp-radius);
  background: var(--sp-surface-2);
  border: 1px solid var(--sp-border-soft);
}
.sp-tools a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--sp-text-soft);
  text-decoration: none;
  padding: 7px 13px; border-radius: 999px;
  background: var(--sp-surface); border: 1px solid var(--sp-border);
  transition: transform .25s var(--sp-ease), color .25s, border-color .25s, box-shadow .25s;
}
.sp-tools a:hover { transform: translateY(-2px); color: var(--sp-primary); border-color: #d9def0; box-shadow: var(--sp-shadow-sm); }

/* ======================  分页  ====================== */
#pages.sp-pages, .sp-pages {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
  margin: 22px 0 6px;
}
.sp-pages a, .sp-pages span {
  min-width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--sp-border); background: var(--sp-surface);
  color: var(--sp-text-soft); text-decoration: none; font-size: 13.5px;
  transition: transform .2s var(--sp-ease), background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.sp-pages a:hover { transform: translateY(-2px); color: var(--sp-primary); border-color: #d9def0; box-shadow: var(--sp-shadow-sm); }
.sp-pages .cur, .sp-pages .active { background: var(--sp-grad); color: #fff; border-color: transparent; box-shadow: var(--sp-shadow); }

/* 特殊频道旧头部（special/header.html）现代化 */
.special-channel .special-body-top {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sp-border);
  box-shadow: var(--sp-shadow-sm);
  position: sticky; top: 0; z-index: 50;
}
.special-channel .special-body-top .content {
  max-width: 1200px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 18px;
}
.special-channel .special-body-top .logo img { height: 30px; }
.special-channel .special-body-top .nav a {
  color: var(--sp-text-soft); text-decoration: none; font-size: 14px;
  padding: 6px 4px; position: relative; transition: color .25s var(--sp-ease);
}
.special-channel .special-body-top .nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--sp-grad); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--sp-ease);
}
.special-channel .special-body-top .nav a:hover { color: var(--sp-primary); }
.special-channel .special-body-top .nav a:hover::after { transform: scaleX(1); }
/* 【修复#1续】旧 header banner 隐藏（header img 已被上方规则隐藏，这里确保 header 整体不占位） */
.special-channel .special-bg > .header { display: none !important; }

/* 【修复#6】栅格外底部内容区现代化 */
.sp.main > hr,
.sp .hr {
  border: none;
  border-top: 1px dashed var(--sp-border-soft);
  margin: 16px 0 !important;
}
.sp .bk10 { height: 10px !important; clear: both; }
.sp .bk15 { height: 15px !important; clear: both; }
.sp .bk20 { height: 20px !important; clear: both; }
.sp .bk30 { height: 30px !important; clear: both; }

/* 栅格外的评论 iframe 容器 */
.sp.main > .sp-comment-wrap {
  margin-top: 22px;
}
.sp-comment-inner {
  padding: 0 18px 14px;
}
.sp.main > main iframe#comment_iframe,
.sp > iframe#comment_iframe {
  border-radius: var(--sp-radius) !important;
  border: 1px solid var(--sp-border) !important;
  overflow: hidden;
}

/* 旧 .blue 链接色统一 */
.sp .blue, .sp .blue a { color: var(--sp-primary) !important; }

/* fieldset 本文导航 */
.sp fieldset {
  border: 1px solid var(--sp-border-soft) !important;
  border-radius: var(--sp-radius-sm) !important;
  padding: 14px 18px !important;
  margin: 16px 0 !important;
}
.sp fieldset legend {
  color: var(--sp-text) !important;
  font-weight: 700 !important;
  padding: 0 8px !important;
}

/* ======================  专题频道页旧组件现代化（special_list 精英轮播 / 热点盒）  ====================== */
/* 热点盒：升级为现代卡片（旧 .box-hots 带 .icon sprite，已破图） */
.sp .box-hots {
  background: var(--sp-surface) !important;
  border: 1px solid var(--sp-border) !important;
  border-radius: var(--sp-radius) !important;
  box-shadow: var(--sp-shadow-sm);
  overflow: hidden;
  transition: transform .35s var(--sp-ease), box-shadow .35s var(--sp-ease), border-color .35s var(--sp-ease);
}
.sp .box-hots:hover { transform: translateY(-4px); box-shadow: var(--sp-shadow); border-color: #d9def0 !important; }
.sp .box-hots .icon { display: none !important; }            /* 隐藏旧 sprite 破图 */
.sp .box-hots .content { padding: 0 18px 6px !important; overflow: hidden; }

/* 精英专题轮播：圆角 + 阴影容器（保留 slide 插件内联 674x126 尺寸，不覆盖） */
.sp .special-slide {
  position: relative;
  border-radius: var(--sp-radius) !important;
  box-shadow: var(--sp-shadow) !important;
  overflow: hidden;
}
/* 中和 FocusPic 的 310/260 比例，避免精英轮播被拉成高盒 */
.sp .special-slide .changeDiv { aspect-ratio: auto !important; }
.sp .special-slide .changeDiv a img {
  width: 100% !important; height: auto !important;
  border-radius: var(--sp-radius-sm);
  object-fit: cover;
}
.sp .special-slide .changeDiv a p {
  margin: 8px 2px 0; color: var(--sp-text-soft); font-size: 13px; line-height: 1.6;
}
.sp .special-slide .changeDiv a p strong { color: var(--sp-text); font-size: 15px; }

/* 轮播分页小圆点（旧 .change i 带 sprite 背景，重画为现代圆点） */
.sp .special-slide .change {
  position: absolute; right: 12px; bottom: 10px; z-index: 3;
  display: flex; gap: 6px;
}
.sp .special-slide .change i {
  width: 9px; height: 9px; border-radius: 999px;
  background: rgba(255,255,255,.6);
  background-image: none !important;
  font-size: 0; line-height: 0; text-indent: -999px;
  cursor: pointer;
  transition: background .25s var(--sp-ease), transform .25s var(--sp-ease);
}
.sp .special-slide .change i.cur { background: #fff; transform: scale(1.25); }

/* 频道页旧 .pad-lr-10 内边距对齐设计系统 */
.sp .pad-lr-10 { padding-left: 18px !important; padding-right: 18px !important; }

/* ======================  滚动揭示（核心交互）  ====================== */
/* 仅在 JS 启用时隐藏，确保无 JS / 老浏览器内容可见 */
html.js .sp [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--sp-ease), transform .7s var(--sp-ease);
  will-change: opacity, transform;
}
html.js .sp [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
/* 错峰延迟 */
html.js .sp [data-reveal][data-delay="1"] { transition-delay: .08s; }
html.js .sp [data-reveal][data-delay="2"] { transition-delay: .16s; }
html.js .sp [data-reveal][data-delay="3"] { transition-delay: .24s; }
html.js .sp [data-reveal][data-delay="4"] { transition-delay: .32s; }

/* 入场淡入（页面加载时主体） */
html.js .sp.sp-fade > * { animation: sp-rise .7s var(--sp-ease) both; }
@keyframes sp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ======================  响应式  ====================== */
@media (max-width: 991px) {
  .sp-layout { grid-template-columns: 1fr; }
  .sp-col-side { order: 2; }
}
@media (max-width: 768px) {
  .sp.main { padding: 0 12px; }
  .special-channel .special-bg { padding: 0 12px 20px; border-radius: 0 0 18px 18px; }
  .sp .list.row-2 { grid-template-columns: 1fr; }
  .sp-hero { border-radius: 18px; margin: 14px 0 20px; }
  .sp-article { padding: 20px 16px; border-radius: 18px; }
  .sp .box:hover, .sp-card:hover { transform: none; } /* 触屏去掉抬升 */
}
@media (max-width: 480px) {
  .sp-hero-meta { font-size: 12px; gap: 8px 12px; }
}

/* ======================  暗色模式  ====================== */
@media (prefers-color-scheme: dark) {
  .sp {
    --sp-bg: #0a0f1c;
    --sp-surface: #131a2b;
    --sp-surface-2: #0f1626;
    --sp-text: #e7ecf5;
    --sp-text-soft: #aeb8cc;
    --sp-text-mute: #6b7790;
    --sp-border: #243049;
    --sp-border-soft: #1c2740;
    --sp-grad-soft: linear-gradient(135deg, #1b2240 0%, #221b3f 100%);
    --sp-shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px -2px rgba(0,0,0,.5);
    --sp-shadow: 0 6px 16px -6px rgba(0,0,0,.55), 0 16px 40px -20px rgba(0,0,0,.7);
    --sp-shadow-lg: 0 12px 28px -8px rgba(99,102,241,.35), 0 28px 70px -30px rgba(0,0,0,.8);
  }
  .sp .crumbs { border-color: var(--sp-border) !important; }
  .sp .box h5, .sp .box h6 { background: var(--sp-grad-soft) !important; }
  .special-channel .special-body-top { background: rgba(15,22,38,.82); border-color: var(--sp-border); }
}

/* 尊重「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  html.js .sp [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .sp-hero::before, .sp-hero::after, html.js .sp.sp-fade > * { animation: none !important; }
  .sp * { scroll-behavior: auto !important; }
}

/* ======================  分类区块标题栏（标签卡片风格）  ====================== */
/* 效果图样式：分类名=圆角标签徽章 + 右侧「更多」+ 虚线分隔 */
.sp-sec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 18px 12px;
  border-bottom: 1px dashed var(--sp-border-soft);
}
.sp-sec__title {
  /* 标签徽章：内联块、圆角、左边框色条强调 */
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--sp-text);
  padding: 4px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(99,102,241,.03));
  border-left: 3.5px solid var(--sp-primary);
  line-height: 1.5;
}
.sp-sec__more {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--sp-text-mute);
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s var(--sp-ease);
}
.sp-sec__more:hover { color: var(--sp-primary); }

/* ======================  新闻门户风格：卡片网格（聚合 / 列表）  ====================== */
.sp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  /* 等高：同一行的卡片拉伸到相同高度，避免高低不齐 */
  align-items: stretch;
}
.sp-card {
  display: flex;
  flex-direction: column;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius);
  overflow: hidden;
  transition: transform .3s var(--sp-ease), box-shadow .3s var(--sp-ease), border-color .3s var(--sp-ease);
}
.sp-card:hover { transform: translateY(-4px); box-shadow: var(--sp-shadow); border-color: transparent; }
.sp-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sp-surface-2); }
.sp-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--sp-ease); }
.sp-card:hover .sp-card__media img { transform: scale(1.06); }
/* 无图降级：thumb 为空时显示 SVG 占位 + 提示文字 */
.sp-card__placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--sp-text-mute); background: var(--sp-surface-2);
}
.sp-card__placeholder svg { opacity: .45; }
.sp-card__placeholder span { font-size: 12px; opacity: .6; }
.sp-card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.sp-card__title { font-size: 16px; font-weight: 700; line-height: 1.45; }
.sp-card__title a { color: var(--sp-text); text-decoration: none; transition: color .25s var(--sp-ease); }
.sp-card__title a:hover { color: var(--sp-primary); }
.sp-card__desc {
  font-size: 13.5px; line-height: 1.7; color: var(--sp-text-soft); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sp-card__meta { display: flex; align-items: center; gap: 12px; margin-top: auto; font-size: 12px; color: var(--sp-text-mute); }
.sp-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ======================  新闻门户风格：文章列表卡（分类页）  ====================== */
.sp-posts { display: grid; gap: 14px; }
.sp-post {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 16px;
  padding: 14px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius);
  transition: transform .3s var(--sp-ease), box-shadow .3s var(--sp-ease), border-color .3s var(--sp-ease);
}
.sp-post:hover { transform: translateY(-3px); box-shadow: var(--sp-shadow); border-color: transparent; }
.sp-post__thumb { aspect-ratio: 4 / 3; border-radius: var(--sp-radius-sm); overflow: hidden; background: var(--sp-surface-2); }
.sp-post__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--sp-ease); }
.sp-post:hover .sp-post__thumb img { transform: scale(1.05); }
.sp-post__main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sp-post__title { font-size: 17px; font-weight: 700; line-height: 1.4; }
.sp-post__title a { color: var(--sp-text); text-decoration: none; transition: color .25s var(--sp-ease); }
.sp-post__title a:hover { color: var(--sp-primary); }
.sp-post__desc {
  font-size: 14px; line-height: 1.7; color: var(--sp-text-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sp-post__meta { display: flex; gap: 14px; margin-top: auto; font-size: 12px; color: var(--sp-text-mute); }
@media (max-width: 640px) {
  .sp-post { grid-template-columns: 1fr; gap: 12px; }
  .sp-post__thumb { aspect-ratio: 16 / 9; }
  .sp-post:hover { transform: none; }
}

/* ======================  新闻门户风格：分类导航（列表页）  ====================== */
.sp-catnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius);
  overflow-x: auto;
}
.sp-catnav__item {
  flex: 0 0 auto;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sp-text-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s var(--sp-ease), color .25s var(--sp-ease);
}
.sp-catnav__item:hover { color: var(--sp-primary); background: var(--sp-surface-2); }
.sp-catnav__item.is-active { color: #fff; background: var(--sp-primary); }

/* 空状态提示（分类无文章时，效果图格式：(空 / 远空)） */
.sp-empty {
  padding: 22px 18px;
  text-align: center;
  color: var(--sp-text-mute);
  font-size: 13.5px;
}

/* 导读内容区（与分类卡片风格统一，中文字体排版优化） */
.sp-intro {
  padding: 16px 20px 20px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--sp-text-soft);
  text-align: justify;
  text-justify: inter-ideograph;
  /* 首行缩进 2em：描述字段多为纯文本，直接作用于块首行 */
  text-indent: 2em;
}
/* 若描述含 <p> 段落，统一段距与首行缩进，与「导读」标题形成清晰层级 */
.sp-intro p {
  margin: 0 0 12px;
  text-indent: 2em;
}
.sp-intro p:last-child { margin-bottom: 0; }

/* 移动端：适度收窄内边距，保持协调 */
@media (max-width: 600px) {
  .sp-intro { padding: 14px 16px 16px; font-size: 14px; line-height: 1.8; }
}

/* ======================  列表项样式（· 前缀 + 行高）  ====================== */
