/* ===========================================================
   文章页样式（依赖 style.css 的变量与基础样式）
   =========================================================== */

/* ---------------- 文章页 Header（浅底深字） ---------------- */
.page--article { background: var(--paper); color: var(--ink); }
.page--article .header { background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line-light); }
.page--article .header.is-stuck { background: #fff; border-bottom-color: var(--line-light); }
.page--article .nav a { color: rgba(43, 54, 60, .72); }
.page--article .nav a:hover,
.page--article .nav a.is-active { color: #0F1D24; }
.page--article .logo__cn { color: #0F1D24; border-left-color: var(--line-light); }

/* ---------------- 文章头图区 ---------------- */
.art-hero {
  position: relative; overflow: hidden; color: var(--txt-dark);
  background: linear-gradient(120deg, #12303C, #0F1D24 62%);
  padding: 58px 0 62px;
}
.art-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(760px 380px at 88% 8%, rgba(0, 120, 190, .38), transparent 62%),
    radial-gradient(620px 340px at 4% 96%, rgba(233, 114, 24, .2), transparent 62%);
}
.art-hero .wrap { position: relative; z-index: 1; }

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(234, 241, 245, .66); margin-bottom: 20px; }
.crumbs a:hover { color: #fff; }
.crumbs__sep { opacity: .45; }

.art-tag {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
  color: #FFC08A; background: rgba(233, 114, 24, .16);
  border: 1px solid rgba(233, 114, 24, .4);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.art-hero h1 { font-size: clamp(27px, 3.9vw, 46px); max-width: 20em; }
.art-lead { margin-top: 20px; font-size: 17px; color: rgba(234, 241, 245, .7); max-width: 46em; line-height: 1.85; }
.art-meta {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px;
  font-size: 13.5px; color: rgba(234, 241, 245, .58);
}
.art-meta b { color: rgba(234, 241, 245, .8); font-weight: 600; }

/* ---------------- 正文 ---------------- */
.post { padding: 56px 0 84px; }
.post__grid { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 56px; align-items: start; }
.post__body { max-width: 780px; }

.post__body p { font-size: 16.5px; line-height: 1.92; color: rgba(43, 54, 60, .88); margin: 18px 0; }
.post__body h2 {
  font-size: clamp(22px, 2.4vw, 27px); color: #0B1B22; margin: 46px 0 14px;
  padding-left: 14px; border-left: 4px solid var(--blue); line-height: 1.4;
}
.post__body h3 { font-size: 19px; color: #14262E; margin: 30px 0 10px; }
.post__body a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(0, 120, 190, .35); }
.post__body strong { color: #0B1B22; }

.post__body ul { margin: 18px 0; display: grid; gap: 10px; }
.post__body ul li {
  position: relative; padding-left: 26px; font-size: 16px; line-height: 1.85;
  color: rgba(43, 54, 60, .86);
}
.post__body ul > li::before {
  content: ""; position: absolute; left: 4px; top: 11px; width: 8px; height: 8px;
  background: var(--orange); border-radius: 50%;
}
.post__body ol { margin: 18px 0; padding-left: 24px; }
.post__body ol li { font-size: 16px; line-height: 1.85; color: rgba(43, 54, 60, .86); margin-bottom: 8px; }
.post__body ol li::marker { color: var(--orange); font-weight: 700; }

.formula {
  margin: 22px 0; padding: 18px 22px; background: #fff;
  border: 1px solid var(--line-light); border-left: 3px solid var(--blue);
  border-radius: 12px; font-size: 16px; color: #12333F;
  font-family: "Cambria Math", "Times New Roman", Georgia, serif;
  line-height: 1.9;
}
.formula span { display: block; margin-top: 6px; font-family: var(--font); font-size: 14px; color: var(--txt-ink-dim); }

.box {
  margin: 26px 0; padding: 22px 26px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line-light);
}
.box--tip { border-left: 4px solid var(--orange); }
.box--note { border-left: 4px solid var(--blue); background: #F7FAFC; }
.box h4 { font-size: 15.5px; margin-bottom: 10px; color: #0B1B22; letter-spacing: .02em; }
.box p, .box li { font-size: 15.5px; color: rgba(43, 54, 60, .82); line-height: 1.85; }
.box ul.tick li::before { top: 10px; }

.figure { margin: 28px 0; }
.figure img { width: 100%; border-radius: 14px; box-shadow: 0 18px 44px rgba(43, 54, 60, .16); }
.figure figcaption { margin-top: 10px; font-size: 13.5px; color: rgba(43, 54, 60, .74); text-align: center; }

.post__body table.data {
  width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15.5px;
}
.post__body table.data th, .post__body table.data td {
  border: 1px solid var(--line-light); padding: 11px 14px; text-align: left; vertical-align: top;
}
.post__body table.data th { background: #E7EEF3; color: #0B1B22; font-weight: 700; }
.post__body table.data td { color: rgba(43, 54, 60, .84); }
.post__body table.data tr:nth-child(even) td { background: #FAFCFD; }

/* ---------------- 侧栏目录 ---------------- */
.toc { position: sticky; top: 96px; }
.toc__title { font-size: 13px; letter-spacing: .12em; color: rgba(43, 54, 60, .58); margin-bottom: 12px; font-weight: 700; }
.toc ol { counter-reset: t; display: grid; gap: 2px; padding: 0; margin: 0; list-style: none; }
.toc li { counter-increment: t; }
.toc a {
  display: block; padding: 8px 12px; font-size: 14.2px; line-height: 1.6;
  color: rgba(43, 54, 60, .76); border-left: 2px solid var(--line-light); border-radius: 0 8px 8px 0;
  transition: .2s;
}
.toc a:hover, .toc a.is-active { color: #0B1B22; background: #fff; border-left-color: var(--orange); }
.toc a::before { content: counter(t) ". "; color: rgba(43, 54, 60, .48); }

/* ---------------- FAQ ---------------- */
.faq { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line-light); }
.faq h2 { border-left-color: var(--orange); }
.faq details {
  border: 1px solid var(--line-light); border-radius: 12px; background: #fff;
  margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 16px 20px; font-size: 16px; font-weight: 600; color: #0B1B22;
  list-style: none; position: relative; padding-right: 46px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 22px;
  width: 8px; height: 8px; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 20px 18px; font-size: 15.5px; color: rgba(43, 54, 60, .8); margin: 0; }

/* ---------------- 文末 CTA ---------------- */
.post__cta {
  margin-top: 56px; padding: 34px 36px; border-radius: 18px; color: var(--txt-dark);
  background: linear-gradient(120deg, #12303C, #0F1D24 70%);
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.post__cta h3 { font-size: 22px; margin-bottom: 8px; }
.post__cta p { font-size: 15px; color: rgba(234, 241, 245, .66); max-width: 34em; }

/* ---------------- 相关阅读 ---------------- */
.related { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line-light); }
.related h2 { border-left-color: var(--blue); }
.related__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.related a {
  display: block; padding: 20px 22px; background: #fff; border: 1px solid var(--line-light);
  border-radius: 14px; transition: .25s;
}
.related a:hover { transform: translateY(-3px); border-color: rgba(0, 120, 190, .45); box-shadow: 0 14px 34px rgba(43, 54, 60, .1); }
.related strong { display: block; font-size: 16px; color: #0B1B22; line-height: 1.5; margin-bottom: 8px; }
.related span { font-size: 14px; color: rgba(43, 54, 60, .6); }

/* ---------------- 首页「技术洞察」区块 ---------------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.post-card {
  display: flex; flex-direction: column; background: var(--bg-2);
  border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden;
  transition: .25s;
}
.post-card:hover { transform: translateY(-4px); border-color: rgba(0, 120, 190, .5); background: var(--bg-3); }
.post-card__top { padding: 24px 26px 0; display: flex; align-items: center; gap: 12px; }
.post-card__cat {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #FFC08A;
  background: rgba(233, 114, 24, .14); border: 1px solid rgba(233, 114, 24, .34);
  padding: 4px 10px; border-radius: 999px;
}
.post-card__date { font-size: 12.5px; color: rgba(234, 241, 245, .58); }
.post-card h3 { font-size: 19px; line-height: 1.5; padding: 14px 26px 0; }
.post-card p { font-size: 14.5px; color: var(--txt-dim); line-height: 1.8; padding: 12px 26px 0; flex: 1; }
.post-card__more {
  padding: 20px 26px 24px; font-size: 14px; font-weight: 600; color: var(--orange-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.post-card__more::after { content: "→"; transition: transform .2s; }
.post-card:hover .post-card__more::after { transform: translateX(4px); }

/* ---------------- 浅底栏目页中复用的深底组件（显式配色，避免继承深色正文） ---------------- */
.page--article .spec th,
.page--article .spec td { border-bottom-color: var(--line-light); }
.page--article .spec th { color: var(--txt-ink-dim); }
.page--article .spec td { color: var(--ink); }
.page--article .spec tr:first-child th,
.page--article .spec tr:first-child td { border-top-color: var(--line-light); }

.page--article .coilcard,
.page--article .svc,
.page--article .svc--cta,
.page--article .post-card { color: var(--txt-dark); }
.page--article .svc p,
.page--article .coilcard p,
.page--article .post-card p { color: rgba(234, 241, 245, .82); }
.page--article .coilcard h4,
.page--article .svc h3,
.page--article .post-card h3 { color: #fff; }
.page--article .prod__sub { color: var(--txt-ink-dim); }

/* 窄内容栏内复用首页多列栅格时改为两列/单列，避免文字被压成窄条 */
@media (min-width: 901px) {
  .page--article .apps { grid-template-columns: 1fr; }
  .page--article .app { grid-template-columns: 210px 1fr; }
  .page--article .posts { grid-template-columns: repeat(2, 1fr); }
  .page--article .svcs { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .posts { grid-template-columns: repeat(2, 1fr); }
  .post__grid { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  /* 文章页无汉堡菜单，窄屏直接隐藏导航，页脚保留返回首页入口 */
  .page--article .nav { display: none; }
}
@media (max-width: 680px) {
  .posts { grid-template-columns: 1fr; }
  .art-hero { padding: 44px 0 48px; }
  .post { padding: 40px 0 60px; }
  .post__body h2 { margin-top: 36px; }
  .related__grid { grid-template-columns: 1fr; }
  .post__cta { padding: 26px 22px; }
}
