/* ============================================================
   bioLLM/wiki — shared stylesheet
   Ported from the Next.js app (globals.css + page.module.css).
   CSS-module :global() wrappers stripped; class names are global.
   ============================================================ */
:root {
  --font-geist-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-geist-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --title-family: var(--font-geist-sans);
}

:root {
  --background: #ffffff;
  --foreground: #171717;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

html {
  height: 100%;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--foreground);
  background: var(--background);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}


/* Container & Base Layout */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.03) 0px, transparent 50%),
              radial-gradient(at 50% 0%, rgba(13, 148, 136, 0.02) 0px, transparent 50%),
              radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.03) 0px, transparent 50%),
              #f8fafc;
  color: #0f172a; /* Slate 900 */
  font-family: var(--font-geist-sans), system-ui, -apple-system, sans-serif;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

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

.logoGroup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logoIcon {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #0f172a 50%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 0.85rem;
  color: #475569; /* Slate 600 */
}

.metaBadge {
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.18);
  color: #0d9488;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.statusPill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #059669; /* Emerald 600 */
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.statusDot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #10b981; /* Emerald 500 */
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: statusPulse 2s ease-out infinite;
}

@keyframes statusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  70% {
    box-shadow: 0 0 0 0.35rem rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .statusDot {
    animation: none;
  }
}

/* Dashboard Grid */
.dashboardContainer {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.statCard {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.statCard:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.08);
}

.statIconWrapper {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.statIcon {
  color: #0284c7; /* Sky 600 */
}

.statInfo {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.statLabel {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b; /* Slate 500 */
}

.statValue {
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f172a;
}

/* Controls & Filter Section */
.controlsBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.searchWrapper {
  position: relative;
  flex: 1;
  min-width: 290px;
  max-width: 500px;
}

.searchIcon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.searchInput {
  width: 100%;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: #0f172a;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.searchInput:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.toggleGroup {
  display: flex;
  gap: 0.25rem;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  height: 48px;
  align-items: center;
}

[data-theme="dark"] .toggleGroup {
  background: #1e293b;
  border-color: #334155;
}

.viewToggleBtn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
  height: 38px;
}

.viewToggleBtn:hover {
  color: #0d9488;
  background: rgba(13, 148, 136, 0.05);
}

.viewToggleBtn.active {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0d9488;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

[data-theme="dark"] .viewToggleBtn {
  color: #94a3b8;
}

[data-theme="dark"] .viewToggleBtn:hover {
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.05);
}

[data-theme="dark"] .viewToggleBtn.active {
  background: #0f172a;
  border-color: #334155;
  color: #2dd4bf;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.viewToggleBtn.deactivated {
  opacity: 0.6;
}

.viewToggleBtn.deactivated:hover {
  opacity: 1;
}

.graphContainer {
  width: 100%;
  height: 700px;
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 1.5rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .graphContainer {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.graphIframe {
  width: 100%;
  height: 100%;
  border: none;
}

.pageSizeWrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
  font-size: 0.9rem;
}

.selectInput {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  color: #0f172a;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25em;
}

.selectInput:focus {
  border-color: #0d9488;
}

/* Category Tabs */
.tabsContainer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}

.tabButtonsWrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.tableUpdateMeta {
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
}

.tabButton {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #475569;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tabButton:hover {
  background: rgba(0, 0, 0, 0.02);
  color: #0f172a;
}

.tabButtonActive {
  background: #0d9488;
  border-color: #0d9488;
  color: white;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

.tabButtonActive:hover {
  background: #0f766e;
  color: white;
}

/* Table Card & Layout */
.tableCard {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05);
}

.tableWrapper {
  overflow-x: auto;
  /* C: scroll shadows — the right/left edge shows a shadow only when the table
     overflows and isn't scrolled to that end (Lea Verou's technique). The
     "cover" gradients scroll with the content (local) and hide the shadow at
     the ends; the shadow gradients stay put (scroll). */
  background:
    linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) 0 0 / 34px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) 100% 0 / 34px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.12), transparent) 0 0 / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.12), transparent) 100% 0 / 12px 100% no-repeat scroll;
}

