/* Container */
.proto-stage {
  background: #0f1115;
  padding: 32px 0 56px;
}
.visual-stage {
  position: relative;
  min-height: 52vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  margin: 0 auto;
  width: min(1100px, 94vw);
  box-shadow: 0 10px 40px rgba(0,0,0,.35), inset 0 0 0 1px #1f2a3b;
}

/* Steps (only one visible) */
.vstep { 
  position: absolute; 
  inset: 0; 
  display: none; 
  align-items: center; 
  justify-content: center;
  padding: 18px;
}
.vstep.active { display: flex; animation: fadeUp .45s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Terminal */
.terminal {
  width: min(980px, 92vw);
  height: 44vh;
  border-radius: 12px;
  background: #0b0d10;
  box-shadow: inset 0 0 0 1px #1b2633, 0 20px 40px rgba(0,0,0,.45);
  padding: 16px 18px;
}
.term-out {
  color: #c7f9cc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.4;
}

/* ID card */
.id-card {
  width: min(700px, 90vw);
  background: #0b0f19;
  color: #e5e7eb;
  border-radius: 12px;
  border: 1px solid #223147;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  padding: 18px 20px;
}
.id-card .id-row {
  display: grid; grid-template-columns: 180px 1fr;
  gap: 14px; padding: 8px 0;
  border-bottom: 1px dashed #2a3a53;
}
.id-card .id-row:last-child { border-bottom: 0; }
.id-card span { color: #9fb3c8; }

/* Impact map */
.impact-map {
  width: min(980px, 92vw);
  height: 44vh;
  background: radial-gradient(1200px 420px at 10% -10%, #1a2236, #0e1424 60%);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px #21304a, 0 20px 40px rgba(0,0,0,.4);
}
.node rect {
  width: 160px; height: 40px; fill: #111826; stroke: #334155; stroke-width: 1.5;
}
.node text { fill: #e5e7eb; font-size: 14px; text-anchor: middle; }
.node.warn rect { stroke: #f59e0b; }
.edge {
  stroke: url(#gradEdge);
  stroke: #60a5fa;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: .85;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw 1.1s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.map-legend {
  color: #9fb3c8; margin-top: 10px; text-align: center;
}

/* Risk dial */
.dial { position: relative; width: 240px; height: 240px; border-radius: 50%;
  background: #0e1424; box-shadow: inset 0 0 0 1px #21304a, 0 20px 40px rgba(0,0,0,.4);
  display: grid; place-items: center;
}
.dial-fill { position: absolute; inset: 12px; border-radius: 50%;
  background: conic-gradient(#22d3ee 0deg, #111827 0deg);
  transition: background .25s linear;
}
.dial-num { position: relative; z-index: 1; color: #e5e7eb; font-weight: 700; font-size: 2rem; }
.dial-meta { color: #9fb3c8; margin-top: 10px; }

/* Audit summary */
.audit {
  width: min(980px, 92vw);
  background: #0b0f19;
  border: 1px solid #223147;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
  color: #e5e7eb;
  padding: 14px 16px;
}
.audit header { font-weight: 700; margin-bottom: 10px; }
.audit footer { color: #9fb3c8; margin-top: 10px; font-size: .95rem; }
.audit-pre {
  background: #0e1424; border: 1px solid #223147; border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 10px 12px; height: 36vh; overflow: auto; white-space: pre-wrap;
}

/* Panel */
.stage-panel {
  margin: 16px auto 0;
  width: min(1100px, 94vw);
  background: #ffffffee;
  border: 1px solid #e7ebf0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(16,24,40,.12);
  padding: 16px 20px;
}
.stage-panel h2 { margin-bottom: 6px; }
.stage-panel p  { color: #475467; }
.stage-controls {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
}
.stage-controls #stepCounter { margin-left: auto; color: #667085; }
