/* A quiet, self-contained journal. No external fonts or UI dependencies. */
:root {
  color-scheme: light;
  --paper: #f8f6f1;
  --ink: #282923;
  --muted: #6f7068;
  --line: #deddd4;
  --accent: #a34830;
  --accent-soft: #f0e6dc;
  --surface: #f1eee6;
  --focus: #a34830;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Noto Serif CJK SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c1e1b;
  --ink: #ecebe2;
  --muted: #aaa99f;
  --line: #3c3f36;
  --accent: #df9478;
  --accent-soft: #362b24;
  --surface: #252821;
  --focus: #df9478;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --paper: #1c1e1b; --ink: #ecebe2; --muted: #aaa99f; --line: #3c3f36; --accent: #df9478; --accent-soft: #362b24; --surface: #252821; --focus: #df9478; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; -webkit-font-smoothing: antialiased; }
::selection { color: var(--ink); background: var(--accent-soft); }
a { color: inherit; text-decoration: none; text-underline-offset: 5px; }
button, input { font: inherit; }
button { color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; border-radius: 2px; }
[hidden] { display: none !important; }
.site-shell { width: min(100% - 112px, 1080px); margin: 0 auto; }
.site-header { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.wordmark { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: -1.2px; padding: 8px 0; }
.wordmark span { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 20px; }
.writing-link { font-size: 13px; font-weight: 550; padding: 15px 2px; position: relative; }
.writing-link.is-current::after { content: ""; height: 3px; width: 3px; border-radius: 50%; background: var(--accent); position: absolute; bottom: 4px; left: calc(50% - 1px); }
.icon-link { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 44px; background: none; border: 0; cursor: pointer; border-radius: 50%; }
.icon-link svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-link:hover, .writing-link:hover, .site-footer a:hover, .back-link:hover { color: var(--accent); }
.nav-divider { width: 1px; height: 16px; background: var(--line); margin: 0 -10px; }
.sun-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: center; gap: 64px; padding: 78px 0 74px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; font: 10px/1.5 var(--mono); letter-spacing: 1.8px; color: var(--muted); }
.status-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { font-family: var(--serif); font-size: clamp(70px, 7.8vw, 100px); font-weight: 400; line-height: 1.02; letter-spacing: -4.7px; margin-bottom: 25px; }
.hero h1 em { color: var(--accent); font-weight: 400; }
.hero-description { color: var(--muted); font-size: 16px; line-height: 1.8; max-width: 365px; margin-bottom: 0; text-wrap: balance; }
.hero-art { padding-top: 28px; text-align: center; transform: rotate(-9deg); }
.orbital-sketch { width: 100%; height: auto; }
.sketch-guide, .sketch-axis { stroke: var(--line); stroke-width: 1; }
.sketch-orbits { stroke: var(--ink); stroke-width: 1; opacity: .7; }
.sketch-star { fill: var(--accent); }
.sketch-planet { fill: var(--accent); stroke: var(--paper); stroke-width: 3; }
.sketch-small-planet { fill: var(--ink); stroke: var(--paper); stroke-width: 2; }
.art-caption { display: block; margin-top: 10px; color: var(--muted); font: 8px/1.5 var(--mono); letter-spacing: 1.9px; }
.writing-section { border-top: 1px solid var(--line); padding: 34px 0 66px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.section-heading h2 { font-family: var(--serif); font-size: 29px; font-weight: 400; letter-spacing: -.8px; margin-bottom: 0; }
.heading-dot { color: var(--accent); }
.entry-count { color: var(--muted); font: 9px/1.5 var(--mono); letter-spacing: 1.4px; white-space: nowrap; }
.empty-state { min-height: 255px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 47px 20px 8px; }
.paper-mark { position: relative; width: 44px; height: 51px; margin-bottom: 20px; transform: rotate(-9deg); }
.paper-mark svg { width: 100%; height: 100%; stroke: var(--muted); stroke-width: 1; }
.paper-mark span { color: var(--accent); position: absolute; font: 30px/1 var(--serif); right: -11px; top: 19px; padding: 0 2px; background: var(--paper); }
.empty-state h3 { font-family: var(--serif); font-size: 25px; font-weight: 400; letter-spacing: -.5px; margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 13px; line-height: 1.85; margin-bottom: 0; }
.site-footer { border-top: 1px solid var(--line); padding: 26px 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.footer-note { font-family: var(--serif); font-style: italic; font-size: 13px; }
.site-footer a { min-height: 32px; display: inline-flex; align-items: center; gap: 10px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 12px 18px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Writing index, ready for the first published post. */
.post-list { margin-top: 28px; }
.post-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) 24px; gap: 30px; border-top: 1px solid var(--line); padding: 34px 0; align-items: start; }
.post-date { color: var(--muted); font: 10px/1.6 var(--mono); padding-top: 3px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--accent); font: 10px/1.7 var(--mono); letter-spacing: .6px; margin-bottom: 10px; }
.post-summary h3 { font: 400 28px/1.25 var(--serif); letter-spacing: -.6px; margin-bottom: 12px; overflow-wrap: anywhere; }
.post-summary h3 a:hover { color: var(--accent); }
.post-description { color: var(--muted); font-size: 14px; line-height: 1.8; margin-bottom: 12px; overflow-wrap: anywhere; }
.reading-time { color: var(--muted); font: 10px/1.8 var(--mono); }
.post-arrow { color: var(--muted); font-size: 23px; line-height: 1; }
.post-row:has(a:hover) .post-arrow { color: var(--accent); }
.search-wrap { margin-top: 24px; }
#post-search { width: min(100%, 360px); border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 0; padding: 12px 14px; font-size: 14px; }
#post-search::placeholder { color: var(--muted); }
.search-empty { color: var(--muted); padding: 40px 0; font-size: 15px; }
/* Long-form reading, including Chinese text, code, figures, and tables. */
.article-shell { max-width: 720px; margin: 0 auto; padding: 48px 0 70px; }
.back-link { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); padding: 8px 0; margin-bottom: 46px; }
.article-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 42px; }
.article-toolbar .back-link { margin: 0; min-height: 44px; }
.language-switch { display: flex; flex-shrink: 0; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 6px; gap: 2px; }
.language-switch a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 15px; font: 12px/1.4 var(--sans); color: var(--muted); border-radius: 3px; }
.language-switch a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.language-switch a:hover { color: var(--accent); }
.post-details { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.post-languages { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font: 10px/1.8 var(--sans); }
.post-languages a { padding: 5px 0; }
.post-languages a:hover { color: var(--accent); text-decoration: underline; }
.post-languages span { color: var(--line); }
@media (max-width: 640px) {
  .article-toolbar { margin-bottom: 27px; gap: 10px; }
  .article-toolbar .back-link { font-size: 11px; gap: 7px; }
  .language-switch a { padding: 0 11px; min-height: 38px; font-size: 11px; }
}
.article-header { padding-bottom: 36px; margin-bottom: 38px; border-bottom: 1px solid var(--line); }
.article-header h1 { font: 400 clamp(36px, 5vw, 55px)/1.15 var(--serif); letter-spacing: -1.9px; margin-bottom: 21px; overflow-wrap: anywhere; }
.article-description { color: var(--muted); font-size: 19px; line-height: 1.7; margin-bottom: 25px; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.prose { font-family: var(--serif); font-size: 19px; line-height: 1.9; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.5em; }
.prose h2 { font-size: 31px; line-height: 1.35; font-weight: 500; letter-spacing: -.8px; margin: 1.8em 0 .65em; }
.prose h3 { font-size: 24px; line-height: 1.4; font-weight: 500; margin: 1.6em 0 .65em; }
.prose h4, .prose h5, .prose h6 { line-height: 1.5; margin: 1.5em 0 .6em; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose li { padding-left: .3em; margin-bottom: .4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li > ul, .prose li > ol { margin-bottom: 0; }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: 25px; margin: 32px 0; color: var(--muted); font-style: italic; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-family: var(--mono); font-size: .78em; background: var(--surface); padding: .15em .35em; border-radius: 3px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); padding: 22px; line-height: 1.7; overflow-x: auto; max-width: 100%; border-radius: 4px; }
.prose pre code { padding: 0; background: none; border-radius: 0; font-size: 13px; overflow-wrap: normal; }
.prose img, .prose video { max-width: 100%; height: auto; display: block; margin: 32px auto; border-radius: 3px; }
.prose figure { margin: 32px 0; }
.prose figure img { margin-bottom: 12px; }
.prose figcaption { color: var(--muted); text-align: center; font: 12px/1.7 var(--sans); }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin: 30px 0; font: 14px/1.7 var(--sans); }
.prose td, .prose th { border-bottom: 1px solid var(--line); text-align: left; padding: 12px 18px; min-width: 100px; }
.prose th { background: var(--surface); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose .footnotes { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; font: 13px/1.8 var(--sans); color: var(--muted); }
.highlight .c, .highlight .c1, .highlight .cm { color: var(--muted); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .s, .highlight .s1, .highlight .s2, .highlight .na { color: var(--accent); }
.highlight .nf, .highlight .nc { font-weight: 700; }
.article-end { font-size: 30px; text-align: center; color: var(--accent); margin: 45px 0; }
.post-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; border-top: 1px solid var(--line); padding-top: 26px; font: 18px/1.5 var(--serif); }
.post-pagination a { overflow-wrap: anywhere; }
.post-pagination a:hover { color: var(--accent); }
.post-pagination span { display: block; font: 9px/1.8 var(--mono); letter-spacing: 1px; color: var(--muted); margin-bottom: 10px; }
.next-post { grid-column: 2; text-align: right; }
.not-found { padding: 110px 0 140px; max-width: 660px; }
.not-found h1 { font: 400 clamp(44px, 6vw, 72px)/1.1 var(--serif); letter-spacing: -2px; }
.not-found p:not(.eyebrow) { color: var(--muted); line-height: 1.8; }
.not-found .back-link { color: var(--accent); margin: 20px 0 0; }
/* A readable subscription page keeps the machine-readable feed out of navigation. */
.subscription-page { max-width: 680px; margin: 0 auto; padding: 76px 0 85px; }
.subscription-page h1 { font: 400 clamp(42px, 5.5vw, 66px)/1.12 var(--serif); letter-spacing: -2px; margin-bottom: 24px; }
.subscription-page h1 em { color: var(--accent); font-weight: 400; }
.subscription-intro { color: var(--muted); font-size: 16px; line-height: 1.85; max-width: 570px; margin-bottom: 40px; }
.subscription-details { border-top: 1px solid var(--line); padding-top: 30px; }
.subscription-details h2 { font: 400 27px/1.3 var(--serif); letter-spacing: -.6px; margin-bottom: 18px; }
.subscription-steps { color: var(--muted); font-size: 14px; line-height: 1.85; padding-left: 20px; margin: 0 0 30px; }
.subscription-steps li { padding-left: 6px; margin-bottom: 9px; }
.subscription-steps li::marker { color: var(--accent); }
.feed-label { display: block; color: var(--muted); font: 10px/1.7 var(--mono); letter-spacing: .8px; margin-bottom: 9px; }
.feed-address-row { display: flex; gap: 10px; }
#feed-address { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--ink); padding: 15px 13px; font: 12px/1.6 var(--mono); }
.copy-feed { flex-shrink: 0; border: 0; border-radius: 3px; background: var(--ink); color: var(--paper); padding: 13px 20px; font-size: 12px; min-height: 48px; cursor: pointer; }
.copy-feed:hover { background: var(--accent); }
.copy-status { color: var(--accent); font-size: 12px; line-height: 1.8; min-height: 22px; margin: 10px 0 12px; }
.subscription-note { font-size: 12px; line-height: 1.8; color: var(--muted); margin-bottom: 0; }
.subscription-page .back-link { margin: 28px 0 0; }
@media (max-width: 640px) {
  .subscription-page { padding: 47px 0 52px; }
  .subscription-page .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .subscription-page h1 { letter-spacing: -1.5px; }
  .subscription-intro { font-size: 14px; margin-bottom: 30px; }
  .subscription-steps { font-size: 13px; }
}
@media (max-width: 480px) {
  .feed-address-row { flex-direction: column; }
  #feed-address { width: 100%; }
}
@media (min-width: 1500px) { .hero { padding: 94px 0 88px; } }
@media (max-width: 900px) {
  .site-shell { width: calc(100% - 72px); }
  .hero { grid-template-columns: minmax(0, 1fr) 210px; gap: 28px; padding: 66px 0; }
  .hero h1 { font-size: 78px; letter-spacing: -4px; }
  .post-row { grid-template-columns: 100px minmax(0, 1fr) 20px; gap: 20px; }
}
@media (max-width: 640px) {
  .site-shell { width: calc(100% - 40px); }
  .site-header { min-height: 84px; gap: 12px; }
  .wordmark { font-size: 25px; }
  .header-nav { gap: 8px; }
  .nav-divider { margin: 0; }
  .icon-link { width: 36px; }
  .writing-link { font-size: 12px; margin-right: 4px; }
  .hero { grid-template-columns: 1fr; padding: 55px 0 42px; gap: 0; position: relative; }
  .eyebrow { font-size: 9px; letter-spacing: 1.6px; margin-bottom: 25px; }
  .hero h1 { font-size: clamp(57px, 12.5vw, 78px); letter-spacing: -3px; line-height: 1.04; margin-bottom: 22px; }
  .hero-description { font-size: 14px; line-height: 1.8; max-width: 280px; }
  .hero-art { display: none; }
  .writing-section { padding: 27px 0 40px; }
  .section-heading h2 { font-size: 26px; }
  .entry-count { font-size: 8px; letter-spacing: 1px; }
  .empty-state { padding: 43px 0 15px; min-height: 263px; }
  .empty-state h3 { font-size: 24px; }
  .empty-state p { font-size: 12px; max-width: 300px; }
  .site-footer { flex-wrap: wrap; gap: 10px 20px; padding: 22px 0 24px; font-size: 10px; }
  .footer-note { order: 3; width: 100%; font-size: 12px; }
  .post-row { grid-template-columns: minmax(0, 1fr) 20px; gap: 12px; padding: 27px 0; }
  .post-date { grid-column: 1 / -1; font-size: 9px; }
  .post-summary h3 { font-size: 26px; }
  .post-description { font-size: 13px; }
  .article-shell { padding: 27px 0 48px; }
  .back-link { margin-bottom: 31px; }
  .article-header { padding-bottom: 25px; margin-bottom: 28px; }
  .article-header h1 { letter-spacing: -1px; }
  .article-description { font-size: 16px; }
  .article-meta { font-size: 10px; gap: 5px 9px; }
  .prose { font-size: 17px; line-height: 1.9; }
  .prose h2 { font-size: 28px; }
  .prose h3 { font-size: 23px; }
  .prose blockquote { padding-left: 18px; }
  .prose pre { padding: 16px; }
  .post-pagination { font-size: 16px; gap: 18px; }
  .not-found { padding: 75px 0 110px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  :root, :root[data-theme="dark"] { --paper: #fff; --ink: #000; --muted: #555; --line: #ccc; --accent: #000; --surface: #f5f5f5; color-scheme: light; }
  .site-shell { width: 100%; }
  .header-nav, .site-footer, .back-link, .post-pagination, .skip-link, .hero-art, .language-switch { display: none; }
  .site-header { min-height: 65px; }
  .article-shell { max-width: none; padding-top: 30px; }
  .prose { font-size: 12pt; }
  .prose pre { white-space: pre-wrap; }
}

/* Navigation and accessible scrolling for long comparison articles. */
.prose .article-toc { padding: 24px 28px; margin: 34px 0 44px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); font: 14px/1.7 var(--sans); }
.prose .article-toc .toc-label { margin: 0 0 14px; color: var(--muted); font: 10px/1.6 var(--mono); letter-spacing: 1px; }
.prose .article-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 28px; margin: 0 0 18px; padding-left: 21px; }
.prose .article-toc li { margin: 0; padding-left: 2px; }
.prose .article-toc a { text-decoration: none; }
.prose .article-toc a:hover { text-decoration: underline; }
.prose .article-toc .toc-more { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
.prose .table-scroll { overflow-x: auto; max-width: 100%; margin: 30px 0; border: 1px solid var(--line); border-radius: 4px; }
.prose .table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.prose .table-scroll table { display: table; width: 100%; min-width: 620px; margin: 0; }
.prose .table-scroll th, .prose .table-scroll td { width: 33.333%; min-width: 190px; vertical-align: top; }
.prose .table-scroll tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .prose .article-toc { padding: 21px 20px; margin: 28px 0 34px; }
  .prose .article-toc ol { grid-template-columns: 1fr; gap: 6px; }
}
@media print {
  .prose .table-scroll { overflow: visible; }
  .prose .table-scroll table { min-width: 0; font-size: 9pt; }
  .prose .table-scroll th, .prose .table-scroll td { min-width: 0; }
}
