/* ============= Variables ============= */
:root {
  --black: #1a1a1a;
  --gray-900: #2a2a2a;
  --gray-700: #555;
  --gray-500: #888;
  --gray-300: #ccc;
  --gray-200: #e5e5e5;
  --gray-100: #f5f5f5;
  --gray-50:  #fafafa;
  --white:    #ffffff;
  --blue:     #2563eb;
  --blue-dark:#1e40af;
  --blue-light:#dbeafe;
  --blue-bg:  #f0f6ff;
  --serif:    "Source Han Serif SC", "思源宋体", "Noto Serif SC", Georgia, serif;
  --sans:     -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono:     "SF Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
}

/* ============= Reset ============= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
}

button, input, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }
input, select { outline: none; }
a { color: var(--blue); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
a:hover { border-color: var(--blue); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ============= Header ============= */
.site-header {
  border-bottom: 1px solid var(--gray-200);
  padding: 2.5rem 0 2rem;
  background: var(--white);
}
.site-title {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--black);
}
.site-subtitle {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}
.site-subtitle .dot { margin: 0 0.5rem; opacity: 0.5; }
.site-subtitle span { color: var(--gray-700); font-variant-numeric: tabular-nums; }

/* ============= Tab Nav ============= */
.tab-nav {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  z-index: 50;
}
.tab-nav .container { display: flex; gap: 0; overflow-x: auto; }
.tab-btn {
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--black); }
.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

main { padding: 2rem 0 4rem; min-height: 60vh; }

.view { display: none; }
.view.active { display: block; }

/* ============= Filter Bar ============= */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  align-items: center;
}
.filter-bar input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  background: var(--white);
  transition: border-color .15s;
}
.filter-bar input[type="search"]:focus { border-color: var(--blue); }
.filter-bar select {
  padding: 0.55rem 1.5rem 0.55rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M0 0l5 6 5-6z" fill="%23888"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}
.filter-bar select:hover { border-color: var(--gray-500); }
.btn-ghost {
  padding: 0.55rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  background: var(--white);
  color: var(--gray-700);
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--black); color: var(--black); }
.result-count {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
}

/* ============= Entry Card ============= */
.entry {
  position: relative;
  padding: 1.5rem 1.75rem 1.5rem 2rem;
  margin-bottom: 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  transition: all .15s;
}
.entry:hover {
  border-color: var(--gray-500);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.entry::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gray-300);
  border-radius: 6px 0 0 6px;
}
.entry[data-period="1992-2001"]::before  { background: #cbd5e1; }
.entry[data-period="2002-2006"]::before  { background: var(--blue); }
.entry[data-period="2006-2008"]::before  { background: #94a3b8; }
.entry[data-period="2008-2024"]::before  { background: #64748b; }
.entry[data-period="2024-"]::before      { background: #475569; }

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  color: var(--gray-500);
}
.entry-date {
  font-family: var(--mono);
  color: var(--black);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.entry-type {
  padding: 0.15rem 0.6rem;
  background: var(--gray-100);
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--gray-700);
}
.entry-id {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gray-300);
}
.entry-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
  margin-bottom: 0.75rem;
}
.entry-source {
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.85rem;
}
.entry-source-label { color: var(--gray-500); margin-right: 0.4rem; }
.entry-notes-preview {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
  border-left: 2px solid var(--gray-200);
  padding-left: 1rem;
  margin-bottom: 0.85rem;
}
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.entry-tag {
  font-size: 0.72rem;
  color: var(--gray-700);
  padding: 0.15rem 0.5rem;
  background: var(--gray-100);
  border-radius: 3px;
  cursor: pointer;
  transition: all .15s;
}
.entry-tag:hover { background: var(--blue-light); color: var(--blue-dark); }
.entry-tag.tag-warn { background: #fef2f2; color: #b91c1c; }
.entry-tag.tag-blue { background: var(--blue-bg); color: var(--blue-dark); }

.entry-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.85rem;
}
.entry-toggle {
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 500;
}
.entry-toggle:hover { text-decoration: underline; }
.entry-link {
  color: var(--gray-500);
  font-size: 0.8rem;
}

/* ============= Expanded entry ============= */
.entry-detail {
  display: none;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
}
.entry.expanded .entry-detail { display: block; }

.detail-section { margin-bottom: 1.5rem; }
.detail-section h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.detail-notes {
  font-size: 0.92rem;
  color: var(--gray-900);
  white-space: pre-wrap;
  background: var(--gray-50);
  padding: 1rem 1.25rem;
  border-radius: 4px;
}
.detail-fulltext {
  font-size: 0.92rem;
  color: var(--gray-900);
  white-space: pre-wrap;
  background: var(--white);
  padding: 1rem 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-family: var(--serif);
  line-height: 1.75;
}
.detail-notes strong, .detail-fulltext strong {
  color: var(--black);
  font-weight: 700;
}
.detail-notes code, .detail-fulltext code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(0,0,0,0.06);
  padding: 0.1em 0.4em;
  border-radius: 2px;
  color: var(--gray-900);
}
.detail-notes blockquote, .detail-fulltext blockquote {
  margin: 0.5rem 0;
  padding: 0.5rem 1rem;
  border-left: 2px solid var(--gray-300);
  color: var(--gray-700);
  font-style: italic;
  background: rgba(0,0,0,0.02);
}
.detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.detail-image {
  cursor: pointer;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
}
.detail-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .25s;
}
.detail-image:hover img { transform: scale(1.05); }
.detail-image-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: white;
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity .15s;
}
.detail-image:hover .detail-image-caption { opacity: 1; }
.detail-references {
  list-style: none;
}
.detail-references li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.88rem;
}
.detail-references li:last-child { border-bottom: none; }
.detail-references .ref-source { color: var(--gray-700); margin-right: 0.5rem; }
.detail-references .ref-note { color: var(--gray-500); font-size: 0.82rem; margin-top: 0.2rem; }