[data-theme="dark"] .tableWrapper {
  background:
    linear-gradient(to right, #1e293b 30%, rgba(30, 41, 59, 0)) 0 0 / 34px 100% no-repeat local,
    linear-gradient(to left, #1e293b 30%, rgba(30, 41, 59, 0)) 100% 0 / 34px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.45), transparent) 0 0 / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.45), transparent) 100% 0 / 12px 100% no-repeat scroll;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.table th,
.table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

/* A/B: tighter padding on the number columns (header + cells) so the three
   PUBLICATIONS columns fit without clipping; the TOPICS name column (auto
   width) absorbs the reclaimed space. */
.table td.numberCell,
.table th.sortableHeader {
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.table td.numberCell {
  white-space: nowrap;
}

.table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sortableHeader {
  cursor: pointer;
  transition: background-color 0.2s;
}

.sortableHeader:hover {
  background: rgba(0, 0, 0, 0.01);
  color: #0f172a;
}

.headerCellContent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sortIcon {
  opacity: 0.3;
  transition: opacity 0.2s;
}

.sortableHeader:hover .sortIcon {
  opacity: 0.7;
}

.activeSortIcon {
  opacity: 1;
  color: #0d9488;
}

.groupHeader {
  padding-bottom: 0.5rem;
  text-align: center;
}

.groupHeaderContent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: #64748b;
  letter-spacing: 0.08em;
}

/* Rank & Badge styling */
.rankCell {
  text-align: center;
}

.rankBadge {
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: #475569;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.8rem;
  font-weight: 600;
}

.nameCell {
  vertical-align: middle;
}

.entityLink {
  color: #2563eb;
  font-weight: 600;
  transition: color 0.15s;
  display: inline-block;
}

.entityLink:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Red links (unmatched files in template pilot) */
.newLink {
  color: #e11d48 !important; /* Rose 600 */
}

.newLink:hover {
  color: #be123c !important;
}

.wikidataId {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.75rem;
  color: #64748b; /* Slate 500 */
}

.catBadge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

/* Category Specific Styles */
.catChemical {
  background: rgba(20, 184, 166, 0.08);
  color: #0f766e;
  border: 1px solid rgba(20, 184, 166, 0.15);
}

.catDrug {
  background: rgba(16, 185, 129, 0.08);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.catTherapy {
  background: rgba(59, 130, 246, 0.08);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.catPathway {
  background: rgba(168, 85, 247, 0.08);
  color: #6b21a8;
  border: 1px solid rgba(168, 85, 247, 0.15);
}

.catGene {
  background: rgba(244, 63, 94, 0.08);
  color: #9f1239;
  border: 1px solid rgba(244, 63, 94, 0.15);
}

.catDisease {
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.catOther {
  background: rgba(113, 113, 122, 0.08);
  color: #3f3f46;
  border: 1px solid rgba(113, 113, 122, 0.15);
}

.numberCell {
  text-align: center;
  font-family: var(--font-geist-mono), monospace;
  font-weight: 600;
  color: #334155;
}

.noResultsCell {
  text-align: center;
  color: #64748b;
  padding: 3rem 1.5rem !important;
}

/* Pagination Footer */
.paginationBar {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.paginationInfo {
  font-size: 0.85rem;
  color: #475569;
}

.paginationInfo strong {
  color: #0f172a;
}

.paginationControls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.paginationButton {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
}

.paginationButton:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.02);
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.15);
}

.paginationButton:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pageNumbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pageNumberButton {
  min-width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pageNumberButton:hover {
  background: rgba(0, 0, 0, 0.02);
  color: #0f172a;
}

.pageNumberButtonActive {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: #2563eb;
}

/* Footer styling */
.footer {
  background: #f1f5f9;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.5rem 0;
  width: 100%;
}

.footerContent {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #475569; /* Slate 600 */
}

/* =======================================
   WIKI DETAIL PAGE STYLING
   ======================================= */
.wikiContainer {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8fafc;
  color: #334155;
}

.wikiMain {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.backBtn {
  align-self: flex-start;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #334155;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.backBtn:hover {
  background: rgba(0, 0, 0, 0.02);
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.12);
}

.wikiCard {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 2.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.wikiHeader {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.wikiMeta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.wikiHeaderTitle {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.1;
}

.wikiContent h1:first-child {
  display: none;
}

/* Custom styling for parsed wiki HTML inside pages */
.wikiContent {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #334155; /* Slate 700 */
}

.wikiContent h1,
.wikiContent h2,
.wikiContent h3 {
  color: #0f172a;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.wikiContent h1 {
  font-size: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 0.5rem;
}

.wikiContent h2 {
  font-size: 1.45rem;
}

.wikiContent h3 {
  font-size: 1.15rem;
}

.wikiContent p {
  margin-bottom: 1.25rem;
}

.wikiContent ul,
.wikiContent ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.wikiContent li {
  margin-bottom: 0.5rem;
}

.wikiContent a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.wikiContent a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.wikiContent a.new {
  color: #e11d48;
}

.wikiContent a.new:hover {
  color: #be123c;
}

/* PMID citation links: smaller monospaced numbers that wrap compactly, so the
   long "PMIDs" lists don't read as a wall of large bold text. */
.wikiContent a[href^="https://pubmed.ncbi.nlm.nih.gov/"] {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.78rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.wikiContent blockquote {
  border-left: 4px solid #0d9488;
  background: rgba(13, 148, 136, 0.05);
  padding: 0.75rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.25rem;
  font-style: italic;
  color: #475569;
}

.wikiContent code {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: #db2777;
}

.wikiContent details {
  margin-top: 1rem;
}

.wikiContent summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  outline: none;
  user-select: none;
}

.wikiContent summary:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Literature & Paper Analysis collapsible section */
.wikiContent details.paper-details {
  margin-top: 2rem;
  border: 1px solid rgba(13, 148, 136, 0.2); /* Teal border */
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.03); /* Soft teal tint background */
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-theme="dark"] .wikiContent details.paper-details {
  border-color: rgba(13, 148, 136, 0.3);
  background: rgba(13, 148, 136, 0.02);
}

.wikiContent details.paper-details[open] {
  border-color: rgba(13, 148, 136, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.wikiContent summary.paper-summary-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: rgba(13, 148, 136, 0.08);
  color: #0d9488; /* Teal color */
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  list-style: none; /* Hide default arrow */
  transition: background 0.2s ease, color 0.2s ease;
}

.wikiContent summary.paper-summary-btn::-webkit-details-marker {
  display: none; /* Hide default arrow in Safari */
}

.wikiContent summary.paper-summary-btn:hover {
  background: rgba(13, 148, 136, 0.15);
  color: #0f766e;
  text-decoration: none;
}

[data-theme="dark"] .wikiContent summary.paper-summary-btn {
  background: rgba(13, 148, 136, 0.15);
  color: #2dd4bf; /* Light teal */
}

[data-theme="dark"] .wikiContent summary.paper-summary-btn:hover {
  background: rgba(13, 148, 136, 0.25);
  color: #5eead4;
}

/* Arrow indicator rotate on open */
.wikiContent summary.paper-summary-btn::after {
  content: '▼';
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform 0.3s ease;
  opacity: 0.8;
}

.wikiContent details.paper-details[open] summary.paper-summary-btn::after {
  transform: rotate(-180deg);
}

.wikiContent .paper-analysis-content {
  padding: 1.5rem 1.5rem;
  border-top: 1px solid rgba(13, 148, 136, 0.15);
  background: #ffffff;
  font-size: 0.95rem;
  line-height: 1.6;
}

[data-theme="dark"] .wikiContent .paper-analysis-content {
  background: #0f172a; /* Dark slate background */
  color: #cbd5e1;
  border-top-color: rgba(13, 148, 136, 0.25);
}

/* Styling inside paper analysis content */
.wikiContent .paper-analysis-content h2 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #0f766e;
  border-bottom: 1px solid rgba(13, 148, 136, 0.1);
  padding-bottom: 0.25rem;
}

[data-theme="dark"] .wikiContent .paper-analysis-content h2 {
  color: #2dd4bf;
  border-bottom-color: rgba(13, 148, 136, 0.2);
}

.wikiContent .paper-analysis-content ul {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

.wikiContent .paper-analysis-content li {
  margin-bottom: 0.5rem;
}

/* Custom styled divs inside the wiki content */
.wikiContent div.footer-remark {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  font-style: italic;
}

.tabCount {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 0.25rem;
  font-weight: 500;
}

/* =======================================
   HERO SECTION STYLING
   ======================================= */
.heroSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.09) 0%, rgba(20, 184, 166, 0.05) 50%, rgba(99, 102, 241, 0.09) 100%), rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 24px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 2rem;
  gap: 1.5rem;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 
              0 10px 40px -10px rgba(13, 148, 136, 0.12);
  position: relative;
  overflow: hidden;

  /* Animation and limits */
  max-height: 360px;
  transition: max-height 180ms cubic-bezier(0.4, 0, 0.2, 1), 
              padding 180ms cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 180ms cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.heroSection.collapsed {
  max-height: 56px;
  padding-top: 0;
  padding-bottom: 0;
  gap: 0;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.08) 0%, rgba(99, 102, 241, 0.05) 50%, rgba(13, 148, 136, 0.08) 100%), rgba(255, 255, 255, 0.65);
  border-color: rgba(13, 148, 136, 0.16);
  box-shadow: 0 4px 20px -10px rgba(13, 148, 136, 0.08);
}

.glowBlob1 {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, rgba(14, 165, 233, 0) 70%);
  filter: blur(50px);
  top: -100px;
  left: 5%;
  z-index: 0;
  pointer-events: none;
  animation: floatGlow1 12s ease-in-out infinite;
}

.glowBlob2 {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0) 70%);
  filter: blur(60px);
  bottom: -150px;
  right: 8%;
  z-index: 0;
  pointer-events: none;
  animation: floatGlow2 15s ease-in-out infinite;
}

