:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --paper: #ffffff;
  --ink: #22211f;
  --muted: #626b74;
  --line: #d9dee3;
  --accent: #295f8d;
  --accent-strong: #174667;
  --code-bg: #eef1f4;
  --max: 880px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  line-height: 1.76;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

.site-header,
.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.brand {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.95rem;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
}

.page {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 66px;
}

.intro {
  max-width: 760px;
  padding: 26px 0 42px;
}

h1,
h2,
h3 {
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 7vw, 3.1rem);
  font-weight: 700;
}

h2 {
  margin: 42px 0 14px;
  font-size: 1.42rem;
}

h3 {
  margin: 30px 0 10px;
  font-size: 1.08rem;
}

p {
  margin: 0 0 18px;
}

hr {
  margin: 34px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.latest h2 {
  margin-top: 0;
}

.latest.compact h2 {
  font-size: 1.1rem;
}

.post-list {
  margin: 0;
  padding-left: 1.4rem;
}

.post-list li {
  margin: 10px 0;
}

.post-list time {
  display: inline-block;
  min-width: 9.8em;
  color: var(--muted);
  font-size: 0.92rem;
}

.root-label,
.meta,
.crumb,
.muted {
  color: var(--muted);
}

.crumb {
  margin-bottom: 24px;
  font-size: 0.92rem;
}

.meta {
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.article {
  max-width: 820px;
}

.article h1 {
  font-size: clamp(2rem, 7vw, 3.05rem);
}

.article ul {
  padding-left: 1.25rem;
}

.article li {
  margin: 8px 0;
}

pre,
code {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

code {
  padding: 0.08em 0.28em;
  border-radius: 4px;
  background: var(--code-bg);
  font-size: 0.92em;
}

pre {
  margin: 18px 0 24px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  line-height: 1.55;
}

pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.9rem;
}

.toc-tree {
  padding: 0;
  border: 0;
  background: transparent;
  white-space: pre;
}

.toc-tree .line {
  display: block;
}

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .page {
    padding-top: 36px;
  }

  .post-list time {
    display: block;
    min-width: 0;
  }
}
