/* ============================================================
   花开福来 · 官网样式
   设计规范对齐 assetbook-miniapp/miniprogram/app.wxss
   主色 #2563eb / 背景 #f7f9fc / 文字 #1e293b / 卡片圆角 16px
   花瓣辅助色取自 logo：蓝 #5b96f0 青 #4fc3c3 黄 #f5c445 橙 #f58a5e 红粉 #f27680
   ============================================================ */

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --blue-border: #bfdbfe;
  --bg: #f7f9fc;
  --card: #ffffff;
  --border: #f1f5f9;
  --line: #e2e8f0;
  --text: #1e293b;
  --sub: #64748b;
  --muted: #94a3b8;
  --red: #e11d48;
  --green: #059669;
  --amber: #d97706;
  --p-blue: #5b96f0;
  --p-teal: #4fc3c3;
  --p-yellow: #f5c445;
  --p-orange: #f58a5e;
  --p-rose: #f27680;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 32px rgba(37, 99, 235, 0.15);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

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

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

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

h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -0.3px; }

.num { font-variant-numeric: tabular-nums; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.brand .pkg { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--sub); font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 10px;
}
.nav a:hover { color: var(--blue); background: var(--blue-50); text-decoration: none; }
.nav a.active { color: var(--blue); background: var(--blue-50); font-weight: 700; }

/* ===== 首页 Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2563eb 0%, #2563eb 60%, #1d4ed8 100%);
  color: #ffffff;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero::before {
  content: ""; position: absolute; right: -80px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  border: 28px solid rgba(255, 255, 255, 0.08);
}
.hero::after {
  content: ""; position: absolute; left: -60px; bottom: -160px;
  width: 320px; height: 320px; border-radius: 50%;
  border: 22px solid rgba(255, 255, 255, 0.06);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px;
  padding: 72px 0 64px; align-items: center;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #dbeafe; font-size: 13px; font-weight: 500;
  margin-bottom: 20px;
}
.hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.hero h1 .accent { color: var(--p-yellow); }
.hero .lead {
  margin-top: 18px; font-size: 17px; color: #dbeafe; max-width: 34em;
}
.hero-ctas { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-size: 15px; font-weight: 700; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-white { background: #ffffff; color: var(--blue); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18); }
.btn-white:hover { background: #f8fafc; }
.btn-ghost { background: rgba(255, 255, 255, 0.1); color: #ffffff; border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }
.btn-primary { background: var(--blue); color: #ffffff; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-line { background: #ffffff; color: var(--blue); border-color: var(--blue-border); }
.btn-line:hover { background: var(--blue-50); }

/* Hero 右侧：微信入口卡片 */
.qr-card {
  background: #ffffff; color: var(--text);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.qr-card h3 { font-size: 16px; font-weight: 700; }
.qr-card p { font-size: 13px; color: var(--sub); margin-top: 4px; }
.qr-box {
  margin: 18px auto 0; width: 200px; height: 200px;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
}
.qr-box img { width: 100%; height: 100%; display: block; }
.qr-steps { margin-top: 16px; text-align: left; }
.qr-steps li {
  list-style: none; display: flex; gap: 10px; align-items: baseline;
  font-size: 13px; color: var(--sub); padding: 3px 0;
}
.qr-steps .n {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue-50); color: var(--blue);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  transform: translateY(3px);
}

/* ===== 通用 Section ===== */
.section { padding: 72px 0; }
.section-tint { background: #ffffff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.sec-head .kicker {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  background: var(--blue-50); color: var(--blue);
  font-size: 12px; font-weight: 700; margin-bottom: 14px;
}
.sec-head h2 { font-size: 28px; font-weight: 800; }
.sec-head p { margin-top: 12px; color: var(--sub); font-size: 15px; }

/* ===== 特性卡 ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 16px; font-weight: 700; margin-top: 14px; }
.card p { font-size: 13.5px; color: var(--sub); margin-top: 8px; }
.icon-sq {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}
.icon-sq svg { width: 24px; height: 24px; }
.tint-blue { background: var(--blue-50); color: var(--blue); }
.tint-teal { background: #e6faf8; color: #159a9a; }
.tint-yellow { background: #fdf6e0; color: #c78d06; }
.tint-orange { background: #fef0e8; color: #d96a2f; }
.tint-rose { background: #feebec; color: #d94f5c; }

/* ===== 手机演示图 ===== */
.demo-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.phone {
  width: 300px; margin: 0 auto;
  background: #ffffff; border: 1px solid var(--line);
  border-radius: 36px; padding: 14px 14px 20px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}
