/* ========================================
   见闻文章 (insight) 布局与样式
   ======================================== */

/* 隐藏更新日期，只保留创建日期（适用于所有文章） */
.post-update-date { display: none !important; }

.post-content .insight-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin: 24px 0;
  align-items: start;
}

.post-content .insight-main,
.post-content .insight-sidebar > * {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  background: var(--background-color, #fff);
}

.post-content .insight-main { min-width: 0; padding: 28px; }
.post-content .insight-sidebar { position: sticky; top: 24px; display: grid; gap: 16px; }
.post-content .insight-summary { margin-bottom: 24px; padding: 14px 17px; border-left: 4px solid #0066cc; border-radius: 0 9px 9px 0; background: rgba(0, 102, 204, .05); color: var(--text-color-3, #334155); line-height: 1.7; }
.post-content .insight-article-kicker { margin-bottom: 9px; color: #2563eb; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.post-content .insight-article-heading { margin-bottom: 30px; padding-bottom: 23px; border-bottom: 1px solid var(--border-color, #e2e8f0); }
.post-content .insight-article-heading h2 { margin: 0 0 8px; color: var(--text-color-1, #0f172a); font-size: 1.45rem; }
.post-content .insight-article-heading p { margin: 0; color: var(--text-color-4, #64748b); font-size: .92rem; }
.post-content .insight-article-section { margin: 0 0 32px; }
.post-content .insight-article-section h2 { margin: 0 0 12px; padding-left: 10px; border-left: 3px solid #60a5fa; color: var(--text-color-1, #0f172a); font-size: 1.16rem; }
.post-content .insight-article-section p { color: var(--text-color-3, #475569); line-height: 1.85; }

/* 表格样式：兼容 insight-main 和 insight-article-section 两种结构 */
.post-content .insight-main > table,
.post-content .insight-main > .table-container,
.post-content .insight-article-section > table,
.post-content .insight-article-section > .table-container {
  width: 100%;
  margin: 18px 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.post-content .insight-main table,
.post-content .insight-article-section table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 10px;
  overflow: hidden;
  background: var(--background-color, #fff);
  font-size: .92rem;
  line-height: 1.65;
}

.post-content .insight-main table th,
.post-content .insight-main table td,
.post-content .insight-article-section table th,
.post-content .insight-article-section table td {
  min-width: 0;
  padding: 10px 12px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  vertical-align: top;
  border-right: 1px solid var(--border-color, #e2e8f0);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-color-3, #475569);
}

.post-content .insight-main table th:first-child,
.post-content .insight-main table td:first-child,
.post-content .insight-article-section table th:first-child,
.post-content .insight-article-section table td:first-child {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.post-content .insight-main table th,
.post-content .insight-article-section table th {
  background: rgba(37, 99, 235, .08);
  color: var(--text-color-1, #0f172a);
  font-weight: 700;
  text-align: left;
}

.post-content .insight-main table tr:last-child td,
.post-content .insight-article-section table tr:last-child td { border-bottom: 0; }

.post-content .insight-main table th:last-child,
.post-content .insight-main table td:last-child,
.post-content .insight-article-section table th:last-child,
.post-content .insight-article-section table td:last-child { border-right: 0; }

.post-content .insight-main table tbody tr:nth-child(even) td,
.post-content .insight-article-section table tbody tr:nth-child(even) td { background: rgba(148, 163, 184, .05); }

.post-content .insight-main table tbody tr:hover td,
.post-content .insight-article-section table tbody tr:hover td { background: rgba(37, 99, 235, .06); }

.post-content .insight-article-note { padding: 17px 18px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 10px; background: rgba(148, 163, 184, .07); }
.post-content .insight-article-note h2 { margin-top: 0; }
.post-content .insight-pdf-bar { padding: 11px 16px; border: 1px solid #cbd5e1; border-radius: 9px 9px 0 0; background: #f1f5f9; color: #1e293b; font-size: .9rem; font-weight: 700; }
.post-content .insight-pdf-frame { height: min(78vh, 860px); overflow: hidden; border: 1px solid #cbd5e1; border-top: 0; border-radius: 0 0 9px 9px; background: #475569; }
.post-content .insight-pdf-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.post-content .insight-card { padding: 20px; }
.post-content .insight-card-title { margin: 0 0 16px; padding-bottom: 11px; border-bottom: 2px solid rgba(148, 163, 184, .16); color: var(--text-color-1, #0f172a); font-size: 1.05rem; font-weight: 700; }
.post-content .insight-chart { overflow: hidden; margin-bottom: 16px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 9px; }
.post-content .insight-chart img { display: block; width: 100%; height: auto; max-height: 720px; object-fit: contain; background: #f8fafc; }
.post-content .insight-chart-note { padding: 8px 10px; border-top: 1px solid var(--border-color, #e2e8f0); color: var(--text-color-4, #64748b); font-size: .76rem; }
.post-content .insight-meta-item { margin: 0 0 15px; padding: 0 0 15px; border-bottom: 1px dashed rgba(148, 163, 184, .24); }
.post-content .insight-meta-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.post-content .insight-meta-label { margin-bottom: 7px; color: var(--text-color-4, #64748b); font-size: .82rem; font-weight: 700; }
.post-content .insight-meta-value { color: var(--text-color-2, #1e293b); font-size: .92rem; font-weight: 650; }
.post-content .insight-level { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; padding: 7px 9px; border-radius: 6px; background: rgba(148, 163, 184, .09); font-size: .82rem; }
.post-content .insight-observation { padding: 11px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 8px; background: rgba(148, 163, 184, .07); color: var(--text-color-3, #475569); font-size: .86rem; line-height: 1.65; }
.post-content .insight-stars { display: flex; align-items: center; gap: 2px; color: #cbd5e1; font-size: 1.15rem; line-height: 1; }
.post-content .insight-stars .is-active { color: #f59e0b; }
.post-content .insight-score { margin-left: 7px; color: #92400e; font-size: .82rem; font-weight: 700; }
.post-content .insight-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-content .insight-tag { padding: 3px 8px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 5px; background: rgba(148, 163, 184, .07); color: var(--text-color-3, #475569); font-size: .78rem; }
.post-content .insight-download { display: flex; align-items: center; justify-content: center; min-height: 43px; padding: 9px 14px; border-radius: 8px; background: #0066cc; color: #fff !important; text-decoration: none; font-size: .9rem; font-weight: 700; }
.post-content .insight-download:hover { background: #0055aa; }

@media (max-width: 850px) {
  .post-content .insight-layout { grid-template-columns: 1fr; }
  .post-content .insight-sidebar { position: static; }
  .post-content .insight-pdf-frame { height: 68vh; }
  .post-content .insight-main table { min-width: 480px; }
}

/* ========================================
   见闻文章：隐藏作者头像和名称
   ======================================== */

.post-header:has(~ .post-content .insight-layout) .avatar-box {
  display: none !important;
}

.post-header:has(~ .post-content .insight-layout) .author .name {
  display: none !important;
}

.post-header:has(~ .post-content .insight-layout) .author-badge {
  display: none !important;
}

.post-header:has(~ .post-content .insight-layout) .author {
  line-height: 0;
  margin: 0;
  padding: 0;
}
