/* PlantCYP-DB Public — 学术级生命科学前端 */

:root {
  --pc-green-950: #052e1f;
  --pc-green-900: #0a4d35;
  --pc-green-800: #0f6b47;
  --pc-green-700: #14875a;
  --pc-green-600: #1fa870;
  --pc-green-100: #d8f3e5;
  --pc-green-50: #f0fdf6;
  --pc-sea-900: #0c2d48;
  --pc-sea-700: #1e5a8a;
  --pc-bg: #ffffff;
  --pc-bg-subtle: #f8fafc;
  --pc-ink: #0f172a;
  --pc-muted: #64748b;
  --pc-border: #e2e8f0;
  --pc-gold: #b8860b;
  --pc-gold-bg: linear-gradient(135deg, #fef3c7 0%, #fde68a 40%, #d4a017 100%);
  --pc-silver-bg: #f1f5f9;
  --pc-bronze-bg: #ffedd5;
  --pc-warn-bg: #fef2f2;
  --pc-warn-text: #9f1239;
  --pc-radius: 14px;
  --pc-shadow: 0 8px 32px rgba(15, 107, 71, 0.06);
  --pc-nav-h: 64px;
  --font-sans: "Inter", "SF Pro Display", "PingFang SC", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.pc-body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--pc-ink);
  background: var(--pc-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── 极简顶栏 ── */
.pc-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--pc-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  background: linear-gradient(90deg, var(--pc-green-950) 0%, var(--pc-green-800) 55%, var(--pc-sea-900) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.pc-nav-brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #fff;
}

.pc-nav-brand strong {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.pc-nav-brand span {
  font-size: 0.68rem;
  opacity: 0.75;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pc-nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pc-nav-links a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.pc-nav-links a:hover,
.pc-nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.pc-main {
  min-height: calc(100vh - var(--pc-nav-h) - 80px);
}

.pc-footer {
  border-top: 1px solid var(--pc-border);
  padding: 28px clamp(20px, 4vw, 48px);
  text-align: center;
  color: var(--pc-muted);
  font-size: 0.82rem;
  background: var(--pc-bg-subtle);
}

.pc-footer-main {
  margin: 0 0 10px;
}

.pc-footer-legal {
  margin: 0 auto;
  max-width: 52rem;
  line-height: 1.55;
  font-size: 0.78rem;
}

.pc-ext-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pc-sea-700);
  text-decoration: none;
}

.pc-ext-link:hover {
  text-decoration: underline;
}

.pc-evidence-disclaimer {
  margin: 0 0 16px;
  font-size: 0.84rem;
  color: var(--pc-muted);
  line-height: 1.5;
}

/* ── Hub 首页 ── */
.pc-hub {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(48px, 10vh, 96px) 24px 64px;
  text-align: center;
}

.pc-hub-tagline {
  font-size: 0.85rem;
  color: var(--pc-green-700);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pc-hub h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--pc-ink);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.pc-hub-desc {
  color: var(--pc-muted);
  font-size: 1.02rem;
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.65;
}

.pc-search-wrap {
  display: flex;
  max-width: 720px;
  margin: 0 auto 56px;
  gap: 10px;
  align-items: stretch;
}

.pc-search-input {
  flex: 1;
  padding: 18px 24px;
  font-size: 1.05rem;
  border: 2px solid var(--pc-border);
  border-radius: 999px;
  outline: none;
  background: #fff;
  box-shadow: var(--pc-shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pc-search-input:focus {
  border-color: var(--pc-green-600);
  box-shadow: 0 0 0 4px rgba(31, 168, 112, 0.15);
}

.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  white-space: nowrap;
}

.pc-btn:active { transform: scale(0.98); }

.pc-btn-primary {
  background: var(--pc-green-800);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 107, 71, 0.25);
}

.pc-btn-primary:hover {
  background: var(--pc-green-900);
  color: #fff;
}

.pc-btn-ghost {
  background: #fff;
  color: var(--pc-green-800);
  border: 2px solid var(--pc-border);
}

.pc-btn-ghost:hover {
  border-color: var(--pc-green-600);
  background: var(--pc-green-50);
}

.pc-btn-draw {
  background: var(--pc-sea-900);
  color: #fff;
  padding: 18px 20px;
  border-radius: 999px;
}

.pc-btn-draw:hover { background: var(--pc-sea-700); color: #fff; }

.pc-btn-draw svg { width: 20px; height: 20px; }

/* 四列统计 */
.pc-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.pc-stat {
  background: var(--pc-bg);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  padding: 28px 20px;
  box-shadow: var(--pc-shadow);
}

.pc-stat-num {
  display: block;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--pc-green-800);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.pc-stat-num.gold {
  /* Solid color — gradient text-clip is invisible in some browsers */
  color: #b45309;
}

.pc-stat-num.special {
  color: #4338ca;
}

.pc-stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--pc-muted);
  font-weight: 500;
}

/* ── 列表页 ── */
.pc-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px clamp(16px, 3vw, 40px) 64px;
}

