/* Grain -----------------------------------------------------------------------
   Large flats of #09090b band on ordinary panels and read as dead plastic. A
   fixed grain at ~4% gives the canvas a surface: no movement, no colour, no
   measurable change to contrast. It is material rather than decoration, which
   is the only kind of texture a reading surface this dense can afford.

   Its own file because it belongs to every dark surface we ship, not just the
   app shell. Living in mdps-shell.css meant the funnel, pricing and styleguide
   pages — same tokens, same canvas — went without it, since they load the token
   sheet but not the shell. Load this anywhere that sets data-v2 on <html>.

   The selector carries the version guard, so the v1 escape hatch (?ui=v1, the
   previous dark build) stays untextured whether or not the link is layered. */
html:is([data-ui='v2'], [data-ui='v3'], [data-ui='v4'])[data-v2] body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
