:root {
  color-scheme: dark;
  --bg: #06120f;
  --bg-2: #081a15;
  --bg-3: #0b241d;
  --panel: rgba(12, 35, 29, .74);
  --panel-2: rgba(16, 46, 38, .82);
  --panel-3: #0e2a23;
  --line: rgba(116, 219, 188, .16);
  --line-strong: rgba(116, 219, 188, .32);
  --text: #e9f5f0;
  --muted: #9dbab0;
  --dim: #6f8c83;
  --teal: #3ce0b2;
  --teal-2: #18b698;
  --teal-3: #0b7f6b;
  --gold: #f1c96b;
  --gold-2: #d99b3d;
  --blue: #70b8ff;
  --rose: #ff8d7a;
  --white-panel: #f3f7f5;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 28px 90px rgba(0, 0, 0, .38);
  --shadow-soft: 0 14px 44px rgba(0, 0, 0, .22);
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --topbar-h: 70px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 12% -8%, rgba(23, 153, 124, .20), transparent 60%),
    radial-gradient(900px 600px at 92% 4%, rgba(221, 168, 63, .10), transparent 55%),
    radial-gradient(1000px 800px at 70% 100%, rgba(20, 110, 95, .12), transparent 60%),
    linear-gradient(180deg, #06120f 0%, #071611 42%, #05100d 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.lb-open, body.command-open { overflow: hidden; }
::selection { background: rgba(60, 224, 178, .28); color: #fff; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.bg-aurora {
  position: fixed;
  inset: -10% -5%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(420px 320px at 72% 18%, rgba(60, 224, 178, .12), transparent 70%),
    radial-gradient(360px 300px at 22% 62%, rgba(241, 201, 107, .07), transparent 70%);
  filter: blur(18px);
  animation: aurora 18s ease-in-out infinite alternate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(130, 220, 195, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 220, 195, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(1200px 900px at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(1200px 900px at 50% 0%, #000 0%, transparent 72%);
}
@keyframes aurora {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); opacity: .85; }
  to { transform: translate3d(1.5%, 1.5%, 0) scale(1.05); opacity: 1; }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(116, 219, 188, .13);
  background: rgba(5, 16, 13, .72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.topbar-inner {
  width: min(1480px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 30px;
}
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(60, 224, 178, .20), rgba(24, 182, 152, .05));
  border: 1px solid rgba(60, 224, 178, .28);
  box-shadow: 0 0 30px rgba(60, 224, 178, .13);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 15px; letter-spacing: .13em; font-weight: 800; }
.brand-text span { margin-top: 4px; font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.nav-link {
  position: relative;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: rgba(60, 224, 178, .07); }
.nav-link.active { color: #dffff5; background: rgba(60, 224, 178, .10); }
.nav-link.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--teal), transparent);
}
.top-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.icon-btn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(14, 42, 35, .55);
  color: var(--muted);
  transition: .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(21, 66, 54, .7); }
.icon-btn:focus-visible, .btn:focus-visible, .nav-link:focus-visible, .species-trigger:focus-visible, .search-trigger:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 2px;
}
.search-trigger {
  display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(14, 42, 35, .55);
  color: var(--muted);
  font-size: 12px;
  transition: .2s;
}
.search-trigger:hover { border-color: var(--line-strong); color: var(--text); }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger kbd {
  font-family: var(--font); font-size: 10px; color: var(--dim);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px;
}
.species-trigger {
  display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(14, 42, 35, .55);
  color: var(--text);
  font-size: 12px;
  transition: .2s;
}
.species-trigger:hover { border-color: var(--line-strong); }
.species-trigger .code {
  width: 23px; height: 23px; display: grid; place-items: center;
  border-radius: 7px; background: rgba(60, 224, 178, .12);
  color: var(--teal); font-family: var(--mono); font-size: 10px; font-weight: 700;
}
.species-trigger .caret { color: var(--dim); font-size: 10px; }
.mobile-toggle { display: none; }

