/* ==========================================================================
   Shō Styles — Premium Dark Slate & Emerald/Teal Theme
   ========================================================================== */

/* ==========================================================================
   Onboarding Overlay
   ========================================================================== */
.onboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.onboard-overlay.dismissed {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.onboard-slides {
  position: relative;
  width: 860px;
  max-width: 90vw;
  height: 520px;
}

.onboard-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(255,255,255,0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.onboard-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Background visuals */
.onboard-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
  z-index: 0;
}

.onboard-bg-logo {
  object-fit: contain;
  opacity: 0.2;
  padding: 15%;
}

/* Slide content */
.onboard-body {
  position: relative;
  z-index: 1;
  padding: 3rem 3.5rem;
  max-width: 100%;
}

.onboard-slide.active .onboard-body {
  animation: onboardBlurIn 0.7s ease-out both;
}

@keyframes onboardBlurIn {
  0% {
    filter: blur(12px);
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
  }
}

.onboard-label {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.onboard-body h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.85rem;
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255,255,255,0.92);
  margin: 0 0 1.25rem;
}

.onboard-body h2 strong {
  font-weight: 700;
  color: #fff;
}

.onboard-body h2 a {
  color: #34d399;
  text-decoration: none;
  border-bottom: 1px solid rgba(52,211,153,0.3);
  transition: border-color 0.2s;
}

.onboard-body h2 a:hover {
  border-bottom-color: #34d399;
}

.onboard-body p {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  margin: 0 0 1.25rem;
}

.onboard-kicker {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #34d399;
  opacity: 0;
  animation-fill-mode: forwards;
}

.onboard-slide.active .onboard-kicker {
  animation: onboardBlurIn 0.7s ease-out 0.3s forwards;
}

/* Controls */
.onboard-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.onboard-dots {
  display: flex;
  gap: 10px;
}

.onboard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}

.onboard-dot.active {
  background: #34d399;
  border-color: #34d399;
  transform: scale(1.3);
}

.onboard-dot:hover {
  border-color: #34d399;
}

.onboard-next-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #030712;
  background: #34d399;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.onboard-next-btn:hover {
  background: #6ee7b7;
  transform: translateY(-1px);
}

.onboard-skip-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.25);
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  white-space: nowrap;
}

.onboard-skip-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

:root {
  --bg-app: #030712;
  --bg-sidebar: rgba(17, 24, 39, 0.7);
  --bg-card: rgba(17, 24, 39, 0.45);
  --bg-card-hover: rgba(31, 41, 55, 0.6);
  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.09);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --emerald: #10b981;
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --red: #ef4444;
  --yellow: #f59e0b;
  
  --accent-gradient: linear-gradient(135deg, #10b981, #06b6d4);
  --accent-gradient-glow: rgba(16, 185, 129, 0.15);
  
  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-blur: blur(16px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Base resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  background-image: radial-gradient(circle at 50% -20%, rgba(20, 184, 166, 0.08), transparent 70%);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar styling */
.app-sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-shrink: 0;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.brand-logo {
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.3));
}

.brand-logo-video {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.25));
}

/* Home hero background video */
.home-hero {
  position: relative;
  overflow: hidden;
}

.hero-bg-video {
  position: absolute;
  top: 50%;
  right: -5%;
  transform: translateY(-50%);
  width: 55%;
  height: auto;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to right, transparent 0%, black 40%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
}

.home-hero .tab-title-wrap,
.home-hero .tab-how-to {
  position: relative;
  z-index: 1;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  display: block;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  margin-right: -12px;
  padding-right: 12px;
}

.nav-item {
  background: none;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.nav-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
  transition: var(--transition);
  color: var(--text-secondary);
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: var(--border);
}

.nav-item:hover .nav-icon {
  color: var(--text-primary);
  transform: scale(1.05);
}

.nav-item.active {
  background-color: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--teal);
}

.nav-item.active .nav-icon {
  color: var(--teal);
  filter: drop-shadow(0 0 4px rgba(20, 184, 166, 0.4));
}

.sidebar-footer {
  margin-top: auto;
}

.datasource-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 11px;
  color: var(--text-muted);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
}

/* Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: clip;
  position: relative;
  min-height: 0;
}

.tab-content {
  display: none;
  flex-direction: column;
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 40px;
  min-height: 0;
}

.tab-content.active {
  display: flex;
  animation: subtleBlurIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes subtleBlurIn {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(2px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.tab-header {
  margin-bottom: 32px;
}

.tab-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.tab-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.search-form-card {
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.search-form-card:hover {
  border-color: rgba(20, 184, 166, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(20, 184, 166, 0.05);
}

.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flex-2 { flex: 2; }

.form-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.form-group input {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.btn-primary {
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  color: white;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  height: 50px;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.quick-supplement-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pills-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.pill-btn {
  background: none;
  border: 1px dashed var(--border-hover);
  border-radius: 100px;
  padding: 4px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.pill-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background-color: rgba(20, 184, 166, 0.05);
}

/* Chat Layout */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: calc(100vh - 200px);
  box-shadow: var(--glass-shadow);
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.message {
  display: flex;
  gap: 16px;
  max-width: 85%;
  animation: messageFade 0.3s ease;
}

.message.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background-color: var(--bg-app);
  border: 1px solid var(--border);
}

.message.user-message .message-avatar {
  background: var(--accent-gradient);
}

.message-bubble {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.6;
}

