:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1d2733;
  --muted: #67748a;
  --border: #e7ebf2;
  --accent: #2f6fed;
  --accent-2: #13b5a6;
  --accent-soft: #eaf1ff;
  --shadow: 0 10px 30px rgba(31, 50, 90, 0.08);
  --shadow-hover: 0 18px 44px rgba(31, 50, 90, 0.14);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, #1b2a4e 0%, #2f6fed 55%, #13b5a6 120%);
  color: #fff;
  padding: 22px 0;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 4px 18px rgba(27, 42, 78, 0.18);
}
.site-header .wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-header .brand { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.site-header .brand small { font-weight: 400; opacity: .82; font-size: 13px; margin-left: 10px; }
.site-header nav a { color: #dce7ff; font-size: 14px; margin-left: 18px; }

/* ---------- Hero ---------- */
.hero {
  max-width: 960px;
  margin: 38px auto 10px;
  padding: 0 24px;
}
.hero h1 {
  font-size: 30px;
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: .5px;
}
.hero p {
  color: var(--muted);
  font-size: 16px;
  max-width: 680px;
}
.hero .badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  font-weight: 600;
}

/* ---------- Layout ---------- */
.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

.section-title {
  font-size: 18px;
  margin: 34px 0 18px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

/* ---------- Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card .meta { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.card .tag {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}
.card h3 { font-size: 18.5px; line-height: 1.45; margin-bottom: 10px; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.card .more { margin-top: 14px; font-size: 14px; font-weight: 600; }

/* ---------- Article ---------- */
.article { max-width: 760px; margin: 30px auto 0; padding: 0 24px 60px; }
.article .crumb { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.article h1 { font-size: 28px; line-height: 1.4; margin-bottom: 12px; }
.article .meta { font-size: 13.5px; color: var(--muted); margin-bottom: 26px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.article .prose h2 {
  font-size: 21px;
  margin: 34px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--accent-2);
}
.article .prose p { margin: 14px 0; font-size: 16px; }
.article .prose ul, .article .prose ol { margin: 14px 0 14px 22px; }
.article .prose li { margin: 8px 0; font-size: 16px; }
.article .prose strong { color: #0f1b2d; }

.note {
  background: #fff8ec;
  border: 1px solid #ffe2b0;
  border-left: 4px solid #f0a500;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 14.5px;
  color: #6b5212;
}

pre {
  background: #0f1729;
  color: #e6edf6;
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 18px 0;
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
code {
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  background: #eef2f9;
  color: #b5384e;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13.5px;
}
pre code { background: none; color: inherit; padding: 0; }

.back-link { display: inline-block; margin: 8px 0 0; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 50px;
  background: #11192b;
  color: #aeb9cc;
  padding: 30px 0;
  font-size: 13.5px;
}
.site-footer .wrap { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.site-footer a { color: #cdd8ee; }
.site-footer .beian {
  border: 1px solid #2c3a55;
  padding: 6px 14px;
  border-radius: 8px;
  letter-spacing: .3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .article h1 { font-size: 23px; }
  .site-header nav a { margin-left: 12px; }
}
