@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@600;700&display=swap');

:root {
  --bg: #f5f3ef; --card-bg: #ffffff; --text: #4a5060; --text-light: #8a8d96;
  --primary: #2a7c76; --primary-dark: #1a5c57; --accent: #9b4830;
  --border: #e2dfd8; --tag-bg: #f0ebe2; --tag-text: #9b4830;
  --quote-bg: #faf6f0; --quote-border: #d4a574;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
  --heading-font: "Noto Serif SC", "Songti SC", "STSong", serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.85; font-size: 16px; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
header { background: linear-gradient(135deg, #2a7c76, #1a5c57); color: #fff;
  padding: 32px 0; margin-bottom: 28px; }
header h1 { font-family: var(--heading-font); font-size: 1.75em; font-weight: 700; }
header .subtitle { font-size: .95em; opacity: .85; margin-top: 6px; }

/* stats bar */
.stats-bar { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 22px; box-shadow: var(--shadow); flex: 1; min-width: 140px; text-align: center; }
.stat-card .num { font-family: var(--heading-font); font-size: 1.8em; font-weight: 700;
  color: var(--primary); }
.stat-card .label { font-size: .85em; color: var(--text-light); margin-top: 2px; }

/* search & filter */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 20px; }
.search-box { flex: 1; min-width: 200px; padding: 10px 16px; border: 1px solid var(--border);
  border-radius: 12px; font-size: 1em; outline: none; background: var(--card-bg);
  transition: border-color .2s, box-shadow .2s; }
.search-box:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(42,124,118,.12); }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
  align-items: center; }
.filter-btn { padding: 6px 16px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--card-bg); cursor: pointer; font-size: .85em; transition: all .2s; }
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: #fff;
  border-color: var(--primary); }

/* cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px; margin-bottom: 30px; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  display: block; color: inherit; }
.card:hover { transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
  text-decoration: none; }
.card h3 { font-family: var(--heading-font); font-size: 1.05em; font-weight: 700;
  margin-bottom: 8px; color: #1a1d23; }
.card .meta { font-size: .82em; color: var(--text-light); }
.card .meta span { margin-right: 12px; }
.card .badge { display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: .75em; background: var(--tag-bg); color: var(--tag-text); margin-right: 4px;
  font-weight: 500; }

/* case entry */
.case-section { margin-bottom: 24px; }
.case-link { display: inline-block; padding: 8px 18px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  margin: 4px; font-size: .9em; transition: all .2s; }
.case-link:hover { background: var(--primary); color: #fff; text-decoration: none;
  border-color: var(--primary); }

/* article page */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px;
  padding: 8px 18px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); font-size: .9em; transition: all .2s; }
.back-link:hover { background: var(--primary); color: #fff; text-decoration: none;
  border-color: var(--primary); }
.article { background: transparent; border-radius: 0; padding: 0;
  box-shadow: none; margin-bottom: 30px; }
