.fit,
.assessment {
  --light-x: 50%;
  --light-y: 50%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #15191b;
}

/* Quiet square drafting grid. */
.fit::after,
.assessment::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(225 231 229 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(225 231 229 / 7%) 1px, transparent 1px),
    linear-gradient(rgb(225 231 229 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(225 231 229 / 3%) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  opacity: 0.52;
}

/* A brighter duplicate is revealed only inside a cursor-following mask. */
.fit::before,
.assessment::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(255 255 255 / 22%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 22%) 1px, transparent 1px),
    linear-gradient(rgb(216 90 27 / 15%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(216 90 27 / 15%) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  -webkit-mask-image: radial-gradient(circle 210px at var(--light-x) var(--light-y), #000 0, rgb(0 0 0 / 78%) 42%, transparent 76%);
  mask-image: radial-gradient(circle 210px at var(--light-x) var(--light-y), #000 0, rgb(0 0 0 / 78%) 42%, transparent 76%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.fit.grid-active::before,
.assessment.grid-active::before {
  opacity: 1;
}

.fit > .wrap,
.assessment > .wrap {
  position: relative;
  z-index: 1;
}

@media (hover: none), (pointer: coarse) {
  .fit::before,
  .assessment::before {
    --light-x: 82%;
    --light-y: 18%;
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fit::before,
  .assessment::before {
    --light-x: 82%;
    --light-y: 18%;
    opacity: 0.28;
    transition: none;
  }
}
