/* LetsKeep 官网样式 —— 单文件、无外部请求、无背景图、无 backdrop-filter。
 *
 * 为什么是这个形态：官网被吐槽「主页很卡」，实测原因是首屏挂了 5.77 MB 的第三方视频、
 * 走了 Google Fonts 外链、外加 148 KB 的 React 包在客户端渲染。静态站不需要这些：
 * 排版、颜色和留白就足够撑起一个记账 App 的官网，而代价从 6 MB 降到十几 KB。
 *
 * 三条硬约束（改样式时请守住）：
 *   1. 不引用任何字体文件 —— 用系统字体栈，中文在 iOS/macOS 上是苹方，Windows 上是微软雅黑；
 *   2. 不引用任何图片 —— 背景是 CSS 渐变 + 网格线，图标一律内联 SVG 或纯 CSS；
 *   3. 不用 backdrop-filter / 大范围 filter —— 它在低端机上每帧都要重新合成，是"卡"的常见来源。
 */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1080px;
  --narrow: 720px;
  --radius: 14px;

  --bg: #071820;
  --bg-soft: #0b2028;
  --card: rgba(255, 255, 255, 0.028);
  --fg: #e9f2f4;
  --fg-soft: rgba(233, 242, 244, 0.78);
  --muted: #93aab3;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #6fe3e1;
  --accent-soft: rgba(111, 227, 225, 0.12);
  --accent-line: rgba(111, 227, 225, 0.42);
  --ink-on-accent: #04211f;
  --grid: rgba(255, 255, 255, 0.028);
  color-scheme: dark;
}

/* auto = 跟随系统。显式 light/dark 由后面的 data-theme 规则接管，优先级更高。 */
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    --bg: #f7fafa;
    --bg-soft: #eef4f5;
    --card: #ffffff;
    --fg: #0c1b22;
    --fg-soft: rgba(12, 27, 34, 0.82);
    --muted: #5c6f77;
    --line: rgba(7, 24, 32, 0.13);
    --accent: #0d8683;
    --accent-soft: rgba(13, 134, 131, 0.10);
    --accent-line: rgba(13, 134, 131, 0.34);
    --ink-on-accent: #ffffff;
    --grid: rgba(7, 24, 32, 0.035);
    color-scheme: light;
  }
  /* 系统浅色时的网格背景也要跟着降对比度（body 的 background-image 在下方定义）。 */
}

html[data-theme="light"] {
  --bg: #f7fafa;
  --bg-soft: #eef4f5;
  --card: #ffffff;
  --fg: #0c1b22;
  --fg-soft: rgba(12, 27, 34, 0.82);
  --muted: #5c6f77;
  --line: rgba(7, 24, 32, 0.13);
  --accent: #0d8683;
  --accent-soft: rgba(13, 134, 131, 0.10);
  --accent-line: rgba(13, 134, 131, 0.34);
  --ink-on-accent: #ffffff;
  --grid: rgba(7, 24, 32, 0.035);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  background-color: var(--bg);
  /* 背景只有两层很轻的渐变 + 一组网格线，没有任何图片请求。 */
  background-image:
    radial-gradient(110% 70% at 12% -5%, var(--accent-soft) 0%, transparent 58%),
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 76px);
  background-repeat: no-repeat, repeat, repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 0 0 10px 0;
  z-index: 40;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------------ 排版 */

h1, h2, h3 { margin: 0 0 14px; line-height: 1.22; letter-spacing: -0.015em; font-weight: 600; }

h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.95rem); }
h3 { font-size: 1.05rem; letter-spacing: -0.005em; }

p { margin: 0 0 14px; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead { font-size: 1.0625rem; line-height: 1.8; color: var(--fg-soft); max-width: 46rem; }

.muted { color: var(--muted); }
.small { font-size: 0.8125rem; line-height: 1.7; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.wrap.narrow, .section.narrow .wrap { max-width: var(--narrow); }
.section.narrow > * { max-width: var(--narrow); margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------------ 页头 */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
}
.brand-mark { display: block; border-radius: 7px; }
.brand-name { letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: 2px; }

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:hover { color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--fg); background: var(--accent-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.lang-switch:hover { color: var(--fg); border-color: var(--accent-line); }

.theme-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--accent-line); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 3.5px auto;
  background: var(--fg);
}

/* ------------------------------------------------------------------ 区块 */

.section { padding: 58px 0; }
.section.tight { padding-top: 34px; }
.section + .section { border-top: 1px solid var(--line); }

.section-head { max-width: 44rem; margin-bottom: 30px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.center .btn-row, .btn-row.center { justify-content: center; }

.section-more { margin: 18px 0 0; font-size: 0.9375rem; }
.section-more a, .lead a, .legal a, .answer a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); }
.section-more a:hover, .lead a:hover, .answer a:hover { border-bottom-color: var(--accent); }

