:root {
  --bg: #12100e; --surface: #1b1815; --ink: #efe7da; --soft: #b0a593; --line: #2f2a24;
  --gold: #e8a838; --gold-ink: #1a1408; --shadow: 0 18px 40px rgba(0, 0, 0, .35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f6f1e8; --surface: #fffcf6; --ink: #231e19; --soft: #6b6156; --line: #e2d9cb;
          --gold: #a8701a; --gold-ink: #fffaf0; --shadow: 0 14px 30px rgba(60, 40, 10, .12); color-scheme: light; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow > * { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 6px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* 中英切换：html[data-ui] 决定显示哪种语言 */
html[data-ui="en"] [lang="zh"], html[data-ui="zh"] [lang="en"] { display: none !important; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 19px/1 var(--serif); letter-spacing: .01em; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.top nav, .foot nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.top nav a, .foot nav a { color: var(--soft); text-decoration: none; font-size: 15px; }
.top nav a:hover, .foot nav a:hover { color: var(--ink); }
.lang { font: inherit; font-size: 14px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.lang:hover { border-color: var(--gold); }

.hero { padding: clamp(56px, 10vw, 120px) 16px clamp(40px, 6vw, 72px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); }
h1 { font: 600 clamp(36px, 6.4vw, 72px)/1.1 var(--serif); margin: 0; max-width: 16ch; letter-spacing: -.01em; }
html[data-ui="zh"] h1 { max-width: 14em; letter-spacing: .01em; }
h1 em { font-style: normal; color: var(--gold); }
.lede { color: var(--soft); font-size: clamp(17px, 2vw, 20px); max-width: 40em; margin: 22px 0 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.btn:hover { border-color: var(--gold); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.primary:hover { filter: brightness(1.06); }

.shelf { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); padding: 32px 0 36px; }
h2 { font: 600 clamp(26px, 3.4vw, 38px)/1.2 var(--serif); margin: 0 0 24px; }
h2.small { font-size: 15px; font-family: var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin-bottom: 18px; }
.eps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .eps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .eps { grid-template-columns: 1fr; } }
.eps img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); }
.eps p { margin: 10px 2px 0; font: 600 15px/1.4 var(--serif); }
.eps p span { font: 400 13px/1.4 var(--sans); color: var(--soft); }

.section { padding: clamp(48px, 8vw, 88px) 16px 0; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { font: 600 28px/1.2 var(--serif); margin: 0; }
.card p { margin: 0; color: var(--soft); }
.card .tag { color: var(--gold); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.card .link { margin-top: 14px; font-weight: 600; text-decoration: none; }
.card .muted { color: var(--soft); font-weight: 500; }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: s; border-top: 2px solid var(--gold); padding-top: 16px; }
.steps li::before { content: "0" counter(s); color: var(--gold); font: 600 14px/1 var(--sans); letter-spacing: .1em; }
.steps h3 { font: 600 21px/1.3 var(--serif); margin: 10px 0 6px; }
.steps p { margin: 0; color: var(--soft); }
#tools p, #contact p { color: var(--soft); margin: 0; }
#tools strong { color: var(--ink); }

.foot { margin-top: clamp(64px, 10vw, 110px); border-top: 1px solid var(--line); color: var(--soft); font-size: 14px; padding: 8px 0; }

/* 隐私政策等长文 */
.doc { padding: clamp(40px, 7vw, 80px) 16px 0; max-width: 760px; }
.doc h1 { font-size: clamp(32px, 5vw, 48px); max-width: none; }
.doc .meta { color: var(--soft); margin: 10px 0 30px; }
.doc h2 { font-size: 24px; margin: 38px 0 10px; }
.doc h3 { font: 600 18px/1.4 var(--serif); margin: 22px 0 6px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-size: 14px; overflow-wrap: anywhere; }
.doc .note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 18px; margin: 24px 0; }
