/* Domain 2 primitive styles. Reuse the .prim vocabulary in styles.css;
   only genuinely new classes belong here. Tokens only, never literal hex. */

/* Three things the base vocabulary is missing for D2, and nothing else:
   an amber flavour (retryable / "custom is the right answer here") that sits
   between teal and vermilion; a lit .ln so one row of a shared card can be the
   answer; and group-level on/bad/dim so a state can light a block of lines
   inside a card without re-drawing the card. The :not(.card) guard keeps a card
   marked .on from repainting every line it contains. */
.prim .ln.on{fill:var(--teal)}
.prim .ln.warn{fill:var(--amber)}
.prim .el.warn{fill:var(--amber)}
.prim g.on:not(.card)>.ln,.prim g.on:not(.card)>.el{fill:var(--teal)}
.prim g.bad:not(.card)>.ln,.prim g.bad:not(.card)>.el{fill:var(--pencil)}
.prim g.dim{opacity:.34}
.prim .card.warn rect{stroke:var(--amber);stroke-width:3;fill:var(--amber-soft)}
.prim .nd.warn rect{stroke:var(--amber);stroke-width:3.4;fill:var(--amber-soft)}
.prim .ahd.warn{fill:var(--amber)}

/* a process/trust boundary drawn around a group of nodes */
.prim .bnd{fill:none;stroke:var(--rule);stroke-width:2;stroke-dasharray:10 8}
.prim g.on>.bnd{stroke:var(--teal);stroke-width:3}
.prim g.bad>.bnd{stroke:var(--pencil);stroke-width:3}

/* the pencil question mark over an ambiguous choice, and the crowded pill grid
   in the eighteen-tool frame, where 21px node labels no longer fit */
.prim .qm{font-family:var(--f-mono);font-size:62px;fill:var(--pencil);text-anchor:middle}
.prim .nd.pill text{font-size:16px}

/* the crowded rack: a pill's sub-line has to stay smaller than its 16px label,
   which .nd.pill text would otherwise override */
.prim .nd.pill .sub{font-size:14px}

/* one lit row inside a shared card — the four errorCategory rows differ only in
   which is lit, so the row needs its own plate. Text colour already comes from
   the g.on / g.bad rules above. */
.prim .crow>rect{fill:none;stroke:var(--rule-soft);stroke-width:1.6}
.prim .crow.on>rect{fill:var(--teal-soft);stroke:var(--teal);stroke-width:2.4}
.prim .crow.bad>rect{fill:var(--pencil-soft);stroke:var(--pencil);stroke-width:2.4}
