/* 言出 官网页面（隐私政策、帮助与支持）共用样式。这些页面也会打包进 iPhone App，在「我的」里打开。 */
:root {
  --paper: #EEF3F5;      /* 月白 */
  --card: #FFFFFF;
  --ink: #1C2333;        /* 墨 */
  --ink-2: #4E5768;
  --ink-3: #8A92A1;
  --rule: #DCE3E8;
  --seal: #C8322B;       /* 朱砂 */
  --link: #2E5E8E;       /* 石青 */
  --todo: #F6E6C4;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12161F; --card: #1B212C; --ink: #E7ECF0; --ink-2: #B3BAC6; --ink-3: #7C8594;
    --rule: #2A3240; --seal: #E25A50; --link: #7FA9D6; --todo: #4A3B1C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12161F; --card: #1B212C; --ink: #E7ECF0; --ink-2: #B3BAC6; --ink-3: #7C8594;
  --rule: #2A3240; --seal: #E25A50; --link: #7FA9D6; --todo: #4A3B1C;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.85 -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.site-header {
  max-width: 760px; margin: 0 auto; padding: 22px 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; }
.brand svg { width: 30px; height: 30px; display: block; }
.site-header nav { display: flex; gap: 18px; font-size: 15px; }
.site-header nav a { color: var(--ink-2); text-decoration: none; }
.site-header nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

main { max-width: 760px; margin: 0 auto; padding: 36px 20px 72px; }
h1 { font-size: 32px; line-height: 1.3; margin: 0 0 8px; letter-spacing: .01em; }
.meta { color: var(--ink-3); font-size: 15px; margin: 0 0 28px; }
.meta span { white-space: nowrap; }
h2 { font-size: 22px; line-height: 1.4; margin: 48px 0 12px; }
h3 { font-size: 18px; line-height: 1.5; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 1.3em; }
li { margin: 4px 0; }
li::marker { color: var(--ink-3); }
strong { font-weight: 600; }

/* 朱批：最要紧的几句话 */
.gist {
  background: var(--card); border-radius: 16px; padding: 20px 22px 20px 24px;
  box-shadow: inset 4px 0 0 var(--seal); margin: 0 0 8px;
}
.gist p { margin: 0 0 8px; font-weight: 600; }
.gist ul { margin: 0; }

.toc { background: var(--card); border-radius: 16px; padding: 16px 22px; margin: 24px 0 0; font-size: 15px; }
.toc ol { margin: 0; columns: 2; column-gap: 28px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--link); }

table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.7; background: var(--card); border-radius: 14px; overflow: hidden; margin: 8px 0 16px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: 0; }
th { color: var(--ink-2); font-weight: 600; font-size: 14px; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 14px 44px; margin: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 2px;
  width: 28px; height: 28px; border-radius: 8px; background: var(--seal); color: #fff;
  font-size: 15px; font-weight: 700; line-height: 28px; text-align: center;
}

details { background: var(--card); border-radius: 14px; margin: 0 0 10px; }
summary { cursor: pointer; list-style: none; padding: 15px 44px 15px 20px; font-weight: 600; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details > div { padding: 0 20px 6px; color: var(--ink-2); }

.contact { background: var(--card); border-radius: 16px; padding: 18px 22px; }
.contact p { margin: 0 0 6px; }

/* 上线前要替换的内容，醒目标出来，避免漏改 */
.todo { background: var(--todo); border-radius: 4px; padding: 0 4px; }

.site-footer { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; color: var(--ink-3); font-size: 13px; line-height: 1.8; }
.site-footer a { color: var(--ink-3); }

/* 在 App 里打开时不需要网站页眉页脚 */
.in-app .site-header, .in-app .site-footer { display: none; }
.in-app main { padding-top: 12px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 27px; }
  main { padding: 28px 16px 56px; }
  .site-header { padding: 18px 16px 0; }
  .site-header nav { gap: 14px; }
  .toc ol { columns: 1; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  tr:last-child { border-bottom: 0; }
  td { border: 0; padding: 4px 16px; }
  td::before { content: attr(data-label); display: block; color: var(--ink-3); font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { summary::after { transition: none; } }
