:root {
  --bg: #eeeeee;
  --surface: #ffffff;
  --surface-soft: #eeeeee;
  --ink: #111111;
  --muted: #666666;
  --muted-2: #8a8a8a;
  --line: #c9c9c9;
  --line-soft: #dddddd;
  --accent: #b5121b;
  --accent-strong: #8f0e15;
  --accent-soft: #f8e7e9;
  --rose: #b5121b;
  --rose-soft: #f8e7e9;
  --green: #111111;
  --green-soft: #eeeeee;
  --shadow: 0 18px 42px rgba(0, 0, 0, .08);
}

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

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  font-family: "Times New Roman", Times, "SimSun", "宋体", serif;
  background:
    linear-gradient(180deg, #e7e7e7 0, rgba(231, 231, 231, 0) 340px),
    var(--bg);
  color: var(--ink);
}

body.view-landing::before,
body.view-results::before {
  content: "";
  position: fixed;
  z-index: 0;
  right: -8vw;
  top: 2vh;
  width: min(62vw, 860px);
  height: 100vh;
  background: url("../assets/gene2.png") center top / contain no-repeat;
  opacity: .13;
  filter: grayscale(1) contrast(.9) brightness(1.08);
  pointer-events: none;
}

header,
main,
footer,
.theme-toggle {
  position: relative;
  z-index: 1;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

header {
  color: var(--ink);
  background: linear-gradient(180deg, #dddddd 0%, #c9c9c9 62%, #b8b8b8 100%);
  border-bottom: 1px solid #9f9f9f;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .12);
}

.header-inner {
  max-width: 1180px;
  min-height: 210px;
  margin: 0 auto;
  padding: 28px 34px 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.brand-copy {
  min-width: 0;
  padding-top: 10px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

header h1 {
  font-size: clamp(40px, 7vw, 74px);
  line-height: .9;
  letter-spacing: 0;
}

.title-red {
  color: var(--accent);
}

.brand-sub {
  color: var(--muted);
  font-size: .3em;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: .02em;
  white-space: nowrap;
}

.header-copy {
  max-width: 720px;
  margin-top: 14px;
  color: #333333;
  font-size: 16px;
  line-height: 1.7;
}

.module-copy {
  max-width: 760px;
  margin: 44px auto 0;
  color: #555555;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
}

.atlas-explorer {
  max-width: 1180px;
  min-height: 390px;
  margin: -32px auto 34px;
  padding: 24px 24px 24px 34px;
  display: grid;
  grid-template-columns: 280px minmax(360px, 1fr) 270px;
  gap: 20px;
  align-items: stretch;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 42px rgba(0,0,0,.09);
}

.atlas-copy {
  align-self: center;
}

.atlas-copy h2 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: .98;
  letter-spacing: 0;
}

.atlas-copy p {
  max-width: 245px;
  color: var(--muted);
  line-height: 1.65;
}

.atlas-copy-en {
  margin-top: 10px;
  font-size: 13px;
}

.quick-title {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

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

.quick-entry {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fff;
  color: #2e2e2e;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  box-shadow: 0 7px 16px rgba(0,0,0,.04);
}

.quick-entry span {
  margin-right: 8px;
  color: var(--accent);
}

.quick-entry img {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  object-fit: contain;
  vertical-align: middle;
}

.quick-entry:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.browse-all {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

#network-loading {
  position: fixed; right: 24px; bottom: 24px; z-index: 1000;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 24px; background: var(--surface); color: var(--ink);
  box-shadow: 0 4px 18px rgba(0,0,0,.12); font-size: 14px;
}
#network-loading[hidden] { display: none; }
#network-loading i {
  width: 18px; height: 18px; border: 2px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%;
  animation: network-spin .8s linear infinite;
}
@keyframes network-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #network-loading i { animation: none; } }

.atlas-map-wrap {
  position: relative;
  justify-self: center;
  width: 430px;
  max-width: 100%;
  aspect-ratio: 1;
  align-self: center;
}

.atlas-body-img {
  position: absolute;
  left: 50%;
  top: 50%;
  /* The 430-unit map scales as one plane, including all organ overlays. */
  width: 90.697674%;
  height: auto;
  transform: translate(-50%, -50%);
  opacity: .82;
  pointer-events: none;
}

.atlas-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
}

.body-silhouette {
  display: none;
}

.body-contour {
  display: none;
}

.body-line {
  display: none;
}

.organ-shape {
  display: none;
}

.lung-shape { fill: rgba(128,142,151,.22); stroke: rgba(80,87,92,.35); }
.heart-shape { fill: rgba(181,18,27,.34); }
.liver-shape { fill: rgba(120,82,72,.24); stroke: rgba(90,60,54,.36); }

.organ-node {
  cursor: pointer;
  outline: none;
}

.node-halo {
  fill: rgba(181,18,27,.08);
  stroke: rgba(181,18,27,.42);
  stroke-width: 1.5;
  transition: .2s ease;
}

.node-core {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 2;
  transition: .2s ease;
}

.organ-node text {
  fill: #4b4b4b;
  font: 700 14px 'Times New Roman', serif;
}

.node-immune .node-halo,
.node-cancer .node-halo {
  fill: rgba(80,87,92,.08);
  stroke: rgba(80,87,92,.45);
}

.node-immune .node-core,
.node-cancer .node-core {
  fill: #596168;
}

.organ-node:hover .node-halo,
.organ-node:focus .node-halo {
  fill: rgba(181,18,27,.18);
  stroke: var(--accent);
  stroke-width: 2.5;
}

.organ-node:hover .node-core,
.organ-node:focus .node-core {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.12);
}

.callout {
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: var(--y);
  width: calc(var(--size, 48) * 100% / 430);
  height: calc(var(--size, 48) * 100% / 430);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #2f2f2f;
  text-align: center;
  box-shadow: none;
  overflow: visible;
  transition: transform .16s ease, filter .16s ease;
  transform: translate(-50%, -50%);
}

.callout img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
}