@keyframes floatGlow1 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, 20px) scale(1.1);
  }
}

@keyframes floatGlow2 {
  0%, 100% {
    transform: translate(0, 0) scale(1.1);
  }
  50% {
    transform: translate(-30px, -30px) scale(1);
  }
}

.heroContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.heroBadge {
  display: inline-block;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.18);
  color: #0284c7;
  padding: 0.3rem 0.95rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.06);
}

.heroTitle {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.035em;
  color: #0f172a;
}

.heroKeyword {
  color: #0d9488;
}

.heroDescription {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #475569;
  max-width: 720px;
  margin-bottom: 0.5rem;
}

.heroActions {
  margin-top: 1rem;
}

.heroCtaButton {
  display: inline-flex;
  align-items: center;
  background: #6366f1;
  border: 1px solid #6366f1;
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  transition: all 0.2s ease;
  cursor: pointer;
}

.heroCtaButton:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.heroVisual {
  flex: 0 0 10%;
  max-width: 10%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

@media (max-width: 968px) {
  .heroVisual {
    flex: 1;
    width: 100%;
    max-width: 100%;
    margin-top: 1.5rem;
    align-items: flex-start;
  }
}

.heroVisualCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem;
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.heroVisualCard:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 8px 24px -8px rgba(59, 130, 246, 0.12);
}

