@charset "utf-8";
/* ============================================================
   pages/article.css — 案例详情 / 观点详情共用
   面包屑、标题区、图集、目录、正文排版、操作条、延伸阅读
   ============================================================ */

/* ---------- 1. 头部 ---------- */
.crumb-bar {
  padding-top: calc(var(--header-h) + 10px);
}

.entry-head {
  padding-top: 26px;
  padding-bottom: 34px;
}

.entry-title {
  max-width: 1180px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.4;
}

.entry-title--news {
  max-width: 1100px;
  font-size: 30px;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 13px;
}

.entry-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- 2. 图集 ---------- */
.gallery {
  position: relative;
  margin-bottom: 50px;
}

.gallery__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 4px;
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

.gallery__track.is-drag {
  scroll-snap-type: none;
  cursor: grabbing;
}

.gallery__item {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: var(--paper-dim);
}

.slide-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.slide-dots__dot {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.slide-dots__dot span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfd2dd;
  transition:
    width 0.3s var(--ease),
    background-color 0.3s var(--ease);
}

.slide-dots__dot.is-current span {
  width: 18px;
  border-radius: 3px;
  background: var(--brand);
}

/* ---------- 3. 两栏：目录 + 正文 ---------- */
.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  align-items: start;
}

.entry-toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding-right: 60px;
}

.toc__title {
  color: #a4a7b4;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toc__item + .toc__item {
  margin-top: 2px;
}

.toc__link {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 6px;
  padding: 9px 0 9px 10px;
  border-left: 2px solid transparent;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.5;
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.toc__no {
  color: #b8bac6;
  font-variant-numeric: tabular-nums;
}

/* 目录条目保持单行，长标题省略，避免把整列撑成两行 */
.toc__text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.toc__link:hover {
  color: var(--brand);
}

.toc__link.is-current {
  border-left-color: var(--brand);
  color: var(--brand);
}

.toc__link.is-current .toc__no {
  color: var(--brand);
}

/* ---------- 4. 正文排版 ---------- */
.prose {
  max-width: 990px;
  color: #4d4d4d;
  font-size: 16px;
  line-height: 2;
}

.prose > p {
  margin-bottom: 26px;
}

.prose h2 {
  scroll-margin-top: calc(var(--header-h) + 24px);
  margin: 46px 0 20px;
  color: #000;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.6;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul {
  margin: 0 0 26px;
  padding-left: 4px;
}

.prose li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.prose li::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.prose__summary {
  margin-bottom: 30px;
  padding: 24px 26px;
  border-left: 3px solid var(--brand);
  background: #f7f8fc;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
}

.prose__hero {
  margin-bottom: 32px;
}

.prose__hero img {
  width: 100%;
  border-radius: 4px;
}

/* ---------- 5. 操作条 ---------- */
.entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 46px;
  padding-top: 30px;
  border-top: 1px solid var(--line-soft);
}

.like {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-3);
  font-size: 14px;
  transition:
    border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.like:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.like.is-on {
  border-color: var(--brand);
  color: var(--brand);
}

.like__heart {
  font-size: 15px;
  line-height: 1;
}

/* ---------- 6. 延伸阅读 ---------- */
.related {
  padding-top: 60px;
  border-top: 1px solid var(--line-soft);
}

.related__title {
  color: var(--ink-2);
  font-size: 22px;
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
}

.related__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 20px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: #fff;
  transition:
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.related__card:hover {
  transform: translateY(-3px);
  border-color: rgba(23, 45, 231, 0.3);
}

.related__kicker {
  color: var(--brand);
  font-size: 12px;
}

.related__name {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

.related__more {
  margin-top: auto;
  padding-top: 22px;
}

/* ---------- 7. 响应式 ---------- */
@media (max-width: 1440px) {
  .entry-title {
    font-size: 30px;
  }

  .entry-title--news {
    font-size: 27px;
  }

  .entry-toc {
    padding-right: 40px;
  }
}

@media (max-width: 1200px) {
  .entry-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-toc {
    position: static;
    padding: 0 0 30px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 30px;
  }

  .toc {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
  }

  .prose {
    max-width: none;
  }

  .related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .crumb-bar {
    padding-top: calc(var(--header-h) + 4px);
  }

  .entry-head {
    padding-top: 16px;
    padding-bottom: 22px;
  }

  .entry-title {
    font-size: 22px;
    line-height: 1.45;
  }

  .entry-title--news {
    font-size: 21px;
  }

  .entry-meta {
    margin-top: 12px;
    font-size: 12px;
    gap: 12px;
  }

  .gallery {
    margin-bottom: 30px;
  }

  .gallery__track {
    gap: 10px;
  }

  .prose {
    font-size: 15px;
    line-height: 1.95;
  }

  .prose > p {
    margin-bottom: 20px;
  }

  .prose h2 {
    margin: 32px 0 14px;
    font-size: 19px;
  }

  .prose li::before {
    top: 12px;
  }

  .prose__summary {
    padding: 16px 18px;
    font-size: 14px;
  }

  .toc {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-actions {
    margin-top: 32px;
    padding-top: 22px;
  }

  .related {
    padding-top: 40px;
  }

  .related__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}
