/* Investor-map DAG board — rectangular nodes, swimlanes, gates */

.dag-board-scroll {
  overflow: auto;
  width: 100%;
  min-height: 240px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
}

.dag-board-scroll--pan {
  cursor: grab;
  overscroll-behavior: contain;
}

.dag-board-scroll--pan:active {
  cursor: grabbing;
}

.dag-board-svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.dag-swimlane {
  opacity: 0.35;
}

.dag-swimlane-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: rgba(240, 235, 227, 0.35);
}

.dag-board-edge {
  fill: none;
  stroke: rgba(193, 127, 89, 0.35);
  stroke-width: 1.5;
  transition: stroke 0.4s ease, stroke-width 0.4s ease, opacity 0.4s ease;
}

.dag-board-edge.is-back-edge {
  stroke: rgba(193, 127, 89, 0.22);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.dag-board-edge.is-active {
  stroke: rgba(232, 160, 106, 0.9);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(232, 160, 106, 0.45));
}

.dag-board-node rect {
  fill: #2a2420;
  stroke: rgba(193, 127, 89, 0.55);
  stroke-width: 1.5;
  transition: fill 0.35s ease, stroke 0.35s ease, filter 0.35s ease;
}

.dag-board-node.is-gate rect {
  stroke-dasharray: 5 3;
}

.dag-board-node.is-dashed rect {
  stroke-dasharray: 5 3;
  opacity: 0.85;
}

.dag-board-node.is-branch rect {
  opacity: 0.75;
}

.dag-board-node .dag-node-text {
  fill: rgba(240, 235, 227, 0.78);
  font-family: var(--font-mono);
  font-size: 9px;
  pointer-events: none;
}

.dag-board-node.is-active rect {
  fill: color-mix(in srgb, var(--accent) 32%, #2a2420);
  stroke: var(--accent-bright);
  filter: drop-shadow(0 0 10px rgba(232, 160, 106, 0.4));
}

.dag-board-node.is-active .dag-node-text {
  fill: #fff;
  font-weight: 600;
}

.dag-board-node.is-dim {
  opacity: 0.18;
}

.dag-board-node.is-dim rect {
  stroke: rgba(193, 127, 89, 0.2);
}

.dag-board-node.is-dim .dag-node-text {
  fill: rgba(240, 235, 227, 0.35);
}

.dag-board-edge.is-dim {
  stroke: rgba(193, 127, 89, 0.08);
  opacity: 0.35;
}

.dag-board-scroll--story {
  min-height: clamp(420px, 58vh, 680px);
  align-items: center;
}

.dag-board-scroll--story .dag-board-svg {
  width: 100%;
  height: auto;
  min-height: clamp(380px, 52vh, 620px);
  transition: viewBox 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.dag-board-host--story .dag-node-text {
  font-size: 13px;
  fill: rgba(245, 240, 232, 0.92);
}

.dag-board-host--story .dag-board-node.is-active .dag-node-text {
  font-size: 14px;
  font-weight: 700;
}

.dag-board-node.is-solo-dim rect {
  opacity: 0.5;
}

.dag-board-node.is-selected rect {
  fill: color-mix(in srgb, var(--accent) 48%, #2a2420);
  stroke: #fff;
  stroke-width: 2;
  filter: drop-shadow(0 0 14px rgba(232, 160, 106, 0.55));
}

.dag-board-node.is-selected .dag-node-text {
  fill: #fff;
  font-weight: 700;
}

.dag-board-node:hover rect {
  stroke: var(--accent-bright);
}

.dag-board-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dag-board-host--hero,
.dag-board-host--journey {
  min-height: clamp(280px, 48vh, 620px);
}

.dag-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.5rem 0 0.75rem;
  font-size: 0.72rem;
  color: rgba(240, 235, 227, 0.55);
}

.dag-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dag-legend svg {
  flex-shrink: 0;
}

.demo-dag-board {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #1e1a17, #12100e 65%);
  min-height: 420px;
}

.demo-dag-board .dag-swimlane-label {
  fill: rgba(240, 235, 227, 0.4);
}

.demo-dag-board .dag-board-node rect {
  fill: rgba(255, 255, 255, 0.06);
  stroke: rgba(193, 127, 89, 0.5);
}

.demo-dag-board .dag-board-node .dag-node-text {
  fill: rgba(245, 240, 232, 0.85);
}
