:root { color-scheme: light dark; --paper: #faf8f3; --ink: #292d2b; --muted: #72786f; --line: #dedfd5; --accent: #365b45; --content-width: 860px; --font-body: system-ui, sans-serif; --font-heading: Georgia, "Noto Serif CJK SC", serif; }
* { box-sizing: border-box; }
body { margin: 0 auto; max-width: var(--content-width); padding: 0 28px; color: var(--ink); background: var(--paper); font: 17px/1.85 var(--font-body); }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; letter-spacing: .05em; }
.brand-moon { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-weight: 400; }
.brand-moon img { width: 1.2em; height: 1.2em; vertical-align: -.2em; }
nav { display: flex; gap: 24px; }
nav a { font-size: .85em; }
main { min-height: 60vh; }
.intro { padding: 64px 0 36px; }
.eyebrow, time { color: var(--muted); font-size: .8em; letter-spacing: .05em; }
h1, h2, h3 { line-height: 1.4; }
h1 { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3rem); margin: 14px 0 20px; }
.intro p { color: var(--muted); }
.post-card { padding: 28px 0; border-top: 1px solid var(--line); }
.post-card h2 { margin: 8px 0; font-size: 1.45em; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.tags { display: flex; flex-wrap: wrap; gap: 12px; font-size: .8em; }
.article-header { margin: 56px 0 40px; }
.prose { overflow-wrap: anywhere; }
.prose h2, .prose h3 { margin-top: 2em; }
.prose img { max-width: 100%; height: auto; }
.article-layout { position: relative; }
.article-toc { margin-bottom: 32px; }
.toc { padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.6; }
.toc summary { color: var(--muted); font-weight: 600; cursor: pointer; }
.toc summary:focus-visible, .toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.toc nav { display: block; }
.toc ol { list-style: none; margin: 14px 0 0; padding: 0; border-left: 1px solid var(--line); max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.toc li { margin: 0; padding: 0; }
.toc a { display: block; padding: 6px 8px 6px calc(14px + var(--toc-depth) * 12px); border-left: 2px solid transparent; color: var(--muted); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="location"] { color: var(--accent); border-left-color: var(--accent); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.prose :is(h1, h2, h3, h4, h5, h6)[id] { scroll-margin-top: 16px; }
@media (min-width: 1280px) {
  .article-toc { position: absolute; top: 0; bottom: 0; left: calc(100% + 36px); width: min(220px, (100vw - var(--content-width)) / 2 - 36px); margin: 0; }
  .toc { position: sticky; top: 112px; border: 0; border-radius: 0; padding: 4px 0; }
  .toc ol { max-height: calc(100vh - 176px); }
}
pre { padding: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; line-height: 1.5; }
code { font-size: .9em; }
blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 20px; color: var(--muted); }
table { border-collapse: collapse; display: block; overflow-x: auto; }
td, th { padding: 8px 16px; border: 1px solid var(--line); text-align: left; }
label { display: block; margin-bottom: 8px; }
textarea { display: block; width: 100%; padding: 14px; margin-bottom: 12px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
button { padding: 8px 16px; border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: var(--paper); font: inherit; font-size: .85em; cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
[hidden] { display: none !important; }
.site-footer { padding: 44px 0; margin-top: 40px; color: var(--muted); font-size: .8em; border-top: 1px solid var(--line); }
.subscription input { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper); font: inherit; }
.subscription p { color: var(--muted); }
.muted, .search-meta, .stats-note { color: var(--muted); }
.search-controls { display: flex; gap: 12px; }
.search-controls input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper); font: inherit; }
.search-controls button { flex-shrink: 0; }
.search-results { list-style: none; padding: 0; }
.search-results li { padding: 24px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.search-results h2 { margin: 0 0 8px; font-size: 1.15em; }
.search-results p { margin: 8px 0; }
.search-meta { font-size: .8em; }
.search-results mark { background: var(--selection-bg, var(--line)); color: var(--selection-ink, var(--ink)); border-radius: 2px; padding: 0 1px; }
.admin-auth { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.stats-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px 0 44px; }
.stats-cards > div { border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.stats-cards dt { color: var(--muted); font-size: .8em; }
.stats-cards dd { margin: 8px 0 0; font-size: 1.6em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats-section { margin: 36px 0; }
.stats-section h2 { font-size: 1.1em; }
.stats-chart { display: flex; align-items: end; gap: 4px; height: 160px; border-bottom: 1px solid var(--line); margin: 16px 0; }
.stats-day { display: flex; flex: 1; align-items: end; gap: 1px; height: 100%; min-width: 0; }
.stats-day span { flex: 1; border-radius: 2px 2px 0 0; }
.stats-range { display: flex; justify-content: space-between; color: var(--muted); font-size: .75em; margin: -8px 0 20px; }
.views-bar, .stats-legend span:first-child::before { background: var(--ink); }
.visitors-bar, .stats-legend span:last-child::before { background: var(--muted); opacity: .55; }
.stats-legend { display: flex; gap: 20px; color: var(--muted); font-size: .8em; }
.stats-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; }
.stats-table { width: 100%; margin-top: 16px; font-size: .9em; }
.stats-table td, .stats-table th { overflow-wrap: anywhere; }
.stats-note { margin-top: 40px; font-size: .8em; }
.stats-section summary { cursor: pointer; color: var(--muted); }
@media (max-width: 600px) { .stats-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-color-scheme: dark) { :root { --paper: #1e2320; --ink: #e0e5dc; --muted: #a3ad9f; --line: #3b443c; --accent: #b0cba8; } }
@media (max-width: 500px) { body { padding: 0 18px; } .intro { padding-top: 40px; } nav { gap: 12px; } }
