﻿:root {
  --bg-a: #f5f9ff;
  --bg-b: #effaf1;
  --ink: #122438;
  --muted: #50637a;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(18, 36, 56, 0.12);
  --accent: #0f8d60;
  --accent-2: #1f65d7;
  --alert: #e17b2d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background: linear-gradient(140deg, var(--bg-a) 0%, var(--bg-b) 58%, #fffcf4 100%);
  min-height: 100vh;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 320px at 86% 8%, rgba(31, 101, 215, 0.14), transparent 70%),
    radial-gradient(560px 300px at 6% 88%, rgba(15, 141, 96, 0.12), transparent 70%);
}

.container {
  width: 85vw;
  margin: 0 auto;
  position: relative;
}

.site-header {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.45rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 1.12rem;
}

.site-nav a.active,
.site-nav a:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.main-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0 28px;
}

.hero {
  padding: 6px 2px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  font-family: "Space Grotesk", sans-serif;
}

.hero p {
  color: var(--muted);
  margin: 8px 0 0;
}

.hero-wide {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.hero-canvas {
  border: 1px dashed var(--line);
  border-radius: 16px;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #3f5470;
  background: linear-gradient(135deg, rgba(31,101,215,0.08), rgba(15,141,96,0.08));
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  font-size: 0.8rem;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.grid { display: grid; gap: 16px; }
.three-col { align-items: start; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: minmax(460px, 0.95fr) minmax(0, 1fr) minmax(0, 1fr); }
.col-span-2 { grid-column: span 2; }
.metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card,
.metric-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 22px rgba(18, 36, 56, 0.08);
}

.three-col > .card.col-span-2 {
  max-height: 820px;
  overflow: auto;
}

.metric-card h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.metric-card p {
  margin: 8px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.muted { margin: 0 0 10px; color: var(--muted); }

.form-grid { display: grid; gap: 10px; }
.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}

input, select, button {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  font: inherit;
}

button {
  border: none;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  cursor: pointer;
}

button:hover { opacity: 0.95; }

pre {
  margin: 0;
  border-radius: 12px;
  background: #0f1c2a;
  color: #d8e4f8;
  padding: 12px;
  overflow: auto;
  min-height: 98px;
}

.list-grid {
  display: grid;
  gap: 8px;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.7);
}

.dataset-item {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 400;
  text-align: left;
  background: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.dataset-item strong,
.dataset-item small {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dataset-item:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 101, 215, 0.45);
  background: rgba(255, 255, 255, 0.9);
}

.dataset-item.active {
  border-color: rgba(15, 141, 96, 0.55);
  background: linear-gradient(130deg, rgba(15,141,96,0.11), rgba(31,101,215,0.12));
}

.dataset-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  margin-top: 9px;
}

.dataset-tag-row span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(36, 105, 216, 0.18);
  border-radius: 999px;
  color: #1550a8;
  background: rgba(36, 105, 216, 0.07);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.dataset-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dataset-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  font-size: 0.82rem;
  font-weight: 800;
}

.dataset-action-secondary {
  color: #17395f;
  border: 1px solid rgba(24, 49, 75, 0.14);
  background: rgba(255, 255, 255, 0.76);
}

.overview-filter {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(18, 36, 56, 0.08);
}

.overview-filter:not([open]) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.overview-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 12px 16px;
  color: #fff;
  background: #623896;
  font-weight: 700;
  font-size: 1.75rem;
  cursor: pointer;
  list-style: none;
}

.overview-filter:not([open]) > .overview-summary {
  border-radius: 8px;
}

.overview-summary::-webkit-details-marker {
  display: none;
}

.overview-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.overview-title::before {
  content: "";
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  background: currentColor;
  clip-path: polygon(6% 8%, 94% 8%, 62% 48%, 62% 92%, 38% 92%, 38% 48%);
  opacity: 0.96;
}

.overview-summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #fff;
  transform: rotate(0deg);
  transition: transform .16s ease;
}

.overview-filter[open] > .overview-summary::after {
  transform: rotate(180deg);
}

.overview-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.filter-state {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(18, 36, 56, 0.1);
  border-radius: 8px;
  background: rgba(250, 252, 255, 0.7);
}

.filter-state span {
  min-height: 36px;
  padding: 10px 12px;
  color: #fff;
  background: #6f7982;
  border-radius: 4px;
  font-size: 1.16rem;
}

.filter-state span.active {
  background: linear-gradient(90deg, rgba(21, 147, 108, 0.95), rgba(36, 105, 216, 0.95));
  box-shadow: 0 8px 18px rgba(36, 105, 216, 0.14);
}

.filter-section {
  overflow: hidden;
  border: 1px solid rgba(18, 36, 56, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 9px 18px rgba(18, 36, 56, 0.06);
}

.filter-section header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(18, 36, 56, 0.1);
}

.filter-section h2 {
  margin: 0;
  font-size: 1.5rem;
}

.filter-clear {
  width: auto;
  padding: 9px 12px;
  border-radius: 7px;
  color: #fff;
  background: #c7cbd0;
  font-weight: 700;
  font-size: 1.14rem;
}

.filter-panel {
  display: grid;
  gap: 10px;
  padding: 14px 18px 0;
}

.filter-search {
  border-radius: 9px;
  border: 1px solid rgba(18, 36, 56, 0.14);
  color: var(--ink);
  background: #fff;
  font-size: 1.14rem;
}

.filter-options {
  max-height: 270px;
  overflow: auto;
  border-top: 1px solid rgba(18, 36, 56, 0.08);
}

.filter-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 11px 10px 11px 0;
  border: 0;
  border-bottom: 1px solid rgba(18, 36, 56, 0.08);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-size: 1.18rem;
  font-weight: 600;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}

.filter-option:hover,
.filter-option.active {
  background: linear-gradient(90deg, rgba(36, 105, 216, 0.08), rgba(21, 147, 108, 0.06));
}

.filter-option.active {
  color: #0d2d52;
  box-shadow: inset 4px 0 0 #2469d8;
}

.filter-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.filter-option strong {
  min-width: 38px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: #7044b6;
  font-size: 0.8rem;
  text-align: center;
}

.filter-option.active strong {
  background: #15936c;
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.button-secondary {
  color: var(--ink);
  background: rgba(18, 36, 56, 0.08);
}

.panel-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-panel {
  min-height: 140px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(31,101,215,0.05);
  transition: transform .18s ease, background .18s ease;
}

.mini-panel.active {
  transform: translateY(-2px);
  background: rgba(15,141,96,0.12);
}

.ordered { margin: 0; padding-left: 18px; }
.ordered li { margin: 4px 0; }

.plain-list {
  margin: 0;
  padding-left: 16px;
}

.plain-list li {
  margin: 4px 0;
}

/* Download table */
.download-hero h1 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.download-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.download-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.download-table-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 10px 22px rgba(18, 36, 56, 0.08);
}

