/* OSINT Framework page — D3 collapsible tree, Kali vibe */

#framework-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.6rem 2rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-size: 0.85em;
  flex-wrap: wrap;
}

#framework-toolbar button {
  background: var(--bg);
  color: var(--green);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.85em;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 3px;
}
#framework-toolbar button:hover {
  border-color: var(--green);
  background: rgba(0,255,65,0.05);
}

#counter { color: var(--fg-dim); }

.legend {
  display: inline-flex;
  gap: 0.9rem;
  align-items: center;
  margin-left: auto;
  font-size: 0.78em;
  color: var(--fg-dim);
}
.legend-item { display: inline-flex; gap: 0.3em; align-items: center; }
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot-branch { background: var(--green); box-shadow: 0 0 4px rgba(0,255,65,0.5); }
.dot-branch.collapsed { background: var(--bg-3); border: 1px solid var(--green); }
.dot-leaf { background: var(--cyan); }
.dot-tool { background: var(--amber); }
.dot-manual { background: var(--fg-dim); }

#framework {
  padding: 1rem 0;
  background: var(--bg);
  overflow-x: auto;
  overflow-y: auto;
  min-height: calc(100vh - 280px);
}

#framework svg {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg);
}

/* D3 tree node circles */
.node circle {
  stroke-width: 1.5px;
  cursor: pointer;
  transition: r 0.15s, fill 0.15s;
}

.node--internal circle {
  fill: var(--bg-2);
  stroke: var(--green);
}
.node--internal.expanded circle {
  fill: var(--green);
  stroke: var(--green);
  filter: drop-shadow(0 0 4px rgba(0,255,65,0.4));
}

/* Leaf node colored by type (T=tool registration, M=manual, default=URL leaf) */
.node--leaf circle {
  fill: var(--cyan);
  stroke: var(--cyan);
}
.node--leaf.type-T circle {
  fill: var(--amber);
  stroke: var(--amber);
}
.node--leaf.type-M circle {
  fill: var(--bg-3);
  stroke: var(--fg-dim);
}

.node circle:hover { r: 6; }

.node text {
  fill: var(--fg);
  font-size: 12px;
  cursor: pointer;
  pointer-events: all;
  user-select: none;
}
.node--leaf text { fill: var(--cyan); }
.node--leaf.type-T text { fill: var(--amber); }
.node--leaf.type-M text { fill: var(--fg-dim); font-style: italic; }
.node text:hover { fill: var(--green); }

.node.match circle { stroke: var(--green); filter: drop-shadow(0 0 6px rgba(0,255,65,0.8)); }
.node.match text { fill: var(--green); font-weight: bold; }
.node.hidden { display: none; }

/* Links between nodes */
.link {
  fill: none;
  stroke: var(--border);
  stroke-width: 1px;
}
.link.match { stroke: var(--green); stroke-width: 1.5px; opacity: 0.7; }
