/* =========================================================
   theory.css — 命理研究栏目样式
   ========================================================= */
.theory-hero .w-glyph {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--dai), #2a453f);
  color: #f7e9c9; font-size: 30px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; box-shadow: 0 4px 14px rgba(62,90,82,0.35);
  font-family: "KaiTi", "STKaiti", serif;
}
.theory-hero h1 { font-size: 28px; margin: 0 0 8px; color: var(--ink); }
.theory-hero .w-tag { color: var(--ink-soft); font-size: 15px; max-width: 720px; margin: 0 auto; text-align: center; }

.theory-wrap {
  max-width: 1180px; margin: 0 auto; padding: 0 20px 40px;
  display: grid; grid-template-columns: 240px 1fr; gap: 28px;
}
.theory-side {
  background: rgba(255,255,255,0.78); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 18px; box-shadow: 0 4px 16px rgba(90,60,20,0.08);
  position: sticky; top: 16px; height: fit-content;
}
.theory-side h3 { font-size: 15px; color: var(--zhe); margin: 0 0 10px; font-weight: 700; }
.theory-side ul { list-style: none; padding: 0; margin: 0; }
.theory-side li { margin-bottom: 4px; }
.theory-side > ul > li > a { font-size: 14.5px; color: var(--ink); font-weight: 600; padding: 6px 8px; display: block; border-radius: 6px; text-decoration: none; }
.theory-side > ul > li > a.active, .theory-side > ul > li > a:hover { background: rgba(189,154,78,0.12); color: var(--zhu); }
.theory-side ul ul { padding-left: 14px; margin-top: 2px; }
.theory-side ul ul li a { font-size: 13.5px; color: var(--zhe); padding: 4px 8px; display: block; border-radius: 6px; text-decoration: none; }
.theory-side ul ul li a:hover { color: var(--zhu); background: rgba(189,154,78,0.08); }

.theory-main { display: flex; flex-direction: column; gap: 22px; }
.theory-block {
  background: rgba(255,255,255,0.82); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 32px; box-shadow: 0 4px 16px rgba(90,60,20,0.08);
}
.theory-block h2 { font-family: "KaiTi","STKaiti",serif; font-size: 26px; color: var(--ink); margin: 0 0 12px; }
.theory-block h3 { font-family: "KaiTi","STKaiti",serif; font-size: 22px; color: var(--zhu); margin: 0 0 12px; }
.theory-block p { font-size: 15px; color: var(--ink); line-height: 1.9; margin: 0 0 10px; }
.theory-intro p { font-size: 15.5px; }

.theory-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 12px; }
.theory-card {
  display: block; padding: 18px 20px; background: rgba(189,154,78,0.10);
  border: 1px solid rgba(189,154,78,0.3); border-radius: 12px; text-decoration: none; color: var(--ink);
  transition: all .2s;
}
.theory-card:hover { background: rgba(189,154,78,0.20); color: var(--zhu); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(189,154,78,0.2); }
.t-ico { font-size: 28px; margin-bottom: 6px; }
.theory-card h4 { font-size: 17px; margin: 0 0 6px; font-family: "KaiTi","STKaiti",serif; }
.theory-card p { font-size: 13.5px; color: var(--zhe); margin: 0; line-height: 1.6; }
.theory-card:hover p { color: var(--ink); }

.theory-note { background: rgba(62,90,82,0.08); border-color: rgba(62,90,82,0.3); }
.t-link { color: var(--zhu); text-decoration: underline; }

@media (max-width: 860px) {
  .theory-wrap { grid-template-columns: 1fr; }
  .theory-side { position: static; }
  .theory-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .theory-block { padding: 22px 18px; }
  .theory-block h2 { font-size: 22px; }
  .theory-block h3 { font-size: 18px; }
}

/* 子页（单篇文章）样式 */
.theory-article { max-width: 820px; margin: 0 auto; padding: 0 20px 40px; }
.theory-article .article-h {
  text-align: center; padding: 20px 16px 12px;
}
.theory-article .article-h h1 { font-family: "KaiTi","STKaiti",serif; font-size: 30px; color: var(--ink); margin: 0 0 8px; }
.theory-article .article-h p { color: var(--zhe); font-size: 15px; max-width: 640px; margin: 0 auto; }
.theory-article .article-meta { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.theory-article section { background: rgba(255,255,255,0.82); border: 1px solid var(--border); border-radius: 14px; padding: 24px 30px; margin-bottom: 18px; box-shadow: 0 4px 16px rgba(90,60,20,0.08); }
.theory-article h2 { font-family: "KaiTi","STKaiti",serif; font-size: 22px; color: var(--zhu); margin: 0 0 12px; }
.theory-article h3 { font-family: "KaiTi","STKaiti",serif; font-size: 18px; color: var(--zhe); margin: 18px 0 8px; }
.theory-article p { font-size: 15px; color: var(--ink); line-height: 1.9; margin: 0 0 10px; }
.theory-article ul, .theory-article ol { padding-left: 22px; font-size: 14.5px; color: var(--ink); line-height: 1.85; }
.theory-article table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.theory-article th { background: rgba(189,154,78,0.18); color: var(--ink); padding: 8px 10px; text-align: left; border: 1px solid var(--border); }
.theory-article td { padding: 8px 10px; border: 1px solid var(--border); color: var(--ink); }
.theory-article blockquote { background: rgba(189,154,78,0.10); border-left: 3px solid var(--zhu); padding: 12px 16px; margin: 12px 0; font-size: 14.5px; color: var(--zhe); }
.theory-article .source { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.theory-article .back-link { display: inline-block; margin-bottom: 14px; font-size: 13px; color: var(--zhu); text-decoration: none; }
.theory-article .back-link:hover { text-decoration: underline; }