.download-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.download-table-wrap {
  overflow: auto;
  border: 1px solid rgba(18, 36, 56, 0.08);
  border-radius: 10px;
}

.download-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  background: #fff;
}

.download-table th,
.download-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(18, 36, 56, 0.08);
  text-align: left;
  vertical-align: middle;
}

.download-table th {
  color: #1b2b3d;
  background: #f7f9fb;
  font-size: 0.9rem;
}

.download-table td {
  color: #50637a;
}

.download-table small {
  color: #708197;
}

.download-link {
  color: #1f65d7;
  font-weight: 700;
  text-decoration: none;
}

.download-link:hover {
  text-decoration: underline;
}

.download-empty {
  text-align: center;
  color: var(--muted);
}

.download-access-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.download-access-copy,
.download-install-card,
.download-access-card,
.download-code-card,
.download-data-products,
.download-data-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.download-access-copy {
  padding: 32px;
}

.download-access-copy h1 {
  margin: 8px 0 14px;
  color: #102235;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.15rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.download-access-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.download-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}

.download-install-card {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(36, 105, 216, 0.08), rgba(20, 127, 102, 0.08)),
    var(--card);
}

.download-card-label,
.download-step {
  color: #2469d8;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.download-install-card pre,
.download-code-card pre {
  margin: 0;
  min-height: 0;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(24, 49, 75, 0.12);
  background: #102235;
}

.download-install-card pre {
  padding: 18px;
}

.download-install-card code,
.download-code-card code {
  color: #eaf4ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.download-install-card p {
  margin: 0;
  color: #52687f;
  line-height: 1.6;
}

.download-access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.download-access-card {
  padding: 20px;
}

.download-access-card h2,
.download-code-card h2,
.download-data-products h2 {
  margin: 6px 0 8px;
  color: #102235;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.22rem;
  letter-spacing: 0;
}

.download-access-card p,
.download-data-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.download-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.download-code-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  min-width: 0;
}

.download-section-head {
  display: grid;
  gap: 3px;
}

.download-code-card pre {
  padding: 18px;
}

.download-data-products {
  padding: 22px;
}

.download-data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.download-data-card {
  padding: 18px;
  box-shadow: none;
}

.download-data-card h3 {
  margin: 0 0 8px;
  color: #102235;
  font-size: 1rem;
}

@media (max-width: 980px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-wide { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: auto; }
  .download-access-hero,
  .download-code-grid,
  .download-data-grid,
  .about-hero {
    grid-template-columns: 1fr;
  }
  .download-access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-feature-grid,
  .about-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .two-col, .panel-grid.two { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .filter-state { grid-template-columns: 1fr; }
  .download-filters,
  .download-toolbar {
    grid-template-columns: 1fr;
  }
  .site-nav { gap: 5px; }
  .site-nav a { font-size: 0.82rem; padding: 5px 9px; }
  .download-access-copy,
  .download-install-card {
    padding: 22px;
  }
  .download-access-grid {
    grid-template-columns: 1fr;
  }
  .about-hero-copy,
  .about-section-card {
    padding: 22px;
  }
  .about-snapshot,
  .about-feature-grid,
  .about-module-grid {
    grid-template-columns: 1fr;
  }
}

/* Home page wireframe */
.home-hero-image {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.86), rgba(255,255,255,0.68) 48%, rgba(255,255,255,0.28)),
    url("/image/bg.png") center / 100% auto no-repeat;
}

.home-hero-copy {
  width: min(760px, 72vw);
  margin-left: -12vw;
  color: #66727d;
  text-align: left;
}

.home-hero-copy h1 {
  margin: 0 0 24px;
  color: #6f9db2;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 3.35rem);
  line-height: 1.16;
  font-weight: 700;
  text-wrap: balance;
}

.home-hero-copy h1::before {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-right: 10px;
  vertical-align: -0.14em;
  background: #7aa7bc;
}

.home-hero-copy p {
  margin: 0;
  font-size: clamp(1.05rem, 1.25vw, 1.28rem);
  line-height: 1.65;
  text-align: justify;
}

.home-hero-btn {
  width: auto;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(31, 101, 215, 0.24);
}

.home-hero-copy .home-hero-btn {
  display: flex;
  width: max-content;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.home-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  color: #17395f;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(24, 49, 75, 0.16);
  box-shadow: 0 10px 22px rgba(16, 34, 53, 0.08);
}

.home-quick-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 8px;
  width: min(760px, 100%);
  margin: 18px 0 0;
  padding: 8px;
  border: 1px solid rgba(24, 49, 75, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.home-quick-search input {
  border-color: transparent;
  background: rgba(255,255,255,0.92);
}

.home-quick-search button {
  min-width: 110px;
}

.home-search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-search-results:empty {
  display: none;
}

.overview-search-results {
  margin-top: -4px;
}

.home-search-item {
  color: var(--ink);
  text-decoration: none;
}

.home-search-more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: 1px dashed rgba(36, 105, 216, 0.28);
  border-radius: 12px;
  color: #1550a8;
  background: rgba(36, 105, 216, 0.06);
  font-weight: 800;
  text-decoration: none;
}

.hero-home {
  position: relative;
  min-height: 66vh;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(130deg, rgba(16, 35, 52, 0.9), rgba(16, 30, 56, 0.78));
}

.hero-home-bg {
  position: absolute;
  inset: 0;
}

#heroUmCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-home-content {
  position: relative;
  z-index: 2;
  color: #f4f7fd;
  max-width: 860px;
  padding: 38px;
}

.hero-home-content h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.9rem);
}

.hero-home-content p {
  margin: 0 0 16px;
  color: #cfdbef;
  font-size: 1.02rem;
}

.search-large {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 16px 0 14px;
}

.search-large input {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 15px;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(90deg, #13a16f, #2174ea);
  color: #fff;
}

.btn-outline {
  color: #f4f7fd;
  border-color: rgba(244, 247, 253, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.page-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin-top: -6px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px rgba(31, 101, 215, 0.16);
}

.btn-back::before {
  content: "<";
  margin-right: 8px;
  font-weight: 700;
}

.btn-forward::before {
  content: none;
  margin-right: 0;
}

.btn-forward::after {
  content: ">";
  margin-left: 8px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .page-action-row {
    align-items: stretch;
  }

  .page-action-row .btn {
    width: 100%;
  }
}

.metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  padding: 12px;
}

.metrics-bar article {
  border-right: 1px dashed var(--line);
  padding: 6px 10px;
}

.metrics-bar article:last-child {
  border-right: 0;
}

.metrics-bar strong {
  display: block;
  font-size: 1.28rem;
}

.metrics-bar span {
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.feature-card h3 {
  margin: 0 0 8px;
}

.feature-card p {
  color: var(--muted);
  margin: 0 0 10px;
}

.feature-card pre {
  min-height: auto;
  font-size: 0.82rem;
}

.feature-hover {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(120deg, rgba(33, 116, 234, 0.09), rgba(19, 161, 111, 0.1));
  transition: transform .2s ease, background .2s ease;
}

.feature-card:hover .feature-hover {
  transform: translateY(-2px);
  background: linear-gradient(120deg, rgba(33, 116, 234, 0.18), rgba(19, 161, 111, 0.22));
}

.feature-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.8rem;
}

.preview-section {
  padding: 14px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  margin-bottom: 10px;
}

.preview-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 8px;
}

