/* Content-first refinement: a personal journal with functional typography.
   Unlayered rules deliberately override the existing layered design system. */
:root {
  --bg: #fdfdfc; --surface: #fff; --surface-soft: #f3f3f0;
  --ink: #292b29; --ink-muted: #646761; --ink-faint: #747770;
  --line: #dedfd9; --line-strong: #a6aaa0;
  --accent: #315840; --accent-strong: #315840;
  --code-bg: #f3f3f0; --code-border: #dedfd9;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: var(--font-sans);
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --container-prose: 680px; --r-sm: 0; --r-md: 0; --r-lg: 0;
}
[data-theme="dark"] {
  --bg: #20221f; --surface: #20221f; --surface-soft: #2a2d28;
  --ink: #e4e7df; --ink-muted: #b2b8ac; --ink-faint: #a0a797;
  --line: #454a40; --line-strong: #7b8472;
  --accent: #b6cbb0; --accent-strong: #b6cbb0;
  --code-bg: #2a2d28; --code-border: #454a40;
}
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body { font-family: var(--font-sans); font-size: 17px; line-height: 1.65; font-feature-settings: normal; }
h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 600; letter-spacing: -.018em; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
.site-header { position: static; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header[data-scrolled="true"] { border: 0; }
.site-nav, .home-shell, .reading-layout, .list-shell, .site-footer, main.content {
  width: min(680px, calc(100% - 48px)); max-width: 680px; margin-left: auto; margin-right: auto;
}
.site-nav { padding: 52px 0 0; min-height: 0; display: flex; align-items: baseline; gap: 20px; justify-content: space-between; }
.site-mark { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.nav-links { gap: 10px 20px; font-size: 14px; line-height: 1.5; }
.nav-links a { color: var(--ink-muted); padding: 0; }
.nav-links a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink); }
.nav-links a[aria-current]::after { display: none; }
.nav-links a:hover { text-decoration: underline; }
.home-shell, .list-shell, main.content { padding: 0; margin-top: 68px; margin-bottom: 0; }
.plain-intro h1 { font-size: 30px; line-height: 1.3; margin: 0 0 24px; }
.plain-intro h1 span { font-size: 19px; font-weight: 400; color: var(--ink-muted); margin-left: 10px; white-space: nowrap; letter-spacing: 0; }
.plain-intro p + p { margin-top: 18px; }
.plain-section { margin-top: 44px; }
.plain-section h2, .archive-year h2 { font-size: 18px; margin: 0 0 17px; line-height: 1.4; }
.plain-posts { list-style: none; margin: 0; padding: 0; }
.plain-posts li { display: grid; grid-template-columns: 106px minmax(0, 1fr); gap: 14px; margin: 0 0 13px; line-height: 1.6; }
.plain-posts time { font-size: 14px; color: var(--ink-muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.plain-posts a { color: var(--ink); text-decoration: none; }
.plain-posts a:hover, .plain-posts a:focus-visible { text-decoration: underline; }
.section-link { font-size: 15px; margin-top: 17px; }
.section-link a { color: var(--accent); text-decoration: underline; }
.list-shell h1 { font-size: 30px; margin: 0 0 32px; }
.archive-year { margin-top: 30px; }
.empty-note { color: var(--ink-muted); margin-top: 20px; }
.reading-layout { display: block; padding: 0; margin-top: 64px; margin-bottom: 0; }
.post-article .post-header { max-width: none; margin: 0 0 34px; }
.post-article h1.post-title { font-size: 32px; line-height: 1.25; font-weight: 600; letter-spacing: -.025em; margin: 0 0 16px; text-wrap: initial; }
.post-meta { font-size: 14px; margin: 0; gap: 4px 8px; color: var(--ink-muted); }
.prose { font-family: var(--font-sans); font-size: 17px; line-height: 1.75; max-width: none; overflow-wrap: break-word; }
.prose p, .prose li { line-height: 1.75; }
.prose h1, .prose h2 { font-size: 23px; line-height: 1.35; margin-top: 2em; font-weight: 600; }
.prose h3 { font-size: 19px; line-height: 1.4; }
.prose a { background: none; color: var(--accent); text-decoration: underline; text-decoration-color: var(--line-strong); }
.prose a:hover { background: none; text-decoration-color: currentColor; }
.prose blockquote { background: none; font-style: normal; color: var(--ink-muted); border-left: 2px solid var(--line); margin-left: 0; margin-right: 0; padding: 0 0 0 20px; }
.prose img { border-radius: 0; }
.prose pre { border-radius: 0; }
.prose table { display: block; max-width: 100%; overflow-x: auto; }
.post-lastmod { margin: 42px 0 0; font-size: 13px; }
.post-pager { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); gap: 24px; }
.post-pager a { padding: 0; border: 0; border-radius: 0; background: none; }
.post-pager a:hover { background: none; }
.post-pager .pager-title { font-size: 15px; }
.post-pager .pager-label { font-size: 13px; }
.post-tags a { border: 0; padding: 0; border-radius: 0; }
.back-to-top { display: inline-block; position: static; margin: 28px 0 0; font-size: 14px; }
.post-toc { position: static; max-height: none; width: auto; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.site-footer { padding: 0 0 32px; margin-top: 64px; border: 0; }
.footer-meta { max-width: none; padding: 20px 0 0; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; font-size: 12px; }
.footer-copy { font-size: 12px; }
.footer-links { gap: 16px; }
.theme-toggle { display: inline; width: auto; height: auto; padding: 0; border: 0; border-radius: 0; background: none; font: inherit; color: var(--ink-muted); cursor: pointer; }
.theme-toggle:hover { text-decoration: underline; }
.wide, .wide-single, .fullwidth { width: 100%; margin-left: 0; }
@media (max-width: 600px) {
  .site-nav { padding-top: 30px; display: block; }
  .nav-links { margin-top: 16px; gap: 10px 18px; }
  .home-shell, .list-shell, .reading-layout, main.content { margin-top: 44px; }
  .plain-intro h1 { font-size: 27px; }
  .plain-intro h1 span { font-size: 17px; }
  .post-article h1.post-title { font-size: 28px; }
  .plain-posts li { grid-template-columns: 1fr; gap: 2px; margin-bottom: 18px; }
  .plain-posts time { font-size: 13px; }
  .plain-section { margin-top: 36px; }
  .site-footer { margin-top: 48px; }
}
@media print {
  :root, [data-theme="dark"] { --bg: #fff; --ink: #000; --ink-muted: #444; --accent: #000; }
  .reading-layout { width: 100%; max-width: none; margin: 0; }
}

/* The same reading rhythm across directories and auxiliary pages. */
.resources-page h1 { margin-bottom: 22px; }
.resource-directory > p { margin-bottom: 36px; }
.resource-directory section { margin-top: 34px; }
.resource-directory h2 { font-size: 18px; margin-bottom: 16px; }
.resource-directory ul, .plain-terms { padding: 0; margin: 0; list-style: none; }
.resource-directory li { margin-top: 17px; }
.resource-link { display: inline-block; color: var(--ink); text-decoration: none; }
.resource-link:hover { text-decoration: underline; }
.resource-link span { display: block; font-size: 14px; color: var(--ink-muted); margin-top: 2px; }
.plain-terms li { margin-bottom: 14px; }
.plain-terms span { color: var(--ink-muted); }
.post-toc { margin: 0 0 30px; border: 0; padding: 0; font-size: 14px; }
.post-toc summary { cursor: pointer; color: var(--ink-muted); }
.post-toc nav { padding: 12px 0; }
.post-toc ul { list-style: none; padding-left: 16px; }
.post-toc nav > ul { padding-left: 0; }
.post-toc li { margin-top: 6px; }

/* Reading shelf: a quiet status dot, with the same title alignment for every book. */
.reading-list-page .post-toc { display: block; }
.reading-shelf ul { list-style: none; padding-left: 0; }
.reading-shelf li { position: relative; padding-left: 1.1em; margin-bottom: 1em; }
.reading-shelf .reading-dot {
  display: inline-block; width: .32em; height: .32em;
  border-radius: 50%; background: var(--accent); vertical-align: middle;
}
.reading-shelf li > .reading-dot { position: absolute; left: .1em; top: .7em; }
.reading-shelf .reading-legend { color: var(--ink-muted); font-size: .88em; }
.reading-shelf .reading-legend .reading-dot { margin-right: .5em; }
.reading-shelf .book-translation { color: var(--ink-muted); font-size: .88em; }
.reading-shelf .book-translation::before { content: "（"; }
.reading-shelf .book-translation::after { content: "）"; }
.reading-shelf .book-note { color: var(--ink-muted); font-size: .8em; }
.reading-shelf .book-title a { font-size: inherit; white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 601px) {
  .site-mark { flex-shrink: 0; }
  .nav-links { justify-content: flex-end; }
}
