:root {
  --bg: #0b0f14;
  --panel: #111826;
  --panel2: #0f1724;
  --text: #e6eefc;
  --muted: #9bb0d3;
  --border: #23304a;
  --code: #101a2a;

  --core: #7c3aed;
  --connected: #22c55e;
  --adjacent: #38bdf8;
  --potential: #f59e0b;
  --unknown: #94a3b8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

.header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), var(--bg));
}
.header__title { font-size: 18px; font-weight: 750; letter-spacing: 0.2px; }
.header__subtitle { margin-top: 4px; color: var(--muted); font-size: 13px; max-width: 90ch; }

.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: calc(100vh - 90px);
}

.panel {
  padding: 14px;
  border-right: 1px solid var(--border);
  background: var(--panel2);
}

.panel__section {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.panel__label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input, .select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0c1220;
  color: var(--text);
  outline: none;
}
.input:focus, .select:focus { border-color: #355088; }

.input--sm { width: 100%; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.row--compact {
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.checklist {
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}
.checklist label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  color: var(--text);
  font-size: 13px;
}
.checklist input { margin: 0; }

.hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.35;
}

.stats {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.details {
  font-size: 13px;
  line-height: 1.45;
}

.details a { color: #93c5fd; text-decoration: none; }
.details a:hover { text-decoration: underline; }

.muted { color: var(--muted); }

.spacer { height: 10px; }

code {
  background: var(--code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 12px;
  color: #c7ddff;
}

.graph {
  position: relative;
  min-height: calc(100vh - 90px);
}

.cy {
  position: absolute;
  inset: 0;
}

.footer {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(17,24,38,0.82);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-size: 12px;
}

.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.pill {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 99px;
  margin-right: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  vertical-align: -2px;
}
.pill--core { background: var(--core); }
.pill--connected { background: var(--connected); }
.pill--adjacent { background: var(--adjacent); }
.pill--potential { background: var(--potential); }
.pill--unknown { background: var(--unknown); }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .graph { min-height: 70vh; }
}