.preview-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.preview-canvas-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(15, 26, 48, 0.95), rgba(9, 25, 46, 0.92));
  min-height: 340px;
  overflow: hidden;
}

#datasetPreviewCanvas {
  width: 100%;
  height: 100%;
  min-height: 340px;
  display: block;
  cursor: grab;
}

.preview-list {
  max-height: 340px;
  overflow: auto;
}

@media (max-width: 980px) {
  .metrics-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-bar article {
    border-right: 0;
    border-bottom: 1px dashed var(--line);
  }

  .metrics-bar article:nth-last-child(-n+2) {
    border-bottom: 0;
  }

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

  .explorer-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .explorer-layout > .overview-filter,
  .explorer-layout > .explorer-results-card {
    height: auto;
    min-height: 0;
  }

  .explorer-results-card #datasetList,
  .explorer-layout .overview-body {
    overflow: visible;
  }

  .preview-header {
    flex-direction: column;
    align-items: stretch;
  }

  .preview-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .home-hero-copy {
    width: min(92vw, 760px);
    margin-left: 0;
  }

  .hero-home-content {
    padding: 24px 16px;
  }

  .search-large {
    grid-template-columns: 1fr;
  }

  .home-quick-search,
  .home-search-results {
    grid-template-columns: 1fr;
  }

  .preview-filters {
    grid-template-columns: 1fr;
  }
}

/* Visualization page */
.visualization-workspace {
  grid-template-columns: minmax(360px, 0.75fr) minmax(0, 1.65fr);
  align-items: stretch;
}

.umap-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.vis-canvas-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  min-height: 620px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.72);
}

#visCanvas {
  width: 100%;
  height: 620px;
  display: block;
  touch-action: none;
}

.vis-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.vis-stat-grid article {
  min-height: 110px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(18, 36, 56, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.vis-stat-grid strong {
  color: #1397aa;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
}

.vis-stat-grid span {
  color: var(--muted);
  font-size: 1rem;
}

.composition-card {
  padding: 22px;
}

.composition-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.composition-head h2 {
  margin: 0 0 6px;
}

.composition-field {
  flex: 0 0 auto;
  border: 1px solid rgba(36, 105, 216, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
  color: #1550a8;
  background: rgba(36, 105, 216, 0.08);
  font-size: 0.86rem;
  font-weight: 800;
}

.composition-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: stretch;
}

.composition-chart-wrap {
  position: relative;
  min-height: 330px;
  border: 1px solid rgba(18, 36, 56, 0.1);
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.composition-chart-wrap canvas {
  width: 100%;
  height: 330px;
  display: block;
}

.bar-wrap {
  min-height: 380px;
}

.bar-wrap canvas {
  height: 380px;
}

.donut-wrap {
  display: grid;
  place-items: center;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-center strong {
  color: #1397aa;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  line-height: 1;
}

.donut-center span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}

.composition-tooltip {
  position: absolute;
  z-index: 6;
  display: none;
  min-width: 150px;
  padding: 8px 10px;
  border: 1px solid rgba(18, 36, 56, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  pointer-events: none;
}

.composition-tooltip strong,
.composition-tooltip span {
  display: block;
}

.composition-tooltip strong {
  color: #102235;
}

.composition-tooltip span {
  color: var(--muted);
  font-size: 0.85rem;
}

.vis-tooltip {
  position: absolute;
  z-index: 4;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid rgba(18, 36, 56, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(18, 36, 56, 0.14);
  pointer-events: none;
  font-size: 0.84rem;
}

.vis-tooltip strong,
.vis-tooltip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qc-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.qc-panel h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.qc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qc-grid article {
  padding: 10px;
  border: 1px solid rgba(18, 36, 56, 0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
}

.qc-grid span,
.qc-grid small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.qc-grid strong {
  display: block;
  margin: 4px 0;
  color: #1397aa;
  font-size: 1.15rem;
}

.umap-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.umap-tab {
  min-height: 42px;
  padding: 9px 10px;
  color: var(--ink);
  background: rgba(18, 36, 56, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.96rem;
}

.umap-tab.active {
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.vis-legend {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  gap: 6px;
  min-width: 104px;
  max-width: 180px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(18, 36, 56, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(18, 36, 56, 0.12);
  font-size: 0.86rem;
  backdrop-filter: blur(4px);
}

.vis-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vis-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  flex: 0 0 12px;
}

/* Analysis page */
.analysis-hero {
  padding-bottom: 0;
}

.analysis-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(0, 1.6fr);
  gap: 16px;
  align-items: stretch;
}

.analysis-control-card {
  align-self: stretch;
}

.analysis-control-card button {
  min-height: 44px;
}

.analysis-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.analysis-dataset-combobox {
  position: relative;
}

.gene-suggest-wrap {
  position: relative;
}

.dataset-suggest-list,
.gene-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: none;
  max-height: 280px;
  overflow: auto;
  border: 1px solid rgba(24, 49, 75, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(16, 34, 53, 0.14);
}

.dataset-suggest-list.open,
.gene-suggest-list.open {
  display: block;
}

.dataset-suggest-option,
.gene-suggest-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(24, 49, 75, 0.08);
  border-radius: 0;
  color: #102235;
  background: transparent;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.dataset-suggest-option:last-child,
.gene-suggest-option:last-child {
  border-bottom: 0;
}

.dataset-suggest-option:hover,
.dataset-suggest-option.active,
.gene-suggest-option:hover,
.gene-suggest-option.active {
  background: #f1f6fb;
}

.dataset-suggest-option span,
.gene-suggest-option span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dataset-suggest-option strong,
.gene-suggest-option strong {
  min-width: 0;
  overflow: hidden;
  color: #102235;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dataset-suggest-option small,
.gene-suggest-option small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dataset-suggest-option em,
.gene-suggest-option em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  color: #1550a8;
  background: rgba(36, 105, 216, 0.09);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.dataset-suggest-empty,
.gene-suggest-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.analysis-export-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.analysis-export-panel button {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.analysis-export-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.analysis-nav-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.analysis-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
}

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

.analysis-card-head h2 {
  margin-bottom: 4px;
}

.analysis-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.analysis-stats article {
  padding: 10px;
  border: 1px solid rgba(18, 36, 56, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.analysis-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.analysis-stats strong {
  display: block;
  margin-top: 4px;
  color: #1397aa;
  font-size: 1.18rem;
}

.analysis-canvas-wrap {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f8fbff;
}

#analysisFeatureCanvas {
  width: 100%;
  height: 520px;
  display: block;
  touch-action: none;
}

.analysis-peaks-card {
  display: grid;
  gap: 14px;
}

.locus-view {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.locus-region {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.locus-track {
  position: relative;
  height: 84px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(18, 36, 56, 0.08) 1px, transparent 1px) 0 0 / 10% 100%,
    rgba(248, 251, 255, 0.9);
  border: 1px solid rgba(18, 36, 56, 0.08);
}

.locus-peak {
  position: absolute;
  top: 16px;
  height: 22px;
  border-radius: 4px;
}

.locus-gene {
  position: absolute;
  bottom: 22px;
  height: 9px;
  border-radius: 999px;
  background: #122438;
}

.locus-tss {
  position: absolute;
  top: 8px;
  bottom: 10px;
  width: 2px;
  background: #e17b2d;
}

.locus-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
}

.locus-label-row strong {
  color: var(--ink);
}

.peak-heatmap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: rgba(255,255,255,0.7);
}

.heatmap-header,
.heatmap-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.8fr) repeat(9, minmax(42px, 1fr));
  align-items: stretch;
  min-width: 760px;
}

.heatmap-header {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
}

.heatmap-header strong,
.heatmap-header span,
.heatmap-row strong,
.heatmap-row span {
  min-height: 34px;
  padding: 8px 10px;
  border-right: 1px solid rgba(18, 36, 56, 0.08);
  border-bottom: 1px solid rgba(18, 36, 56, 0.08);
}

.heatmap-row strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.heatmap-row span {
  display: block;
}

.heatmap-empty {
  padding: 14px;
  color: var(--muted);
}

.analysis-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
}

.analysis-peak-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

.analysis-peak-table th,
.analysis-peak-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(18, 36, 56, 0.08);
  text-align: left;
  vertical-align: top;
}

.analysis-peak-table th {
  position: sticky;
  top: 0;
  color: var(--ink);
  background: #f8fbff;
  z-index: 1;
}

@media (max-width: 760px) {
  #visCanvas {
    height: 420px;
  }

  .vis-canvas-wrap {
    min-height: 420px;
  }

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

  .dataset-suggest-list,
  .gene-suggest-list {
    max-height: 240px;
  }

  .dataset-suggest-option,
  .gene-suggest-option {
    align-items: flex-start;
  }

  .dataset-suggest-option em,
  .gene-suggest-option em {
    white-space: nowrap;
  }

  .analysis-export-panel {
    grid-template-columns: 1fr;
  }

  .analysis-nav-panel {
    grid-template-columns: 1fr;
  }

  #analysisFeatureCanvas {
    height: 420px;
  }

  .analysis-canvas-wrap {
    min-height: 420px;
  }
}

/* Home stats + knowledge graph overrides */
.metrics-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(22, 46, 74, 0.16);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(245, 251, 255, 0.86));
}

