/* CucuCNVDB stylesheet — plain CSS, no external dependencies */
:root {
  --green-900: #12351f;
  --green-800: #1b4a2b;
  --green-700: #245e37;
  --green-500: #3f8a52;
  --green-100: #e6f1e8;
  --ink: #1c1f1d;
  --ink-2: #4a4f4b;
  --muted: #7b807c;
  --line: #e1e3df;
  --bg: #f6f7f4;
  --card: #ffffff;
  --del: #2a78d6;
  --dup: #eb6834;
  --g0: #2a78d6;  /* In-house */
  --g1: #eb6834;  /* PRJNA1035551 */
  --g2: #1baf7a;  /* PRJNA171718 */
  --g3: #eda100;  /* PRJNA1031793 */
  --g4: #e87ba4;  /* Other public */
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 40, 25, .06), 0 2px 8px rgba(20, 40, 25, .05);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.65rem; margin: 1.2rem 0 .4rem; line-height: 1.25; }
h2 { font-size: 1.12rem; margin: 0 0 .7rem; }
h3 { font-size: 1rem; margin: 0 0 .3rem; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 60rem; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
main.container { padding-bottom: 40px; min-height: 70vh; }

/* ---------- header ---------- */
.site-header { background: var(--green-900); color: #fff; position: relative; z-index: 2; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-logo { width: 44px; height: 44px; background: #fff; border-radius: 8px; padding: 2px; object-fit: contain; }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.25rem; letter-spacing: .2px; }
.brand-text small { color: #b9d7c0; font-size: .8rem; }
.global-search { display: flex; flex: 1; max-width: 520px; min-width: 260px; }
.global-search input {
  flex: 1; border: 0; border-radius: 8px 0 0 8px; padding: 9px 12px; font-size: .95rem; outline: none;
}
.global-search button {
  border: 0; background: var(--green-500); color: #fff; padding: 0 16px; border-radius: 0 8px 8px 0; cursor: pointer; font-weight: 600;
}
.global-search button:hover { background: #4b9c5f; }
.main-nav { background: var(--green-800); }
.main-nav .container { display: flex; gap: 2px; overflow-x: auto; }
.main-nav a {
  color: #d6e8da; padding: 10px 13px; font-size: .93rem; white-space: nowrap; border-bottom: 3px solid transparent;
}
.main-nav a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .06); }
.main-nav a.active { color: #fff; border-bottom-color: #8fd19e; font-weight: 600; }

/* ---------- layout blocks ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin: 16px 0;
}
.card.alert { border-left: 4px solid #c0392b; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
.card { min-width: 0; overflow-x: auto; }
.grid-2 > .card { margin: 16px 0 0; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.title-row h1, .title-row h2 { margin-bottom: .4rem; }
.crumbs { margin-top: 1rem; font-size: .88rem; color: var(--muted); }
.note { background: #fff8e6; border: 1px solid #f1d58f; border-radius: 8px; padding: 10px 14px; margin: 12px 0; color: #5b4500; }
.count { display: inline-block; background: var(--green-100); color: var(--green-700); border-radius: 999px; padding: 0 9px; font-size: .82rem; margin-left: 4px; vertical-align: middle; }

/* hero + stats */
.hero { background: linear-gradient(120deg, #fff 0%, #eef6ef 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin-top: 18px; }
.hero h1 { margin-top: 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; }
.stat:hover { text-decoration: none; border-color: var(--green-500); }
.stat .num { font-size: 1.9rem; font-weight: 700; color: var(--green-800); line-height: 1.1; }
.stat .lbl { color: var(--ink-2); font-weight: 600; }
.stat .sub { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 24px; }
.features p { margin: 0; color: var(--ink-2); font-size: .93rem; }

/* buttons */
.btn {
  display: inline-block; background: var(--green-700); color: #fff; border: 1px solid var(--green-700); border-radius: 8px;
  padding: 8px 16px; font-weight: 600; font-size: .93rem; cursor: pointer;
}
.btn:hover { background: var(--green-800); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--green-700); }
.btn.ghost:hover { background: var(--green-100); }
.btn.small { padding: 5px 11px; font-size: .85rem; }

/* filter form */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin: 14px 0;
}
.filters label { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; color: var(--ink-2); gap: 3px; }
.filters input, .filters select {
  font: inherit; font-size: .9rem; font-weight: 400; padding: 6px 8px; border: 1px solid #cfd3cd; border-radius: 6px; background: #fff; min-width: 90px;
}
.filters input[type=number] { width: 90px; min-width: 0; }
.filters .pair { display: flex; gap: 4px; }
.filters button { background: var(--green-700); color: #fff; border: 0; border-radius: 6px; padding: 8px 16px; font-weight: 600; cursor: pointer; }
.filters button:hover { background: var(--green-800); }
.filters > .muted { align-self: center; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 8px; }

/* tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card .table-wrap { border: 0; border-radius: 0; }
.table-wrap.scroll-y { max-height: 420px; overflow-y: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #f2f4f0; color: var(--ink-2); font-weight: 600; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.data th a { color: var(--ink-2); }
table.data tbody tr:hover { background: #f8fbf8; }
table.data.compact th, table.data.compact td { padding: 6px 9px; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.mono { white-space: nowrap; }
table.data td.empty { text-align: center; color: var(--muted); padding: 24px; }
tr.dim td { color: var(--muted); }
.barcell { width: 32%; }

/* key–value lists */
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 10px; }
dl.kv dt { color: var(--muted); font-size: .88rem; }
dl.kv dd { margin: 0; }

/* badges and chips */
.badge { display: inline-block; font-size: .76rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.badge.del { background: #e1edfb; color: #1c5aa6; }
.badge.dup { background: #fde8df; color: #b3471d; }
.grp { display: inline-block; font-size: .76rem; padding: 1px 8px; border-radius: 999px; background: #f1f2ef; color: var(--ink-2); white-space: nowrap; }
.grp::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.grp-inhouse::before { background: var(--g0); }
.grp-prjna1035551::before { background: var(--g1); }
.grp-prjna171718::before { background: var(--g2); }
.grp-prjna1031793::before { background: var(--g3); }
.grp-otherpublic::before { background: var(--g4); }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--green-100); color: var(--green-700); vertical-align: middle; }
.pill.grey { background: #eceeea; color: var(--muted); }
.chip { display: inline-block; font-family: var(--mono); font-size: .78rem; padding: 0 6px; border-radius: 5px; margin: 1px 0; }
.chip.del { background: #e1edfb; color: #1c5aa6; }
.chip.dup { background: #fde8df; color: #b3471d; }
.flag { color: #c77d00; cursor: help; font-size: 1rem; }
.ext { font-size: .8em; }
.cat { display: inline-block; font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-right: 4px; }

/* little bars */
.minibar { display: flex; height: 10px; background: #f0f1ee; border-radius: 3px; overflow: hidden; gap: 2px; }
.minibar span { display: block; height: 100%; }
.minibar .del, .stackbar .del { background: var(--del); }
.minibar .dup { background: var(--dup); }
.stackbar { display: flex; width: 140px; height: 10px; border-radius: 3px; overflow: hidden; gap: 1px; background: #f0f1ee; }
.stackbar span { display: block; height: 100%; }
.g0 { background: var(--g0); fill: var(--g0); } .g1 { background: var(--g1); fill: var(--g1); }
.g2 { background: var(--g2); fill: var(--g2); } .g3 { background: var(--g3); fill: var(--g3); }
.g4 { background: var(--g4); fill: var(--g4); }
.foldbar { display: inline-block; width: 60px; height: 7px; background: #eef0ec; border-radius: 3px; margin-right: 6px; vertical-align: middle; overflow: hidden; }
.foldbar span { display: block; height: 100%; background: var(--green-500); }

/* legend dots */
.legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; color: var(--ink-2); font-size: .86rem; margin-top: 8px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.dot.del { background: var(--del); } .dot.dup { background: var(--dup); }
.dot.gene { background: #9aa39b; } .dot.genehit { background: var(--green-800); }
.ring { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid #111; margin-right: 5px; vertical-align: -1px; }

/* pager */
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin: 14px 0; }
.pager a, .pager span { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: .88rem; }
.pager .current { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.pager .disabled { color: #b8bcb6; }
.pager .gap { border: 0; background: none; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-top: 12px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 600; font-size: .92rem; }
.tabs a.active { color: var(--green-700); border-bottom-color: var(--green-700); }
.tabs a:hover { text-decoration: none; color: var(--green-700); }

/* lists */
ul.terms, ul.hits { margin: 0; padding-left: 0; list-style: none; }
ul.terms li, ul.hits li { padding: 6px 0; border-bottom: 1px solid var(--line); }
ul.terms li:last-child, ul.hits li:last-child { border-bottom: 0; }

/* downloads */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0; }
.dl { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.dl:hover { border-color: var(--green-500); text-decoration: none; }
.dl-title { font-weight: 700; color: var(--green-800); }
.dl-title::before { content: "⤓ "; }
.dl-meta { color: var(--muted); font-size: .85rem; margin-top: 3px; }
.prose ol, .prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 6px; }
pre { background: #f4f5f2; padding: 10px; border-radius: 6px; overflow-x: auto; }

/* ---------- SVG graphics ---------- */
.svg-card svg { width: 100%; height: auto; display: block; }
svg text { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
svg .gridline { stroke: #eceee9; stroke-width: 1; }
svg .tick { font-size: 11px; fill: #8a8f8b; }
svg .chrlab { font-size: 14px; font-weight: 700; fill: var(--ink); }
svg .tracklab { font-size: 12px; font-weight: 600; fill: var(--ink-2); }
svg .chrbar { fill: #d9ddd6; }
svg .axis { stroke: #bfc4bc; stroke-width: 1; }
svg .m-del { fill: var(--del); }
svg .m-dup { fill: var(--dup); }
svg a:hover .m-del, svg a:hover .m-dup, svg a:hover .gene, svg a:hover .call { fill: #111; }
svg .gene { fill: #9aa39b; }
svg .gene.hit { fill: var(--green-800); }
svg .call { opacity: .9; }
svg.pca { max-width: 420px; }
svg .pt { opacity: .55; }
svg .me { fill: none; stroke: #111; stroke-width: 2.5; }

/* ---------- workflow flowchart (About) ---------- */
.flow { max-width: 860px; margin: 8px auto 4px; }
.flow-steps { list-style: none; margin: 0; padding: 0; }
.flow-step { position: relative; margin: 0 0 26px; }
.flow-step:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; bottom: -22px; width: 2px; height: 18px; background: #b7c9bb; transform: translateX(-50%);
}
.flow-step:not(:last-child)::before {
  content: ""; position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid #b7c9bb; z-index: 1;
}
.flow-step > a, .flow-step > div {
  display: flex; align-items: center; gap: 14px; background: #f3f6f1; border: 1px solid #dfe6dc; border-left: 4px solid var(--green-500);
  border-radius: 10px; padding: 12px 16px; color: var(--ink);
}
.flow-step.has-link > a:hover { border-color: var(--green-500); background: var(--green-100); text-decoration: none; }
.flow-step.has-link > a::after { content: "→"; margin-left: auto; color: var(--green-500); font-weight: 700; }
.flow-step.k-cnv > a, .flow-step.k-cnvr > a { background: #eef6ef; border-left-color: var(--green-800); }
.flow-num {
  flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--green-700); color: #fff; font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.flow-body { display: flex; flex-direction: column; }
.flow-title { font-weight: 700; color: var(--green-800); }
.flow-desc { color: var(--ink-2); font-size: .9rem; }
.flow-desc strong { color: var(--ink); }
.flow-split { position: relative; height: 34px; margin-top: -4px; }
.flow-split::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 16px; background: #b7c9bb; }
.flow-split span { position: absolute; left: 16.66%; right: 16.66%; top: 16px; height: 18px; border: 2px solid #b7c9bb; border-bottom: 0; border-radius: 8px 8px 0 0; }
.flow-branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.flow-branch {
  display: flex; flex-direction: column; gap: 4px; background: #e9f2fb; border: 1px solid #c4dbf3; border-top: 4px solid var(--del);
  border-radius: 10px; padding: 12px 14px; color: var(--ink);
}
.flow-branch:nth-child(2) { background: #fdf0ea; border-color: #f5cdb9; border-top-color: var(--dup); }
.flow-branch:nth-child(3) { background: #eef6ef; border-color: #cfe3d3; border-top-color: var(--green-700); }
.flow-branch:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); transition: transform .2s; }

/* ---------- footer ---------- */
.cf-footer { background: var(--green-900); color: #cfe2d4; margin-top: 36px; position: relative; z-index: 2; border-top: 4px solid var(--green-500); }
.cf-grid { display: grid; grid-template-columns: 1.2fr 1.6fr 1fr; gap: 28px 40px; padding-top: 32px; padding-bottom: 28px; }
.cf-head { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #8fd19e; margin: 0 0 12px; }
.cf-about p { margin: 0 0 14px; font-size: .9rem; line-height: 1.6; color: #b9d0bf; }
.cf-licence {
  display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: .88rem;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 8px; padding: 8px 14px;
}
.cf-licence svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.cf-licence:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.cf-insts { display: flex; flex-wrap: wrap; gap: 14px; }
.cf-inst {
  display: flex; align-items: center; gap: 12px; flex: 1 1 220px; color: #fff; padding: 10px 12px;
  border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
}
.cf-inst:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.cf-logo { flex: none; width: 64px; height: 64px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cf-logo img { width: 54px; height: 54px; object-fit: contain; display: block; }
.cf-inst-text { display: flex; flex-direction: column; line-height: 1.35; }
.cf-inst-text strong { font-size: .95rem; }
.cf-inst-text span { font-size: .82rem; color: #b9d0bf; }
.cf-links { list-style: none; margin: 0; padding: 0; }
.cf-links li { margin: 0 0 7px; }
.cf-links a { color: #dbeadf; font-size: .9rem; }
.cf-links a:hover { color: #fff; }
.cf-bottom { background: #0d2716; color: #8fa995; font-size: .82rem; padding: 12px 0; text-align: center; }
.cf-bottom a { color: #b9d0bf; }

/* ---------- team and contact page ---------- */
.ct-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 6px 0 22px; }
.ct-intro .lead { margin: 0; }
.ct-write {
  display: flex; align-items: center; gap: 12px; background: var(--green-700); color: #fff; border-radius: 12px; padding: 12px 18px; box-shadow: var(--shadow);
}
.ct-write:hover { background: var(--green-800); text-decoration: none; }
.ct-write .ct-icon { width: 22px; height: 22px; fill: #fff; flex: none; }
.ct-write span { display: flex; flex-direction: column; line-height: 1.3; }
.ct-write small { color: #cfe2d4; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ct-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px 20px 18px;
  display: flex; flex-direction: column; align-items: center; text-align: center; border-top: 4px solid var(--green-500);
}
.ct-photo {
  width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: var(--green-100); flex: none;
  border: 3px solid #fff; box-shadow: 0 0 0 2px var(--green-500); display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.ct-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.ct-initials { font-size: 2rem; font-weight: 700; color: var(--green-700); }
.ct-name { font-size: 1.08rem; margin: 0; }
.ct-role { margin: 2px 0 12px; color: var(--green-700); font-weight: 600; font-size: .86rem; }
.ct-line { display: flex; gap: 8px; align-items: flex-start; text-align: left; width: 100%; margin: 0 0 8px; font-size: .88rem; color: var(--ink-2); }
.ct-line a { word-break: break-all; }
.ct-icon { width: 15px; height: 15px; fill: var(--green-500); flex: none; margin-top: 3px; }
.ct-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: auto; padding-top: 10px; }
.ct-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.ct-actions .ct-icon { margin-top: 0; fill: currentColor; width: 13px; height: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-2, .features, .downloads, .flow-branches, .cf-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-split { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
}
@media (max-width: 560px) {
  html { font-size: 14px; }
  .stats { grid-template-columns: 1fr; }
  .global-search { min-width: 100%; }
}
