/* ==========================================================================
   公告中心 / 新闻详情（2026-11-09）
   设计基线取自 IDCsmart 复刻规范：内容宽 1480、区块间距 112/88、圆角 2/4、
   1px 描边 + 极浅阴影、品牌蓝 #165dff（复刻原为 #ff6868，站长要求对齐用户中心后改蓝）。
   ========================================================================== */

.news-main {
  --news-brand: var(--site-brand, #165dff);
  --news-brand-hover: var(--site-brand-hover, #0e42d2);
  --news-brand-soft: var(--site-brand-soft, #eaf2ff);
  --news-ink: var(--site-text-strong, #313a50);
  --news-text: var(--site-text-primary, #384257);
  --news-sub: var(--site-text-secondary, #7d8797);
  --news-faint: var(--site-text-tertiary, #9aa1ae);
  --news-line: var(--site-outline, #e2e6ed);
  --news-line-soft: var(--site-outline-light, #eceef3);
  --news-surface: #fff;
  --news-surface-alt: #f7f8fb;
  --news-width: 1480px;
  --news-radius: 4px;
  --news-shadow: 0 10px 28px rgba(49, 59, 78, .08);
  --news-shadow-hover: 0 16px 34px rgba(49, 59, 78, .13);
  background: #fff;
  padding-top: 64px; /* 让开 fixed 顶栏（64 / ≤900 为 60） */
}

/* ---------- 页头 ---------- */
.news-hero {
  padding: 72px 0 0;
  background:
    radial-gradient(900px 320px at 12% -10%, rgba(22, 93, 255, .07), transparent 62%),
    linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
  border-bottom: 0;
}
.news-hero-inner {
  width: min(var(--news-width), calc(100% - 96px));
  margin: 0 auto;
  padding-bottom: 40px;
}
.news-kicker {
  margin: 0 0 14px;
  color: var(--news-brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.news-hero h1 {
  margin: 0;
  color: var(--news-ink);
  font-size: 40px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
}
.news-hero-desc {
  margin: 16px 0 0;
  max-width: 720px;
  color: var(--news-sub);
  font-size: 15px;
  line-height: 1.8;
}

/* ---------- 工具条：分类页签 + 搜索 ---------- */
.news-body {
  width: min(var(--news-width), calc(100% - 96px));
  margin: 0 auto;
  padding: 40px 0 96px;
}
.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--news-line);
}
.news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.news-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 16px;
  border-radius: 2px;
  color: var(--news-sub);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.news-tab:hover { color: var(--news-brand); background: var(--news-brand-soft); }
.news-tab.is-active {
  color: #fff;
  background: var(--news-brand);
  border-color: var(--news-brand);
}
.news-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.news-search input {
  width: 220px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--news-line);
  border-radius: 2px;
  background: #fff;
  color: var(--news-text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.news-search input:focus {
  border-color: var(--news-brand);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, .12);
}
.news-search button {
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--news-brand);
  border-radius: 2px;
  background: var(--news-brand);
  color: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background .18s ease;
}
.news-search button:hover { background: var(--news-brand-hover); }

/* ---------- 列表 ---------- */
.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.news-item {
  border-bottom: 1px solid var(--news-line-soft);
}
.news-item a {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 26px 8px;
  text-decoration: none;
  transition: background .18s ease;
}
.news-item a:hover { background: var(--news-surface-alt); }
.news-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--news-faint);
  font-size: 12px;
  line-height: 1.3;
}
.news-date b {
  color: var(--news-text);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.news-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--news-ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}
.news-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-badge {
  flex: none;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--news-brand-soft);
  color: var(--news-brand);
  font-size: 11px;
  font-weight: 600;
}
.news-summary {
  margin: 8px 0 0;
  color: var(--news-sub);
  font-size: 14px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-more {
  flex: none;
  color: var(--news-faint);
  font-size: 13px;
  white-space: nowrap;
  transition: color .18s ease;
}
.news-item a:hover .news-more { color: var(--news-brand); }

/* 骨架 / 空态 */
.news-skeleton { padding: 12px 0; }
.news-skeleton i {
  display: block;
  height: 74px;
  margin: 12px 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #f2f4f8 25%, #f8fafc 37%, #f2f4f8 63%);
  background-size: 400% 100%;
  animation: news-shimmer 1.4s ease infinite;
}
@keyframes news-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.news-empty {
  padding: 64px 0;
  text-align: center;
  color: var(--news-faint);
  font-size: 14px;
}

/* ---------- 分页 ---------- */
.news-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 36px;
}
.news-pager button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--news-line);
  border-radius: 2px;
  background: #fff;
  color: var(--news-text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.news-pager button:hover:not(:disabled) { border-color: var(--news-brand); color: var(--news-brand); }
.news-pager button.is-active {
  border-color: var(--news-brand);
  background: var(--news-brand);
  color: #fff;
}
.news-pager button:disabled { opacity: .45; cursor: default; }
.news-pager .news-total { margin-left: 8px; color: var(--news-faint); font-size: 13px; }

/* ---------- 详情 ---------- */
.news-detail-main {
  width: min(var(--news-width), calc(100% - 96px));
  margin: 0 auto;
  padding: 32px 0 96px;
}
.news-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--news-faint);
  font-size: 13px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--news-line-soft);
}
.news-crumb a { color: var(--news-sub); text-decoration: none; }
.news-crumb a:hover { color: var(--news-brand); }

.news-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  padding-top: 40px;
  align-items: start;
}
.news-article h1 {
  margin: 0 0 18px;
  color: var(--news-ink);
  font-size: 32px;
  line-height: 1.4;
  font-weight: 700;
}
.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--news-line-soft);
  color: var(--news-faint);
  font-size: 13px;
}
.news-meta .news-badge { margin-right: 4px; }