/* ============= Casebook 案录 ============= */
.case-series-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.case-nav-btn {
  padding: 0.4rem 0.95rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.case-nav-btn:hover { background: var(--gray-50); }
.case-nav-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.case-series {
  margin-bottom: 2.5rem;
}
.case-series-head {
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--gray-200);
}
.case-series-head h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 0.3rem;
}
.case-series-desc {
  font-size: 0.85rem;
  color: var(--gray-700);
  margin: 0;
  line-height: 1.5;
}
.case-card {
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.85rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  position: relative;
}
.case-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #fbbf24;
  border-radius: 6px 0 0 6px;
}
.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  color: var(--gray-500);
  align-items: center;
}
.case-id { font-family: var(--mono); }
.case-type {
  padding: 0.1rem 0.5rem;
  background: var(--gray-100);
  border-radius: 3px;
  color: var(--gray-700);
}
.case-hint {
  color: var(--gray-600);
}
.case-verif {
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.72rem;
}
.verif-verified { background: #d1fae5; color: #065f46; }
.verif-plausible { background: #fef3c7; color: #92400e; }
.verif-unverified { background: #fee2e2; color: #991b1b; }
.verif-disputed { background: #fce7f3; color: #9d174d; }
.case-tier {
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  font-size: 0.7rem;
  font-family: var(--mono);
}
.tier-T1 { background: #d1fae5; color: #065f46; }
.tier-T2 { background: #dbeafe; color: #1e40af; }
.tier-T3 { background: #e0e7ff; color: #3730a3; }
.tier-T4, .tier-T5 { background: #fef3c7; color: #92400e; }
.tier-T6 { background: #fee2e2; color: #991b1b; }
.case-title {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--black);
  line-height: 1.5;
}
.case-content {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--gray-900);
  padding: 0.85rem 1.1rem;
  background: var(--gray-50);
  border-radius: 4px;
  border-left: 3px solid var(--gray-300);
  margin-bottom: 0.7rem;
}
.case-content p { margin: 0.3rem 0; }
.case-linked {
  font-size: 0.82rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}
.case-linked-label { color: var(--gray-500); margin-right: 0.3rem; }
.case-link-entry {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin: 0.1rem 0.2rem 0.1rem 0;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 3px;
  color: var(--gray-800);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: none;
}
.case-link-entry:hover { background: var(--gray-100); }
.case-link-date {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--gray-500);
  margin-right: 0.3rem;
}
.case-source {
  font-size: 0.74rem;
  color: var(--gray-500);
  font-style: italic;
}

/* ============= Policies ============= */
.policies-intro {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--blue-bg);
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--gray-900);
}
.policies-intro code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(0,0,0,0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}
.pol-card {
  position: relative;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  transition: all .15s;
}
.pol-card:hover {
  border-color: var(--gray-500);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.pol-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--blue);
  border-radius: 6px 0 0 6px;
}
.pol-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  color: var(--gray-500);
}
.pol-date {
  font-family: var(--mono);
  color: var(--black);
  font-weight: 600;
}
.pol-cat {
  padding: 0.15rem 0.6rem;
  background: var(--blue-bg);
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--blue-dark);
}
.pol-id {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gray-300);
}
.pol-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--black);
}
.pol-summary {
  color: var(--gray-700);
  margin-bottom: 0.85rem;
}
.pol-quote {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gray-900);
  padding: 0.6rem 1rem;
  margin-bottom: 0.85rem;
  border-left: 2px solid var(--gray-300);
  background: var(--gray-50);
  font-size: 0.9rem;
}
.pol-components {
  margin: 0 0 0.85rem 1.25rem;
  font-size: 0.88rem;
  color: var(--gray-700);
}
.pol-components li { margin-bottom: 0.25rem; }

