:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --muted: #94a3b8;
  --accent: #16a34a;
  --accent-soft: #dcfce7;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 6px 18px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
}
.brand-mark { font-size: 20px; }
.brand-tag {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* Loading / error */
.loading, .error {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
  font-size: 15px;
}
.error { color: #dc2626; }

/* List */
.list { display: flex; flex-direction: column; gap: 16px; padding: 22px 0; }
.post-card {
  display: flex;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(15,23,42,.1); }
.post-thumb {
  width: 116px;
  min-width: 116px;
  height: 86px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #bbf7d0, #86efac);
}
.post-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
}
.post-body { flex: 1; min-width: 0; }
.post-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-desc {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tag {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 8px;
  border-radius: 999px;
}

/* Detail */
.detail { padding: 22px 0 40px; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 18px;
}
.back-btn:hover { background: #f1f5f9; }
.detail h1 { font-size: 26px; line-height: 1.25; margin: 0 0 10px; }
.detail .meta { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.detail img { max-width: 100%; height: auto; border-radius: 10px; margin: 14px 0; display: block; }
.detail pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
}
.detail code { background: #f1f5f9; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.detail pre code { background: none; padding: 0; }
.detail blockquote {
  border-left: 3px solid var(--accent);
  margin: 14px 0;
  padding: 4px 16px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}
.detail a { color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 30px;
  padding: 18px 0;
  font-size: 12px;
  color: var(--muted);
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.muted { color: var(--muted); }

@media (max-width: 520px) {
  .post-thumb { width: 92px; min-width: 92px; height: 72px; }
  .brand-tag { display: none; }
  .detail h1 { font-size: 22px; }
}

/* Subscribe */
.subscribe {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 34px 0;
  margin-top: 28px;
}
.subscribe-inner { text-align: center; }
.subscribe h2 { margin: 0 0 6px; font-size: 20px; }
.subscribe p { margin: 0 auto 16px; max-width: 520px; color: var(--ink-soft); font-size: 14px; }
.subscribe-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.subscribe-form input {
  flex: 1 1 260px;
  max-width: 320px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
}
.subscribe-form input:focus { border-color: var(--accent); }
.subscribe-form button {
  padding: 11px 22px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.subscribe-form button:hover { background: #15803d; }
.subscribe-form button:disabled { opacity: .6; cursor: default; }
.subscribe-msg { margin-top: 12px; font-size: 13px; min-height: 18px; }
.subscribe-msg.success { color: var(--accent); }
.subscribe-msg.error { color: #dc2626; }

@media (max-width: 520px) {
  .subscribe { padding: 26px 0; }
  .subscribe-form button { flex: 1 1 100%; }
}
