:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #1a2233;
  --muted: #6b7585;
  --line: #e7e9ee;
  --brand: #0b6b53;       /* 沉稳的财经绿 */
  --brand-dark: #084c3b;
  --accent: #c8a24a;      /* 金色点缀 */
  --danger: #c0392b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 30, 50, .06), 0 8px 24px rgba(20, 30, 50, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

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

.site-header {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 28px 0;
  border-bottom: 3px solid var(--accent);
}
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.site-header a { color: #fff; }
.brand { font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.brand .dot { color: var(--accent); }
.tagline { color: #d7e6e0; font-size: 13px; }
.nav a { margin-left: 18px; font-size: 14px; opacity: .9; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 36px; padding-bottom: 60px; }

/* 文章列表 */
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(20,30,50,.1); }
.card h2 { margin: 0 0 6px; font-size: 19px; }
.card h2 a { color: var(--ink); }
.card .excerpt { color: var(--muted); margin: 8px 0 0; font-size: 15px; }
.meta { color: var(--muted); font-size: 13px; }
.badge {
  display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px;
  background: #fdf3da; color: #8a6d1f; margin-left: 8px; vertical-align: middle;
}

/* 文章详情 */
article.post h1 { font-size: 28px; line-height: 1.35; margin: 0 0 6px; }
article.post .meta { margin-bottom: 24px; }
.post-body h1 { font-size: 24px; margin-top: 32px; }
.post-body h2 { font-size: 20px; margin-top: 28px; border-left: 4px solid var(--brand); padding-left: 10px; }
.post-body p { margin: 14px 0; }
.post-body code { background: #eef1f0; padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.post-body pre { background: #0f1b17; color: #e6f0ec; padding: 16px; border-radius: 10px; overflow:auto; }
.post-body pre code { background: none; padding: 0; }
.post-body blockquote {
  margin: 18px 0; padding: 10px 16px; background: #f0f5f3;
  border-left: 4px solid var(--accent); color: #4a5560; border-radius: 0 8px 8px 0;
}
.post-body ul, .post-body ol { padding-left: 22px; }
.back { display: inline-block; margin-bottom: 18px; font-size: 14px; }

/* 表单 / 后台 */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px;
}
.panel h2 { margin-top: 0; }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=password], textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
}
textarea { resize: vertical; min-height: 220px; line-height: 1.6; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--ink); }
.check input { width: auto; }

button {
  appearance: none; border: 0; cursor: pointer; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; background: var(--brand); color: #fff;
  transition: background .12s ease;
}
button:hover { background: var(--brand-dark); }
button.ghost { background: #eef1f0; color: var(--ink); }
button.ghost:hover { background: #e2e7e5; }
button.danger { background: #fff; color: var(--danger); border: 1px solid #f0c9c4; padding: 6px 12px; }
button.danger:hover { background: #fdecea; }
button.sm { padding: 6px 12px; font-size: 13px; }

.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.admin-list li:last-child { border-bottom: 0; }
.admin-list .t { font-weight: 600; }
.actions { display: flex; gap: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #1a2233; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s ease; z-index: 50;
}
.toast.show { opacity: 1; }

.site-footer { color: var(--muted); font-size: 13px; text-align: center; padding: 30px 20px 50px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
