/* ===========================================================================
   FIRST-VISIT INVITE — SIM pulsing in the page row, and the coach's slip on the log book (NAVX-S2).

   Doug (office `31063f1`): "On a user's first visit SIM pulses until it is pressed once, and Sim Fire opens on an
   IPSC at an unknown distance with one coaching line. No tour." The office's ruling of 2026-10-15: the words are
   diegetic, in the kit's data book, never a HUD line; the closed book carries them on a clipped slip, and the book
   pulses.

   WHO SETS WHAT: `modules/first_visit_invite.js` puts `is-first-visit-invite` on SIM until its first press;
   `livefire/scope_view_logbook_object.js` draws the slip (`.scope-logbook-slip`) and puts
   `scope-logbook-carried--invite` on the book while the slip is clipped to it. Neither is TINA's marker
   (guide-next.css, the ONE place her pulse is styled, held by test:range-day-guide): when her marker, the viewer's
   press or a walk's is on the same control, this rule yields to it, so her walks read what they read. The yield names
   her classes as attribute values, never as class selectors, because this file styles none of them.

   ITS COLOUR IS A TOKEN: the app's accent (`--accent-primary-rgb`), so the invitation never reads as the guide's
   green "required next". Reduced motion: a still glow, never a pulse.
   =========================================================================== */

.c-page-nav__dest.is-first-visit-invite:not([class~="is-guide-next"]):not([class~="is-walk-next"]):not([class~="is-your-press"]) {
  border-color: var(--accent-primary);
  animation: first-visit-invite-pulse 1.6s ease-in-out infinite;
}

@keyframes first-visit-invite-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(var(--accent-primary-rgb), 0.55), 0 0 0 0 rgba(var(--accent-primary-rgb), 0);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.95), 0 0 14px 2px rgba(var(--accent-primary-rgb), 0.8);
  }
}

/* ── THE COACH'S SLIP, CLIPPED UNDER THE BOOK'S BAND ───────────────────────────
   A slip of note paper standing up off the closed book's far edge, in the coach's hand (the book's own ink and hand
   tokens, scope-view.hud.css). It stands above the cover, never on it: the cover stays the door to the book. */
.scope-kit-layer .scope-logbook-carried .scope-logbook-slip {
  position: absolute;
  left: 4%;
  bottom: calc(100% + 8px);
  width: 88%;
  box-sizing: border-box;
  padding: 7px 8px 9px;
  background: #f7f2dd;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 17px, rgba(110, 140, 71, 0.35) 17px,
    rgba(110, 140, 71, 0.35) 18px);
  border: 1px solid rgba(31, 59, 29, 0.45);
  border-radius: 2px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.45);
  transform: rotate(-3deg);
  transform-origin: bottom center;
  cursor: pointer;
  pointer-events: auto;
}

/* The clip that holds it to the book: a steel clip over its foot. */
.scope-kit-layer .scope-logbook-carried .scope-logbook-slip::after {
  content: '';
  position: absolute;
  left: 18%;
  bottom: -14px;
  width: 16px;
  height: 20px;
  border: 2px solid #8a8f96;
  border-radius: 3px 3px 6px 6px;
  background: rgba(200, 205, 210, 0.35);
}

.scope-kit-layer .scope-logbook-carried .scope-logbook-slip:focus-visible {
  outline: 2px solid rgba(var(--accent-primary-rgb), 0.9);
  outline-offset: 2px;
}

.scope-logbook-slip__words {
  margin: 0;
  color: var(--logbook-pen, #1d3557);
  font: 400 15px/18px var(--logbook-hand, "Caveat", cursive);
  letter-spacing: 0;
}

/* The book pulses while it carries the slip, over its own shadow on the bench. */
.scope-kit-layer .scope-logbook-carried.scope-logbook-carried--invite {
  animation: first-visit-invite-book-pulse 1.6s ease-in-out infinite;
}

@keyframes first-visit-invite-book-pulse {
  0%,
  100% {
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 0 rgba(var(--accent-primary-rgb), 0));
  }
  50% {
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 10px rgba(var(--accent-primary-rgb), 0.95));
  }
}

/* Still lit, never moving, for a person who has asked the screen to be still. */
@media (prefers-reduced-motion: reduce) {
  .c-page-nav__dest.is-first-visit-invite:not([class~="is-guide-next"]):not([class~="is-walk-next"]):not([class~="is-your-press"]) {
    animation: none;
    box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.9), 0 0 10px rgba(var(--accent-primary-rgb), 0.7);
  }

  .scope-kit-layer .scope-logbook-carried.scope-logbook-carried--invite {
    animation: none;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 8px rgba(var(--accent-primary-rgb), 0.85));
  }
}
