/* ==========================================================================
   暖流官网 · 新闻与知识详情页
   2026-10-29

   排版依据（对比深度智控 /news/26 与宁德时代 /news/10337.html 后取舍）：
   - 结构完整性取深度智控：面包屑、分类、日期、小标题层级、相关阅读、上下篇
   - 阅读克制取宁德时代：无咨询浮窗、无社交分享图标墙、无弹窗遮挡
   - 正文列宽取中间值 760px：宁德 370px 过长文换行太频，深度 670px 略窄
   - 侧边栏不做：暖流月更一两篇，侧栏会常年空着，改文末相关阅读
   ========================================================================== */

.nd-page {
  background: #fff;
}

/* 主站导航是 position:fixed，普通页面靠 pagehead 大图让位，
   详情页没有 banner，必须自己留出导航高度，否则面包屑会被压住。 */
.nd-page main { padding-top: var(--nav-h, 78px); }

.nd-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px 96px;
}

/* ---------- 面包屑 ---------- */
.nd-crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 0 0;
  font-size: 13px;
  color: #949baa;
  letter-spacing: 0.01em;
}
.nd-crumb a {
  color: #717d98;
  text-decoration: none;
  transition: color 0.16s ease;
}
.nd-crumb a:hover { color: #C96A00; }
.nd-crumb span { color: #c6cbd4; }
.nd-crumb em {
  font-style: normal;
  color: #3b486d;
}

/* ---------- 标题区 ---------- */
.nd-head {
  padding: 34px 0 0;
}

.nd-cat {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #C96A00;
}
.nd-cat::after {
  content: "";
  width: 26px;
  height: 1px;
  background: #F08300;
  opacity: 0.55;
}

.nd-title {
  margin: 16px 0 0;
  font-size: clamp(26px, 3.1vw, 36px);
  line-height: 1.4;
  font-weight: 600;
  color: #1a284d;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.nd-summary {
  margin: 20px 0 0;
  font-size: 16.5px;
  line-height: 1.85;
  color: #5a698c;
}

.nd-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  font-size: 13px;
  color: #8a91a2;
}
.nd-meta i {
  width: 1px;
  height: 11px;
  background: #dce0e7;
}

/* ---------- 封面 ---------- */
.nd-cover {
  margin: 38px 0 0;
}
.nd-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ---------- 目录（正文 h2 达 4 个才出现） ---------- */
.nd-toc {
  margin: 38px 0 0;
  padding: 22px 26px;
  background: #f8f9fb;
  border-radius: 6px;
}
.nd-toc-t {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #8a91a2;
}
.nd-toc ol {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 32px;
}
.nd-toc li {
  font-size: 14px;
  line-height: 1.9;
  color: #3b486d;
  break-inside: avoid;
}
.nd-toc a {
  color: #3b486d;
  text-decoration: none;
}
.nd-toc a:hover { color: #C96A00; }

/* ---------- 正文 ---------- */
.nd-body {
  margin-top: 44px;
  font-size: 17px;
  line-height: 1.95;
  color: #253256;
  letter-spacing: 0.012em;
  word-break: break-word;
  overflow-wrap: break-word;
}
.nd-toc + .nd-body { margin-top: 30px; }

.nd-body p {
  margin: 0 0 1.55em;
}
.nd-body p:last-child { margin-bottom: 0; }

.nd-body h2 {
  position: relative;
  margin: 2.3em 0 0.85em;
  padding-left: 15px;
  font-size: 23px;
  line-height: 1.55;
  font-weight: 600;
  color: #1a284d;
}
.nd-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 3px;
  height: 0.95em;
  border-radius: 2px;
  background: #F08300;
}

.nd-body h3 {
  margin: 1.9em 0 0.7em;
  font-size: 18.5px;
  line-height: 1.6;
  font-weight: 600;
  color: #1a284d;
}

.nd-body strong { color: #192443; font-weight: 600; }

.nd-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 1.9em auto;
  border-radius: 4px;
  cursor: zoom-in;
}

.nd-body a {
  color: #1647cc;
  text-decoration: none;
  border-bottom: 1px solid rgba(22,71,204, 0.28);
  transition: border-color 0.16s ease;
}
.nd-body a:hover { border-bottom-color: #1647cc; }

.nd-body blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid #e2e5eb;
  color: #5a698c;
}
.nd-body blockquote p:last-child { margin-bottom: 0; }

.nd-body ul,
.nd-body ol {
  margin: 0 0 1.55em;
  padding-left: 1.35em;
}
.nd-body li { margin-bottom: 0.55em; }
.nd-body li:last-child { margin-bottom: 0; }

.nd-body hr {
  margin: 2.6em 0;
  border: 0;
  border-top: 1px solid #edeff4;
}

.nd-body figcaption {
  margin: -1.2em auto 2em;
  font-size: 13.5px;
  line-height: 1.8;
  color: #8a91a2;
  text-align: center;
}

/* 紧跟图片、被括号包住的短句 —— 清洗器自动识别的图注 */
.nd-body .nd-figcap {
  margin: -1.1em 0 2em;
  font-size: 13.5px;
  line-height: 1.8;
  color: #8a91a2;
  text-align: center;
}

.nd-body code {
  padding: 2px 6px;
  font-size: 0.88em;
  border-radius: 3px;
  background: #f2f4f7;
  color: #253256;
}
.nd-body pre {
  margin: 1.6em 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: 5px;
  background: #f6f7f9;
  font-size: 14px;
  line-height: 1.75;
}
.nd-body pre code { padding: 0; background: none; }

.nl-table-wrap {
  margin: 1.9em 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nd-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.75;
}
.nd-body th,
.nd-body td {
  padding: 11px 14px;
  border: 1px solid #e6e8ed;
  text-align: left;
  vertical-align: top;
}
.nd-body th {
  background: #f7f8fa;
  font-weight: 600;
  color: #1a284d;
  white-space: nowrap;
}

/* ---------- 文末 ---------- */
.nd-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid #edeff4;
}

