/* ============================================================
   内容页样式 - 资料库分类页
   ============================================================ */

/* 面包屑 */
.breadcrumb{
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.breadcrumb-list{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-mute);
  font-family: var(--mono);
  letter-spacing: .02em;
}
.breadcrumb-list a{
  color: var(--ink-soft);
  transition: color .2s;
}
.breadcrumb-list a:hover{color: var(--gold)}
.breadcrumb-list .sep{
  margin: 0 8px;
  color: var(--ink-mute);
  opacity: .5;
}
.breadcrumb-list [aria-current]{color: var(--gold)}

/* 内容页头部 */
.doc-hero{
  position: relative;
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.doc-hero::before{
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--gold-glow), transparent 60%);
  filter: blur(50px);
}
.doc-hero-grid{
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}
.doc-tag{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-soft);
  color: var(--gold);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  margin-bottom: 20px;
}
.doc-hero h1{
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  margin-bottom: 18px;
  max-width: 800px;
}
.doc-hero .doc-summary{
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 720px;
  margin-bottom: 20px;
}
.doc-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-mute);
}
.doc-meta span{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.doc-meta strong{
  color: var(--gold);
  font-weight: 600;
}

/* 文档主体两栏布局 */
.doc-main{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 24px 100px;
  align-items: start;
}

/* 侧边目录 */
.doc-toc{
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 8px;
}
.doc-toc h4{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
  font-weight: 600;
}
.toc-tree{
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.toc-tree li{margin-bottom: 4px}
.toc-tree a{
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 6px;
  line-height: 1.5;
  transition: all .2s;
  position: relative;
  margin-left: -19px;
  padding-left: 19px;
}
.toc-tree a:hover{
  color: var(--ink);
  background: rgba(255,255,255,.03);
}
.toc-tree a.active{
  color: var(--gold);
  background: var(--gold-glow);
  border-left: 2px solid var(--gold);
  padding-left: 17px;
}
.toc-tree .toc-sub{
  margin: 4px 0 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc-tree .toc-sub a{
  font-size: 12.5px;
  padding: 4px 12px;
  color: var(--ink-mute);
}

.toc-divider{
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.toc-back{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  transition: color .2s;
}
.toc-back:hover{color: var(--gold)}

/* 文档内容区 */
.doc-content{
  max-width: 820px;
  min-width: 0;
}

/* 阅读进度 */
.read-progress{
  position: fixed;
  top: 64px; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 95;
}
.read-progress i{
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), #f0c97a);
  transition: width .1s linear;
}

/* 章节 */
.section-block{
  margin-bottom: 56px;
  scroll-margin-top: 90px;
}
.section-block:last-child{margin-bottom: 0}

.section-block > h2{
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.015em;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.section-block > h2::before{
  content: "";
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--gold), var(--gold-soft));
  border-radius: 2px;
  flex-shrink: 0;
}
.section-block > .section-intro{
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 28px;
}

/* 知识点卡片 */
.kp-card{
  background: linear-gradient(160deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px 30px;
  margin-bottom: 20px;
  scroll-margin-top: 90px;
  transition: border-color .25s;
}
.kp-card:hover{border-color: var(--line-strong)}

.kp-card h3{
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 14px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.kp-card h3 .kp-num{
  font-family: var(--mono);
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
}
.kp-card p{
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
  margin-bottom: 14px;
}
.kp-card p:last-child{margin-bottom: 0}
.kp-card strong{color: var(--ink); font-weight: 700}

/* 图文模块 - 占位 */
.fig{
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-1);
  overflow: hidden;
}
.fig-image{
  background:
    linear-gradient(135deg, rgba(59,130,246,.06), rgba(212,168,87,.04)),
    var(--bg-2);
  min-height: 220px;
  display: grid;
  place-items: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.fig-image svg{
  width: 100%;
  max-width: 520px;
  height: auto;
}
.fig-caption{
  padding: 14px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.fig-caption .fig-label{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  background: var(--gold-glow);
  color: var(--gold);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
}
.fig-caption .fig-text{
  color: var(--ink-soft);
  line-height: 1.5;
}

/* 步骤条 */
.step-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.step-item{
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  align-items: start;
}
.step-item .step-n{
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--gold-glow);
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.step-item .step-t{
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--ink);
}
.step-item .step-d{
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
}

/* 对比表 */
.cmp-table{
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.cmp-table th, .cmp-table td{
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.cmp-table th{
  background: rgba(255,255,255,.04);
  color: var(--gold);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .03em;
}
.cmp-table tr:last-child td{border-bottom: none}
.cmp-table td{color: var(--ink-soft); line-height: 1.65}
.cmp-table td:first-child{color: var(--ink); font-weight: 600}

/* 警示 / 提示框 */
.callout{
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: var(--r-sm);
  border-left: 3px solid;
  font-size: 14.5px;
  line-height: 1.7;
}
.callout-tip{
  background: rgba(52,211,153,.06);
  border-color: var(--green);
  color: var(--ink);
}
.callout-warn{
  background: rgba(248,113,113,.06);
  border-color: var(--red);
  color: var(--ink);
}
.callout-info{
  background: rgba(59,130,246,.06);
  border-color: var(--blue);
  color: var(--ink);
}
.callout strong{
  display: block;
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 700;
}
.callout-tip strong{color: var(--green)}
.callout-warn strong{color: var(--red)}
.callout-info strong{color: var(--blue)}

/* 清单 */
.bullet-list{
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bullet-list li{
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
  padding-left: 22px;
  position: relative;
}
.bullet-list li::before{
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
}
.bullet-list strong{color: var(--ink); font-weight: 700}

/* 折叠区块 */
details.fold{
  margin: 16px 0;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
details.fold summary{
  list-style: none;
  cursor: pointer;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.fold summary::-webkit-details-marker{display: none}
details.fold summary::after{
  content: "▼";
  font-size: 11px;
  color: var(--ink-mute);
  transition: transform .25s;
}
details.fold[open] summary::after{transform: rotate(180deg)}
details.fold .fold-body{
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* 上下页导航 */
.doc-nav{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.doc-nav a, .doc-nav .empty{
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 24px;
  transition: all .25s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.doc-nav .empty{background: transparent; border-color: transparent}
.doc-nav a:hover{
  background: rgba(255,255,255,.04);
  border-color: var(--gold-soft);
  transform: translateY(-2px);
}
.doc-nav .nl{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.doc-nav .nt{
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}
.doc-nav .nav-prev{text-align: left}
.doc-nav .nav-next{text-align: right; align-items: flex-end}

/* 章节内嵌 CTA */
.inline-cta{
  margin: 32px 0;
  padding: 28px 32px;
  background:
    linear-gradient(135deg, var(--gold-glow), transparent 70%),
    rgba(255,255,255,.02);
  border: 1px solid var(--gold-soft);
  border-radius: var(--r);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.inline-cta .ic-text h4{
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.inline-cta .ic-text p{
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* 响应式 */
@media (max-width: 1024px){
  .doc-main{
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .doc-toc{
    position: static;
    max-height: none;
    order: -1;
    background: rgba(255,255,255,.02);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 24px;
  }
  .toc-tree{border-left: none; padding-left: 0}
  .toc-tree a{margin-left: 0; padding-left: 12px}
  .doc-content{max-width: none}
}

@media (max-width: 720px){
  .doc-hero{padding: 36px 0 24px}
  .doc-hero-grid{grid-template-columns: 1fr}
  .doc-main{padding: 40px 20px 60px}
  .kp-card{padding: 22px}
  .kp-card h3{font-size: 17px; flex-wrap: wrap}
  .doc-nav{grid-template-columns: 1fr}
  .nav-next{text-align: left; align-items: flex-start}
  .cmp-table{font-size: 13px; display: block; overflow-x: auto}
  .inline-cta{flex-direction: column; align-items: flex-start}
  .read-progress{top: 56px}
  .section-block > h2::before{height: 18px}
}