/* 正文排版：沿用复刻的 17/1.9，代码块与图片自适应 */
.news-content {
  color: var(--news-text);
  font-size: 16px;
  line-height: 1.9;
  word-break: break-word;
}
.news-content > :first-child { margin-top: 0; }
.news-content h2 { margin: 40px 0 16px; font-size: 22px; line-height: 1.5; color: var(--news-ink); }
.news-content h3 { margin: 32px 0 12px; font-size: 18px; line-height: 1.5; color: var(--news-ink); }
.news-content p { margin: 16px 0; }
.news-content ul, .news-content ol { margin: 16px 0; padding-left: 22px; }
.news-content li { margin: 8px 0; }
.news-content a { color: var(--news-brand); text-decoration: none; }
.news-content a:hover { text-decoration: underline; }
.news-content img { max-width: 100%; height: auto; border-radius: 2px; display: block; margin: 20px 0; }
.news-content blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--news-brand);
  background: var(--news-surface-alt);
  color: var(--news-sub);
}
.news-content pre {
  margin: 20px 0;
  padding: 16px;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 2px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.7;
}
.news-content code {
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--news-surface-alt);
  color: var(--news-ink);
  font-size: 13px;
}
.news-content pre code { padding: 0; background: transparent; color: inherit; }
.news-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.news-content th, .news-content td { border: 1px solid var(--news-line); padding: 10px 12px; text-align: left; }
.news-content th { background: var(--news-surface-alt); }

/* 侧栏 */
.news-side { position: sticky; top: 88px; }
.news-side-card {
  border: 1px solid var(--news-line);
  border-radius: var(--news-radius);
  background: #fff;
  padding: 20px;
}
.news-side-card + .news-side-card { margin-top: 16px; }
.news-side-title {
  margin: 0 0 14px;
  color: var(--news-ink);
  font-size: 14px;
  font-weight: 600;
}
.news-side-list { margin: 0; padding: 0; list-style: none; }
.news-side-list li + li { margin-top: 12px; }
.news-side-list a {
  display: block;
  color: var(--news-sub);
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .18s ease;
}
.news-side-list a:hover { color: var(--news-brand); }
.news-side-cta {
  display: block;
  margin-top: 16px;
  padding: 12px;
  border-radius: 2px;
  background: var(--news-brand-soft);
  color: var(--news-brand);
  font-size: 13px;
  text-align: center;
  text-decoration: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1479px) {
  .news-hero-inner,
  .news-body,
  .news-detail-main { width: calc(100% - 64px); }
}
@media (max-width: 1180px) {
  .news-detail-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; }
  .news-hero h1 { font-size: 34px; }
}
@media (max-width: 900px) {
  .news-main { padding-top: 60px; }
  .news-hero-inner,
  .news-body,
  .news-detail-main { width: calc(100% - 32px); }
  .news-hero { padding-top: 48px; }
  .news-hero-inner { padding-bottom: 28px; }
  .news-hero h1 { font-size: 28px; }
  .news-hero-desc { font-size: 14px; }
  .news-body { padding: 28px 0 64px; }
  .news-toolbar { flex-direction: column; align-items: stretch; gap: 14px; }
  .news-search input { width: 100%; }
  .news-search { flex: 1 1 auto; }
  .news-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .news-side { position: static; }
  .news-article h1 { font-size: 24px; }
  .news-content { font-size: 15px; }
}
@media (max-width: 620px) {
  .news-item a {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 20px 4px;
  }
  .news-date {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }
  .news-date b { font-size: 15px; }
  .news-more { display: none; }
  .news-title { font-size: 15px; }
  .news-summary { font-size: 13px; }
  .news-tab { padding: 7px 12px; font-size: 13px; }
}