.system-message .message-bubble {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.user-message .message-bubble {
  background-color: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.2);
  color: var(--text-primary);
}

.chat-suggestions {
  margin-top: 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-suggestions li {
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  color: var(--text-secondary);
}

.chat-suggestions li:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--teal);
  border-color: rgba(20, 184, 166, 0.3);
}

.chat-input-area {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
}

.chat-input-box {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 18px;
  transition: var(--transition);
}

.chat-input-box:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.chat-input-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  padding: 10px 0;
}

.chat-input-box button {
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  color: white;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.chat-input-box button:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.chat-input-box button:active {
  transform: scale(0.96);
}

.btn-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
  transition: var(--transition);
}

.chat-input-box button:hover .btn-icon {
  transform: translateX(1px) translateY(-1px);
}

/* Markdown response styling inside chat */
.message-bubble h3 {
  font-size: 15px;
  font-weight: 700;
  margin-top: 14px;
  margin-bottom: 6px;
  color: var(--teal);
}

.message-bubble h3:first-of-type {
  margin-top: 0;
}

.message-bubble p {
  margin-bottom: 10px;
}

.message-bubble ul {
  margin-left: 20px;
  margin-bottom: 10px;
}

.message-bubble li {
  margin-bottom: 4px;
}

.message-bubble code {
  font-family: var(--font-mono);
  background-color: rgba(255, 255, 255, 0.06);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 12px;
  color: #fb7185;
}

.message-bubble a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.message-bubble a:hover {
  text-decoration: underline;
}

/* Loader Styles */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Trial Finder Results list */
.trial-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  animation: fadeUp 0.3s ease;
}

.trial-results-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.results-count {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background-color: rgba(255,255,255,0.03);
  padding: 4px 10px;
  border-radius: 100px;
}

.trial-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trial-card {
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  animation: fadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.trial-card:hover {
  border-color: rgba(20, 184, 166, 0.2);
  background-color: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(20, 184, 166, 0.05);
}

.trial-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.trial-card-header h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.trial-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-id { background-color: rgba(6, 182, 212, 0.1); color: var(--cyan); }
.badge-status { background-color: rgba(16, 185, 129, 0.1); color: var(--emerald); }
.badge-phase { background-color: rgba(245, 158, 11, 0.1); color: var(--yellow); }

.trial-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.trial-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 12px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.trial-meta-item strong {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 2px;
}

.trial-meta-item span {
  color: var(--text-secondary);
}

/* Supplement Myth Buster Report */
.myth-report {
  animation: fadeUp 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-card {
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.report-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.verdict-card {
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--teal);
}

.verdict-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verdict-badge.rating-high { background-color: rgba(16, 185, 129, 0.15); color: var(--emerald); }
.verdict-badge.rating-medium { background-color: rgba(245, 158, 11, 0.15); color: var(--yellow); }
.verdict-badge.rating-low,
.verdict-badge.rating-none { background-color: rgba(239, 68, 68, 0.15); color: var(--red); }

.report-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.verdict-summary {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  max-width: 90%;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.report-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-row {
  display: flex;
  font-size: 13px;
}

.profile-row strong {
  width: 140px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-row span {
  color: var(--text-secondary);
}

.stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  text-decoration: none;
  transition: var(--transition);
  display: block;
}

a.stat-card:hover {
  background-color: rgba(20, 184, 166, 0.05);
  border-color: rgba(20, 184, 166, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.15);
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--teal);
  display: block;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.sub-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.trials-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trials-bullet-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 14px;
  position: relative;
}

.trials-bullet-list li::before {
  content: "•";
  color: var(--teal);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.full-width {
  grid-column: 1 / -1;
}

.pubmed-studies-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.study-item {
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

a.study-item {
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

a.study-item:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.study-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

a.study-item .study-title {
  color: var(--cyan);
  transition: var(--transition);
}

a.study-item:hover .study-title {
  color: var(--teal);
}

.study-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Animations */
@keyframes messageFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Interactivity & Links */
.btn-trial-link {
  background-color: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.2);
  color: var(--teal);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-trial-link:hover {
  background-color: var(--teal);
  color: white;
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
  transform: translateY(-1px);
}

a.badge-id {
  text-decoration: none;
  transition: var(--transition);
}

a.badge-id:hover {
  background-color: rgba(6, 182, 212, 0.2);
  box-shadow: 0 2px 6px rgba(6, 182, 212, 0.2);
}

.study-link {
  color: var(--cyan);
  text-decoration: none;
  transition: var(--transition);
}

.study-link:hover {
  text-decoration: underline;
  color: var(--teal);
}

/* ==========================================================================
   Advanced Features Styling
   ========================================================================== */

/* Trial Finder Filters */
.filters-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-select, .filter-input {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.filter-select option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

/* 3D Molecule Viewer */
.molecule-viewer {
  background-color: #05070c;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 0;
}

.bookmark-icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: transparent;
  transition: var(--transition);
}

.bookmark-btn:hover {
  color: var(--yellow);
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

.bookmark-btn:hover .bookmark-icon {
  transform: scale(1.1) rotate(15deg);
  fill: rgba(245, 158, 11, 0.2);
}

.bookmark-btn.active {
  color: var(--yellow);
  background-color: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}

.bookmark-btn.active .bookmark-icon {
  fill: var(--yellow);
  filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.5));
}

/* Comparison Layout */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

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

.comparison-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Interaction Verdict Styles */
.interaction-verdict-card {
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--border);
  margin-bottom: 20px;
  transition: var(--transition);
}

.interaction-verdict-card.severity-severe {
  border-left-color: var(--red);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.1);
}

.interaction-verdict-card.severity-high {
  border-left-color: var(--red);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.1);
}

.interaction-verdict-card.severity-moderate {
  border-left-color: var(--yellow);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.1);
}

