/* ---- tokens (reference dataviz palette, light + dark) ---- */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --series-1: #2a78d6;   /* blue   — primary / GO:BP */
  --series-2: #eb6834;   /* orange — KEGG */
  --series-3: #1baf7a;   /* aqua   — Reactome */
  --series-4: #6b4fd8;   /* purple — 4th categorical, emerging quadrants */
  --seq-150: #b7d3f6;    /* light sequential steps for score bars */
  --seq-250: #86b6ef;
  --seq-450: #2a78d6;
  --good-text: #006300;
  --wash: rgba(42, 120, 214, 0.10);
  --heat-1: #b7d3f6;   /* sequential blue: low / mid / high */
  --heat-2: #5598e7;
  --heat-3: #184f95;
  --seq-250: #86b6ef;  /* clinical-stage ramp, light → dark = further along */
  --seq-350: #5598e7;
  --seq-650: #104281;
  --mod-1: #2a78d6;
  --mod-2: #eb6834;
  --mod-3: #1baf7a;
  --mod-4: #7c5cd6;
  --mod-5: #d1477f;
  --mod-6: #a8791a;
  --mod-7: #0f8fa8;
  --mod-8: #8a5a3c;
  --mod-9: #cc3b34;
  --mod-10: #6f9e1f;
  --mod-11: #9b3fb5;
  --organ-brain: #e87ba4;
  --organ-lung: #2a78d6;
  --organ-heart: #e34948;
  --organ-kidney: #eb6834;
  --organ-joint: #4a3aa7;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #9085e9;
    --seq-150: #184f95;
    --seq-250: #1c5cab;
    --seq-450: #3987e5;
    --good-text: #0ca30c;
    --wash: rgba(57, 135, 229, 0.14);
    --heat-1: #184f95;   /* dark mode: low recedes toward surface, high brightens */
    --heat-2: #256abf;
    --heat-3: #6da7ec;
    --seq-250: #1c5cab;
    --seq-350: #256abf;
    --seq-650: #9ec5f4;
    --mod-1: #4a95ea;
    --mod-2: #f0803f;
    --mod-3: #2ec48d;
    --mod-4: #9b8ff0;
    --mod-5: #e8699a;
    --mod-6: #cc9a33;
    --mod-7: #35b3cc;
    --mod-8: #b57a55;
    --mod-9: #e35a52;
    --mod-10: #8fbf3a;
    --mod-11: #b968d1;
    --organ-brain: #d55181;
    --organ-lung: #3987e5;
    --organ-heart: #e66767;
    --organ-kidney: #d95926;
    --organ-joint: #9085e9;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--series-1); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.site-header { padding: 28px 0 8px; }
.site-header h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  /* Wordmark only — the rest of the UI stays in the system sans. */
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.site-header .logo { width: 38px; height: 38px; flex: none; }
.tagline { margin: 4px 0 0; color: var(--ink-2); }
.intro { margin: 10px 0 0; color: var(--ink-2); font-size: 13.5px; max-width: 860px; }
.provenance { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ---- KPI row ---- */
.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 18px 0;
}
.stat-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
}
.stat-tile .label { color: var(--ink-2); font-size: 13px; }
.stat-tile .value { font-size: 26px; font-weight: 600; margin-top: 2px; }
.stat-tile .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--grid); margin-bottom: 16px; }
.tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 8px 14px; font: inherit; color: var(--ink-2); cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--series-1); font-weight: 600; }

/* ---- filter row ---- */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filter-row input[type="search"], .filter-row select {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--baseline); border-radius: 8px;
  padding: 7px 10px; font: inherit; min-width: 200px;
}
.filter-row label.check { display: flex; gap: 6px; align-items: center; color: var(--ink-2); cursor: pointer; }
.filter-row .count { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ---- weight sliders ---- */
.weight-card { padding-bottom: 14px; }
.weight-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.weight-head h2 { margin: 0 0 2px; }
.weight-actions { display: flex; align-items: center; gap: 10px; }
.weight-reset { margin-bottom: 0; padding: 5px 11px; font-size: 13px; }
.weight-status { font-size: 12.5px; white-space: nowrap; }
.weight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 22px; margin-top: 12px; }
.weight-row { display: grid; grid-template-columns: 96px 1fr 42px; align-items: center; gap: 10px; }
.weight-label { font-size: 13px; color: var(--ink-2); }
.weight-val { font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); font-weight: 600; }
.weight-row input[type="range"], .tw-row input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  background: var(--grid); border-radius: 2px; outline: none; cursor: pointer;
}
.weight-row input[type="range"]::-webkit-slider-thumb,
.tw-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: var(--series-1);
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border);
}
.weight-row input[type="range"]::-moz-range-thumb,
.tw-row input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--series-1);
  border: 2px solid var(--surface);
}
.weight-row input[type="range"]:focus-visible,
.tw-row input[type="range"]:focus-visible { box-shadow: 0 0 0 3px var(--wash); }