.pc-page-header {
  margin-bottom: 24px;
}

.pc-page-header h1 {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--pc-ink);
}

.pc-page-meta {
  color: var(--pc-muted);
  font-size: 0.9rem;
}

/* 水平筛选条 */
.pc-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 16px 18px;
  background: var(--pc-bg-subtle);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  margin-bottom: 20px;
}

.pc-filter-bar select {
  padding: 9px 32px 9px 12px;
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  font-size: 0.85rem;
  color: var(--pc-ink);
  min-width: 120px;
  cursor: pointer;
}

.pc-filter-bar select:focus {
  outline: none;
  border-color: var(--pc-green-600);
}

.pc-filter-search {
  flex: 1;
  min-width: 180px;
  padding: 9px 14px;
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  font-size: 0.88rem;
}

.pc-view-toggle {
  display: flex;
  gap: 4px;
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  padding: 3px;
}

.pc-view-toggle button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--pc-muted);
}

.pc-view-toggle button.active {
  background: var(--pc-green-800);
  color: #fff;
}

/* Tier 徽章 */
.pc-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pc-badge-gold {
  background: var(--pc-gold-bg);
  color: #78350f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.pc-badge-silver {
  background: var(--pc-silver-bg);
  color: #475569;
}

.pc-badge-bronze {
  background: var(--pc-bronze-bg);
  color: #9a3412;
}

.pc-badge-quarantine {
  background: var(--pc-warn-bg);
  color: var(--pc-warn-text);
}

.pc-badge-special {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #3730a3;
}

.pc-badge-lit-error {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.pc-badge-atypical {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.pc-badge-rxn {
  background: var(--pc-green-50);
  color: var(--pc-green-800);
  border: 1px solid var(--pc-green-100);
}

.pc-badge-mass-pass {
  background: #ecfdf5;
  color: #047857;
}

.pc-badge-mass-fail {
  background: var(--pc-warn-bg);
  color: var(--pc-warn-text);
}

/* ── 战役 B：家族罗盘 / 物种树 ── */
.pc-explore {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.pc-explore-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.pc-explore-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--pc-green-900);
}

.pc-explore-hero p {
  margin: 8px 0 0;
  color: var(--pc-muted);
  font-size: 0.9rem;
}

.pc-explore-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.pc-explore-tab {
  padding: 10px 20px;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--pc-muted);
}

.pc-explore-tab.active {
  background: linear-gradient(90deg, var(--pc-green-800), var(--pc-sea-900));
  color: #fff;
  border-color: transparent;
}

.pc-explore-panel { display: none; }
.pc-explore-panel.active { display: block; }

.pc-explore-chart-wrap {
  position: relative;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--pc-shadow);
}

.pc-explore-chart-wrap--wide .pc-explore-chart--tall {
  min-height: 520px;
}

.pc-explore-chart {
  width: 100%;
  min-height: 480px;
}

.pc-explore-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 2;
  min-width: 140px;
}

.pc-explore-hub-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pc-muted);
}

.pc-explore-hub strong {
  display: block;
  font-size: 1.05rem;
  color: var(--pc-ink);
  margin-top: 4px;
}

