/* NINJA guided tour — spotlight + floating card, same pattern as InfiSec t3mpTour. */

#ninjaTourLayer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  pointer-events: auto;
}
#ninjaTourLayer.active { display: block; }

#ninjaTourSpot {
  position: fixed;
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72);
  outline: 2px solid #FF8A1F;
  outline-offset: 3px;
  transition: top 0.28s ease, left 0.28s ease, width 0.28s ease, height 0.28s ease;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
}
#ninjaTourSpot.glow {
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 22px 2px rgba(255, 138, 31, 0.35);
}
#ninjaTourLayer.center #ninjaTourSpot {
  outline: none;
  width: 0;
  height: 0;
  left: 50%;
  top: 50%;
}

#ninjaTourCard {
  position: fixed;
  z-index: 100001;
  width: 440px;
  max-width: calc(100vw - 32px);
  background: #0d111d;
  border: 1px solid #323c58;
  border-radius: 12px;
  padding: 18px 18px 14px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
  color: #dbdfe7;
  transition: top 0.28s ease, left 0.28s ease;
}
html[data-theme="light"] #ninjaTourCard {
  background: #ffffff;
  border: 1px solid #dadce0;
  box-shadow: 0 1px 2px rgba(60, 62, 67, 0.12), 0 2px 6px rgba(60, 62, 67, 0.08);
  color: #202124;
}
#ninjaTourLayer.center #ninjaTourCard {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 32px));
  text-align: left;
}
#ninjaTourCard .tour-step-idx {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #ff8a1f;
  text-transform: uppercase;
  margin-bottom: 6px;
}
html[data-theme="light"] #ninjaTourCard .tour-step-idx { color: #c2410c; }
#ninjaTourCard .tour-title {
  font-size: 17px;
  font-weight: 550;
  margin: 0 0 8px;
  line-height: 1.25;
  color: #dbdfe7;
}
html[data-theme="light"] #ninjaTourCard .tour-title { color: #202124; }
#ninjaTourCard .tour-body {
  font-size: 13px;
  line-height: 1.55;
  color: #798398;
  margin: 0 0 14px;
  white-space: pre-wrap;
}
html[data-theme="light"] #ninjaTourCard .tour-body { color: #5f6368; }
#ninjaTourCard .tour-dots {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
#ninjaTourCard .tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #202636;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}
html[data-theme="light"] #ninjaTourCard .tour-dot { background: #dadce0; }
#ninjaTourCard .tour-dot.done { background: rgba(255, 138, 31, 0.45); }
html[data-theme="light"] #ninjaTourCard .tour-dot.done { background: rgba(255, 138, 31, 0.16); }
#ninjaTourCard .tour-dot.current {
  background: #FF8A1F;
  transform: scale(1.5);
}
#ninjaTourCard .tour-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
#ninjaTourCard .tour-btn:not(.primary) {
  font-size: 12px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  background: rgba(255, 138, 31, 0.14);
  border: 1px solid rgba(255, 138, 31, 0.45);
  color: #ff8a1f;
  text-decoration: none;
}
#ninjaTourCard .tour-btn:not(.primary):hover,
#ninjaTourCard .tour-btn:not(.primary):visited,
#ninjaTourCard .tour-btn:not(.primary):active {
  color: #ff8a1f;
  text-decoration: none;
}
#ninjaTourCard .tour-btn:not(.primary):hover { filter: brightness(1.04); }
html[data-theme="light"] #ninjaTourCard .tour-btn:not(.primary):hover,
html[data-theme="light"] #ninjaTourCard .tour-btn:not(.primary):visited,
html[data-theme="light"] #ninjaTourCard .tour-btn:not(.primary):active {
  color: #c2410c;
}
html[data-theme="light"] #ninjaTourCard .tour-btn:not(.primary) {
  background: rgba(255, 138, 31, 0.16);
  border: 1px solid #FF8A1F;
  color: #c2410c;
}
#ninjaTourCard .tour-btn.primary {
  font-size: 12px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  background: #FF8A1F;
  color: #0a0e17;
  border: 1px solid #FF8A1F;
}
#ninjaTourCard .tour-btn.primary:hover { filter: brightness(1.04); }
#ninjaTourCard .tour-skip {
  margin-left: auto;
  background: none;
  border: none;
  color: #798398;
  font-size: 11px;
  cursor: pointer;
  padding: 6px 4px;
}
html[data-theme="light"] #ninjaTourCard .tour-skip { color: #5f6368; }
#ninjaTourCard .tour-skip:hover { text-decoration: underline; }
#ninjaTourCard .tour-nub {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #0d111d;
  border-left: 1px solid #323c58;
  border-top: 1px solid #323c58;
  transform: rotate(45deg);
  display: none;
}
html[data-theme="light"] #ninjaTourCard .tour-nub {
  background: #ffffff;
  border-left-color: #dadce0;
  border-top-color: #dadce0;
}

.topbar-right { padding-right: 72px; }
#ninjaTourRelaunch {
  display: flex;
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 60;
  width: 44px;
  height: 44px;
  font-size: 20px;
}
#ninjaTourGuide {
  text-decoration: none;
}

@media (max-width: 640px) {
  #ninjaTourCard { width: calc(100vw - 24px); }
}

/* Help "?" menu (2026-10-30 helpmenu): fixed dropdown anchored to the button,
   and on phones the "?" lives in the header immediately LEFT of the burger. */
.home-help-pop.fox-help-floating {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  z-index: 9500;
  max-width: calc(100vw - 16px);
}
@media (max-width: 760px) {
  .home-logout-row > .site-nav,
  .site-nav-cluster > .site-nav,
  .topbar-actions > .site-nav { order: 2; }
  .home-logout-row > .home-help,
  .site-nav-cluster > .site-tour,
  .topbar-actions > .site-tour { order: 1; }
  html .home-logout-row .home-help .site-tour,
  html .site-nav-cluster > .site-tour,
  html .topbar-actions > .site-tour {
    width: 40px;
    min-width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 5px;
    font-size: 19px;
  }
  html .home-logout-row > .site-nav > summary.btn,
  html .site-nav-cluster > .site-nav > summary.btn,
  html .topbar-actions > .site-nav > summary.btn {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
}
/* Retire the old bottom-right floating "?" (old iPhones / Z Fold cover): keep it in the header. */
html[data-tour-fab] body.page-home .home-logout-row .home-help .site-tour,
html[data-tour-fab] body.page-home:has(.home-ask[data-state="open"]) .home-logout-row .home-help .site-tour {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  display: flex;
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin: 0;
}
@media (max-width: 380px) and (min-height: 820px) {
  body.page-home .home-logout-row .home-help .site-tour,
  body.page-home:has(.home-ask[data-state="open"]) .home-logout-row .home-help .site-tour {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    display: flex;
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin: 0;
  }
}