/* ---------- species popover ---------- */
.species-popover {
  position: fixed;
  top: calc(var(--topbar-h) + 10px);
  right: max(24px, calc((100vw - 1480px) / 2 + 24px));
  z-index: 60;
  width: 392px;
  max-height: min(72vh, 620px);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(8, 25, 20, .96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
.popover-head { padding: 14px 14px 8px; }
.popover-head h3 { font-size: 12px; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.species-search {
  width: 100%; height: 38px; margin-top: 10px;
  padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(5, 18, 14, .8); color: var(--text);
}
.species-search::placeholder { color: var(--dim); }
.species-list { max-height: calc(min(72vh, 620px) - 110px); overflow: auto; padding: 4px 8px 12px; }
.species-option {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--text); text-align: left;
  transition: .16s;
}
.species-option:hover { background: rgba(60, 224, 178, .07); }
.species-option.active { border-color: rgba(60, 224, 178, .28); background: rgba(60, 224, 178, .10); }
.species-code {
  width: 28px; height: 28px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 8px; background: rgba(60, 224, 178, .09);
  color: var(--teal); font-family: var(--mono); font-size: 10px; font-weight: 700;
}
.species-option[data-key="multi"] .species-code { background: rgba(241, 201, 107, .10); color: var(--gold); }
.species-option .meta { min-width: 0; flex: 1; }
.species-option .name { display: block; font-size: 13px; }
.species-option .latin { display: block; margin-top: 2px; font-size: 9px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.species-option .signal { flex: 0 0 auto; }
.signal-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.signal-high { background: var(--teal); box-shadow: 0 0 10px rgba(60, 224, 178, .65); }
.signal-low { background: var(--gold); box-shadow: 0 0 10px rgba(241, 201, 107, .5); }
.signal-none { background: #5d766e; }
.signal-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 99px;
  font-size: 10px; letter-spacing: .05em;
  border: 1px solid var(--line); color: var(--muted);
}
.signal-pill.HIGH { color: var(--teal); border-color: rgba(60, 224, 178, .28); background: rgba(60, 224, 178, .07); }
.signal-pill.LOW { color: var(--gold); border-color: rgba(241, 201, 107, .25); background: rgba(241, 201, 107, .06); }
.signal-pill.NONE { color: var(--dim); }

/* ---------- global layout ---------- */
.view { width: min(1480px, calc(100% - 48px)); margin: 0 auto; min-height: calc(100vh - var(--topbar-h) - 110px); padding: 34px 0 72px; }
.boot { min-height: 55vh; display: grid; place-items: center; align-content: center; gap: 18px; color: var(--muted); }
.boot-drop {
  width: 46px; height: 46px; border-radius: 50% 50% 50% 8px;
  background: linear-gradient(145deg, rgba(60, 224, 178, .5), rgba(24, 182, 152, .08));
  border: 1px solid rgba(60, 224, 178, .4);
  transform: rotate(45deg);
  animation: drop 1.8s ease-in-out infinite;
}
@keyframes drop { 0%,100% { transform: rotate(45deg) translateY(0); opacity: .65; } 50% { transform: rotate(45deg) translateY(-8px); opacity: 1; } }
.page { animation: fadeUp .35s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--teal);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--teal); opacity: .65; }
.page-head { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; padding: 6px 0 26px; }
.page-title { font-size: clamp(30px, 4vw, 48px); line-height: 1.12; letter-spacing: -.03em; font-weight: 760; }
.page-title em { font-style: normal; color: var(--teal); }
.page-lead { max-width: 760px; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(14, 42, 35, .55);
  color: var(--text);
  font-size: 13px;
  transition: .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-strong); background: rgba(22, 64, 53, .75); }
.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #38e0b0, #16a98c);
  color: #02110d; font-weight: 700;
  box-shadow: 0 12px 34px rgba(33, 208, 163, .23);
}
.btn.primary:hover { box-shadow: 0 16px 42px rgba(33, 208, 163, .32); }
.btn.ghost { background: transparent; }
.btn.tiny { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 11px; }
.btn.icon { width: 42px; padding: 0; }
.btn svg { width: 16px; height: 16px; }