.pc-explore-hub-count {
  display: block;
  font-size: 0.82rem;
  color: var(--pc-green-800);
  font-weight: 700;
  margin-top: 4px;
}

.pc-explore-hub-gold {
  display: block;
  font-size: 0.75rem;
  color: #b8860b;
  margin-top: 2px;
}

.pc-explore-hub-hint {
  margin: 8px 0 0;
  font-size: 0.68rem;
  color: #94a3b8;
}

.pc-explore-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  margin-top: 20px;
  font-size: 0.78rem;
  color: var(--pc-muted);
}

/* ── Phase 2：动态反应网格 + 侧边栏筛选 ── */
.pc-browse {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.pc-browse-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.pc-browse-hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--pc-green-900);
}

.pc-browse-hero p {
  margin: 8px 0 0;
  color: var(--pc-muted);
  font-size: 0.92rem;
}

.pc-browse-hero-stats {
  display: flex;
  gap: 20px;
  font-size: 0.88rem;
  color: var(--pc-muted);
}

.pc-browse-hero-stats strong {
  color: var(--pc-green-800);
  font-size: 1.1rem;
}

.pc-browse-layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) 1fr;
  gap: 28px;
  align-items: start;
}

.pc-sidebar {
  position: sticky;
  top: calc(var(--pc-nav-h) + 16px);
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--pc-shadow);
  max-height: calc(100vh - var(--pc-nav-h) - 32px);
  overflow-y: auto;
}

.pc-sidebar-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pc-sidebar-block {
  border: none;
  margin: 0;
  padding: 0;
}

.pc-sidebar-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-muted);
  margin-bottom: 8px;
}

.pc-sidebar-input,
.pc-sidebar-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  font-size: 0.88rem;
  background: var(--pc-bg-subtle);
}

.pc-sidebar-input:focus,
.pc-sidebar-select:focus {
  outline: none;
  border-color: var(--pc-green-600);
  box-shadow: 0 0 0 3px rgba(20, 135, 90, 0.12);
}

.pc-sidebar-cascade { margin-top: 8px; }

.pc-tier-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pc-tier-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--pc-border);
  cursor: pointer;
  font-size: 0.84rem;
  transition: background 0.12s, border-color 0.12s;
}

.pc-tier-chip input { accent-color: var(--pc-green-700); }

.pc-tier-chip span { font-weight: 700; flex: 1; }

.pc-tier-chip em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--pc-muted);
}

.pc-tier-chip--gold:has(input:checked) { background: #fef9c3; border-color: #fde047; }
.pc-tier-chip--silver:has(input:checked) { background: #f1f5f9; border-color: #cbd5e1; }
.pc-tier-chip--special:has(input:checked) { background: #ede9fe; border-color: #a78bfa; }
.pc-tier-chip--bronze:has(input:checked) { background: #ffedd5; border-color: #fdba74; }
.pc-tier-chip--quarantine:has(input:checked) { background: #fef2f2; border-color: #fca5a5; }

.pc-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.pc-btn-block { width: 100%; justify-content: center; }

.pc-browse-main { min-width: 0; }

.pc-browse-results-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.pc-browse-results-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--pc-green-900);
}

.pc-browse-results-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--pc-muted);
}

.pc-reaction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.pc-grid-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--pc-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}

.pc-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 107, 71, 0.12);
  border-color: #a7f3d0;
}

