/* /mark/ only. Plates run the full frame; their switches are plain
 * checkboxes and radios read with :has(), so every figure works without
 * script. Hairlines stay one pixel at any zoom. Nothing moves by itself. */

.prose > .plate {
  grid-column: text-start / wide-end;
  min-width: 0;
  margin: 0.75rem 0 var(--space-figure);
}

.plate svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  color: var(--ink);
}

.plate text {
  font-family: var(--font-text);
  font-variant-numeric: tabular-nums;
  fill: var(--ink-2);
  text-anchor: middle;
}

.plate .num { font-size: 0.34px; }
.plate .num.half { font-size: 0.2px; }
.plate .num.on { fill: var(--bg); }
.plate .lab { font-size: 1.3px; }
.plate .end { text-anchor: end; }

.hair {
  fill: none;
  stroke: currentColor;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.grid { stroke: var(--rule); }
.metric, .rule, .skel2, .comb, .ref { stroke: var(--ink-2); }
.ref { stroke-dasharray: 3 3; }
.skel { stroke: var(--bg); }
.envelope, .outline { stroke: var(--ink); }
.band, .white { fill: var(--ink-2); fill-opacity: 0.24; }
.stroke { fill: none; stroke: var(--ink); stroke-opacity: 0.14; stroke-width: 2px; }

.node, .diff {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.plate figcaption,
.plate p {
  max-width: var(--measure);
  font-size: var(--text-small);
  line-height: 1.45;
  color: var(--ink-2);
}

.plate figcaption { margin-block-start: 0.75rem; }
.plate p { margin: 0.375rem 0 0; }
.plate b { font-weight: 600; color: var(--ink); }

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  margin-block-end: 0.75rem;
  font-size: var(--text-small);
  color: var(--ink-2);
}

.controls label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.plate input { margin: 0; accent-color: var(--ink); }
.slide input { width: 8rem; }

.plate output {
  min-width: 3.5ch;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.plate button {
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--rule);
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.plate button:hover { border-color: var(--ink-2); }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  align-items: flex-start;
}

.row > * { flex: 1 1 9rem; min-width: 0; }
.rounds .row > * { flex-basis: 6.5rem; max-width: 10rem; }
.grid3 .row > * { max-width: 15rem; }
.plot { flex-basis: 16rem; }
.side { flex-basis: 13rem; }
.pen + .pen { margin-block-start: 1rem; }

.loupes { display: flex; gap: 1rem; }
.loupes > div { flex: 1 1 0; min-width: 0; }

/* Layers of the opening plate, and its two cuts. */
.drawing:has([name="grid"]:not(:checked)) .l-grid,
.drawing:has([name="skeleton"]:not(:checked)) .l-skeleton,
.drawing:has([name="overshoot"]:not(:checked)) .l-overshoot,
.drawing:has([name="optical"]:not(:checked)) .l-optical,
.drawing:has([name="pixels"]:not(:checked)) .l-pixels,
.drawing:has([name="pixels"]:checked) .ink,
.drawing:has([value="v3"]:checked) .cut-v2,
.drawing:has([value="v2"]:checked) .cut-v3,
.corners:not(:has([value="arc"]:checked)) .k-arc,
.corners:not(:has([value="lame"]:checked)) .k-lame,
.corners:not(:has([value="cubic"]:checked)) .k-cubic,
.ab:has([value="a"]:checked) > .b,
.ab:has([value="b"]:checked) > .a {
  display: none;
}

.ab { margin-block-end: 2rem; }
.ab-head { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: center; }
.ab-head label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.pair { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; }
.pair > svg { flex: 1 1 20rem; min-width: 0; }
.pair > .strip { flex: 0 0 6rem; }
.crops > svg { flex: 1 1 10rem; }

.plate svg.stem { max-width: 24rem; margin-block-end: 0.75rem; }

.plate canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin-block: 0.5rem;
  image-rendering: pixelated;
}

.wb-stage { overflow-x: auto; padding-block: 1rem; }
.wb-stage svg { width: auto; max-width: none; }
.pairs .slide input { width: 5.5rem; }
