.xw {
  --xw-ink: #121214;
  --xw-pink: #ff3aa7;
  --xw-line: 3px;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #f6f6f4;
  color: var(--xw-ink);
  font-family: "Hepta Slab Variable", serif;
  font-weight: 800;
  -webkit-font-smoothing: antialiased;
}

/* fluorescent pink, printed first: it runs under the grid's lines (the trap), and sits a little low of the
   black plate, so it shows below the row's bottom line and nowhere leaves the paper bare */
.xw-spot {
  position: absolute;
  left: 0;
  width: 540px;
  margin-top: -2px;
  padding-bottom: 3px;
  background: var(--xw-pink);
  transform: translate(-1.5px, 2.2px);
}

.xw-ink {
  position: absolute;
  inset: 0;
  filter: url(#xw-spread);
}
.xw-defs {
  position: absolute;
  width: 0;
  height: 0;
}

.xw-block,
.xw-cell,
.xw-rule {
  position: absolute;
}
.xw-block,
.xw-rule {
  background: var(--xw-ink);
}
.xw-rule-v {
  top: 155px;
  bottom: 0;
  width: var(--xw-line);
  margin-left: calc(var(--xw-line) / -2);
}
.xw-rule-h {
  left: 0;
  right: 0;
  height: var(--xw-line);
  margin-top: calc(var(--xw-line) / -2);
}

/* a square's number and its letter */
.xw-n {
  position: absolute;
  left: 7px;
  top: 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums tabular-nums;
}
.xw-ch {
  position: absolute;
  inset: 0;
  padding-top: 6px;
  font-size: 56px;
  line-height: 72px;
  text-align: center;
  text-transform: uppercase;
}

/* the clue, set over the grid */
.xw-clue {
  position: absolute;
  left: 0;
  top: 0;
  width: 540px;
  height: 155px;
  box-sizing: border-box;
  border-bottom: 9px solid var(--xw-ink);
  display: block;
}
.xw-clue-n {
  position: absolute;
  left: 2px;
  top: 12px;
  font-size: 128px;
  line-height: 128px;
  letter-spacing: -0.045em;
  font-variant-numeric: lining-nums;
}
.xw-clue-way {
  position: absolute;
  left: 183px;
  top: 21px;
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.xw-clue-text {
  position: absolute;
  left: 182px;
  top: 54.5px;
  width: 356px;
  font-size: 32px;
  line-height: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.xw-clue-count {
  font-weight: 400;
}

/* the entry: seven squares, one real input over them (the SDK makes the root position: relative) */
.xw-entry {
  left: 0;
  width: 540px;
}
.xw-entry input {
  font: inherit !important;
  outline: none;
  caret-color: transparent;
}
.xw-slots {
  position: absolute;
  inset: 0;
  display: flex;
}
.xw-slot {
  position: relative;
  height: 100%;
}
.xw-typed {
  animation: xw-press 180ms cubic-bezier(0.3, 0.5, 0.4, 1) both;
}
@keyframes xw-press {
  from {
    opacity: 0.45;
    transform: scale(1.22);
  }
}
.xw-caret {
  position: absolute;
  left: 50%;
  top: 19px;
  width: 4px;
  height: 42px;
  margin-left: -2px;
  background: var(--xw-ink);
  animation: xw-blink 1060ms steps(1) infinite;
}
@keyframes xw-blink {
  50% {
    opacity: 0;
  }
}
/* the square you are in: a heavy rule along its foot, which steps along and at last underlines the answer */
.xw-cursor {
  position: absolute;
  bottom: 0;
  height: 9px;
  background: var(--xw-ink);
  opacity: 0;
  pointer-events: none;
  transition:
    left 150ms cubic-bezier(0.3, 0.5, 0.4, 1) -20ms,
    width 160ms cubic-bezier(0.3, 0.6, 0.3, 1) -20ms;
}
.xw-cursor[data-shown] {
  opacity: 1;
}

/* newsprint: thin patches and pinholes in the ink, then the sheet's own fibres over everything */
.xw-voids,
.xw-paper {
  position: absolute;
  inset: 0;
  background-size: 540px 540px;
  pointer-events: none;
}
.xw-voids {
  background-image: url(./voids.jpg);
  mix-blend-mode: screen;
}
.xw-paper {
  background-image: url(./paper.jpg);
  mix-blend-mode: multiply;
}