.phone-screen { background: var(--bg); border-radius: 26px; padding: 14px 12px; min-height: 480px; }
.phone-notch {
  width: 90px; height: 5px; border-radius: 999px; background: var(--line);
  margin: 2px auto 12px;
}
.mini-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2563eb 0%, #2563eb 60%, #1d4ed8 100%);
  color: #fff; border-radius: 16px; padding: 16px;
}
.mini-hero::before {
  content: ""; position: absolute; right: -22px; top: -30px;
  width: 96px; height: 96px; border-radius: 50%;
  border: 7px solid rgba(255, 255, 255, 0.15);
}
.mini-hero .lbl { font-size: 11px; color: #dbeafe; }
.mini-hero .amt { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-top: 4px; }
.mini-hero .delta { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,0.12); font-size: 10.5px; color: #dbeafe; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mini-metric { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.mini-metric .lbl { font-size: 10.5px; color: var(--sub); }
.mini-metric .val { font-size: 15px; font-weight: 700; margin-top: 2px; }
.mini-metric .red { color: var(--red); }
.mini-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 10px; }
.mini-card .ttl { font-size: 12px; font-weight: 700; }

/* 环形图 */
.ring-wrap { display: flex; align-items: center; gap: 26px; margin-top: 12px; }
.ring {
  --ring: conic-gradient(
    var(--p-blue) 0 38%,
    var(--p-teal) 38% 60%,
    var(--p-yellow) 60% 76%,
    var(--p-orange) 76% 88%,
    var(--p-rose) 88% 100%
  );
  width: 132px; height: 132px; border-radius: 50%;
  background: var(--ring);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ring::after {
  content: "资产配置\A演示数据";
  white-space: pre;
  width: 88px; height: 88px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 10.5px; color: var(--muted); line-height: 1.5;
}
.legend { flex: 1; }
.legend li {
  list-style: none; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--sub); padding: 4px 0;
}
.legend .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend .pct { margin-left: auto; font-weight: 700; color: var(--text); }

/* ===== 步骤 ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step-card { position: relative; padding-top: 8px; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 16px; font-weight: 700; }
.step-card p { font-size: 13.5px; color: var(--sub); margin-top: 8px; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.table thead th {
  background: #f8fafc; color: var(--sub); font-weight: 600; text-align: left;
  padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: none; }
.table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; background: var(--blue-50); color: var(--blue-dark);
  padding: 1px 6px; border-radius: 5px; white-space: nowrap;
}
.table .muted { color: var(--muted); }

/* ===== 标签 / 徽章 ===== */
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 6px;
  background: var(--blue-50); color: var(--blue);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.tag-gray { background: var(--border); color: var(--sub); }
