/* 心晴驿站 · 首页样式（与聊天页共享暖色系设计语言） */
:root {
  --bg: #faf3ec;
  --bg-soft: #f5ebe1;
  --panel: #fffaf5;
  --ink: #3e2f28;
  --ink-soft: #8a7468;
  --accent: #d97757;
  --accent-deep: #c05f3f;
  --accent-soft: #fbe9e0;
  --radius: 18px;
  --shadow: 0 4px 24px rgba(120, 80, 60, 0.08);
}

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

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }

/* ===== 顶栏 ===== */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 243, 236, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #f0e3d8;
}
.nav-inner {
  max-width: 960px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.brand .logo { font-size: 22px; }
.nav-cta {
  font-size: 14px; font-weight: 600;
  background: var(--accent); color: #fff;
  padding: 8px 18px; border-radius: 99px;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-deep); }

/* ===== Hero ===== */
.hero { padding: 88px 24px 72px; text-align: center; }
.hero-inner { max-width: 640px; margin: 0 auto; }
.hero h1 { font-size: 34px; font-weight: 700; letter-spacing: 1px; margin-bottom: 18px; }
.hero-sub { font-size: 16px; color: var(--ink-soft); margin-bottom: 34px; }
.mobile-br { display: none; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600;
  padding: 14px 32px; border-radius: 99px;
  box-shadow: 0 4px 16px rgba(217, 119, 87, 0.35);
  transition: all 0.15s;
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost {
  font-size: 15px; color: var(--ink-soft);
  padding: 14px 24px; border-radius: 99px;
  border: 1px solid #e8d9cc;
  transition: all 0.15s;
}
.btn-ghost:hover { color: var(--accent-deep); border-color: var(--accent); }

/* ===== 区块通用 ===== */
.section { padding: 64px 24px; }
.section-alt { background: var(--bg-soft); }
.section-inner { max-width: 960px; margin: 0 auto; }
.section h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.section-sub { font-size: 14px; color: var(--ink-soft); margin-bottom: 32px; }
.loading { color: var(--ink-soft); font-size: 14px; padding: 40px 0; text-align: center; }

/* ===== 科普文章卡片 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--panel);
  border: 1px solid #f0e3d8;
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(120, 80, 60, 0.13); }
.card .cat {
  align-self: flex-start;
  font-size: 11px; color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 3px 10px; border-radius: 99px;
  margin-bottom: 12px;
}
.card h3 { font-size: 16.5px; font-weight: 600; line-height: 1.5; margin-bottom: 10px; }
.card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }

/* ===== 论文列表 ===== */
.paper-list { display: flex; flex-direction: column; gap: 14px; }
.paper {
  background: var(--panel);
  border: 1px solid #f0e3d8;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.paper:hover { border-color: var(--accent); }
.paper .p-meta { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.paper h3 { font-size: 15.5px; font-weight: 600; line-height: 1.55; margin-bottom: 8px; }
.paper h3 a:hover { color: var(--accent-deep); }
.paper p { font-size: 13px; color: var(--ink-soft); line-height: 1.8; }
.paper .p-link { font-size: 12.5px; color: var(--accent); margin-top: 10px; display: inline-block; }

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 48px 24px calc(40px + env(safe-area-inset-bottom));
  color: var(--ink-soft);
}
.footer p { font-size: 14px; margin-bottom: 8px; }
.footer .fine { font-size: 12px; color: #b6a397; line-height: 1.9; }

/* ===== 移动端 ===== */
@media (max-width: 640px) {
  .hero { padding: 64px 20px 56px; }
  .hero h1 { font-size: 27px; }
  .hero-sub { font-size: 15px; }
  .mobile-br { display: none; }
  .section { padding: 48px 18px; }
  .card-grid { grid-template-columns: 1fr; }
}
