:root {
  --paper: #f5faf6;
  --paper-2: #edf6f1;
  --surface: #ffffff;
  --ink: #123832;
  --ink-2: #385d55;
  --muted: #718980;
  --line: #d8e8e0;
  --brand: #075243;
  --brand-2: #16745f;
  --mint: #dff5ea;
  --mint-strong: #aaf0ce;
  --amber: #f0bc56;
  --amber-soft: #fff2d3;
  --blue: #d8ecfb;
  --blue-ink: #2b5f81;
  --coral: #cc6b59;
  --coral-soft: #ffe5df;
  --shadow: 0 18px 44px rgba(12, 61, 49, .11);
  --radius: 8px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
strong { font-weight: 780; }
h1, h2, h3, p { overflow-wrap: anywhere; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 250, 246, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.nav-inner {
  max-width: var(--max);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--mint-strong);
  font-weight: 850;
}
.brand-name { display: block; font-size: 17px; line-height: 1.12; }
.brand-sub { display: block; color: var(--muted); font-size: 11px; line-height: 1.15; }
.nav-links { display: flex; align-items: center; gap: 20px; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.nav-links a { padding: 8px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--brand); border-bottom-color: var(--amber); }
.nav-cta, .btn-primary, .btn-secondary {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 850;
  border: 0;
}
.nav-cta, .btn-primary { background: var(--brand); color: #f5fff8; box-shadow: 0 10px 24px rgba(7, 82, 67, .18); }
.btn-secondary { background: var(--surface); color: var(--brand); border: 1px solid var(--line); box-shadow: none; }

.policy-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px 104px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 44px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid #b7dfcf;
  border-radius: 999px;
  background: #effaf4;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}
h1 {
  margin: 20px 0 18px;
  font-size: clamp(38px, 5.8vw, 66px);
  line-height: 1.06;
  letter-spacing: 0;
}
.lead { max-width: 650px; margin: 0 0 28px; color: var(--ink-2); font-size: 19px; }
.hero-actions, .proof { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions { margin-bottom: 18px; }
.proof { color: var(--muted); font-size: 14px; }
.proof span { padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.78); border: 1px solid var(--line); }

.query-panel, .policy-card, .drawer-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.query-panel { overflow: hidden; }
.panel-top { padding: 20px; background: linear-gradient(135deg, #0c5b4b, #16745f); color: #f4fff8; display: grid; gap: 6px; }
.panel-top span { color: #bdeed7; font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.panel-top strong { font-size: 25px; line-height: 1.2; }
.panel-top small { color: rgba(255,255,255,.78); }
.panel-body { padding: 18px 20px 20px; }
.panel-body h2 { margin: 0 0 12px; font-size: 20px; }
.query-form { display: grid; gap: 12px; }
.query-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 720; }
.query-form select,
.query-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fbfdfb;
  color: var(--ink);
}
.query-form select:focus,
.query-form input:focus,
.search-box input:focus {
  outline: 3px solid rgba(170, 240, 206, .72);
  border-color: #8bd3b9;
}
.query-submit { width: 100%; margin-top: 2px; }
.query-hint { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.query-boundary {
  margin: 8px 0 0;
  padding: 9px 11px;
  border-radius: var(--radius);
  background: #f1fbf5;
  border: 1px solid #d8e8e0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}
.action-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: action; }
.action-list li {
  counter-increment: action;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  background: #f8fbf9;
  border: 1px solid #e2eee8;
}
.action-list li::before {
  content: counter(action);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
}
.action-list span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.action-list strong,
.action-list span { grid-column: 2; min-width: 0; }

.section { max-width: var(--max); margin: 0 auto; padding: 70px 24px; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-label { color: var(--brand-2); font-size: 13px; font-weight: 850; }
h2 { margin: 8px 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
.section-head p, .section > p { color: var(--ink-2); }
.district-section { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 28px; align-items: center; }
.district-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.district-card, .category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfb;
  color: var(--ink);
  text-align: left;
  padding: 14px;
}
.district-card.active, .category-card.active {
  border-color: #9ed8c2;
  background: #f1fbf5;
}

.policy-drawer[hidden], .empty-state[hidden] { display: none !important; }
.policy-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.policy-card { padding: 18px; box-shadow: none; }
.policy-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 10px; }
.policy-card h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.policy-status { border-radius: 999px; padding: 5px 9px; background: var(--mint); color: var(--brand); font-size: 12px; font-weight: 850; white-space: nowrap; }
.policy-card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.policy-meta { display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; margin-bottom: 12px; }
.policy-card button { min-height: 40px; padding: 8px 14px; }

.split-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; max-width: none; }
.search-box { min-width: 330px; display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fbfdfb;
  color: var(--ink);
}
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.category-card strong, .category-card span { display: block; }
.category-card span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.empty-state { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfb; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); }
.data-status { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.loading-card { background: linear-gradient(90deg, #fbfdfb, #f2faf5, #fbfdfb); }

.policy-ai-result {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #b7dfcf;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f3fbf6, #ffffff);
}
.policy-ai-result[hidden] { display: none !important; }
.policy-ai-result.loading {
  color: var(--ink-2);
  background: linear-gradient(90deg, #fbfdfb, #eefaf4, #fbfdfb);
}
.policy-ai-result.error {
  border-color: #f0c3b7;
  background: var(--coral-soft);
}
.policy-ai-eyebrow {
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
}
.policy-ai-result h3 {
  margin: 4px 0 8px;
  font-size: 22px;
  line-height: 1.25;
}
.policy-ai-result p {
  margin: 0;
  color: var(--ink-2);
}
.policy-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.policy-ai-block {
  padding: 12px;
  border: 1px solid #e2eee8;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .76);
}
.policy-ai-block strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
}
.policy-ai-block ul,
.policy-ai-block ol {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 14px;
}
.policy-ai-block li + li { margin-top: 4px; }
.policy-ai-risk {
  margin-top: 12px !important;
  color: var(--muted) !important;
  font-size: 13px;
}

.bottom-notice {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 24px 96px;
  color: var(--ink-2);
}
.bottom-notice strong { color: var(--brand); }
.bottom-notice p { margin: 6px 0 0; }

.policy-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 56, 50, .38);
}
.drawer-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  position: relative;
}
.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand);
  font-size: 24px;
  line-height: 1;
}
.drawer-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 8px; }
.drawer-section ul, .drawer-section ol { margin: 0; padding-left: 22px; color: var(--ink-2); }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  max-width: 330px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink-2);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 920px) {
  .nav-inner { padding: 10px 18px; min-height: 58px; }
  .nav-links { display: none; }
  .brand-sub { display: none; }
  .policy-hero, .district-section { grid-template-columns: 1fr; }
  .policy-hero { padding: 42px 18px 56px; gap: 28px; }
  .section { padding: 54px 18px; }
  .policy-list, .category-grid, .policy-ai-grid { grid-template-columns: 1fr; }
  .split-head { display: block; }
  .search-box { min-width: 0; margin-top: 14px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-secondary, .nav-cta { width: 100%; }
}

@media (max-width: 560px) {
  h1 { font-size: 38px; }
  .district-grid { grid-template-columns: 1fr; }
  .policy-card-head { display: grid; }
  .toast { left: 14px; right: 14px; bottom: 14px; }
}