.section { margin-top: 46px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.section-kicker { font-size: 10px; letter-spacing: .2em; color: var(--teal); text-transform: uppercase; }
.section-title { margin-top: 7px; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -.02em; }
.section-desc { margin-top: 8px; max-width: 720px; color: var(--muted); font-size: 13px; line-height: 1.8; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  min-height: 560px;
  padding: 34px 0 44px;
}
.hero-copy { position: relative; z-index: 1; }
.hero-title {
  margin-top: 18px;
  font-size: clamp(42px, 6.4vw, 82px);
  line-height: 1.02;
  letter-spacing: -.055em;
  font-weight: 780;
}
.hero-title .accent {
  background: linear-gradient(110deg, #eafff8 0%, #54e6bd 46%, #f1c96b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-title .line2 { display: block; margin-top: 10px; font-size: .46em; letter-spacing: -.03em; color: var(--muted); font-weight: 500; }
.hero-lead { max-width: 650px; margin-top: 20px; color: var(--muted); font-size: 14px; line-height: 1.95; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin-top: 38px; max-width: 680px;
}
.stat {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(17, 50, 41, .62), rgba(9, 28, 23, .34));
}
.stat-value { font-family: var(--mono); font-size: clamp(18px, 2.2vw, 25px); letter-spacing: -.04em; color: #dcfff4; }
.stat-value .unit { margin-left: 2px; font-size: 11px; color: var(--teal); }
.stat-label { margin-top: 5px; font-size: 10px; letter-spacing: .08em; color: var(--dim); }
.hero-note { margin-top: 14px; font-size: 10px; color: var(--dim); }

.constellation {
  position: relative;
  aspect-ratio: 1;
  max-height: 620px;
  border: 1px solid rgba(116, 219, 188, .16);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(60, 224, 178, .10), rgba(7, 22, 18, .4) 44%, rgba(5, 16, 13, .82) 72%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 74px, rgba(116, 219, 188, .06) 75px 76px, transparent 77px 148px);
  box-shadow: inset 0 0 90px rgba(60, 224, 178, .07), 0 30px 100px rgba(0, 0, 0, .32);
  overflow: hidden;
}
.constellation::after {
  content: ""; position: absolute; inset: 9%;
  border: 1px dashed rgba(116, 219, 188, .13); border-radius: 50%;
  pointer-events: none;
}
.constellation svg { width: 100%; height: 100%; overflow: visible; }
.node { cursor: pointer; }
.node circle { transition: transform .25s, fill .25s, stroke .25s; transform-box: fill-box; transform-origin: center; }
.node:hover circle { transform: scale(1.45); }
.node text { fill: var(--text); font-size: 9px; font-family: var(--font); text-anchor: middle; pointer-events: none; }
.node .node-code { fill: var(--teal); font-family: var(--mono); font-size: 7px; font-weight: 700; }
.node .node-label { fill: var(--muted); font-size: 7px; }
.orbit { fill: none; stroke: rgba(116, 219, 188, .12); stroke-width: .7; }
.orbit-dash { fill: none; stroke: rgba(241, 201, 107, .13); stroke-width: .7; stroke-dasharray: 3 6; }
.spoke { stroke: rgba(116, 219, 188, .08); stroke-width: .6; }
.central-cell { filter: url(#glow); }
.central-label { fill: #e9fff7; font-size: 12px; font-weight: 700; text-anchor: middle; letter-spacing: .04em; }
.central-sub { fill: var(--muted); font-size: 7px; text-anchor: middle; letter-spacing: .16em; }
.constellation-note {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px;
  background: rgba(6, 20, 16, .75); backdrop-filter: blur(8px);
  color: var(--dim); font-size: 9px; white-space: nowrap;
}

/* ---------- cards / modules ---------- */
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.module-card {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 220px; padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(18, 54, 44, .7), rgba(8, 26, 21, .54));
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.module-card::after {
  content: ""; position: absolute; right: -40px; top: -50px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(60, 224, 178, .12), transparent 70%);
  transition: transform .35s;
}
.module-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 22px 60px rgba(0, 0, 0, .28); }
.module-card:hover::after { transform: scale(1.4); }
.module-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 13px; border: 1px solid rgba(60, 224, 178, .2);
  background: rgba(60, 224, 178, .08); color: var(--teal);
}
.module-icon svg { width: 23px; height: 23px; }
.module-card h3 { margin-top: 18px; font-size: 17px; letter-spacing: -.01em; }
.module-card p { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.8; flex: 1; }
.module-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(116, 219, 188, .1); }
.module-meta .count { font-family: var(--mono); font-size: 11px; color: var(--teal); }
.module-meta .arrow { color: var(--dim); transition: transform .2s; }
.module-card:hover .arrow { transform: translateX(3px); color: var(--teal); }

/* ---------- pipeline ---------- */
.pipeline {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(9, 29, 24, .46); overflow: hidden;
}
.pipeline-step { position: relative; padding: 22px 18px; min-height: 150px; }
.pipeline-step + .pipeline-step { border-left: 1px solid rgba(116, 219, 188, .1); }
.pipeline-step::before {
  content: ""; position: absolute; left: 18px; top: 0; width: 28px; height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
}
.step-num { font-family: var(--mono); font-size: 10px; color: var(--teal); letter-spacing: .12em; }
.step-body h4 { margin-top: 14px; font-size: 13px; }
.step-body p { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.step-body .tag { margin-top: 12px; }

/* ---------- tags / chips ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 3px 8px; border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(60, 224, 178, .05);
  color: var(--muted); font-size: 9px; letter-spacing: .04em;
}
.tag.teal { color: var(--teal); border-color: rgba(60, 224, 178, .22); }
.tag.gold { color: var(--gold); border-color: rgba(241, 201, 107, .22); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 99px;
  background: rgba(60, 224, 178, .07); border: 1px solid rgba(60, 224, 178, .15);
  color: var(--muted); font-size: 10px;
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }

/* ---------- chart bars ---------- */
.chart-card {
  padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(15, 47, 38, .55), rgba(7, 24, 19, .4));
}
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.chart-title { font-size: 15px; }
.chart-sub { margin-top: 5px; color: var(--dim); font-size: 10px; }
.chart-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 10px;
  transition: .18s; white-space: nowrap;
}
.chip-btn:hover { color: var(--text); border-color: var(--line-strong); }
.chip-btn.active { color: #dffff5; border-color: rgba(60, 224, 178, .36); background: rgba(60, 224, 178, .10); }
.bar-chart { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 74px; gap: 10px; align-items: center; cursor: pointer; }
.bar-row:hover .bar-fill { filter: brightness(1.2); }
.bar-label { font-size: 10px; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { display: block; height: 14px; border-radius: 4px; background: rgba(116, 219, 188, .06); overflow: hidden; position: relative; }
.bar-fill {
  display: block;
  height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, rgba(60, 224, 178, .38), rgba(60, 224, 178, .88));
  transition: width .7s cubic-bezier(.2, .8, .2, 1), filter .2s;
}
.bar-row[data-signal="LOW"] .bar-fill { background: linear-gradient(90deg, rgba(241, 201, 107, .32), rgba(241, 201, 107, .82)); }
.bar-row[data-signal="NONE"] .bar-fill { background: linear-gradient(90deg, rgba(108, 135, 127, .22), rgba(108, 135, 127, .55)); }
.bar-value { font-family: var(--mono); font-size: 10px; color: var(--dim); text-align: right; }
.bar-row:hover .bar-label, .bar-row:hover .bar-value { color: var(--text); }

/* ---------- split / sidebar ---------- */
.split { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.sidebar {
  position: sticky; top: calc(var(--topbar-h) + 22px);
  max-height: calc(100vh - var(--topbar-h) - 44px);
  overflow: auto; padding-right: 6px;
}
.sidebar::-webkit-scrollbar, .species-list::-webkit-scrollbar, .command-results::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb, .species-list::-webkit-scrollbar-thumb, .command-results::-webkit-scrollbar-thumb { background: rgba(116, 219, 188, .16); border-radius: 3px; }
.side-group { margin-top: 20px; }
.side-group:first-child { margin-top: 0; }
.side-title { padding: 0 10px 8px; font-size: 9px; letter-spacing: .18em; color: var(--dim); text-transform: uppercase; }
.side-link {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted); text-align: left; font-size: 12px;
  transition: .16s;
}
.side-link:hover { color: var(--text); background: rgba(60, 224, 178, .05); }
.side-link.active { color: #dffff5; background: rgba(60, 224, 178, .10); border-color: rgba(60, 224, 178, .18); }
.side-link .idx { width: 20px; flex: 0 0 auto; font-family: var(--mono); font-size: 9px; color: var(--dim); }
.side-link.active .idx { color: var(--teal); }
.side-link .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-count { font-family: var(--mono); font-size: 9px; color: var(--dim); }
.side-link.active .side-count { color: var(--teal); }
.side-back {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 9px 10px;
  border-bottom: 1px solid rgba(116, 219, 188, .1); color: var(--muted); font-size: 11px;
}
.side-back:hover { color: var(--teal); }

.content { min-width: 0; }
.module-head { padding-bottom: 20px; border-bottom: 1px solid rgba(116, 219, 188, .1); }
.module-head .kicker { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--teal); }
.module-head h2 { margin-top: 7px; font-size: clamp(23px, 3vw, 34px); letter-spacing: -.02em; }
.module-head p { margin-top: 9px; max-width: 850px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.module-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 4px; }
.subgroup { margin-top: 28px; }
.subgroup-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 13px; }
.subgroup-head h3 { font-size: 15px; }
.subgroup-head .count { font-family: var(--mono); font-size: 10px; color: var(--dim); }

