/* 51扩列 — 内容页共用样式（教程/模板/科普/文案页）
   设计：纯色暖底 + 靛蓝/珊瑚撞色，差异化圆角，轻盈阴影，衬线标题 */
:root {
  --primary: #4A3AFF;
  --primary-2: #5B4BFF;
  --secondary: #0FB5A6;
  --accent: #FF5C39;
  --ink: #1E1B33;
  --ink-2: #6B6684;
  --line: rgba(74, 58, 255, 0.16);
  --bg: #F4F1EC;
  --surface: #FFFFFF;

  --r-btn: 10px;
  --r-input: 12px;
  --r-card: 20px;
  --r-modal: 28px;
  --r-pill: 999px;

  --shadow-card: 0 6px 24px rgba(30, 27, 75, 0.07);
  --shadow-hover: 0 14px 40px rgba(30, 27, 75, 0.12);
  --shadow-btn: 0 6px 18px rgba(74, 58, 255, 0.28);
  --shadow-sm: 0 2px 8px rgba(30, 27, 75, 0.05);
  --tint: rgba(74, 58, 255, 0.06);

  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-display: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
  --font-geo: "Futura", "Century Gothic", "Trebuchet MS", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* 全站顶部导航条（与首页一致，sticky + 轻毛玻璃） */
.site-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 241, 236, 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(30, 27, 75, 0.06);
}
.site-topbar .inner {
  max-width: 1000px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 6px;
}
.site-topbar .brand-logo {
  display: flex; align-items: center; gap: 9px; margin-right: auto; text-decoration: none;
}
.site-topbar .brand-logo .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--primary); color: #fff;
  font-family: var(--font-geo); font-weight: 800; font-size: 15px; letter-spacing: 0.3px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-btn);
}
.site-topbar .brand-logo .word { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -0.2px; }
.site-topbar .navlinks { display: flex; gap: 4px; }
.site-topbar .navlinks a {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 13px; border-radius: var(--r-btn);
  transition: color 0.2s ease, background 0.2s ease;
}
.site-topbar .navlinks a:hover,
.site-topbar .navlinks a.active { color: var(--primary); background: var(--tint); }

/* content wrapper */
.content {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto; padding: 30px 20px 20px;
}

.doc-card {
  background: var(--surface);
  border: 1px solid rgba(30, 27, 75, 0.05);
  border-radius: var(--r-card); box-shadow: var(--shadow-card);
  padding: 36px 40px;
}

.doc-card h1 {
  font-family: var(--font-body);
  font-size: 30px; line-height: 1.22; margin-bottom: 16px;
  letter-spacing: -0.8px; font-weight: 800; color: var(--ink);
}
.doc-card h2 {
  font-family: var(--font-body);
  font-size: 21px; color: var(--ink); margin: 28px 0 12px; font-weight: 800; letter-spacing: -0.3px;
}
.doc-card h3 { font-size: 16px; color: var(--ink); margin: 18px 0 8px; }
.doc-card p { color: var(--ink-2); margin-bottom: 12px; font-size: 15.5px; }
.doc-card .lead { font-size: 16px; color: var(--ink); }
.doc-card ul, .doc-card ol { color: var(--ink-2); font-size: 15.5px; padding-left: 22px; margin-bottom: 14px; }
.doc-card li { margin-bottom: 8px; }
.doc-card a { color: var(--primary); text-decoration: none; font-weight: 600; }
.doc-card a:hover { text-decoration: underline; }
.doc-card strong { color: var(--ink); }

/* template detail blocks */
.tpl-item {
  display: flex; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.tpl-item:last-child { border-bottom: none; }
.tpl-swatch {
  flex: 0 0 auto; width: 70px; height: 70px; border-radius: var(--r-input);
  box-shadow: var(--shadow-sm);
}
.tpl-text h3 { margin: 0 0 4px; color: var(--primary); }
.tpl-text p { margin: 0; font-size: 14.5px; }

/* FAQ */
.faq-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { margin: 0 0 6px; color: var(--primary); font-size: 16px; }
.faq-item p { margin: 0; }

/* copyable 文案 blocks */
.wenan {
  background: rgba(74, 58, 255, 0.05); border: 1px solid var(--line);
  border-radius: var(--r-input); padding: 16px 18px; margin-bottom: 14px;
  position: relative;
}
.wenan .txt { white-space: pre-wrap; color: var(--ink); font-size: 15px; }
.wenan .copy {
  position: absolute; top: 12px; right: 12px;
  border: none; cursor: pointer; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: var(--r-pill);
  transition: background 0.2s ease;
}
.wenan .copy:hover { background: var(--accent); }

/* CTA */
.cta { text-align: center; margin-top: 28px; }
.cta-btn {
  display: inline-block; text-decoration: none;
  background: var(--accent);
  color: #fff !important; font-size: 16px; font-weight: 700;
  padding: 15px 30px; border-radius: var(--r-btn);
  box-shadow: 0 6px 18px rgba(255, 92, 57, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cta-btn:hover { transform: translateY(-2px); background: #ff6f50; box-shadow: 0 12px 30px rgba(255,92,57,0.34); text-decoration: none !important; }

/* footer */
.site-footer {
  position: relative; z-index: 1;
  text-align: center; padding: 30px 20px 44px; color: var(--ink-2); font-size: 13px;
  border-top: 1px solid rgba(30, 27, 75, 0.06); margin-top: 20px;
}
.site-footer nav { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; }
.site-footer nav a { color: var(--primary); text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { text-decoration: underline; }

/* toast (used by 文案页 copy) */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  padding: 12px 24px; border-radius: var(--r-btn); font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(30,27,75,0.18);
  opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .site-topbar .inner { padding: 10px 14px; }
  .site-topbar .brand-logo .word { display: none; }
  .site-topbar .navlinks { gap: 2px; }
  .site-topbar .navlinks a { padding: 8px 9px; font-size: 13.5px; }

  .content { padding: 20px 14px 16px; }
  .doc-card { padding: 24px 20px; }
  .doc-card h1 { font-size: 24px; letter-spacing: -0.5px; }
  .doc-card h2 { font-size: 19px; }
  .doc-card p, .doc-card .lead, .doc-card ul, .doc-card ol { font-size: 15px; }

  .tpl-item { gap: 13px; }
  .tpl-swatch { width: 58px; height: 58px; }
  .cta-btn { display: block; }
  .wenan .copy { min-height: 34px; }
  .site-footer nav { gap: 8px 14px; }
}

@media (hover: none) {
  .cta-btn:hover { transform: none; }
}