.interaction-verdict-card.severity-minimal {
  border-left-color: var(--emerald);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

/* Library Filters */
.library-filters {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.lib-tab-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.lib-tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.lib-tab-btn.active {
  background-color: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--teal);
}

.lib-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.lib-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* External Roster Links Buttons */
.view-all-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  width: 100%;
}

.view-all-btn {
  background-color: rgba(6, 182, 212, 0.08);
  border: 1px dashed rgba(6, 182, 212, 0.3);
  color: var(--cyan);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.view-all-btn:hover {
  background-color: var(--cyan);
  color: white;
  border-style: solid;
  border-color: var(--cyan);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
  transform: translateY(-2px);
}

.view-all-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   Collapsible Sidebar Groups
   ========================================================================== */
.nav-group {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.nav-group:last-child {
  border-bottom: none;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.nav-group-header:hover {
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.02);
}

.group-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-group.collapsed .group-chevron {
  transform: rotate(-90deg);
}

.nav-group-items {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 1;
}

.nav-group.collapsed .nav-group-items {
  max-height: 0;
  opacity: 0;
}

/* ==========================================================================
   How-to Hero Banners (Visual)
   ========================================================================== */
.tab-how-to {
  display: flex;
  align-items: stretch;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  min-height: 140px;
  position: relative;
}

.how-to-visual {
  width: 180px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.how-to-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.how-to-visual::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(to left, var(--bg-card), transparent);
  pointer-events: none;
}

.how-to-body {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.how-to-headline {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.how-to-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 520px;
}

.how-to-desc strong {
  color: var(--teal);
  font-weight: 700;
}

.how-to-caveat {
  font-size: 11.5px;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.7;
}

.how-to-steps {
  display: flex;
  gap: 20px;
  margin-top: 6px;
}

.how-to-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.how-to-step .step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.25);
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .how-to-visual {
    display: none;
  }
}

.how-to-icon {
  display: none;
}

.section-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

/* ==========================================================================
   Home Guide Grid
   ========================================================================== */
/* Pitch Slideshow */
.pitch-slideshow {
  position: relative;
  margin: 0 0 2rem;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  height: 280px;
}

.pitch-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.pitch-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Background visuals */
.slide-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slide-bg-img,
.slide-bg-video {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 120%;
  width: auto;
  max-width: 55%;
  object-fit: cover;
  opacity: 0.15;
  mask-image: linear-gradient(to right, transparent 0%, black 40%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
}

/* Content with blur-in animation */
.slide-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 3rem;
  max-width: 65%;
}

.pitch-slide.active .slide-content {
  animation: blurIn 0.8s ease-out both;
}

@keyframes blurIn {
  0% {
    filter: blur(8px);
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(52, 211, 153, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.slide-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}

.slide-content strong {
  color: var(--text-primary);
}

.slide-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.slide-content a:hover {
  border-bottom-color: var(--accent);
}

.slide-stat {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0;
  animation: none;
}

.pitch-slide.active .slide-stat {
  animation: blurIn 0.8s ease-out 0.4s both;
}

/* Navigation dots */
.slide-nav {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}

.slide-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.3);
}

.slide-dot:hover {
  border-color: var(--accent);
}

/* Progress bar */
.slide-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.05);
  z-index: 2;
}

.slide-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

.slide-bg-logo {
  opacity: 0.25;
  max-width: 40%;
  right: 5%;
  mask-image: none;
  -webkit-mask-image: none;
}

#tab-home { position: relative; }

.grid-bg-video {
  position: fixed;
  top: 0;
  left: 260px;
  width: calc(100% - 260px);
  height: 100vh;
  object-fit: cover;
  transform: scale(1.1);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 15%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 15%, transparent 60%);
}

