* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: var(--th-font);
  background: var(--th-bg);
  color: var(--th-ink);
  line-height: 1.75;
}
a { color: var(--th-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.site-head { border-bottom: 1px solid var(--th-line); background: var(--th-card); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; font-size: 18px; color: var(--th-ink); }
.nav a { margin-left: 18px; color: var(--th-muted); font-size: 14px; }
.nav a:hover { color: var(--th-accent); text-decoration: none; }

main.wrap { padding: 40px 20px 64px; }

/* 列表页 */
.list h1 { font-size: 24px; margin: 8px 0 24px; }
.item { padding: 20px 0; border-bottom: 1px solid var(--th-line); }
.item h2 { margin: 0 0 6px; font-size: 19px; }
.item h2 a { color: var(--th-ink); }
.item h2 a:hover { color: var(--th-accent); }
.excerpt { margin: 8px 0 0; color: var(--th-muted); font-size: 14px; }
.empty { color: var(--th-muted); }

/* 文章页 */
.post-head h1 { font-size: 28px; line-height: 1.35; margin: 8px 0 10px; }
.meta { color: var(--th-muted); font-size: 13px; margin-bottom: 24px; }
.meta time { font-variant-numeric: tabular-nums; }
.dot { margin: 0 6px; }
.tag { display: inline-block; background: var(--th-accent-weak); color: var(--th-accent); padding: 1px 10px; border-radius: 99px; font-size: 12px; margin-right: 6px; }
.cat { color: var(--th-accent); }

.fields { width: 100%; border-collapse: collapse; margin: 0 0 24px; background: var(--th-card); border-radius: var(--th-radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.fields th, .fields td { padding: 10px 16px; border-bottom: 1px solid var(--th-line); font-size: 14px; text-align: left; }
.fields th { width: 120px; color: var(--th-muted); font-weight: 500; }
.fields tr:last-child th, .fields tr:last-child td { border-bottom: 0; }

.content h2 { font-size: 22px; margin: 32px 0 12px; }
.content h3 { font-size: 18px; margin: 24px 0 10px; }
.content pre { background: var(--th-card); border: 1px solid var(--th-line); border-radius: var(--th-radius); padding: 16px; overflow-x: auto; font-family: var(--th-mono); font-size: 13px; }
.content code { font-family: var(--th-mono); background: var(--th-card); border: 1px solid var(--th-line); border-radius: 4px; padding: 1px 5px; font-size: 0.9em; }
.content pre code { border: 0; padding: 0; background: none; }
.content blockquote { margin: 16px 0; padding: 8px 16px; border-left: 3px solid var(--th-accent); background: var(--th-accent-weak); border-radius: 0 8px 8px 0; color: var(--th-muted); }
.content img { max-width: 100%; border-radius: var(--th-radius); }
.content table { width: 100%; border-collapse: collapse; }
.content th, .content td { border: 1px solid var(--th-line); padding: 8px 12px; font-size: 14px; }

.related { margin-top: 48px; border-top: 1px solid var(--th-line); padding-top: 20px; }
.related h2 { font-size: 16px; color: var(--th-muted); }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--th-card); border: 1px solid var(--th-line); border-radius: var(--th-radius); margin-bottom: 8px; }
.related li:hover { border-color: var(--th-accent); }
.rel-date { color: var(--th-muted); font-size: 12px; white-space: nowrap; }

.site-foot { border-top: 1px solid var(--th-line); color: var(--th-muted); font-size: 13px; }
.site-foot .wrap { display: flex; justify-content: space-between; align-items: center; height: 56px; }
.site-foot a { color: var(--th-muted); }