/* ---------- figure grid ---------- */
.fig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.fig-card {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: 15px;
  background: linear-gradient(170deg, rgba(16, 48, 39, .48), rgba(7, 23, 19, .38));
  overflow: hidden; cursor: pointer;
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.fig-card:hover { transform: translateY(-3px); border-color: rgba(60, 224, 178, .35); box-shadow: 0 20px 50px rgba(0, 0, 0, .28); }
.fig-media {
  position: relative; aspect-ratio: 4 / 3;
  background: var(--white-panel);
  overflow: hidden;
  border-bottom: 1px solid rgba(116, 219, 188, .1);
}
.fig-media img {
  width: 100%; height: 100%; object-fit: contain; padding: 9px;
  transition: transform .35s ease;
}
.fig-card:hover .fig-media img { transform: scale(1.035); }
.fig-media.wide { aspect-ratio: 16 / 6; }
.fig-media.wide img { object-fit: contain; }
.fig-media.pdf-only, .fig-media.noimg { background: linear-gradient(145deg, #eff5f2, #dfe9e5); }
.fig-media .placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 8px;
  color: #5f7a71; font-size: 11px; text-align: center; padding: 20px;
}
.fig-media .placeholder strong { display: block; color: #26463d; font-size: 13px; }
.fig-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; z-index: 1; }
.fig-badge {
  padding: 2px 6px; border-radius: 5px;
  background: rgba(6, 20, 16, .78); color: #bff5e5;
  font-family: var(--mono); font-size: 8px; letter-spacing: .04em;
  backdrop-filter: blur(6px);
}
.fig-badge.summary { background: rgba(241, 201, 107, .88); color: #2c1e02; }
.fig-body { display: flex; flex-direction: column; gap: 7px; padding: 12px 13px 13px; min-height: 116px; }
.fig-title { font-size: 12px; line-height: 1.5; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fig-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 9px; color: var(--dim); }
.fig-sub .sp { color: var(--teal); }
.fig-caption { color: var(--dim); font-size: 9px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fig-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.fig-format { font-family: var(--mono); font-size: 8px; color: var(--dim); letter-spacing: .05em; }
.fig-open { color: var(--teal); font-size: 9px; opacity: 0; transition: opacity .2s; }
.fig-card:hover .fig-open { opacity: 1; }
.load-more { display: flex; justify-content: center; margin-top: 24px; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty strong { display: block; margin-bottom: 8px; color: var(--text); }

/* ---------- species grid ---------- */
.species-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.species-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 15px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(160deg, rgba(16, 47, 39, .5), rgba(7, 23, 19, .36));
  text-align: left; color: var(--text);
  transition: .2s;
}
.species-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.species-card.active { border-color: rgba(60, 224, 178, .45); background: rgba(60, 224, 178, .08); }
.species-card-head { display: flex; align-items: center; gap: 10px; }
.species-card-head .code {
  width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 10px; background: rgba(60, 224, 178, .1); color: var(--teal);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
}
.species-card-head .nm { min-width: 0; flex: 1; }
.species-card-head .nm strong { display: block; font-size: 13px; }
.species-card-head .nm span { display: block; margin-top: 2px; font-size: 9px; color: var(--dim); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.species-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.species-stat { padding: 7px 8px; border-radius: 8px; background: rgba(5, 18, 14, .45); }
.species-stat b { display: block; font-family: var(--mono); font-size: 11px; color: #dffff5; }
.species-stat span { display: block; margin-top: 2px; font-size: 8px; color: var(--dim); }
.species-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------- detail / stats ---------- */
.detail-panel { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(9, 29, 24, .5); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.detail-head h3 { font-size: 19px; }
.detail-head p { margin-top: 5px; color: var(--dim); font-size: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.stat-box { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(6, 21, 17, .42); }
.stat-box b { display: block; font-family: var(--mono); font-size: 18px; color: #dffff5; letter-spacing: -.03em; }
.stat-box span { display: block; margin-top: 4px; font-size: 9px; color: var(--dim); }

/* ---------- tables ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: auto; background: rgba(7, 24, 19, .42); max-height: 520px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; min-width: 520px; }
.data-table th {
  position: sticky; top: 0; z-index: 1;
  padding: 10px 12px; text-align: left;
  background: #0c2a22; color: var(--muted);
  font-size: 9px; letter-spacing: .08em; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid rgba(116, 219, 188, .07); color: var(--muted); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(60, 224, 178, .04); color: var(--text); }
.data-table td.num, .data-table th.num { text-align: right; font-family: var(--mono); font-size: 10px; }
.data-table td.gene { color: var(--text); font-family: var(--mono); font-size: 10px; }
.data-table .up { color: var(--teal); }
.data-table .down { color: var(--rose); }
.data-table .muted { color: var(--dim); }

/* ---------- callouts ---------- */
.callout {
  margin-top: 18px; padding: 15px 17px;
  border: 1px solid var(--line); border-left: 3px solid var(--teal);
  border-radius: 12px; background: rgba(60, 224, 178, .045);
  color: var(--muted); font-size: 11px; line-height: 1.85;
}
.callout strong { color: var(--text); }
.callout.warn { border-left-color: var(--gold); background: rgba(241, 201, 107, .045); }
.callout.info { border-left-color: var(--blue); background: rgba(112, 184, 255, .045); }
.callout.gold { border-left-color: var(--gold); }
.note-list { margin-top: 10px; padding-left: 16px; list-style: disc; color: var(--muted); font-size: 11px; line-height: 1.85; }
.note-list li + li { margin-top: 4px; }

/* ---------- framework / virtual overview ---------- */
.framework-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.fw-step { position: relative; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: rgba(11, 35, 28, .5); }
.fw-step .n { font-family: var(--mono); font-size: 9px; color: var(--teal); }
.fw-step h4 { margin-top: 12px; font-size: 12px; }
.fw-step p { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.fw-step::after { content: "→"; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 12px; }
.fw-step:last-child::after { display: none; }
.virtual-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.virtual-card {
  display: flex; flex-direction: column; min-height: 178px; padding: 19px;
  border: 1px solid var(--line); border-radius: 15px;
  background: linear-gradient(160deg, rgba(17, 50, 41, .55), rgba(7, 24, 19, .4));
  transition: .2s; color: var(--text);
}
.virtual-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.virtual-card .icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(60, 224, 178, .08); color: var(--teal); border: 1px solid rgba(60, 224, 178, .18); }
.virtual-card .icon svg { width: 19px; height: 19px; }
.virtual-card h3 { margin-top: 14px; font-size: 14px; }
.virtual-card p { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.7; flex: 1; }
.virtual-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding-top: 11px; border-top: 1px solid rgba(116, 219, 188, .1); font-size: 9px; color: var(--dim); }
.virtual-card .foot b { color: var(--teal); font-family: var(--mono); font-weight: 500; }
.big-figure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(9, 29, 24, .45); }
.big-figure .img-wrap { background: var(--white-panel); padding: 14px; }
.big-figure img { width: 100%; height: auto; max-height: 560px; object-fit: contain; margin: 0 auto; }
.big-figure .cap { padding: 15px 18px; color: var(--muted); font-size: 11px; line-height: 1.8; border-top: 1px solid var(--line); }

/* ---------- trajectory controls ---------- */
.traj-shell { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7, 24, 19, .45); overflow: hidden; }
.traj-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid rgba(116, 219, 188, .1); flex-wrap: wrap; }
.traj-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.traj-canvas-wrap { position: relative; padding: 10px 12px 4px; background: radial-gradient(circle at 50% 45%, rgba(60, 224, 178, .055), transparent 65%), #071a15; }
.traj-canvas { width: 100%; height: 500px; display: block; border-radius: 10px; }
.traj-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 16px 14px; color: var(--muted); font-size: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 8px; height: 8px; border-radius: 50%; }
.slider-row { display: flex; align-items: center; gap: 12px; padding: 0 16px 14px; }
.slider-row label { font-size: 10px; color: var(--muted); white-space: nowrap; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--teal) var(--pct, 0%), rgba(116, 219, 188, .14) var(--pct, 0%));
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: #dffff5; border: 3px solid var(--teal-2);
  box-shadow: 0 0 14px rgba(60, 224, 178, .5); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #dffff5; border: 3px solid var(--teal-2); cursor: pointer;
}
.time-readout { font-family: var(--mono); font-size: 11px; color: var(--teal); min-width: 50px; text-align: right; }

/* ---------- line chart ---------- */
.line-chart-wrap { position: relative; padding: 8px 6px 4px; }
.line-chart { width: 100%; height: 310px; display: block; }
.axis text { fill: var(--dim); font-size: 9px; font-family: var(--mono); }
.axis line, .axis path { stroke: rgba(116, 219, 188, .14); }
.grid-line { stroke: rgba(116, 219, 188, .07); stroke-width: .6; }
.line-path { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s; }
.line-dot { cursor: pointer; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.legend-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: 7px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 9px; transition: .16s;
}
.legend-chip:hover { border-color: var(--line-strong); color: var(--text); }
.legend-chip.off { opacity: .35; }
.legend-chip .swatch { width: 10px; height: 3px; border-radius: 2px; }
.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.mini-chart { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(6, 21, 17, .38); }
.mini-chart .mini-title { font-size: 9px; color: var(--dim); }
.mini-chart .mini-val { margin-top: 4px; font-family: var(--mono); font-size: 13px; color: var(--text); }

/* ---------- methods ---------- */
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.method-block { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(9, 29, 24, .45); }
.method-block h3 { font-size: 15px; }
.method-block p { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.9; }
.path-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 10px; }
.path-table td { padding: 7px 8px; border-bottom: 1px solid rgba(116, 219, 188, .08); vertical-align: top; color: var(--muted); }
.path-table td:first-child { color: var(--text); white-space: nowrap; font-family: var(--mono); font-size: 9px; }
.path-table code { font-family: var(--mono); font-size: 9px; color: var(--teal); word-break: break-all; }
details.fold { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(6, 21, 17, .35); }
details.fold summary { padding: 11px 13px; cursor: pointer; color: var(--muted); font-size: 11px; }
details.fold[open] summary { color: var(--text); border-bottom: 1px solid rgba(116, 219, 188, .08); }
details.fold .fold-body { padding: 12px 13px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid rgba(116, 219, 188, .1); background: rgba(4, 14, 11, .5); }
.footer-inner { width: min(1480px, calc(100% - 48px)); margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; color: var(--dim); font-size: 10px; }
.footer-inner strong { color: var(--muted); letter-spacing: .1em; margin-right: 8px; }
.footer-meta { display: flex; gap: 16px; align-items: center; }
.footer-meta a:hover { color: var(--teal); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; }
.lightbox.open { display: block; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(2, 9, 7, .82); backdrop-filter: blur(10px); }
.lb-shell {
  position: relative; z-index: 1;
  width: min(1500px, 96vw); height: min(92vh, 960px);
  margin: 4vh auto; display: flex; flex-direction: column;
  border: 1px solid var(--line-strong); border-radius: 18px;
  background: rgba(7, 22, 18, .96); box-shadow: var(--shadow); overflow: hidden;
}
.lb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 18px; border-bottom: 1px solid rgba(116, 219, 188, .1); }
.lb-kicker { font-family: var(--mono); font-size: 9px; color: var(--teal); letter-spacing: .1em; }
.lb-title { margin-top: 4px; font-size: 15px; line-height: 1.5; font-weight: 600; }
.lb-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.lb-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 0; flex: 1; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; background: #e9efec; overflow: hidden; }
.lb-media { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: grab; }
.lb-media.dragging { cursor: grabbing; }
.lb-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; transform-origin: center; user-select: none; -webkit-user-drag: none; }
.lb-media iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.lb-media .pdf-fallback { padding: 30px; text-align: center; color: #26463d; }
.lb-nav { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; z-index: 2; }
.lb-nav .icon-btn { pointer-events: auto; background: rgba(6, 20, 16, .62); color: #dffff5; border-color: rgba(255, 255, 255, .14); }
.lb-nav .icon-btn:disabled { opacity: .25; cursor: default; }
.lb-hint { padding: 7px 9px; border: 1px dashed rgba(116, 219, 188, .16); border-radius: 8px; background: rgba(6, 20, 16, .3); color: var(--dim); font-size: 9px; line-height: 1.6; }
.lb-info { display: flex; flex-direction: column; gap: 12px; padding: 16px 17px; border-left: 1px solid rgba(116, 219, 188, .1); overflow: auto; }
.lb-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-caption { color: var(--muted); font-size: 11px; line-height: 1.85; }
.lb-source-wrap { border-top: 1px solid rgba(116, 219, 188, .1); padding-top: 10px; }
.lb-source-wrap summary { color: var(--dim); font-size: 10px; cursor: pointer; }
.lb-source { margin-top: 7px; font-family: var(--mono); font-size: 9px; line-height: 1.7; color: var(--dim); word-break: break-all; user-select: text; }
.lb-formats { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-formats .btn { height: 30px; font-size: 10px; padding: 0 10px; }
.lb-counter { margin-top: auto; color: var(--dim); font-family: var(--mono); font-size: 9px; }

/* ---------- command ---------- */
.command { position: fixed; inset: 0; z-index: 110; display: none; }
.command.open { display: block; }
.command-backdrop { position: absolute; inset: 0; background: rgba(2, 9, 7, .72); backdrop-filter: blur(8px); }
.command-panel {
  position: relative; z-index: 1;
  width: min(680px, calc(100vw - 32px)); margin: 12vh auto 0;
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: rgba(8, 25, 20, .98); box-shadow: var(--shadow); overflow: hidden;
}
.command-input-wrap { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid rgba(116, 219, 188, .1); }
.command-input-wrap .search-icon { width: 18px; height: 18px; color: var(--teal); }
.command-input-wrap input { flex: 1; border: 0; background: transparent; color: var(--text); outline: none; font-size: 14px; }
.command-input-wrap input::placeholder { color: var(--dim); }
.command-input-wrap kbd { font-family: var(--font); font-size: 9px; color: var(--dim); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; }
.command-results { max-height: 52vh; overflow: auto; padding: 8px; }
.command-item {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text); text-align: left; transition: .14s;
}
.command-item:hover, .command-item.active { background: rgba(60, 224, 178, .08); border-color: rgba(60, 224, 178, .14); }
.command-item .ci-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: rgba(60, 224, 178, .08); color: var(--teal); font-size: 10px; font-family: var(--mono); }
.command-item .ci-main { min-width: 0; flex: 1; }
.command-item .ci-title { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-item .ci-sub { display: block; margin-top: 3px; font-size: 9px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-foot { padding: 9px 14px; border-top: 1px solid rgba(116, 219, 188, .1); color: var(--dim); font-size: 9px; }

/* ---------- toast / tooltip ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120;
  transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: rgba(8, 28, 22, .96); color: var(--text); font-size: 11px;
  transition: .22s; box-shadow: var(--shadow-soft);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.tooltip {
  position: fixed; z-index: 130; pointer-events: none;
  transform: translate(-50%, -120%); opacity: 0; transition: opacity .12s;
  padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: rgba(6, 20, 16, .96); color: var(--text); font-size: 10px; line-height: 1.5;
  max-width: 280px; box-shadow: var(--shadow-soft);
}
.tooltip.show { opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fig-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline-step:nth-child(4) { border-left: 0; border-top: 1px solid rgba(116, 219, 188, .1); }
  .pipeline-step:nth-child(5), .pipeline-step:nth-child(6) { border-top: 1px solid rgba(116, 219, 188, .1); }
}
@media (max-width: 1080px) {
  .topbar-inner { gap: 16px; }
  .nav-link { padding: 8px 9px; font-size: 12px; }
  .search-trigger span { display: none; }
  .split { grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
  .fig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .species-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .virtual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .framework-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fw-step:nth-child(2)::after { display: none; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --topbar-h: 64px; }
  .topbar-inner { width: calc(100% - 28px); }
  .nav { display: none; position: absolute; left: 14px; right: 14px; top: calc(var(--topbar-h) + 8px); flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(8, 25, 20, .98); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-link { padding: 10px 12px; }
  .mobile-toggle { display: inline-grid; }
  .view { width: calc(100% - 28px); padding-top: 22px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 10px; }
  .constellation { max-width: 520px; margin: 8px auto 0; width: 100%; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .split { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; border-bottom: 1px solid rgba(116, 219, 188, .1); }
  .side-group { display: contents; }
  .side-title { display: none; }
  .side-link { width: auto; flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--line); }
  .side-back { display: none; }
  .side-count { display: none; }
  .fig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lb-info { border-left: 0; border-top: 1px solid rgba(116, 219, 188, .1); max-height: 32vh; }
  .lb-caption { max-height: 80px; overflow: auto; }
  .lb-shell { height: 94vh; margin: 3vh auto; }
  .method-grid { grid-template-columns: 1fr; }
  .species-popover { right: 14px; width: min(392px, calc(100vw - 28px)); }
}
@media (max-width: 640px) {
  .view, .footer-inner { width: calc(100% - 22px); }
  .brand-text span { display: none; }
  .search-trigger kbd { display: none; }
  .species-trigger .label { display: none; }
  .hero-title { font-size: clamp(38px, 12vw, 58px); }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .fig-grid { grid-template-columns: 1fr; }
  .species-grid { grid-template-columns: 1fr; }
  .virtual-grid { grid-template-columns: 1fr; }
  .framework-steps { grid-template-columns: 1fr; }
  .fw-step::after { display: none; }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline-step + .pipeline-step { border-left: 0; border-top: 1px solid rgba(116, 219, 188, .1); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 74px minmax(0, 1fr) 62px; }
  .traj-canvas { height: 380px; }
  .mini-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; }
  .lb-head { padding: 11px 12px; }
  .lb-title { font-size: 13px; }
  .lb-actions .icon-btn { width: 32px; height: 32px; }
  .lb-info { padding: 12px; }
  .command-panel { margin-top: 8vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- additional controls ---------- */
.bar-row {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  text-align: left;
}
.species-card, .chip-btn, .btn, .icon-btn, .search-trigger, .species-trigger, .species-option, .pred-species-card {
  appearance: none;
  -webkit-appearance: none;
}
.filter-bar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(15, 47, 38, .45), rgba(7, 24, 19, .34));
}
.filter-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.field.grow { flex: 1 1 260px; min-width: 220px; }
.field label { font-size: 9px; letter-spacing: .08em; color: var(--dim); }
.input, .select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 18, 14, .72);
  color: var(--text);
  padding: 0 10px;
  font-size: 11px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.select { padding-right: 28px; }
