/* BestBlogs 共享样式（SSG 静态页用） */

/* ==================== 基础 ==================== */
.bb-listing-page,
.bb-article-page,
.bb-category-page,
.bb-topics-page,
.bb-topic-detail-page,
.bb-briefs-page,
.bb-brief-detail-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: #1a1a2e;
  line-height: 1.6;
}

.bb-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #40babd;
  background: rgba(64, 186, 189, 0.1);
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.bb-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0.5rem 0;
  color: #0f172a;
}

.bb-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0.25rem 0 1rem;
}

.bb-nav {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.bb-nav-link {
  color: #40babd;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  transition: background 0.2s;
}

.bb-nav-link:hover {
  background: rgba(64, 186, 189, 0.1);
}

.bb-no-data {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 0.75rem;
}

/* ==================== 列表卡片 ==================== */
.bb-listing-main,
.bb-category-main {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}

.bb-topics-main {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .bb-listing-main,
  .bb-category-main,
  .bb-topics-main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1280px) {
  .bb-topics-main {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bb-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bb-card:hover {
  border-color: #40babd;
  box-shadow: 0 4px 12px rgba(64, 186, 189, 0.1);
  transform: translateY(-1px);
}

.bb-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}

.bb-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  background: #f1f5f9;
  color: #475569;
}

.bb-type-article { background: #dbeafe; color: #1e40af; }
.bb-type-podcast { background: #fae8ff; color: #86198f; }
.bb-type-video { background: #fee2e2; color: #991b1b; }
.bb-type-tweet { background: #dcfce7; color: #166534; }
.bb-type-newsletter { background: #fef3c7; color: #854d0e; }

.bb-domain,
.bb-cat {
  font-size: 0.75rem;
  color: #64748b;
  background: #f8fafc;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}

.bb-score {
  margin-left: auto;
  background: #40babd;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
}

.bb-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.bb-card-title a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s;
}

.bb-card-title a:hover {
  color: #40babd;
}

.bb-card-summary {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bb-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: auto;
}

.bb-source {
  color: #40babd;
  font-weight: 500;
}

/* ==================== 文章详情 ==================== */
.bb-article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.bb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: #64748b;
  margin: 0.75rem 0;
}

.bb-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.bb-tag {
  background: #d9e6f3;
  color: #475569;
  padding-top: .125rem;
  padding-bottom: .125rem;
  border-radius: 999px;
  font-size: .75rem;
}

.bb-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.bb-cta,
.bb-cta-secondary {
  background: #40babd;
  color: white;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
}

.bb-cta:hover {
  background: #369ea1;
}

.bb-cta-secondary {
  background: #798897;
  color: #fff;
}

.bb-cta-secondary:hover {
  background: #e2e8f0;
}

/* ==================== AI 速览摘要引用块 ==================== */
.bb-ai-summary {
  margin: 0 0 1rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #40babd;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(64, 186, 189, 0.04), rgba(64, 186, 189, 0.01));
  overflow: hidden;
}

.bb-ai-summary-inner {
  display: flex;
  gap: 0.1rem;
  padding: 0.5rem;
}

.bb-ai-summary-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: #40babd;
  opacity: 0.7;
}

.bb-ai-summary-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #40babd;
  margin-bottom: 0.25rem;
  margin-left: 0.5rem;
}

.bb-ai-summary-text {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.7;
}

/* ==================== AI 综合评分卡 ==================== */
.bb-ai-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #40babd;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(64, 186, 189, 0.04), rgba(64, 186, 189, 0.01));
}

.bb-ai-score-value {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.bb-ai-score-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.bb-ai-score-max {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.bb-ai-score-body {
  flex: 1;
  min-width: 0;
}

.bb-ai-score-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.bb-ai-score-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #40babd;
}

.bb-ai-score-badge {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.bb-ai-score-badge-outstanding { background: #16a34a; }
.bb-ai-score-badge-excellent { background: #40babd; }
.bb-ai-score-badge-good { background: #6366f1; }
.bb-ai-score-badge-fair { background: #f59e0b; }
.bb-ai-score-badge-average { background: #94a3b8; }

.bb-ai-score-bar {
  position: relative;
  height: 0.375rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.bb-ai-score-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: linear-gradient(90deg, #40babd, #2dd4bf);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.bb-ai-score-desc {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.5;
}

.bb-markdown {
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
}

.bb-markdown h1,
.bb-markdown h2,
.bb-markdown h3,
.bb-markdown h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #0f172a;
  font-weight: 700;
  scroll-margin-top: 5.5rem;
}

/* ==================== 标题层级体系 ==================== */

/* h1 — 文章主标题：纯排版，无装饰线（正文最多出现一次或零次） */
.bb-markdown h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
}

/* h2 — 二级标题：底部渐变线 + 左侧色条，承担正文段落分隔角色 */
.bb-markdown h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  margin-top: 2.25rem;
  margin-bottom: 1.25rem;
  padding-left: 0.875rem;
  padding-bottom: 0.625rem;
  border-left: 4px solid #40babd;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #40babd 0%, rgba(64,186,189,0.15) 80%, transparent 100%) 1;
}

/* h3 — 三级标题：左侧细色条 + 小一号字号 */
.bb-markdown h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.45;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid rgba(64,186,189,0.45);
}

/* h4 — 四级标题：左侧渐变点 + 字号明显高于正文 */
.bb-markdown h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.5;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
  position: relative;
}
.bb-markdown h4::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25em;
  bottom: 0.25em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(64,186,189,0.5) 0%, rgba(64,186,189,0.15) 100%);
}

.bb-markdown p {
  margin-bottom: 0.75rem;
}

/* ==================== 表格 ==================== */
.bb-markdown table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.bb-markdown thead {
  background: linear-gradient(135deg, #f1f5f9, #f8fafc);
}

.bb-markdown th {
  padding: 0.625rem 0.875rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: #1e293b;
  border-bottom: 2px solid #40babd;
  white-space: nowrap;
}

.bb-markdown td {
  padding: 0.55rem 0.875rem;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.bb-markdown tbody tr:last-child td {
  border-bottom: none;
}

.bb-markdown tbody tr:nth-child(even) {
  background: #f8fafc;
}

.bb-markdown tbody tr:hover {
  background: rgba(64, 186, 189, 0.04);
}

/* 移动端表格横向滚动 */
.bb-markdown table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==================== 列表 ==================== */
.bb-markdown ul,
.bb-markdown ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
  list-style: circle;
}

.bb-markdown ol {
  list-style: decimal;
}

.bb-markdown li {
  margin: 0.25rem 0;
  line-height: 1.65;
}

.bb-markdown ul > li::marker {
  color: #40babd;
}

.bb-markdown ol > li::marker {
  color: #64748b;
  font-weight: 600;
}

/* 嵌套列表 */
.bb-markdown li > ul,
.bb-markdown li > ol {
  margin: 0.25rem 0;
}

/* 任务列表 */
.bb-markdown input[type='checkbox'] {
  margin-right: 0.375rem;
  accent-color: #40babd;
}

/* ==================== 链接 ==================== */
.bb-markdown a {
  color: #40babd;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.bb-markdown a:hover {
  color: #2ea4a8;
  border-bottom-color: #40babd;
}

/* ==================== 文字增强 ==================== */
.bb-markdown strong {
  color: #1e293b;
  font-weight: 700;
}

.bb-markdown em {
  font-style: italic;
  color: #475569;
}

/* ==================== 分隔线 ==================== */
.bb-markdown hr {
  margin: 1.5rem 0;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1 20%, #cbd5e1 80%, transparent);
}

/* 删除线 */
.bb-markdown del {
  color: #94a3b8;
  text-decoration: line-through;
}

.bb-markdown img {
  display: block;
  max-width: 100%;
  height: auto;
  /* 预设最小高度：无论图片加载成功/失败/延迟，都有稳定占位，从根本上防止布局抖动 */
  min-height: 50px;
  border-radius: 0.5rem;
  margin: 1rem 0;
  /* 渐变占位背景：加载中/失败时显示柔和底色，加载成功后图片覆盖 */
  background: linear-gradient(
    135deg,
    #f8fafc 0%,
    #f1f5f9 50%,
    #f8fafc 100%
  );
  /* 图片加载成功后覆盖背景；object-fit 确保不拉伸 */
  object-fit: contain;
  object-position: center;
}
/* 已加载成功的图片移除占位背景（CSS 无法直接检测，但正常图片会 fill 整个区域） */
/* .bb-markdown img:not([src='']):not([src='#']) {
} */

/* pre 结构样式（hljs 与非 hljs 共享） */
.bb-markdown pre {
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}
/* 非 hljs 代码块默认深色主题（SSG 产出 + 无高亮的 code 块） */
.bb-markdown pre > code:not(.hljs) {
  display: block;
  padding: 1rem;
  font-size: 0.875rem;
  background: #1e293b;
  color: #e2e8f0;
}

/* 行内代码：仅作用于非代码块的 <code> */
.bb-markdown :not(pre) > code {
  background: #f1f5f9;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #be185d;
}

.bb-markdown blockquote {
  border-left: 4px solid #40babd;
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: rgba(64, 186, 189, 0.05);
  color: #475569;
}

/* ==================== GitHub Alerts 语义引用 ==================== */
.bb-markdown blockquote.bb-alert,
blockquote.bb-alert {
  border-left: 4px solid;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 0.375rem 0.375rem 0;
  position: relative;
}

.bb-markdown blockquote.bb-alert > p:first-child,
blockquote.bb-alert > p:first-child {
  margin-top: 0;
}

.bb-markdown blockquote.bb-alert > p:last-child,
blockquote.bb-alert > p:last-child {
  margin-bottom: 0;
}

blockquote.bb-alert-note {
  border-left-color: #0969da;
  background: rgba(9, 105, 218, 0.08);
}
blockquote.bb-alert-note::before {
  content: 'ℹ️ NOTE';
  display: block;
  font-weight: 600;
  color: #0969da;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

blockquote.bb-alert-tip {
  border-left-color: #1a7f37;
  background: rgba(26, 127, 55, 0.08);
}
blockquote.bb-alert-tip::before {
  content: '💡 TIP';
  display: block;
  font-weight: 600;
  color: #1a7f37;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

blockquote.bb-alert-important {
  border-left-color: #8250df;
  background: rgba(130, 80, 223, 0.08);
}
blockquote.bb-alert-important::before {
  content: '❗ IMPORTANT';
  display: block;
  font-weight: 600;
  color: #8250df;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

blockquote.bb-alert-warning {
  border-left-color: #9a6700;
  background: rgba(154, 103, 0, 0.08);
}
blockquote.bb-alert-warning::before {
  content: '⚠️ WARNING';
  display: block;
  font-weight: 600;
  color: #9a6700;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

blockquote.bb-alert-caution {
  border-left-color: #cf222e;
  background: rgba(207, 34, 46, 0.08);
}
blockquote.bb-alert-caution::before {
  content: '🔴 CAUTION';
  display: block;
  font-weight: 600;
  color: #cf222e;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

/* ==================== mermaid / markmap 占位符 ==================== */
.bb-markdown .bb-mermaid-placeholder,
.bb-markdown .bb-markmap-placeholder,
.bb-mermaid-placeholder,
.bb-markmap-placeholder {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  overflow: auto;
}

.bb-mermaid-placeholder svg,
.bb-markmap-placeholder svg {
  max-width: 100%;
  height: auto;
}

.bb-chart-error {
  color: #dc2626;
  background: #fef2f2;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  text-align: left;
}

.image-blocked {
  display: inline-block;
  background: #fef3c7;
  color: #854d0e;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  font-style: italic;
}

.md-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

/* ==================== 折叠卡片（AI 总结 / 核心要点） ==================== */
.bb-collapse-card {
  margin: 0 0 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
}

.bb-collapse-card:hover {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.bb-collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: none;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.bb-collapse-header:hover {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.bb-collapse-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bb-collapse-chevron {
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.2s;
}

.bb-collapse-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.bb-collapse-body-open {
  max-height: initial;
  padding: 0.8rem;
}

/* AI 总结正文内容 */
.bb-summary-content {
  font-size: 0.925rem;
  color: #475569;
  line-height: 1.75;
}

.bb-summary-content p {
  margin: 0.5rem 0;
}

.bb-summary-content ul,
.bb-summary-content ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.bb-summary-content li {
  margin: 0.25rem 0;
}

/* 核心要点列表（在折叠卡片内） */
.bb-keypoints-list {
  margin: 0;
  padding-left: 1.5rem;
  list-style: decimal;
}

.bb-keypoints-item {
  margin: 0.5rem 0;
  color: #78350f;
  line-height: 1.65;
  padding-left: 0.25rem;
}

.bb-keypoints-item::marker {
  color: #d97706;
  font-weight: 700;
  font-size: 0.9rem;
}

.bb-keypoints-explanation {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #a16207;
  line-height: 1.6;
}

/* ==================== 文章金句 ==================== */
.bb-golden-quotes {
  margin: 1.5rem 0 0;
}

.bb-golden-quotes-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: #7c3aed;
  font-weight: 700;
}

.bb-golden-quotes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bb-golden-quote-item {
  position: relative;
  margin: 0;
  padding: 1rem 1rem 1rem 2.25rem;
  background: linear-gradient(135deg, #faf8ff, #f5f3ff);
  border: 1px solid #ddd6fe;
  border-left: 3px solid #a78bfa;
  border-radius: 0 0.625rem 0.625rem 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bb-golden-quote-item:hover {
  border-left-color: #7c3aed;
  box-shadow: 0 1px 6px rgba(139, 92, 246, 0.1);
}

.bb-golden-quote-item p {
  margin: 0;
  font-size: 0.925rem;
  color: #4c1d95;
  line-height: 1.7;
  font-style: italic;
}

.bb-golden-quote-mark {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #c4b5fd;
  line-height: 1;
  font-family: Georgia, 'Times New Roman', serif;
}

/* ==================== 相关推荐 ==================== */
.bb-related {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.bb-related h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.bb-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.bb-related li {
  background: #f8fafc;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  transition: background 0.2s;
}

.bb-related li:hover {
  background: #f1f5f9;
}

.bb-related a {
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
}

.bb-related a:hover {
  color: #40babd;
}

/* ==================== 主题卡 ==================== */
.bb-topic-card,
.bb-topic-detail-page {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s;
}

.bb-topic-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bb-topic-card:hover {
  border-color: #40babd;
  box-shadow: 0 4px 12px rgba(64, 186, 189, 0.1);
}

.bb-topic-card h3,
.bb-topic-detail-page h1.bb-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.bb-topic-card h3 a,
.bb-topic-detail-page h1.bb-title a {
  color: #0f172a;
  text-decoration: none;
}

.bb-topic-card h3 a:hover,
.bb-topic-detail-page h1.bb-title a:hover {
  color: #40babd;
}

.bb-topic-summary {
  font-size: 0.875rem;
  color: #475569;
  margin: 0.5rem 0;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bb-topic-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: auto;
  padding-top: 0.5rem;
}

.bb-pin {
  background: #fef3c7;
  color: #854d0e;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 600;
}

.bb-topic-cover {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

/* ==================== 页脚 ==================== */
.bb-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.6;
}

.bb-footer a {
  color: #40babd;
  text-decoration: none;
}

.bb-footer a:hover {
  text-decoration: underline;
}

/* ==================== 早报（briefs） ==================== */
.bb-briefs-page,
.bb-brief-detail-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: #1a1a2e;
  line-height: 1.6;
}

.bb-briefs-header,
.bb-brief-detail-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.bb-briefs-main,
.bb-brief-detail-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bb-brief-card {
  display: block;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bb-brief-card:hover {
  border-color: #40babd;
  box-shadow: 0 2px 8px rgba(64, 186, 189, 0.08);
}

.bb-brief-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.bb-brief-date {
  font-weight: 600;
  color: #1a1a2e;
}

.bb-brief-locale {
  padding: 0.125rem 0.375rem;
  background: #f1f5f9;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
}

.bb-brief-count {
  color: #64748b;
}

.bb-brief-featured {
  color: #40babd;
  font-weight: 600;
}

.bb-brief-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.25rem 0 0.5rem 0;
  color: #1a1a2e;
}

.bb-brief-card-snippet {
  font-size: 0.875rem;
  color: #475569;
  margin: 0 0 0.5rem 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bb-brief-card-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
  font-size: 0.875rem;
  color: #475569;
}

.bb-brief-card-list li {
  margin: 0.125rem 0;
}

.bb-brief-card-empty {
  font-size: 0.875rem;
  color: #94a3b8;
  font-style: italic;
  margin: 0;
}

.bb-brief-card-compact {
  padding: 0.75rem 1rem;
}

.bb-brief-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}

.bb-brief-group-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #40babd;
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.bb-brief-group-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bb-brief-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.bb-brief-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bb-brief-item:first-child {
  padding-top: 0;
}

.bb-brief-item-featured {
  background: linear-gradient(to right, rgba(64, 186, 189, 0.04), transparent);
  border-left: 3px solid #40babd;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
}

.bb-brief-item-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  display: inline-block;
}

.bb-brief-item-title:hover {
  color: #40babd;
  text-decoration: underline;
}

.bb-brief-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.bb-brief-item-reason {
  font-size: 0.8125rem;
  color: #475569;
  margin: 0.375rem 0 0 0;
  line-height: 1.55;
}

/* ==================== 早报详情 - 编辑导语 ==================== */
.bb-brief-editor-intro {
  background: linear-gradient(135deg, rgba(64, 186, 189, 0.06), rgba(45, 212, 191, 0.03));
  border-left: 3px solid #40babd;
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ==================== 早报详情 - 关键词 ==================== */
.bb-brief-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.bb-brief-keyword {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 999px;
  font-size: 0.6875rem;
  white-space: nowrap;
}

/* ==================== 早报详情 - 精选区 ==================== */
.bb-brief-featured-section {
  margin-bottom: 1.5rem;
}

.bb-brief-featured-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #fde047;
}

.bb-brief-featured-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bb-brief-featured-item {
  background: linear-gradient(to right, rgba(64, 186, 189, 0.04), transparent);
  border: 1px solid #e2e8f0;
  border-left: 3px solid #40babd;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1rem 1.25rem;
}

.bb-brief-item-score {
  color: #40babd;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bb-brief-deepread {
  color: #6366f1;
  font-weight: 500;
}

/* ==================== 早报详情 - 播客 ==================== */
.bb-brief-podcast {
  display: flex;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.bb-brief-podcast-cover {
  width: 128px;
  height: 128px;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}

.bb-brief-podcast-info {
  flex: 1;
  min-width: 0;
}

.bb-brief-podcast-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.bb-brief-podcast-audio {
  width: 100%;
  height: 2.25rem;
}

.bb-brief-podcast-duration {
  display: inline-block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .bb-brief-podcast {
    flex-direction: column;
    align-items: center;
  }

  .bb-brief-podcast-cover {
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1;
  }
}

/* ==================== 早报详情 - 章节 ==================== */
.bb-brief-chapters {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.bb-brief-chapters h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.bb-brief-chapters-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: chapter;
}

.bb-brief-chapters-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f8fafc;
}

.bb-brief-chapters-list li:last-child {
  border-bottom: none;
}

.bb-brief-chapter-time {
  min-width: 3rem;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: #40babd;
  font-weight: 500;
}

.bb-brief-chapter-headline {
  font-size: 0.85rem;
  color: #0f172a;
  font-weight: 500;
}

.bb-brief-chapter-summary {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ==================== 早报详情 - Markdown 正文 ==================== */
.bb-brief-markdown {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ==================== 早报详情 - 海报 ==================== */
.bb-brief-poster {
  margin-bottom: 1.5rem;
}

.bb-brief-poster img {
  width: 100%;
  border-radius: 0.75rem;
  object-fit: cover;
  max-height: 320px;
}

.bb-brief-status {
  color: #16a34a;
  background: #f0fdf4;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* ==================== 早报卡片 - 增强 ==================== */
.bb-brief-card-intro {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0.5rem 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bb-brief-card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.25rem 0;
}

.bb-brief-card-keyword {
  display: inline-block;
  padding: 0.0625rem 0.375rem;
  background: #f1f5f9;
  color: #94a3b8;
  border-radius: 999px;
  font-size: 0.625rem;
  white-space: nowrap;
}

/* 阅读增强：TOC、进度条；内容区占满主栏，不在此层限宽 */
.bb-reading-progress {
  pointer-events: none;
}

.bb-toc-scroll {
  scrollbar-width: thin;
  scrollbar-color: #40babd transparent;
}

.bb-toc-scroll::-webkit-scrollbar {
  width: 4px;
}

.bb-toc-scroll::-webkit-scrollbar-thumb {
  background: rgba(64, 186, 189, 0.35);
  border-radius: 4px;
}

.bb-reading-article .bb-markdown h2:first-child,
.bb-reading-article .bb-markdown h3:first-child {
  margin-top: 0.5rem;
}

/* ==================== 播客播放器 ==================== */

.bb-podcast-player {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

/* 上半部分：封面 + 章节（左右分栏） */
.bb-podcast-top {
  display: flex;
  gap: 0;
}

/* 左侧封面区域 */
.bb-podcast-cover-section {
  width: 240px;
  flex-shrink: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.bb-podcast-cover-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bb-podcast-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bb-podcast-cover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.bb-podcast-cover-wrapper:hover .bb-podcast-cover-play {
  opacity: 1;
}

.bb-podcast-cover-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 0.75rem;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 播放控件 */
.bb-podcast-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.bb-podcast-controls-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bb-podcast-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #64748b;
  transition: all 0.15s;
  position: relative;
}
.bb-podcast-ctrl-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.bb-podcast-ctrl-main {
  width: 44px;
  height: 44px;
  background: #40babd;
  color: white;
}
.bb-podcast-ctrl-main:hover {
  background: #36a5a8;
  color: white;
}

/* 进度条 */
.bb-podcast-progress {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bb-podcast-time {
  font-size: 0.7rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: center;
}

.bb-podcast-progress-bar {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.bb-podcast-progress-fill {
  height: 100%;
  background: #40babd;
  border-radius: 2px;
  transition: width 0.3s linear;
}

.bb-podcast-duration-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: #94a3b8;
  padding: 0.125rem 0.5rem;
  background: #f8fafc;
  border-radius: 999px;
}

/* 时长 + 倍速同行容器 */
.bb-podcast-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* 倍速选择器 */
.bb-podcast-speed-control {
  position: relative;
  display: flex;
  justify-content: center;
}

.bb-podcast-speed-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.7rem;
  color: #40babd;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.bb-podcast-speed-btn:hover {
  background: #ccfbf1;
  border-color: #99f6e4;
}

.bb-podcast-speed-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 0.25rem;
  z-index: 50;
  min-width: 64px;
}

.bb-podcast-speed-option {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}

.bb-podcast-speed-option:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.bb-podcast-speed-option-active {
  background: #f0fdfa;
  color: #40babd;
  font-weight: 600;
}

.bb-podcast-summary-text {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.5;
  text-align: center;
  padding: 0 0.25rem;
}

/* 右侧章节列表 */
.bb-podcast-chapters {
  flex: 1;
  min-width: 0;
  border-left: 1px solid #f1f5f9;
  padding: 1rem 1rem 1rem 1.25rem;
  max-height: 520px;
  overflow-y: auto;
}

.bb-podcast-chapters-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.bb-podcast-chapters-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bb-podcast-chapter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  transition: background 0.15s;
  cursor: pointer;
}
.bb-podcast-chapter-item:hover {
  background: #f8fafc;
}
.bb-podcast-chapter-item-active {
  background: rgba(64, 186, 189, 0.08);
}
.bb-podcast-chapter-item-active:hover {
  background: rgba(64, 186, 189, 0.12);
}

.bb-podcast-chapter-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: #40babd;
  background: rgba(64, 186, 189, 0.1);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.bb-podcast-chapter-item-active .bb-podcast-chapter-num {
  background: #40babd;
  color: white;
}

.bb-podcast-chapter-name {
  flex: 1;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bb-podcast-chapter-item-active .bb-podcast-chapter-name {
  color: #0f766e;
  font-weight: 500;
}

.bb-podcast-chapter-time {
  font-size: 0.7rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* 转录区域 */
.bb-podcast-transcript {
  border-top: 1px solid #e5e7eb;
}

.bb-podcast-transcript-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  transition: background 0.15s;
}
.bb-podcast-transcript-toggle:hover {
  background: #f8fafc;
  color: #334155;
}

.bb-podcast-transcript-body {
  padding: 0 1rem 1rem;
  max-height: 480px;
  overflow-y: auto;
}

/* 发言人图例 */
.bb-podcast-speaker-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.bb-podcast-speaker-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* 转录章节 */
.bb-podcast-transcript-chapter {
  padding: 0.5rem 0;
  border-radius: 0.5rem;
  transition: background 0.15s;
}
.bb-podcast-transcript-chapter-active {
  background: rgba(64, 186, 189, 0.03);
}

.bb-podcast-transcript-chapter-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.375rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  border-radius: 0.375rem;
  transition: background 0.15s;
}
.bb-podcast-transcript-chapter-header:hover {
  background: #f8fafc;
}

.bb-podcast-transcript-chapter-num {
  font-size: 0.65rem;
  font-weight: 700;
  color: #40babd;
  background: rgba(64, 186, 189, 0.1);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  flex-shrink: 0;
}

/* 转录片段行 */
.bb-podcast-transcript-seg {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.375rem 0.5rem;
  border-left-width: 2px;
  border-radius: 0 0.375rem 0.375rem 0;
  font-size: 0.8rem;
  line-height: 1.55;
  transition: background 0.15s;
  cursor: pointer;
}
.bb-podcast-transcript-seg:hover {
  opacity: 0.85;
}
.bb-podcast-transcript-seg-active {
  box-shadow: inset 2px 0 0 #40babd, 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bb-podcast-transcript-seg-time {
  font-size: 0.65rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 34px;
  padding-top: 1px;
}

.bb-podcast-transcript-seg-speaker {
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 42px;
  padding-top: 1px;
}

.bb-podcast-transcript-seg-text {
  color: #475569;
  flex: 1;
}

/* 关键句子 */
.bb-podcast-key-sentences {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.bb-podcast-key-sentences-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.bb-podcast-key-sentence-item {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  width: 100%;
  text-align: left;
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  transition: background 0.15s;
  cursor: pointer;
}
.bb-podcast-key-sentence-item:hover {
  background: #f8fafc;
}

/* 响应式：小屏堆叠 */
@media (max-width: 640px) {
  .bb-podcast-top {
    flex-direction: column;
  }
  .bb-podcast-cover-section {
    width: 100%;
    padding-bottom: 0;
  }
  .bb-podcast-cover-wrapper,
  .bb-podcast-cover-placeholder {
    width: 140px;
    height: 140px;
  }
  .bb-podcast-chapters {
    border-left: none;
    border-top: 1px solid #f1f5f9;
    max-height: 240px;
  }
}