[data-theme="dark"] .heroVisualCard {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.25);
}

[data-theme="dark"] .heroVisualCard:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

.heroCtaButtonLarge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d9488 0%, #4f46e5 100%);
  color: white !important;
  font-family: var(--title-family), sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 8px 20px -6px rgba(13, 148, 136, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 968px) {
  .heroCtaButtonLarge {
    max-width: 320px;
  }
}

.heroCtaButtonLarge:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(13, 148, 136, 0.45);
  background: linear-gradient(135deg, #0f766e 0%, #4338ca 100%);
}

.heroCtaButtonLarge:active {
  transform: translateY(0);
}

[data-theme="dark"] .heroCtaButtonLarge {
  background: linear-gradient(135deg, #14b8a6 0%, #6366f1 100%);
  box-shadow: 0 8px 20px -6px rgba(20, 184, 166, 0.3);
}

[data-theme="dark"] .heroCtaButtonLarge:hover {
  background: linear-gradient(135deg, #0d9488 0%, #4f46e5 100%);
  box-shadow: 0 12px 24px -6px rgba(20, 184, 166, 0.45);
}

.movingGraphSvg {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  background: transparent;
  padding: 0.5rem;
  box-sizing: border-box;
  animation: floatSvg 3.2s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(59, 130, 246, 0.12));
}

@keyframes floatSvg {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-5px) rotate(-1.5deg) scale(0.97); }
  50% { transform: translateY(-10px) rotate(2deg) scale(1.03); }
  75% { transform: translateY(-5px) rotate(-1deg) scale(0.99); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes pulseNode {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.28); }
}

.gNodes circle {
  transition: transform 0.25s ease;
}

.gNodes circle:nth-child(1) { transform-origin: 30px 30px; animation: pulseNode 1.6s ease-in-out infinite; }
.gNodes circle:nth-child(2) { transform-origin: 75px 20px; animation: pulseNode 2.0s ease-in-out infinite 0.3s; }
.gNodes circle:nth-child(3) { transform-origin: 120px 40px; animation: pulseNode 1.8s ease-in-out infinite 0.6s; }
.gNodes circle:nth-child(4) { transform-origin: 90px 75px; animation: pulseNode 2.4s ease-in-out infinite 0.9s; }
.gNodes circle:nth-child(5) { transform-origin: 45px 65px; animation: pulseNode 2.1s ease-in-out infinite 1.2s; }