.article h1 { font-family: var(--heading-font); font-size: 28px; font-weight: 700;
  color: #1a1d23; margin-bottom: 18px; line-height: 1.4;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 32px 24px; box-shadow: var(--shadow); }
.article h2 { font-family: var(--heading-font); font-size: 22px; font-weight: 700;
  color: #2a7c76; margin: 0; padding: 0; border-bottom: none; }
.article h3 { font-family: var(--heading-font); font-size: 18px; font-weight: 700;
  margin: 22px 0 10px; color: #1a1d23; }
.article p { margin-bottom: 18px; max-width: 680px; }
.article ul, .article ol { margin: 8px 0 14px 24px; }
.article li { margin-bottom: 5px; line-height: 1.8; }
.article blockquote { background: var(--quote-bg); border-left: 3px solid var(--quote-border);
  padding: 20px 24px; margin: 28px 0; border-radius: 0 12px 12px 0; font-style: italic;
  color: #6b5230; position: relative; }
.article blockquote::before { content: "\201C"; position: absolute; top: 8px; left: 12px;
  font-size: 3rem; opacity: 0.3; color: #d4a574; line-height: 1; font-family: Georgia, serif; }
.article blockquote p { margin-bottom: 6px; padding-left: 20px; }
.article code { background: #faf6f0; border: 1px solid #e8e2d6; padding: 2px 6px;
  border-radius: 4px; font-size: .9em; color: #6b5230; }
.article hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.article strong { color: #9b4830; font-weight: 600; }
.article img { max-width: 100%; border-radius: 12px; }

/* ── chapter divider ─────────────────────────────── */
.chapter-divider { text-align: center; color: #d4a574; opacity: 0.4;
  letter-spacing: 8px; margin: 32px 0; font-size: .9em; }

/* ── 章节卡片 ─────────────────────────────────── */
.chapter-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin: 28px 0;
}
.chapter-card h2 {
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 700;
  color: #2a7c76;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: none !important;
}
.chapter-card .chapter-subtitle {
  font-family: var(--heading-font);
  font-size: 1.05em;
  font-weight: 700;
  color: #1a1d23;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ── 家庭档案卡 ─────────────────────────────────── */
.meta-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin: 0 0 8px;
}
.meta-card h2 {
  font-family: var(--heading-font);
  font-size: 1.15em;
  color: #1a1d23;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: none !important;
}
.meta-card ul { margin: 0; padding: 0; list-style: none; }
.meta-card li { padding: 4px 0; color: var(--text); font-size: .92em; }
.meta-card li::before { content: "\2022"; color: var(--primary); margin-right: 8px;
  font-weight: 700; }

/* ── 精选时间线卡 ─────────────────────────────────── */
.timeline-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin: 28px 0;
}
.timeline-card h2 {
  font-family: var(--heading-font);
  font-size: 1.15em;
  color: #2a7c76;
  margin: 0 0 20px !important;
  padding: 0 !important;
  border: none !important;
}
.timeline-card ul { list-style: none; margin: 0; padding: 0 0 0 12px; }
.timeline-card li {
  position: relative;
  padding: 6px 0 6px 28px;
  font-size: .9em;
  color: var(--text);
  line-height: 1.7;
}
.timeline-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 14px;
  width: 10px; height: 10px;
  background: #2a7c76;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #b0c4b8;
}
.timeline-card li::after {
  content: "";
  position: absolute;
  left: 4px; top: 24px;
  bottom: -6px;
  width: 2px;
  border-left: 2px dashed #cec9be;
}
.timeline-card li:last-child::after { display: none; }

/* ── 复盘问答卡 ─────────────────────────────────── */
.qa-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin: 28px 0;
}
.qa-card h2 {
  font-family: var(--heading-font);
  font-size: 1.15em;
  color: #2a7c76;
  margin: 0 0 20px !important;
  padding: 0 !important;
  border: none !important;
}
.qa-card .qa-item { margin-bottom: 22px; }
.qa-card .qa-item:last-child { margin-bottom: 0; }
.qa-card .qa-q {
  font-weight: 600;
  color: #1a1d23;
  margin-bottom: 8px;
  padding-left: 36px;
  position: relative;
  font-size: .95em;
}
.qa-card .qa-q::before {
  content: "Q";
  position: absolute;
  left: 0;
  color: #fff;
  background: #2a7c76;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: .72em;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  top: 1px;
}
.qa-card .qa-a {
  padding-left: 36px;
  color: var(--text);
  font-size: .92em;
  line-height: 1.85;
}

/* ── 发布提醒卡 ─────────────────────────────────── */
.notice-card {
  background: #fef9ef;
  border: 1px solid #f0dca0;
  border-radius: 16px;
  padding: 22px 26px;
  margin: 28px 0;
  font-size: .88em;
  color: #8a6d3b;
}
.notice-card h2 {
  font-family: var(--heading-font);
  font-size: 1em;
  color: #8a6d3b;
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: none !important;
}
.notice-card ul { margin: 0; padding: 0 0 0 18px; }
.notice-card li { margin-bottom: 5px; }

/* ── 导语区域 ─────────────────────────────────── */
.intro-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin: 28px 0;
}
.intro-card h2 {
  font-family: var(--heading-font);
  font-size: 1.1em;
  color: #2a7c76;
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: none !important;
}

/* toc */
.toc { background: var(--quote-bg); border: 1px solid #e8e2d6; border-radius: 12px;
  padding: 18px 22px; margin-bottom: 24px; }
.toc h4 { font-family: var(--heading-font); font-size: .95em; margin-bottom: 10px;
  color: var(--primary); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 5px; }
.toc a { font-size: .88em; color: var(--primary); }
.toc a:hover { color: var(--primary-dark); }

/* details */
details { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 14px; overflow: hidden; }
details summary { padding: 14px 18px; cursor: pointer; font-weight: 600;
  background: var(--quote-bg); color: #1a1d23; transition: background .2s; }
details summary:hover { background: #f0ebe2; }
details .detail-body { padding: 18px; }

footer { text-align: center; padding: 24px; color: var(--text-light); font-size: .82em; }

/* no result */
.no-result { text-align: center; padding: 40px; color: var(--text-light); font-size: 1.1em; }

/* ── 30秒速览卡片 ───────────────────────────────── */
.speed-card {
  background: linear-gradient(135deg, #faf8f4, #f0ede6);
  border: 1px solid #ddd8ce;
  border-radius: 16px;
  padding: 28px 28px 20px;
  margin: 28px 0;
  box-shadow: var(--shadow);
}
.speed-card h2 {
  font-family: var(--heading-font) !important;
  font-size: 22px !important;
  font-weight: 700;
  margin: 0 0 22px !important;
  padding: 0 !important;
  border: none !important;
  color: #1a1d23;
  letter-spacing: .5px;
}
.sc-section { margin-bottom: 20px; }
.sc-section:last-child { margin-bottom: 0; }
.sc-title {
  font-size: .95em;
  font-weight: 700;
  color: #1a1d23;
  margin-bottom: 10px;
}
/* 起步条件：树状列表 */
.sc-tree { padding-left: 6px; }
.sc-tree-item {
  position: relative;
  padding: 3px 0 3px 22px;
  font-size: .9em;
  color: var(--text);
  line-height: 1.7;
}
.sc-tree-item::before {
  content: "\251C\2500";
  position: absolute;
  left: 0;
  color: #c4bfb3;
  font-family: monospace;
  font-size: .85em;
}
.sc-tree-item:last-child::before { content: "\2514\2500"; }

/* 关键里程碑：时间轴 */
.sc-timeline { padding-left: 8px; }
.sc-milestone {
  position: relative;
  padding: 4px 0 4px 28px;
  font-size: .9em;
  line-height: 1.7;
}
.sc-milestone::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  border-left: 2px dashed #cec9be;
}
.sc-milestone::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 10px;
  height: 10px;
  background: #2a7c76;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #b0c4b8;
  z-index: 1;
}
.sc-milestone:last-child::before { height: 12px; }
.sc-day {
  display: inline-block;
  min-width: 64px;
  font-weight: 700;
  color: #2a7c76;
  font-variant-numeric: tabular-nums;
}
.sc-desc { color: var(--text); }

/* 家长原话 */
.sc-quotes { padding-left: 6px; }
.sc-quote {
  position: relative;
  padding: 5px 0 5px 20px;
  font-size: .9em;
  color: #6b5230;
  font-style: italic;
  line-height: 1.7;
}
.sc-quote::before {
  content: "\2502";
  position: absolute;
  left: 4px;
  color: #d4a574;
  font-family: monospace;
  font-weight: 700;
}

/* 适合参考：标签 */
.sc-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 6px; margin-top: 4px; }
.sc-tag {
  display: inline-block;
  padding: 3px 14px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 14px;
  font-size: .82em;
  font-weight: 500;
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .speed-card { padding: 20px 18px 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .chapter-card, .meta-card, .timeline-card, .qa-card,
  .intro-card, .notice-card { padding: 20px 18px; border-radius: 12px; }
  .article h1 { padding: 20px 18px 16px; font-size: 22px; border-radius: 12px; }
  header h1 { font-size: 1.3em; }
  header { padding: 24px 0; }
  .stat-card { min-width: 100px; padding: 14px 16px; }
  .card { padding: 16px; border-radius: 12px; }
}
