/* The figures row (option 05, chosen 2026-11-21). The lines and a sheen of light sit on one plane that turns a
   little toward the pointer, under two degrees. The text never turns: it only drifts a few pixels in x and y.
   figures.js draws the lines on that plane from the cells' own borders, so the layout is exactly the ruled row. */

.figures { position: relative; isolation: isolate; }

/* the real borders keep their width (the layout does not move) but are drawn by the plane instead */
.figures.plane-on { border-color: transparent; }
html .figures.plane-on .fig:nth-of-type(n) { border-color: transparent; }

.figures .plane {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-origin: 50% 50%;
}
.figures .plane .ln { position: absolute; background: var(--rule); }
.figures .plane .ln.edge { background: var(--rule-strong); }

/* the sheen: one soft band of light that glides with the pointer (and with the scroll on phones) */
.figures .plane::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(104deg, transparent calc(var(--mxp, 30%) - 14%), rgba(255, 255, 255, 0.11) var(--mxp, 30%), transparent calc(var(--mxp, 30%) + 14%));
  opacity: var(--hot, 0);
}

/* the text drifts flat: the numbers a little more than the labels, so the two read as two layers */
.figures .fig .n { transform: translate(var(--nx, 0px), var(--ny, 0px)); }
.figures .fig .l { transform: translate(var(--lx, 0px), var(--ly, 0px)); }

@media (prefers-reduced-motion: reduce) {
  .figures .plane { transform: none; }
  .figures .fig .n, .figures .fig .l { transform: none; }
}
@media print {
  .figures .plane { display: none; }
  .figures.plane-on, html .figures.plane-on .fig:nth-of-type(n) { border-color: #999; }
}
