/*
 * Risk Propensity Meta-Analysis — Companion Website
 * Design language: risk-research-concept10 (dark, Syne + Space Mono, cyan/magenta/gold)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #0F0F0F;
  --bg-soft: #1A0A1A;
  --text: #FFFFFF;
  --text-muted: #B0B0B0;
  --accent-cyan: #00F0FF;
  --accent-magenta: #FF00E5;
  --accent-gold: #FFD700;
  --border: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(255, 255, 255, 0.03);
  --font-display: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --gradient-hero: linear-gradient(135deg, #00F0FF 0%, #FF00E5 50%, #FFD700 100%);
  --gradient-bar: linear-gradient(90deg, #00F0FF, #FF00E5);
  --shadow-glow: 0 10px 40px rgba(0, 240, 255, 0.2);
  --radius: 20px;
  --radius-lg: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ----- Nav ----- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span { background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--accent-cyan); }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

/* ----- Bubbles (optional, for hero) ----- */
.bubble-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  animation: float 20s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-30px) translateX(20px); }
  50% { transform: translateY(-60px) translateX(-20px); }
  75% { transform: translateY(-30px) translateX(20px); }
}

/* ----- Layout ----- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 1.5rem; position: relative; z-index: 1; }
.section-alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%); }

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-align: center;
}

/* ----- Hero ----- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-content { max-width: 900px; text-align: center; }

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 5s ease infinite;
  margin-bottom: 1.5rem;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-description {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  font-family: var(--font-display);
}

.btn-primary {
  background: var(--gradient-bar);
  color: var(--bg);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-outline:hover {
  background: rgba(0, 240, 255, 0.1);
  transform: translateY(-2px);
}

.scroll-indicator { animation: bounce 2s infinite; }
.scroll-arrow { font-size: 1.75rem; color: var(--accent-cyan); }

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
  60% { transform: translateY(-6px); }
}

/* ----- Audio Player ----- */
.audio-player-section {
  padding: 1.5rem 1.5rem;
  background: transparent;
}

.audio-player-card {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 1rem;
  max-width: 400px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.audio-player-card:hover {
  background: rgba(0, 240, 255, 0.05);
  border-radius: 12px;
}

.audio-player-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.audio-player-header i {
  font-size: 1rem;
  color: var(--accent-cyan);
  opacity: 0.7;
}

.audio-player-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.05em;
}

.audio-player-description {
  display: none;
}

.audio-player-wrapper {
  margin-bottom: 0.5rem;
}

.audio-player {
  width: 100%;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  transition: background 0.3s ease;
}

.audio-player:hover {
  background: rgba(0, 240, 255, 0.08);
}

.audio-player-meta {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin: 0;
  opacity: 0.6;
}

/* ----- Stats ----- */
.stats-section { padding: 5rem 1.5rem; }

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-cyan);
  transform: translateY(-8px);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 800;
  background: var(--gradient-bar);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

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

/* ----- Grid content (theory, aims) ----- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.content-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.content-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.content-card p, .content-card li { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.content-card ul { list-style: none; }
.content-card li { margin-bottom: 0.75rem; padding-left: 1.75rem; position: relative; }
.content-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: 700;
}

/* ----- Tabs ----- */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.25s;
}

.tab-btn:hover { color: var(--accent-cyan); }
.tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sub-tab-content { display: none; }
.sub-tab-content.active { display: block; }

