/* 长尾内容页排版层（2026-12 改版：浅米白纸感）
 * 单独一份，不并进 tailwind.css：内容页只用少量工具类，
 * 为了几个新类去重跑 tailwind 构建不划算，也容易把首页样式带偏。
 * 依赖 tailwind.css 里已有的 .wrap / .card / .lede / .btn 等组件类，
 * 深色工具类的覆盖见 guide.css。
 */

.post {
  max-width: 68ch;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.95;
  color: #3A332B;
  letter-spacing: .005em;
}

@media (min-width: 640px) {
  .post { font-size: 16.5px; }
}

/* 间距统一由「相邻兄弟」控制。
   注意：这里不能写 .post p { margin: 0 } —— 它的特异性(0,0,1,1)
   高于 .post > * + * (0,0,1,0)，会把段间距整个吃掉，段落会贴在一起。 */
.post > * { margin: 0; }
.post > * + * { margin-top: 1.15em; }

.post h2 {
  margin-top: 2.6em;
  margin-bottom: .7em;
  font-size: 21px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #141110;
  scroll-margin-top: 96px;
}

.post h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, #FF4B2B, #FFC96B);
}

@media (min-width: 640px) {
  .post h2 { font-size: 24px; }
}

.post h3 {
  margin-top: 2em;
  margin-bottom: .55em;
  font-size: 17.5px;
  font-weight: 700;
  color: #141110;
}

.post strong { color: #141110; font-weight: 700; }

.post a {
  color: #E63A18;
  text-decoration: none;
  border-bottom: 1px solid rgba(230, 58, 24, .3);
  transition: border-color .18s, color .18s;
}
.post a:hover { color: #FF4B2B; border-bottom-color: #FF4B2B; }

/* tailwind 的 preflight 会把 ul/ol 的 list-style 重置成 none，
   这里必须显式恢复，否则正文和目录都没有序号。
   注意不要写 margin: 0 —— 会盖掉上面 .post > * + * 的间距。 */
.post ul, .post ol {
  padding-left: 1.5em;
  list-style-position: outside;
}

.post ul { list-style: disc; }
.post ol { list-style: decimal; }

.post li { margin-top: .55em; padding-left: .15em; }
.post ul li::marker { color: #FF4B2B; }
.post ol li::marker { color: #FF4B2B; font-variant-numeric: tabular-nums; }

.post table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.7;
  margin: 1.6em 0;
}

.post th {
  text-align: left;
  font-weight: 700;
  color: #141110;
  padding: 12px 14px;
  background: #F6EFE2;
  border-bottom: 1px solid rgba(20, 17, 16, .1);
  white-space: nowrap;
}

.post td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(20, 17, 16, .07);
  color: #3A332B;
  vertical-align: top;
}

.post tbody tr:last-child td { border-bottom: 0; }
.post tbody tr:nth-child(even) { background: rgba(246, 239, 226, .45); }

/* 表格横向滚动容器（窄屏） */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.6em 0;
  border: 1px solid rgba(20, 17, 16, .08);
  border-radius: 16px;
  background: #FFFDF9;
}
.table-scroll table { margin: 0; }

.post blockquote {
  margin: 1.6em 0;
  padding: 16px 20px;
  border-left: 3px solid #FF4B2B;
  border-radius: 0 14px 14px 0;
  background: #FFF1EB;
  color: #3A332B;
  font-size: 15px;
}

.post blockquote p + p { margin-top: .8em; }

/* 要点卡片：写「先记住这三件事」这类小结 */
.callout {
  margin: 1.8em 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 201, 107, .55);
  border-radius: 16px;
  background: #FFF8E9;
  font-size: 15px;
  line-height: 1.9;
  color: #4A3E28;
}
.callout strong { color: #A96A00; }
.callout p + p { margin-top: .7em; }

/* 目录 */
.toc {
  margin: 2em 0;
  padding: 18px 22px;
  border: 1px solid rgba(20, 17, 16, .08);
  border-radius: 16px;
  background: #FFFDF9;
  box-shadow: 0 1px 2px rgba(20, 17, 16, .03);
  font-size: 14.5px;
  line-height: 1.95;
}
.toc-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: #9C9488;
  margin-bottom: 10px;
}
.toc ol { margin: 0; padding-left: 1.5em; list-style: decimal; }
.toc li { margin-top: .25em; padding-left: .1em; }
.toc li::marker { color: #C0B7A8; font-variant-numeric: tabular-nums; }
.toc a { color: #3A332B; border-bottom: 0; }
.toc a:hover { color: #FF4B2B; }

/* 相关阅读：把 8 篇互相链起来，帮搜索引擎发现页面 */
.related {
  margin-top: 3.2em;
  padding-top: 2em;
  border-top: 1px solid rgba(20, 17, 16, .08);
}
.related-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: #9C9488;
  margin-bottom: 14px;
}
.related-list {
  display: grid;
  gap: 10px;
}
@media (min-width: 640px) {
  .related-list { grid-template-columns: 1fr 1fr; }
}
.related-list a {
  display: block;
  padding: 14px 17px;
  border: 1px solid rgba(20, 17, 16, .08);
  border-radius: 14px;
  background: #FFFDF9;
  color: #3A332B;
  font-size: 14.5px;
  line-height: 1.55;
  border-bottom: 1px solid rgba(20, 17, 16, .08);
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.related-list a:hover {
  border-color: rgba(255, 75, 43, .38);
  background: #FFF6F2;
  transform: translateY(-2px);
  color: #141110;
  box-shadow: 0 12px 26px -18px rgba(20, 17, 16, .4);
}

/* 文末转化条 */
.cta-card {
  margin-top: 2.6em;
  padding: 30px 26px;
  border-radius: 22px;
  border: 1px solid rgba(255, 75, 43, .18);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 75, 43, .12), rgba(255, 231, 223, 0) 62%),
    #FFFDF9;
  box-shadow: 0 24px 50px -34px rgba(20, 17, 16, .45);
  text-align: center;
}
.cta-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #141110;
}
.cta-card p {
  margin: 0 auto 18px;
  max-width: 42ch;
  font-size: 14.5px;
  line-height: 1.8;
  color: #7A7166;
}

/* 面包屑 */
.crumb {
  font-size: 13px;
  color: #9C9488;
  margin-bottom: 22px;
}
.crumb a { color: #7A7166; border-bottom: 0; }
.crumb a:hover { color: #FF4B2B; }
.crumb span { margin: 0 7px; opacity: .55; }

/* 文章页头 */
.post-head { max-width: 68ch; margin: 0 auto 34px; }
.post-head h1 {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #141110;
  margin: 0;
}
@media (min-width: 640px) {
  .post-head h1 { font-size: 38px; line-height: 1.24; }
}
.post-meta {
  margin-top: 14px;
  font-size: 13px;
  color: #9C9488;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
