/* The grade marks, in one file, so a dotted shape means "nobody has measured this" in every diagram, every scene and
   every chip (step 4 of docs/BUILD-3.md, §6). The names come from MARKS in app/grades.mjs and nowhere else:
     solid    established        a continuous rule
     dashed   provisional        one lab, one method, not repeated
     split    contested          two rules of different colours, because the evidence points both ways
     dotted   unmeasured         nobody has measured it
     absent   tested, not found  a crossed rule: somebody looked and it was not there
   Colour never carries the meaning alone: each mark is a different line as well as a different colour, so the row
   still reads in greyscale and for a colour-blind scientist. */
:root {
  --m-established: var(--c-done, #2A8F61);
  --m-provisional: var(--c-work, #B5890F);
  --m-contested: var(--c-unk, #C85A38);
  --m-unmeasured: var(--c-ink3, #7B9299);
  --m-absent: var(--c-violet, #6155B8);
}

/* on a chip or a rail cell: the mark is the left edge */
.m-solid { box-shadow: inset 3px 0 0 var(--m-established); }
.m-dashed { box-shadow: inset 3px 0 0 var(--m-provisional); background-image: repeating-linear-gradient(to bottom, var(--m-provisional) 0 4px, transparent 4px 8px); background-size: 3px 100%; background-repeat: no-repeat; }
.m-split { box-shadow: inset 3px 0 0 var(--m-contested); background-image: linear-gradient(to bottom, var(--m-contested) 0 50%, var(--m-established) 50% 100%); background-size: 3px 100%; background-repeat: no-repeat; }
.m-dotted { box-shadow: inset 3px 0 0 transparent; background-image: repeating-linear-gradient(to bottom, var(--m-unmeasured) 0 2px, transparent 2px 6px); background-size: 3px 100%; background-repeat: no-repeat; }
.m-absent { box-shadow: inset 3px 0 0 var(--m-absent); }

/* a chip says its grade in its own colour, and the dashed and dotted ones carry the line as a border too, so the mark
   survives anywhere the left edge is not visible (inside a diagram's legend, for instance) */
.console-skin .sg-chip.m-solid, .console-skin .cs-rail div.m-solid b { color: var(--m-established); }
.console-skin .sg-chip.m-dashed { color: var(--m-provisional); border-style: dashed; }
.console-skin .sg-chip.m-split { color: var(--m-contested); }
.console-skin .sg-chip.m-dotted { color: var(--m-unmeasured); border-style: dotted; }
.console-skin .sg-chip.m-absent { color: var(--m-absent); text-decoration: line-through; text-decoration-thickness: 1px; }
.console-skin .cs-rail div.m-dashed b { color: var(--m-provisional); }
.console-skin .cs-rail div.m-split b { color: var(--m-contested); }
.console-skin .cs-rail div.m-dotted b { color: var(--m-unmeasured); }
.console-skin .cs-rail div.m-absent b { color: var(--m-absent); }

/* the grade on a tree item: the mark, who set it, and every reason under it */
.console-skin .sg-grade { display: grid; gap: 6px; justify-items: start; }
.console-skin .sg-grade .sg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.console-skin .sg-why.why { margin: 0; padding-left: 16px; display: grid; gap: 3px; }
.console-skin .sg-why.why li { font-size: 12px; line-height: 1.45; color: var(--c-ink3); max-width: 58ch; }
.console-skin .sg-scheme { color: var(--c-ink3); font-size: 12px; }
.console-skin .sg-grade textarea { width: 100%; box-sizing: border-box; }

/* in a drawing: the same five, as SVG and canvas stroke patterns. A shape with no grade is never drawn (step 4). */
.mark-solid { stroke: var(--m-established); stroke-dasharray: none; }
.mark-dashed { stroke: var(--m-provisional); stroke-dasharray: 6 4; }
.mark-split { stroke: var(--m-contested); stroke-dasharray: 10 3 3 3; }
.mark-dotted { stroke: var(--m-unmeasured); stroke-dasharray: 1 4; }
.mark-absent { stroke: var(--m-absent); stroke-dasharray: 2 3; }
