/*
    THE SINGLE-LINE DRAWING'S OWN STYLESHEET.

    Everything Components/Shared/SingleLineDrawing.razor needs and nothing else. Two screens host it -
    the electrical outputs page and the grid-application pack - so it is the document's stylesheet
    rather than either page's.

    ONE DRAWING, THREE RENDERERS. Domain composes every mark once; this file paints the roles as
    var(--sv-*) for the page, DxfDocument paints them as layers and DocumentCharts paints them as hex
    for the PDF. What is here is the ink for one of those three, and the geometry is none of its
    business.

    NO FONT SIZE ANYWHERE IN IT. Text size is geometry and comes off the primitive, so the page, the
    CAD export and the printed sheet set the same text at the same size; a size declared here is one
    the exported file cannot read.

    EVERY LABEL IS MONO, because they are measured values and identifiers, which is the most
    load-bearing rule in the design system.
*/

/* The diagram scrolls inside itself. A 240-string design is wide, and a page that
   scrolls sideways is a page whose header walks off the screen. */
.sv-drawing {
  overflow-x: auto;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-card);
  background: var(--sv-bg-raised);
  padding: var(--sv-space-2);
}

/* The sheet is composed in millimetres, so its own extent is 420 units wide and
   would render an A3 drawing at 420 CSS pixels - a third of what a reader needs,
   and a different size again on the next paper a market issues. The viewBox
   carries the proportions and the box does the fitting. */
.sv-drawing svg {
  display: block;
  width: 100%;
  height: auto;
}

/* What the drawing says about itself, listed beside it as well as printed on it.
   Prose, not measured values, so it is the sans face. */
.sv-drawing__notes {
  margin: 0 0 var(--sv-space-3);
  padding-left: var(--sv-space-4);
  color: var(--sv-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Every label on the drawing is mono: they are measured values and identifiers,
   which is the most load-bearing rule in the design system.

   No font-size here. Text size is geometry, and it comes off the primitive so the
   page, the CAD export and the printed sheet set the same text at the same size;
   a size declared here is one the exported file cannot read. */
.sv-drawing__node-label {
  font-family: var(--sv-font-mono);
  fill: var(--sv-text);
}

.sv-drawing__node-detail {
  font-family: var(--sv-font-mono);
  fill: var(--sv-text-secondary);
}

/* "Typical of N" takes the accent as TEXT, so it is the accent token and not the
   fill one - #F5A524 measures about 2:1 on paper and fails AA as text. */
.sv-drawing__node-typical {
  font-family: var(--sv-font-mono);
  letter-spacing: 0.08em;
  fill: var(--sv-accent);
}
