/* Carving overlays for .rb-corner composites — drop-in, reversible.
   Remove this <link> and carving.js to revert. Adds nothing to the DOM
   server-side; carving.js injects the overlay divs at runtime. */

.carve{ position:absolute; pointer-events:none; background:transparent; }
.carve.mul{ mix-blend-mode:multiply; }
.carve.scr{ mix-blend-mode:screen; }

/* per-boundary balance for the bound-edge overlays, recomputed live from the
   luminances carving.js sets inline (--avg/--lin/--lout). */
/* seam overlays now carry final alphas from the light engine and don't use the
   balance rule; the bound-edge overlays (EDGE profile) still do. Fallbacks keep
   the calc valid on overlays that don't set the bases. */
.carve{
  --shB:  calc(var(--shBase, 1)  + var(--avg, 0.5) * var(--shSlope, 0));
  --hlB:  calc(var(--hlBase, 1)  + (1 - var(--avg, 0.5)) * var(--hlSlope, 0));
  --shBl: calc(var(--shBaseL, 1) + (1 - var(--lin, 0.5)) * var(--shSlopeL, 0));
  --ohlB: max(0, var(--ohlBase, 1) + (var(--lin, 0.5) - var(--lout, 0.5)) * var(--ohlK, 0));
}