.home-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.guide-card {
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.guide-card:hover {
  border-color: rgba(20, 184, 166, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(20, 184, 166, 0.05);
}

.guide-card-icon {
  width: 28px;
  height: 28px;
  color: var(--teal);
  filter: drop-shadow(0 0 6px rgba(20, 184, 166, 0.3));
}

.guide-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.guide-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.quick-link-btn {
  align-self: flex-start;
  margin-top: auto;
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.2);
  color: var(--teal);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.quick-link-btn:hover {
  background-color: var(--teal);
  color: white;
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25);
  transform: translateY(-1px);
}

/* ==========================================================================
   Gene Body Map
   ========================================================================== */
.bodymap-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.bodymap-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.bodymap-bar-label {
  width: 200px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bodymap-bar-container {
  flex: 1;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bodymap-bar {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 2px;
}

.bodymap-bar-row.top-tissue .bodymap-bar {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.bodymap-bar-row.top-tissue .bodymap-bar-label {
  color: var(--teal);
}

.bodymap-bar-value {
  width: 70px;
  flex-shrink: 0;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.bodymap-gene-header {
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.bodymap-gene-header h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.bodymap-gene-header p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.bodymap-gene-meta {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ==========================================================================
   FDA Safety Watch
   ========================================================================== */
.fda-report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

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

.fda-reactions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fda-reaction-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fda-reaction-name {
  width: 180px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: capitalize;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fda-reaction-bar-container {
  flex: 1;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  overflow: hidden;
}

.fda-reaction-bar {
  height: 100%;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 2px;
}

.fda-reaction-count {
  width: 70px;
  flex-shrink: 0;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: right;
}

.fda-recalls-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fda-recall-card {
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
}

.fda-recall-card .recall-class-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 100px;
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--red);
  margin-bottom: 8px;
}

.fda-recall-card .recall-reason {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.fda-recall-card .recall-meta {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.fda-label-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.fda-label-section {
  background-color: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.fda-label-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yellow);
  margin-bottom: 8px;
}

.fda-label-section p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   3D Visualizer Layout
   ========================================================================== */
.visualizer-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-top: 20px;
}

@media (max-width: 1000px) {
  .visualizer-layout {
    grid-template-columns: 1fr;
  }
}

.style-controls {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.style-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.style-btn:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.style-btn.active {
  background-color: rgba(20, 184, 166, 0.1);
  border-color: rgba(20, 184, 166, 0.3);
  color: var(--teal);
}

.viz-properties {
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  height: fit-content;
}

.viz-properties h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

/* ==========================================================================
   Explain My DNA
   ========================================================================== */
.dna-conditions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dna-condition-tag {
  display: inline-block;
  background-color: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--yellow);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
}

.verdict-card.dna-significance-pathogenic {
  border-left: 4px solid var(--red);
}

.dna-significance-pathogenic .verdict-badge {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.verdict-card.dna-significance-benign {
  border-left: 4px solid var(--emerald);
}

.dna-significance-benign .verdict-badge {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
}

.verdict-card.dna-significance-vus {
  border-left: 4px solid var(--yellow);
}

.dna-significance-vus .verdict-badge {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--yellow);
}

.error-msg-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-size: 13px;
}

/* gnomAD Population Frequency Styles */
.gnomad-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: -4px 0 12px;
}
.gnomad-rarity-badge { margin-bottom: 10px; }
.rarity-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}
.rarity-common { background: rgba(52,211,153,0.12); color: #34d399; }
.rarity-low { background: rgba(251,191,36,0.12); color: #fbbf24; }
.rarity-rare { background: rgba(251,146,60,0.12); color: #fb923c; }
.rarity-ultrarare { background: rgba(239,68,68,0.12); color: #ef4444; }
.rarity-unknown { background: rgba(255,255,255,0.05); color: var(--text-muted); }

.gnomad-global-line {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.gnomad-global-line strong { color: var(--text-primary); }
.gnomad-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.gnomad-pop-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gnomad-pop-row {
  display: grid;
  grid-template-columns: 180px 1fr 60px;
  align-items: center;
  gap: 10px;
}
.gnomad-pop-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gnomad-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}
.gnomad-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.gnomad-pop-pct {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
  font-family: 'Roboto Mono', monospace;
}

.error-icon {
  width: 16px;
  height: 16px;
}

.avatar-icon {
  width: 18px;
  height: 18px;
}

.flex-1 { flex: 1; }

.fda-no-data {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 0;
  font-style: italic;
}

/* ==========================================================================
   Visualizer Context Panels (Legend, Description, Link)
   ========================================================================== */
.viz-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 8px;
}

.viz-legend-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.viz-atom {
  font-size: 12px;
  color: var(--atom-color, var(--text-secondary));
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.viz-what-is {
  border-left: 3px solid var(--teal);
}

.viz-what-is h3 {
  margin-bottom: 8px;
}

.viz-description-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.viz-pubchem-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  transition: opacity 0.2s;
}

.viz-pubchem-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ==========================================================================
   Dig Deeper External Links
   ========================================================================== */
.dig-deeper-link {
  margin-top: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.06), rgba(6, 182, 212, 0.04));
  border: 1px solid rgba(20, 184, 166, 0.15);
  border-radius: var(--radius-md);
  text-align: center;
}

.dig-deeper-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  transition: all 0.2s;
}

.dig-deeper-link a:hover {
  color: var(--cyan);
  text-decoration: underline;
}

.dig-deeper-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ==========================================================================
   Protein Explorer
   ========================================================================== */
.protein-profile { display: flex; flex-direction: column; gap: 20px; }
.protein-header-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px 28px;
}
.protein-meta { margin-bottom: 16px; }
.protein-meta h2 { font-size: 1.4rem; color: var(--text-primary); margin: 0 0 8px; }
.protein-accession, .protein-length {
  display: inline-block; font-size: 0.75rem; font-family: 'Roboto Mono', monospace;
  background: rgba(52,211,153,0.1); color: #34d399;
  padding: 3px 10px; border-radius: 6px; margin-right: 8px;
}
.protein-accession a { color: #34d399; text-decoration: none; }
.protein-accession a:hover { text-decoration: underline; }
#protein-function { font-size: 0.9rem; line-height: 1.7; color: var(--text-secondary); }
.protein-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.protein-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.protein-card h3 {
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
  margin-bottom: 4px; display: flex; align-items: center; gap: 8px;
}
.card-subtitle {
  font-size: 0.75rem; color: var(--text-secondary); margin: 0 0 12px; line-height: 1.4; opacity: 0.7;
}
.protein-card .card-icon { width: 16px; height: 16px; color: #34d399; }
.protein-card .tag {
  display: inline-block; font-size: 0.75rem;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-secondary); padding: 4px 10px; border-radius: 6px; margin: 3px 4px 3px 0;
}
.protein-card .disease-item { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.protein-card .disease-item:last-child { border-bottom: none; }
.protein-card .disease-name { font-size: 0.85rem; font-weight: 600; color: #f87171; margin-bottom: 4px; }
.protein-card .disease-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.protein-structure-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.protein-structure-section h3 {
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.structure-caption { font-size: 0.75rem; color: var(--text-muted); margin-top: 12px; text-align: center; }

/* --- Protein Explorer: Redesigned Search & Empty State --- */
.protein-search-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.protein-search-card {
  padding: 0 !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  overflow: hidden;
}
.search-form-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 6px 6px 18px;
}
.search-field-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-form-inner input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 14px 12px !important;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
}
.search-form-inner .btn-primary {
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.featured-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.featured-label-icon {
  width: 14px;
  height: 14px;
  color: var(--teal);
}

.protein-featured-grid,
.pipeline-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.protein-featured-card,
.pipeline-featured-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
  color: inherit;
  font-family: inherit;
}
.protein-featured-card:hover,
.pipeline-featured-card:hover {
  border-color: var(--teal);
  background: rgba(52, 211, 153, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.08);
}
.pf-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(52,211,153,0.12), rgba(99,102,241,0.12));
  flex-shrink: 0;
}
.pf-icon {
  width: 20px;
  height: 20px;
  color: var(--teal);
}
.pf-body { display: flex; flex-direction: column; gap: 4px; }
.pf-gene {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.03em;
}
.pf-hook {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Chart header for body map */
.bodymap-chart-header {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-style: italic;
}

/* ==========================================================================
   Drug Pipeline
   ========================================================================== */
.pipeline-disease-header {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px 28px; margin-bottom: 20px;
}
.pipeline-disease-header h2 { font-size: 1.3rem; color: var(--text-primary); margin: 0 0 8px; }
.pipeline-disease-header p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.pipeline-sections { display: flex; flex-direction: column; gap: 20px; }
.pipeline-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 24px;
}
.pipeline-section h3 {
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.pipeline-drug-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px;
}
.drug-card {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px;
}
.drug-card .drug-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.drug-card .drug-type {
  font-size: 0.7rem; display: inline-block; background: rgba(52,211,153,0.1);
  color: #34d399; padding: 2px 8px; border-radius: 4px; margin-bottom: 8px;
}
.drug-card .drug-mechanism { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.5; }
.drug-card .drug-phase { font-size: 0.75rem; font-weight: 600; }
.drug-phase.phase-4, .drug-phase.approved { color: #34d399; }
.drug-phase.phase-3 { color: #60a5fa; }
.drug-phase.phase-2 { color: #fbbf24; }
.drug-phase.phase-1 { color: #f97316; }
.pipeline-target-list { display: flex; flex-direction: column; gap: 8px; }
.target-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: 8px;
}
.target-symbol {
  font-family: 'Roboto Mono', monospace; font-size: 0.85rem;
  font-weight: 700; color: #34d399; min-width: 80px;
}
.target-name { font-size: 0.8rem; color: var(--text-secondary); flex: 1; }
.target-score { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.target-score-bar {
  width: 60px; height: 4px; background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden;
}
.target-score-fill { height: 100%; background: #34d399; border-radius: 2px; }
.empty-note { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }

/* ==========================================================================
   Medical Disclaimers
   ========================================================================== */
.onboard-disclaimer {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 700px;
  text-align: center;
  font-size: 0.65rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.35);
  z-index: 10;
}

.sidebar-disclaimer {
  font-size: 0.65rem;
  line-height: 1.5;
  color: var(--text-muted);
  opacity: 0.6;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.home-disclaimer {
  margin-top: 32px;
  padding: 16px 20px;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text-muted);
  opacity: 0.5;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Chat Tables, Tips & Cross-Links
   ========================================================================== */
.chat-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 0.82rem;
  border-radius: 8px;
  overflow: hidden;
}
.chat-table th,
.chat-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.chat-table th {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.chat-table tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}
.chat-table tr:last-child td {
  border-bottom: none;
}

.chat-tip {
  margin: 12px 0 4px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.tab-cross-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 1px dotted var(--accent);
  transition: opacity 0.15s;
}
.tab-cross-link:hover {
  opacity: 0.8;
}

.chat-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

/* ==========================================================================
   Disclaimers & Context Banners (FAERS, DNA, etc.)
   ========================================================================== */
.faers-disclaimer,
.dna-context-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 14px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.faers-disclaimer .disclaimer-icon,
.dna-context-banner .disclaimer-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  opacity: 0.6;
}

/* ==========================================================================
   Sidebar About Link
   ========================================================================== */
.sidebar-about-link {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.sidebar-about-link .nav-item {
  opacity: 0.65;
  font-size: 0.78rem;
}
.sidebar-about-link .nav-item:hover { opacity: 1; }

/* ==========================================================================
   About & Sources Page
   ========================================================================== */
.about-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 860px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
}
.about-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-icon {
  width: 20px;
  height: 20px;
  color: var(--teal);
  flex-shrink: 0;
}
.about-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.about-card p:last-child { margin-bottom: 0; }
.about-card a {
  color: var(--teal);
  text-decoration: none;
}
.about-card a:hover { text-decoration: underline; }

/* Origin card accent */
.about-origin {
  border-left: 3px solid var(--teal);
}

/* Methodology steps */
.about-method-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
}
.about-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.about-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--accent));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.about-note {
  font-style: italic;
  opacity: 0.8;
  font-size: 0.82rem !important;
  margin-top: 4px !important;
}

/* Database directory grid */
.about-db-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 16px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-db-row {
  display: grid;
  grid-template-columns: 140px 200px 1fr;
  gap: 0;
  padding: 14px 18px;
  background: rgba(255,255,255,0.015);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.about-db-row:last-child { border-bottom: none; }
.about-db-row:hover { background: rgba(52, 211, 153, 0.03); }
.about-db-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal);
  font-family: 'Roboto Mono', monospace;
}
.about-db-org {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 2px;
}
.about-db-what {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Built on card */
.about-built-on {
  background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(52,211,153,0.05));
  border-color: rgba(99,102,241,0.15);
}
.about-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Disclaimer card */
.about-disclaimer-card {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.03);
}
.about-not-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 18px;
}
.about-not-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.about-not-icon {
  width: 16px;
  height: 16px;
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 2px;
}
.about-disclaimer-final {
  font-weight: 600;
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* External links row */
.about-links-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.about-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.25s ease;
}
.about-link-card:hover {
  border-color: var(--teal);
  background: rgba(52, 211, 153, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.08);
}
.about-link-icon {
  width: 20px;
  height: 20px;
  color: var(--teal);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   AI Context Card (Gemini)
   ══════════════════════════════════════════════════════════════ */
.ai-context-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.06));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 16px;
}

