:root {
  --ink: #162926;
  --muted: #64716e;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --line: #d7ddd9;
  --green: #153f38;
  --jade: #2b7467;
  --rust: #9a5138;
  --reading-font: 18px;
}

html[data-font="small"] { --reading-font: 16px; }
html[data-font="medium"] { --reading-font: 18px; }
html[data-font="large"] { --reading-font: 21px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.reading-progress {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: transparent;
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--rust);
}
.reader-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}
.reader-header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.reader-brand { display: flex; align-items: center; gap: 9px; }
.reader-brand > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-family: Georgia, "Songti SC", serif;
  font-weight: 700;
}
.reader-brand strong { font-size: 16px; }
.reader-tools { display: flex; align-items: center; gap: 12px; }
.source-return { color: var(--muted); font-size: 13px; }
.source-return:hover { color: var(--jade); }
.font-controls {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.font-controls button {
  min-height: 38px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.font-controls button:last-child { border-right: 0; }
.font-controls button[aria-pressed="true"] { background: var(--green); color: #fff; }
.reader-shell {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 82px;
}
.article-title-block { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.article-source {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--jade);
  font-size: 14px;
  font-weight: 800;
}
.article-title-block h1,
.policy-header h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 42px;
  line-height: 1.3;
  letter-spacing: 0;
}
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.article-summary { margin: 20px 0 0; color: #4e615c; font-size: 16px; line-height: 1.8; }
.article-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.article-actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--green);
  font-size: 13px;
  font-weight: 750;
}
.article-actions a:hover { border-color: var(--jade); }
.article-toc {
  margin: 34px 0 0;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.article-toc summary { cursor: pointer; color: var(--green); font-weight: 750; }
.article-toc nav { display: grid; gap: 7px; margin-top: 12px; }
.article-toc nav a { color: var(--muted); font-size: 14px; }
.article-toc nav a:hover { color: var(--jade); }
.article-body {
  padding: 44px 0 28px;
  color: #243632;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: var(--reading-font);
  line-height: 1.95;
  overflow-wrap: anywhere;
}
.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.25em; }
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  margin: 1.8em 0 0.75em;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.45;
  letter-spacing: 0;
}
.article-body h1 { font-size: 1.65em; }
.article-body h2 { font-size: 1.4em; }
.article-body h3 { font-size: 1.2em; }
.article-body a { color: var(--jade); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote {
  margin: 1.5em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--jade);
  color: #53635f;
}
.article-body pre,
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.article-body pre { overflow-x: auto; padding: 16px; background: #edf1ee; font-size: 0.84em; }
.article-body table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-body th,
.article-body td { padding: 8px 10px; border: 1px solid var(--line); }
.article-body hr { margin: 2.2em 0; border: 0; border-top: 1px solid var(--line); }
.image-placeholder { color: var(--muted); font-family: "PingFang SC", sans-serif; font-size: 0.82em; }
.content-notice {
  margin-top: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.content-notice strong { color: var(--ink); }
.content-notice p { margin: 5px 0 0; }
.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}
.article-nav a,
.article-nav-empty {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.article-nav a:hover { border-color: var(--jade); }
.article-nav strong,
.article-nav small { display: block; margin-top: 5px; color: var(--ink); font-size: 14px; font-weight: 750; overflow-wrap: anywhere; }
.article-nav-empty { opacity: 0.58; }
.reader-footer {
  padding: 27px max(20px, calc((100vw - 1180px) / 2));
  background: #102e2a;
  color: #cbd9d4;
  font-size: 12px;
}
.reader-footer div { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.reader-footer a { color: #fff; font-weight: 700; }
.reader-footer p { margin: 9px 0 0; }

.policy-shell { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 82px; }
.policy-header { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.policy-kicker { margin: 0 0 10px; color: var(--jade); font-size: 13px; font-weight: 800; }
.policy-updated { margin: 15px 0 0; color: var(--muted); font-size: 13px; }
.policy-content { padding-top: 28px; font-size: 16px; line-height: 1.85; }
.policy-content section { margin-top: 34px; }
.policy-content h2 { margin: 0 0 10px; font-size: 23px; line-height: 1.45; letter-spacing: 0; }
.policy-content p { margin: 0 0 13px; }
.policy-content ul { margin: 8px 0 0; padding-left: 1.25em; }
.policy-content li { margin: 7px 0; }
.policy-content a { color: var(--jade); text-decoration: underline; text-underline-offset: 3px; }
.policy-lead { color: #445954; font-size: 18px; }

@media (max-width: 720px) {
  .reader-header-inner { width: calc(100% - 28px); gap: 10px; }
  .reader-brand strong { font-size: 14px; }
  .reader-tools { gap: 8px; }
  .reader-shell,
  .policy-shell { width: calc(100% - 30px); padding: 42px 0 58px; }
  .article-title-block h1,
  .policy-header h1 { font-size: 32px; }
  .article-summary { font-size: 15px; }
  .article-body { padding-top: 34px; }
  .article-nav { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .reader-header-inner { width: calc(100% - 20px); }
  .reader-brand > span { width: 32px; height: 32px; }
  .reader-brand strong { display: none; }
  .font-controls { grid-template-columns: repeat(3, 39px); }
  .font-controls button { min-height: 40px; }
  .source-return { font-size: 12px; }
  .reader-shell,
  .policy-shell { width: calc(100% - 26px); padding-top: 34px; }
  .article-title-block { padding-bottom: 28px; }
  .article-title-block h1,
  .policy-header h1 { font-size: 28px; }
  .article-body { line-height: 1.9; }
  .article-actions a { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .article-toc { padding: 14px; }
}

@media (max-width: 350px) {
  .reader-header-inner { width: calc(100% - 14px); }
  .reader-brand > span { width: 30px; height: 30px; }
  .reader-tools { gap: 5px; }
  .source-return { max-width: 54px; line-height: 1.2; text-align: center; }
  .font-controls { grid-template-columns: repeat(3, 36px); }
  .reader-shell,
  .policy-shell { width: calc(100% - 20px); }
  .article-title-block h1,
  .policy-header h1 { font-size: 26px; }
}

@media print {
  .reading-progress,
  .reader-header,
  .article-actions,
  .article-toc,
  .article-nav,
  .reader-footer { display: none; }
  body { background: #fff; }
  .reader-shell { width: 100%; padding: 0; }
}