/* ===== 指标图表网格 ===== */
.pol-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1rem;
  margin-bottom: 0.85rem;
}
/* ============= Policy 单页布局 ============= */
.policy-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.6rem;
}
.policy-switch-btn {
  padding: 0.45rem 1.1rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--gray-700);
  cursor: pointer;
}
.policy-switch-btn:hover { background: var(--gray-50); }
.policy-switch-btn.active {
  color: #2563eb;
  border-bottom: 2px solid #2563eb;
  border-radius: 0;
  font-weight: 600;
}
.policy-layout {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.policy-layout.toc-collapsed {
  grid-template-columns: 40px 1fr;
}
.policy-toc {
  position: sticky;
  top: 1rem;
  align-self: start;
  padding: 0.5rem 0.5rem 0.5rem 0;
}
.toc-toggle {
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--gray-600);
  margin-bottom: 0.6rem;
}
.toc-toggle:hover { background: var(--gray-50); }
.policy-layout.toc-collapsed .toc-nav { display: none; }
.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.toc-link {
  display: block;
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
  color: var(--gray-700);
  cursor: pointer;
  border-left: 2px solid transparent;
  text-decoration: none;
  border-radius: 0 3px 3px 0;
}
.toc-link:hover { background: var(--gray-50); color: var(--gray-900); }
.toc-link.active {
  background: var(--blue-bg, #eff6ff);
  border-left-color: #2563eb;
  color: #2563eb;
  font-weight: 500;
}
@media (max-width: 760px) {
  .policy-layout { grid-template-columns: 1fr; }
  .policy-toc { position: static; }
}
.pol-page {
  max-width: 900px;
  padding: 0 0.5rem;
}
.pol-page-head {
  padding-bottom: 1.2rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--gray-200);
}
.pol-page-head .pol-meta {
  display: flex;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.pol-page-head .pol-date {
  font-family: var(--mono);
}
.pol-page-head .pol-cat {
  padding: 0.1rem 0.5rem;
  background: var(--gray-100);
  border-radius: 3px;
  color: var(--gray-700);
}
.pol-page-head .pol-id {
  font-family: var(--mono);
  margin-left: auto;
  color: var(--gray-400);
}
.pol-page-head .pol-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 0.5rem;
}
.pol-tagline {
  font-size: 1.02rem;
  color: var(--gray-700);
  margin: 0 0 0.85rem;
  line-height: 1.6;
}
.pol-quote {
  margin: 0.5rem 0 0;
  padding: 0.75rem 1.1rem;
  background: var(--gray-50);
  border-left: 3px solid #fbbf24;
  border-radius: 0 4px 4px 0;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-900);
}
.pol-section {
  margin-bottom: 2.5rem;
}
.pol-section-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--gray-200);
}
.pol-section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--gray-200);
}
.pol-section-title-row .pol-section-title {
  margin: 0;
  padding: 0;
  border: none;
}
.pol-section-count {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 400;
}
.pol-overview {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--gray-900);
}
.pol-overview p { margin: 0.6rem 0; }
.pol-overview ul {
  padding-left: 1.5rem;
  margin: 0.6rem 0;
}
.pol-overview li {
  margin: 0.3rem 0;
  line-height: 1.7;
}
.pol-metrics-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 720px) {
  .pol-metrics-stack { grid-template-columns: 1fr; }
}
.pol-metrics-stack .metric-card {
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 0.9rem 1.05rem;
  min-width: 0;
}
.pol-metrics-stack .metric-chart {
  height: 240px;
}
.pol-analysis-block {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--gray-900);
}
.pol-analysis-block p { margin: 0.6rem 0; }
.pol-analysis-block p:first-child { margin-top: 0; }
.pol-analysis-block p:last-child { margin-bottom: 0; }
.pol-research-notes {
  font-size: 0.85rem;
  color: var(--gray-600);
}
.pol-research-notes .pol-section-title {
  font-size: 1.05rem;
}
/* ============= Implementation subsections ============= */
.impl-description {
  font-size: 0.88rem;
  color: var(--gray-700);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}
