:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: #242424;
  background: #fff;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #245b91; text-underline-offset: 0.2em; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid #245b91; outline-offset: 4px; }
.site { max-width: 768px; margin: 0 auto; padding: 64px 24px 32px; }
.site-header { margin-bottom: 48px; padding-bottom: 24px; border-bottom: 1px solid #e5e5e5; }
.site-title { color: inherit; font-size: 22px; font-weight: 600; text-decoration: none; }
.site-description { margin: 8px 0 0; color: #666; font-size: 14px; line-height: 1.7; }
.section-title { margin: 0 0 24px; font-size: 18px; font-weight: 600; }
.post-list { margin: 0; padding: 0; list-style: none; }
.post-list li { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 20px; margin: 20px 0; line-height: 1.7; }
.post-list a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.post-list a:hover { text-decoration: underline; }
.post-list .post-title { display: block; font-size: 17px; font-weight: 600; line-height: 1.6; }
.post-list .post-title-secondary { margin-top: 4px; color: #666; font-size: 14px; font-weight: 400; }
.post-languages { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 13px; }
.post-languages [aria-current="page"] { color: #666; }
.post-date { color: #666; font-size: 14px; font-variant-numeric: tabular-nums; line-height: 1.95; }
.empty-state { color: #666; line-height: 1.8; }
.post-header { margin-bottom: 32px; }
h1 { margin: 0 0 12px; font-size: 30px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.prose { line-height: 1.85; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin: 2em 0 0.75em; font-weight: 600; line-height: 1.5; }
.prose h2 { font-size: 23px; }
.prose h3 { font-size: 19px; }
.prose h4, .prose h5, .prose h6 { font-size: 16px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1.4em; }
.prose ul, .prose ol { padding-left: 1.6em; }
.prose li > ul, .prose li > ol { margin-bottom: 0; }
.prose li + li { margin-top: 0.3em; }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid #ddd; color: #666; }
.prose blockquote > :last-child { margin-bottom: 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 0.875em; }
code { padding: 0.15em 0.35em; background: #f5f5f5; border-radius: 3px; }
pre { padding: 16px; overflow-x: auto; line-height: 1.65; background: #f5f5f5; tab-size: 4; }
pre code { padding: 0; font-size: inherit; border-radius: 0; }
.prose img, .prose video { max-width: 100%; height: auto; }
.prose mjx-container[display="true"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid #ddd; text-align: left; }
.prose th { background: #f5f5f5; }
.prose hr { margin: 32px 0; border: 0; border-top: 1px solid #e5e5e5; }
.post-comments { margin-top: 48px; padding-top: 24px; border-top: 1px solid #e5e5e5; }
.post-comments h2 { margin: 0 0 12px; font-size: 23px; font-weight: 600; }
.comments-hint { margin: 0 0 20px; color: #666; font-size: 14px; line-height: 1.7; }
.post-navigation { margin-top: 48px; font-size: 14px; }
.site-footer { margin-top: 64px; padding-top: 20px; border-top: 1px solid #e5e5e5; font-size: 13px; }
.site-footer a { color: #666; }
.skip-link { position: absolute; top: 8px; left: 12px; padding: 8px 12px; background: #fff; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

/* Keep code highlighting quiet and readable. */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp, .highlight .cs { color: #666; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt { color: #70409a; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc, .highlight .sd { color: #356b43; }
.highlight .nf, .highlight .nc { color: #245b91; }

@media (max-width: 540px) {
  .site { padding: 32px 20px 24px; }
  .site-header { margin-bottom: 32px; }
  .post-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 24px 0; }
  h1 { font-size: 26px; }
  .prose h2 { font-size: 21px; }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 1em;
  margin-bottom: 24px;
  font-size: 0.9em;
}

.category-label {
  display: block;
  margin: 2px 0 4px;
  font-size: 0.85em;
  color: #666;
}
