:root {
  --bg: #f3efe6;
  --surface: #eae5d9;
  --text: #1b1a18;
  --muted: #6e6a62;
  --line: #d5cfc2;
  --accent: #b23a2e;
  --accent-soft: #ebdcd3;
  --maxw: 760px;
  --serif: "Noto Serif SC", "Songti SC", serif;
  /* 与 App 一致：全站思源宋体 */
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1f1e1b;
    --text: #ece7dc;
    --muted: #9a958a;
    --line: #3a3833;
    --accent: #d25a4c;
    --accent-soft: #2e201d;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.8 var(--serif);
}

a { color: var(--accent); text-underline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* 顶栏 */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 18px; font-size: 15px; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--text); }

/* 首页大图 */
.hero {
  position: relative;
  color: var(--text);
  background: var(--bg);
  padding: 24px 0 72px;
  border-bottom: 1px solid var(--line);
}
.hero > * { position: relative; z-index: 1; }
.hero .icon { width: 88px; height: 88px; border-radius: 20px; }
.hero h1 { font: 900 56px/1.2 var(--serif); margin: 28px 0 12px; letter-spacing: 0.12em; }
.hero p { margin: 0; max-width: 30em; color: var(--muted); text-wrap: balance; }
.seal { display: inline-block; background: var(--accent); color: var(--bg); font: 900 15px/26px var(--serif); width: 26px; text-align: center; border-radius: 3px; vertical-align: middle; margin-left: 8px; }

.button {
  display: inline-block; margin-top: 28px; padding: 10px 26px;
  border-radius: 999px; background: var(--text); color: var(--bg);
  text-decoration: none; letter-spacing: 0.15em;
}

/* 四个功能 */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 48px 0; }
.feature { border-top: 1px solid var(--line); padding: 22px 0; }
.feature .char { font: 900 34px/1 var(--serif); color: var(--text); }
.feature h3 { margin: 12px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.quote { text-align: center; font: 20px/1.9 var(--serif); color: var(--muted); margin: 56px 0; }

/* 文档页 */
.doc { padding: 24px 0 56px; }
.doc h1 { font: 700 32px/1.3 var(--serif); margin: 16px 0 4px; }
.doc .meta { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.doc h2 { font-size: 20px; margin: 40px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 17px; margin: 24px 0 4px; }
.doc ul { padding-left: 1.3em; }
.doc li { margin: 4px 0; }

.callout { background: var(--accent-soft); border-radius: 12px; padding: 14px 18px; margin: 20px 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; white-space: nowrap; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 24px 0 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer a { color: var(--muted); }

@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .nav-links { gap: 12px; }
}
