:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #111827;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(920px, 92vw); margin: 0 auto; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.site-title { font-size: 1.05rem; font-weight: 700; }

.site-nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 14px;
}
.site-nav li { margin: 0; }

.site-main { padding: 26px 0 40px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.entry-title { margin: 0 0 6px; line-height: 1.35; }
.entry-title a:hover { text-decoration: none; opacity: .85; }
.meta { color: var(--muted); font-size: .92rem; margin-bottom: 12px; }

.single-post,
.single-page {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 { margin-top: 1.5em; line-height: 1.4; }
.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content table { margin: 1em 0; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}
.entry-content blockquote {
  border-left: 4px solid #d1d5db;
  padding: 4px 14px;
  color: #374151;
  background: #f9fafb;
}
.entry-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 6px; }
.entry-content pre {
  background: #111827;
  color: #f9fafb;
  padding: 14px;
  border-radius: 10px;
  overflow: auto;
}
.entry-content pre code { background: transparent; padding: 0; }

.kl-hero h1 { margin: 0 0 8px; line-height: 1.25; }
.kl-hero p { margin: 0 0 14px; color: #374151; }
.kl-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.kl-section { margin-top: 22px; }
.kl-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  margin-top: 26px;
}
.footer-inner {
  min-height: 62px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .92rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
}
.btn:hover { text-decoration: none; opacity: .92; }
.btn-light {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--line);
}

@media (max-width: 768px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }
  .site-nav ul { flex-wrap: wrap; }
  .kl-grid { grid-template-columns: 1fr; }
}