/* ----- Cards (findings, implications) ----- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover { border-color: rgba(0, 240, 255, 0.4); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.finding-card {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(255, 0, 229, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s;
}

.finding-card:hover { border-color: var(--accent-cyan); transform: scale(1.02); }

.finding-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.finding-stat {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.finding-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.finding-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* Outcome accent borders */
.finding-card.positive { border-left: 4px solid #27ae60; }
.finding-card.negative { border-left: 4px solid #e74c3c; }
.finding-card.safety { border-left: 4px solid #e67e22; }
.finding-card.neutral { border-left: 4px solid var(--accent-cyan); }

/* ----- Viz bars (forest, incremental, nomological) ----- */
.viz-section { padding: 5rem 1.5rem; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%); }

.viz-container { max-width: 900px; margin: 0 auto; }

.viz-bars { display: flex; flex-direction: column; gap: 1.75rem; }

.viz-bar-row {
  opacity: 0;
  transform: translateX(-24px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.viz-bar-row.visible {
  opacity: 1;
  transform: translateX(0);
}

.bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bar-name { font-size: 1.05rem; font-weight: 600; }
.bar-value { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--accent-cyan); }

.bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: var(--gradient-bar);
  border-radius: 10px;
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-fill.neg {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

/* Diverging bar (forest / nomological): negative left, positive right */
.bar-track-diverging {
  position: relative;
  height: 10px;
  border-radius: 10px;
  overflow: visible;
}

.bar-zero {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--text-muted);
  opacity: 0.6;
  z-index: 1;
}

.bar-fill-neg {
  position: absolute;
  right: 50%;
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  border-radius: 4px 0 0 4px;
  transform-origin: right;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-fill-pos {
  position: absolute;
  left: 50%;
  height: 100%;
  background: var(--gradient-bar);
  border-radius: 0 4px 4px 0;
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stacked bars (incremental) */
.bar-stack {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  min-width: 120px;
}

.bar-stack-segment {
  height: 100%;
  transition: flex 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-stack-segment.big5 { background: rgba(255,255,255,0.15); }
.bar-stack-segment.rp-strong { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.bar-stack-segment.rp-moderate { background: linear-gradient(90deg, #3498db, #00F0FF); }
.bar-stack-segment.rp-weak { background: rgba(149, 165, 166, 0.6); }

/* ----- PRISMA ----- */
.prisma-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 0;
}

.prisma-slide-meta {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.prisma-step-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--accent-cyan);
  border-radius: 50px;
  color: var(--accent-cyan);
}

.prisma-slides { position: relative; min-height: 320px; }

.prisma-slide {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.prisma-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
  border-color: var(--accent-cyan);
}

.prisma-slide-title { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--text); }
.prisma-slide-text { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1rem; }
.prisma-slide-stats {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.prisma-slide-stats p { margin: 0.4rem 0; font-size: 0.9rem; color: var(--text-muted); }
.prisma-slide-stats strong { color: var(--accent-cyan); font-family: var(--font-mono); }

.prisma-slide-list { list-style: none; margin: 0.75rem 0; }
.prisma-slide-list li {
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.prisma-slide-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: 700;
}

.prisma-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.prisma-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s;
}

.prisma-dot:hover { background: rgba(0, 240, 255, 0.3); transform: scale(1.2); }
.prisma-dot.active { background: var(--accent-cyan); transform: scale(1.2); }

/* ----- Subgroup ----- */
.subgroup-filters {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 1rem;
}

.filter-group { max-width: 420px; width: 100%; }
.filter-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.filter-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:hover, .filter-select:focus {
  border-color: var(--accent-cyan);
  outline: none;
}

.subgroup-results-container { margin-top: 1.5rem; }

.subgroup-loading, .subgroup-no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.subgroup-outcome-section { margin-bottom: 2.5rem; }

.subgroup-outcome-header {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(255, 0, 229, 0.1));
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem 1.5rem;
  margin-bottom: 0;
}

.subgroup-outcome-header h4 { font-size: 1.2rem; color: var(--text); margin: 0; }

.subgroup-moderator-group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.subgroup-moderator-header {
  padding: 0.9rem 1.25rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--accent-cyan);
  font-size: 1rem;
}

.subgroup-levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

.subgroup-level-card {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s;
  position: relative;
}

.subgroup-level-card:hover { border-color: var(--accent-cyan); }
.subgroup-level-card.overall {
  border-color: var(--accent-magenta);
  background: linear-gradient(135deg, rgba(255, 0, 229, 0.1), transparent);
}

.subgroup-level-name { font-weight: 700; color: var(--text); margin-bottom: 0.5rem; font-size: 0.95rem; }
.subgroup-level-card.overall .subgroup-level-name { color: var(--accent-magenta); }

.subgroup-effect-size { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.subgroup-rho { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; color: var(--accent-cyan); }
.subgroup-ci { font-size: 0.85rem; color: var(--text-muted); }

.subgroup-effect-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin: 0.5rem 0;
  overflow: hidden;
}

.subgroup-effect-bar-fill {
  height: 100%;
  background: var(--gradient-bar);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.subgroup-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.subgroup-stat { font-size: 0.8rem; }
.subgroup-stat-label { color: var(--text-muted); display: block; margin-bottom: 0.2rem; }
.subgroup-stat-value { color: var(--text); font-weight: 600; }

.subgroup-significance {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.subgroup-significance.significant { background: rgba(39, 174, 96, 0.25); color: #2ecc71; }
.subgroup-significance.non-significant { background: rgba(230, 126, 34, 0.25); color: #e67e22; }

/* ----- Practitioner / implications ----- */
.practitioner-card {
  border-left: 4px solid var(--accent-cyan);
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.practitioner-card.safety { border-left-color: #e67e22; }
.practitioner-card.positive { border-left-color: #27ae60; }
.practitioner-card.negative { border-left-color: #e74c3c; }

.practitioner-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.practitioner-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 0.5rem; }

/* ----- CTA ----- */
.cta-section { padding: 5rem 1.5rem; text-align: center; }
.cta-content { max-width: 700px; margin: 0 auto; }
.cta-title { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 800; margin-bottom: 1rem; letter-spacing: -0.02em; }
.cta-text { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 1.6; }

/* ----- Footer ----- */
footer {
  background: rgba(0,0,0,0.4);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 2rem;
}

footer h4 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--text); }
footer p, footer li { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
footer ul { list-style: none; }
footer a { color: var(--accent-cyan); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ----- Resources page: table ----- */
.resource-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.resource-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.resource-table th, .resource-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.resource-table th {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
  font-weight: 600;
  font-family: var(--font-mono);
}

.resource-table tr:hover { background: rgba(255,255,255,0.03); }
.resource-table td { color: var(--text-muted); }
.bias-sig { color: #e74c3c; font-weight: 700; }

.search-term {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  background: rgba(0,0,0,0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: block;
  margin-top: 0.25rem;
}

/* ----- LLM comparison (radar alternative: dimension bars) ----- */
.llm-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.llm-outcome-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.llm-outcome-panel h4 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--text); }

.llm-dim-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.llm-dim-label { font-size: 0.85rem; color: var(--text-muted); min-width: 110px; }
.llm-dim-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.llm-dim-fill {
  height: 100%;
  background: var(--gradient-bar);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.llm-dim-value { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-cyan); min-width: 2.5rem; }

/* ----- Supplements ----- */
.supp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.measure-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.measure-card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--accent-cyan); }
.measure-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.4rem; }

.prompt-block {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.active { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 1rem; gap: 1rem; }
  .mobile-menu-btn { display: block; }
  .stats-container { grid-template-columns: repeat(2, 1fr); }
  .findings-grid, .grid-3 { grid-template-columns: 1fr; }
  .subgroup-levels-grid { grid-template-columns: 1fr; }
  .subgroup-stats { grid-template-columns: 1fr; }
  .hero { min-height: 80vh; padding: 3rem 1rem; }
  .section { padding: 3rem 1rem; }
}

/* ----- Typing Animation Cursor ----- */
.cursor {
  display: inline-block;
  width: 3px;
  height: 1em; /* Scales with font size */
  background-color: var(--accent-cyan);
  margin-left: 5px;
  vertical-align: text-bottom;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ----- ORCID Button ----- */
.orcid-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.25s;
}

.orcid-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ----- NSF Logo Subtle ----- */
.nsf-logo-subtle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  opacity: 0.5;
  transition: opacity 0.3s;
  z-index: 100;
}

.nsf-logo-subtle:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .nsf-logo-subtle {
    bottom: 1rem;
    right: 1rem;
  }
}
