/* 专题区：配合 Butterfly 的卡片风格 */
.topic-page {
  --tp-card: #fff;
  --tp-text: #1f2d3d;
  --tp-muted: #6b7280;
  --tp-line: rgba(0, 0, 0, 0.06);
  --tp-accent: #49b1f5;
  --tp-accent-dark: #3b6ea5;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 16px 56px;
  color: var(--tp-text);
  font-size: 15px;
  line-height: 1.8;
}

[data-theme="dark"] .topic-page {
  --tp-card: #1f1f1f;
  --tp-text: #e0e0e0;
  --tp-muted: #a0a0a0;
  --tp-line: rgba(255, 255, 255, 0.1);
  --tp-accent: #49b1f5;
  --tp-accent-dark: #7aa3cf;
}

.topic-page * { box-sizing: border-box; }

.topic-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tp-accent);
  font-weight: 700;
}

.topic-page h1,
.topic-page h2,
.topic-page h3 {
  color: var(--tp-text);
  line-height: 1.4;
}

.topic-page a { color: var(--tp-accent-dark); }

/* 总览 */
.topics-hub-head { max-width: 760px; margin-bottom: 24px; }
.topics-lede { margin: 0; font-size: 0.98rem; color: var(--tp-muted); }
.landing-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.landing-stats span {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
  font-size: 0.78rem;
  color: var(--tp-muted);
}
.landing-stats b { margin-right: 3px; color: var(--tp-accent); }

.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.topic-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.topic-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b1220;
}

.topic-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-card-kicker {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.topic-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.topic-card-body h2 {
  margin: 0 0 6px;
  font-size: 1.12rem;
}

.topic-card-body p {
  flex: 1;
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--tp-muted);
}

.topic-card-meta {
  font-size: 0.76rem;
  color: var(--tp-accent-dark);
}

.topics-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 8px;
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
}

.topics-note h3 { margin: 0 0 4px; font-size: 0.92rem; }
.topics-note p { margin: 0; font-size: 0.84rem; color: var(--tp-muted); }

/* 落地页 */
.landing-head { max-width: 820px; margin-bottom: 22px; }
.landing-lede { margin: 0; font-size: 0.96rem; color: var(--tp-muted); }
.landing-section { margin-top: 30px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--tp-line);
}

.section-head h2 { margin: 0; font-size: 1.1rem; }
.section-head p { margin: 0; font-size: 0.78rem; color: var(--tp-muted); }

.stage-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 0 0 26px;
}

.stage-node {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 16px 16px 14px;
  border-radius: 8px;
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stage-node:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1); }
.stage-index { font-size: 0.68rem; font-weight: 800; color: var(--tp-accent); }
.stage-period { margin-top: 2px; font-size: 0.72rem; color: var(--tp-muted); }
.stage-name { margin-top: 4px; font-size: 1rem; font-weight: 700; }
.stage-desc { margin-top: 6px; font-size: 0.8rem; color: var(--tp-muted); }
.stage-cta { margin-top: auto; padding-top: 10px; font-size: 0.76rem; color: var(--tp-accent-dark); }

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

.article-card {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 14px;
  border-radius: 8px;
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.article-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1); }
.article-num { font-size: 0.68rem; font-weight: 800; color: var(--tp-accent); }
.article-card h3 { margin: 5px 0 5px; font-size: 1rem; }
.article-card p { flex: 1; margin: 0 0 10px; font-size: 0.82rem; color: var(--tp-muted); }
.article-more { font-size: 0.76rem; color: var(--tp-accent-dark); }

.company-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.company-card {
  display: flex;
  flex-direction: column;
  padding: 15px 16px 13px;
  border-radius: 8px;
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.company-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1); }
.company-card-top { display: flex; align-items: center; gap: 9px; }
.company-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--tp-accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}
.company-logo.big { width: 58px; height: 58px; border-radius: 10px; font-size: 1.5rem; }
.company-card h3 { margin: 0; font-size: 1rem; }
.company-card-top p { margin: 2px 0 0; font-size: 0.72rem; color: var(--tp-muted); }
.company-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(73, 177, 245, 0.12);
  color: var(--tp-accent-dark);
  font-size: 0.64rem;
  white-space: nowrap;
}
.company-headline {
  margin: 10px 0 8px;
  font-size: 0.8rem;
  color: var(--tp-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.company-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.company-tags span { padding: 2px 6px; border-radius: 4px; background: rgba(127, 127, 127, 0.1); font-size: 0.68rem; color: var(--tp-muted); }
.company-card-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--tp-line); font-size: 0.68rem; color: var(--tp-muted); }

