/* ============================================================================
   The guided tour.

   The dimming is done by one box with an enormous outer shadow rather than by
   four overlay panels or an SVG mask: the shadow paints everything outside the
   box, so the box itself is the hole.
   ========================================================================== */

.tour-spot {
  position: fixed;
  z-index: 60;
  border-radius: var(--r);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(9, 11, 14, .62);
  pointer-events: none;
  transition: top var(--fast) var(--ease), left var(--fast) var(--ease),
              width var(--fast) var(--ease), height var(--fast) var(--ease);
}

.tour-bubble {
  position: fixed;
  z-index: 61;
  width: min(23rem, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-5);
}

.tour-title {
  font-size: 1.0625rem;
  letter-spacing: -.015em;
  margin: 0 0 var(--sp-2);
}

.tour-body {
  color: var(--text-muted);
  font-size: .9rem;
  margin: 0 0 var(--sp-4);
}

.tour-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* The counter takes the free space, pushing the controls to the right. */
.tour-count {
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  letter-spacing: .04em;
}

/* The page underneath must not scroll away from the spotlight. */
body.tour-open { overflow: hidden; }

/* A quiet question mark, sized to match the header buttons without competing
   with the theme toggle beside it. */
.tour-button {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 620;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  .tour-spot { transition: none; }
}
