/* ── Global ──────────────────────────────────────────────────────────────── */
body {
  background: #f0f2f5;
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* ── Trial wrapper ───────────────────────────────────────────────────────── */
.gnav-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 16px;
}

.gnav-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 460px;
  margin-bottom: 10px;
}

.trial-counter {
  font-size: 0.95em;
  color: #888;
}

.probe-label {
  font-size: 1em;
  font-weight: 600;
  color: #e67e22;
}

.score-display {
  font-size: 1.1em;
  color: #333;
  font-weight: 500;
}

.score-value {
  color: #e74c3c;
  font-weight: 700;
}

/* ── Graph area ──────────────────────────────────────────────────────────── */
.graph-area {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.09);
  padding: 8px;
}

.graph-svg {
  display: block;
}

/* ── Edges ───────────────────────────────────────────────────────────────── */
.edge {
  stroke: #aaa;
  stroke-width: 2;
  stroke-linecap: round;
}

.edge-extra {
  stroke: #e67e22;
  stroke-width: 3;
  stroke-linecap: round;
}

.edge-hidden {
  stroke: #999;
  stroke-width: 2;
  stroke-dasharray: 6 4;
  stroke-linecap: round;
  opacity: 0.6;
}

/* ── Nodes ───────────────────────────────────────────────────────────────── */
.node {
  stroke-width: 2.5;
}

.node-current  { fill: #f39c12; stroke: #c87f0a; }
.node-target   { fill: #27ae60; stroke: #1a7a43; }
.node-neighbor { fill: #3498db; stroke: #1f78b4; }
.node-visited  { fill: #95a5a6; stroke: #6d7f80; }
.node-unknown  { fill: #d5dbe0; stroke: #aab0b5; }

.target-ring {
  fill: none;
  stroke: #27ae60;
  stroke-width: 2.5;
  stroke-dasharray: 6 4;
  opacity: 0.8;
}

/* Hover effect for clickable nodes */
.node-group.clickable:hover .node-neighbor {
  fill: #1f78b4;
}

/* ── Node text ───────────────────────────────────────────────────────────── */
.node-label {
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 14px;
  font-weight: 700;
  fill: #fff;
  pointer-events: none;
  user-select: none;
}

.cost-label {
  text-anchor: middle;
  font-size: 13px;
  font-weight: 600;
  fill: #444;
  pointer-events: none;
  user-select: none;
}

.target-label {
  text-anchor: middle;
  font-size: 11px;
  font-weight: 700;
  fill: #27ae60;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}

/* ── Legend ──────────────────────────────────────────────────────────────── */
.gnav-legend {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  font-size: 0.85em;
  color: #555;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Feedback screen ─────────────────────────────────────────────────────── */
.gnav-feedback {
  text-align: center;
  padding: 60px 40px;
}

.gnav-feedback h2 {
  font-size: 1.7em;
  color: #2c3e50;
  margin-bottom: 20px;
}

.feedback-score {
  font-size: 1.4em;
  margin-bottom: 12px;
}

.feedback-path {
  font-size: 0.95em;
  color: #777;
  font-family: monospace;
  margin-bottom: 32px;
}

/* ── Instructions ────────────────────────────────────────────────────────── */
.instructions {
  max-width: 520px;
  text-align: left;
  line-height: 1.75;
  font-size: 1.05em;
  padding: 10px 0;
}

.instructions h2 {
  text-align: center;
  margin-bottom: 18px;
  color: #2c3e50;
}

.instructions ul {
  padding-left: 1.4em;
}

.instructions li {
  margin-bottom: 6px;
}

.debug-label {
  display: block;
  margin-top: 20px;
  font-size: 0.9em;
  color: #888;
  cursor: pointer;
}

/* ── End screen ──────────────────────────────────────────────────────────── */
.end-screen {
  text-align: center;
  padding: 80px 40px;
}

.end-screen h1 {
  font-size: 2em;
  color: #2c3e50;
  margin-bottom: 16px;
}

.total-score {
  font-size: 3em;
  font-weight: 700;
  color: #e74c3c;
  margin: 12px 0 20px;
}

.end-note {
  color: #888;
  font-size: 1em;
}
