/* The cursors that run away */
:root {
  --blue: #2343e6;
  --paper: #f7f5ee;
  --ink: #0e1440;
  --grid: rgba(255, 255, 255, 0.12);
  --edge: clamp(16px, 3vw, 36px);
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
  height: 100%;
}
body {
  overflow: hidden;
  background: var(--blue);
  color: var(--paper);
  font-family: 'Geist Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---- the board: one screen of squared blueprint ---- */
.board {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 440px;
  overflow: hidden;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
/* with a mouse, the pointer on the board is the arrow with the tag */
@media (hover: hover) and (pointer: fine) {
  .board { cursor: none; }
}

/* nothing on the board takes the pointer: it always lands on the board itself */
.top,
.headline,
.note {
  pointer-events: none;
}
.top {
  position: absolute;
  left: var(--edge);
  top: var(--edge);
}
.brand {
  margin: 0 0 4px;
  font-family: 'Anybody Variable', system-ui, sans-serif;
  font-size: clamp(19px, 1.7vw, 22px);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
}
.top__line {
  margin: 0;
  font-size: 12px;
  font-weight: 450;
  opacity: 0.82;
}

.headline {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  font-family: 'Anybody Variable', system-ui, sans-serif;
  font-size: clamp(2.6rem, 9.2vw, 8.4rem);
  font-weight: 800;
  font-stretch: 108%;
  letter-spacing: -0.025em;
  line-height: 0.94;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -52%);
}

/* ---- a colleague: the arrow, the name, and the bubble with the answer ---- */
.peer {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  pointer-events: none;
  will-change: transform;
}
.peer__arrow,
.you__arrow {
  display: block;
  overflow: visible;
  transform-origin: 2px 2px;
}
.peer__arrow path {
  fill: var(--tint);
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.peer__name {
  position: absolute;
  left: 17px;
  top: 22px;
  padding: 3px 8px 4px;
  border-radius: 0 8px 8px 8px;
  background: var(--tint);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  transform-origin: 0 0;
}
.peer__bubble {
  position: absolute;
  left: 17px;
  top: 49px;
  padding: 8px 12px;
  border-radius: 0 13px 13px 13px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: pre;
  transform-origin: 0 0;
  box-shadow: 0 10px 24px rgba(14, 20, 64, 0.28);
  visibility: hidden;
}
/* near the right edge the name and the answer open to the left of the arrow */
.peer.is-flipped .peer__name,
.peer.is-flipped .peer__bubble {
  left: auto;
  right: 12px;
  transform-origin: 100% 0;
}
.peer.is-flipped .peer__name { border-radius: 8px 0 8px 8px; }
.peer.is-flipped .peer__bubble { border-radius: 13px 0 13px 13px; }
.peer__caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 1px;
  background: var(--ink);
  vertical-align: -0.16em;
}

/* ---- your cursor ---- */
.you {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  pointer-events: none;
  visibility: hidden;
}
.you__arrow path {
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.you__tag {
  position: absolute;
  left: 17px;
  top: 22px;
  padding: 3px 8px 4px;
  border-radius: 0 8px 8px 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}
/* the square that inverts: white in difference turns the blue into yellow and the white letters into black */
.lens {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  width: var(--lens, 280px);
  height: var(--lens, 280px);
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  visibility: hidden;
}
.lens-frame {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  width: var(--lens, 280px);
  height: var(--lens, 280px);
  pointer-events: none;
  visibility: hidden;
}
.lens-frame i {
  position: absolute;
  width: 11px;
  height: 11px;
  margin: -5.5px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
.lens-frame i:nth-child(1) { left: 0; top: 0; }
.lens-frame i:nth-child(2) { left: 100%; top: 0; }
.lens-frame i:nth-child(3) { left: 0; top: 100%; }
.lens-frame i:nth-child(4) { left: 100%; top: 100%; }

.note {
  position: absolute;
  left: var(--edge);
  bottom: var(--edge);
  max-width: 40ch;
  margin: 0;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.45;
  opacity: 0.86;
}

/* on a desk the cursors are a size larger */
@media (min-width: 701px) {
  .peer__arrow,
  .you__arrow {
    width: 28px;
    height: 30px;
  }
  .peer__name,
  .you__tag {
    left: 20px;
    top: 26px;
    padding: 4px 9px 5px;
    font-size: 13px;
  }
  .peer__bubble {
    left: 20px;
    top: 57px;
    font-size: 15px;
  }
  .peer.is-flipped .peer__name,
  .peer.is-flipped .peer__bubble {
    left: auto;
    right: 14px;
  }
}

@media (max-width: 700px) {
  .headline {
    font-size: clamp(2.3rem, 12.4vw, 4rem);
  }
  .note {
    right: var(--edge);
    font-size: 11px;
  }
  .peer__bubble {
    font-size: 13px;
  }
}