.impl-subs {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}
.impl-sub {
  /* no card / no border — just normal flowing section */
}
.impl-sub-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 0.6rem;
  line-height: 1.4;
}
.impl-sub-body {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--gray-900);
}
.impl-sub-body p { margin: 0.5rem 0; }
.impl-sub-body p:first-child { margin-top: 0; }
.impl-sub-body p:last-child { margin-bottom: 0; }
.impl-sub-body ul, .impl-sub-body ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.impl-sub-body li { margin: 0.25rem 0; }
.impl-sub-sources {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.6;
}
.impl-sources-label {
  color: var(--gray-500);
  margin-right: 0.3rem;
}
.impl-source-chip {
  color: var(--gray-700);
  cursor: pointer;
  text-decoration: none;
  margin-right: 0.6rem;
  white-space: nowrap;
}
.impl-source-chip:hover {
  color: #2563eb;
  text-decoration: underline;
}
.impl-source-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-right: 0.25rem;
}
.ref-inline-date {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--gray-500);
  margin-right: 0.15rem;
}
.ref-inline-arrow {
  color: var(--gray-400);
  font-size: 0.85em;
  margin-left: 0.1rem;
}
/* ============= 中间 modal（政策 entry 点击）============= */
.entry-modal[hidden] { display: none; }
.entry-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.entry-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
}
.entry-modal-panel {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 4rem);
  background: var(--white, #fff);
  border-radius: 8px;
  box-shadow: 0 25px 60px -10px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.entry-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.3rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.entry-modal-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.entry-modal-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.entry-modal-btn {
  background: transparent;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray-600);
  font-family: inherit;
}
.entry-modal-btn:hover { background: var(--white); color: var(--black); border-color: var(--gray-500); }
.entry-modal-body {
  padding: 1.3rem 1.6rem;
  overflow-y: auto;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.7;
}
body.modal-open { overflow: hidden; }
.metric-card {
  background: var(--white, #fff);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 0.85rem 1rem;
}
.metric-head {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.metric-head-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
}
.metric-head .metric-unit {
  color: var(--gray-500);
  font-size: 0.8rem;
}
.metric-view-toggle {
  display: inline-flex;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.metric-view-toggle .view-btn {
  background: var(--white, #fff);
  border: none;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  color: var(--gray-600, #4b5563);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
}
.metric-view-toggle .view-btn:hover { background: var(--gray-50, #f9fafb); }
.metric-view-toggle .view-btn.active {
  background: #2563eb;
  color: #fff;
}
.metric-view-toggle .view-btn + .view-btn {
  border-left: 1px solid var(--gray-300, #d1d5db);
}
.metric-view-toggle .view-btn.active + .view-btn,
.metric-view-toggle .view-btn + .view-btn.active {
  border-left-color: #2563eb;
}
.metric-chart {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border-radius: 3px;
}
.metric-analysis {
  font-size: 0.82rem;
  color: var(--gray-700);
  margin-top: 0.5rem;
  line-height: 1.5;
}
.metric-analysis p { margin: 0.2rem 0; }
.metric-source {
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-top: 0.4rem;
  font-style: italic;
}
.pol-analysis {
  font-size: 0.88rem;
  color: var(--gray-800);
  line-height: 1.6;
  padding: 0.7rem 0.9rem;
  background: var(--gray-50);
  border-radius: 4px;
  border-left: 3px solid #2563eb;
}
.pol-analysis p { margin: 0.4rem 0; }
.pol-analysis p:first-child { margin-top: 0; }
.pol-analysis p:last-child { margin-bottom: 0; }

.metric-legend {
  display: inline-flex;
  gap: 0.7rem;
  margin-left: 0.6rem;
  font-size: 0.78rem;
  color: var(--gray-700);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.pol-section-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.85rem 0 0.4rem;
}
.benchmark-toggle {
  font-size: 0.78rem;
  color: var(--gray-700);
  cursor: pointer;
  user-select: none;
}
.benchmark-toggle input { vertical-align: middle; }

/* 关联事件 — 全名列表 */
.pol-linked-events {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pol-linked-events li {
  margin-bottom: 0.3rem;
}
.pol-link-event {
  display: block;
  padding: 0.35rem 0.6rem;
  background: var(--gray-50);
  border-radius: 3px;
  text-decoration: none;
  color: var(--gray-900);
  font-size: 0.88rem;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background .15s, border-color .15s;
}
.pol-link-event:hover {
  background: var(--blue-bg, #eff6ff);
  border-left-color: #2563eb;
}
.pol-link-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-right: 0.25rem;
}
.pol-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin: 0.85rem 0 0.4rem;
  font-weight: 600;
}
.pol-linked {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.pol-link-chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--gray-100);
  border-radius: 3px;
  color: var(--gray-900);
  cursor: pointer;
  transition: all .15s;
}
.pol-link-chip:hover { background: var(--blue-bg); color: var(--blue-dark); }
.pol-metrics {
  margin: 0.5rem 0 0 1.25rem;
  font-size: 0.85rem;
  color: var(--gray-700);
}
.pol-metrics li { margin-bottom: 0.2rem; }
.pol-status {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-size: 0.72rem;
  border-radius: 3px;
  font-family: var(--mono);
  margin-left: auto;
}
.pol-status[data-status="unverified"] { background: #fef3c7; color: #92400e; }
.pol-status[data-status="partial"] { background: var(--blue-bg); color: var(--blue-dark); }
.pol-status[data-status="verified"] { background: #d1fae5; color: #065f46; }
.pol-status[data-status="contradicted"] { background: #fee2e2; color: #991b1b; }

/* ============= Threads ============= */
.threads-intro {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border-radius: 6px;
  border-left: 3px solid var(--blue);
  font-size: 0.92rem;
  color: var(--gray-700);
}
.thread {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
}
.thread:last-child { border-bottom: none; }
.thread-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.5rem;
}
.thread-desc {
  color: var(--gray-700);
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}
.thread-list {
  list-style: none;
  border-left: 2px solid var(--gray-200);
  padding-left: 1.5rem;
  margin-left: 0.5rem;
}
.thread-item {
  position: relative;
  padding: 0.6rem 0;
  font-size: 0.9rem;
}
.thread-item::before {
  content: "";
  position: absolute;
  left: -1.91rem;
  top: 1rem;
  width: 9px;
  height: 9px;
  background: var(--blue);
  border-radius: 50%;
  border: 2px solid var(--white);
}
.thread-item-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-right: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.thread-item a {
  color: var(--black);
  border-bottom: 1px dotted var(--gray-300);
}
.thread-item a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* ============= About ============= */
.about-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.8;
}
.about-content h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--black);
}
.about-content h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--black);
}
.about-content p { margin-bottom: 1rem; color: var(--gray-700); }
.about-content ul { margin: 0 0 1rem 1.5rem; color: var(--gray-700); }
.about-content li { margin-bottom: 0.4rem; }
.about-content code, .about-content pre {
  font-family: var(--mono);
  font-size: 0.85em;
}
.about-content code {
  background: var(--gray-100);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
.about-content pre {
  background: var(--gray-100);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.footer-note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ============= Lightbox ============= */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  font-size: 2.5rem;
  color: white;
  line-height: 1;
  opacity: 0.7;
  transition: opacity .15s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  cursor: default;
  background: white;
}
.lightbox-caption {
  margin-top: 1rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  text-align: center;
  max-width: 800px;
}

/* ============= Empty / loading ============= */
.empty {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--gray-500);
  font-style: italic;
}

/* ============= Responsive ============= */
@media (max-width: 768px) {
  .site-title { font-size: 2rem; }
  .site-subtitle { font-size: 0.78rem; }
  .container { padding: 0 1rem; }
  .filter-bar input[type="search"] { width: 100%; min-width: 0; }
  .filter-bar select, .filter-bar button { flex: 1 1 calc(50% - 0.3rem); }
  .result-count { width: 100%; text-align: right; margin-left: 0; }
  .entry { padding: 1.25rem 1rem 1.25rem 1.25rem; }
  .entry-id { display: none; }
  .entry-title { font-size: 1.05rem; }
  .detail-images { grid-template-columns: repeat(2, 1fr); }
  .tab-btn { padding: 0.85rem 1rem; font-size: 0.85rem; }
}

/* ============= Print ============= */
@media print {
  .tab-nav, .filter-bar, .entry-actions, .lightbox { display: none !important; }
  .entry { break-inside: avoid; box-shadow: none; }
  .view { display: block !important; }
  .entry-detail { display: block !important; }
}

/* ============= 时间线 Timeline ============= */
.timeline-intro {
  font-size: 0.85rem;
  color: var(--gray-700);
  background: var(--gray-50);
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.timeline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--gray-700);
  cursor: pointer;
  user-select: none;
}
.timeline-toggle input { cursor: pointer; }

#timeline-content {
  position: relative;
  padding: 1rem 0 2rem 0;
}

/* 中央竖线 */
.timeline-line {
  position: relative;
  margin-left: 10rem;         /* 给 date 列足够宽度（避免 date 撞圆点）*/
  border-left: 2px solid var(--gray-200);
  padding: 0 0 0 2rem;
}

/* 期段分段标题 */
.timeline-period-header {
  position: relative;
  margin: 2rem 0 1rem -2rem;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: 0.02em;
}
.timeline-period-header::before {
  content: '';
  position: absolute;
  left: -7px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background: var(--gray-500);
  border-radius: 0;
  transform: translateY(-50%) rotate(45deg);
}
.timeline-period-header[data-period="1946-1965"]::before { background: #f1f5f9; border:1px solid var(--gray-300); }
.timeline-period-header[data-period="1966-1979"]::before { background: #e2e8f0; }
.timeline-period-header[data-period="1980-1991"]::before { background: #cbd5e1; }
.timeline-period-header[data-period="1992-2001"]::before { background: #94a3b8; }
.timeline-period-header[data-period="2002-2006"]::before { background: var(--blue); }
.timeline-period-header[data-period="2006-2008"]::before { background: #94a3b8; }
.timeline-period-header[data-period="2008-2024"]::before { background: #64748b; }
.timeline-period-header[data-period="2024-"]::before     { background: #475569; }
.timeline-period-meta {
  display: inline-block;
  margin-left: 0.6rem;
  font-size: 0.78rem;
  color: var(--gray-500);
  font-weight: 400;
}

/* 单个事件 */
.timeline-event {
  position: relative;
  margin: 0.45rem 0;
  cursor: pointer;
  transition: opacity .2s;
}
.timeline-event-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}
.timeline-event:hover .timeline-event-row {
  background: var(--blue-bg);
}
.timeline-event-date {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  position: relative;
  left: -10rem;             /* 让 date 完整显示在圆点左侧（距圆点至少 1rem 缓冲）*/
  width: 6.5rem;
  padding-right: 0.5rem;    /* 与圆点的视觉间隔 */
}
.timeline-event-title {
  font-size: 0.88rem;
  color: var(--gray-900);
  line-height: 1.45;
}
.timeline-event-tags {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--gray-500);
}

/* 事件标记圆点（在中央线上）*/
.timeline-event::before {
  content: '';
  position: absolute;
  left: -2.6rem;             /* 中央线左侧 */
  top: 0.7rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--gray-500);
  z-index: 1;
}

/* 重大节点：实心大圆 + 加粗标题 */
.timeline-event.major::before {
  width: 14px; height: 14px;
  left: -2.78rem;            /* 微调对齐中央线 */
  top: 0.45rem;
  background: var(--blue);
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 3px var(--blue-light);
}
.timeline-event.major .timeline-event-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.timeline-event.major .timeline-event-date {
  color: var(--gray-700);
  font-weight: 600;
}

/* 期段着色继承到圆点边框（让事件视觉感受期段流动）*/
.timeline-event[data-period="2002-2006"]::before { border-color: var(--blue); }
.timeline-event[data-period="2002-2006"].major::before { background: var(--blue); }
.timeline-event[data-period="1992-2001"]::before { border-color: #94a3b8; }
.timeline-event[data-period="2006-2008"]::before { border-color: #94a3b8; }
.timeline-event[data-period="2008-2024"]::before { border-color: #64748b; }
.timeline-event[data-period="2024-"]::before     { border-color: #475569; }

/* 线索过滤模式：线索内事件圆点用激活线索的主色（CSS 变量由 JS 注入）*/
#timeline-content.thread-active .timeline-event.in-thread::before {
  background: var(--thread-color, #2563eb);
  border-color: var(--thread-color-deep, #1d4ed8);
  box-shadow: 0 0 0 3px var(--thread-color-soft, #dbeafe);
}

/* 日期段事件：圆点 → 纵向胶囊（视觉表示持续时长） */
.timeline-event.has-range::before {
  width: 8px;
  height: 26px;
  border-radius: 4px;
  top: 0.45rem;
  left: -2.6rem;
}
.timeline-event.has-range.major::before {
  width: 12px;
  height: 32px;
  left: -2.7rem;
  top: 0.35rem;
  border-radius: 5px;
}

/* 移动端 */
@media (max-width: 720px) {
  .timeline-line {
    margin-left: 0;
    padding-left: 1.6rem;
  }
  .timeline-event-row {
    grid-template-columns: 4.5rem 1fr;
    gap: 0.5rem;
  }
  .timeline-event-date {
    position: static;
    width: auto;
    text-align: left;
  }
  .timeline-event::before { left: -1.65rem; }
  .timeline-event.major::before { left: -1.85rem; }
  .timeline-period-header { font-size: 0.88rem; }
}

/* ============= 主题线索内联（顶部说明卡片） ============= */
.timeline-active-thread {
  margin: 0 0 1rem 0;
  padding: 0.85rem 1rem 0.7rem 1rem;
  background: var(--thread-color-soft, #eff6ff);
  border-left: 3px solid var(--thread-color, #2563eb);
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--gray-700);
}
.timeline-active-thread strong { color: var(--thread-color-deep, #1d4ed8); font-size: 0.95rem; }
.timeline-active-thread .thread-count-summary { color: var(--gray-600); font-size: 0.82rem; }
.timeline-active-thread p { margin: 0.5rem 0 0.6rem 0; color: var(--gray-700); line-height: 1.55; }
.thread-clear-btn {
  background: white;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.thread-clear-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

/* 关联事件 (陈未直接参与，但属同一主题线) — 虚线圆点 + 标签 */
#timeline-content.thread-active .timeline-event.is-related::before {
  background: white;
  border-style: dashed;
  border-width: 2px;
  box-shadow: none;
}
.related-badge {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  margin-left: 0.3rem;
  border-radius: 3px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px dashed #d97706;
  vertical-align: middle;
}

/* 事件标题与小圆点同行 */
.timeline-event-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.thread-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* 单个线索小圆点 */
.thread-pill {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--pill-color, #888);
  border: 1.5px solid var(--pill-color, #888);
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  transition: transform .12s, box-shadow .12s, opacity .12s;
  opacity: 0.55;
}
.thread-pill:hover {
  opacity: 1;
  transform: scale(1.25);
}
.thread-pill.active {
  opacity: 1;
  background: var(--pill-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pill-color) 30%, white);
  transform: scale(1.15);
}

/* 线索过滤模式：线索内事件加柔和的线索色底，关联事件用更浅的米色 */
#timeline-content.thread-active .timeline-event.in-thread .timeline-event-row {
  background: var(--thread-color-soft, #eff6ff);
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
}
#timeline-content.thread-active .timeline-event.in-thread.is-related .timeline-event-row {
  background: #fffbf0;
}

/* ============= 跨条目内链 (cly-NNNN → 小箭头) ============= */
.entry-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  margin: 0 0.15em;
  border-radius: 3px;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 0.85em;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  vertical-align: middle;
  transition: background .12s, color .12s, transform .12s;
  line-height: 1;
}
.entry-ref:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-1px);
  border: none;
}

/* 跨条目内链 (cly-NNNN（描述） → 整段 highlight) */
.entry-ref-inline {
  display: inline;
  padding: 0.05em 0.25em;
  margin: 0;
  border-radius: 3px;
  background: var(--blue-bg);
  color: var(--blue-dark);
  text-decoration: none;
  border: none;
  border-bottom: 1px dotted var(--blue);
  cursor: pointer;
  transition: background .12s, color .12s;
  font-size: 0.95em;
}
.entry-ref-inline:hover {
  background: var(--blue);
  color: white;
  border-bottom: 1px solid var(--blue);
}

/* ============= 主要人物名字 hover ============= */
.person {
  border-bottom: 1px dotted var(--gray-500);
  cursor: help;
  transition: background .12s, border-color .12s;
  border-radius: 2px;
}
.person:hover {
  background: var(--blue-bg);
  border-bottom: 1px solid var(--blue);
  color: var(--blue-dark);
}

/* ============= 表格视图 ============= */
.table-intro {
  font-size: 0.85rem;
  color: var(--gray-700);
  background: var(--gray-50);
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background: white;
}
.entries-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.entries-table th {
  position: sticky;
  top: 0;
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 600;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--gray-300);
  user-select: none;
  white-space: nowrap;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  z-index: 5;
}
.entries-table th:hover {
  background: var(--gray-200);
}
.entries-table th.sort-asc::after  { content: ' ↑'; color: var(--blue); }
.entries-table th.sort-desc::after { content: ' ↓'; color: var(--blue); }
.entries-table td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: top;
}
.entries-table tr {
  cursor: pointer;
  transition: background .1s;
}
.entries-table tbody tr:hover {
  background: var(--blue-bg);
}
.entries-table .col-id {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gray-500);
  white-space: nowrap;
}
.entries-table .col-date {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gray-900);
  font-weight: 500;
}
.entries-table .col-period {
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--gray-700);
}
.entries-table .col-type {
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--gray-700);
}
.entries-table .col-title {
  max-width: 30rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
  color: var(--gray-900);
  line-height: 1.4;
}
.entries-table .col-source {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--gray-500);
}
.entries-table .col-tier {
  white-space: nowrap;
  text-align: center;
}
.tier-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* ============= 关于 tab 信源等级表 ============= */
.tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 0.75rem 0 1.5rem 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}
.tier-table th {
  background: var(--gray-100);
  color: var(--gray-700);
  text-align: left;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
}
.tier-table td {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--gray-100);
  vertical-align: top;
}
.tier-table td:first-child { white-space: nowrap; width: 4rem; text-align: center; }
.tier-table td:nth-child(2) { white-space: nowrap; color: var(--gray-900); font-weight: 500; width: 8rem; }
.tier-table td:last-child { white-space: nowrap; color: var(--gray-500); font-family: var(--mono); font-size: 0.75rem; width: 8rem; }

.about-content h4 {
  font-size: 0.95rem;
  color: var(--gray-900);
  margin: 1.5rem 0 0.5rem 0;
}

/* ===== 多 tab 原文 (full_texts) ===== */
.ft-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--gray-200);
  margin: 0.5rem 0 0;
  flex-wrap: wrap;
}
.ft-tab {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--gray-600);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  font-family: inherit;
}
.ft-tab:hover {
  color: var(--gray-900);
  background: var(--gray-50);
}
.ft-tab.active {
  color: var(--blue-700, #1d4ed8);
  border-bottom-color: var(--blue-500, #3b82f6);
  font-weight: 600;
}
.ft-panes {
  margin-top: 0.5rem;
}
.ft-pane {
  display: none;
  padding: 0.75rem 0;
}
.ft-pane.active {
  display: block;
}
.ft-meta {
  font-size: 0.82rem;
  color: var(--gray-600);
  padding: 0.5rem 0.75rem;
  background: var(--gray-50);
  border-left: 3px solid var(--gray-300);
  border-radius: 3px;
  margin-bottom: 0.5rem;
}
.ft-meta a {
  color: var(--blue-600, #2563eb);
  text-decoration: none;
}
.ft-meta a:hover {
  text-decoration: underline;
}
.ft-description {
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
  font-style: italic;
}
.ft-content {
  font-size: 0.88rem;
  line-height: 1.7;
  max-height: 600px;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
}
.ft-content p {
  margin: 0.5em 0;
}

/* ===== 概述 / Summary（给用户看） ===== */
.detail-summary {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--gray-900);
  padding: 0.75rem 1rem;
  background: linear-gradient(to right, #f0f9ff, #fafbfc);
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  white-space: normal;
}
.detail-summary p {
  margin: 0.5em 0;
}
.detail-summary strong {
  color: #1d4ed8;
}

/* ===== Markdown 渲染元素 ===== */
.md-h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1em 0 0.4em;
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.2em;
}
.md-h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0.9em 0 0.35em;
  color: var(--gray-800);
}
.md-h5 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0.7em 0 0.3em;
  color: var(--gray-700);
}
.md-h6 {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0.5em 0 0.25em;
  color: var(--gray-600);
}
.md-hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 1.5em 0;
}
.md-table {
  border-collapse: collapse;
  margin: 0.75em 0;
  font-size: 0.86rem;
  width: 100%;
}
.md-table th, .md-table td {
  border: 1px solid var(--gray-300);
  padding: 0.4em 0.7em;
  text-align: left;
  vertical-align: top;
}
.md-table th {
  background: var(--gray-100);
  font-weight: 600;
}
.md-table tbody tr:hover {
  background: var(--gray-50);
}
.md-ul, .md-ol {
  margin: 0.4em 0 0.6em 1.25em;
  padding-left: 0.5em;
}
.md-ul li, .md-ol li {
  margin: 0.25em 0;
  line-height: 1.65;
}

