/* ==========================================================================
   aitools.css — internals of the D3 tools map (svg nodes, links, tooltip).
   Page chrome around the map (.tools-wrap, legend, details panel, spec
   index) lives in v2.css.
   The map keeps a fixed light palette in both themes: the wrapper scopes
   light tokens, so colors below must stay light-surface friendly.
   ========================================================================== */

/* Subtle unified palette — one hue per family, shared by group,
   subgroup and tool nodes. Muted mineral tones on the light map. */
#aitools-graph {
  --g-canvas: #4d7a50;
  --g-knowledge: #56708a;
  --g-agent-planning: #96697d;
  --g-scripting: #a07a45;
  --g-ai-providers: #87814f;
  --g-ghjson: #4f8b80;
  --g-data-processing: #73689e;
  --g-rhino: #67727e;
  display: block;
  cursor: grab;
}
#aitools-graph:active {
  cursor: grabbing;
}

/* links */
#aitools-graph .link {
  stroke: var(--wire, #cfd8c6);
  stroke-width: 1.2px;
}
#aitools-graph .link.center-link {
  stroke-width: 1.6px;
}

/* nodes — family-color circles at 50% tint so the map reads at a glance;
   hover/focus deepens the fill */
#aitools-graph .node {
  cursor: pointer;
}
#aitools-graph .node circle {
  fill: var(--c, transparent);
  fill-opacity: 0.42;
  stroke: var(--c, var(--line-strong, #b9c7ae));
  stroke-width: 1.5px;
  transition: fill-opacity 0.15s ease, stroke-width 0.15s ease;
}
#aitools-graph .node:hover circle,
#aitools-graph .node:focus circle {
  fill-opacity: 0.85;
  stroke-width: 2px;
}
#aitools-graph .node text {
  font-family: var(--sans, system-ui, sans-serif);
  font-weight: 600;
  font-size: 10px;
  fill: var(--ink, #222b23);
  pointer-events: none;
}
#aitools-graph .node .group-count {
  fill: var(--ink, #222b23);
  font-weight: 800;
  font-size: 12px;
}
#aitools-graph .node .center-label {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
}
#aitools-graph .node .center-count {
  fill: var(--ink-soft, #5c685e);
  font-size: 10px;
  font-weight: 600;
}
#aitools-graph .node .center-count.experimental-count {
  fill: var(--accent, #c67e39);
}
#aitools-graph .node.experimental-node circle {
  stroke-dasharray: 3 3;
}
/* tool nodes backed by a canvas component carry that component's icon on a
   light disc so the glyph stays readable at map zoom levels */
#aitools-graph .node.has-component circle {
  fill: var(--paper, #f7f9f4);
  fill-opacity: 0.95;
}
#aitools-graph .node.has-component:hover circle,
#aitools-graph .node.has-component:focus circle {
  fill-opacity: 1;
}
#aitools-graph .node .comp-icon {
  pointer-events: none;
}

/* muted state while another node is highlighted */
#aitools-graph .node.muted {
  opacity: 0.18;
}
#aitools-graph .link.muted {
  opacity: 0.08;
}

/* tooltip — soft canopy card, always light */
#aitools-tooltip {
  position: absolute;
  max-width: 280px;
  background: var(--paper, #f7f9f4);
  border: 1px solid var(--line, #dde4d4);
  border-radius: 14px;
  box-shadow: var(--shadow, 0 16px 38px -24px rgba(34, 58, 40, 0.38));
  padding: 13px 15px;
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink, #222b23);
  pointer-events: none;
  z-index: 10;
}
#aitools-tooltip.hidden {
  display: none;
}
#aitools-tooltip h4 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--green-text, #2d5a3d);
}
#aitools-tooltip p {
  margin: 0 0 6px;
  color: var(--ink-soft, #5c685e);
}
#aitools-tooltip .mutates {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink, #222b23);
}
#aitools-tooltip .experimental-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent, #c67e39);
  background: rgba(198, 126, 57, 0.12);
  border-radius: 10px;
  display: inline-block;
  padding: 2px 8px;
  margin-bottom: 6px;
}
#aitools-tooltip .component-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0891b2;
  background: rgba(8, 145, 178, 0.1);
  border-radius: 10px;
  display: inline-block;
  padding: 2px 8px;
  margin-bottom: 6px;
}
#aitools-tooltip .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
#aitools-tooltip .tags .tag {
  background: var(--paper-2, #eef2e8);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-soft, #5c685e);
}
#aitools-tooltip .tags .tag::before {
  display: none;
}
#aitools-tooltip .comps-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 8px 0 4px;
}
#aitools-tooltip .tt-comps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
#aitools-tooltip .tt-comp {
  display: inline-flex;
  border: 1px solid var(--line, #dde4d4);
  border-radius: 8px;
  background: var(--paper, #f7f9f4);
  padding: 3px;
}
#aitools-tooltip .tt-comp img {
  display: block;
}
#aitools-tooltip .tt-comp-more {
  align-self: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-soft, #5c685e);
}
