/* Marker drawings. Colors come from the surface tokens, so the same figure works on either board. */
.b-diagram svg { display: block; max-width: 100%; height: auto; margin: 0 auto; overflow: hidden; touch-action: pan-y; }
.b-diagram[hidden] { display: none; }
.dg-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dg-dots { fill: none; stroke-linecap: round; opacity: .62; }
.dg-hatch { opacity: .55; }
.dg-part { transform-origin: 0 0; transition: filter .2s; }
.dg-hit { fill: none; stroke: transparent; stroke-width: 13px; stroke-linecap: round; pointer-events: stroke; cursor: pointer; }
.dg-leader { fill: none; stroke: var(--chalk-dim); stroke-width: .9px; stroke-linecap: round; }
.dg-dot { fill: var(--chalk-dim); }
.dg-label text {
  font-family: var(--chalk-font, "Kalam", "Chalkboard SE", cursive);
  paint-order: stroke;
  stroke: var(--board);
  stroke-width: 3px;
  stroke-linejoin: round;
  cursor: pointer;
}
.dg-part.hl .dg-edge { stroke: var(--yellow); }
.dg-part.hl .dg-detail { stroke: var(--yellow); }
.dg-part.hl .dg-soft { fill: var(--yellow); opacity: .26; }
.dg-part.hl .dg-solid { fill: var(--yellow); }
.dg-part.hl .dg-paper { fill: color-mix(in srgb, var(--yellow) 16%, var(--board)); }
.dg-part.hl .dg-dots { stroke: var(--yellow); opacity: .9; }

.dg-pencil { fill: none; stroke: var(--chalk-dim); stroke-width: 1px; stroke-linecap: round; opacity: .4; stroke-dasharray: 1 1; animation: dg-sketch 2.4s ease-in-out infinite alternate; }
@keyframes dg-sketch { from { stroke-dashoffset: 1; opacity: .12; } to { stroke-dashoffset: 0; opacity: .42; } }
@media (prefers-reduced-motion: reduce) { .dg-pencil { animation: none; stroke-dashoffset: 0; } }