.ai-context-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.ai-context-header strong {
  color: var(--text-primary);
  font-size: 15px;
}

.ai-icon {
  width: 18px;
  height: 18px;
  color: var(--violet);
}

.ai-badge {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: auto;
}

.ai-context-body {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.ai-context-body p {
  margin-bottom: 8px;
}

.ai-context-body strong {
  color: var(--text-primary);
}

.ai-context-body a {
  color: var(--teal);
  text-decoration: none;
}

.ai-context-body a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════
   Protein Function — Plain English + Raw Collapsible
   ══════════════════════════════════════════════════════════════ */
.protein-func-plain {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}

.protein-func-plain p {
  margin-bottom: 8px;
}

.protein-func-plain strong {
  color: var(--text-primary);
}

.protein-raw-details {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.protein-raw-details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  user-select: none;
}

.protein-raw-details summary:hover {
  color: var(--text-secondary);
}

.protein-raw-text {
  margin-top: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
  word-break: break-word;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
}

.protein-raw-text::-webkit-scrollbar {
  width: 6px;
}

.protein-raw-text::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Cross-link styles — inter-tool navigation */
.cross-link {
  font-size: 0.78rem; font-weight: 500; color: #34d399; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; transition: all 0.2s;
}
.cross-link:hover { color: #6ee7b7; text-decoration: underline; }
.cross-link-icon { width: 13px; height: 13px; flex-shrink: 0; }
.cross-link-sm {
  font-size: 0.72rem; font-weight: 500; color: #34d399; text-decoration: none;
  display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px;
  background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.15);
  border-radius: 6px; transition: all 0.2s; white-space: nowrap;
}
.cross-link-sm:hover { background: rgba(52, 211, 153, 0.18); border-color: rgba(52, 211, 153, 0.3); color: #6ee7b7; }
.cross-link-sm .cross-link-icon { width: 12px; height: 12px; }
.drug-card-links { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.disease-crosslink-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); flex-wrap: wrap; }
.disease-crosslink-item:last-child { border-bottom: none; }
.disease-crosslink-actions { display: flex; gap: 6px; }
a.target-symbol { color: #34d399; text-decoration: none; font-weight: 700; }
a.target-symbol:hover { color: #6ee7b7; text-decoration: underline; }
a.dna-condition-tag { cursor: pointer; transition: all 0.2s; }
a.dna-condition-tag:hover { background: rgba(52, 211, 153, 0.15); border-color: rgba(52, 211, 153, 0.3); color: #34d399; }

/* ==========================================================================
   Card Subtitles
   ========================================================================== */
.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: -4px 0 16px;
  line-height: 1.5;
}

/* ==========================================================================
   Empty States
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-icon { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; max-width: 400px; margin: 0 auto; }

/* ==========================================================================
   Research Radar — Paper Cards
   ========================================================================== */
.radar-summary {
  margin-bottom: 20px;
}

.radar-summary-text {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.radar-paper-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.radar-paper-card {
  padding: 20px;
}

.paper-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.paper-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
}

.paper-oa-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  white-space: nowrap;
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.paper-journal {
  font-weight: 700;
  color: var(--cyan);
}

.paper-citations {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-icon { width: 12px; height: 12px; }

.paper-authors {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-style: italic;
}

.paper-abstract {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.paper-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Claim Checker — Verdict Cards
   ========================================================================== */
.claim-verdict {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.claim-verdict-strong {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

.claim-verdict-moderate {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.2);
}

.claim-verdict-weak {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
}

.claim-verdict-none {
  background: rgba(100, 116, 139, 0.06);
  border-color: rgba(100, 116, 139, 0.2);
}

.verdict-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.verdict-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-top: 2px;
}

.claim-verdict-strong .verdict-icon { color: var(--emerald); }
.claim-verdict-moderate .verdict-icon { color: var(--yellow); }
.claim-verdict-weak .verdict-icon { color: var(--red); }
.claim-verdict-none .verdict-icon { color: var(--text-muted); }

.verdict-label {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.verdict-claim {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

.verdict-detail {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   Disease Deep Dive — Trial Mini Cards
   ========================================================================== */
.trial-mini-card {
  padding: 16px;
}

.trial-mini-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.4;
}

.trial-mini-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.trial-phase-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
}

.trial-status-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
}

.trial-mini-conditions {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 6px;
}

.trial-mini-locations {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
}

/* ==========================================================================
   MOBILE HEADER & SIDEBAR DRAWER (hidden on desktop)
   ========================================================================== */
.mobile-header {
  display: none;
}

.sidebar-overlay {
  display: none;
}

/* ==========================================================================
   MOBILE RESPONSIVE — 768px and below
   ========================================================================== */
@media (max-width: 768px) {

  /* Mobile header bar */
  .mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
  }

  .mobile-menu-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu-btn svg { width: 20px; height: 20px; }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-brand .brand-logo-img { width: 28px; height: 28px; }
  .mobile-brand .brand-name { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

  /* App layout — stack vertically */
  .app-layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  /* Sidebar as drawer */
  .app-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    width: 270px;
    z-index: 300;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: none;
  }

  .app-sidebar.open {
    left: 0;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
  }

  /* Overlay backdrop */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 250;
    backdrop-filter: blur(2px);
  }

  .sidebar-overlay.open {
    display: block;
  }

  /* Main content — full width */
  .app-main {
    overflow: visible;
    min-height: auto;
  }

  .tab-content {
    padding: 20px 14px;
    overflow-y: visible;
    overflow-x: hidden;
  }

  /* Prevent body scroll when sidebar open */
  body.sidebar-open {
    overflow: hidden;
  }

  /* ===== FORMS — the core mobile fix ===== */

  /* All form rows stack vertically */
  .form-row,
  .filters-row {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  /* All form groups take full width */
  .form-group {
    width: 100%;
    flex: none !important;
  }

  .flex-1, .flex-2 {
    flex: none !important;
    width: 100%;
  }

  /* Inputs: full width, minimum tap target (44px per Apple HIG), 16px font to prevent iOS zoom */
  .form-group input,
  .filter-select,
  .filter-input {
    width: 100% !important;
    min-height: 48px;
    font-size: 16px !important;
    padding: 12px 14px;
    box-sizing: border-box;
  }

  /* Primary buttons: full width, tall for thumbs */
  .btn-primary {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    padding: 14px 20px;
  }

  /* Search form cards */
  .search-form-card {
    padding: 16px;
    margin-bottom: 20px;
  }

  .search-form-card input {
    width: 100%;
  }

  .search-form-card button {
    width: 100%;
  }

  /* Unified search bar (Gene Decoder etc.) — stack vertically */
  .search-form-inner {
    flex-direction: column;
    padding: 12px;
    gap: 8px;
  }

  .search-form-inner input {
    width: 100% !important;
    min-height: 44px;
    font-size: 16px !important;
    padding: 12px 8px !important;
  }

  .search-form-inner .btn-primary {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    font-size: 15px;
  }

  .search-field-icon {
    display: none;
  }

  /* ===== PILL BUTTONS — bigger tap targets, wrap ===== */

  .pill-btn {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 36px;
  }

  /* Tab headers */
  .tab-header {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }

  .tab-title-wrap h1 {
    font-size: 1.3rem;
  }

  .tab-title-wrap p {
    font-size: 0.82rem;
  }

  /* ===== STATS / RESULTS ===== */

  /* Stat cards: stack when too narrow */
  .stats-row {
    flex-wrap: wrap;
  }

  .stat-card {
    min-width: calc(50% - 8px);
    padding: 12px;
  }

  .stat-card .stat-num {
    font-size: 1.3rem;
  }

  .stat-card .stat-label {
    font-size: 0.7rem;
  }

  /* Report cards */
  .report-card {
    padding: 16px;
  }

  .report-card h2 {
    font-size: 1.1rem;
  }

  .report-card h3 {
    font-size: 0.95rem;
  }

  /* Profile rows: stack label over value */
  .profile-row {
    flex-direction: column;
    gap: 2px;
  }

  .profile-row strong {
    width: auto;
    font-size: 11px;
  }

  .profile-row span {
    font-size: 13px;
  }

  /* Verdict */
  .verdict-summary {
    font-size: 0.85rem;
    max-width: 100%;
  }

  .verdict-badge {
    font-size: 12px;
    padding: 6px 14px;
  }

  /* ===== GRIDS — single column ===== */

  .home-grid {
    grid-template-columns: 1fr !important;
  }

  .guide-card {
    padding: 16px;
  }

  .protein-featured-grid,
  .pipeline-featured-grid,
  .protein-grid,
  .fda-report-grid,
  .drug-grid,
  .trials-grid,
  .dna-report-grid,
  .comparison-grid,
  .about-db-grid {
    grid-template-columns: 1fr !important;
  }

  .protein-featured-card,
  .pipeline-featured-card {
    padding: 14px;
  }

  /* ===== HOW-TO sections ===== */

  .tab-how-to {
    flex-direction: column;
  }

  .how-to-visual {
    display: none;
  }

  .how-to-headline {
    font-size: 1.1rem;
  }

  .how-to-desc {
    font-size: 0.82rem;
  }

  /* ===== SLIDESHOW ===== */

  .pitch-slideshow {
    height: auto;
    min-height: 200px;
  }

  .pitch-slide {
    position: relative;
  }

  .pitch-slide:not(.active) {
    display: none;
  }

  .slide-content {
    padding: 1.5rem;
    max-width: 100%;
  }

  .slide-bg-img,
  .slide-bg-video {
    display: none;
  }

  .slide-title {
    font-size: 1.1rem;
  }

  .slide-desc {
    font-size: 0.82rem;
  }

  .pitch-dots {
    padding: 12px;
  }

  /* ===== CHAT ===== */

  .chat-container {
    height: calc(100vh - 160px);
    height: calc(100dvh - 160px);
    border-radius: var(--radius-md);
  }

  .chat-messages {
    padding: 16px;
  }

  .chat-input-wrap {
    flex-direction: column;
    gap: 8px;
  }

  .chat-input-wrap input {
    width: 100%;
    min-height: 48px;
    font-size: 16px !important;
  }

  .chat-input-wrap button {
    width: 100%;
    min-height: 48px;
  }

  .chat-suggestions {
    flex-direction: column;
  }

  /* ===== FDA ===== */

  .fda-reaction-name {
    width: auto;
    max-width: 120px;
    font-size: 11px;
  }

  /* ===== VISUALIZER ===== */

  .visualizer-layout {
    grid-template-columns: 1fr;
  }

  #protein-3d-viewer {
    height: 280px !important;
  }

  /* ===== INTERACTION CHECKER ===== */

  .interaction-inputs {
    flex-direction: column;
  }

  .interaction-inputs input,
  .interaction-inputs button {
    width: 100%;
    min-height: 48px;
    font-size: 16px !important;
  }

  /* ===== COMPARATOR INPUTS ===== */

  .comparator-inputs {
    flex-direction: column;
  }

  /* ===== BODY MAP ===== */

  .bodymap-chart-container {
    overflow-x: auto;
  }

  /* ===== DNA ===== */

  .dna-report-grid {
    grid-template-columns: 1fr;
  }

  /* ===== DISEASE / CONDITION crosslinks ===== */

  .disease-crosslink-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .drug-card-links {
    flex-direction: column;
  }

  /* ===== LIBRARY ===== */

  .library-filters {
    flex-wrap: wrap;
    gap: 8px;
  }

  .lib-tab-btn {
    font-size: 11px;
    padding: 6px 12px;
  }

  /* ===== ONBOARDING ===== */

  .onboard-body h2 {
    font-size: 1.2rem;
  }

  .onboard-body p {
    font-size: 0.82rem;
  }

  .onboard-kicker {
    font-size: 0.85rem;
  }

  /* ===== ABOUT & SOURCES PAGE ===== */

  .about-card {
    padding: 18px 16px;
  }

  .about-card h2 {
    font-size: 1rem;
  }

  .about-card p {
    font-size: 0.82rem;
  }

  /* Database rows — stack vertically instead of 3-column grid */
  .about-db-row {
    grid-template-columns: 1fr !important;
    gap: 4px;
    padding: 12px 14px;
  }

  .about-db-name {
    font-size: 0.8rem;
  }

  .about-db-org {
    font-size: 0.7rem;
  }

  .about-db-what {
    font-size: 0.78rem;
    margin-top: 2px;
  }

  /* About links — single column */
  .about-links-row {
    grid-template-columns: 1fr;
  }

  .about-link-card {
    padding: 14px 16px;
    font-size: 0.8rem;
  }

  /* How it works steps */
  .about-step {
    font-size: 0.82rem;
  }

  /* Disclaimer list items */
  .about-not-item {
    font-size: 0.8rem;
    gap: 8px;
  }

  /* YouTube embed — maintain aspect ratio */
  .about-video-wrap iframe {
    height: 200px;
  }

  /* ===== MISC ===== */

  /* Claim checker / Research radar results */
  .study-item {
    padding: 12px;
  }

  .study-title {
    font-size: 0.85rem;
  }

  .study-meta {
    font-size: 0.72rem;
  }

  /* Bookmark buttons — bigger tap target */
  .bookmark-btn {
    width: 40px;
    height: 40px;
  }

  /* Dig deeper links */
  .dig-deeper-link {
    font-size: 12px;
  }

  /* Empty states */
  .empty-state h3 {
    font-size: 1rem;
  }

  .empty-state p {
    font-size: 0.82rem;
  }

  /* gnomAD population labels */
  .gnomad-pop-name {
    font-size: 11px;
    min-width: 80px;
    max-width: 100px;
  }

  /* Trial cards in results */
  .trial-result-card {
    padding: 14px;
  }

  /* View all external links */
  .view-all-btn {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 12px 16px;
  }

  /* How-to steps */
  .how-to-steps {
    font-size: 0.82rem;
  }

  /* Verdict actions (PubChem link, PDB link, bookmark) */
  #verdict-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  #verdict-actions a,
  #verdict-actions button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Ensure no horizontal overflow anywhere */
  * {
    max-width: 100%;
  }

  img, video, iframe {
    max-width: 100%;
    height: auto;
  }

  /* Prevent iOS zoom on input focus — font-size must be >= 16px */
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .app-sidebar {
    width: 220px;
    padding: 16px;
  }

  .tab-content {
    padding: 28px 24px;
  }

  .home-grid {
    grid-template-columns: 1fr 1fr;
  }
}