.pc-grid-card--gold { border-top: 3px solid #d4a017; }
.pc-grid-card--special { border-top: 3px solid #7c3aed; }
.pc-grid-card--silver { border-top: 3px solid #94a3b8; }
.pc-grid-card--bronze { border-top: 3px solid #ea580c; }
.pc-grid-card--quarantine { border-top: 3px solid #be123c; }

.pc-grid-card-rxn {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid var(--pc-border);
}

.pc-grid-mol {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  padding: 4px;
  overflow: hidden;
}

.pc-mol-inline-svg,
.pc-mol-inline-svg svg,
.pc-mol-img-fallback {
  width: 100%;
  max-height: 80px;
  object-fit: contain;
  display: block;
}

.pc-mol-missing {
  font-size: 0.68rem;
  color: #94a3b8;
  text-align: center;
  padding: 8px;
}

.pc-grid-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

.pc-grid-arrow-icon {
  font-size: 1.4rem;
  color: var(--pc-green-600);
  line-height: 1;
}

.pc-grid-arrow-enzyme {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--pc-sea-900);
  text-align: center;
  max-width: 72px;
  line-height: 1.2;
  word-break: break-word;
}

.pc-grid-card-body { padding: 14px 16px 16px; flex: 1; }

.pc-grid-card-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.pc-grid-gene {
  font-size: 0.95rem;
  color: var(--pc-green-900);
}

.pc-grid-cyp {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pc-sea-700);
  background: #f0f9ff;
  padding: 2px 8px;
  border-radius: 6px;
}

.pc-grid-organism {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--pc-muted);
}

.pc-grid-organism-zh,
.pc-detail-organism-zh {
  font-weight: 600;
  color: var(--pc-text);
  font-style: normal;
}

.pc-grid-organism-sep {
  margin: 0 0.35em;
  opacity: 0.5;
}

.pc-zh-search-hint {
  color: #0f766e;
  font-size: 0.92em;
}

.pc-grid-rxn-label {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: var(--pc-muted);
  line-height: 1.4;
}

.pc-grid-mass {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.pc-grid-mass.pass { color: #047857; }
.pc-grid-mass.exempt { color: #6d28d9; }

.pc-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  color: var(--pc-muted);
  background: var(--pc-bg-subtle);
  border-radius: 14px;
  border: 1px dashed var(--pc-border);
}

.htmx-request .pc-reaction-grid { opacity: 0.55; transition: opacity 0.15s; }

/* 反应卡片（旧版兼容） */
.pc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.pc-card {
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  overflow: hidden;
  box-shadow: var(--pc-shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.pc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(15, 107, 71, 0.1);
  border-color: var(--pc-green-100);
}

.pc-card-rxn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  background: var(--pc-bg-subtle);
  border-bottom: 1px solid var(--pc-border);
}

.pc-mol-thumb {
  width: 100px;
  height: 72px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--pc-border);
  object-fit: contain;
}

.pc-rxn-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 48px;
}

.pc-enzyme-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pc-sea-900), var(--pc-sea-700));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(12, 45, 72, 0.3);
}

.pc-enzyme-icon svg { width: 20px; height: 20px; color: #7dd3fc; }

.pc-rxn-arrow-line {
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--pc-green-600), var(--pc-sea-700));
  position: relative;
}

.pc-rxn-arrow-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border: 5px solid transparent;
  border-left-color: var(--pc-sea-700);
}

.pc-card-body {
  padding: 16px 18px;
  flex: 1;
}

.pc-card-enzyme {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--pc-green-900);
  margin-bottom: 4px;
}

.pc-card-organism {
  font-size: 0.82rem;
  color: var(--pc-muted);
  font-style: italic;
  margin-bottom: 10px;
}

.pc-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pc-card-evidence {
  font-size: 0.78rem;
  color: var(--pc-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 表格视图 */
.pc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  background: #fff;
  box-shadow: var(--pc-shadow);
}

table.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

table.pc-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--pc-bg-subtle);
  font-weight: 600;
  color: var(--pc-green-900);
  border-bottom: 2px solid var(--pc-border);
  white-space: nowrap;
}

table.pc-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pc-border);
  vertical-align: middle;
}

table.pc-table tr:hover td { background: var(--pc-green-50); }

table.pc-table a {
  color: var(--pc-green-800);
  font-weight: 600;
  text-decoration: none;
}

table.pc-table a:hover { text-decoration: underline; }

.pc-td-mol {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pc-td-mol img {
  width: 72px;
  height: 52px;
  border-radius: 6px;
  border: 1px solid var(--pc-border);
  background: #fff;
}

.pc-td-mol span {
  font-size: 0.8rem;
  max-width: 140px;
  line-height: 1.3;
}

.pc-hidden { display: none !important; }

/* 分页 */
.pc-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.pc-pagination a,
.pc-pagination span {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--pc-border);
  color: var(--pc-ink);
}