.metrics-bar article {
  border-right: 1px dashed rgba(30, 58, 89, 0.2);
  padding: 14px 16px;
}

.metrics-bar article:last-child {
  border-right: 0;
}

.metrics-bar strong {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: 0.2px;
  color: #0d2d52;
}

.metrics-bar span {
  display: block;
  margin-top: 4px;
  font-size: 0.86rem;
  color: #3e5b79;
}

.kg-preview {
  padding: 14px;
}

.kg-head h2 {
  margin: 0 0 6px;
}

.kg-head p {
  margin: 0 0 10px;
  color: var(--muted);
}

.kg-canvas-wrap {
  border: 1px solid rgba(122, 152, 194, 0.28);
  border-radius: 12px;
  min-height: 220px;
  background: linear-gradient(145deg, rgba(17, 31, 56, 0.94), rgba(16, 36, 64, 0.86));
  overflow: hidden;
}

#kgPreviewCanvas {
  width: 100%;
  height: 220px;
  display: block;
}

@media (max-width: 980px) {
  .metrics-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-bar article {
    border-right: 0;
    border-bottom: 1px dashed rgba(30, 58, 89, 0.2);
  }

  .metrics-bar article:nth-last-child(-n+2) {
    border-bottom: 0;
  }
}

/* Unified visual system */
:root {
  --bg-a: #f6f9fc;
  --bg-b: #eef7f4;
  --ink: #102235;
  --muted: #587089;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(24, 49, 75, 0.12);
  --accent: #15936c;
  --accent-2: #2469d8;
  --accent-soft: rgba(21, 147, 108, 0.11);
  --blue-soft: rgba(36, 105, 216, 0.1);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --shadow: 0 14px 34px rgba(16, 34, 53, 0.08);
  --shadow-soft: 0 8px 20px rgba(16, 34, 53, 0.06);
  --radius: 14px;
}