/* 折叠说明 */
.topic-more {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid var(--tp-line);
}
.topic-more summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 0.86rem;
  font-weight: 700;
}
.topic-more summary::-webkit-details-marker { display: none; }
.topic-more-toggle { color: var(--tp-accent); font-weight: 400; font-size: 0.76rem; }
.topic-more .topic-body { margin-top: 14px; }

/* 公司页 */
.company-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 8px;
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.company-hero-main { display: flex; gap: 16px; align-items: flex-start; }
.company-lede { margin: 4px 0 10px; font-size: 0.9rem; color: var(--tp-muted); }
.company-facts { display: grid; gap: 8px; align-content: start; }
.company-facts div { display: flex; flex-direction: column; }
.company-facts span { font-size: 0.68rem; color: var(--tp-muted); }
.company-facts b { font-size: 0.84rem; font-weight: 600; }

.company-block { margin-top: 24px; }
.process-block { margin-top: 20px; }
.process-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.process-strip li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
  font-size: 0.78rem;
}
.process-dot { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tp-accent); color: #fff; font-size: 0.64rem; font-weight: 700; }

.company-cols { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; }
.company-main { min-width: 0; }
.company-side { display: grid; gap: 12px; align-content: start; }

.side-card { padding: 14px 16px; border-radius: 8px; border: 1px solid var(--tp-line); background: var(--tp-card); }
.side-card.warn { border-color: rgba(230, 150, 80, 0.4); background: rgba(230, 150, 80, 0.06); }
.side-card h3 { margin: 0 0 8px; font-size: 0.86rem; }
.side-card dl { margin: 0; }
.side-card dt { margin-top: 6px; font-size: 0.68rem; color: var(--tp-muted); }
.side-card dt:first-child { margin-top: 0; }
.side-card dd { margin: 1px 0 0; font-size: 0.8rem; }
.side-card ul { margin: 0; padding-left: 1.1em; font-size: 0.78rem; color: var(--tp-muted); }
.source-list { list-style: none; padding-left: 0 !important; }
.side-note { margin: 8px 0 0; font-size: 0.68rem; line-height: 1.6; color: var(--tp-muted); }

