/* © 2026 TerraNovita BV. All rights reserved. See /LICENSE.txt. */
/* The shared library's styles, for the guide's simulations: a switch between settings, trunk and its
   branches with their marks, commits and trails, people as stick figures, agents as robots, and speech
   balloons. Loaded before the guide's own stylesheet, which lays out each simulation and its panels. No
   media query near the breakpoint lives here; the guide's stylesheet holds those. */

/* A switch between a simulation's settings, laid out as the site's branch switch. */
.mode-switch {
  flex: none; display: inline-flex; padding: var(--space-4); border-radius: var(--radius-pill);
  border: var(--border-width) solid var(--color-border-strong); background: var(--color-surface-subtle);
}
.mode-switch button {
  display: inline-flex; align-items: center; gap: var(--space-8);
  min-height: calc(var(--size-target) - var(--space-8) - var(--border-width) * 2); padding: 0 var(--space-8);
  border: 0; border-radius: var(--radius-pill); background: none; cursor: pointer;
  font: var(--type-caption); font-family: var(--font-mono); color: var(--color-ink-muted);
}
.mode-switch button:hover { color: var(--color-ink-strong); }
.mode-switch button[aria-pressed="true"] { background: var(--color-action); color: var(--color-on-action); }

/* A branch merged, set aside, or ended; its name in code type. */
.sim-branch.is-merged { stroke: var(--color-state-approved); }
.sim-branch.is-stale { stroke: var(--color-state-stale); stroke-dasharray: 2 10; }
.sim-branch-name { font: var(--type-caption); font-family: var(--font-mono); fill: var(--color-ink-strong); }
/* A dead branch: stale, then dropped. It stays dashed, stops at a short bar, and its name is struck
   through, so it reads as work that ended there, by shape as well as by colour. */
.sim-branch.is-dead { stroke: var(--color-state-stale); stroke-dasharray: 2 10; }
.sim-branch-end { fill: none; stroke: var(--color-state-stale); stroke-width: var(--size-line-quiet); stroke-linecap: round; }
.sim-branch-name.is-dead { fill: var(--color-ink-muted); }
/* A redone story's old branch ends in the tally's "redone" icon, two arrows in a circle; it masks the
   dotted line under it. */
.sim-redone-icon { fill: none; stroke: var(--color-ink-muted); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sim-redone-icon .sim-redone-bg { fill: var(--color-surface); stroke: none; }
.sim-strike { fill: none; stroke: var(--color-ink-muted); stroke-width: var(--border-width-strong); stroke-linecap: round; }

/* A commit on trunk: an earlier one a hollow ring; one in focus rings its target, since browsers draw an
   outline on SVG unevenly. */
.sim-earlier { fill: var(--color-surface); stroke: var(--color-line-active); stroke-width: var(--border-width-strong); }
.sim-commit-hit { fill: transparent; pointer-events: all; }
.sim-commit:focus { outline: none; }
.sim-commit:focus-visible .sim-commit-hit { stroke: var(--color-focus); stroke-width: var(--focus-width); }

/* A dotted trail behind something on its way, fading once it arrives. */
.sim-trail {
  fill: none; stroke: var(--color-line-active); stroke-width: var(--size-line-quiet); stroke-linecap: round;
  stroke-linejoin: round; stroke-dasharray: 0 10; transition: opacity calc(var(--duration-enter) * 2) var(--easing-standard);
}
.sim-trail.is-fading { opacity: 0; }

/* trunk's line and the marks work lands with, each a shape as well as a colour. */
.sim-main { fill: none; stroke: var(--color-line-active); stroke-width: var(--size-line); stroke-linecap: round; }
.sim-trusted-badge { fill: var(--color-state-trusted); stroke: var(--color-surface); stroke-width: 1.5; }
.sim-trusted-tick { fill: none; stroke: var(--color-surface); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
/* Where a setting began on trunk: a quiet dashed line, its name at the top in code type. */
.sim-mode-mark { fill: none; stroke: var(--color-ink-muted); stroke-width: var(--border-width); stroke-dasharray: 4 4; }
.sim-mode-name { font: var(--type-caption); font-family: var(--font-mono); fill: var(--color-ink-muted); }
.sim-unverified { fill: var(--color-state-unverified); stroke: var(--color-surface); stroke-width: 2.5; stroke-linejoin: round; }
.sim-approved-shield { fill: var(--color-state-approved); stroke: var(--color-surface); stroke-width: 1.5; }
.sim-approved-tick { fill: none; stroke: var(--color-surface); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sim-branch { fill: none; stroke: var(--color-line-quiet); stroke-width: var(--size-line-quiet); stroke-linecap: round; }
.sim-port { fill: none; stroke: var(--color-ink-muted); stroke-width: 2; stroke-dasharray: 6 6; }
.sim-port-head { fill: var(--color-ink-muted); }

/* People are stick figures, agents small robots; the AI star is the unverified mark's colour. */
.plan-person { color: var(--color-ink-strong); }
.plan-figure-line { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.plan-figure-head { fill: var(--color-surface); stroke: currentColor; stroke-width: 2.2; }
.plan-bot { fill: var(--color-surface-raised); stroke: var(--color-ink-strong); stroke-width: 1.5; }
.plan-bot-line { fill: none; stroke: var(--color-ink-strong); stroke-width: 1.5; }
.plan-bot-eye { fill: var(--color-line-active); }
.plan-sparkle { fill: var(--color-state-unverified); }

/* Speech: a balloon at a time, fading in and out. */
.plan-balloon { opacity: 0; transition: opacity var(--duration-base) var(--easing-standard); }
.plan-balloon.is-on { opacity: 1; }
.plan-balloon-body { fill: var(--color-surface-raised); stroke: var(--color-border-strong); stroke-width: var(--border-width); }
.plan-balloon text { font: var(--type-caption); fill: var(--color-ink); }