.pc-pagination a:hover { background: var(--pc-green-50); border-color: var(--pc-green-600); }
.pc-pagination .current { background: var(--pc-green-800); color: #fff; border-color: var(--pc-green-800); }

/* ── 详情页 Hero 徽章 ── */
.pc-badge-hero {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 6px 6px 0;
}

.pc-badge-hero-gold {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 35%, #d4a017 100%);
  color: #78350f;
  box-shadow: 0 0 24px rgba(212, 160, 23, 0.45), inset 0 1px 0 rgba(255,255,255,0.7);
}

.pc-badge-hero-special {
  background: linear-gradient(135deg, #ede9fe 0%, #a78bfa 45%, #6d28d9 100%);
  color: #f5f3ff;
  box-shadow: 0 0 28px rgba(109, 40, 217, 0.55), inset 0 1px 0 rgba(255,255,255,0.25);
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.8);
}

.pc-badge-hero-lit-error {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 50%, #450a0a 100%);
  color: #fecaca;
  box-shadow: 0 0 20px rgba(153, 27, 27, 0.5);
}

.pc-badge-hero-atypical {
  background: linear-gradient(135deg, #e0f2fe 0%, #38bdf8 100%);
  color: #0c4a6e;
}

.pc-badge-hero-silver { background: #e2e8f0; color: #334155; }
.pc-badge-hero-bronze { background: #ffedd5; color: #9a3412; }
.pc-badge-hero-quarantine { background: #fef2f2; color: #9f1239; border: 1px solid #fecaca; }
.pc-badge-hero-mass-pass { background: #ecfdf5; color: #047857; }
.pc-badge-hero-mass-exempt { background: #ede9fe; color: #5b21b6; }
.pc-badge-hero-mass-warn { background: #fff1f2; color: #be123c; }

/* ── 详情页 Deep Dive ── */
.pc-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.pc-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pc-detail-badges {
  flex: 0 1 320px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.pc-detail-meta {
  flex: 1 1 280px;
  text-align: right;
}

.pc-detail-gene {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pc-ink);
  line-height: 1.1;
}

.pc-detail-organism {
  margin: 10px 0 0;
  font-size: 1.15rem;
  color: var(--pc-green-800);
}

.pc-detail-organism em {
  font-style: italic;
  font-weight: 500;
}

.pc-detail-cyp-family {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--pc-green-50);
  color: var(--pc-green-800);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 700;
}

.pc-detail-taxonomy {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--pc-muted);
}

.pc-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pc-muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.pc-detail-back:hover { color: var(--pc-green-800); }

.pc-equation {
  background: var(--pc-bg-subtle);
  border: 1px solid var(--pc-border);
  border-radius: 20px;
  padding: clamp(28px, 5vw, 48px);
  margin: 28px 0 36px;
  box-shadow: var(--pc-shadow);
}

.pc-equation-hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--pc-bg-subtle) 100%);
  border-color: #d1fae5;
}

.pc-highlight-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px dashed #d1fae5;
}

.pc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pc-ink);
}

.pc-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.pc-legend-sub { background: #14875a; }
.pc-legend-prod { background: #d4a017; }

.pc-legend-hint {
  font-size: 0.72rem;
  color: var(--pc-muted);
  font-style: italic;
}

.pc-equation-mass {
  text-align: center;
  margin-bottom: 28px;
}

.pc-mass-value {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--pc-green-800);
}

.pc-mass-value.pass { color: #047857; }
.pc-mass-value.fail { color: var(--pc-warn-text); }

.pc-mass-label {
  font-size: 0.82rem;
  color: var(--pc-muted);
  margin-top: 4px;
}

.pc-equation-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 32px);
  flex-wrap: wrap;
}

.pc-eq-node {
  text-align: center;
  flex: 0 0 auto;
}