/* ===== 公告详情：文章目录（锚点导航，2026-11-09） =====
   目录链接是真 <a href="#sec-3">，JS 只做平滑滚动与高亮；
   滚动偏移用 scroll-margin-top，顶栏高度变化不用改 JS。 */
.news-content h1,
.news-content h2,
.news-content h3,
.news-content h4,
.news-content h5,
.news-content h6 { scroll-margin-top: 88px; }

.news-toc {
  overflow: hidden;
  border: 1px solid var(--news-line);
  border-radius: var(--news-radius);
  background: #fff;
}
.news-side > * + * { margin-top: 16px; }

.news-toc-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px;
  border: 0;
  background: none;
  color: var(--news-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.news-toc-caret {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--news-faint);
  transition: transform .2s ease;
}
.news-toc.is-collapsed .news-toc-caret { transform: rotate(-90deg); }

.news-toc-body {
  margin: 0;
  padding: 0 8px 10px;
  max-height: min(46vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.news-toc.is-collapsed .news-toc-body { display: none; }
.news-toc-body li + li { margin-top: 1px; }

/* 缩进由层级差算，不依赖固定是 h2 还是 h3 —— 层级调整后样式自动跟随 */
.news-toc-link {
  display: block;
  padding: 7px 10px 7px calc(10px + (var(--toc-depth, 1) - 1) * 14px);
  border-left: 2px solid transparent;
  border-radius: 0 2px 2px 0;
  color: var(--news-sub);
  font-size: 13px;
  line-height: 1.55;
  text-decoration: none;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.news-toc-link:hover { color: var(--news-brand); background: var(--news-surface-alt); }
.news-toc-link.is-active {
  border-left-color: var(--news-brand);
  background: var(--news-brand-soft);
  color: var(--news-brand);
  font-weight: 600;
}
.news-toc-body li[data-level="1"] .news-toc-link { color: var(--news-ink); font-weight: 600; }
.news-toc-body li[data-level="1"] .news-toc-link.is-active { color: var(--news-brand); }

/* 侧栏里超过视口时自身滚动，目录不跟着漂走 */
@media (min-width: 901px) {
  .news-side {
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

/* 小屏：目录被搬到正文顶部，做成可折叠块 */
.news-article .news-toc { margin: 0 0 24px; }
.news-article .news-toc .news-toc-body { max-height: none; }

.news-side-help { margin: 0; color: var(--news-sub); font-size: 13px; line-height: 1.7; }

@media (max-width: 900px) {
  .news-content h1,
  .news-content h2,
  .news-content h3,
  .news-content h4,
  .news-content h5,
  .news-content h6 { scroll-margin-top: 76px; }
}

/* ===== 右侧避让客服悬浮窗（2026-11-09） =====
   悬浮窗占位：right 18 + width 56 = 距视口右缘 74px。
   本页容器原来只内缩 32px（顶栏是 70px），右缘到 1408，被悬浮窗压住 42px，
   「提交工单」按钮与列表的「阅读全文」都在其中。
   这里按各断点容器自身的左右边距补齐差额，使内容右缘 ≤ 距右缘 74px：
     1480–1627：容器宽 1480 居中，边距 48 → 补 34（余 8px 视觉间隙）
     ≤1479    ：容器宽 100% - 64，边距 32 → 补 50（余 8px 视觉间隙）
     ≥1628    ：边距已 ≥74，不补
     ≤900     ：悬浮窗已收成 48px 圆钮，内容保持通栏
   box-sizing 为 border-box，padding 从宽度内扣除，不影响居中。 */
.news-hero-inner,
.news-body,
.news-detail-main { padding-right: 34px; }

@media (min-width: 1628px) {
  .news-hero-inner,
  .news-body,
  .news-detail-main { padding-right: 0; }
}

@media (max-width: 1479px) {
  .news-hero-inner,
  .news-body,
  .news-detail-main { padding-right: 50px; }
}

@media (max-width: 900px) {
  .news-hero-inner,
  .news-body,
  .news-detail-main { padding-right: 0; }
}
