* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #2f6fed;
  --text: #24292f;
  --muted: #6a737d;
  --border: #e1e4e8;
  --bg: #f6f8fa;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
}

.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; color: var(--text); text-decoration: none; }
.logo { width: 28px; height: 28px; object-fit: contain; }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav a:hover { color: var(--text); }
nav a.active { color: var(--brand); font-weight: 600; }

main { padding: 40px 0 64px; }

.hero { text-align: center; padding: 48px 0 36px; }
.hero h1 { font-size: 34px; margin-bottom: 12px; }
.hero p { color: var(--muted); margin-bottom: 8px; }
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
}
.btn:hover { opacity: .9; }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); margin-left: 8px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.card h3 { font-size: 16px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }

.page-title { font-size: 26px; margin-bottom: 16px; }
.prose p { margin-bottom: 12px; }
.prose ul { margin: 0 0 12px 20px; }

.note {
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.note time { color: var(--muted); font-size: 13px; }
.note h3 { font-size: 17px; margin: 2px 0 6px; }
.note p { font-size: 15px; }

.comments { margin-top: 48px; }
.comments h2 { font-size: 20px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

#reply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px dashed var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}
#reply-bar[hidden] { display: none; }
#reply-bar button { background: none; border: none; color: var(--brand); cursor: pointer; font-size: 14px; }

#comment-form { margin-bottom: 24px; }
#comment-form input, #comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
}
#comment-form input { max-width: 280px; margin-bottom: 10px; }
#comment-form textarea { min-height: 96px; resize: vertical; margin-bottom: 10px; }
#comment-form button {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 15px;
  cursor: pointer;
}
#comment-form button:hover { opacity: .9; }

.comment { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.comment-head .author { font-weight: 600; font-size: 15px; }
.comment-head .time { color: var(--muted); font-size: 12px; }
.comment-body { font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.reply-btn { margin-top: 8px; background: none; border: none; color: var(--brand); font-size: 13px; cursor: pointer; padding: 0; }
.reply-btn:hover { text-decoration: underline; }
.replies { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--border); }
.comment.reply { background: var(--bg); margin-bottom: 10px; }
.comment.reply:last-child { margin-bottom: 0; }

.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 24px 0; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); font-size: 13px; }
