/* ============================================================
   星光的学习笔记 · 清新自然风
   淡绿底 + 清新绿/深绿配色 + 精致圆角与柔和阴影
   ============================================================ */

:root {
  --bg: #f0f6ee;
  --surface: #fbfdf9;
  --surface-2: #e6efe2;
  --ink: #35413a;
  --ink-soft: #55665c;
  --muted: #7f9085;
  --line: #d9e6d6;
  --accent: #6aa878;        /* 清新绿 */
  --accent-deep: #46855a;   /* 深绿 */
  --accent-soft: #ddecdd;
  --tag-math: #6b9a6e;
  --tag-chem: #46855a;
  --tag-work: #7a9a6a;
  --tag-exam: #5a8a6a;
  --radius: 16px;
  --shadow-sm: 0 2px 8px rgba(70, 100, 80, .07);
  --shadow-md: 0 10px 30px rgba(70, 100, 80, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  /* 细纸纹质感 */
  background-image: radial-gradient(rgba(90,140,100,.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

a { color: var(--accent-deep); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); text-decoration: underline; }

.container { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0;
  background: rgba(240,246,238,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-weight: 700; font-size: 19px; color: var(--ink);
  letter-spacing: .5px;
}
.brand .logo-emoji { margin-right: 4px; }
.brand:hover { text-decoration: none; color: var(--accent-deep); }
.menu { display: flex; gap: 20px; font-size: 14.5px; }
.menu a { color: var(--ink-soft); }
.menu a:hover { color: var(--accent-deep); text-decoration: none; }

/* ===== 首页首屏 ===== */
.hero {
  padding: 76px 20px 60px;
  text-align: center;
  position: relative;
}
/* 手账风格装饰：柔和渐变光斑 */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  z-index: -1;
}
.hero::before { width: 340px; height: 340px; background: #dcead9; top: -80px; left: 8%; }
.hero::after  { width: 300px; height: 300px; background: #d0e4d2; bottom: -40px; right: 6%; }

.hero-eyebrow {
  display: inline-block;
  font-size: 13px; letter-spacing: 2px; color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 5px 16px; border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 42px; margin-bottom: 14px; color: var(--ink);
  line-height: 1.3;
}
.hero h1 .accent {
  color: var(--accent-deep);
  /* 手绘下划线 */
  background: linear-gradient(transparent 68%, #cfe2ce 68%, #cfe2ce 90%, transparent 90%);
  padding: 0 4px;
}
.lead { font-size: 17px; color: var(--ink-soft); }
.hero-btns { margin-top: 28px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 11px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; border-radius: 999px; font-size: 15px;
  box-shadow: 0 6px 16px rgba(185, 93, 43, .25);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(185,93,43,.3); color:#fff; }
.btn-ghost {
  background: var(--surface); color: var(--accent-deep);
  border: 1.5px solid var(--accent); box-shadow: none;
}
.btn-ghost:hover { background: var(--accent-soft); }

/* ===== 板块 ===== */
section { margin-bottom: 52px; }
.section-title {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 24px; margin-bottom: 20px; color: var(--ink);
  display: flex; align-items: center; gap: 12px;
}
/* 小标题统一：左侧固定色条 + 右侧渐隐线，所有板块标题起点和终点对齐 */
.section-title::before {
  content: ""; width: 6px; height: 24px; border-radius: 3px;
  background: linear-gradient(var(--accent), var(--accent-deep));
}
.section-title::after {
  content: ""; flex: 1; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ===== 文章卡片 ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .tag {
  align-self: flex-start;
  display: inline-block; font-size: 12px; color: #fff;
  background: var(--tag-chem); padding: 3px 12px; border-radius: 999px; margin-bottom: 12px;
}
.tag-math { background: var(--tag-math) !important; }
.tag-chem { background: var(--tag-chem) !important; }
.tag-work { background: var(--tag-work) !important; }
.tag-exam { background: var(--tag-exam) !important; }
.tag-book { background: #6b8f88 !important; }
.tag-bio { background: #4c9e5a !important; }
.card h3 { font-size: 17px; margin-bottom: 8px; line-height: 1.5; color: var(--ink); }
.card p { font-size: 14px; color: var(--muted); flex: 1; }
.card .more { margin-top: 14px; font-size: 14px; font-weight: 600; }
.card .more::after { content: " →"; }

/* ===== 双栏板块（列表卡片统一成一样宽的盒子） ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card-head {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 18px; margin-bottom: 8px; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.card-head::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent-deep));
}
.card .plain-list {
  border: none; box-shadow: none; background: transparent;
  padding: 4px 0 0; border-radius: 0;
}

/* ===== 关于页 · 免费资料 CTA ===== */
.about-cta {
  margin-top: 18px; padding: 16px 18px;
  background: linear-gradient(135deg, #e8f2e4, #d6e9d2);
  border-radius: 12px; color: var(--ink-soft);
}
.about-cta .kw {
  display: inline-block; background: #fff; color: var(--accent-deep);
  padding: 1px 12px; border-radius: 999px; font-weight: 700;
}

/* ===== 简单列表 ===== */
.plain-list {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 22px; list-style: none; box-shadow: var(--shadow-sm);
}
.plain-list li { padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.plain-list li:last-child { border-bottom: none; }
.plain-list li a { color: var(--ink-soft); font-weight: 500; }
.plain-list li a:hover { color: var(--accent-deep); }
.plain-list li a::before { content: "✧ "; color: var(--accent); }

/* ===== 关于 ===== */
.about {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; color: var(--ink-soft); box-shadow: var(--shadow-sm);
  max-width: 900px; margin: 0 auto;
}

/* ===== 底部 ===== */
.site-footer {
  margin-top: 70px;
  background: #e3ece0;
  border-top: 1px solid var(--line);
  padding: 28px 0; font-size: 13px; color: var(--ink-soft);
}
.footer-inner { text-align: center; }
.footer-inner p { margin: 4px 0; }
.icp a, .gongan a { color: var(--ink-soft); }
.icp a:hover, .gongan a:hover { color: var(--accent-deep); }

/* ===== 404 ===== */
.notfound { text-align: center; padding: 110px 20px; }
.notfound h1 { font-size: 76px; color: var(--accent-deep); font-family: Georgia, serif; }
.notfound p { color: var(--muted); margin-bottom: 26px; font-size: 16px; }

/* ============================================================
   文章阅读页
   ============================================================ */
.article-header {
  padding: 52px 20px 6px;
  max-width: 860px; margin: 0 auto;
  text-align: center;
}
.article-header h1 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 32px; line-height: 1.4; color: var(--ink);
}
.article-meta { margin-top: 16px; font-size: 13px; color: var(--muted); }
.article-meta .tag {
  display: inline-block; font-size: 12px; color: #fff;
  background: var(--tag-chem); padding: 3px 12px; border-radius: 999px; margin-right: 8px;
}

.article-body {
  max-width: 860px; margin: 26px auto 0; padding: 0 20px 20px;
  font-size: 16px; color: var(--ink-soft);
}
.article-body h2 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 23px; margin: 40px 0 14px; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.article-body h2::after { content: ""; flex: 1; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent); }
.article-body h3 { font-size: 18px; margin: 26px 0 10px; color: var(--ink); }
.article-body p { margin: 14px 0; }
.article-body ul, .article-body ol { margin: 14px 0; padding-left: 24px; }
.article-body li { margin: 7px 0; }
.article-body strong { color: var(--ink); }

.article-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  padding: 14px 18px; margin: 18px 0; color: var(--ink-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* 提示 / 警告框 */
.article-body .tip {
  background: #eff6ec; border: 1px solid #d3e4cd;
  border-radius: 12px; padding: 14px 18px; margin: 18px 0; color: #4f7a4d;
}
.article-body .warn {
  background: #f9ece3; border: 1px solid #eccbb2;
  border-radius: 12px; padding: 14px 18px; margin: 18px 0; color: #8a4a2a;
}

/* 方程式表格 */
.article-table {
  width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.article-table th {
  background: var(--surface-2); text-align: left; padding: 11px 16px;
  font-size: 13px; color: var(--accent-deep); font-weight: 600;
}
.article-table td { padding: 11px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.article-table tr:hover td { background: #f0f6ec; }
.article-table .eq { font-family: Consolas, "Courier New", monospace; white-space: nowrap; color: var(--ink); }
.article-group td { background: var(--surface-2); font-weight: 700; color: var(--accent-deep); }

.backlink { display: block; margin: 44px 0 0; font-size: 14px; }
.backlink a { color: var(--accent-deep); font-weight: 600; }

/* ===== 复选按钮样式 ===== */
ul.check { list-style: none; padding-left: 0; }
ul.check li { padding-left: 26px; position: relative; }
ul.check li::before { content: "☐"; position: absolute; left: 0; color: var(--accent); }
ul.check li.done::before { content: "☑"; }

/* ===== 移动端 ===== */
@media (max-width: 560px) {
  .menu { gap: 12px; font-size: 13px; }
  .hero { padding: 56px 20px 44px; }
  .hero h1 { font-size: 32px; }
  .lead { font-size: 15.5px; }
  .section-title { font-size: 20px; }
  .article-header h1 { font-size: 25px; }
  .two-col { grid-template-columns: 1fr; }
}
