/* 总站基础样式。每个号的颜色由 content/<号>/account.yml 里的 theme 覆盖 :root 变量。 */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #0f766e;
  --soft: #f1f1ef;
  --mark: #dff3ef;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --surface: #19191c;
    --text: #ececee;
    --muted: #a1a1aa;
    --line: #2e2e33;
    --accent: #2dd4bf;
    --soft: #1e1e22;
    --mark: #173c36;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  word-break: break-word;
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; height: auto; }

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}
.foot {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.home .foot { display: none; }


/* 首页 */
.home main { padding-top: 64px; }
.wordmark {
  margin: 0 0 32px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.wordmark::after { content: "."; color: var(--accent); }
.accounts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card {
  display: block;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}
.card:active { transform: translateY(1px); }
@media (min-width: 640px) {
  .home main { padding-top: 112px; }
  .wordmark { font-size: 44px; margin-bottom: 40px; }
}

/* 号首页、系列页 */
.acc-name, .ser-name {
  margin: 28px 0 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.acc-desc { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.sec {
  margin: 36px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.row { display: block; padding: 14px 0; color: inherit; }
.row .k { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }
.row .t { display: block; font-size: 17px; font-weight: 600; line-height: 1.5; margin: 2px 0; }
.row .s { display: block; font-size: 14px; color: var(--muted); line-height: 1.6; }
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  vertical-align: 2px;
}

/* 文章页 */
.crumb { margin: 16px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.crumb a { color: var(--muted); }
.crumb .sep { margin: 0 6px; }
.art-title {
  margin: 10px 0 10px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.meta { margin: 0 0 20px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.meta > * + *::before { content: "·"; margin: 0 8px; }
.notice {
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px dashed var(--accent);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--accent);
}
.lede {
  margin: 0 0 28px;
  padding: 12px 14px;
  background: var(--soft);
  border-left: 3px solid var(--accent);
  font-size: 16px;
  line-height: 1.8;
}

.body { font-size: 17px; line-height: 1.8; letter-spacing: 0.02em; }
.body > * { margin: 0 0 1.5em; }
.body h2 {
  margin: 2.4em 0 1em;
  padding: 2px 0 2px 12px;
  border-left: 4px solid var(--accent);
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.5;
}
.body h3 { margin: 2em 0 0.8em; font-size: 1.05em; font-weight: 700; color: var(--accent); line-height: 1.6; }
.body h4 { margin: 1.6em 0 0.6em; font-size: 1em; font-weight: 700; }
.body strong { font-weight: 700; color: var(--accent); }
.body em { font-style: normal; background: var(--mark); padding: 0 2px; }
.body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.body ul, .body ol { padding-left: 1.4em; }
.body li { margin: 0 0 0.5em; }
.body li::marker { color: var(--accent); }
.body blockquote {
  margin: 0 0 1.5em;
  padding: 12px 14px;
  background: var(--soft);
  border-left: 3px solid var(--accent);
  font-size: 0.94em;
  line-height: 1.85;
  color: var(--muted);
}
.body blockquote p { margin: 0 0 0.6em; }
.body blockquote p:last-child { margin: 0; }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.body img { display: block; margin: 0 auto 1.5em; border-radius: 4px; }
.body code { font-family: var(--mono); font-size: 0.9em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.body pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px;
  background: var(--soft);
  border-radius: 6px;
  font-size: 0.85em;
  line-height: 1.6;
}
.body pre code { background: none; padding: 0; font-size: inherit; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.5em; }
.body table { border-collapse: collapse; font-size: 0.88em; line-height: 1.6; min-width: 100%; width: max-content; max-width: 190%; }
.body th, .body td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; min-width: 5em; }
.body th { font-weight: 600; color: var(--muted); border-bottom-width: 2px; white-space: nowrap; }
.body .footnote { font-size: 0.9em; color: var(--muted); }
.body .footnote hr { display: none; }
.body sup { line-height: 0; }

/* 引用区 */
.refs { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.refs h2 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.08em; }
.refs ol { margin: 0; padding-left: 1.6em; }
.refs li { margin: 0 0 12px; font-size: 15px; line-height: 1.6; }
.refs li::marker { color: var(--muted); font-size: 13px; }
.refs a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.refs .host { margin-left: 6px; font-size: 12px; color: var(--muted); }
.refs .q { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.refs .q::before { content: "「"; }
.refs .q::after { content: "」"; }

/* 上一篇 / 下一篇 */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.pager a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: inherit; }
.pager .next { text-align: right; }
.pager .k { display: block; font-size: 12px; color: var(--muted); }
.pager .t { display: block; font-size: 15px; font-weight: 600; line-height: 1.5; }
@media (max-width: 420px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }
.foot a { color: var(--muted); }
.foot .dot { margin: 0 8px; }
