/* ============================================================
   chrXatlas — Chromosome X Evidence Atlas
   Design system + full page styles
   ============================================================ */

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ── Design Tokens — Light ─────────────────── */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace;

  --header-height: 64px;

  --bg:           #fafbfd;
  --bg-raised:    #ffffff;
  --bg-sunken:    #f1f4f8;
  --header-bg:    rgba(250, 251, 253, 0.92);

  --text:          #0f1419;
  --text-secondary:#536471;
  --text-tertiary: #8899a6;
  --text-on-dark:  #f0f6fc;

  --accent:        #0d9488;
  --accent-hover:  #0f766e;
  --accent-subtle: #f0fdfa;
  --accent-text:   #115e59;

  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.10);
  --shadow-xl:  0 20px 50px rgba(0,0,0,0.12);

  --radius:    8px;
  --radius-lg: 14px;

  color-scheme: light dark;
}

/* ── Design Tokens — Dark ──────────────────── */
[data-theme="dark"] {
  --bg:           #0d1117;
  --bg-raised:    #161b22;
  --bg-sunken:    #010409;
  --header-bg:    rgba(13, 17, 23, 0.92);

  --text:          #e6edf3;
  --text-secondary:#8b949e;
  --text-tertiary: #6e7681;

  --accent:        #2dd4bf;
  --accent-hover:  #5eead4;
  --accent-subtle: rgba(45, 212, 191, 0.08);
  --accent-text:   #5eead4;

  --border:        #30363d;
  --border-strong: #484f58;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.25);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.45);
  --shadow-xl:  0 20px 50px rgba(0,0,0,0.55);
}