.nd-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nd-tags span {
  padding: 5px 12px;
  font-size: 12.5px;
  color: #5a698c;
  background: #f3f5f8;
  border-radius: 20px;
}

.nd-share {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nd-copy,
.nd-back {
  padding: 9px 18px;
  font-size: 13px;
  font-family: inherit;
  color: #3b486d;
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.nd-copy:hover,
.nd-back:hover {
  color: #C96A00;
  border-color: #F0C79A;
}
.nd-copy.is-done {
  color: #2E7D4F;
  border-color: #BFDCCB;
}

/* ---------- 上下篇 ---------- */
.nd-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 44px;
}
.nd-pager-item {
  display: block;
  padding: 18px 20px;
  border: 1px solid #e9ecf2;
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.nd-pager-item span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  color: #949baa;
  letter-spacing: 0.06em;
}
.nd-pager-item b {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.6;
  color: #253256;
}
.nd-pager-item:hover {
  border-color: #F0C79A;
  background: #FFFCF8;
}
.nd-pager-item:hover b { color: #C96A00; }
.nd-pager-next { text-align: right; }
.nd-pager-item.is-empty {
  border: 0;
  background: none;
  pointer-events: none;
}

/* ---------- 相关阅读 ---------- */
.nd-related {
  margin-top: 72px;
  padding-top: 36px;
  border-top: 1px solid #edeff4;
}
.nd-related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.nd-related-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #1a284d;
  letter-spacing: 0.02em;
}
.nd-related-head a {
  font-size: 13px;
  color: #717d98;
  text-decoration: none;
  transition: color 0.16s ease;
}
.nd-related-head a:hover { color: #C96A00; }

.nd-rel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.nd-rel-card {
  display: block;
  text-decoration: none;
}
.nd-rel-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 5px;
  background: #f1f3f7;
}
.nd-rel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.nd-rel-card:hover .nd-rel-thumb img { transform: scale(1.035); }
.nd-rel-thumb--none {
  background: linear-gradient(135deg, #edf1fa, #f7f9fd);
}
.nd-rel-txt { padding-top: 13px; }
.nd-rel-cat {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: #C96A00;
}
.nd-rel-txt h3 {
  margin: 7px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.65;
  color: #253256;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.16s ease;
}
.nd-rel-card:hover .nd-rel-txt h3 { color: #C96A00; }
.nd-rel-date {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #9da4b3;
}

/* ---------- 图片放大 ---------- */
.nd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(14,21,42, 0.93);
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.nd-lightbox.on {
  opacity: 1;
  pointer-events: auto;
}
.nd-lightbox img {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.nd-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 1;
  color: #eaeef7;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .nd-wrap { padding: 0 22px 72px; }
  .nd-body { font-size: 16px; line-height: 1.9; }
  .nd-body h2 { font-size: 20px; }
  .nd-body h3 { font-size: 17px; }
  .nd-rel-grid { grid-template-columns: 1fr; gap: 20px; }
  .nd-rel-thumb { aspect-ratio: 16 / 9; }
  .nd-toc ol { columns: 1; }
  .nd-toc { padding: 18px 20px; }
}

@media (max-width: 620px) {
  .nd-crumb { padding-top: 20px; font-size: 12.5px; }
  .nd-head { padding-top: 24px; }
  .nd-title { font-size: 24px; line-height: 1.45; }
  .nd-summary { font-size: 15px; margin-top: 16px; }
  .nd-cover { margin-top: 28px; }
  .nd-cover img { border-radius: 3px; }
  .nd-body { margin-top: 32px; font-size: 15.5px; line-height: 1.92; }
  .nd-body h2 { margin-top: 2em; }
  .nd-pager { grid-template-columns: 1fr; }
  .nd-pager-next { text-align: left; }
  .nd-pager-item.is-empty { display: none; }
  .nd-foot { margin-top: 40px; }
  .nd-related { margin-top: 52px; }
  .nd-related-head h2 { font-size: 16px; }
}

/* 打印：去掉导航与侧饰，只留文章 */
@media print {
  .nav, .drawer, .mcta, footer, .nd-crumb, .nd-share,
  .nd-pager, .nd-related, .nd-toc, #nl-consent { display: none !important; }
  .nd-wrap { max-width: none; padding: 0; }
  .nd-body { font-size: 11pt; }
}