body {
  background:
    radial-gradient(900px 420px at 88% 2%, rgba(36, 105, 216, 0.12), transparent 68%),
    radial-gradient(760px 360px at 0% 92%, rgba(21, 147, 108, 0.11), transparent 70%),
    linear-gradient(140deg, var(--bg-a) 0%, var(--bg-b) 58%, #fbfcf7 100%);
}

.bg-layer {
  background:
    linear-gradient(rgba(255,255,255,0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.24) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.42;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 250, 252, 0.78);
  border-bottom: 1px solid rgba(24, 49, 75, 0.09);
  box-shadow: 0 8px 24px rgba(16, 34, 53, 0.04);
}

.brand {
  color: #0e2337;
  letter-spacing: 0;
}

.site-nav a {
  color: #52687f;
  background: rgba(255,255,255,0.38);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.site-nav a.active,
.site-nav a:hover {
  border-color: rgba(36, 105, 216, 0.2);
  background: var(--surface-strong);
  color: #102235;
  box-shadow: 0 6px 16px rgba(16, 34, 53, 0.06);
}

.hero,
.download-hero,
.analysis-hero {
  padding: 10px 2px 4px;
}

.hero h1,
.download-hero h1,
.home-hero-copy h1 {
  color: #102235;
  letter-spacing: 0;
}

.hero p,
.download-hero p,
.muted {
  color: var(--muted);
}

.card,
.metric-card,
.download-table-card,
.feature-card,
.kg-preview,
.preview-section,
.overview-filter,
.filter-section,
.locus-view,
.peak-heatmap,
.analysis-table-wrap,
.vis-canvas-wrap,
.analysis-canvas-wrap,
.kg-canvas-wrap,
.preview-canvas-wrap {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card h2,
.filter-section h2,
.analysis-card-head h2,
.kg-head h2 {
  color: #102235;
  letter-spacing: 0;
}

input,
select {
  color: var(--ink);
  background: var(--surface-strong);
  border-color: rgba(24, 49, 75, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

input:focus,
select:focus {
  outline: 2px solid rgba(36, 105, 216, 0.18);
  border-color: rgba(36, 105, 216, 0.45);
}

button,
.btn-primary,
.btn-back,
.home-hero-btn {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 22px rgba(36, 105, 216, 0.16);
}

.button-secondary {
  color: #102235;
  background: rgba(24, 49, 75, 0.08);
  box-shadow: none;
}

.list-item,
.dataset-item,
.qc-grid article,
.analysis-stats article,
.vis-stat-grid article,
.metrics-bar,
.filter-state,
.download-table,
.feature-hover {
  border-color: rgba(24, 49, 75, 0.1);
  background: var(--surface);
}

.dataset-item:hover,
.filter-option:hover,
.filter-option.active {
  border-color: rgba(36, 105, 216, 0.26);
  background: linear-gradient(120deg, var(--blue-soft), var(--accent-soft));
}

.overview-summary {
  background: linear-gradient(90deg, #147f66, #2b63c7);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.12);
}

.filter-clear {
  background: #d4dae1;
  color: #20364c;
  box-shadow: none;
}

.filter-state span {
  background: #687785;
}

.filter-option strong,
.vis-stat-grid strong,
.qc-grid strong,
.analysis-stats strong {
  color: #1397aa;
}

.filter-option strong {
  color: #fff;
  background: #2469d8;
}

.download-table th,
.analysis-peak-table th,
.heatmap-header {
  background: #f4f8fb;
}

.download-table td,
.analysis-peak-table td {
  color: #52687f;
}

.vis-canvas-wrap,
.analysis-canvas-wrap,
.locus-track {
  background: #f8fbff;
}

.vis-legend,
.vis-tooltip {
  background: rgba(255,255,255,0.92);
  border-color: rgba(24, 49, 75, 0.12);
  box-shadow: var(--shadow-soft);
}

.home-hero-image {
  border: 1px solid rgba(24, 49, 75, 0.08);
  box-shadow: var(--shadow);
}

.home-hero-copy p {
  color: #5d6f7f;
}

.metrics-bar strong,
.download-link {
  color: #2469d8;
}

.metrics-bar article {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  min-height: 138px;
  text-align: center;
}

.metric-icon {
  width: 48px;
  height: 48px;
  color: #2469d8;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
  padding: 2px;
}

.metric-icon path {
  fill: none;
}

.metric-icon circle,
.metric-icon ellipse {
  fill: currentColor;
}

.metric-icon-accent {
  color: #7044b6;
}

.metrics-bar article:nth-child(4) strong {
  color: #7044b6;
}

.metrics-bar strong {
  margin-top: 2px;
  font-size: clamp(1.85rem, 3.1vw, 2.5rem);
  line-height: 1;
}

.metrics-bar span {
  margin-top: 0;
  color: #34485f;
  font-size: clamp(0.92rem, 1.2vw, 1.08rem);
  font-weight: 700;
}

/* Documentation page */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.about-hero-copy,
.about-snapshot,
.about-section-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.about-hero-copy {
  padding: 32px;
}

.about-hero-copy h1 {
  margin: 8px 0 14px;
  color: #102235;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.1rem, 3.8vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.about-hero-copy p {
  max-width: 850px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.about-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: rgba(24, 49, 75, 0.08);
}

.about-snapshot article {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 132px;
  padding: 18px;
  background: rgba(255,255,255,0.92);
}

.about-snapshot strong {
  color: #2469d8;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1;
}

.about-snapshot span {
  color: #52687f;
  font-weight: 800;
}

.about-section-card {
  padding: 24px;
}

.about-section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.about-section-head h2 {
  margin: 0;
  color: #102235;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.about-feature-grid article,
.about-module-grid article {
  padding: 18px;
  border: 1px solid rgba(24, 49, 75, 0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
}

.about-feature-grid h3,
.about-module-grid h3 {
  margin: 0 0 8px;
  color: #102235;
  font-size: 1rem;
}

.about-feature-grid p,
.about-module-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.about-module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.about-module-grid article {
  display: grid;
  align-content: start;
  gap: 10px;
}

.about-module-grid a {
  align-self: end;
  color: #2469d8;
  font-weight: 800;
  text-decoration: none;
}

.about-module-grid a:hover {
  text-decoration: underline;
}

.about-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-tag-grid span {
  padding: 7px 10px;
  border: 1px solid rgba(36, 105, 216, 0.18);
  border-radius: 999px;
  color: #1957b2;
  background: rgba(36, 105, 216, 0.08);
  font-weight: 800;
  font-size: 0.88rem;
}

.about-citation {
  margin-bottom: 16px;
}

.docs-grid {
  align-items: stretch;
}

.docs-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.docs-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.docs-card code {
  padding: 2px 5px;
  border: 1px solid rgba(24, 49, 75, 0.1);
  border-radius: 6px;
  color: #17395f;
  background: rgba(36, 105, 216, 0.06);
  font-size: 0.92em;
}

.docs-card .plain-list {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.docs-card pre {
  min-height: auto;
  background: #102235;
}

.docs-card pre code,
.about-citation pre code {
  display: block;
  width: max-content;
  min-width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  white-space: pre;
}

@media (max-width: 1120px) {
  .about-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .about-hero,
  .docs-grid,
  .about-feature-grid,
  .about-module-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-hero,
  .about-hero > *,
  .about-section-card,
  .docs-card,
  .about-citation,
  .about-snapshot,
  .about-feature-grid article,
  .about-module-grid article {
    min-width: 0;
    max-width: 100%;
  }

  .about-hero-copy,
  .about-snapshot,
  .about-section-card,
  .docs-card {
    padding: 16px;
  }

  .about-hero-copy h1 {
    font-size: clamp(1.75rem, 9vw, 2.4rem);
    line-height: 1.08;
  }

  .about-hero-copy p,
  .about-feature-grid p,
  .about-module-grid p,
  .docs-card p,
  .docs-card li {
    overflow-wrap: anywhere;
  }

  .about-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-snapshot article {
    min-height: 104px;
    padding: 14px;
  }

  .about-snapshot strong {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
  }

  .about-snapshot span {
    font-size: 0.86rem;
    overflow-wrap: anywhere;
  }

  .about-module-grid article {
    min-height: auto;
  }

  .about-tag-grid span {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .docs-card pre,
  .about-citation pre {
    max-width: 100%;
    overflow-x: auto;
  }
}

/* Data Explorer filter refinements */
.filter-state span.active {
  background: linear-gradient(90deg, #15936c, #2469d8);
  box-shadow: 0 8px 18px rgba(36, 105, 216, 0.16);
}

.filter-option {
  padding-left: 12px;
}

.filter-option:hover,
.filter-option.active {
  background: #fff;
}

.filter-option.active {
  background: #fff;
  box-shadow: inset 4px 0 0 #2469d8;
}

.filter-option.active strong {
  background: #2469d8;
}

/* Data Explorer balanced workspace */
.explorer-layout {
  grid-template-columns: minmax(420px, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
  align-items: start;
}

.explorer-layout > .overview-filter {
  height: auto;
  min-height: 0;
}

.explorer-layout > .explorer-results-card {
  height: clamp(700px, calc(100vh - 190px), 920px);
  min-height: 700px;
}

.explorer-layout .overview-body {
  overflow: visible;
  padding: 14px;
}

.explorer-results-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
}

.explorer-results-card > h2,
.explorer-results-card > .muted {
  flex: 0 0 auto;
}

.explorer-results-card > h2 {
  margin-bottom: 6px;
}

.explorer-results-card #datasetList {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: 8px;
  padding-right: 4px;
}

.explorer-layout .filter-options {
  max-height: 230px;
}

.explorer-layout .filter-section header {
  min-height: 54px;
  padding: 12px 14px;
}

.explorer-layout .filter-section h2 {
  font-size: 1.18rem;
}

.explorer-layout .filter-state {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
}

.explorer-layout .filter-state span {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 0.98rem;
}

.explorer-layout .filter-option,
.explorer-layout .filter-option:hover,
.explorer-layout .filter-option.active {
  background: #fff;
}

@media (max-width: 1120px) {
  .explorer-layout {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .explorer-layout > .overview-filter,
  .explorer-layout > .explorer-results-card {
    min-width: 0;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .explorer-results-card #datasetList,
  .explorer-layout .overview-body {
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .explorer-layout,
  .explorer-layout > *,
  .explorer-layout .overview-body,
  .explorer-layout .filter-state,
  .explorer-layout .filter-section,
  .explorer-layout .filter-panel,
  .explorer-layout .filter-options,
  .explorer-layout .filter-option,
  .explorer-results-card,
  .explorer-results-card #datasetList {
    overflow-x: hidden;
    min-width: 0;
    max-width: 100%;
  }

  .explorer-layout .overview-summary {
    min-height: 48px;
    padding: 10px 12px;
    font-size: 1.25rem;
  }

  .explorer-layout .overview-title {
    min-width: 0;
  }

  .explorer-layout .overview-title::before {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .explorer-layout .overview-body,
  .explorer-results-card {
    padding: 12px;
  }

  .explorer-layout .filter-state {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .explorer-layout .filter-state span {
    overflow-wrap: anywhere;
  }

  .explorer-layout .filter-section header {
    min-height: 0;
    padding: 10px 12px;
  }

  .explorer-layout .filter-section h2 {
    min-width: 0;
    font-size: 1rem;
  }

  .explorer-layout .filter-panel {
    padding: 12px 12px 0;
  }

  .explorer-layout .filter-search {
    min-width: 0;
  }

  .explorer-layout .filter-option {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 46px;
    font-size: 0.95rem;
  }

  .explorer-layout .filter-option strong {
    min-width: 30px;
    padding: 3px 8px;
  }

  .explorer-layout .filter-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .explorer-results-card > h2 {
    font-size: 1.05rem;
  }

  .explorer-results-card .dataset-item,
  .explorer-results-card .dataset-tag-row {
    width: 100%;
    max-width: 100%;
  }
}

/* NAR-style home resource sections */
.home-resource-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 18px;
  align-items: stretch;
}

.home-resource-copy,
.home-kg-card,
.home-analysis-panel,
.home-data-products,
.home-cta-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.home-resource-copy {
  padding: 30px;
}

.home-compact-resource .home-kg-card {
  justify-content: center;
}

.home-compact-resource .home-kg-card .kg-canvas-wrap,
.home-compact-resource .kg-legend-row {
  display: none;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #2469d8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.home-resource-copy h2,
.home-section-head h2,
.home-analysis-panel h2,
.home-cta-panel h2 {
  max-width: 780px;
  margin: 0 0 12px;
  color: #102235;
  font-size: clamp(1.75rem, 2.7vw, 2.8rem);
  line-height: 1.08;
}

.home-resource-copy p,
.home-section-head p,
.home-analysis-panel p,
.home-cta-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.resource-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.resource-highlights span {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(24, 49, 75, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #18314b;
  font-weight: 700;
}

.home-kg-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.home-kg-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.home-kg-head h3 {
  margin: 0;
  color: #102235;
  font-size: 1.35rem;
}

.kg-status {
  flex: 0 0 auto;
  border: 1px solid rgba(21, 147, 108, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  color: #14785d;
  background: rgba(21, 147, 108, 0.09);
  font-size: 0.78rem;
  font-weight: 800;
}

.home-kg-card .kg-canvas-wrap {
  min-height: 260px;
}

.home-kg-card #kgPreviewCanvas {
  height: 260px;
}

.home-pipeline-image-wrap {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 360px;
  padding: 0;
  border: 1px solid rgba(24, 49, 75, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.home-pipeline-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.barcode-schema {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.barcode-schema div {
  position: relative;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(24, 49, 75, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.barcode-schema div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -7px;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-top: 2px solid rgba(36, 105, 216, 0.45);
  border-right: 2px solid rgba(36, 105, 216, 0.45);
  transform: translateY(-50%) rotate(45deg);
}

.barcode-schema strong,
.barcode-schema span {
  display: block;
}

.barcode-schema strong {
  margin-bottom: 6px;
  color: #102235;
  font-size: 0.9rem;
}

.barcode-schema span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.kg-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.kg-legend-row span {
  border: 1px solid rgba(24, 49, 75, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  color: #3e5b79;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 700;
}

.home-section-head {
  margin: 12px 0 -4px;
}

.home-section-head.compact {
  margin: 0 0 18px;
}

.home-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-module-card {
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.home-module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(36, 105, 216, 0.28);
  box-shadow: 0 18px 36px rgba(16, 34, 53, 0.1);
}

.module-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 30px;
  margin-bottom: 30px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  font-weight: 800;
}

.home-module-card h3 {
  margin: 0 0 10px;
  color: #102235;
  font-size: 1.2rem;
}

.home-module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.home-overview-widget {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248, 251, 255, 0.92)),
    radial-gradient(680px 240px at 82% 0%, rgba(36, 105, 216, 0.08), transparent 68%);
  box-shadow: var(--shadow);
}

.overview-widget-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.overview-widget-head h2 {
  margin: 0;
  color: #102235;
  font-size: clamp(1.35rem, 2vw, 2.05rem);
  line-height: 1.15;
}

.overview-active-label {
  flex: 0 0 auto;
  max-width: 320px;
  padding: 8px 12px;
  border: 1px solid rgba(36, 105, 216, 0.16);
  border-radius: 999px;
  color: #1550a8;
  background: rgba(36, 105, 216, 0.07);
  font-size: 0.84rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.overview-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.overview-stat-grid article {
  min-height: 84px;
  padding: 14px;
  border: 1px solid rgba(24, 49, 75, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.overview-stat-grid strong,
.overview-stat-grid span {
  display: block;
}

.overview-stat-grid strong {
  color: #2469d8;
  font-size: clamp(1.6rem, 2.8vw, 2.45rem);
  line-height: 1;
}

.overview-stat-grid span {
  margin-top: 8px;
  color: #52687f;
  font-size: 0.9rem;
  font-weight: 700;
}

.overview-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.overview-panel {
  padding: 16px;
  border: 1px solid rgba(24, 49, 75, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.overview-wide-panel {
  grid-column: 1 / -1;
}

.overview-panel h3 {
  margin: 0 0 14px;
  color: #102235;
  font-size: 1rem;
}

.overview-bar-list {
  display: grid;
  gap: 8px;
}

.overview-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.68fr) minmax(120px, 1fr) minmax(48px, auto);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #18314b;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-weight: 700;
  animation: overviewBarIn .36s ease both;
  animation-delay: var(--row-delay, 0ms);
}

.overview-bar-row:hover,
.overview-bar-row:focus-visible,
.overview-bar-row.active {
  border-color: rgba(36, 105, 216, 0.2);
  background: rgba(244, 248, 252, 0.92);
  outline: none;
}

.overview-bar-label {
  min-width: 0;
  color: #20364c;
  font-size: 0.88rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.overview-bar-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eff6;
}

.overview-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #15936c, #2469d8);
  transition: width .24s ease, filter .16s ease;
}

.overview-bar-row:hover .overview-bar-fill,
.overview-bar-row.active .overview-bar-fill {
  filter: saturate(1.18);
}

.overview-bar-row strong {
  color: #2469d8;
  font-size: 0.9rem;
  text-align: right;
}

.overview-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(24, 49, 75, 0.12);
  border-radius: 999px;
  color: #20364c;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: none;
  font-size: 0.86rem;
}

.overview-chip:hover,
.overview-chip:focus-visible {
  border-color: rgba(21, 147, 108, 0.3);
  background: rgba(21, 147, 108, 0.08);
  outline: none;
}

.overview-chip span {
  overflow-wrap: anywhere;
}

.overview-chip strong {
  flex: 0 0 auto;
  color: #14785d;
}

.overview-distribution-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.overview-dist-panel {
  min-height: 430px;
  padding: 14px 14px 18px;
  border: 1px solid rgba(24, 49, 75, 0.12);
  border-top: 3px solid rgba(24, 49, 75, 0.18);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 34, 53, 0.04);
}

.overview-compact-panel {
  min-height: 350px;
}

.overview-tall-panel {
  min-height: 460px;
}

.overview-dist-panel h3 {
  margin: 0 0 16px;
  color: #27384b;
  font-size: 1.05rem;
}

.overview-dist-panel h3 span {
  display: block;
  margin-top: 3px;
  color: #718198;
  font-size: 0.78rem;
  font-weight: 700;
}

.overview-donut-chart {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: center;
  justify-items: center;
  min-height: 280px;
  height: 100%;
}

.overview-compact-panel .overview-donut-chart {
  align-content: center;
}

.overview-donut {
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(24, 49, 75, 0.08);
}

.overview-donut::after {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(24, 49, 75, 0.08);
}

.overview-donut > div {
  position: absolute;
  inset: 29%;
  z-index: 1;
  display: grid;
  place-content: center;
  text-align: center;
}

.overview-donut strong,
.overview-donut span {
  display: block;
}

.overview-donut strong {
  color: #27384b;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1;
}

.overview-donut span {
  margin-top: 5px;
  color: #65758a;
  font-size: 0.82rem;
  font-weight: 700;
}

.overview-donut-legend {
  display: grid;
  gap: 6px;
  width: 100%;
  align-content: center;
}

.overview-donut-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 28px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #27384b;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 700;
}

.overview-donut-item:hover,
.overview-donut-item:focus-visible {
  border-color: rgba(36, 105, 216, 0.16);
  background: #f6f9fc;
  outline: none;
}

.overview-donut-item i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.overview-donut-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-donut-item strong {
  color: #65758a;
  font-size: 0.8rem;
}

.overview-ranked-bars {
  display: grid;
  gap: 6px;
}

.overview-rank-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.82fr) minmax(220px, 1.55fr) 112px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 28px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #27384b;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-weight: 700;
  animation: overviewBarIn .36s ease both;
  animation-delay: var(--row-delay, 0ms);
}

.overview-rank-row:hover,
.overview-rank-row:focus-visible,
.overview-rank-row.active {
  border-color: rgba(36, 105, 216, 0.16);
  background: #f6f9fc;
  outline: none;
}

.overview-rank-label {
  min-width: 0;
  overflow: hidden;
  color: #27384b;
  font-size: 0.82rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-rank-track {
  height: 18px;
  border-left: 2px solid rgba(24, 49, 75, 0.28);
  border-radius: 0 6px 6px 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(25% - 1px),
      rgba(24, 49, 75, 0.06) calc(25% - 1px),
      rgba(24, 49, 75, 0.06) 25%
    );
}

.overview-rank-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 0 5px 5px 0;
}

.overview-rank-row strong {
  display: grid;
  justify-items: end;
  gap: 1px;
  color: #27384b;
  font-size: 0.8rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.overview-rank-row strong b,
.overview-rank-row strong em {
  display: block;
  font-style: normal;
}

.overview-rank-row strong em {
  color: #718198;
  font-size: 0.7rem;
  font-weight: 700;
}

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

.home-analysis-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  padding: 28px;
}

.analysis-layer-list {
  display: grid;
  gap: 10px;
}

.analysis-layer-list article {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(24, 49, 75, 0.11);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.analysis-layer-list strong {
  color: #102235;
  font-size: 1rem;
}

.analysis-layer-list span {
  color: var(--muted);
  line-height: 1.52;
}

.home-data-products {
  padding: 26px;
}

.data-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.data-product-grid article {
  min-height: 170px;
  padding: 16px;
  border: 1px solid rgba(24, 49, 75, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.data-product-grid h3 {
  margin: 0 0 8px;
  color: #102235;
  font-size: 1.05rem;
}

.data-product-grid p {
  min-height: 76px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.data-product-grid code {
  display: inline-flex;
  border: 1px solid rgba(36, 105, 216, 0.18);
  border-radius: 8px;
  padding: 5px 8px;
  color: #1550a8;
  background: rgba(36, 105, 216, 0.08);
  font-weight: 800;
}

.home-task-panel,
.home-pipeline-panel {
  border-radius: var(--radius);
}

.task-label-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 20px;
}

.task-label-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(36, 105, 216, 0.18);
  border-radius: 999px;
  color: #1550a8;
  background: rgba(36, 105, 216, 0.07);
  font-size: 0.86rem;
  font-weight: 800;
}

.task-use-grid article {
  min-height: 150px;
}

.pipeline-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.pipeline-flow span {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid rgba(24, 49, 75, 0.12);
  border-radius: 10px;
  color: #18314b;
  background: rgba(255, 255, 255, 0.74);
  font-weight: 800;
  line-height: 1.35;
}

.pipeline-flow span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -8px;
  z-index: 1;
  width: 12px;
  height: 12px;
  border-top: 2px solid rgba(36, 105, 216, 0.5);
  border-right: 2px solid rgba(36, 105, 216, 0.5);
  transform: translateY(-50%) rotate(45deg);
}

.home-cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.home-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.home-cta-actions .btn {
  min-width: 150px;
}

.home-compact-cta {
  margin-top: 2px;
}

@media (max-width: 1120px) {
  .home-resource-panel,
  .home-analysis-panel,
  .home-cta-panel {
    grid-template-columns: 1fr;
  }

  .home-module-grid,
  .data-product-grid,
  .pipeline-flow,
  .barcode-schema {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-flow span:not(:last-child)::after,
  .barcode-schema div:not(:last-child)::after {
    display: none;
  }

  .home-cta-actions {
    justify-content: flex-start;
  }

  .overview-chart-grid {
    grid-template-columns: 1fr;
  }

  .overview-distribution-grid {
    grid-template-columns: 1fr;
  }

  .overview-wide-panel {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .home-resource-copy,
  .home-analysis-panel,
  .home-data-products,
  .home-cta-panel {
    padding: 20px;
  }

  .resource-highlights,
  .home-module-grid,
  .data-product-grid,
  .pipeline-flow,
  .barcode-schema,
  .analysis-layer-list article {
    grid-template-columns: 1fr;
  }

  .home-module-card {
    min-height: auto;
  }

  .module-index {
    margin-bottom: 18px;
  }

  .home-overview-widget {
    padding: 16px;
  }

  .overview-widget-head {
    display: grid;
  }

  .overview-active-label {
    max-width: 100%;
  }

  .overview-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-bar-row {
    grid-template-columns: 1fr auto;
  }

  .overview-bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .overview-dist-panel {
    min-height: auto;
  }

  .overview-rank-row {
    grid-template-columns: minmax(132px, 1fr) minmax(120px, 1.2fr) 88px;
    gap: 8px;
  }

  .overview-donut-chart {
    grid-template-columns: 1fr;
  }
}

/* Final home metadata distribution layout */
.home-overview-widget .overview-distribution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.home-overview-widget .overview-dist-panel {
  display: block;
  min-height: 430px;
}

.home-overview-widget .overview-compact-panel {
  min-height: 350px;
}

.home-overview-widget .overview-tall-panel {
  min-height: 460px;
}

@media (max-width: 1360px) {
  .home-overview-widget .overview-distribution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-rank-row {
    grid-template-columns: minmax(150px, 0.85fr) minmax(170px, 1.45fr) 104px;
  }
}

@media (max-width: 1120px) {
  .home-overview-widget .overview-distribution-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .home-overview-widget {
    min-width: 0;
    padding: 16px;
  }

  .overview-widget-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-widget-head > *,
  .overview-active-label {
    min-width: 0;
    max-width: 100%;
  }

  .overview-stat-grid,
  .home-overview-widget .overview-distribution-grid,
  .overview-donut-chart,
  .overview-donut-legend,
  .overview-ranked-bars {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-overview-widget .overview-dist-panel,
  .overview-donut-chart,
  .overview-donut-legend,
  .overview-ranked-bars,
  .overview-rank-row,
  .overview-donut-item {
    min-width: 0;
    max-width: 100%;
  }

  .overview-rank-row {
    grid-template-columns: minmax(0, 1fr) minmax(56px, 0.7fr) minmax(48px, auto);
    gap: 8px;
  }

  .overview-rank-label {
    text-align: left;
  }

  .overview-rank-row strong {
    min-width: 0;
  }
}

/* Final top navigation: NAR-style dark horizontal bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0;
  background: linear-gradient(90deg, #2f6f86 0%, #2469d8 48%, #15936c 100%);
  border-bottom: 0;
  box-shadow: 0 10px 24px rgba(16, 34, 53, 0.12);
  backdrop-filter: none;
}

.site-header .nav-wrap {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 96px);
}

.site-header .brand {
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.site-header .site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 3.4vw, 56px);
  flex-wrap: nowrap;
}

.site-header .site-nav a {
  position: relative;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  box-shadow: none;
  font-size: clamp(1rem, 1.2vw, 1.22rem);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.site-header .site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .16s ease;
}

.site-header .site-nav a.active,
.site-header .site-nav a:hover {
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.site-header .site-nav a.active::after,
.site-header .site-nav a:hover::after {
  transform: scaleX(1);
}

@media (max-width: 760px) {
  .site-header .nav-wrap {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 0;
  }

  .site-header .site-nav {
    justify-content: flex-start;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .site-header .site-nav a {
    font-size: 0.95rem;
    padding: 4px 0;
  }

  .site-header .site-nav a::after {
    bottom: -6px;
  }
}

/* Final home hero split with graphical abstract */
.home-hero-image.home-hero-split {
  width: 100%;
  min-width: 0;
  margin-left: 0;
  grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  justify-items: center;
  gap: clamp(20px, 4vw, 58px);
  min-height: auto;
  padding: clamp(28px, 5vh, 54px) max(7.5vw, 24px);
  border: 1px solid rgba(24, 49, 75, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(246, 251, 252, 0.9));
  box-shadow: var(--shadow);
}

.home-hero-split .home-hero-copy {
  width: 100%;
  max-width: 680px;
  min-width: 0;
  margin-left: 0;
  justify-self: end;
}

.home-hero-graphic {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: min(720px, 100%);
  min-width: 0;
  aspect-ratio: 1317.29 / 1094.49;
  margin: 0;
  padding: clamp(6px, 1vw, 10px);
  border: 1px solid rgba(24, 49, 75, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.home-hero-graphic img {
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

@media (max-width: 1120px) {
  .home-hero-image.home-hero-split {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }

  .home-hero-split .home-hero-copy {
    justify-self: center;
  }

  .home-hero-graphic {
    max-width: min(760px, 100%);
  }
}

@media (max-width: 760px) {
  .home-hero-image.home-hero-split {
    gap: 18px;
    padding: 22px 14px;
  }

  .home-hero-graphic {
    border-radius: 10px;
    padding: 6px;
  }

  .home-hero-graphic img {
    border-radius: 8px;
  }

  .home-hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero-actions .btn,
  .home-hero-copy .home-hero-btn {
    min-width: 0;
    width: 100%;
  }

  .home-hero-split .home-quick-search {
    min-width: 0;
    width: 100%;
  }

  .home-hero-split .home-quick-search input,
  .home-hero-split .home-quick-search button {
    min-width: 0;
  }
}