/* Panel accent overrides */
[data-panel-accent="teal"]  { --panel-accent: #0d9488; --panel-accent-subtle: #f0fdfa; }
[data-panel-accent="amber"] { --panel-accent: #d97706; --panel-accent-subtle: #fffbeb; }
[data-panel-accent="blue"]  { --panel-accent: #2563eb; --panel-accent-subtle: #eff6ff; }
[data-panel-accent="slate"] { --panel-accent: #64748b; --panel-accent-subtle: #f8fafc; }

[data-theme="dark"] [data-panel-accent="teal"]  { --panel-accent: #2dd4bf; --panel-accent-subtle: rgba(45,212,191,0.08); }
[data-theme="dark"] [data-panel-accent="amber"] { --panel-accent: #fbbf24; --panel-accent-subtle: rgba(251,191,36,0.08); }
[data-theme="dark"] [data-panel-accent="blue"]  { --panel-accent: #60a5fa; --panel-accent-subtle: rgba(96,165,250,0.08); }
[data-theme="dark"] [data-panel-accent="slate"] { --panel-accent: #94a3b8; --panel-accent-subtle: rgba(148,163,184,0.08); }

/* ── Global ────────────────────────────────── */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s, color 0.3s;
}

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

section { padding: 5rem 0; }

/* ── Typography ────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 800; }
h3 { font-size: 1.25rem; }
p  { line-height: 1.7; }
strong { font-weight: 600; }
sup { font-size: 0.7em; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Header ────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 2rem;
}
.logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.logo-x {
  color: var(--accent);
  font-weight: 900;
}
.nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-divider { width: 1px; height: 20px; background: var(--border); align-self: center; flex-shrink: 0; }
.nav-panel-btn {
  font-size: 0.7rem; font-weight: 600; padding: 0.25rem 0.6rem;
  border-radius: 6px; border: 1px solid currentColor;
  transition: all 0.2s; white-space: nowrap; opacity: 0.85;
}
.nav-panel-btn:hover { opacity: 1; }
.nav-panel-btn[data-panel-accent="teal"]  { color: #0d9488; }
.nav-panel-btn[data-panel-accent="amber"] { color: #b45309; }
.nav-panel-btn[data-panel-accent="blue"]  { color: #2563eb; }
.nav-panel-btn[data-panel-accent="teal"]:hover  { background: #0d9488; color: #fff; }
.nav-panel-btn[data-panel-accent="amber"]:hover { background: #d97706; color: #fff; }
.nav-panel-btn[data-panel-accent="blue"]:hover  { background: #2563eb; color: #fff; }
[data-theme="dark"] .nav-panel-btn[data-panel-accent="teal"]  { color: #2dd4bf; }
[data-theme="dark"] .nav-panel-btn[data-panel-accent="amber"] { color: #fbbf24; }
[data-theme="dark"] .nav-panel-btn[data-panel-accent="blue"]  { color: #60a5fa; }
[data-theme="dark"] .nav-panel-btn[data-panel-accent="teal"]:hover  { background: #2dd4bf; color: #0d1117; }
[data-theme="dark"] .nav-panel-btn[data-panel-accent="amber"]:hover { background: #fbbf24; color: #0d1117; }
[data-theme="dark"] .nav-panel-btn[data-panel-accent="blue"]:hover  { background: #60a5fa; color: #0d1117; }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--bg-raised);
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.theme-toggle svg { display: block; stroke-width: 2.5; }
.theme-toggle:hover { background: var(--accent-subtle); color: var(--accent); border-color: var(--accent); }
.hamburger { display: none; flex-direction: column; gap: 4px; padding: 6px; }
.hamburger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }

/* ── Hero ──────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(145deg, #0c1222 0%, #0f3433 55%, #0c1222 100%);
  color: var(--text-on-dark);
  overflow: hidden;
  padding: calc(var(--header-height) + 3rem) 1.5rem 7rem;
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg-pattern::after {
  content: 'X';
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(22rem, 35vw, 50rem);
  font-weight: 900;
  font-family: var(--font-sans);
  opacity: 0.035;
  color: white;
  line-height: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}
.hero-badge {
  display: inline-block;
  padding: 0.45rem 1.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.05);
  margin-bottom: 1.75rem;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}
.hero-subtitle {
  font-size: clamp(0.98rem, 1.4vw, 1.15rem);
  line-height: 1.75;
  color: rgba(255,255,255,0.65);
  max-width: 600px;
  margin: 0 auto 2.25rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  background: #2dd4bf;
  border-radius: var(--radius);
  transition: transform 0.2s, background 0.2s;
}
.hero-cta:hover { transform: translateY(-1px); background: #5eead4; }
.cta-arrow { transition: transform 0.2s; }
.hero-cta:hover .cta-arrow { transform: translateY(2px); }

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: floatHint 2.5s ease-in-out infinite;
}
@keyframes floatHint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ── Proof / Metrics ───────────────────────── */
.proof {
  position: relative;
  z-index: 10;
  margin-top: -3.5rem;
  padding: 0 1.5rem;
  margin-bottom: 1rem;
}
.metrics-grid {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.metric-card {
  padding: 1.75rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border);
}
.metric-card:last-child { border-right: none; }
.metric-value {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.proof-note {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* ── Panel Cards ───────────────────────────── */
.panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.panel-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.panel-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.panel-card-accent { height: 4px; background: var(--panel-accent); }
.panel-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.panel-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.panel-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.panel-card-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.panel-stat { display: flex; flex-direction: column; }
.panel-stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--panel-accent);
  font-variant-numeric: tabular-nums;
}
.panel-stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.panel-card-domains {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 1rem;
  min-height: 1.6rem;
}
.domain-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--bg-sunken);
  color: var(--text-secondary);
  white-space: nowrap;
}
.domain-badge-more {
  background: transparent;
  color: var(--text-tertiary);
  font-style: italic;
}
.panel-top-traits-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}
.panel-trait-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.88rem;
}
.panel-trait-name { color: var(--text); font-weight: 500; }
.panel-trait-loci {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.panel-card-cta {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--panel-accent);
  transition: opacity 0.2s;
}
.panel-card-cta:hover { opacity: 0.8; }

/* ── Why Section ───────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.why-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.why-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--accent-text);
}
.why-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Results Section ───────────────────────── */
.results-section { background: var(--bg-sunken); }

/* Panel Comparison */
.panel-comparison,
.domain-composition,
.top-traits { margin-bottom: 3rem; }
.panel-comparison h3,
.domain-composition h3,
.top-traits h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.domain-subtitle,
.traits-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.comparison-item {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.comparison-title { font-weight: 700; font-size: 0.95rem; }
.comparison-badge {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  background: var(--accent-subtle);
  color: var(--accent-text);
}
.comparison-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.comparison-label {
  width: 55px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.comparison-bar-track {
  flex: 1;
  height: 16px;
  background: var(--bg-sunken);
  border-radius: 3px;
  overflow: hidden;
}
.comparison-bar-fill {
  height: 100%;
  background: var(--panel-accent);
  border-radius: 3px;
  transition: width 0.8s ease-out;
}
.comparison-value {
  width: 48px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Domain Bars */
.domain-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}
.domain-name {
  width: 150px;
  font-size: 0.8rem;
  text-align: right;
  color: var(--text-secondary);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.domain-bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.domain-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  min-width: 28px;
  transition: width 0.8s ease-out;
}
.domain-bar-value {
  font-size: 0.68rem;
  font-weight: 700;
  color: white;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .domain-bar-value { color: #0d1117; }
.domain-trait-count {
  width: 65px;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Top Traits Rail */
.traits-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.traits-rail::-webkit-scrollbar { height: 4px; }
.traits-rail::-webkit-scrollbar-track { background: var(--border); border-radius: 2px; }
.traits-rail::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

.trait-card {
  min-width: 250px;
  max-width: 270px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.trait-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.trait-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.trait-domain-badge {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--accent-subtle);
  color: var(--accent-text);
}
.trait-grade {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.grade-a { background: #dcfce7; color: #166534; }
.grade-b { background: #fef3c7; color: #92400e; }
.grade-u { background: #f1f5f9; color: #64748b; }
[data-theme="dark"] .grade-a { background: rgba(34,197,94,0.15); color: #4ade80; }
[data-theme="dark"] .grade-b { background: rgba(245,158,11,0.15); color: #fbbf24; }
[data-theme="dark"] .grade-u { background: rgba(100,116,139,0.15); color: #94a3b8; }

.trait-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.trait-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.trait-score-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-sunken);
  border-radius: 3px;
  overflow: hidden;
}
.trait-score-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
.trait-score-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.trait-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.trait-meta-item { display: flex; flex-direction: column; }
.trait-meta-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.trait-meta-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.trait-genes { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.gene-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-sunken);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── Discovery Pool ────────────────────────── */
.discovery-section { background: var(--bg); }
.discovery-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-tertiary);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.discovery-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.discovery-stat { text-align: center; }
.discovery-stat-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.discovery-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.discovery-domains h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.discovery-domain-list { margin-bottom: 1.5rem; }
.discovery-domain-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.discovery-domain-name { color: var(--text); }
.discovery-domain-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.discovery-note {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  line-height: 1.65;
  font-style: italic;
}
.discovery-traits {
  margin: 1.5rem 0;
  display: grid;
  gap: 0.9rem;
}
.discovery-drawer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.discovery-drawer-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 1rem 1.1rem;
}
.discovery-drawer-summary::-webkit-details-marker { display: none; }
.discovery-drawer-summary::marker { content: ''; }
.discovery-drawer-summary:hover { background: var(--accent-subtle); }
.discovery-drawer-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.discovery-drawer-subtitle {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.discovery-drawer-count {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.discovery-drawer-body {
  border-top: 1px solid var(--border);
  max-height: 28rem;
  overflow: auto;
}
.discovery-trait-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.discovery-trait-row:last-child { border-bottom: none; }
.discovery-trait-row:hover { background: var(--accent-subtle); }
.discovery-trait-main,
.discovery-trait-side {
  min-width: 0;
}
.discovery-trait-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.discovery-trait-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.discovery-trait-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.discovery-trait-domain,
.discovery-trait-status,
.discovery-trait-fact {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
}
.discovery-trait-domain {
  background: var(--accent-subtle);
  color: var(--accent-text);
}
.discovery-trait-fact {
  background: var(--bg-sunken);
  color: var(--text-secondary);
}
.discovery-trait-status.is-supported {
  background: #dcfce7;
  color: #166534;
}
.discovery-trait-status.is-lookup-hit {
  background: #fef3c7;
  color: #92400e;
}
.discovery-trait-status.is-unsupported {
  background: #fef2f2;
  color: #991b1b;
}
[data-theme="dark"] .discovery-trait-status.is-supported {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
}
[data-theme="dark"] .discovery-trait-status.is-lookup-hit {
  background: rgba(245,158,11,0.16);
  color: #fbbf24;
}
[data-theme="dark"] .discovery-trait-status.is-unsupported {
  background: rgba(239,68,68,0.14);
  color: #fca5a5;
}
.discovery-trait-side {
  flex-shrink: 0;
  max-width: 240px;
  text-align: right;
}
.discovery-trait-genes {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.discovery-trait-genes-empty {
  color: var(--text-tertiary);
}

/* ── Methods Section ───────────────────────── */
.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.method-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.method-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}
.method-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.method-card em { color: var(--text); font-style: italic; }

/* ── About ─────────────────────────────────── */
.about-section { background: var(--bg-sunken); }
.about-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.about-card h2 { margin-bottom: 1rem; }
.about-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.about-card p:last-child { margin-bottom: 0; }
.about-card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.about-card a:hover { color: var(--accent-hover); }

/* ── Footer ────────────────────────────────── */
.footer {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}
.footer-brand .logo { font-size: 1.1rem; margin-bottom: 0.25rem; }
.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}
.footer-nav {
  display: flex;
  gap: 3rem;
  justify-content: flex-end;
}
.footer-col { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.3rem;
}
.footer-col a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: center;
}

/* ── Scroll Animations ─────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
  :root { --header-height: 56px; }
  section { padding: 3.5rem 0; }

  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    box-shadow: var(--shadow-md);
  }
  .hamburger { display: flex; }
  .nav-divider { width: 100%; height: 1px; margin: 0.25rem 0; }
  .nav-panel-btn { align-self: flex-start; font-size: 0.78rem; }

  .hero { min-height: 85vh; padding-bottom: 5rem; }
  .hero-title { font-size: 2rem; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { border-right: none; border-bottom: 1px solid var(--border); }
  .metric-card:nth-child(odd) { border-right: 1px solid var(--border); }
  .metric-card:nth-last-child(-n+2) { border-bottom: none; }
  .metric-value { font-size: 1.8rem; }

  .panels-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .methods-grid { grid-template-columns: 1fr; }

  .domain-name { width: 100px; font-size: 0.72rem; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; flex-wrap: wrap; gap: 2rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.7rem; }
  .hero-subtitle { font-size: 0.9rem; }
  .metric-value { font-size: 1.5rem; }
  .panel-card-stats { gap: 1rem; }
  .discovery-stats { grid-template-columns: repeat(2, 1fr); }
  .discovery-trait-row {
    flex-direction: column;
  }
  .discovery-trait-side {
    max-width: none;
    text-align: left;
  }
}

/* ============================================================
   Detail Pages — Search, Panel, Trait
   ============================================================ */

/* ── Search Component ──────────────────────── */
.search-section { padding: 2rem 0; }
.search-container { position: relative; max-width: 600px; margin: 0 auto; }
.search-input {
  width: 100%; padding: 0.85rem 1.25rem; font-size: 0.95rem;
  font-family: var(--font-sans); color: var(--text);
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: var(--text-tertiary); }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.search-results {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 0.25rem; background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 400px; overflow-y: auto; z-index: 50;
}
.search-result-item {
  display: block; padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border); transition: background 0.15s; cursor: pointer;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--accent-subtle); }
.search-result-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.search-result-meta { display: flex; gap: 0.75rem; font-size: 0.75rem; color: var(--text-secondary); }
.search-result-score { font-family: var(--font-mono); font-weight: 600; color: var(--accent); }
.search-empty { padding: 1rem 1.25rem; color: var(--text-tertiary); font-size: 0.88rem; text-align: center; }

/* ── Breadcrumb ────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-tertiary); margin-bottom: 1rem; }
.breadcrumb a { color: var(--text-secondary); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.5; }

/* ── Page Hero (panel/trait detail) ─────────── */
.page-hero { padding: calc(var(--header-height) + 2rem) 0 2rem; background: var(--bg); border-bottom: 1px solid var(--border); }
.page-hero-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.page-hero-desc { font-size: 1rem; color: var(--text-secondary); max-width: 640px; margin-bottom: 1.5rem; }
.page-hero-metrics { display: flex; gap: 2rem; flex-wrap: wrap; }
.page-metric { display: flex; flex-direction: column; }
.page-metric-value { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.page-metric-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }

/* ── Filter Bar ────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-bar .search-input { max-width: 280px; padding: 0.6rem 1rem; font-size: 0.88rem; }
.filter-toggle { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.filter-toggle input { accent-color: var(--accent); }
.result-count { font-size: 0.8rem; color: var(--text-tertiary); margin-left: auto; }
.domain-filters { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-chip {
  padding: 0.3rem 0.7rem; font-size: 0.72rem; font-weight: 500;
  border-radius: 100px; background: var(--bg-sunken); color: var(--text-secondary);
  border: 1px solid transparent; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.filter-chip:hover { border-color: var(--border-strong); }
.filter-chip.active { background: var(--accent-subtle); color: var(--accent-text); border-color: var(--accent); }
.chip-count { font-family: var(--font-mono); font-size: 0.65rem; opacity: 0.7; margin-left: 0.15rem; }

/* ── Data Table ────────────────────────────── */
.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th {
  text-align: left; padding: 0.75rem; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary);
  border-bottom: 2px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; background: var(--bg-raised); z-index: 5;
}
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th[data-sort]:hover { color: var(--accent); }
.data-table th .sort-icon { opacity: 0.3; font-size: 0.65rem; margin-left: 0.2rem; }
.data-table th.sort-asc .sort-icon,
.data-table th.sort-desc .sort-icon { opacity: 1; color: var(--accent); }
.data-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr { transition: background 0.15s; cursor: pointer; }
.data-table tbody tr:hover { background: var(--accent-subtle); }
.data-table tbody tr:last-child td { border-bottom: none; }
.num-cell { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.score-cell { display: flex; align-items: center; gap: 0.5rem; }
.mini-score-bar { width: 60px; height: 6px; background: var(--bg-sunken); border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.mini-score-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.score-val { font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.trait-table-name { font-weight: 600; }
.trait-name-cell { min-width: 180px; }
.genes-cell { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.table-empty { text-align: center; padding: 2rem 1rem; color: var(--text-tertiary); font-style: italic; }

/* ── Trait Detail ──────────────────────────── */
.trait-hero-header { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.trait-detail-score { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.trait-detail-score-bar { flex: 1; max-width: 200px; height: 8px; background: var(--bg-sunken); border-radius: 4px; overflow: hidden; }
.trait-detail-score-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.trait-detail-score-val { font-family: var(--font-mono); font-size: 2rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.trait-stats-row { display: flex; gap: 2rem; flex-wrap: wrap; }
.trait-stat { display: flex; flex-direction: column; }
.trait-stat-value { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.trait-stat-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); }

/* ── Metadata Grid ─────────────────────────── */
.metadata-section { padding: 2.5rem 0; }
.metadata-section h3 { margin-bottom: 1rem; }
.metadata-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.metadata-item { display: flex; flex-direction: column; padding: 0.65rem 0.85rem; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 6px; }
.metadata-label { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin-bottom: 0.2rem; }
.metadata-value { font-size: 0.88rem; font-weight: 500; color: var(--text); word-break: break-word; }

/* ── Locus Cards ───────────────────────────── */
.loci-section { padding: 2.5rem 0; }
.loci-section h3 { margin-bottom: 1rem; }
.locus-card { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; background: var(--bg-raised); overflow: hidden; }
.locus-card[open] { box-shadow: var(--shadow-sm); }
.locus-summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1rem; cursor: pointer; list-style: none; gap: 1rem; flex-wrap: wrap;
}
.locus-summary::-webkit-details-marker { display: none; }
.locus-summary::marker { content: ''; }
.locus-summary:hover { background: var(--accent-subtle); }
.locus-summary-main { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.locus-region { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.45rem; border-radius: 4px; }
.region-nonpar { background: var(--accent-subtle); color: var(--accent-text); }
.region-par { background: #fef3c7; color: #92400e; }
[data-theme="dark"] .region-par { background: rgba(245,158,11,0.15); color: #fbbf24; }
.locus-position { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.locus-lead-variant { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; color: var(--text); }
.locus-summary-stats { display: flex; align-items: center; gap: 0.75rem; font-size: 0.78rem; flex-wrap: wrap; }
.locus-pval { font-family: var(--font-mono); color: var(--text-secondary); }
.locus-top-gene { font-family: var(--font-mono); font-weight: 600; color: var(--accent); }
.locus-eqtl-badge { font-size: 0.65rem; font-weight: 600; padding: 0.12rem 0.4rem; border-radius: 4px; }
.eqtl-yes { background: #dcfce7; color: #166534; }
.eqtl-mid { background: #fef3c7; color: #92400e; }
.eqtl-no { background: var(--bg-sunken); color: var(--text-tertiary); }
[data-theme="dark"] .eqtl-yes { background: rgba(34,197,94,0.15); color: #4ade80; }
[data-theme="dark"] .eqtl-mid { background: rgba(245,158,11,0.16); color: #fbbf24; }
.locus-gene-count { color: var(--text-tertiary); font-size: 0.72rem; }
.locus-body { padding: 0 1rem 1rem; overflow-x: auto; }

/* ── Candidate Gene Table ──────────────────── */
.candidate-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.candidate-table th {
  text-align: left; padding: 0.5rem; font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.candidate-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.candidate-table tbody tr:last-child td { border-bottom: none; }
.candidate-table .gene-supported { background: rgba(34,197,94,0.04); }
[data-theme="dark"] .candidate-table .gene-supported { background: rgba(34,197,94,0.06); }
.gene-name { font-family: var(--font-mono); font-weight: 600; }
.gene-role-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  white-space: nowrap;
}
.gene-role-candidate {
  background: var(--accent-subtle);
  color: var(--accent-text);
}
.gene-role-followup {
  background: var(--bg-sunken);
  color: var(--text-secondary);
}
.biotype-badge { font-size: 0.68rem; padding: 0.1rem 0.35rem; border-radius: 3px; background: var(--bg-sunken); color: var(--text-secondary); white-space: nowrap; }
.eqtl-yes-sm { font-size: 0.72rem; font-weight: 600; color: #16a34a; }
.eqtl-mid-sm { font-size: 0.72rem; font-weight: 600; color: #b45309; }
[data-theme="dark"] .eqtl-yes-sm { color: #4ade80; }
[data-theme="dark"] .eqtl-mid-sm { color: #fbbf24; }

/* ── Support Explanation Card ──────────────── */
.support-section { padding: 2rem 0 0; }
.support-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.support-card.support-yes { border-left: 4px solid #16a34a; }
.support-card.support-mid  { border-left: 4px solid #d97706; }
.support-card.support-no  { border-left: 4px solid var(--text-tertiary); }
[data-theme="dark"] .support-card.support-yes { border-left-color: #4ade80; }
[data-theme="dark"] .support-card.support-mid { border-left-color: #fbbf24; }

.support-header {
  padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 0.75rem;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.support-header h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.support-status-badge {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem; border-radius: 100px; white-space: nowrap;
}
.support-status-badge.support-yes { background: #dcfce7; color: #166534; }
.support-status-badge.support-mid  { background: #fef3c7; color: #92400e; }
.support-status-badge.support-no  { background: var(--bg-sunken); color: var(--text-tertiary); }
[data-theme="dark"] .support-status-badge.support-yes { background: rgba(34,197,94,0.15); color: #4ade80; }
[data-theme="dark"] .support-status-badge.support-mid { background: rgba(245,158,11,0.16); color: #fbbf24; }

.support-body { padding: 1.25rem 1.5rem; }
.support-facts {
  display: flex; gap: 2rem; flex-wrap: wrap;
  margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
}
.support-fact { display: flex; flex-direction: column; }
.support-fact-label {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-tertiary); margin-bottom: 0.15rem;
}
.support-fact-value {
  font-family: var(--font-mono); font-size: 1rem; font-weight: 700;
  color: var(--text); font-variant-numeric: tabular-nums;
}

.support-loci { margin-bottom: 1.25rem; }
.support-loci h4 { font-size: 0.82rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--text-secondary); }
.support-locus-row {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.6rem 0.75rem; margin-bottom: 0.4rem;
  background: var(--bg-sunken); border-radius: 6px; font-size: 0.85rem;
}
.support-card.support-yes .support-locus-row { background: rgba(34,197,94,0.04); }
[data-theme="dark"] .support-card.support-yes .support-locus-row { background: rgba(34,197,94,0.06); }
.support-card.support-mid .support-locus-row { background: rgba(245,158,11,0.08); }
[data-theme="dark"] .support-card.support-yes .support-locus-row { background: rgba(34,197,94,0.06); }
[data-theme="dark"] .support-card.support-mid .support-locus-row { background: rgba(245,158,11,0.12); }
.support-locus-range {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.support-locus-detail { font-size: 0.82rem; color: var(--text-secondary); }
.support-locus-detail strong { color: var(--text); font-weight: 600; }
.support-none-detail { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; margin: 0; }
.panel-eqtl-meta { margin-top: 0.25rem; font-size: 0.72rem; color: var(--text-tertiary); }

.support-rule {
  font-size: 0.8rem; color: var(--text-tertiary); line-height: 1.6;
  padding-top: 1rem; border-top: 1px solid var(--border);
}
.support-rule strong { color: var(--text-secondary); }

@media (max-width: 768px) {
  .support-locus-row { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .support-facts { gap: 1.25rem; }
}

/* ── Notes Section ─────────────────────────── */
.notes-section { padding: 2rem 0; }
.notes-card { background: var(--bg-raised); border: 1px solid var(--border); border-left: 4px solid var(--text-tertiary); border-radius: var(--radius); padding: 1.5rem; }
.notes-card h3 { margin-bottom: 0.75rem; }
.notes-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 0.5rem; }
.notes-card p:last-child { margin-bottom: 0; }

/* ── Detail Page Responsive ────────────────── */
@media (max-width: 768px) {
  .page-hero-title { font-size: 1.5rem; }
  .page-hero-metrics { gap: 1.25rem; }
  .page-metric-value { font-size: 1.3rem; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .search-input { max-width: 100%; }
  .result-count { margin-left: 0; }
  .locus-summary { flex-direction: column; align-items: flex-start; }
  .trait-detail-score-val { font-size: 1.5rem; }
  .metadata-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ── Print ─────────────────────────────────── */
@media print {
  .header, .footer, .hero-scroll-hint, .theme-toggle, .hamburger { display: none; }
  .hero { min-height: auto; padding: 2rem; }
  section { padding: 1.5rem 0; break-inside: avoid; }
  .animate-on-scroll { opacity: 1; transform: none; }
}
