:root {
  --bg: #0b0c0f;
  --fg: #e9eefc;
  --muted: #aab3cf;
  --line: #24283a;
  --panel: #151923;
  --accent: #a7c8ff;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --fg: #121424;
    --muted: #4c556e;
    --line: #e6e8f0;
    --panel: #f5f6fa;
    --accent: #385a99;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, Arial, sans-serif;
  line-height: 1.7;
}
main { width: min(720px, 92vw); margin: 7vh auto 0; padding: 28px 18px; }
a { color: inherit; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.page-nav { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 42px; }
.page-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-name { font-weight: 650; text-decoration: none; }
h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.5px; line-height: 1.25; overflow-wrap: anywhere; }
h2 { font-size: 23px; line-height: 1.35; margin: 32px 0 12px; }
h3 { font-size: 19px; line-height: 1.4; margin: 28px 0 10px; }
p { margin: 0 0 18px; }
.intro, time, footer, .empty-state { color: var(--muted); }
.empty-state { margin-top: 34px; }
.post-list { list-style: none; padding: 0; margin: 32px 0 0; }
.post-list li { display: grid; grid-template-columns: 100px 1fr; gap: 18px; border-top: 1px solid var(--line); padding: 22px 0; }
.post-list time { padding-top: 3px; font-size: 13px; }
.post-list h2 { margin: 0; font-size: 20px; }
.post-list h2 a { display: inline-block; padding: 4px 0; min-height: 36px; text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; }
.post-list p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.post-header { margin-bottom: 32px; }
.post-header time { font-size: 13px; }
.post-body { overflow-wrap: anywhere; }
.post-body a { color: var(--accent); }
.post-body img, .post-body video { max-width: 100%; height: auto; }
.post-body img { display: block; margin: 24px 0; border-radius: 6px; }
.post-body blockquote { margin: 24px 0; padding: 0 18px; border-left: 2px solid var(--line); color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .9em; background: var(--panel); border-radius: 3px; padding: .1em .3em; }
pre { margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); overflow: auto; line-height: 1.55; overflow-wrap: normal; }
pre code { background: none; border-radius: 0; padding: 0; }
.highlight pre { margin-top: 0; }
.highlight .c, .highlight .c1, .highlight .cm { color: var(--muted); }
.highlight .k, .highlight .kd, .highlight .kt { color: var(--accent); font-weight: 600; }
.post-body table { display: block; max-width: 100%; overflow: auto; border-collapse: collapse; margin: 24px 0; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.post-body details { margin: 18px 0 24px; border: 1px solid var(--line); border-radius: 6px; padding: 0 16px; }
.post-body summary { cursor: pointer; min-height: 44px; padding: 9px 0; color: var(--muted); }
.post-body summary:hover { color: var(--accent); }
.post-body summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.post-body details[open] > summary { margin-bottom: 10px; }
.post-body details pre { margin-top: 12px; }
kbd { font-family: ui-monospace, monospace; font-size: .85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 6px; background: var(--panel); }
mark { color: #21200e; background: #f5e6a1; padding: .1em .2em; border-radius: 2px; }
.mermaid-figure { margin: 24px 0; }
.mermaid-graph { padding: 16px; border: 1px solid var(--line); border-radius: 6px; overflow: auto; text-align: center; }
.mermaid-graph svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.mermaid-figure details { margin-top: 8px; }
.footnotes { color: var(--muted); font-size: .9em; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 16px; }
.back-link { margin-top: 42px; }
.back-link a { display: inline-flex; align-items: center; min-height: 44px; }
footer { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 18px; font-size: 13px; }
@media (max-width: 480px) {
  main { margin-top: 24px; }
  .page-nav { margin-bottom: 30px; }
  .post-list li { grid-template-columns: 1fr; gap: 6px; }
}
