/* =========================================================
   MBTI 内容 / 详情页 美化样式表 (assets/content.css)
   纯 CSS，不依赖 Tailwind 编译，可直接被 <link> 引用。
   品牌色：主紫 #7c3aed / #8b5cf6，辅粉 #ec4899
   ========================================================= */

/* ---------- 文章正文 .prose 排版升级 ---------- */
.prose { max-width: none; }
.prose h2 {
  font-size: 1.6rem; font-weight: 800; color: #1f2937;
  margin: 2.4rem 0 1rem; padding-bottom: .55rem;
  border-bottom: 2px solid #ede9fe; position: relative; line-height: 1.35;
}
.prose h2::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 3rem; height: 3px; border-radius: 3px; background: #7c3aed;
}
.prose h3 {
  font-size: 1.2rem; font-weight: 700; color: #374151;
  margin: 1.6rem 0 .6rem; display: flex; align-items: center; gap: .5rem;
}
.prose h3::before {
  content: ""; width: .55rem; height: 1.1rem; border-radius: 3px;
  background: linear-gradient(180deg,#a78bfa,#7c3aed); display: inline-block;
}
.prose p { color: #475569; line-height: 1.95; margin-bottom: 1.1rem; font-size: 1.04rem; }
.prose ul { color: #475569; margin: 0 0 1.2rem; padding-left: 1.2rem; }
.prose ul li { margin-bottom: .5rem; line-height: 1.85; }
.prose ul li::marker { color: #a78bfa; }
.prose ol { color: #475569; margin: 0 0 1.2rem; padding-left: 1.4rem; }
.prose ol li { margin-bottom: .5rem; line-height: 1.85; }
.prose strong { color: #6d28d9; font-weight: 700; }
.prose a { color: #7c3aed; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c4b5fd; }
.prose a:hover { color: #5b21b6; text-decoration-color: #7c3aed; }
.prose blockquote {
  border-left: 4px solid #c4b5fd; background: #f5f3ff;
  padding: 1rem 1.2rem; border-radius: 0 .75rem .75rem 0;
  color: #5b21b6; font-style: normal; margin: 1.4rem 0;
}
.prose blockquote p { color: #5b21b6; margin: 0; }
.prose hr { border: none; border-top: 1px dashed #e5e7eb; margin: 2rem 0; }

/* ---------- 通用：小节标签（eyebrow） ---------- */
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  color: #7c3aed; background: #ede9fe; padding: .25rem .8rem; border-radius: 999px;
  margin-bottom: .8rem;
}

/* ---------- 导语段落 ---------- */
.lead { font-size: 1.15rem; line-height: 1.9; color: #374151; }

/* ---------- 内容卡片 ---------- */
.content-card {
  background: #fff; border: 1px solid #f1f0fb; border-radius: 1rem;
  padding: 1.4rem 1.5rem; box-shadow: 0 4px 18px -10px rgba(124,58,237,.25);
  transition: transform .25s ease, box-shadow .25s ease;
}
.content-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -12px rgba(124,58,237,.35); }
.content-card h3 { font-size: 1.15rem; font-weight: 800; color: #1f2937; margin: 0 0 .6rem; display: flex; align-items: center; gap: .5rem; }
.content-card p { color: #475569; line-height: 1.8; font-size: .98rem; margin: 0; }

/* ---------- 提示框 callout ---------- */
.callout {
  border-radius: 1rem; padding: 1.1rem 1.3rem; margin: 1.4rem 0;
  display: flex; gap: .9rem; align-items: flex-start; line-height: 1.8; font-size: .98rem;
}
.callout .ico { font-size: 1.4rem; line-height: 1.4; flex-shrink: 0; }
.callout-info { background: #f5f3ff; border: 1px solid #ddd6fe; color: #4c1d95; }
.callout-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.callout-tip  { background: #fdf2f8; border: 1px solid #fbcfe8; color: #9d174d; }
.callout strong { color: inherit; }

/* ---------- 数据表格 ---------- */
.data-table { width: 100%; min-width: 680px; border-collapse: separate; border-spacing: 0; font-size: .95rem; overflow: hidden; border-radius: .9rem; box-shadow: 0 4px 18px -12px rgba(0,0,0,.2); }
.data-table thead th {
  background: linear-gradient(135deg,#7c3aed,#8b5cf6); color: #fff;
  text-align: left; padding: .85rem 1rem; font-weight: 700; white-space: nowrap;
}
.data-table thead th:first-child { border-top-left-radius: .9rem; }
.data-table thead th:last-child { border-top-right-radius: .9rem; }
.data-table tbody td { padding: .8rem 1rem; border-bottom: 1px solid #f1f0fb; color: #475569; vertical-align: top; }
.data-table tbody tr:nth-child(even) { background: #faf9ff; }
.data-table tbody tr:hover { background: #f5f3ff; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .name { font-weight: 700; color: #1f2937; white-space: nowrap; }
.data-table .name small { display: block; font-weight: 400; color: #94a3b8; font-size: .8rem; }
.data-table .cat { color: #7c3aed; font-weight: 600; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 数据概览卡片网格 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
@media (min-width: 768px){ .stat-grid { grid-template-columns: repeat(4,1fr); } }
.stat {
  background: #fff; border: 1px solid #f1f0fb; border-radius: 1rem; padding: 1.2rem 1rem;
  text-align: center; box-shadow: 0 4px 16px -12px rgba(124,58,237,.3);
}
.stat .num { font-size: 1.8rem; font-weight: 800; color: #7c3aed; line-height: 1.1; }
.stat .lbl { font-size: .85rem; color: #64748b; margin-top: .35rem; }

/* ---------- MBTI 徽章 / 胶囊 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; font-weight: 700;
  font-size: .82rem; padding: .2rem .6rem; border-radius: 999px;
  background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; white-space: nowrap;
}
.badge-pink { background: #fce7f3; color: #be185d; border-color: #fbcfe8; }

/* ---------- 维度强度可视化 ---------- */
.dims { background: linear-gradient(135deg,#f5f3ff,#fdf2f8); border: 1px solid #ede9fe; border-radius: 1.1rem; padding: 1.4rem 1.5rem; }
.dims .dims-title { font-weight: 800; color: #1f2937; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.dim-row { display: grid; grid-template-columns: 2.4rem 1fr 3rem; align-items: center; gap: .8rem; margin-bottom: .85rem; }
.dim-row:last-child { margin-bottom: 0; }
.dim-label { font-weight: 800; color: #7c3aed; font-size: 1.05rem; text-align: center; }
.dim-track { background: #e9e5f7; border-radius: 999px; height: 14px; overflow: hidden; }
.dim-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg,#a78bfa,#7c3aed); width: 0; transition: width 1.1s cubic-bezier(.22,1,.36,1); }
.dim-val { font-size: .85rem; color: #64748b; font-weight: 600; text-align: right; }

/* ---------- 名人卡片网格 ---------- */
.celeb-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
@media (min-width: 640px){ .celeb-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1024px){ .celeb-grid { grid-template-columns: repeat(4,1fr); } }
.celeb {
  background: #fff; border: 1px solid #f1f0fb; border-radius: 1rem; padding: 1rem;
  text-align: center; box-shadow: 0 4px 16px -14px rgba(124,58,237,.4); transition: transform .25s, box-shadow .25s;
}
.celeb:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -14px rgba(124,58,237,.45); }
.celeb .avatar { font-size: 2.2rem; }
.celeb .cname { font-weight: 800; color: #1f2937; margin-top: .4rem; font-size: .98rem; }
.celeb .crole { font-size: .78rem; color: #94a3b8; margin-top: .15rem; }
.celeb .cbadge { margin-top: .55rem; }

/* ---------- 类型分组（16 型归类） ---------- */
.type-groups { display: grid; grid-template-columns: repeat(1,1fr); gap: 1rem; }
@media (min-width: 640px){ .type-groups { grid-template-columns: repeat(2,1fr); } }
.type-group { background: #fff; border: 1px solid #f1f0fb; border-radius: 1rem; padding: 1.1rem 1.2rem; box-shadow: 0 4px 16px -14px rgba(124,58,237,.3); }
.type-group h4 { font-size: 1rem; font-weight: 800; color: #1f2937; margin: 0 0 .2rem; display: flex; align-items: center; gap: .5rem; }
.type-group .tg-sub { font-size: .8rem; color: #94a3b8; margin-bottom: .6rem; }
.type-group .tg-members { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- 深度解读卡片 ---------- */
.feature {
  display: grid; grid-template-columns: 1fr; gap: 1.2rem; background: #fff;
  border: 1px solid #f1f0fb; border-radius: 1.2rem; padding: 1.5rem;
  box-shadow: 0 8px 26px -16px rgba(124,58,237,.4); margin-bottom: 1.2rem;
}
@media (min-width: 768px){ .feature { grid-template-columns: 200px 1fr; } }
.feature .f-side { text-align: center; }
.feature .f-avatar { font-size: 3.4rem; }
.feature .f-name { font-weight: 800; color: #1f2937; margin-top: .4rem; }
.feature .f-role { font-size: .82rem; color: #94a3b8; }
.feature .f-body h3 { margin: 0 0 .6rem; font-size: 1.2rem; font-weight: 800; color: #1f2937; }
.feature .f-body p { color: #475569; line-height: 1.85; margin-bottom: .9rem; font-size: .98rem; }

/* ---------- 目录 TOC ---------- */
.toc { background: #fff; border: 1px solid #f1f0fb; border-radius: 1rem; padding: 1.2rem 1.4rem; box-shadow: 0 4px 16px -14px rgba(124,58,237,.3); }
.toc .toc-title { font-weight: 800; color: #1f2937; margin-bottom: .7rem; }
.toc ol { margin: 0; padding-left: 1.2rem; color: #7c3aed; }
.toc ol li { margin-bottom: .4rem; }
.toc ol a { color: #7c3aed; text-decoration: none; }
.toc ol a:hover { text-decoration: underline; }

/* ---------- 锚点滚动偏移（固定导航） ---------- */
:target { scroll-margin-top: 84px; }
section[id] { scroll-margin-top: 84px; }

/* ---------- 移动端适配 ---------- */
/* 侧边栏仅在桌面端吸顶，移动端改为正常流动，避免浮动错位 */
.sidebar-sticky { position: sticky; top: 80px; }
@media (max-width: 767px){
  .sidebar-sticky { position: static; }
  .data-table tbody td, .data-table thead th { padding: .6rem .7rem; }
  .feature { padding: 1.1rem; }
}