@media (max-width: 968px) {
  .movingGraphSvg {
    max-width: 220px;
  }
}

.visualGraph {
  position: relative;
  width: 240px;
  height: 240px;
  animation: float 6s ease-in-out infinite;
}

.nodeCentral {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #14b8a6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.76rem;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
  z-index: 10;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nodeCentral:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 0 25px rgba(20, 184, 166, 0.45);
}

.node {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: white;
  z-index: 9;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.node1 {
  top: 7px;
  left: 92px;
  width: 56px;
  height: 56px;
  font-size: 0.68rem;
  background: #818cf8; /* Therapy */
}

.node2 {
  top: 70px;
  left: 176px;
  width: 48px;
  height: 48px;
  font-size: 0.62rem;
  background: #fb7185; /* Gene */
}

.node3 {
  top: 168px;
  left: 149px;
  width: 42px;
  height: 42px;
  font-size: 0.58rem;
  background: #2dd4bf; /* Chemical */
}

.node4 {
  top: 164px;
  left: 45px;
  width: 50px;
  height: 50px;
  font-size: 0.62rem;
  background: #c084fc; /* Pathway */
}

.node5 {
  top: 71px;
  left: 16px;
  width: 46px;
  height: 46px;
  font-size: 0.6rem;
  background: #3b82f6; /* Protein */
}

.visualLink1, .visualLink2, .visualLink3, .visualLink4 {
  position: absolute;
  background: rgba(0, 0, 0, 0.05);
  transform-origin: 0 0;
}

.visualLink1 {
  left: 50%;
  top: 50%;
  width: 2px;
  height: 60px;
  transform: rotate(0deg) translate(-50%, -100%);
}

.visualLink2 {
  left: 50%;
  top: 50%;
  width: 60px;
  height: 2px;
  transform: rotate(0deg) translate(0%, -50%);
}

.visualLink3 {
  left: 50%;
  top: 50%;
  width: 2px;
  height: 60px;
  transform: rotate(0deg) translate(-50%, 0%);
}

.visualLink4 {
  left: 50%;
  top: 50%;
  width: 60px;
  height: 2px;
  transform: rotate(180deg) translate(0%, -50%);
}

.heroStatsBar {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: #475569;
}

.statsDateBadge {
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: #4f46e5;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

@keyframes float {
  0% { transform: translate(0px, 0px); }
  50% { transform: translate(0px, -6px); }
  100% { transform: translate(0px, 0px); }
}



/* =======================================
   STATS SUMMARY TEXT STYLING
   ======================================= */
.statsSummaryText {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.92rem;
  color: #475569;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.statsDivider {
  color: #cbd5e1;
}

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

.themeToggleBtn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #64748b;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.themeToggleBtn:hover {
  background: rgba(0, 0, 0, 0.02);
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.15);
}

/* =======================================
   DARK THEME OVERRIDES
   ======================================= */
html[data-theme="dark"],
[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="dark"] .container,
[data-theme="dark"] .wikiContainer {
  background: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
              radial-gradient(at 50% 0%, rgba(13, 148, 136, 0.03) 0px, transparent 50%),
              radial-gradient(at 100% 0%, rgba(56, 189, 248, 0.04) 0px, transparent 50%),
              #0b0f19;
  color: #f8fafc;
}