.pc-eq-mol {
  width: clamp(140px, 22vw, 200px);
  height: clamp(100px, 16vw, 150px);
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pc-eq-mol img,
.pc-eq-mol-inline svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pc-eq-mol-inline {
  width: clamp(180px, 26vw, 280px);
  height: clamp(130px, 20vw, 200px);
}

.pc-eq-name {
  margin-top: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-muted);
}

.pc-eq-compound {
  margin-top: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 280px;
  line-height: 1.4;
  color: var(--pc-ink);
}

.pc-eq-smiles {
  display: block;
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--pc-muted);
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  max-width: 280px;
  word-break: break-all;
}

.pc-btn-crowd {
  margin-top: 10px;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-color: #fecaca;
  color: #9f1239;
}

.pc-eq-arrow-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 140px;
  padding: 0 8px;
}

.pc-eq-enzyme-float {
  font-weight: 800;
  font-size: 1rem;
  color: var(--pc-sea-900);
  text-align: center;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(12, 45, 72, 0.08);
}

.pc-mass-chip {
  text-align: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--pc-border);
  min-width: 160px;
}

.pc-mass-chip-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
}

.pc-mass-chip-rule {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--pc-muted);
  line-height: 1.35;
}

.pc-mass-chip.pass .pc-mass-chip-value { color: #047857; }
.pc-mass-chip.exempt .pc-mass-chip-value { color: #6d28d9; }
.pc-mass-chip.fail .pc-mass-chip-value { color: var(--pc-warn-text); }
.pc-mass-chip.pass { border-color: #a7f3d0; background: #ecfdf5; }
.pc-mass-chip.exempt { border-color: #c4b5fd; background: #f5f3ff; }
.pc-mass-chip.fail { border-color: #fecaca; background: #fff1f2; }

.pc-eq-enzyme {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 100px;
}

.pc-enzyme-mesh {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: linear-gradient(145deg, #0c2d48 0%, #1e5a8a 50%, #0f766e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(12, 45, 72, 0.35);
}

.pc-enzyme-mesh::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(60deg, transparent, transparent 8px, rgba(125,211,252,0.08) 8px, rgba(125,211,252,0.08) 9px),
    repeating-linear-gradient(-60deg, transparent, transparent 8px, rgba(125,211,252,0.06) 8px, rgba(125,211,252,0.06) 9px);
}

.pc-enzyme-mesh svg {
  width: 44px;
  height: 44px;
  color: #7dd3fc;
  position: relative;
  z-index: 1;
}

.pc-eq-enzyme-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--pc-sea-900);
}

.pc-eq-enzyme-org {
  font-size: 0.78rem;
  color: var(--pc-muted);
  font-style: italic;
}

.pc-eq-arrow-big {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--pc-green-600);
  font-weight: 300;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(15, 107, 71, 0.2));
}

.pc-evidence-trail {
  margin-top: 12px;
}

.pc-evidence-trail-title {
  margin: 0 0 20px;
  font-size: 1.1rem;
  color: var(--pc-green-900);
  font-weight: 700;
}

.pc-evidence-quote {
  margin: 0 0 24px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-left: 4px solid var(--pc-green-600);
  border-radius: 0 12px 12px 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--pc-ink);
  box-shadow: var(--pc-shadow);
}

.pc-evidence-quote-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-green-800);
  margin-bottom: 10px;
}

.pc-lit-link {
  color: var(--pc-sea-700);
  font-weight: 600;
  text-decoration: none;
}

.pc-lit-link:hover { text-decoration: underline; }

.pc-lit-title {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--pc-ink);
}

.pc-related {
  margin-top: 48px;
}

.pc-related h3 {
  color: var(--pc-green-900);
  margin-bottom: 16px;
}

.pc-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pc-panel {
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  padding: 22px 24px;
  box-shadow: var(--pc-shadow);
}

.pc-panel h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: var(--pc-green-900);
  font-weight: 700;
}

.pc-kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  font-size: 0.86rem;
}

.pc-kv dt { color: var(--pc-muted); font-weight: 500; }
.pc-kv dd { margin: 0; }

.pc-evidence-block {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--pc-ink);
  background: var(--pc-bg-subtle);
  padding: 14px;
  border-radius: 8px;
  border-left: 3px solid var(--pc-green-600);
}

