/* /gia/ KIT figure: update states, legend, and the agent that reads the graph from outside. */
.gia .fig[data-fig="fkit"] svg {
  --st-re: var(--color-accent);
  --st-reused: #A39B8C;
  --st-rev: #3F7A52;

  /* Update states */
  .kn.st-recomputed .card { stroke: var(--st-re); stroke-width: 1.7; }
  .kn.st-recomputed .kfill { fill: color-mix(in srgb, var(--st-re) 9%, transparent); }
  .kn.st-recomputed .t-badge { fill: var(--color-accent-dark); }
  .kn.st-revised .card { stroke: var(--st-rev); stroke-width: 2; }
  .kn.st-revised .kfill { fill: color-mix(in srgb, var(--st-rev) 11%, transparent); }
  .kn.st-revised .t-badge { fill: var(--st-rev); }
  .kn.st-cached { opacity: .62; }
  .kn.st-cached .card { stroke: color-mix(in srgb, var(--st-reused) 55%, transparent); stroke-dasharray: none; }
  .kn.st-cached .kfill { fill: color-mix(in srgb, var(--st-reused) 18%, transparent); }

  /* Legend */
  .sw-computed { fill: var(--color-surface); stroke: var(--color-text); stroke-width: 1.2; }
  .sw-recomputed { fill: color-mix(in srgb, var(--st-re) 14%, var(--color-surface)); stroke: var(--st-re); stroke-width: 1.4; }
  .sw-reused { fill: color-mix(in srgb, var(--st-reused) 28%, var(--color-surface)); stroke: var(--st-reused); }
  .sw-revised { fill: color-mix(in srgb, var(--st-rev) 16%, var(--color-surface)); stroke: var(--st-rev); stroke-width: 1.4; }
  .leg-sep { stroke: var(--color-border); }
  .leg-trace { stroke: var(--color-accent-dark); stroke-width: 2; }

  /* Edges: orthogonal runs read better a touch lighter. */
  .wire.kw { stroke-width: 1.2; stroke-linejoin: round; }

  /* The agent is a different construct from a graph node: a violet pill outside the graph. */
  .agent-pill { transition: opacity .4s; cursor: pointer; }
  .agent-pill .pill-bg { fill: color-mix(in srgb, var(--k-agent) 8%, var(--color-surface)); stroke: var(--k-agent); stroke-width: 1.3; stroke-dasharray: 5 4; }
  .agent-pill .pill-dot { fill: var(--k-agent); }
  .agent-pill .pill-spark { fill: var(--color-surface); }
  .agent-pill.hot .pill-bg { stroke-dasharray: none; stroke-width: 1.6; }
}
