:root {
  --bg: #090b10;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22d3ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

#container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

#graph-container {
  flex: 1 1 auto;
  position: relative;
}

#graph {
  width: 100%;
  height: 100%;
}

#control-panel {
  width: 320px;
  background: var(--panel);
  padding: 16px;
  overflow-y: auto;
  border-left: 1px solid #1f2937;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

#control-panel h2 {
  margin-top: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.legend {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.legend .swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

#psych-test {
  margin-bottom: 16px;
}

#psych-test .question {
  margin-bottom: 12px;
  font-size: 13px;
}

#psych-test label {
  font-size: 12px;
  color: var(--muted);
}

#psych-test input[type="radio"] {
  margin-right: 4px;
}

#psych-test select {
  width: 100%;
  padding: 6px;
  background: #0a1020;
  color: var(--text);
  border: 1px solid #334155;
  border-radius: 6px;
}

#psych-test button,
#submit-test {
  background: var(--accent);
  color: #02121f;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 8px;
}

#test-result {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

#distance-scale {
  width: 100%;
  margin-top: 6px;
}