/* ------------------------------------------------------------------ 按钮 */

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--ink-on-accent); }
.btn-primary:hover { background: var(--fg); color: var(--bg); }
.btn-secondary { border-color: var(--line); color: var(--fg); }
.btn-secondary:hover { border-color: var(--accent-line); color: var(--accent); }

/* ------------------------------------------------------------------ 首屏 */

.hero { padding: 64px 0 56px; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 44px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero h1 { margin-bottom: 18px; }

.hero-note {
  position: relative;
  margin: 22px 0 0;
  padding: 13px 15px 13px 41px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-line);
  border-radius: 0 10px 10px 0;
  background: var(--card);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
}
/* 图标用绝对定位而不是 flex —— 这段文字里有行内 <strong>/<a>，
   一旦容器是 flex，它们会被当成 flex item 各自撑开，中文排版就散了。 */
.hero-note svg { position: absolute; left: 15px; top: 14px; color: var(--accent); }
.hero-note a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin: 30px 0 0; }
.hero-stat { display: grid; gap: 2px; }
.hero-stat .num { font-size: 1.25rem; font-weight: 600; color: var(--accent); }
.hero-stat span:last-child { font-size: 0.8125rem; color: var(--muted); }

/* 「三秒记一笔」——用文字和编号讲流程，取代原来那台用 CSS 画的手机 */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--fg-soft);
}
.step-n {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ 卡片 */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 16px;
}

.feature {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.feature-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  color: var(--accent);
}
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; font-size: 0.9375rem; line-height: 1.8; color: var(--muted); }
.feature .tag {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 34px; align-items: start; }

/* ------------------------------------------------------------------ 清单 */

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--fg-soft);
}
.checklist .tick { color: var(--accent); font-weight: 700; }
.checklist strong { color: var(--fg); font-weight: 600; }

/* ------------------------------------------------------------------ 状态带 */

.status-band {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-line);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--card);
}
.status-band h3 { margin-bottom: 8px; }
.status-band p:last-child { margin-bottom: 0; }
.status-band a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); }

.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.status-list li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--fg-soft);
}
.status-list strong { color: var(--fg); }
.status-list a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); }

.state {
  padding: 3px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  text-align: center;
  color: var(--muted);
}
.state.on { color: var(--accent); border-color: var(--accent-line); }
.state.off { color: var(--muted); }

/* ------------------------------------------------------------------ 价格 */

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

.price-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.price-card.featured { border-color: var(--accent-line); }
.price-card h3 { margin: 12px 0 4px; }
.price-amount { margin: 0 0 16px; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.price-amount small { font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.price-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.price-card li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted);
}
.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.status-pill {
  display: inline-block;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--muted);
}
.status-pill.ready { color: var(--accent); border-color: var(--accent-line); }
.status-pill.wip { color: var(--muted); }

/* ------------------------------------------------------------------ 家庭账本图示（纯 CSS，无图片） */

.family-diagram { margin: 0; }
.family-row { display: flex; flex-wrap: wrap; gap: 10px; }
.family-person {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 0.875rem;
  color: var(--fg-soft);
}
.family-person .avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
}
.family-person .role { font-size: 0.75rem; color: var(--muted); }
.family-person.payer { border-color: var(--accent-line); }
.family-note { margin: 16px 0 0; font-size: 0.875rem; line-height: 1.8; color: var(--muted); }

/* ------------------------------------------------------------------ 问答 */

.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 0 18px;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  font-size: 0.9688rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 4px; color: var(--fg-soft); font-size: 0.9375rem; line-height: 1.85; }
.faq .answer p:first-child { margin-top: 0; }
.faq .answer ul { margin: 0 0 14px; padding-left: 20px; }
.faq .answer li { margin-bottom: 7px; }

/* ------------------------------------------------------------------ CTA */

.cta-band {
  padding: 30px 26px;
  border: 1px solid var(--accent-line);
  border-radius: 18px;
  background: linear-gradient(150deg, var(--accent-soft) 0%, transparent 62%);
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band .lead { margin-bottom: 0; }

/* ------------------------------------------------------------------ 法务正文 */

.legal { font-size: 0.9688rem; line-height: 1.9; color: var(--fg-soft); }
.legal h2 { margin: 30px 0 10px; font-size: 1.0625rem; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal code { font-family: var(--mono); font-size: 0.875em; color: var(--accent); }

/* ------------------------------------------------------------------ 页脚 */

.site-footer { margin-top: 46px; padding: 38px 0 30px; border-top: 1px solid var(--line); }

.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.footer-brand p { margin: 0 0 6px; }
.footer-name { font-weight: 600; }

.footer-col h2 {
  margin: 0 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 0.875rem;
  color: var(--fg-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; }

/* ------------------------------------------------------------------ 窄屏 */

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

@media (max-width: 720px) {
  .section { padding: 44px 0; }
  .hero { padding: 44px 0 40px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 22px;
    right: 22px;
    top: calc(100% + 8px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-soft);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 12px; }
  .status-list li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .state { justify-self: start; padding: 3px 11px; }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .header-actions .lang-switch { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