.delta { font-size: 11px; font-weight: 600; margin-left: 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta-up { color: var(--good-text); }
.delta-down { color: var(--muted); }
.delta-new { color: var(--series-2); }
.empty-state { text-align: center; padding: 28px 10px; color: var(--ink-2); }
.empty-state p { margin: 0 0 12px; }

/* ---- cards & tables ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 4px; font-size: 17px; }
.card .sub { color: var(--ink-2); font-size: 13px; margin: 0 0 12px; }

table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; color: var(--muted); font-size: 12px; font-weight: 500;
  padding: 6px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap;
}
table.data th.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
tr.gene-row { cursor: pointer; }
tr.gene-row:hover td, tr.gene-row:focus-within td { background: var(--wash); }
.gene-symbol { font-weight: 600; }
.gene-symbol button {
  all: unset; font-weight: 600; color: var(--series-1); cursor: pointer;
}
.gene-symbol button:hover { text-decoration: underline; }
.gene-name { color: var(--ink-2); font-size: 12.5px; max-width: 300px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.score-cell { display: flex; align-items: center; gap: 8px; }
.score-cell .bar-track { flex: 1; min-width: 70px; height: 8px; border-radius: 4px; background: var(--grid); }
.score-cell .bar-fill { height: 8px; border-radius: 4px; background: var(--series-1); }
.score-cell .val { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 38px; text-align: right; }

/* ---- literature velocity ---- */
.trend-cell { display: flex; flex-direction: column; gap: 1px; }
.trend-cell .spark-gap { height: 26px; display: flex; align-items: center; }
.trend-tag { font-size: 11px; letter-spacing: 0.01em; cursor: default; }
.trend-surging { color: var(--good-text); font-weight: 600; }
.trend-declining { color: var(--muted); }
.trend-steady { color: var(--muted); opacity: 0.65; }

/* ---- clinical stage badges (sequential: darker = further along) ---- */
/* Text colour is pinned per step so it always contrasts with its own fill —
   the ramp inverts in dark mode, so the pairings flip with it. */
/* Paired .badge.stage-* so these beat the base .badge colour regardless of
   source order; the ramp inverts in dark mode, so the ink flips with it. */
.badge.drug-badge { border: none; font-weight: 600; }
.badge.stage-approved { background: var(--seq-650); color: #fcfcfb; }
.badge.stage-3 { background: var(--seq-450); color: #fcfcfb; }
.badge.stage-2 { background: var(--seq-350); color: #0b0b0b; }
.badge.stage-1 { background: var(--seq-250); color: #0b0b0b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.stage-approved { color: #0b0b0b; }
  :root:not([data-theme="light"]) .badge.stage-3 { color: #ffffff; }
  :root:not([data-theme="light"]) .badge.stage-2 { color: #ffffff; }
  :root:not([data-theme="light"]) .badge.stage-1 { color: #ffffff; }
}

.evidence-cell-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.evidence-cell-wrap .badge { margin-right: 0; }
.evidence-strip { display: inline-flex; gap: 3px; vertical-align: middle; }
.evidence-cell {
  width: 13px; height: 13px; border-radius: 3px;
  border: 1px solid var(--grid); background: none;
}
.evidence-cell.h1 { background: var(--heat-1); border-color: transparent; }
.evidence-cell.h2 { background: var(--heat-2); border-color: transparent; }
.evidence-cell.h3 { background: var(--heat-3); border-color: transparent; }
.evidence-sources { color: var(--muted); font-size: 12px; margin: -2px 0 8px 160px; }
@media (max-width: 640px) { .evidence-sources { margin-left: 120px; } }

.badge {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px;
  border: 1px solid var(--baseline); color: var(--ink-2); margin-right: 4px; white-space: nowrap;
}
.badge.genetic { border-color: var(--series-1); color: var(--series-1); }
.badge.rising { border-color: var(--series-2); color: var(--series-2); }

/* ---- charts ---- */
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; height: auto; }
.axis-label, .tick-label { fill: var(--muted); font-size: 11px; }
.direct-label { fill: var(--ink-2); font-size: 11.5px; }
.gridline { stroke: var(--grid); stroke-width: 1; }
.baseline-rule { stroke: var(--baseline); stroke-width: 1; }
.crosshair { stroke: var(--baseline); stroke-width: 1; }
/* The calendar year still in progress: shaded, with the series drawn dashed
   across it, so a partial count is never read as a fall in interest. */
.partial-band { fill: var(--grid); opacity: 0.4; }
.partial-note { fill: var(--muted); font-size: 10px; }
.hover-dot { pointer-events: none; }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  padding: 8px 10px; font-size: 12.5px; max-width: 300px;
}
.tooltip .tt-title { color: var(--muted); margin-bottom: 3px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 6px; }
.tooltip .tt-key { width: 12px; height: 0; border-top: 2px solid; border-radius: 1px; }
.tooltip .tt-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.tooltip .tt-label { color: var(--ink-2); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 2px; font-size: 12.5px; color: var(--ink-2); }
.legend .key { display: inline-block; width: 14px; height: 0; border-top: 2px solid; border-radius: 1px; vertical-align: middle; margin-right: 5px; }
.legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; }

/* ---- gene detail ---- */
.detail-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.detail-head h2 { margin: 0; font-size: 24px; }
.back-btn {
  background: var(--surface); border: 1px solid var(--baseline); border-radius: 8px;
  color: var(--ink-2); padding: 6px 12px; font: inherit; cursor: pointer; margin-bottom: 14px;
}
.back-btn:hover { color: var(--ink); }
.breakdown-row { display: grid; grid-template-columns: 150px 1fr 60px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13.5px; }
.breakdown-row .track { height: 10px; border-radius: 5px; background: var(--grid); }
.breakdown-row .fill { height: 10px; border-radius: 5px; }
.breakdown-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.chip {
  display: inline-block; margin: 3px 4px 3px 0; padding: 3px 10px; font-size: 12.5px;
  border: 1px solid var(--baseline); border-radius: 12px; color: var(--ink-2); background: none; cursor: pointer;
}
.chip:hover { background: var(--wash); color: var(--ink); }
.chip .src { color: var(--muted); font-size: 11px; margin-left: 4px; }

/* ---- pathways ---- */
.pathway-bar-row { display: grid; grid-template-columns: minmax(180px, 320px) 1fr 70px; gap: 10px; align-items: center; margin: 4px 0; font-size: 13px; cursor: pointer; border-radius: 6px; padding: 3px 6px; }
.pathway-bar-row:hover { background: var(--wash); }
.pathway-bar-row .term { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pathway-bar-row .track { height: 12px; background: none; }
.pathway-bar-row .fill { height: 12px; border-radius: 0 4px 4px 0; }
.pathway-bar-row .num { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 12px; }
.pathway-members { padding: 4px 6px 10px; }

/* ---- compare ---- */
.compare-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.selected-gene {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 12px; border: 1px solid var(--baseline); font-size: 13px;
}
.selected-gene .dot { width: 10px; height: 10px; border-radius: 50%; }
.selected-gene button { all: unset; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; }
.selected-gene button:hover { color: var(--ink); }
.table-toggle { background: none; border: none; color: var(--series-1); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.table-toggle:hover { text-decoration: underline; }

/* ---- about ---- */
.callout-line { stroke: var(--baseline); stroke-width: 1; }
.callout-title { fill: var(--ink); font-size: 13px; font-weight: 600; }
.callout-sub { fill: var(--ink-2); font-size: 11.5px; }
.donut-center { fill: var(--ink); font-size: 22px; font-weight: 600; }
.about-h3 { font-size: 14px; margin: 18px 0 6px; }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.donut-box { max-width: 280px; }
.legend-stack { flex-direction: column; gap: 4px; }
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; } }

.loading { text-align: center; color: var(--muted); padding: 60px 0; }
.site-footer { color: var(--muted); font-size: 12.5px; padding: 24px 20px 40px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }


/* ---- target opportunity tab ---- */
/* Pillar sliders carry a sentence of explanation each, so they stack rather
   than sharing the leaderboard's single-line label / slider / value grid. */
.tw-row { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 10px; }
.tw-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tw-help { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

.intro-card p { margin: 0 0 10px; }
.intro-card p:last-child { margin-bottom: 0; }
.intro-card .sub { margin-bottom: 10px; }

/* Compact four-pillar strip in the ranked table: one column per pillar,
   height encodes the score. */
.pillar-strip { display: inline-flex; gap: 4px; align-items: flex-end; height: 26px; }
.pillar-cell {
  width: 13px; height: 100%; background: var(--grid); border-radius: 2px;
  display: flex; align-items: flex-end; overflow: hidden; cursor: default;
}
.pillar-fill { width: 100%; border-radius: 2px; }

.flag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.badge.flag { font-size: 11px; cursor: default; }
.badge.flag-repurposing { border-color: var(--series-3); color: var(--series-3); }
.badge.flag-whitespace { border-color: var(--series-1); color: var(--series-1); }
.badge.flag-safety { border-color: var(--organ-heart); color: var(--organ-heart); }
.badge.flag-approved { border-color: var(--muted); color: var(--muted); }
/* One line, truncated — the full "drug — stage in indication" is on the
   title attribute. Without this the column wraps to three lines and shoves
   the rest of the table off the page. */
/* This table carries two more columns than the leaderboard, so the gene-name
   column gets a tighter cap to keep the row inside the page. */
#view-targets .gene-name { max-width: 200px; }
.xind {
  font-size: 12.5px; display: block; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.pillar-card { padding-bottom: 6px; }
.pillar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pillar-score { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.pillar-value { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pillar-bar { height: 6px; border-radius: 3px; background: var(--grid); margin: 8px 0 14px; }
.pillar-bar .fill { height: 6px; border-radius: 3px; }

.criterion { padding: 10px 0; border-top: 1px solid var(--border); }
.criterion:first-of-type { border-top: none; }
.criterion .breakdown-row { margin: 0 0 5px; }
.criterion-label { display: flex; align-items: baseline; gap: 6px; }
.criterion-weight { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.criterion-detail { font-size: 13px; color: var(--ink); margin: 0 0 3px; }
.criterion-meta {
  display: flex; gap: 12px; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--muted);
}
.criterion-source { white-space: nowrap; font-variant-numeric: tabular-nums; }

.pillar-summary { margin: 10px 0 4px; }
.pillar-summary-row { display: grid; grid-template-columns: 150px 1fr 60px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13.5px; }
.pillar-summary-row .track { height: 10px; border-radius: 5px; background: var(--grid); }
.pillar-summary-row .fill { height: 10px; border-radius: 5px; }
.pillar-summary-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

.gate-note {
  margin: 12px 0 0; padding: 9px 11px; border-radius: 6px; font-size: 12.5px;
  background: var(--wash); color: var(--ink-2); border-left: 3px solid var(--series-2);
}
.gate-note.gate-clear { border-left-color: var(--series-3); }

.context-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.context-grid .label { color: var(--muted); font-size: 12px; margin-bottom: 3px; }

@media (max-width: 640px) {
  .gene-name { display: none; }
  .breakdown-row { grid-template-columns: 110px 1fr 50px; }
  .pillar-summary-row { grid-template-columns: 110px 1fr 50px; }
  .criterion-meta { flex-direction: column; gap: 2px; }
}

/* ---- emerging genes ---- */
.split-rule { stroke: var(--baseline); stroke-width: 1; stroke-dasharray: 4 4; }
.quadrant-label { font-size: 12px; font-weight: 600; opacity: 0.85; }
.scatter-dot { cursor: pointer; }
.scatter-dot:hover { stroke: var(--ink); stroke-width: 1.5; opacity: 1; }
.scatter-label { fill: var(--ink-2); font-size: 10.5px; pointer-events: none; }
.quadrant-legend { gap: 8px; margin: 6px 0 10px; }
.legend-btn {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
  font-size: 12.5px; color: var(--ink-2);
}
.legend-btn:hover { background: var(--wash); color: var(--ink); }
.legend-btn.active { border-color: var(--ink-2); color: var(--ink); font-weight: 600; }
.badge.quadrant-badge { font-weight: 600; white-space: nowrap; }
.badge.verified { border-color: var(--border); color: var(--muted); }
.badge.unverified { border-color: var(--series-2); color: var(--series-2); cursor: default; }
.table-scroll { overflow-x: auto; }
.table-scroll table.data { min-width: 780px; }
.cell-sub { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { padding: 7px 0; border-top: 1px solid var(--grid); font-size: 13.5px; }
.article-list li:first-child { border-top: none; }
.article-list .muted { font-size: 12.5px; margin-top: 2px; }
.detail-links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.detail-links .back-btn { margin-bottom: 0; }
.linklike {
  all: unset; cursor: pointer; color: var(--series-1);
}
.linklike:hover { text-decoration: underline; }

/* ---- co-mention network ---- */
.network-box { margin: 4px 0 2px; }
.network-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.net-edge { pointer-events: stroke; }
.net-node { cursor: pointer; }
.net-node:hover { stroke: var(--ink) !important; stroke-width: 2 !important; }
.net-focus-ring { pointer-events: none; }
.net-focus-label { fill: var(--ink); font-size: 12px; font-weight: 600; pointer-events: none; }
.module-caption {
  font-size: 11.5px; font-weight: 600; pointer-events: none;
  paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round;
}
.network-controls { align-items: center; }
.net-slider { gap: 8px; }
.net-slider input[type="range"] { width: 92px; accent-color: var(--series-1); }
.net-slider span { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 10px; }
.net-key { margin: 6px 0 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-current { background: var(--wash); color: var(--ink); font-weight: 600; }
.module-members { display: flex; flex-wrap: wrap; gap: 4px; max-width: 460px; }
.module-members .chip { font-size: 11.5px; padding: 1px 7px; }
td .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  vertical-align: -1px; margin-right: 6px; }