[data-theme="dark"] .header {
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .title {
  background: linear-gradient(135deg, #ffffff 50%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .subtitle {
  color: #94a3b8;
}

[data-theme="dark"] .metaBadge {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

[data-theme="dark"] .statusPill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399; /* Emerald 400 */
}

[data-theme="dark"] .themeToggleBtn {
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

[data-theme="dark"] .themeToggleBtn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .heroSection {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.18) 0%, rgba(99, 102, 241, 0.12) 45%, rgba(15, 23, 42, 0.85) 100%);
  backdrop-filter: blur(16px);
  border-color: rgba(45, 212, 191, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
              0 12px 40px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .glowBlob1 {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, rgba(56, 189, 248, 0) 70%);
}

[data-theme="dark"] .glowBlob2 {
  background: radial-gradient(circle, rgba(45, 212, 191, 0.1) 0%, rgba(45, 212, 191, 0) 70%);
}

[data-theme="dark"] .heroBadge {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .heroTitle {
  color: #f8fafc;
}

[data-theme="dark"] .heroKeyword {
  color: #2dd4bf;
}

[data-theme="dark"] .heroDescription {
  color: #94a3b8;
}

[data-theme="dark"] .heroFeatureItem h4 {
  color: #f8fafc;
}

[data-theme="dark"] .heroFeatureItem p {
  color: #64748b;
}

[data-theme="dark"] .visualLink1,
[data-theme="dark"] .visualLink2,
[data-theme="dark"] .visualLink3,
[data-theme="dark"] .visualLink4 {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .statsSummaryText {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

[data-theme="dark"] .statsSummaryText strong {
  color: #cbd5e1;
}

[data-theme="dark"] .statsDivider {
  color: #334155;
}

[data-theme="dark"] .searchInput,
[data-theme="dark"] .selectInput,
[data-theme="dark"] .tabButton,
[data-theme="dark"] .paginationButton {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

[data-theme="dark"] .searchInput:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .tabButtonActive {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .tabButtonActive:hover {
  background: #4f46e5;
}

[data-theme="dark"] .tableCard {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .table th {
  background: rgba(15, 23, 42, 0.4);
  color: #64748b;
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .table td {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .table th:hover {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .rankBadge {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

[data-theme="dark"] .entityLink {
  color: #38bdf8;
}

[data-theme="dark"] .entityLink:hover {
  color: #7dd3fc;
}

[data-theme="dark"] .newLink {
  color: #f43f5e !important;
}

[data-theme="dark"] .newLink:hover {
  color: #fda4af !important;
}

[data-theme="dark"] .numberCell {
  color: #cbd5e1;
}

[data-theme="dark"] .catChemical { background: rgba(20, 184, 166, 0.12); color: #2dd4bf; border-color: rgba(20, 184, 166, 0.2); }
[data-theme="dark"] .catDrug { background: rgba(16, 185, 129, 0.12); color: #34d399; border-color: rgba(16, 185, 129, 0.2); }
[data-theme="dark"] .catTherapy { background: rgba(99, 102, 241, 0.12); color: #818cf8; border-color: rgba(99, 102, 241, 0.2); }
[data-theme="dark"] .catPathway { background: rgba(168, 85, 247, 0.12); color: #c084fc; border-color: rgba(168, 85, 247, 0.2); }
[data-theme="dark"] .catGene { background: rgba(244, 63, 94, 0.12); color: #fb7185; border-color: rgba(244, 63, 94, 0.2); }
[data-theme="dark"] .catDisease { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border-color: rgba(245, 158, 11, 0.2); }
[data-theme="dark"] .catOther { background: rgba(113, 113, 122, 0.12); color: #a1a1aa; border-color: rgba(113, 113, 122, 0.2); }

[data-theme="dark"] .paginationBar {
  background: rgba(15, 23, 42, 0.2);
  border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .pageNumberButtonActive {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

[data-theme="dark"] .footer {
  background: rgba(15, 23, 42, 0.8);
  border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .footerContent {
  color: #475569;
}

[data-theme="dark"] .wikiCard {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .backBtn {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

[data-theme="dark"] .backBtn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

[data-theme="dark"] .wikiHeader {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .wikiContent {
  color: #cbd5e1;
}

[data-theme="dark"] .wikiContent h1,
[data-theme="dark"] .wikiContent h2,
[data-theme="dark"] .wikiContent h3 {
  color: #f8fafc;
}

[data-theme="dark"] .wikiContent h1 {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .wikiContent a {
  color: #38bdf8;
}

[data-theme="dark"] .wikiContent a:hover {
  color: #7dd3fc;
}

[data-theme="dark"] .wikiContent a.new {
  color: #f43f5e;
}

[data-theme="dark"] .wikiContent a.new:hover {
  color: #fda4af;
}

[data-theme="dark"] .wikiContent blockquote {
  border-left-color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
  color: #94a3b8;
}

[data-theme="dark"] .wikiContent code {
  background: rgba(0, 0, 0, 0.3);
  color: #f472b6;
}

[data-theme="dark"] .wikiContent summary {
  color: #38bdf8;
}

[data-theme="dark"] .wikiContent summary:hover {
  color: #7dd3fc;
}

[data-theme="dark"] .wikiContent div.footer-remark {
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #475569;
}

/* =======================================
   WIKI SIDEBAR & WIKIDATA LINK STYLING
   ======================================= */
.wikidataLink {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.75rem;
  color: #0d9488;
  margin-left: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
}

.wikidataLink:hover {
  text-decoration: underline;
  color: #0f766e;
}

[data-theme="dark"] .wikidataLink {
  color: #2dd4bf;
}

[data-theme="dark"] .wikidataLink:hover {
  color: #7dd3fc;
}

.wikiLayoutGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (min-width: 968px) {
  .wikiLayoutGrid {
    grid-template-columns: 7fr 3fr;
  }
}

.wikiSidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebarCard {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .sidebarCard {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sidebarCardTitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-theme="dark"] .sidebarCardTitle {
  color: #f8fafc;
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.relatedEntityList {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none !important;
  margin: 0 !important;
}

.relatedEntityItem {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.relatedEntityLink {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0d9488;
  transition: color 0.15s;
}

.relatedEntityLink:hover {
  color: #0f766e;
  text-decoration: underline;
}

[data-theme="dark"] .relatedEntityLink {
  color: #38bdf8;
}

[data-theme="dark"] .relatedEntityLink:hover {
  color: #7dd3fc;
}

.relatedEntityMeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
}

[data-theme="dark"] .relatedEntityMeta {
  color: #94a3b8;
}

[data-theme="dark"] .heroStatsBar {
  border-top-color: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

[data-theme="dark"] .heroStatsBar strong {
  color: #cbd5e1;
}

[data-theme="dark"] .tableUpdateMeta {
  color: #94a3b8;
}

[data-theme="dark"] .statsDateBadge {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

[data-theme="dark"] .wikiHeaderTitle {
  color: #f8fafc;
}

[data-theme="dark"] .heroCtaButton {
  background: #4f46e5;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

[data-theme="dark"] .heroCtaButton:hover {
  background: #4338ca;
  border-color: #4338ca;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.canvasBackground {
  background: #fafafa;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .canvasBackground {
  background: #090d16 !important;
}

.legendOverlay {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(4px);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .legendOverlay {
  background: rgba(15, 23, 42, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .legendText {
  color: #94a3b8 !important;
}

.graphSvg line {
  stroke: rgba(0, 0, 0, 0.12) !important;
  transition: stroke 0.3s ease;
}

[data-theme="dark"] .graphSvg line {
  stroke: rgba(255, 255, 255, 0.15) !important;
}

.graphSvg path {
  transition: stroke 0.3s ease;
}

[data-theme="dark"] .graphSvg path {
  opacity: 0.8;
}

/* Graph Analysis Column Layout & Button styles */
.graphAnalysisCell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-start;
}

.graphBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.15);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.graphBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 148, 136, 0.25);
  background: linear-gradient(135deg, #115e59 0%, #0f766e 100%);
}

[data-theme="dark"] .graphBtn {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  border-color: rgba(45, 212, 191, 0.4);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .graphBtn:hover {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  box-shadow: 0 4px 8px rgba(45, 212, 191, 0.3);
}

.reportBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.reportBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.25);
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
}

[data-theme="dark"] .reportBtn {
  background: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .reportBtn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.noGraphText {
  color: #94a3b8;
  font-size: 0.85rem;
  padding-left: 0.5rem;
}

.navLinks {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-left: 2rem;
  margin-right: auto;
}

.navLink {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.navLink:hover {
  color: #0f172a;
}

[data-theme="dark"] .navLink {
  color: #94a3b8;
}

[data-theme="dark"] .navLink:hover {
  color: #f8fafc;
}

/* Tooltip styling */
.tooltipContainer {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: #64748b;
  vertical-align: middle;
}

.infoIcon {
  color: #64748b;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

.tooltipContainer:hover .infoIcon {
  opacity: 1;
  color: #3b82f6;
}

.tooltipText {
  visibility: hidden;
  width: 260px;
  background-color: #1e293b;
  color: #f8fafc;
  text-align: left;
  border-radius: 8px;
  padding: 10px 14px;
  position: absolute;
  z-index: 100;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  font-size: 0.725rem;
  line-height: 1.45;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tooltipText::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

.tooltipContainer:hover .tooltipText {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-theme="dark"] .tooltipText {
  background-color: #0f172a;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tooltipText::after {
  border-color: #0f172a transparent transparent transparent;
}

/* =======================================
   INTERACTIVE ORBIT & PIPELINE STYLES
   ======================================= */
.interactiveNode {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.interactiveNode:hover {
  transform: scale(1.08);
  filter: brightness(1.15);
}

.node1:hover { box-shadow: 0 0 15px rgba(129, 140, 248, 0.65); }
.node2:hover { box-shadow: 0 0 15px rgba(251, 113, 133, 0.65); }
.node3:hover { box-shadow: 0 0 15px rgba(45, 212, 191, 0.65); }
.node4:hover { box-shadow: 0 0 15px rgba(192, 132, 252, 0.65); }
.node5:hover { box-shadow: 0 0 15px rgba(59, 130, 246, 0.65); }

.orbitHint {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.025em;
  transition: color 0.2s;
  text-align: center;
}

[data-theme="dark"] .orbitHint {
  color: #94a3b8;
}

.pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
  background: transparent;
  padding: 0;
  border: none;
}

.pipelineStep {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(13, 148, 136, 0.16);
  padding: 0.6rem 1.1rem;
  border-radius: 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.pipelineStep:hover {
  transform: translateY(-3px) scale(1.02);
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.12);
}

[data-theme="dark"] .pipelineStep {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .pipelineStep:hover {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow: 0 10px 28px rgba(45, 212, 191, 0.2);
}

.pipelineIcon {
  color: #0d9488;
}

[data-theme="dark"] .pipelineIcon {
  color: #2dd4bf;
}

.pipelineArrow {
  color: #0d9488;
  display: flex;
  align-items: center;
  opacity: 0.45;
  transition: opacity 0.2s, transform 0.2s;
  margin: 0 0.1rem;
}

.pipelineArrow:hover {
  opacity: 0.95;
  transform: scale(1.1);
}

.heroStatsIcon {
  color: #3b82f6;
  opacity: 0.85;
}

[data-theme="dark"] .heroStatsIcon {
  color: #58a6ff;
}

/* =======================================
   COLLAPSIBLE HERO BANNER ADDITIONS
   ======================================= */
.expandedWrapper {
  width: 100%;
}

.collapsedWrapper {
  height: 56px;
  display: flex;
  align-items: center;
  width: 100%;
}

.fadeIn {
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease-out;
}

.fadeOut {
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  transition: opacity 180ms ease-out, height 180ms ease-out;
}

.collapsedHeroContent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

.collapsedHeroLeft {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.collapsedHeroTitle {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .collapsedHeroTitle {
  color: #f8fafc;
}

.collapsedHeroSeparator {
  color: #cbd5e1;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0.25rem;
}

[data-theme="dark"] .collapsedHeroSeparator {
  color: #475569;
}

.collapsedHeroStats {
  font-size: 1.15rem;
  color: #475569;
  letter-spacing: -0.02em;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  margin-right: 1.5rem;
}

[data-theme="dark"] .collapsedHeroStats {
  color: #cbd5e1;
}

.collapsedHeroStats strong {
  color: #0d9488;
  font-weight: 700;
}

[data-theme="dark"] .collapsedHeroStats strong {
  color: #2dd4bf;
}

.expandHeroBtn {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d9488;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  letter-spacing: -0.02em;
  transition: all 0.2s ease;
}

.expandHeroBtn:hover {
  color: #0f766e;
  transform: translateY(-0.5px);
}

[data-theme="dark"] .expandHeroBtn {
  color: #2dd4bf;
}

[data-theme="dark"] .expandHeroBtn:hover {
  color: #2eefd8;
}

/* Close Button (Expanded Hero) */
.closeHeroBtn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.closeHeroBtn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

[data-theme="dark"] .closeHeroBtn {
  color: #94a3b8;
}

[data-theme="dark"] .closeHeroBtn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.closeHeroBtn.hidden {
  opacity: 0;
  pointer-events: none;
}

.heroSection.collapsed .glowBlob1,
.heroSection.collapsed .glowBlob2 {
  opacity: 0.15;
  transform: scale(0.6);
}

.collapsedHeroRightSide {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* Table Header Tooltip overrides (prevent vertical overflow clipping) */
.table th .tooltipText {
  bottom: auto;
  top: 140%;
  transform: translateX(-50%) translateY(-4px);
}

.table th .tooltipContainer:hover .tooltipText {
  transform: translateX(-50%) translateY(0);
}

.table th .tooltipText::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent #1e293b transparent;
}

[data-theme="dark"] .table th .tooltipText::after {
  border-color: transparent transparent #0f172a transparent;
}

/* Collapsed Hero Banner Dark Mode background overrides */
[data-theme="dark"] .heroSection.collapsed {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.2) 0%, rgba(15, 23, 42, 0.94) 50%, rgba(99, 102, 241, 0.18) 100%);
  border-color: rgba(45, 212, 191, 0.3);
  box-shadow: 0 4px 25px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}