/* JSME 弹窗 */
.pc-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pc-modal-overlay.open { display: flex; }

.pc-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

.pc-modal h3 { margin: 0 0 16px; }

/* ── Downloads center ── */
.pc-dl {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 56px) 24px 72px;
}

.pc-dl-hero {
  text-align: center;
  margin-bottom: 48px;
}

.pc-dl-eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pc-green-700);
}

.pc-dl-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  color: var(--pc-green-950);
  font-weight: 800;
}

.pc-dl-lead {
  margin: 0 auto 12px;
  max-width: 42rem;
  color: var(--pc-muted);
  line-height: 1.6;
  font-size: 1.02rem;
}

.pc-dl-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--pc-muted);
}

.pc-dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.pc-dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
  border-radius: var(--pc-radius);
  border: 1px solid var(--pc-border);
  background: #fff;
  box-shadow: var(--pc-shadow);
  overflow: hidden;
}

.pc-dl-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.pc-dl-card--gold::before { background: linear-gradient(90deg, #d4a017, #fde68a); }
.pc-dl-card--corpus::before { background: linear-gradient(90deg, var(--pc-green-700), var(--pc-green-600)); }
.pc-dl-card--quarantine::before { background: linear-gradient(90deg, #9f1239, #fecaca); }
.pc-dl-card--fasta::before { background: linear-gradient(90deg, var(--pc-sea-700), #60a5fa); }

.pc-dl-card-badge {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pc-dl-card h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--pc-ink);
}

.pc-dl-card-desc {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--pc-muted);
  line-height: 1.55;
  flex: 1;
}

.pc-dl-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.pc-dl-stat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pc-dl-stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--pc-green-800);
  font-variant-numeric: tabular-nums;
}

.pc-dl-stat-num.warn { color: var(--pc-warn-text); }

.pc-dl-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pc-muted);
}

.pc-dl-fields {
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.pc-dl-fields summary {
  cursor: pointer;
  color: var(--pc-sea-700);
  font-weight: 600;
}

.pc-dl-field-list {
  display: block;
  margin-top: 8px;
  padding: 10px;
  background: var(--pc-bg-subtle);
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.5;
  word-break: break-word;
}

.pc-dl-format-hint {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: var(--pc-muted);
}

.pc-dl-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pc-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.pc-dl-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 107, 71, 0.15);
}

.pc-dl-btn--gold {
  background: var(--pc-gold-bg);
  color: #78350f;
}

.pc-dl-btn--corpus {
  background: var(--pc-green-800);
  color: #fff;
}

.pc-dl-btn--quarantine {
  background: #9f1239;
  color: #fff;
}

.pc-dl-btn--fasta {
  background: var(--pc-sea-700);
  color: #fff;
}

.pc-dl-btn--ghost {
  background: transparent;
  color: var(--pc-muted);
  border: 1px solid var(--pc-border);
  box-shadow: none;
}

.pc-dl-btn--ghost:hover {
  border-color: var(--pc-green-600);
  color: var(--pc-green-800);
}

.pc-dl-citation {
  margin-top: 40px;
  padding: 22px 26px;
  border-radius: var(--pc-radius);
  background: var(--pc-bg-subtle);
  border: 1px solid var(--pc-border);
}

.pc-dl-citation h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--pc-green-900);
}

.pc-dl-citation p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--pc-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .pc-dl-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .pc-stats-row { grid-template-columns: repeat(2, 1fr); }
  .pc-detail-grid { grid-template-columns: 1fr; }
  .pc-detail-meta { text-align: left; }
  .pc-detail-header { flex-direction: column-reverse; }
  .pc-search-wrap { flex-direction: column; }
  .pc-filter-bar { flex-direction: column; align-items: stretch; }
  .pc-view-toggle { margin-left: 0; }
  .pc-browse-layout { grid-template-columns: 1fr; }
  .pc-sidebar { position: static; max-height: none; }
}

@media (max-width: 560px) {
  .pc-stats-row { grid-template-columns: 1fr; }
  .pc-cards { grid-template-columns: 1fr; }
}
