@font-face { font-family: "ET Book"; src: url("/fonts/et-book-roman.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: "ET Book"; src: url("/fonts/et-book-italic.woff") format("woff"); font-weight: normal; font-style: italic; font-display: swap; }
@font-face { font-family: "ET Book"; src: url("/fonts/et-book-bold.woff") format("woff"); font-weight: bold; font-style: normal; font-display: swap; }

:root { color-scheme: light dark; --bg: #fffff8; --fg: #111; --muted: #666; --rule: #d8d8cc; }
@media (prefers-color-scheme: dark) { :root { --bg: #151515; --fg: #ddd; --muted: #999; --rule: #333; } }

html { font-size: 17px; }
body {
  background: var(--bg); color: var(--fg);
  max-width: 46rem; margin: 0 auto; padding: 4rem 1.2rem 6rem;
  font: 1.25rem/1.75 "ET Book", Palatino, "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-weight: normal; font-style: italic; font-synthesis: none; line-height: 1.2; }
h1.title { font-size: 2.6rem; margin: 0 0 2.2rem; }
h2 { font-size: 1.75rem; margin: 3rem 0 1rem; }
p, li { margin: 0 0 1.1rem; }
ul { padding-left: 1.2rem; }
li { padding-left: .2rem; }

/* 中英对照:一段中文紧跟一段英文,成对之间留大间距 */
p[lang="zh-CN"], li[lang="zh-CN"] { font-size: .95em; margin-bottom: .25rem; }
p[lang="en"], li[lang="en"] { margin-bottom: 1.6rem; color: var(--fg); }

a { color: inherit; text-decoration: none; background-image: linear-gradient(var(--muted), var(--muted)); background-size: 100% 1px; background-position: 0 92%; background-repeat: no-repeat; }
a:hover { background-image: linear-gradient(var(--fg), var(--fg)); }

.footnotes { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--rule); margin-top: 2.5rem; padding-top: 1rem; }
pre, code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; }
pre { overflow-x: auto; padding: .8rem; background: rgba(128,128,128,.12); }
blockquote { margin-left: 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--muted); }
img { max-width: 100%; }

figure { margin: 2rem 0; text-align: center; }
figure img { max-height: 80vh; width: auto; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .6rem; }
