:root {
  --c-primary: #1a56db;
  --c-primary-dark: #1447b0;
  --c-bg: #f4f6fb;
  --c-card: #ffffff;
  --c-text: #1f2937;
  --c-text-2: #6b7280;
  --c-border: #e5e7eb;
  --c-accent: #f59e0b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- 顶栏 ---- */
.topbar {
  background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary));
  color: #fff;
  padding: 20px 0 16px;
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.brand-mark { font-size: 22px; font-weight: 700; display: block; }
.brand-sub { font-size: 13px; opacity: .85; }
.cohort-switch { display: flex; gap: 8px; }
.cohort-switch button {
  border: 1px solid rgba(255,255,255,.5);
  background: transparent;
  color: #fff;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}
.cohort-switch button.active { background: #fff; color: var(--c-primary); font-weight: 600; border-color: #fff; }

.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.data-entry {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.16);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.data-entry:hover { background: #fff; color: var(--c-primary); text-decoration: none; }

/* ---- 筛选区 ---- */
.filter-bar { margin-top: 20px; }
.scope-switch { display: flex; gap: 10px; }
.scope-switch button {
  flex: 1;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.scope-switch button.active { color: var(--c-primary); border-color: var(--c-primary); background: #eef3ff; }

.city-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.city-row button {
  border: 1px solid var(--c-border);
  background: var(--c-card);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--c-text-2);
  cursor: pointer;
}
.city-row button.active { color: #fff; background: var(--c-primary); border-color: var(--c-primary); }

.search-row { margin-top: 12px; }
.search-input {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--c-card);
  outline: none;
}
.search-input:focus { border-color: var(--c-primary); }

.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.cat-nav a {
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  font-size: 13px;
  color: var(--c-text-2);
}
.cat-nav a.active { color: var(--c-primary); border-color: var(--c-primary); background: #eef3ff; font-weight: 600; }

/* ---- 卡片 ---- */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: 16px;
}
.card-title { font-size: 17px; margin-bottom: 12px; }
.card-title .badge-count { font-size: 12px; font-weight: 400; color: var(--c-text-2); margin-left: 8px; }

/* 时间轴 */
.timeline { list-style: none; }
.timeline li {
  display: flex;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--c-border);
}
.timeline li:last-child { border-bottom: none; }
.timeline .t-month {
  flex: 0 0 88px;
  font-weight: 600;
  color: var(--c-primary);
  font-size: 14px;
}
.timeline .t-event { font-size: 14px; color: var(--c-text); }

/* 政策条目 */
.policy-card { margin-top: 14px; }
.policy-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.policy-title { font-size: 16px; font-weight: 600; cursor: pointer; }
.policy-title:hover { color: var(--c-primary); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f0f3f9;
  color: var(--c-text-2);
  white-space: nowrap;
}
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.expired { background: #fee2e2; color: #991b1b; }
.summary-list { margin-top: 10px; padding-left: 20px; }
.summary-list li { font-size: 14px; color: var(--c-text); margin-bottom: 4px; }
.policy-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--c-text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.city-note {
  font-size: 13px;
  color: var(--c-text-2);
  background: #f0f3f9;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
}

.empty {
  text-align: center;
  color: var(--c-text-2);
  padding: 48px 0;
}

/* ---- 页脚 ---- */
.footer {
  margin-top: 40px;
  background: #111827;
  color: #9ca3af;
  padding: 28px 0 36px;
  font-size: 13px;
}
.footer-products { margin-bottom: 16px; }
.footer-label { display: block; color: #d1d5db; font-weight: 600; margin-bottom: 8px; }
.product-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.product-links a { color: #93c5fd; }
.footer-disclaimer { margin-bottom: 14px; line-height: 1.7; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-meta a { color: #93c5fd; }

/* ---- 手机端 ---- */
@media (max-width: 640px) {
  .brand-mark { font-size: 18px; }
  .brand-sub { font-size: 12px; }
  .topbar-inner { flex-direction: column; align-items: stretch; }
  .cohort-switch { justify-content: center; }
  .topbar-right { flex-direction: column; gap: 8px; }
  .data-entry { text-align: center; }
  .scope-switch { flex-direction: row; }
  .timeline .t-month { flex-basis: 72px; font-size: 13px; }
  .timeline .t-event { font-size: 13px; }
  .card { padding: 16px; }
  .policy-title { font-size: 15px; }
  .footer-meta { flex-direction: column; }
}