.exp-card { margin-bottom: 14px; padding: 16px 18px; border-radius: 8px; border: 1px solid var(--tp-line); background: var(--tp-card); }
.exp-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.exp-head h3 { margin: 0; font-size: 1rem; }
.exp-sub { display: flex; flex-wrap: wrap; gap: 8px; margin: 3px 0 0; font-size: 0.72rem; color: var(--tp-muted); }
.exp-result { flex-shrink: 0; height: fit-content; padding: 3px 8px; border-radius: 4px; font-size: 0.68rem; font-weight: 600; }
.exp-result.ok { color: #1f9d6a; background: rgba(31, 157, 106, 0.12); }
.exp-result.warn { color: #c2703d; background: rgba(194, 112, 61, 0.12); }

.round-timeline { position: relative; margin: 0; padding: 0 0 0 18px; list-style: none; }
.round-timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 10px; width: 2px; background: rgba(73, 177, 245, 0.35); }
.round-timeline li { position: relative; padding-bottom: 14px; }
.round-timeline li:last-child { padding-bottom: 0; }
.round-dot { position: absolute; left: -18px; top: 4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--tp-accent); background: var(--tp-card); }
.round-timeline li.fail .round-dot { border-color: #c2703d; }
.round-timeline li.pending .round-dot { border-color: #a0a0a0; }
.round-body { padding: 9px 12px; border-radius: 6px; background: rgba(127, 127, 127, 0.05); }
.round-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.round-name { font-size: 0.86rem; font-weight: 700; }
.round-date { font-size: 0.68rem; color: var(--tp-muted); }
.round-body p { margin: 0; font-size: 0.82rem; color: var(--tp-muted); }
.round-ask { margin: 6px 0 0; padding-left: 1.1em; font-size: 0.8rem; color: var(--tp-muted); }
.exp-takeaway { margin: 10px 0 0; padding: 8px 11px; border-radius: 6px; background: rgba(73, 177, 245, 0.08); font-size: 0.8rem; color: var(--tp-muted); }
.exp-takeaway b { color: var(--tp-accent-dark); }

.benefit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.benefit-card { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px; border-radius: 6px; border: 1px solid var(--tp-line); background: var(--tp-card); }
.benefit-card span { font-size: 0.68rem; color: var(--tp-muted); }
.benefit-card b { font-size: 1rem; }
.benefit-card small { font-size: 0.68rem; line-height: 1.6; color: var(--tp-muted); }

.onboarding-list { margin: 0; padding-left: 1.2em; font-size: 0.84rem; color: var(--tp-muted); }
.empty-note { padding: 12px 14px; border-radius: 6px; border: 1px dashed var(--tp-line); font-size: 0.82rem; color: var(--tp-muted); }
.topic-back { display: inline-block; margin-top: 20px; font-size: 0.8rem; color: var(--tp-accent-dark); }

/* 正文样式（折叠说明、公司页） */
.topic-body { color: var(--tp-text); font-size: 0.92rem; line-height: 1.9; }
.topic-body h2 { margin: 1.8em 0 0.6em; padding-top: 0.7em; border-top: 1px solid var(--tp-line); font-size: 1.25rem; }
.topic-body h3 { margin: 1.4em 0 0.5em; font-size: 1.05rem; }
.topic-body p { margin: 0 0 0.9em; }
.topic-body ul, .topic-body ol { padding-left: 1.3em; margin-bottom: 1em; }
.topic-body table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.topic-body th, .topic-body td { padding: 7px 9px; border: 1px solid var(--tp-line); }
.topic-body th { background: rgba(127, 127, 127, 0.07); }
.topic-body pre { border-radius: 6px; overflow-x: auto; }
.topic-body code { font-size: 0.86em; }
.topic-body img { max-width: 100%; height: auto; border-radius: 4px; }
.topic-body blockquote { margin: 1em 0; padding: 8px 14px; border-left: 3px solid var(--tp-accent); background: rgba(73, 177, 245, 0.06); }

@media (max-width: 1000px) {
  .topics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-cols { grid-template-columns: 1fr; }
  .company-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-hero { grid-template-columns: 1fr; }
  .company-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .process-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .topics-grid, .article-grid, .company-grid { grid-template-columns: 1fr; }
  .topics-note { grid-template-columns: 1fr; }
  .stage-rail { grid-template-columns: 1fr; }
  .company-facts { grid-template-columns: 1fr 1fr; }
  .company-side { grid-template-columns: 1fr; }
  .benefit-grid { grid-template-columns: 1fr; }
  .exp-head { flex-direction: column; gap: 8px; }
}
/* 分组列数 */
.article-grid.cols-1 { grid-template-columns: 1fr; }
.article-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.article-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1000px) {
  .article-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .article-grid.cols-2,
  .article-grid.cols-3 { grid-template-columns: 1fr; }
}

/* 页脚改成中性深色，避免整块亮蓝 */
#footer {
  background: #23272e !important;
  color: #c9d1d9 !important;
}
#footer a { color: #c9d1d9 !important; }
#footer .footer-copyright,
#footer .footer-framework { color: #aab4c0 !important; }

/* 专题文章顶部目录 */
.article-toc {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid var(--tp-line);
  border-radius: 6px;
  background: rgba(127, 127, 127, 0.04);
}
.article-toc summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 0.84rem;
  font-weight: 700;
}
.article-toc summary::-webkit-details-marker { display: none; }
.article-toc ol {
  margin: 10px 0 0;
  padding-left: 1.2em;
  font-size: 0.82rem;
  line-height: 1.9;
}
.article-toc a { color: var(--tp-muted); }
.article-toc a:hover { color: var(--tp-accent); }

/* 页面背景：不要纯白 */
#web_bg { background: #eef3f9 !important; }
[data-theme="dark"] #web_bg { opacity: .18; }

/* 让 Butterfly 的页面背景真正显示出来 */
body {
  background:
    linear-gradient(rgba(238, 243, 249, .72), rgba(238, 243, 249, .72)),
    url('/img/banner.jpg') center center / cover no-repeat fixed !important;
}
#body-wrap, #content-inner { background: transparent !important; }
#web_bg { display: none !important; }
[data-theme="dark"] body,
[data-theme="dark"] #body-wrap,
[data-theme="dark"] #content-inner,
[data-theme="dark"] #web_bg { opacity: .18; }
