/* =========================================================================
   RainRoot — 家庭园艺指南
   设计语言：温暖泥土绿 + 奶油底 + 圆润有机造型
   字体：Fraunces（标题衬线）+ Source Sans 3（正文无衬线）
   ========================================================================= */

:root {
  --bg: #fbfaf6;
  --bg-soft: #f2f0e7;
  --card: #ffffff;
  --card-2: #f7f5ee;
  --line: #e6e1d3;
  --line-strong: #c8c1ac;
  --ink: #233229;
  --ink-soft: #5c6b5e;
  --ink-faint: #8b9486;
  --accent: #2e7d43;
  --accent-2: #6b9c3f;
  --green: #2e7d43;
  --gold: #b07d2b;
  --hero-a: #eaf2e2;
  --hero-b: #f5f0df;
  --shadow: 0 1px 3px rgba(35, 50, 41, 0.07), 0 5px 14px rgba(35, 50, 41, 0.05);
  --shadow-lg: 0 6px 16px rgba(35, 50, 41, 0.10), 0 20px 44px rgba(35, 50, 41, 0.10);
  --radius: 12px;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #101711;
  --bg-soft: #171f18;
  --card: #1a231b;
  --card-2: #212c22;
  --line: #2c372d;
  --line-strong: #3f4b40;
  --ink: #e9f0e9;
  --ink-soft: #a7b3a8;
  --ink-faint: #7c887d;
  --accent: #6fbf8a;
  --accent-2: #8fca72;
  --green: #6fbf8a;
  --gold: #d9a441;
  --hero-a: #1e2d21;
  --hero-b: #14201a;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 5px 14px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.45), 0 20px 44px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

img { max-width: 100%; display: block; }

.line-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; }

/* =========================================================================
   页头
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] .site-header { background: rgba(16, 23, 17, 0.88); backdrop-filter: saturate(150%) blur(8px); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 66px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  font-size: 24px;
  background: var(--accent-2);
  border: none;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.brand-tag { font-size: 11px; letter-spacing: 0.04em; color: var(--ink-soft); }

.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav > a,
.nav-drop > summary {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  border-radius: 9px;
  cursor: pointer;
  list-style: none;
  text-decoration: none;
}
.nav > a:hover,
.nav-drop[open] > summary { background: var(--bg-soft); color: var(--accent); text-decoration: none; }
.nav-drop { position: relative; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after { content: ' ▾'; font-size: 10px; color: var(--ink-soft); }
.nav-drop-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 232px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 60;
}
.nav-drop-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--ink);
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}
.nav-drop-menu a:hover { background: var(--bg-soft); color: var(--accent); text-decoration: none; }
.nav-tool-icon { font-size: 20px; color: var(--accent-2); width: 22px; text-align: center; flex: none; }
.nav-tool-icon .line-icon { width: 20px; height: 20px; }
.nav-tool-label { flex: 1; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover { background: var(--bg-soft); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.lang-select {
  font-size: 13.5px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.lang-select:focus { outline: none; border-color: var(--accent); }

/* 广告槽 */
.ad-slot { margin: 16px auto; text-align: center; min-height: 0; }

/* =========================================================================
   Hero（花园苗圃视觉）
   ========================================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 36px;
  align-items: center;
  padding: 56px 0 44px;
}
.hero-eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-2);
}
.leaf-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #fff;
  vertical-align: -5px;
  margin-right: 7px;
}
.leaf-mark .line-icon { width: 14px; height: 14px; }
.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero .sub { font-size: 17.5px; color: var(--ink-soft); max-width: 52ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.cta, .cta-ghost {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 600;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.cta {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(46, 125, 67, 0.28);
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(46, 125, 67, 0.36); text-decoration: none; color: #fff; }
html[data-theme="dark"] .cta { background: #2f6d43; box-shadow: 0 4px 14px rgba(47, 109, 67, 0.4); }
html[data-theme="dark"] .cta:hover { box-shadow: 0 6px 18px rgba(47, 109, 67, 0.5); }
.cta-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line-strong);
}
.cta-ghost:hover { background: var(--bg-soft); text-decoration: none; border-color: var(--accent); }

/* 花园苗圃视觉（右栏）：大嫩芽 + 四角漂浮园艺小图标 */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background: radial-gradient(120% 120% at 30% 18%, var(--hero-a), var(--hero-b));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-sprout {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 92px;
  color: var(--accent);
}
.hero-sprout .line-icon { width: 1em; height: 1em; }
.hero-plot {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  padding: 22px;
}
.plot-item {
  display: flex;
  align-items: center;
  justify-content: center;
  place-self: center;
  width: 46px;
  height: 46px;
  font-size: 22px;
  color: var(--accent-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow);
}
.plot-item .line-icon { width: 22px; height: 22px; }

