/* 更新日志前台样式（挂载在 guide-single 骨架上；严格 CSP，无内联样式） */

.cl-loading,
.cl-empty {
  padding: 28px 12px;
  text-align: center;
  color: #8a7a63;
  font-size: 14.5px;
}

.cl-error-box {
  padding: 24px 18px;
  text-align: center;
  border: 1.5px dashed #e2c5b8;
  border-radius: 14px;
  background: #fff8f5;
  color: #8f3b28;
}

.cl-error-box p {
  margin: 0 0 14px;
}

/* ---------------- 目录列表视图 ---------------- */
.cl-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.cl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border: 2px solid #e7d9bd;
  border-radius: 14px;
  background: #fffdf6;
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.cl-item:hover,
.cl-item:focus-visible {
  transform: translateY(-2px);
  border-color: #3b9c5e;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(47, 130, 75, 0.12);
  outline: none;
}

.cl-item-main {
  flex: 1;
  min-width: 0;
}

.cl-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.cl-date {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #9b5c29;
  background: #f7ecd7;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

.cl-badge-new {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2f9e5b, #1f7a6b);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

.cl-len {
  font-size: 12px;
  color: #8a7860;
  white-space: nowrap;
}

.cl-item-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.5;
  color: #4f3418;
  word-break: break-word;
}

.cl-item:hover .cl-item-title {
  color: #216e3d;
}

.cl-item-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #277344;
  background: #edf7ee;
  border: 1.5px solid #c7e5cc;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.cl-item:hover .cl-item-cta {
  background: #2f9e5b;
  border-color: #2f9e5b;
  color: #fff;
}

/* ---------------- 分页条 ---------------- */
.cl-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed #e2d4b7;
}

.cl-pager-info {
  font-size: 13.5px;
  font-weight: 700;
  color: #6b5438;
}

.cl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 15px;
  border: 1.5px solid #d7c39d;
  border-radius: 999px;
  background: #fffaf0;
  color: #5b3d1e;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cl-btn:hover:not(:disabled) {
  background: #f2e4c7;
  border-color: #bd9a62;
  color: #3f2810;
}

.cl-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cl-btn-primary {
  background: #2f9e5b;
  border-color: #248248;
  color: #fff;
}

.cl-btn-primary:hover:not(:disabled) {
  background: #25844b;
  border-color: #1d6d3d;
  color: #fff;
}

.cl-btn-copied {
  background: #edf7ee;
  border-color: #68b882;
  color: #1f6b3b;
}

/* ---------------- 单篇阅读视图 ---------------- */
.cl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e2d4b7;
}

.cl-article {
  border: 2px solid #e7d9bd;
  border-radius: 16px;
  background: #fffdf8;
  padding: 22px 24px 24px;
}

.cl-article-head {
  border-bottom: 1.5px solid #efe3ca;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.guide-body h3.cl-article-title {
  margin: 0 0 10px;
  padding-left: 0;
  border-left: none;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.45;
  color: #4a2f14;
  word-break: break-word;
}

.cl-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #7d6950;
}

/* 本篇小节快速导航 */
.cl-toc {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8f3e6;
  border: 1px solid #e6d8bc;
}

.cl-toc-title {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #7a5c38;
}

.cl-toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.cl-toc-btn {
  padding: 4px 10px;
  border: 1px solid #dccba7;
  border-radius: 999px;
  background: #fffdf8;
  color: #5a3e1f;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.cl-toc-btn:hover {
  background: #edf7ee;
  border-color: #55a870;
  color: #1f6b3b;
}

/* 正文排版 */
.cl-article-body {
  font-size: 15px;
  line-height: 1.88;
  color: #3f301e;
  word-break: break-word;
}

.guide-body h4.cl-sec-title {
  display: block;
  margin: 22px 0 10px;
  padding: 4px 0 4px 12px;
  border-left: 4px solid #e09f3e;
  background: linear-gradient(90deg, rgba(247, 236, 215, 0.72), transparent);
  border-radius: 0 8px 8px 0;
  color: #7c3f14;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  scroll-margin-top: 84px;
}

.guide-body h4.cl-sec-title::before {
  content: none;
  display: none;
}

.cl-article-body > .cl-sec-title:first-child {
  margin-top: 4px;
}

.cl-article-body p {
  margin: 7px 0;
}

.cl-article-body p.cl-bullet {
  position: relative;
  padding-left: 18px;
}

.cl-article-body p.cl-bullet::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 0;
  color: #2f9e5b;
  font-weight: 800;
}

.cl-inline-tag {
  color: #8c4a1f;
  font-weight: 800;
}

.cl-gap {
  height: 8px;
}

/* 上一篇 / 下一篇 */
.cl-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.cl-nav-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 15px;
  border: 1.5px solid #e5d6b8;
  border-radius: 12px;
  background: #fffdf7;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cl-nav-card:hover {
  border-color: #3b9c5e;
  background: #fff;
}

.cl-nav-card.is-empty {
  opacity: 0.55;
  pointer-events: none;
}

.cl-nav-label {
  font-size: 12px;
  font-weight: 700;
  color: #8c7355;
}

.cl-nav-title {
  font-size: 14px;
  font-weight: 700;
  color: #4f3418;
  line-height: 1.45;
  word-break: break-word;
}

.cl-nav-card:hover .cl-nav-title {
  color: #216e3d;
}

.cl-detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #e2d4b7;
}

.cl-sr-copy {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 720px) {
  .cl-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 13px 14px;
  }

  .cl-item-cta {
    align-self: flex-start;
  }

  .cl-article {
    padding: 16px 14px 18px;
  }

  .guide-body h3.cl-article-title {
    font-size: 18.5px;
  }

  .cl-nav-grid {
    grid-template-columns: 1fr;
  }
}
