/* NeuMatEx-inspired research-page presentation, shared by dashboard and viewers. */
:root {
  color-scheme: light !important;
  --bg: #fff !important;
  --bg-elev: #f6f7f8 !important;
  --bg-card: #fff !important;
  --panel: #fff !important;
  --panel-2: #f8f9fa !important;
  --surface: #fff !important;
  --surface-2: #f6f7f8 !important;
  --card: #fff !important;
  --text: #252b31 !important;
  --text-bright: #171d23 !important;
  --muted: #626c75 !important;
  --text-muted: #626c75 !important;
  --line: #d9dde1 !important;
  --border: #d9dde1 !important;
  --border-soft: #c9d0d6 !important;
  --accent: #76b900 !important;
  --accent-soft: #f0f7e5 !important;
  --soft: #f0f7e5 !important;
  --good: #76b900 !important;
  --shadow: none !important;
}
html, html body {
  background: #fff !important;
  color: #252b31 !important;
  font-family: "Titillium Web", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 16px;
  scrollbar-color: #c8d0d7 #fff;
}
body::before, html body::before { display: none !important; }
a, a:link, a:visited { color: #4f7900; }
a:hover { color: #5b8f00 !important; }
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 50px;
  padding: 8px max(4vw, calc((100vw - 1100px) / 2));
  background: #eee;
  border-bottom: 1px solid #ddd;
  font-size: 15px;
}
.site-nav a { color: #252b31 !important; text-decoration: none; }
.site-nav a:hover { color: #4f7900 !important; }
.site-nav .site-name { font-weight: 600; }
.site-nav .site-section { color: #4f7900 !important; font-size: 14px; }

/* Restrained paper-page dashboard; keep thumbnail cards for navigation. */
html body > main.shell { width: min(92vw, 1100px); padding: 38px 0 70px; }
html body .hero { text-align: center; border-bottom: 0; padding: 0 0 24px; }
html body .hero h1 { color: #20262c !important; font-size: clamp(30px, 4vw, 42px); font-weight: 500; line-height: 1.17; margin: 0 0 10px; }
html body .hero p { color: #64707a; font-size: 17px; }
html body .hero .note { margin: 15px auto 0; font-size: 13px; line-height: 1.5; }
html body .group { margin-top: 30px; }
html body .group h2 { color: #252b31 !important; text-align: center; font-size: 23px; font-weight: 400; margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1px solid #d9dde1; }
html body .viewer { background: #fff; border: 1px solid #d9dde1; border-radius: 2px; box-shadow: none; }
html body .viewer:hover { border-color: #76b900; box-shadow: 0 4px 14px #76b9001a; }
html body .viewer .preview { background: #f4f5f6; }
html body .viewer .content h3 { color: #20262c; font-size: 17px; font-weight: 600; }
html body .viewer .content p { color: #626c75; font-size: 13px; }
html body .viewer .open { color: #4f7900; }

/* Comparison viewers stay wide, but use the same typography and surfaces. */
html body main.shell:has(.nv-sidebar), html body main.shell:has(.scene), html body main.shell:has(.scene-section) {
  width: min(96vw, 1760px); max-width: none; padding-top: 24px !important;
}
html body main.shell h1 { color: #20262c !important; font-size: 30px !important; font-weight: 500 !important; }
html body .nv-layout > .shell .nv-title-row h1 { color: #20262c !important; }
html body main.shell .subtitle, html body main.shell .viewer-note { color: #626c75 !important; }
html body main.shell .scene-title h2, html body main.shell .scene-head h2 { color: #252b31 !important; }
html body .toolbar, html body .page-header, html body .topbar, html body header.sticky, html body .controls,
html body .nv-sidebar, html body .nv-sidebar-body, html body .summary, html body .global-panel,
html body .scene, html body .scene-section, html body .view-list, html body .view-row,
html body .tile, html body .card, html body dialog, html body figure:not(:has(.image-button)) {
  background: #fff !important; color: #252b31 !important; border-color: #d9dde1 !important; box-shadow: none !important;
}
html body .heads, html body .column-heads, html body .head, html body .column-head,
html body .scene-title, html body .scene-head, html body .aggregate-panel, html body .aggregates,
html body .lighting, html body .metric-table th {
  background: #f6f7f8 !important; color: #252b31 !important; border-color: #d9dde1 !important;
}
html body .head.best, html body .column-head.best-result {
  background: #f0f7e5 !important; color: #252b31 !important;
  border-color: #76b900 !important; box-shadow: none !important;
}
html body .nv-sidebar h2, html body .nv-sidebar h3, html body .nv-preset-heading { color: #252b31 !important; }
html body button, html body select, html body input[type="search"], html body input[type="text"] {
  background: #fff !important; color: #252b31 !important; border: 1px solid #c9d0d6 !important; border-radius: 2px !important;
}
html body button:hover, html body select:hover, html body input:hover { border-color: #76b900 !important; }
html body button.primary, html body .primary, html body button[aria-pressed="true"],
html body .chip.active, html body .filter-option.active, html body .filter.active {
  background: #f0f7e5 !important; color: #4f7900 !important; border-color: #76b900 !important; box-shadow: none !important;
}
html body input[type="checkbox"], html body input[type="radio"], html body input[type="range"] { accent-color: #76b900; }
html body .nv-dashboard-button, html body .dashboard-link, html body .dashboard, html body .back {
  background: #76b900 !important; color: #111 !important; border: 1px solid #76b900 !important;
  border-radius: 2px !important; text-decoration: none !important; font-weight: 600 !important;
}
html body .nv-dashboard-button:hover, html body .dashboard-link:hover, html body .dashboard:hover, html body .back:hover {
  background: #8ac91b !important; color: #111 !important;
}
html body .filter-option, html body .chip, html body .object-average, html body .summary-card,
html body .metric, html body .meta span { background: #fff !important; color: #252b31 !important; border-color: #d9dde1 !important; }

/* Image canvases remain neutral; text and metrics follow the light page theme. */
html body .cell, html body .image-cell, html body .tile {
  background: #fff !important; color: #252b31 !important; border-color: #d9dde1 !important;
}
html body .cell:has(.reference), html body .cell.reference-cell,
html body .tile:has(.reference), html body .tile.reference-tile {
  background: #fff !important; color: #252b31 !important; border-color: #d9dde1 !important;
}
html body .cell:has(.reference) .cell-footer, html body .cell.reference-cell .cell-footer,
html body .tile:has(.reference) .tile-info, html body .tile.reference-tile .tile-info {
  background: #fff !important; color: #252b31 !important; border-top-color: #d9dde1 !important;
}
html body .reference, html body .reference-label {
  background: #fff !important; color: #626c75 !important;
}
html body .image-button { background: #f3f4f5 !important; }
html body .cell-footer, html body .image-metrics, html body .tile-info,
html body .nv-metric-strip, html body .metric-table tbody tr, html body .metric-table tbody td {
  background: #fff !important; color: #252b31 !important; border-color: #d9dde1 !important;
}
html body .nv-metric-item { background: #fff !important; border: 1px solid transparent; }
html body .nv-metric-name { color: #4f7900 !important; }
html body .nv-metric-value { color: #252b31 !important; }
html body .nv-metric-item.nv-best-metric, html body .metric-table tbody td.nv-best-metric,
html body .cell.best, html body .image-cell.best-result {
  background: #fff !important; border-color: #76b900 !important; box-shadow: inset 0 0 0 1px #76b900 !important;
}
html body .nv-metric-item.nv-best-metric .nv-metric-value, html body .metric-table tbody td.nv-best-metric {
  color: #4f7900 !important; font-weight: 800 !important;
}
html body .viewer-zoom-tools { background: #fff; color: #252b31; border-color: #c9d0d6; box-shadow: 0 7px 22px #0002; }
html body .viewer-zoom-status { color: #626c75; }
html body .viewer-zoom-sync { color: #4f7900; }
html body .scene-prompt {
  background: #f6f7f8 !important; color: #252b31 !important;
  border: 1px solid #d9dde1 !important; border-left: 3px solid #76b900 !important;
  border-radius: 2px !important;
}
html body .scene-prompt strong { color: #4f7900 !important; }
html body .scene-prompt p { color: #252b31 !important; }

/* Dataset galleries. */
html body .gallery figure { background: #fff !important; border: 1px solid #d9dde1 !important; border-radius: 2px !important; }
html body .gallery figcaption { color: #252b31; border-top: 1px solid #e5e8eb; }
@media (max-width: 700px) {
  .site-nav { padding-inline: 4vw; }
  html body > main.shell { width: 94vw; }
  html body .grid { grid-template-columns: 1fr; }
}