/* =========================================================================
   区块标题
   ========================================================================= */
.section-title {
  margin: 34px 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 5px;
  height: 22px;
  background: var(--accent-2);
  border-radius: 3px;
  flex: none;
}
.section-more { margin-top: 22px; text-align: center; }

/* =========================================================================
   分类卡
   ========================================================================= */
.cat-section { margin-top: 8px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 14px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 12px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  border-color: var(--accent-2);
}
.category-icon { font-size: 34px; color: var(--accent-2); line-height: 1; }
.category-icon .line-icon { width: 34px; height: 34px; }
.category-name { font-size: 13.5px; font-weight: 600; text-align: center; line-height: 1.35; }

/* =========================================================================
   文章列表卡（首页 + 列表页）
   ========================================================================= */
.article-section { margin-top: 8px; }
.article-list { display: flex; flex-direction: column; gap: 14px; }
.article-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform .14s ease, box-shadow .14s ease, border-left-color .14s ease, background .14s ease;
}
.article-card:hover {
  transform: translateX(3px);
  border-left-color: var(--accent);
  background: var(--bg-soft);
  text-decoration: none;
}
.article-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink); line-height: 1.3; }
.article-intro { color: var(--ink-soft); font-size: 15px; }

/* =========================================================================
   列表页页头
   ========================================================================= */
.page-head { padding: 40px 0 8px; }
.page-head .hero-eyebrow { margin-bottom: 8px; }
.page-head h1 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.02em; }
.page-head .sub { margin: 0; color: var(--ink-soft); font-size: 16px; max-width: 68ch; }

/* =========================================================================
   面包屑
   ========================================================================= */
.breadcrumb { display: flex; align-items: center; gap: 8px; padding: 18px 0 0; font-size: 13.5px; color: var(--ink-soft); flex-wrap: wrap; }
.breadcrumb .sep { color: var(--ink-faint); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* =========================================================================
   文章详情 / 关于 / 隐私 / 条款
   ========================================================================= */
.article { max-width: 760px; padding: 24px 0 10px; }
.article h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
.article .intro { color: var(--ink-soft); font-size: 16.5px; }
.article-section { margin: 28px 0; }
.article-section h2 { font-family: var(--font-display); font-weight: 700; font-size: 23px; margin: 0 0 10px; color: var(--ink); }
.article-section p { margin: 0 0 12px; }
.verdict-box {
  padding: 18px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-2);
  border-radius: var(--radius);
}
.verdict-box p { margin: 0; }
.faq-item { margin: 14px 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.faq-item h3 { margin: 0 0 6px; font-size: 16px; }
.faq-item p { margin: 0; color: var(--ink-soft); }

/* =========================================================================
   相关文章
   ========================================================================= */
.related { margin: 34px 0 40px; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.related-list a {
  display: inline-block;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius);
  color: var(--ink);
}
.related-list a:hover { background: var(--bg-soft); text-decoration: none; }

/* =========================================================================
   联系表单
   ========================================================================= */
.contact-email { font-size: 15.5px; }
.contact-success { padding: 16px 18px; background: var(--bg-soft); border: 1px solid var(--green); border-radius: var(--radius); color: var(--green); }
.contact-form { max-width: 520px; display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.contact-form button {
  align-self: flex-start;
  padding: 13px 26px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.contact-form button:hover { box-shadow: 0 6px 18px rgba(46, 125, 67, 0.3); }
html[data-theme="dark"] .contact-form button { background: #2f6d43; }
html[data-theme="dark"] .contact-form button:hover { box-shadow: 0 6px 18px rgba(47, 109, 67, 0.4); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* =========================================================================
   404
   ========================================================================= */
.hero-single { display: block; padding: 64px 0; text-align: center; }
.hero-single .sub { margin: 0 auto 22px; }
.notfound-link {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.notfound-link:hover { text-decoration: none; opacity: .92; }

/* =========================================================================
   页脚
   ========================================================================= */
.site-footer {
  margin-top: 40px;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  text-align: center;
}
.friend-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.friend-links a { color: var(--ink-soft); font-size: 14px; }
.footer-brand { margin: 0 0 6px; color: var(--ink); }
.brand-mono { font-family: var(--font-display); font-weight: 700; color: var(--accent-2); }
.site-footer .privacy { margin: 0 0 12px; color: var(--ink-soft); font-size: 13.5px; }
.legal-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.legal-links a { color: var(--ink-soft); font-size: 13.5px; }

/* =========================================================================
   响应式
   ========================================================================= */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 36px 0 24px; }
  .hero-visual { max-width: 420px; }
  .header-inner { gap: 10px; }
  .header-actions { margin-left: 0; }
  .nav { order: 3; width: 100%; }
}