.callout b {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  min-width: 126px;
  padding: 7px 9px 2px;
  border: 1px solid var(--line-soft);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(255,255,255,.96);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.1;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.callout span {
  position: absolute;
  left: 50%;
  top: calc(100% + 28px);
  width: 126px;
  padding: 0 9px 8px;
  border: 1px solid var(--line-soft);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(255,255,255,.96);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.callout:hover,
.callout:focus {
  z-index: 8;
  transform: translate(-50%, -50%) scale(1.22);
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 8px 12px rgba(181,18,27,.18));
}

.callout:hover b,
.callout:focus b {
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
}

.callout:hover b,
.callout:hover span,
.callout:focus b,
.callout:focus span {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


.atlas-stats {
  align-self: center;
  padding: 18px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f7f7f7;
}

.atlas-stat {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.atlas-stat > img {
  grid-row: span 2;
  width: 24px;
  height: 24px;
  object-fit: contain;
  align-self: center;
}

.atlas-stat b {
  font-size: 24px;
  line-height: 1;
}

.atlas-stat em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.about-btn {
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-height: 38px;
  margin-top: 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.about-page {
  min-height: 100vh;
  overflow: hidden;
  background: #f6f6f6;
}

.about-home {
  position: fixed;
  z-index: 5;
  left: 28px;
  top: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.about-home:hover {
  color: var(--accent);
}

.about-apromoter {
  position: relative;
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  margin: 0 calc(50% - 50vw);
  scroll-margin-top: 18px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 48%, rgba(245,245,245,.86) 100%),
    #f6f6f6;
  box-shadow: none;
}

.about-apromoter.standalone {
  width: 100%;
  margin: 0;
}

.about-copy {
  position: relative;
  z-index: 2;
  width: min(420px, 48%);
  margin: 0;
  padding: 21vh 0 0 clamp(92px, 11vw, 190px);
}

.about-logo {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  object-position: top center;
}

.about-copy h1,
.about-copy h2 {
  margin-top: 8px;
  font-size: clamp(46px, 6vw, 68px);
  line-height: .88;
  letter-spacing: 0;
}

.about-copy h1 span,
.about-copy h2 span {
  color: var(--accent);
}

.about-subtitle {
  margin-top: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .32em;
  text-transform: uppercase;
}

.about-rule {
  position: relative;
  width: 164px;
  height: 1px;
  margin: 24px 0 18px;
  background: rgba(181,18,27,.36);
}

.about-rule span {
  position: absolute;
  left: 50%;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.about-copy p {
  max-width: 280px;
  color: #555;
  font-size: 16px;
  line-height: 1.55;
}

.about-module {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px !important;
}

.about-dna {
  position: absolute;
  right: max(4vw, calc((100vw - 1320px) / 2));
  top: -8vh;
  width: min(44vw, 500px);
  height: 112vh;
  opacity: .86;
}

.dna-backbone {
  fill: none;
  stroke: rgba(150,150,150,.28);
  stroke-width: 15;
  stroke-linecap: round;
}

.dna-backbone.second {
  stroke: rgba(165,165,165,.22);
}

.dna-rungs path {
  fill: none;
  stroke: rgba(130,130,130,.22);
  stroke-width: 8;
  stroke-linecap: round;
}

.dna-dots circle {
  fill: rgba(181,18,27,.55);
}

.dna-redline {
  fill: none;
  stroke: rgba(181,18,27,.32);
  stroke-width: 1.1;
}

.dna-redline.soft {
  stroke: rgba(181,18,27,.20);
}

.about-gene {
  position: absolute;
  right: max(7vw, calc((100vw - 1320px) / 2));
  top: -7vh;
  width: min(38vw, 470px);
  height: 116vh;
  object-fit: contain;
  object-position: center;
  opacity: .48;
  filter: grayscale(1) contrast(.92) brightness(1.08);
  pointer-events: none;
}

.brand-mark {
  justify-self: end;
  width: 164px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 8px;
  align-self: center;
}

.header-metrics div {
  min-width: 96px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
}

.header-metrics b {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.header-metrics span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
}

.badges {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
}

main {
  max-width: 1440px;
  margin: -24px auto 0;
  padding: 0 12px 28px;
}

.search-hero {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto 90px;
  padding: 14px;
  border: 1px solid rgba(185, 185, 185, .98);
  border-radius: 8px;
  background: rgba(252, 252, 252, .96);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .13);
  backdrop-filter: blur(14px);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted-2);
  font-size: 18px;
}

.search-btn {
  min-height: 54px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(181, 18, 27, .18);
}

.search-btn:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.search-message {
  margin-top: 10px;
  color: var(--rose);
  font-size: 14px;
  text-align: center;
}

#search {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
}

.sort-wrap {
  display: flex;
  align-items: center;
  height: 42px;
  padding-left: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

#sort {
  height: 40px;
  min-width: 126px;
  padding: 0 12px 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.origin-filter {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.origin-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.origin-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(181, 18, 27, .16);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.stat {
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(15, 23, 42, .04);
}

.stat b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--accent-strong);
  font-size: 24px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.panel-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #3b3b3b;
  font-size: 12px;
  transition: background .12s, border-color .12s, color .12s;
}

.chip:hover { border-color: #b9c7d4; background: #f7fafb; }
.chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.chip .n { margin-left: 4px; color: var(--muted-2); font-size: 11px; font-weight: 600; }

.split,
.results-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel-sidebar {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 244, 244, .92);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
  scrollbar-width: thin;
  scrollbar-color: #b9c7d4 transparent;
}

.panel-groups {
  display: grid;
  gap: 10px;
}

.panel-all,
.panel-group-head,
.panel-promoter {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
}

.panel-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.panel-all.active {
  background: var(--accent);
  color: #fff;
}

.panel-all b,
.panel-group-head b {
  font-size: 12px;
  font-weight: 700;
}

.panel-group {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fff;
}

.panel-group.active {
  border-color: rgba(181, 18, 27, .34);
  box-shadow: inset 3px 0 0 var(--accent);
}

.panel-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 0 11px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.panel-group.active .panel-group-head {
  color: var(--accent-strong);
}

.panel-promoters {
  display: grid;
  gap: 1px;
  padding: 0 6px 7px;
}

.panel-promoter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 28px;
  align-items: center;
  padding: 0 6px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.panel-promoter:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.panel-promoter span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-promoter em {
  color: var(--muted-2);
  font-size: 11px;
  font-style: normal;
}

.result-view,
.detail-view {
  min-width: 0;
}

.results-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.results-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.86);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.results-sort select {
  height: 32px;
  min-width: 128px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.detail-view,
.panels-view,
.panel-detail-view,
.panel-promoters-view,
.placeholder-view,
.predict-view,
.predict-modes-view,
.keys-view {
  max-width: 1180px;
  margin: 0 auto;
}

.keys-new {
  padding: 10px 12px;
  border: 1px dashed var(--accent);
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.keys-new code {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.keys-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.key-row.revoked {
  opacity: 0.5;
}

.key-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.key-level {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.key-note {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.key-revoked {
  color: var(--muted-2);
  font-size: 11px;
}

.key-value {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.key-meta {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
}

.panel-card.disabled {
  opacity: 0.55;
  cursor: default;
}

.panel-card.disabled:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.predict-actions {
  margin-bottom: 10px;
}

.predict-head {
  margin-bottom: 16px;
}

.predict-head h2 {
  font-size: 28px;
  letter-spacing: 0;
}

.predict-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.predict-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.predict-seq-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
}

.predict-example-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.predict-example-btn:hover {
  color: var(--accent-strong);
}

.tarea,
#predict-seq,
#batch-seq,
#multi-seq {
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

.predict-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.predict-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.predict-row select,
.predict-row input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.predict-row select[multiple] {
  height: auto;
  min-height: 130px;
  padding: 6px 8px;
}

.predict-submit {
  display: flex;
  align-items: center;
  gap: 14px;
}

.predict-status {
  color: var(--muted);
  font-size: 13px;
}

.predict-result {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.multi-distribution-card {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.multi-distribution-card canvas {
  display: block;
  width: 100%;
  height: 260px;
}

.multi-distribution-card figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.profile-unit {
  display: grid;
  gap: 8px;
}

.plasmid-ring-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.plasmid-ring {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
}

.plasmid-ring-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-unit-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.profile-unit-title span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.placeholder-actions {
  margin-bottom: 10px;
}

.placeholder-body {
  padding: 60px 24px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
}

.placeholder-body h2 {
  margin: 10px 0 8px;
  font-size: 32px;
  letter-spacing: 0;
}

.placeholder-body p {
  color: var(--muted);
  font-size: 14px;
}

.panel-detail-actions {
  margin-bottom: 10px;
}

.panel-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.panel-detail-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-detail-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.panel-detail-title h2 {
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
}

.panel-detail-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.panel-detail-body {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.panel-detail-meta {
  display: grid;
  gap: 16px;
}

.panel-detail-desc {
  color: var(--muted);
  font-size: 13px;
}

.panel-detail-block-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.panel-detail-note {
  color: var(--muted-2);
  font-size: 12px;
}

.panel-detail-foot {
  margin-top: 16px;
}

.promoters-btn {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  transition: background .14s ease, border-color .14s ease;
}

.promoters-btn:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.panels-actions {
  margin-bottom: 10px;
}

.panels-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.panels-head h2 {
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
}

.panels-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.model-resource-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.model-resource-item {
  min-width: 0;
  padding: 14px 18px;
  border-right: 1px solid var(--line-soft);
}

.model-resource-item:last-child {
  border-right: 0;
}

.model-resource-name {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 20px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.model-resource-name i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--model-color);
}

.model-resource-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.model-resource-metrics strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.model-resource-note {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.4;
}

.model-resource-section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 11px;
}

.model-resource-section-title b {
  color: var(--ink);
  font-size: 13px;
}

@media (max-width: 760px) {
  .model-resource-summary { grid-template-columns: 1fr; }
  .model-resource-item { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .model-resource-item:last-child { border-bottom: 0; }
}

.results-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 244, 244, .92);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.results-search-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted-2);
}

#results-search {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.results-search-btn {
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.results-search-btn:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}

.page-btn {
  min-width: 34px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.page-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.page-btn:disabled {
  cursor: default;
  opacity: .45;
}

.page-gap,
.page-meta {
  color: var(--muted);
  font-size: 12px;
}

.page-meta {
  margin-left: 6px;
}

.result-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 2px 0 0;
}

.section-kicker {
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.result-head h2 {
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
}

.result-count {
  min-width: 88px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  text-align: right;
}

.result-count b {
  display: block;
  color: var(--accent-strong);
  font-size: 20px;
  line-height: 1;
}

.result-count span {
  color: var(--muted);
  font-size: 11px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  display: block;
  min-height: 168px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), #111111);
  opacity: .9;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #b7c6d1;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .09);
}

.card .topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding-left: 2px;
}

.card .no {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
}

.card h3 {
  min-height: 24px;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 24px;
  margin-bottom: 11px;
}

.panel-tag,
.origin-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.panel-tag { background: var(--accent-soft); color: var(--accent-strong); }
.origin-tag { background: var(--green-soft); color: var(--green); }
.origin-tag.synthetic { background: var(--rose-soft); color: var(--rose); }
.origin-tag.evolved { background: #e6e9f5; color: #3d4f8f; }

.sel {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 3px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.sel .x {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.sel-track {
  height: 7px;
  margin: 11px 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.sel-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a7a7a7, #111111 72%, var(--accent));
}

.card .meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.card .meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.panel-card {
  display: block;
  min-height: 118px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.panel-card:hover {
  transform: translateY(-2px);
  border-color: #b7c6d1;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .09);
}

.panel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-card-id {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
}

.panel-card-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.panel-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-card-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.panel-card-head h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.panel-card-more {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.empty {
  padding: 60px 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  text-align: center;
}

.right {
  min-width: 0;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.detail-back-actions { display: flex; gap: 6px; }

.back-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.back-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.lit-src {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.lit-src + .lit-src {
  margin-top: 4px;
}

.tabs {
  display: flex;
  gap: 6px;
  min-height: 36px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  min-height: 34px;
  padding: 0 9px 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .76);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.tab span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab.active {
  border-color: var(--accent);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(181, 18, 27, .10);
}

.tab .close {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 16px;
  text-align: center;
}

.tab .close:hover { background: #fee2e2; color: #b91c1c; }

.tab-panel {
  min-height: 560px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tab-placeholder {
  display: grid;
  min-height: 500px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(181, 18, 27, .04), rgba(0, 0, 0, .04)),
    var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.tab-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.tab-head h2 {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0;
}

.tab-head-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.tab-head-tools .kpis { grid-template-columns: repeat(4, minmax(92px, 1fr)); }

.design-studio-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.design-studio-link:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

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

.kpi {
  min-width: 82px;
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-soft);
}

.kpi b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--accent-strong);
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.meta-table {
  width: 100%;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.meta-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.meta-table tr:last-child td { border-bottom: 0; }

.meta-table td:first-child {
  width: 136px;
  background: #fafbfc;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.virtau-value { color: var(--accent-strong); font-size: 15px; }

.seq-box-wrap {
  position: relative;
}

.seq-copy-btn {
  position: absolute;
  top: 8px;
  right: 22px;
  z-index: 2;
  min-width: 54px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font: 700 11px/1 Arial, sans-serif;
  cursor: pointer;
}

.seq-copy-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.seq-copy-btn:disabled {
  cursor: wait;
  opacity: .55;
}

.seq-box {
  width: 100%;
  max-height: 168px;
  margin: 0;
  padding: 10px 74px 10px 12px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #f8f8f8;
  color: #2d2d2d;
  font-family: "Times New Roman", Times, "SimSun", "宋体", serif;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: #777 transparent;
}

.seq-box::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.seq-box::-webkit-scrollbar-track {
  background: transparent;
}

.seq-box::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #777;
}

.seq-box::-webkit-scrollbar-button,
.seq-box::-webkit-scrollbar-button:single-button {
  width: 0;
  height: 0;
  display: none;
}

.spectrum-box {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfd;
}

.spectrum-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
}

.spectrum-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.spectrum-box canvas {
  display: block;
  width: 100%;
  height: 250px;
  border-radius: 6px;
  background: #fff;
}

.cat-bars {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #3b3b3b;
  font-size: 11px;
}

.cat-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.cat-chip .v { color: var(--muted-2); font-variant-numeric: tabular-nums; }

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

.imgs figure {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.imgs img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.imgs figure canvas {
  display: block;
  width: 100%;
  height: 330px;
  border-radius: 5px;
}

.detail-chart-wrap {
  position: relative;
}

.detail-chart-tip {
  position: absolute;
  z-index: 5;
  display: none;
  min-width: 150px;
  max-width: 220px;
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(20, 20, 20, .94);
  color: #fff;
  font-size: 11px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.detail-chart-tip span {
  opacity: .72;
}

html[data-theme="dark"] .imgs figure {
  background: #222222;
}

.imgs figcaption {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}

.lit-ok { color: var(--green); font-weight: 700; }
.lit-none { color: var(--muted-2); }

footer {
  padding: 24px 0 30px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.theme-toggle {
  position: fixed;
  z-index: 20;
  top: 18px;
  right: 18px;
  min-width: 64px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

html[data-theme="dark"] {
  --bg: #171717;
  --surface: #222222;
  --surface-soft: #2b2b2b;
  --ink: #f2f2f2;
  --muted: #bbbbbb;
  --muted-2: #8f8f8f;
  --line: #444444;
  --line-soft: #333333;
  --accent: #c61a24;
  --accent-strong: #ef4a53;
  --accent-soft: #35191c;
  --rose: #ef4a53;
  --rose-soft: #35191c;
  --green: #f2f2f2;
  --green-soft: #303030;
  --shadow: 0 18px 42px rgba(0, 0, 0, .30);
}

html[data-theme="dark"] body {
  background:
    linear-gradient(180deg, #202020 0, rgba(32, 32, 32, 0) 340px),
    var(--bg);
}

html[data-theme="dark"] body.view-landing::before,
html[data-theme="dark"] body.view-results::before {
  opacity: .09;
  filter: grayscale(1) contrast(.85) brightness(.68);
}

html[data-theme="dark"] header {
  background: linear-gradient(180deg, #2f2f2f 0%, #252525 62%, #1e1e1e 100%);
  border-bottom-color: #3e3e3e;
  box-shadow: 0 18px 34px rgba(0,0,0,.34);
}

html[data-theme="dark"] .header-copy,
html[data-theme="dark"] .atlas-copy p,
html[data-theme="dark"] .about-copy p,
html[data-theme="dark"] .about-module {
  color: var(--muted);
}

html[data-theme="dark"] .search-hero,
html[data-theme="dark"] .atlas-explorer,
html[data-theme="dark"] .results-search,
html[data-theme="dark"] .panel-sidebar,
html[data-theme="dark"] .tab-panel {
  background: rgba(34,34,34,.94);
  border-color: var(--line);
  box-shadow: 0 20px 46px rgba(0,0,0,.34);
}

html[data-theme="dark"] .about-page,
html[data-theme="dark"] .about-apromoter {
  background: #181818;
}

html[data-theme="dark"] .search-wrap,
html[data-theme="dark"] .results-search-wrap,
html[data-theme="dark"] .quick-entry,
html[data-theme="dark"] .callout b,
html[data-theme="dark"] .callout span,
html[data-theme="dark"] .atlas-stats,
html[data-theme="dark"] .atlas-stat,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel-card,
html[data-theme="dark"] .panel-detail-body,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .meta-table,
html[data-theme="dark"] .spectrum-box,
html[data-theme="dark"] .imgs figure,
html[data-theme="dark"] .result-count,
html[data-theme="dark"] .results-sort,
html[data-theme="dark"] .pagination,
html[data-theme="dark"] .page-btn,
html[data-theme="dark"] .cat-chip,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .tab,
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .back-btn,
html[data-theme="dark"] .theme-toggle {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .callout {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] .tarea,
html[data-theme="dark"] #predict-seq,
html[data-theme="dark"] #batch-seq,
html[data-theme="dark"] #multi-seq {
  background: transparent;
  color: var(--ink);
}

html[data-theme="dark"] option {
  background: var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] optgroup {
  background: var(--surface-soft);
  color: var(--muted);
}

html[data-theme="dark"] input::placeholder {
  color: #8d8d8d;
}

html[data-theme="dark"] .meta-table td:first-child,
html[data-theme="dark"] .tab-placeholder,
html[data-theme="dark"] .panel-all,
html[data-theme="dark"] .panel-group {
  background: var(--surface-soft);
}

html[data-theme="dark"] .spectrum-box canvas {
  background: #181818;
}

html[data-theme="dark"] .seq-box {
  background: #181818;
  border-color: #3a3a3a;
  color: #d8d8d8;
}

html[data-theme="dark"] .seq-copy-btn {
  border-color: #454545;
  background: rgba(35, 35, 35, .96);
  color: #e6e6e6;
}

html[data-theme="dark"] .sel-track {
  background: #343434;
}

html[data-theme="dark"] .origin-tag.evolved {
  background: #2c3150;
  color: #a8b4e8;
}

html[data-theme="dark"] .tab .close:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

html[data-theme="dark"] .body-silhouette {
  fill: rgba(70,70,70,.42);
  stroke: rgba(170,170,170,.30);
}

html[data-theme="dark"] .body-contour,
html[data-theme="dark"] .body-line {
  stroke: rgba(170,170,170,.25);
}

html[data-theme="dark"] .dna-backbone,
html[data-theme="dark"] .dna-backbone.second {
  stroke: rgba(220,220,220,.12);
}

html[data-theme="dark"] .dna-rungs path {
  stroke: rgba(220,220,220,.14);
}

html[data-theme="dark"] .brand-mark img,
html[data-theme="dark"] .about-logo {
  filter: invert(1) grayscale(1) contrast(1.15);
}

html[data-theme="dark"] .quick-entry img,
html[data-theme="dark"] .callout img,
html[data-theme="dark"] .atlas-stat img {
  filter: invert(1) grayscale(1) contrast(1.05);
}

html[data-theme="dark"] .atlas-body-img {
  opacity: .62;
  filter: invert(1) grayscale(1) contrast(.95) brightness(.86);
}

html[data-theme="dark"] .about-gene {
  opacity: .34;
  filter: grayscale(1) contrast(.9) brightness(.72);
}

@media (max-width: 1080px) {
  .header-inner { padding-left: 24px; padding-right: 24px; }
  .atlas-explorer { grid-template-columns: 1fr; padding: 24px; }
  .atlas-copy { text-align: center; }
  .atlas-copy p { margin-left: auto; margin-right: auto; }
  .quick-grid { max-width: 360px; margin-left: auto; margin-right: auto; }
  .atlas-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .atlas-stat { border-bottom: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface); }
  .about-btn { grid-column: 1 / -1; }
  .split,
  .results-shell { grid-template-columns: 1fr; }
  .panel-sidebar { position: static; max-height: none; }
  .right { position: static; }
  .results-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .results-sort {
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  body.view-landing::before,
  body.view-results::before {
    right: -42vw;
    top: 24vh;
    width: 86vw;
    opacity: .07;
  }

  .header-inner {
    min-height: 0;
    padding: 24px 18px 28px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .brand-mark {
    justify-self: start;
    width: 118px;
  }
  .brand-copy { padding-top: 46px; }

  main { margin-top: -14px; padding: 0 14px 22px; }
  .search-hero { margin-bottom: 16px; padding: 10px; }
  .atlas-explorer { margin-top: 0; }
  .atlas-map-wrap { width: min(100%, 360px); min-height: 0; height: auto; aspect-ratio: auto; }
  .atlas-body-img,
  .atlas-map { display: none; }
  .callout { position: static; width: auto; }
  .atlas-map-wrap { display: grid; gap: 8px; }
  .callout {
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 8px;
    height: auto;
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 8px;
    text-align: left;
    transform: none !important;
  }
  .callout img {
    grid-row: span 2;
    width: min(calc(var(--size, 48) * 1px), 46px);
    height: min(calc(var(--size, 48) * 1px), 46px);
    align-self: center;
  }
  .callout b,
  .callout span {
    position: static;
    min-width: 0;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    transform: none;
    opacity: 1;
  }
  .callout span { grid-column: 2; }
  .atlas-stats { grid-template-columns: 1fr 1fr; }
  .about-apromoter { min-height: 100vh; }
  .about-copy { width: 100%; padding: 16vh 28px 0; }
  .about-dna { right: -160px; top: 60px; width: 390px; opacity: .45; }
  .about-gene { right: -120px; top: 14vh; width: 300px; height: 78vh; opacity: .14; }
  .search-form { grid-template-columns: 1fr; }
  .search-wrap { height: 48px; font-size: 16px; }
  #search { font-size: 16px; }
  .search-btn { min-height: 46px; font-size: 16px; }
  .results-search { grid-template-columns: 1fr; }
  .result-head { align-items: start; }
  .grid { grid-template-columns: 1fr; }
  .tab-panel { padding: 14px; }
  .detail-actions { align-items: stretch; flex-direction: column; }
  .detail-back-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab-head { grid-template-columns: 1fr; }
  .tab-head-tools { justify-items: stretch; }
  .tab-head-tools .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .design-studio-link { width: 100%; }
  .tab-head h2 { font-size: 27px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .imgs { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .kpis { grid-template-columns: 1fr; }
  .meta-table td { display: block; width: 100%; }
  .meta-table td:first-child { width: 100%; border-bottom: 0; }
}

/* ── 首页统计入口（可点击）── */
.stat-link {
  width: 100%;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
}
.stat-link:hover { background: rgba(0,0,0,.05); }
html[data-theme="dark"] .stat-link:hover { background: rgba(255,255,255,.08); }
.stat-link:focus-visible { outline: 2px solid var(--accent, #b5121b); outline-offset: 1px; }
.atlas-stats .atlas-stat.stat-link { border-bottom: 1px solid var(--line-soft); border-radius: 4px; }
.atlas-stats .atlas-stat-correlations { border-bottom: 0; }

/* Homepage model coefficients are intentionally independent from Docs/Validation. */
.atlas-stat-correlations b { font-variant-numeric: tabular-nums; }

.model-correlations-view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 28px 72px;
}
.model-correlations-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.model-correlations-head h2 { margin: 3px 0 0; font-size: 30px; letter-spacing: 0; }
.model-correlations-head > span { color: var(--muted); font-size: 12px; }
.model-correlations-tabs {
  display: flex;
  gap: 0;
  margin: 22px 0 18px;
  border-bottom: 1px solid var(--line-soft);
}
.model-correlations-tab {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.model-correlations-tab.active { border-bottom-color: var(--accent); color: var(--ink); }
.model-correlations-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.model-correlation-metric { padding: 14px 18px; border-right: 1px solid var(--line-soft); }
.model-correlation-metric:last-child { border-right: 0; }
.model-correlation-metric span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.model-correlation-metric b { display: block; margin-top: 4px; font-size: 24px; font-variant-numeric: tabular-nums; }
.model-correlations-plots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; margin-top: 28px; }
.model-correlation-plot { min-width: 0; }
.model-correlation-plot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.model-correlation-plot-head h3 { margin: 0; font-size: 16px; }
.model-correlation-plot-head span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.model-correlation-canvas { display: block; width: 100%; height: 390px; border: 1px solid var(--line-soft); background: var(--surface); }
.model-correlations-error { padding: 42px 0; color: var(--muted); text-align: center; }
html[data-theme="dark"] .model-correlation-canvas { background: var(--surface); }

/* ── 统计展示视图 ── */
.stats-view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 28px 72px;
}
.stats-actions { margin-bottom: 18px; }
.stats-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line-soft, #e5e5e5);
}
.stats-head h2 { font-size: 28px; margin: 0; letter-spacing: 0; }
.stats-sub { margin-left: auto; color: var(--muted, #8a8a8a); font-size: 12px; }
.stats-empty { padding: 60px 0; text-align: center; color: var(--muted, #8a8a8a); }

.stats-group { margin-bottom: 18px; }
.stats-group h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 8px; color: var(--muted, #555); }
.stats-group h3 span { font-size: 12px; color: var(--muted, #aaa); }
.stats-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stats-chip {
  padding: 3px 10px; border: 1px solid var(--line-soft, #e5e5e5); border-radius: 999px;
  font-size: 12px; background: #fafafa; color: #333;
}
html[data-theme="dark"] .stats-chip { background: #262626; color: #cdd5e1; border-color: #3a3a3a; }

/* The statistics view contains sections (KPI, charts, coverage), not promoter cards. */
.stats-promoters { display: block; }
.stats-promoter {
  display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto auto;
  gap: 2px 8px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line-soft, #e5e5e5); border-radius: 8px;
  background: #fff; cursor: pointer; font: inherit; text-align: left; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.stats-promoter:hover { border-color: var(--accent, #b5121b); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.stats-promoter b { font-size: 12px; color: var(--muted, #8a8a8a); grid-row: 1 / 4; }
.stats-promoter .sp-name { font-weight: 600; font-size: 14px; }
.stats-promoter .sp-tag { font-size: 12px; color: var(--muted, #777); }
.stats-promoter .sp-sel { font-size: 12px; color: #b5121b; grid-column: 1 / -1; }
.stats-promoter .sp-origin { font-size: 11px; color: var(--muted, #999); grid-column: 1 / -1; }
html[data-theme="dark"] .stats-promoter { background: #222222; border-color: #3a3a3a; }

/* Tissues & cell line 图表页 */
.stats-chart-row { display: grid; grid-template-columns: 320px 1fr; gap: 14px; margin-bottom: 18px; }
.stats-chart-box {
  padding: 12px; border: 1px solid var(--line-soft, #e5e5e5); border-radius: 8px; background: #fff;
  min-width: 0;
}
html[data-theme="dark"] .stats-chart-box { background: #222222; border-color: #3a3a3a; }
.stats-chart-box canvas { display: block; width: 100%; height: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stats-table th, .stats-table td { padding: 6px 10px; border-bottom: 1px solid var(--line-soft, #eee); text-align: left; }
.stats-table th { color: var(--muted, #888); font-weight: 600; }
.stats-table .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
html[data-theme="dark"] .stats-table td { border-color: #3a3a3a; }
@media (max-width: 860px) { .stats-chart-row { grid-template-columns: 1fr; } }

/* 组织/细胞系双 donut */
.stats-chart-row2 { display: grid; grid-template-columns: repeat(2, 320px); gap: 14px; margin-bottom: 18px; justify-content: center; }
.stats-chart-title { font-size: 13px; font-weight: 600; color: var(--muted, #666); margin-bottom: 6px; }
html[data-theme="dark"] .stats-chart-title { color: #bbb; }
@media (max-width: 860px) { .stats-chart-row2 { grid-template-columns: 1fr; } }

/* OT 类型图例 */
.stats-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-size: 12px; color: var(--muted, #666); }
.stats-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* 搜索框与下钻 */
.stats-search { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; justify-content: center; }
.stats-search input {
  flex: 0 1 420px; padding: 7px 12px; border: 1px solid var(--line, #d5d5d5);
  border-radius: 8px; font: inherit; font-size: 13px; background: #fff; color: #333;
}
html[data-theme="dark"] .stats-search input { background: #222222; color: #cdd5e1; border-color: #3a3a3a; }
.stats-drill { margin: 0 0 16px; padding: 10px 12px; border: 1px dashed var(--line-soft, #d5d5d5); border-radius: 8px; background: rgba(0,0,0,.015); }
html[data-theme="dark"] .stats-drill { background: rgba(255,255,255,.03); border-color: #3a3a3a; }
.stats-drill-title { font-size: 12px; font-weight: 600; color: var(--muted, #666); margin-bottom: 8px; }
.stats-chip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.stats-chip b { color: var(--muted, #999); font-weight: 500; margin-left: 4px; font-size: 11px; }

/* 下钻浮动弹入 */
@keyframes drill-pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stats-drill.pop { animation: drill-pop .28s ease-out; }

/* 单图表居中行（覆盖度饼图） */
.stats-chart-single { display: grid; justify-content: center; margin-bottom: 18px; }
.stats-chart-single .stats-chart-box { width: 320px; }

/* ── Promoter profiles 页美化 ── */
.promo-stats {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.promo-kpi {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  padding: 15px 14px;
  overflow: hidden;
  border: 1px solid var(--line-soft, #e5e5e5);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f7f7f7); text-align: center;
  box-shadow: 0 5px 16px rgba(0,0,0,.055);
}
.promo-kpi:first-child {
  border-top: 2px solid var(--accent, #b5121b);
  text-align: left;
}
.promo-kpi b { display: block; font-size: 24px; color: var(--ink, #111); line-height: 1.15; }
.promo-kpi span { margin-top: 6px; font-size: 11px; color: var(--muted, #777); }
.promo-kpi-accent b { color: #b5121b; }
html[data-theme="dark"] .promo-kpi {
  background: linear-gradient(180deg, #292929, #222222); border-color: #3a3a3a;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
html[data-theme="dark"] .promo-kpi-accent b { color: #e0636b; }

.stats-chart-box.wide { grid-column: 1; min-width: 0; }
.stats-chart-row2 .stats-chart-box {
  box-shadow: 0 5px 18px rgba(0,0,0,.06);
}
.stats-chart-row2.row-panels {
  align-items: stretch;
  gap: 16px;
  margin-bottom: 18px;
}
.stats-chart-row2.row-panels .stats-chart-box {
  padding: 16px;
}
.stats-chart-row2.row-panels .stats-chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
  margin-bottom: 10px;
  color: var(--ink, #333);
  font-size: 13px;
  letter-spacing: .01em;
}
.stats-chart-row2.row-panels .stats-chart-title::before {
  content: "";
  width: 3px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--accent, #b5121b);
}
.stats-chart-row2.row-panels #p-donut-origin {
  max-width: 320px;
  margin: 6px auto 0;
}

/* 覆盖度进度条 */
.cov-box {
  margin-top: 16px;
  padding: 18px 22px;
  box-shadow: 0 5px 18px rgba(0,0,0,.06);
}
.cov-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.cov-head b { font-size: 34px; color: #b5121b; line-height: 1; }
.cov-head span { font-size: 14px; color: var(--ink, #333); font-weight: 600; }
.cov-head small { display: block; font-size: 12px; color: var(--muted, #888); font-weight: 400; margin-top: 2px; }
.cov-track {
  height: 10px; border-radius: 999px; background: #ececec; overflow: hidden;
}
.cov-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #b5121b, #e0636b);
  transition: width .1s linear;
}
html[data-theme="dark"] .cov-track { background: #333; }
@media (max-width: 860px) {
  .stats-view { padding-left: 20px; padding-right: 20px; }
  .promo-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .promo-kpi:first-child { grid-column: span 2; }
}

/* Promoters 页：条形图宽 + donut 窄，撑满容器 */
.stats-chart-row2.row-panels {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  justify-content: stretch;
}
.stats-chart-row2.row-panels .stats-chart-box { width: auto; }
@media (max-width: 860px) {
  .stats-chart-row2.row-panels { grid-template-columns: 1fr; }
}

/* Tissue/model resource pages: use the available width instead of a narrow
   centered column, keeping model summaries and charts scannable. */
.model-resource-summary {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.model-resource-item { min-width: 0; padding: 18px 22px; }
#panels-model-summary { width: 100%; }
#panels-model-summary > .model-resource-summary {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stats-chart-row2 {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  justify-content: stretch;
}
.stats-chart-row2 .stats-chart-box { width: auto; min-width: 0; }
.stats-chart-box canvas { max-width: 100%; }
@media (max-width: 1000px) {
  .model-resource-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .model-resource-summary, .stats-chart-row2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats-view { padding: 22px 14px 48px; }
  .stats-head { display: block; margin-bottom: 18px; }
  .stats-head h2 { font-size: 24px; }
  .stats-sub { display: block; margin: 7px 0 0; line-height: 1.45; }
  .promo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .promo-kpi:first-child { grid-column: 1 / -1; }
  .promo-kpi { min-height: 82px; padding: 12px 10px; }
  .promo-kpi b { font-size: 21px; }
  .stats-chart-row2.row-panels .stats-chart-box { padding: 12px; }
  .cov-box { padding: 16px; }
  .cov-head { gap: 10px; }
  .cov-head b { font-size: 30px; }
  .cov-head span { font-size: 13px; }
}

/* Redesigned tissue statistics workspace */
.stats-view {
  max-width: 1480px;
  padding-left: 36px;
  padding-right: 36px;
}
.stats-head { margin-bottom: 20px; padding-bottom: 14px; }
.stats-search { justify-content: flex-start; }
.stats-search input { flex: 1 1 620px; max-width: 720px; min-height: 40px; }
.stats-chart-row2 {
  grid-template-columns: minmax(360px, .8fr) minmax(0, 1.4fr);
  align-items: start;
  gap: 18px;
}
.stats-chart-row2 .stats-chart-box {
  align-self: start;
  padding: 18px;
  border-radius: 12px;
}
.stats-chart-row2 .stats-chart-box:first-child canvas { width: 100%; }
.stats-chart-row2 .stats-chart-box:nth-child(2) canvas { width: 100%; }
.stats-drill { margin-top: 18px; padding: 16px; border-radius: 12px; }
@media (max-width: 900px) {
  .stats-view { padding-left: 20px; padding-right: 20px; }
  .stats-chart-row2 { grid-template-columns: 1fr; }
}
