/*
  Guided tour bubble, chat head and spotlight.
  Source of truth: tools/tour/tour.css. Copied into each site's /tour/ folder by tools/inject-tour.sh.
  Colours come from each site's tokens (--palette-N) with literal fallbacks, so the tour belongs on the page.
*/
.rt-layer, .rt-layer *, .rt-head, .rt-head * { box-sizing: border-box; }

.rt-layer, .rt-bubble {
  --rt-blue: var(--palette-1, #060d87);
  --rt-deep: var(--palette-2, #000044);
  --rt-gold: var(--palette-3, #f4b142);
  --rt-gold-deep: var(--palette-4, #ee8a07);
  --rt-true: var(--palette-5, #317bff);
  --rt-sky: var(--palette-7, #daebfc);
  --rt-ivory: var(--palette-8, #fbf9ed);
  --rt-white: var(--palette-10, #ffffff);
  --rt-font: var(--font-body, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  --rt-font-head: var(--font-heading, var(--rt-font));
  /* Numbers in a plain system face: some site fonts draw a slashed zero. */
  --rt-font-num: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --rt-ease: .25s ease;
}
.rt-layer {
  position: fixed; inset: 0; z-index: 2147483000; pointer-events: none;
  font-family: var(--rt-font); font-size: 16px; line-height: 1.5; color: #000;
}
.rt-layer[hidden] { display: none !important; }

/* Spotlight: a cutout around the target, the rest of the page dimmed. */
.rt-spot {
  position: fixed; left: 0; top: 0; width: 0; height: 0; border-radius: 10px;
  box-shadow: 0 0 0 3px var(--rt-gold), 0 0 0 9999px rgba(0, 0, 68, .5);
  transition: left var(--rt-ease), top var(--rt-ease), width var(--rt-ease), height var(--rt-ease);
}
.rt-spot.rt-spot--full { left: 50% !important; top: 50% !important; width: 0 !important; height: 0 !important; box-shadow: 0 0 0 9999px rgba(0, 0, 68, .5); }
.rt-spot[hidden] { display: none !important; }

/* The speech bubble. */
.rt-bubble {
  position: fixed; left: 0; top: 0; width: min(24.5rem, calc(100vw - 24px));
  background: var(--rt-white); color: #000; border-top: 6px solid var(--rt-blue); border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 68, .12), 0 18px 40px rgba(0, 0, 68, .28);
  padding: 1rem 1.1rem 1.05rem; pointer-events: auto; outline: none;
  opacity: 0; transform: translateY(6px); transition: opacity var(--rt-ease), transform var(--rt-ease);
}
.rt-bubble.rt-on { opacity: 1; transform: none; }
.rt-bubble.rt-sheet { width: auto; max-width: 32rem; }
.rt-bubble[hidden] { display: none !important; }
.rt-bubble.rt-docked { position: relative; left: auto; top: auto; width: auto; margin-top: 16px; font-family: var(--rt-font); line-height: 1.5; }
.rt-top { display: flex; align-items: center; gap: .6rem; margin: 0 0 .5rem; padding-right: 2rem; }
.rt-num {
  flex: none; min-width: 2rem; height: 2rem; padding: 0 .45rem; border-radius: 999px; background: var(--rt-gold); color: var(--rt-blue);
  font: 700 .9rem/1 var(--rt-font-num); font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0;
  display: grid; place-items: center;
}
.rt-count { font-family: var(--rt-font-num); font-variant-numeric: lining-nums tabular-nums; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #4d4d57; }
.rt-close {
  position: absolute; top: .45rem; right: .45rem; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: transparent; color: var(--rt-blue); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.rt-close:hover { background: var(--rt-sky); }
.rt-close:focus-visible { outline: 3px solid var(--rt-true); outline-offset: 0; }
.rt-title { font-family: var(--rt-font-head); color: var(--rt-blue); font-size: 1.2rem; line-height: 1.25; font-weight: 700; margin: 0 0 .35rem; }
.rt-body p { margin: 0 0 .5rem; font-size: 1rem; }
.rt-body p:last-child { margin-bottom: 0; }
.rt-source {
  display: inline-block; margin: .6rem 0 0; padding: .2rem .6rem; border-radius: 999px;
  background: var(--rt-sky); color: var(--rt-blue); font-size: .85rem; font-weight: 700;
}
.rt-source[hidden] { display: none; }
.rt-source { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.rt-note { margin: .75rem 0 0; font-size: .85rem; font-weight: 700; color: #4d4d57; }
.rt-note[hidden] { display: none; }
.rt-note + .rt-actions { margin-top: .4rem; }
.rt-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: .9rem; }
.rt-btn {
  appearance: none; border: 2px solid var(--rt-blue); border-radius: 4px; padding: .55rem .95rem; min-height: 44px;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; background: var(--rt-white); color: var(--rt-blue);
}
.rt-btn:hover { background: var(--rt-sky); }
.rt-btn.rt-primary { background: var(--rt-gold); border-color: var(--rt-gold); color: var(--rt-blue); }
.rt-btn.rt-primary:hover { background: var(--rt-gold-deep); border-color: var(--rt-gold-deep); }
.rt-btn:focus-visible { outline: 3px solid var(--rt-true); outline-offset: 2px; }
.rt-actions .rt-spacer { flex: 1; }
/* Stacked: every button full width and the same height; Back goes last. */
.rt-actions.rt-stack { flex-direction: column; align-items: stretch; }
.rt-actions.rt-stack .rt-spacer { display: none; }
.rt-actions.rt-stack .rt-btn { justify-content: center; text-align: center; min-height: 48px; }
.rt-actions.rt-stack .rt-back { order: 9; }

/* Phone width: a more compact bubble. */
@media (max-width: 639px) {
  .rt-bubble { padding: .7rem .85rem .8rem; }
  .rt-top { margin-bottom: .3rem; }
  .rt-num { min-width: 1.75rem; height: 1.75rem; font-size: .85rem; }
  .rt-close { top: .2rem; right: .2rem; }
  .rt-title { font-size: 1.08rem; margin-bottom: .25rem; }
  .rt-body p { font-size: .94rem; margin-bottom: .35rem; line-height: 1.42; }
  .rt-source { margin-top: .4rem; font-size: .8rem; }
  .rt-note { margin-top: .5rem; font-size: .8rem; }
  .rt-actions { margin-top: .6rem; }
  .rt-btn { padding: .45rem .85rem; }
}

/* While the tour is on a page: room under the footer so the chat head never covers its last line. */
@media (max-width: 639px) {
  .rt-pad-foot { padding-bottom: calc(var(--rt-pad-base, 0px) + 100px) !important; }
}

/* Pointer arrow: a rotated square on the edge that faces the target. */
.rt-arrow { position: absolute; width: 16px; height: 16px; background: var(--rt-white); transform: rotate(45deg); }
.rt-arrow[hidden] { display: none; }
.rt-arrow.rt-up { top: -14px; background: var(--rt-blue); }
.rt-arrow.rt-down { bottom: -8px; box-shadow: 3px 3px 4px rgba(0, 0, 68, .12); }
.rt-arrow.rt-left { left: -8px; }
.rt-arrow.rt-right { right: -8px; }

/* Chat head: the round "Tour" button, bottom right. */
.rt-head {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 2147483001;
  width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--palette-3, #f4b142);
  background: var(--palette-1, #060d87); color: var(--palette-10, #ffffff); cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font: 700 .8rem/1 var(--font-body, system-ui, sans-serif); letter-spacing: .02em;
  box-shadow: 0 2px 4px rgba(0, 0, 68, .2), 0 10px 24px rgba(0, 0, 68, .3);
  transition: transform .15s ease;
}
.rt-head svg { width: 24px; height: 24px; display: block; }
.rt-head:hover { transform: scale(1.06); }
.rt-head:focus-visible { outline: 3px solid var(--palette-5, #317bff); outline-offset: 3px; }
.rt-head[aria-expanded="true"] { background: var(--palette-2, #000044); }

@media (prefers-reduced-motion: reduce) {
  .rt-spot, .rt-bubble, .rt-head { transition: none !important; }
  .rt-bubble { transform: none; }
  .rt-head:hover { transform: none; }
}
@media print { .rt-layer, .rt-head { display: none !important; } }
