:root {
  --navy: #0f2b46;
  --navy-2: #14406b;
  --accent: #1f6feb;
  --accent-2: #0a58ca;
  --ink: #1c2b3a;
  --muted: #5b6b7b;
  --line: #e3e9f0;
  --bg: #f5f7fa;
  --white: #ffffff;
  --ok: #16803c;
  --warn: #b26a00;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 43, 70, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* 顶部导航 */
.nav {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; color: #fff; }
.brand span { color: #7fb3ff; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: #d7e5f7; font-size: 15px; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; font-weight: 600; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-2); }
.btn.ghost { background: rgba(255, 255, 255, 0.14); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1d5a9c 100%);
  color: #fff;
  padding: 84px 0 72px;
}
.hero h1 { font-size: 40px; margin: 0 0 18px; line-height: 1.3; }
.hero p { font-size: 18px; color: #cfe2f7; max-width: 680px; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* 通用区块 */
.section { padding: 64px 0; }
.section h2 { font-size: 28px; margin: 0 0 12px; }
.section .lead { color: var(--muted); margin: 0 0 36px; }

/* 数据统计 */
.stats { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 40px 0; }
.stat { text-align: center; }
.stat b { display: block; font-size: 34px; color: var(--navy); }
.stat span { color: var(--muted); font-size: 14px; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 10px; font-size: 18px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card .icon { font-size: 28px; }

/* 页脚 */
.footer { background: var(--navy); color: #b9cbe0; padding: 44px 0; margin-top: 20px; }
.footer .grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; margin: 0 0 12px; font-size: 15px; }
.footer p, .footer a { color: #9fb6d0; font-size: 14px; }
.footer a { display: block; margin-bottom: 6px; }

/* 检索页 */
.search-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 48px 0 40px; }
.search-hero h1 { margin: 0 0 8px; font-size: 30px; }
.search-hero p { color: #cfe2f7; margin: 0 0 22px; }
.search-box { display: flex; gap: 10px; max-width: 760px; }
.search-box input {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  outline: none;
}
.search-box button { padding: 0 28px; font-size: 16px; border-radius: 10px; }

.layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 28px 0 60px; align-items: start; }
.sidebar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 84px;
}
.sidebar h4 { margin: 0 0 8px; font-size: 14px; color: var(--navy); }
.fgroup { margin-bottom: 16px; }
.fgroup label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; margin: 6px 0; }
.fgroup input[type="checkbox"] { width: 16px; height: 16px; }
.fgroup select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }

.results { min-width: 0; }
.meta-line { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.meta-line b { color: var(--navy); }

.hit {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.hit .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.hit .law { font-weight: 700; color: var(--navy); font-size: 16px; }
.hit .article { color: var(--accent); font-weight: 600; }
.badge {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e8f1fd;
  color: var(--accent-2);
  white-space: nowrap;
}
.badge.ok { background: #e6f5ec; color: var(--ok); }
.badge.old { background: #f6efe3; color: var(--warn); }
.hit .content { color: #33424f; font-size: 15px; margin: 0 0 10px; }
.hit .content em { background: #fff3b0; color: #6b5200; font-style: normal; padding: 0 2px; border-radius: 3px; }
.hit .foot { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.hit .foot a { font-size: 13px; }

.empty { background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); padding: 60px 20px; text-align: center; color: var(--muted); }

/* 分页 */
.pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; }
.pager-btn {
  min-width: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--navy); font-size: 14px; cursor: pointer;
}
.pager-btn:hover:not(:disabled):not(.active) { border-color: var(--accent); color: var(--accent); }
.pager-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; cursor: default; }
.pager-btn:disabled { color: #b6c2d0; cursor: not-allowed; background: #f5f7fa; }
.pager-ellipsis { color: var(--muted); padding: 0 4px; }

/* JSON 查看 */
pre.json { background: #0d1b2a; color: #c9e1ff; padding: 16px; border-radius: 8px; overflow: auto; font-size: 13px; line-height: 1.5; }

@media (max-width: 860px) {
  .stats .grid, .cards, .footer .grid { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero h1 { font-size: 30px; }
}