.tag-red { background: #fff1f2; color: var(--red); }
.tag-green { background: #ecfdf5; color: var(--green); }
.tag-amber { background: #fffbeb; color: var(--amber); }

/* ===== 提示横幅 ===== */
.banner {
  display: flex; gap: 10px; align-items: baseline;
  border-radius: 12px; padding: 14px 18px;
  font-size: 13.5px; margin: 20px 0;
}
.banner-blue { background: var(--blue-50); border: 1px solid var(--blue-100); color: #1e40af; }
.banner-amber { background: #fffbeb; border: 1px solid #fef3c7; color: #92400e; }

/* ===== FAQ（原生 details，无 JS）===== */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none;
  padding: 16px 20px; font-weight: 700; font-size: 14.5px;
  display: flex; align-items: baseline; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; margin-left: auto; color: var(--blue);
  font-weight: 800; font-size: 18px; flex-shrink: 0; transition: transform 0.15s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 20px 18px; font-size: 13.5px; color: var(--sub); }
.faq-item .faq-a p + p { margin-top: 8px; }
.faq-q-badge {
  flex-shrink: 0; color: var(--blue); background: var(--blue-50);
  border-radius: 6px; font-size: 11.5px; padding: 1px 7px; transform: translateY(-1px);
}

/* ===== 文档页（概念/指南/隐私）===== */
.doc {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 44px 48px; margin: 40px auto;
  max-width: 880px;
}
.doc h1 { font-size: 26px; font-weight: 800; }
.doc .doc-meta { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.doc h2 { font-size: 19px; font-weight: 800; margin: 36px 0 14px; padding-top: 24px; border-top: 1px solid var(--border); }
.doc h2:first-of-type { border-top: none; padding-top: 0; }
.doc h3 { font-size: 15.5px; font-weight: 700; margin: 22px 0 8px; }
.doc p { margin: 10px 0; color: #334155; font-size: 14px; }
.doc ul, .doc ol { margin: 10px 0 10px 22px; font-size: 14px; color: #334155; }
.doc li + li { margin-top: 4px; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; background: var(--blue-50); color: var(--blue-dark);
  padding: 1px 6px; border-radius: 5px;
}
.doc blockquote {
  border-left: 3px solid var(--blue-100); background: #f8fafc;
  padding: 10px 16px; border-radius: 0 10px 10px 0;
  color: var(--sub); font-size: 13.5px; margin: 14px 0;
}
.formula {
  background: #0f172a; color: #e2e8f0; border-radius: 12px;
  padding: 16px 20px; font-size: 13px; line-height: 1.9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-x: auto; margin: 14px 0; white-space: pre;
}
.formula .cm { color: #64748b; }
.formula .kw { color: #7dd3fc; }

/* ===== 页脚 ===== */
.footer { background: #ffffff; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px;
  padding: 44px 0 32px;
}
.footer h4 { font-size: 13px; color: var(--text); font-weight: 700; margin-bottom: 12px; }
.footer ul { list-style: none; }
.footer li { margin: 7px 0; }
.footer a { color: var(--sub); font-size: 13px; }
.footer a:hover { color: var(--blue); }
.footer .about { font-size: 13px; color: var(--sub); max-width: 30em; }
.footer .brandline { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer .brandline img { width: 28px; height: 28px; border-radius: 8px; }
.footer .brandline strong { color: var(--text); font-size: 15px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 18px 0 24px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}

/* 网格子项允许收缩，防止长公式/长代码撑破布局 */
.grid-3 > *, .grid-2 > *, .demo-wrap > *, .steps > * { min-width: 0; }
.hero-pill { flex-wrap: wrap; }

/* ===== 财富课堂 ===== */
.kicker-pill {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  background: var(--blue-50); color: var(--blue);
  font-size: 12px; font-weight: 700;
}
.classroom-head { max-width: 720px; margin: 44px auto 36px; }
.classroom-head h1 { font-size: 30px; font-weight: 800; margin-top: 14px; }
.classroom-head p { margin-top: 14px; color: var(--sub); font-size: 15px; line-height: 1.9; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.post-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08); text-decoration: none; }
.post-card img.cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-bottom: 1px solid var(--border); }
.post-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card .cat { font-size: 11.5px; font-weight: 700; letter-spacing: 2px; color: var(--amber); }
.post-card h3 { font-size: 15.5px; font-weight: 700; margin-top: 8px; line-height: 1.5; }
.post-card p { font-size: 13px; color: var(--sub); margin-top: 8px; }
.post-card .date { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--muted); }

/* 长文页 */
.post {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 48px 52px; margin: 40px auto; max-width: 820px;
}
.post-kicker { color: var(--amber); font-size: 13px; font-weight: 600; letter-spacing: 2px; }
.post h1 { font-size: 29px; font-weight: 800; margin: 12px 0 10px; }
.post .post-sub { color: var(--sub); font-size: 15.5px; margin: 0; }
.post .doc-meta { color: var(--muted); font-size: 12.5px; margin-top: 14px; }
.post figure { margin: 26px 0; }
.post figure img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--border); }
.post h2 { font-size: 20px; font-weight: 800; margin: 42px 0 14px; }
.post p { margin: 12px 0; font-size: 15px; line-height: 1.95; color: #334155; }
.post ul, .post ol { margin: 12px 0 12px 24px; font-size: 15px; line-height: 1.9; color: #334155; }
.post li + li { margin-top: 6px; }
.post li::marker { color: var(--blue); }
.post strong { color: var(--text); }
.em-center {
  text-align: center; font-weight: 700; font-size: 17px; color: var(--text);
  line-height: 1.9; margin: 24px 0;
}
.em-amber { color: #b45309; }
.em-navy { color: #22335c; }
.small-note { font-size: 13px; color: var(--muted); }

.callout { border-radius: 12px; padding: 18px 20px; margin: 22px 0; font-size: 14.5px; line-height: 1.9; color: #334155; }
.callout strong { color: var(--text); }
.callout-amber { background: #fdf6e0; border-left: 4px solid #d9a406; }
.callout-green { background: #ecfdf5; border-left: 4px solid var(--green); }
.callout-red { background: #fff1f2; border-left: 4px solid var(--red); }
.callout-plain { background: #f8fafc; border: 1px solid var(--line); }
.callout-dark { background: #22335c; color: #ffffff; text-align: center; }
.callout-dark strong { color: #ffffff; font-size: 17px; }
.callout-center { text-align: center; font-weight: 700; font-size: 17px; line-height: 1.9; color: #7d5e25; }

.post .disclaimer {
  border-top: 1px solid var(--border); margin-top: 38px; padding-top: 16px;
  font-size: 12.5px; color: var(--muted); line-height: 1.8;
}

.article-cta {
  margin-top: 38px; background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff; border-radius: var(--radius); padding: 26px 28px;
}
.article-cta h3 { font-size: 17px; font-weight: 800; }
.article-cta p { color: #dbeafe; font-size: 13.5px; margin: 10px 0 0; }
.article-cta .btn-row { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

.post-nav {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 13.5px;
}
.post-nav div { min-width: 0; }
.post-nav .lbl { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; letter-spacing: 1px; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; padding: 52px 0 48px; gap: 36px; }
  .hero h1 { font-size: 30px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .demo-wrap { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .doc { padding: 28px 22px; margin: 24px auto; }
}
@media (max-width: 600px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .topbar-inner {
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
  }
  .brand .pkg { display: none; }
  .nav { width: 100%; justify-content: center; flex-wrap: wrap; gap: 0; }
  .nav a { padding: 6px 8px; font-size: 12.5px; }
  .hero h1 { font-size: 27px; }
  .hero .lead { font-size: 15px; }
  .post-grid { grid-template-columns: 1fr; }
  .post { padding: 28px 20px; margin: 24px auto; }
  .classroom-head { margin: 28px auto 24px; }
}