.input::placeholder { color: var(--dim); }
.input:focus, .select:focus { border-color: rgba(60, 224, 178, .48); box-shadow: 0 0 0 3px rgba(60, 224, 178, .08); }
.select option, .select optgroup { background: #0b241d; color: var(--text); }
.results-meta { display: flex; align-items: center; gap: 8px; margin: 18px 0 14px; color: var(--muted); font-size: 11px; }
.results-meta strong { color: var(--teal); font-family: var(--mono); font-weight: 500; }
.lb-caption { white-space: pre-line; }

.pred-species-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pred-species-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(165deg, rgba(16, 47, 39, .46), rgba(7, 23, 19, .34));
  overflow: hidden; color: var(--text); text-align: left;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.pred-species-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.pred-species-card.active { border-color: rgba(60, 224, 178, .5); box-shadow: 0 0 0 1px rgba(60, 224, 178, .18), 0 16px 40px rgba(0,0,0,.22); }
.pred-species-card .thumb { aspect-ratio: 16 / 10; background: var(--white-panel); border-bottom: 1px solid rgba(116, 219, 188, .1); overflow: hidden; }
.pred-species-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.pred-species-card:hover .thumb img { transform: scale(1.03); }
.pred-species-card .body { padding: 10px 11px 11px; }
.pred-species-title { display: flex; align-items: center; gap: 7px; }
.pred-species-title .code {
  width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 6px; background: rgba(60, 224, 178, .1); color: var(--teal);
  font-family: var(--mono); font-size: 8px; font-weight: 700;
}
.pred-species-title strong { font-size: 11px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pred-species-meta { display: flex; justify-content: space-between; margin-top: 7px; color: var(--dim); font-family: var(--mono); font-size: 8px; }

.big-figure[data-fig-list] { transition: transform .2s, border-color .2s, box-shadow .2s; }
.big-figure[data-fig-list]:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }

@media (max-width: 1080px) {
  .pred-species-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pred-species-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row { align-items: stretch; }
  .field { flex: 1 1 140px; }
}
@media (max-width: 520px) {
  .pred-species-grid { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .stat-grid.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
