/* MS Toolkit: the 30-second tool tours (assets/tours.js). A slim strip above each tool screen, a "▶ Tour" chip once
   it has been watched, and the video lightbox (a bottom sheet on phones). --a / --a2 / --tint = the tool's own accent. */
.tour-host { position: relative; --a: #1f6feb; --a2: #5b9bff; --tint: #eef3fb; }
.tour-host:not(.is-chip) { padding-top: 18px; }
.tour-host:not(.is-chip):not([hidden]) + .inner.page { padding-top: 14px; }
.tour-host.is-chip { height: 0; z-index: 3; }

.tour-strip { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: column; grid-auto-columns: auto; align-items: center; gap: 6px 12px; padding: 7px 8px 7px 7px; border-radius: 14px;
  background: linear-gradient(90deg, var(--tint), var(--surface) 70%); border: 1px solid var(--line); box-shadow: var(--shadow-sm, 0 1px 2px rgba(11,27,58,.06)); }
.tour-play { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; border-radius: 10px; }
.tour-play:focus-visible, .tour-x:focus-visible, .tour-chip:focus-visible, .tour-up:focus-visible, .tour-close:focus-visible, .setup-tour:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 2px; }
.tour-th { position: relative; flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0b1b3a; }
.tour-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tour-th .thumb-fb { padding: 6px 7px; gap: 1px; }
.tour-th .thumb-fb small { font-size: 7.5px; } .tour-th .thumb-fb b { font-size: 10px; -webkit-line-clamp: 2; }
.tour-pb { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(11,27,58,0), rgba(11,27,58,.35)); }
.tour-pb .tour-pi { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.94); color: var(--a); box-shadow: 0 4px 12px -4px rgba(0,0,0,.5); transition: transform .15s; }
.tour-pi svg { width: 14px; height: 14px; margin-left: 2px; display: block; }
.tour-play:hover .tour-pi { transform: scale(1.08); }
.tour-tx { display: grid; min-width: 0; line-height: 1.25; }
.tour-tx b { font: 700 14.5px var(--font-display); }
.tour-tx small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-up { font: 700 12.5px var(--font-body); white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--a); color: #fff; text-decoration: none; }
.tour-up:hover { filter: brightness(1.08); }
/* First visit: the strip glows in the tool's colour, says "Start here" and has a clear Watch button, so it isn't missed. */
.tour-strip.is-new { border-color: color-mix(in srgb, var(--a) 45%, var(--line)); animation: tour-glow 2.4s ease-in-out 0s 4; box-shadow: 0 0 0 3px color-mix(in srgb, var(--a) 16%, transparent), 0 8px 24px -12px color-mix(in srgb, var(--a) 60%, transparent); }
@keyframes tour-glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--a) 24%, transparent), 0 10px 30px -10px color-mix(in srgb, var(--a) 75%, transparent); } }
.tour-strip.is-new .tour-pb .tour-pi { animation: tour-pulse 1.2s ease-in-out 0s 8 alternate; }
@keyframes tour-pulse { to { transform: scale(1.14); } }
.tour-new { justify-self: start; margin-bottom: 2px; padding: 1px 8px; border-radius: 999px; background: var(--a); color: #fff; font: 800 10.5px/1.6 var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
.tour-go { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px 8px 9px; border: 0; border-radius: 999px; background: var(--a); color: #fff; font: 700 14px var(--font-body); cursor: pointer; white-space: nowrap; box-shadow: 0 6px 16px -8px var(--a); }
.tour-go .tour-pi { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.95); color: var(--a); }
.tour-go .tour-pi svg { width: 11px; height: 11px; }
.tour-go:hover { filter: brightness(1.08); }
.tour-go:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 2px; }
.tour-x { width: 32px; height: 32px; padding: 0; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.tour-x:hover { background: var(--surface-2); color: var(--ink); }

/* folded: a small chip at the top right of the page header (takes no room in the page) */
.tour-chip { position: absolute; right: 0; top: 24px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 12.5px var(--font-body); cursor: pointer; box-shadow: var(--shadow-sm, none); }
.tour-chip .tour-pi { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--a); color: #fff; }
.tour-chip .tour-pi svg { width: 10px; height: 10px; margin-left: 1px; }
.tour-chip:hover { border-color: var(--a); }
.screen:has(> .gut > .tour-host.is-chip:not([hidden])) .aitabs,
.screen:has(> .gut > .tour-host.is-chip:not([hidden])) .ph > div:first-child { padding-right: 86px; }

/* the lightbox */
.tour-dlg { width: min(880px, calc(100vw - 48px)); max-width: none; padding: 0; border: 0; border-radius: 18px; background: #0b1b3a; color: #fff; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
.tour-dlg::backdrop { background: rgba(5,12,31,.72); backdrop-filter: blur(3px); }
.tour-dh { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; }
.tour-dh > div { display: grid; line-height: 1.25; min-width: 0; }
.tour-dh small { font: 500 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--a2, #9fd4ff); }
.tour-dh b { font: 700 17px var(--font-display); }
.tour-close { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; font-size: 17px; cursor: pointer; }
.tour-close:hover { background: rgba(255,255,255,.16); }
.tour-frame { aspect-ratio: 16 / 9; background: #000; }
.tour-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.tour-df { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px 14px; min-height: 20px; }
.tour-df .hint { color: #a8b7d6; font-size: 12.5px; }
.tour-df .btn-primary { background: var(--a); text-decoration: none; }

/* Home: the optional welcome tour under the Get set up checklist */
.setup-tour { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; width: 100%; padding: 10px; border-radius: 14px; border: 1px dashed var(--line); background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.setup-tour:hover { border-color: #9cc4f5; background: var(--surface); }
.setup-tour .s-dot svg { width: 12px; height: 12px; margin-left: 2px; }
.setup-tour.done .s-dot { background: var(--ok-bg); color: var(--ok); }

@media (max-width: 640px) {
  .tour-host:not(.is-chip) { padding-top: 12px; }
  .tour-host:not(.is-chip):not([hidden]) + .inner.page { padding-top: 12px; }
  .tour-chip { top: 16px; }
  .tour-th { width: 80px; }
  .tour-tx b { font-size: 14px; }
  .tour-strip { grid-template-columns: minmax(0, 1fr) auto; grid-auto-flow: row; }
  .tour-strip .tour-go { display: none; } /* on phones the whole glowing strip is the button */
  .tour-strip .tour-up { grid-row: 2; grid-column: 1 / -1; justify-self: start; margin-left: 92px; padding: 4px 11px; }
  .tour-strip .tour-x { grid-row: 1; grid-column: 2; }
  /* a full-width sheet from the bottom */
  .tour-dlg { width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (prefers-reduced-motion: reduce) { .tour-pi { transition: none; } .tour-strip.is-new, .tour-strip.is-new .tour-pb .tour-pi { animation: none; } }
.tour-guard { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
