:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1f22;
  --muted: #5d6268;
  --line: #e3e0d8;
  --accent: #0f5f6e;
  --accent-soft: #e6f0f1;
  --note: #f4efe2;
  --serif: "PT Serif", "Charter", "Georgia", "Times New Roman", serif;
  --sans: "PT Sans", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1c1f23;
    --text: #e6e4df;
    --muted: #a0a4a9;
    --line: #2e3237;
    --accent: #6cc3d1;
    --accent-soft: #1d3135;
    --note: #2a2720;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 var(--serif);
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.site-header { border-bottom: 1px solid var(--line); font-family: var(--sans); }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; letter-spacing: .01em; }
nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:first-child { margin-left: 0; }
nav a:hover { color: var(--accent); }

main { padding-top: 32px; padding-bottom: 56px; }

.intro h1 { font-size: 34px; line-height: 1.2; margin: 8px 0 6px; }
.intro p { color: var(--muted); font-family: var(--sans); margin: 0 0 32px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.card a { display: block; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); transition: border-color .15s; }
.card a:hover { border-color: var(--accent); }
.card-date { display: block; font: 13px var(--sans); color: var(--muted); margin-bottom: 4px; }
.card-title { display: block; font-size: 21px; line-height: 1.3; font-weight: 700; }
.card-desc { display: block; margin-top: 6px; color: var(--muted); font: 15px/1.5 var(--sans); }

.post h1 { font-size: 34px; line-height: 1.2; margin: 4px 0 20px; }
.post h2 { font-size: 25px; line-height: 1.3; margin: 44px 0 12px; }
.post h3 { font-size: 20px; margin: 30px 0 8px; }
.post p, .post li { hyphens: auto; }
.post ul, .post ol { padding-left: 1.3em; }
.post li { margin: 4px 0; }
.meta { font: 14px var(--sans); color: var(--muted); margin: 0; }
.back { margin-top: 48px; font-family: var(--sans); }

blockquote { margin: 20px 0; padding: 14px 18px; background: var(--note); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; font-size: 16px; }
blockquote p { margin: 0; }

.toc { margin: 0 0 28px; padding: 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-family: var(--sans); font-size: 15px; }
.toc summary { cursor: pointer; font-weight: 700; }
.toc ol { margin: 10px 0 4px; }

.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font: 14.5px/1.45 var(--sans); }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--accent-soft); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; }
.table-wrap table { min-width: 560px; }

img { max-width: 100%; height: auto; display: block; margin: 24px auto 8px; border-radius: 6px; background: #fff; }
img + em, p > em:only-child { display: block; font: 14px/1.5 var(--sans); color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); font: 13px/1.5 var(--sans); color: var(--muted); }
.site-footer .wrap { padding-top: 18px; padding-bottom: 28px; }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .post h1, .intro h1 { font-size: 27px; }
  .post h2 { font-size: 22px; }
}
