:root {
  --bg: #fafafa;
  --fg: #18181b;
  --muted: #71717a;
  --card: #ffffff;
  --line: #e4e4e7;
  --accent: #4f46e5;
  --accent-fg: #ffffff;
  --pill: #eef2ff;
  --warn-bg: #fef3c7;
  --warn-fg: #92400e;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0e;
    --fg: #f4f4f5;
    --muted: #a1a1aa;
    --card: #16161a;
    --line: #27272a;
    --accent: #818cf8;
    --accent-fg: #0b0b0e;
    --pill: #1e1b4b;
    --warn-bg: #422006;
    --warn-fg: #fde68a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { font-weight: 700; font-size: 18px; color: var(--fg); text-decoration: none; display: flex; gap: 8px; align-items: center; }
.brand img { width: 24px; height: 24px; }
nav a { color: var(--muted); text-decoration: none; margin-left: 16px; font-size: 14px; }
nav a:hover { color: var(--fg); }
.lang-toggle { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 2px 10px; font-size: 13px; margin-left: 16px; cursor: pointer; }
.hero { padding: 56px 0 32px; text-align: center; }
.hero h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p.sub { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.pill { display: inline-block; background: var(--pill); color: var(--accent); border-radius: 999px; padding: 4px 14px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 12px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--fg); background: var(--card); cursor: pointer; font-size: 15px; }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.small { font-size: 13px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 32px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price { font-size: 32px; font-weight: 700; margin: 8px 0 2px; }
.price s { color: var(--muted); font-size: 18px; font-weight: 500; margin-right: 6px; }
.code-box { display: inline-flex; gap: 10px; align-items: center; font: 600 26px/1 ui-monospace, Menlo, monospace; letter-spacing: 3px; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 12px; background: var(--card); margin: 12px 0; }
.code-box button { font: 500 13px/1 -apple-system, sans-serif; letter-spacing: 0; }
.draft { background: var(--warn-bg); color: var(--warn-fg); border-radius: 10px; padding: 12px 16px; margin: 16px 0; font-size: 14px; }
.legal h1 { font-size: 30px; margin-top: 24px; }
.legal h2 { font-size: 20px; margin-top: 28px; }
.legal li { margin: 4px 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.legal th, .legal td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 8px 6px; }
.legal th { color: var(--muted); font-weight: 600; }
@media (max-width: 560px) {
  nav a { margin-left: 10px; }
  .legal table { font-size: 13px; }
}
footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); margin-right: 16px; }
.hidden { display: none !important; }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72); color: #fff; display: flex; justify-content: flex-end; padding: 24px; z-index: 10; }
.overlay p { font-size: 18px; max-width: 260px; text-align: right; margin-top: 40px; }
.key { font: 600 22px/1.4 ui-monospace, Menlo, monospace; letter-spacing: 1px; word-break: break-all; }
.center { text-align: center; }
/* ---- accessibility ---- */
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-fg); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
html { scroll-behavior: smooth; }
/* ---- header / nav ---- */
header.top nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }
/* ---- landing ---- */
.hero-shot { margin: 32px auto 0; max-width: 720px; }
.shot { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.feature { display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; align-items: center; padding: 36px 0; border-top: 1px solid var(--line); }
.feature.flip > :first-child { order: 2; }
.feature h2 { font-size: 24px; margin: 0 0 8px; letter-spacing: -0.01em; }
.feature p, .feature li { color: var(--muted); }
.feature ul { padding-left: 18px; margin: 8px 0 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; background: var(--pill); color: var(--accent); }
.tag.free { background: #dcfce7; color: #166534; }
@media (prefers-color-scheme: dark) { .tag.free { background: #14532d; color: #bbf7d0; } }
.caption { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }
section h2.section { font-size: 28px; text-align: center; margin: 48px 0 8px; }
p.lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 24px; }
.cmp { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cmp th, .cmp td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cmp th { color: var(--muted); font-weight: 600; }
.cmp td:nth-child(2), .cmp td:nth-child(3), .cmp th:nth-child(2), .cmp th:nth-child(3) { text-align: center; width: 90px; }
.roadmap { font-size: 14px; color: var(--muted); text-align: center; margin: 24px 0 0; }
/* ---- pricing ---- */
.plan ul { padding-left: 18px; color: var(--muted); font-size: 15px; }
.per { font-size: 15px; color: var(--muted); font-weight: 500; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 8px 0 0; }
/* ---- utilities (CSP forbids inline style attributes) ---- */
.plainlist { list-style: none; padding: 0; }
.mt24 { margin-top: 24px; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; text-align: left; }
.h-small { font-size: 18px; margin-top: 0; }
/* ---- footer ---- */
footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
footer nav a { margin: 0; }
@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; gap: 16px; }
  .feature.flip > :first-child { order: 0; }
  .hero { padding-top: 32px; }
  header.top { flex-wrap: wrap; gap: 8px; }
}
/* bilingual: one DOM, the inactive language is hidden */
html[data-lang="zh"] [lang="en"]:not(html) { display: none !important; }
html[data-lang="en"] [lang="zh"]:not(html) { display: none !important; }
/* ---- feature pages / help / changelog (2026-09-30 public site) ---- */
.kbd { display: inline-block; font: 500 13px/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", ui-monospace, Menlo, sans-serif; padding: 2px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--card); color: var(--fg); white-space: nowrap; }
.keys { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 12px 0 24px; }
.keys th, .keys td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.keys th { color: var(--muted); font-weight: 600; font-size: 13px; }
.keys td:first-child { width: 42%; white-space: nowrap; }
.keys tr:last-child td { border-bottom: 0; }
.card h2.h-small { margin-bottom: 6px; }
.card .more { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; text-decoration: none; }
.card .tag { margin-left: 0; margin-bottom: 8px; }
.card.soon { border-style: dashed; }
.tag.soon { background: var(--warn-bg); color: var(--warn-fg); }
.tag.dim { background: var(--line); color: var(--muted); }
.note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 16px; margin: 20px 0; font-size: 14px; color: var(--muted); }
.note b { color: var(--fg); }
.toc { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: center; margin: 0 0 28px; padding: 0; list-style: none; }
.toc a { font-size: 14px; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--muted); background: var(--card); }
.toc a:hover { color: var(--fg); }
.doc { max-width: 720px; margin: 0 auto; }
.doc h2 { font-size: 22px; margin: 36px 0 8px; letter-spacing: -0.01em; }
.doc h3 { font-size: 17px; margin: 22px 0 6px; }
.doc p, .doc li { color: var(--muted); }
.doc li { margin: 4px 0; }
.doc .lead { text-align: left; margin: 0 0 20px; max-width: none; }
.doc .faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.doc .faq summary { cursor: pointer; font-weight: 600; color: var(--fg); }
.doc .faq details p { margin: 8px 0 0; }
.hero.compact { padding: 40px 0 16px; }
.hero.compact h1 { font-size: clamp(28px, 5vw, 40px); }
.crumbs { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0; }
.steps li { position: relative; padding-left: 40px; margin: 12px 0; color: var(--muted); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--pill); color: var(--accent); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.steps li b { color: var(--fg); }
.log { border-left: 2px solid var(--line); margin: 24px 0 0 8px; padding-left: 24px; }
.log article { position: relative; margin-bottom: 36px; }
.log article::before { content: ""; position: absolute; left: -31px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.log time { font-size: 13px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.log h2 { margin: 0 0 8px; font-size: 20px; }
.log ul { padding-left: 18px; margin: 0; }
.log li { color: var(--muted); margin: 4px 0; }
.log li b { color: var(--fg); }
.packs { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.packs .card { display: flex; flex-direction: column; }
.packs .price { font-size: 26px; margin: 4px 0 0; }
.packs .per { margin: 2px 0 10px; }
.packs .credits { font-size: 15px; font-weight: 600; margin: 0; }
.packs .card p.small { margin-top: auto; }
.tiers { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 16px 0 8px; }
.tiers th, .tiers td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tiers th { color: var(--muted); font-weight: 600; font-size: 13px; }
.tiers tr:last-child td { border-bottom: 0; }
.tiers td:not(:first-child), .tiers th:not(:first-child) { text-align: center; }
.tiers td:first-child { color: var(--fg); }
.cmp td:first-child { color: var(--fg); }
.cmp tbody th { text-align: left; font-size: 13px; padding-top: 14px; color: var(--muted); background: var(--bg); }
.cmp .muted { color: var(--muted); }
@media (max-width: 560px) {
  .keys td:first-child { white-space: normal; width: auto; }
  .keys, .tiers { font-size: 13px; }
  .keys th, .keys td, .tiers th, .tiers td { padding: 8px 8px; }
}
/* ---- landing v2 (usekeyflow.app launch, #178/#217) ---- */
/* Headline A/B/C: A shows by default (no JS); site.js sets html[data-variant]. */
.hv-b, .hv-c { display: none; }
html[data-variant="b"] .hv-a, html[data-variant="c"] .hv-a { display: none; }
html[data-variant="b"] .hv-b, html[data-variant="c"] .hv-c { display: block; }
.hero.landing { padding-bottom: 8px; }
.hero.landing h1 { font-size: clamp(34px, 7vw, 58px); letter-spacing: -0.03em; }
.hero.landing .small { margin-top: 14px; }
.mock { max-width: 640px; margin: 36px auto 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, var(--mock-a), var(--mock-b)); box-shadow: 0 20px 50px rgba(0,0,0,.12); text-align: left; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--mock-bar); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-menu { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.mock-stage { position: relative; padding: 40px 24px 76px; }
.mock-capsule { display: flex; align-items: center; gap: 10px; max-width: 460px; margin: 0 auto; padding: 12px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.10); font-size: 15px; }
.mock-spark { color: var(--accent); font-size: 16px; }
.mock-q { flex: 1; min-width: 0; }
.mock-answer { max-width: 460px; margin: 10px auto 0; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.mock-answer p { margin: 0 0 10px; }
.mock-line { display: block; height: 8px; border-radius: 4px; background: var(--line); margin: 7px 0; }
.mock-line.short { width: 60%; }
.mock-voice { position: absolute; right: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 13px; font-weight: 600; }
.mock-wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.mock-wave i { display: block; width: 3px; border-radius: 2px; background: var(--accent); height: 6px; }
.mock-wave i:nth-child(2), .mock-wave i:nth-child(4) { height: 12px; }
.mock-wave i:nth-child(3) { height: 14px; }
.replaces { text-align: center; margin: 40px 0 0; }
.replaces .small { margin: 0 0 10px; }
.replaces ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.replaces li { font-size: 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; background: var(--card); text-decoration: line-through; text-decoration-color: var(--muted); }
.fgrid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.fgrid .card { display: flex; flex-direction: column; }
.fgrid .card .more { margin-top: auto; padding-top: 10px; }
.fhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ficon { width: 34px; height: 34px; border-radius: 10px; background: var(--pill); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.plans { max-width: 640px; margin-left: auto; margin-right: auto; }
.plans h3 { margin: 0; }
.cta-end { text-align: center; margin: 64px 0 0; padding: 40px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.cta-end h2 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 30px); letter-spacing: -0.01em; }
.cta-end .btns { margin-top: 18px; }
:root { --mock-a: #eef2ff; --mock-b: #fdf2f8; --mock-bar: rgba(255,255,255,.7); }
@media (prefers-color-scheme: dark) { :root { --mock-a: #1e1b4b; --mock-b: #1f1020; --mock-bar: rgba(0,0,0,.35); } }
@media (max-width: 560px) {
  header.top nav a { margin-left: 0; margin-right: 12px; }
  .lang-toggle { margin-left: 0; }
  .mock-stage { padding: 24px 12px 64px; }
  .mock-capsule { border-radius: 18px; font-size: 14px; }
  .mock-voice { right: 12px; bottom: 14px; }
  .cmp td:nth-child(2), .cmp td:nth-child(3), .cmp th:nth-child(2), .cmp th:nth-child(3) { width: auto; }
}
h2.section { font-size: 28px; text-align: center; margin: 56px 0 8px; letter-spacing: -0.01em; }
@media (min-width: 721px) { .grid.two { grid-template-columns: repeat(2, 1fr); } }
