/* ============================================================
   暖树.com — 共享样式（明亮主题）
   参考 ns-app 03-anchor-detail.png：浅灰蓝底、白色卡片、蓝色 accent
   ============================================================ */

:root {
  --bg: #eef1f8;
  --card: #ffffff;
  --ink: #1e293b;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e5e8f2;
  --accent: #3b6df0;
  --accent-soft: #eaf0fe;
  --accent-deep: #2b54c9;
  --violet: #7c6cf0;
  --violet-soft: #efedfd;
  --amber: #e8963c;
  --amber-soft: #fdf2e3;
  --green: #3aa57c;
  --green-soft: #e6f6ef;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(30, 41, 59, .04), 0 4px 16px rgba(30, 41, 59, .06);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---------- 顶部导航（共享 header） ---------- */
.site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--ink);
  font-size: 16px;
  flex-shrink: 0;
}
.logo-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-family: var(--serif);
  box-shadow: 0 2px 8px rgba(59, 109, 240, .35);
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.site-nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  transition: all .18s ease;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: #f1f4fb; }
.site-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.header-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}

/* ---------- 主体容器 ---------- */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

main { flex: 1; }

/* ---------- 页脚（共享 footer） ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  margin-top: 48px;
}
.site-footer .wrap {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--faint);
}
.site-footer .foot-brand {
  font-family: var(--serif);
  color: var(--muted);
  font-weight: 600;
}
.site-footer .foot-right { margin-left: auto; }

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 2px 9px;
  border-radius: 999px;
  line-height: 1.6;
}
.tag-blue   { background: var(--accent-soft); color: var(--accent); }
.tag-violet { background: var(--violet-soft); color: var(--violet); }
.tag-amber  { background: var(--amber-soft);  color: var(--amber); }
.tag-green  { background: var(--green-soft);  color: var(--green); }
.tag-gray   { background: #f1f4f9;            color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .18s ease;
  font-family: var(--sans);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: #cdd5e6; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5a86f5);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 109, 240, .35);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(59, 109, 240, .45); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

/* ---------- 面包屑 ---------- */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--faint);
}
.crumb .crumb-pill {
  border: 1px solid var(--line);
  background: #fff;
  padding: 3px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
}
.crumb .crumb-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .site-header .wrap { height: 52px; gap: 8px; }
  .logo span.logo-text { display: none; }
  .site-nav a { padding: 5px 10px; font-size: 13px; }
  .header-hint { display: none; }
  .site-footer .foot-right { margin-left: 0; width: 100%; }
}