/* ===== 表格视图 detail panel（fixed 浮窗，不挤表格）===== */
.table-split {
  position: relative;
}
.table-split-master {
  /* 表格保持完整宽度，不被 detail panel 挤压 */
}
.table-split-detail[hidden],
.table-split-resizer[hidden] {
  display: none !important;
}

/* detail panel: fixed 浮在屏幕右侧 */
.table-split-detail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--detail-panel-width, 480px);
  min-width: 360px;
  max-width: 90vw;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid var(--gray-200);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  animation: slideInFromRight 0.18s ease-out;
}
@keyframes slideInFromRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* 拖动条：固定在 detail panel 左边缘 */
.table-split-resizer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  z-index: 1001;
  background: transparent;
  right: var(--detail-panel-width, 480px);
  transform: translateX(3px);
  transition: background 0.15s;
}
.table-split-resizer:hover,
.table-split-resizer.dragging {
  background: var(--blue-400, #60a5fa);
}

/* Header */
.detail-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
  flex-shrink: 0;
}
.detail-panel-header h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--gray-900);
  flex: 1 1 auto;
  word-break: break-word;
}
.detail-panel-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}
.detail-panel-btn {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.detail-panel-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
  color: var(--gray-900);
}
.detail-panel-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 1.2rem 2rem;
}
.detail-panel-body .detail-section {
  margin-bottom: 1.25rem;
}
.detail-panel-body .detail-section h4 {
  font-size: 0.78rem;
  color: var(--gray-600);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* 当前选中行高亮 */
.entries-table tbody tr.row-selected {
  background: var(--blue-50, #eff6ff) !important;
  box-shadow: inset 3px 0 0 var(--blue-500, #3b82f6);
}
.entries-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}

/* 响应式 */
@media (max-width: 768px) {
  /* 手机：detail panel 全屏 */
  .table-split-detail {
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    border-left: none;
  }
  .table-split-resizer {
    display: none !important;
  }
}
