/* ══════════════════════════════════════════════════════════════════════
   Product tour (ic-v3-tour), 2026-10-09
   A self-playing walk through real app screens: story-style progress bars,
   a browser window whose stage holds one scene at a time, and a caption.
   Each scene: a slow camera move toward its focus (--x/--y, --s), an
   optional cursor (--fx/--fy → --tx/--ty) and one floating card. Phones get
   a taller stage that shows the screenshot at twice the width, cropped
   around --pm, so the app's own text stays readable.
   ══════════════════════════════════════════════════════════════════════ */
.icv3-tour { padding-block: clamp(4.5rem, 8vw, 7rem); }

.icv3-tour__player { position: relative; max-width: 1120px; margin-inline: auto; }
.icv3-tour__player::before {
  content: "";
  position: absolute;
  inset: 12% -4% -6%;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(60% 60% at 30% 40%, rgba(73, 65, 227, 0.16), transparent 70%), radial-gradient(50% 50% at 75% 70%, rgba(0, 122, 255, 0.12), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

/* ── Progress bars ─────────────────────────────────────────────────── */
.icv3-tour__bars { display: flex; gap: 6px; margin-bottom: 14px; }
.icv3-tour__bar {
  display: grid;
  flex: 1 1 0;
  gap: 8px;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--v3-muted);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color var(--v3-dur) var(--v3-ease);
}
.icv3-tour__bar:hover,
.icv3-tour__bar.is-active { color: var(--v3-ink-strong); }
.icv3-tour__bar.is-active { font-weight: 600; }
.icv3-tour__bar:focus-visible { outline: 3px solid rgba(73, 65, 227, 0.35); outline-offset: 2px; border-radius: 6px; }
.icv3-tour__bar > i { position: relative; display: block; height: 4px; overflow: hidden; border-radius: 99px; background: rgba(73, 65, 227, 0.14); }
.icv3-tour__bar > i > i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--v3-violet), var(--v3-blue)); }
.icv3-tour__bar.is-done > i > i { width: 100%; }
.icv3-tour__bar.is-run > i > i { animation: icv3-tour-fill var(--tour-ms) linear both; }
.icv3-tour__bar span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 991.98px) {
  .icv3-tour__bars { gap: 4px; }
  .icv3-tour__bar { gap: 0; padding-block: 8px; }
  .icv3-tour__bar span { display: none; }
}

/* ── Window ────────────────────────────────────────────────────────── */
.icv3-tour__window {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 20, 79, 0.06), var(--v3-shadow-shot);
}
.icv3-tour__chrome { display: flex; align-items: center; gap: 7px; padding: 10px 12px 10px 16px; border-bottom: 1px solid #ebebf3; }
.icv3-tour__chrome > i { flex: none; width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.icv3-tour__chrome > i:nth-child(2) { background: #febc2e; }
.icv3-tour__chrome > i:nth-child(3) { background: #28c840; }
.icv3-tour__url {
  min-width: 0;
  max-width: 440px;
  margin-left: 10px;
  overflow: hidden;
  padding: 4px 14px;
  border-radius: 99px;
  background: #f1f1f6;
  color: var(--v3-muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.icv3-tour__url b { color: var(--v3-ink); font-weight: 400; }
.icv3-tour__toggle {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f1f6;
  color: var(--v3-ink-strong);
  cursor: pointer;
  transition: background-color var(--v3-dur) var(--v3-ease), color var(--v3-dur) var(--v3-ease);
}
.icv3-tour__toggle:hover { background: var(--v3-violet); color: #fff; }
.icv3-tour__toggle:focus-visible { outline: 3px solid rgba(73, 65, 227, 0.35); outline-offset: 2px; }
.icv3-tour__toggle svg { width: 14px; height: 14px; }
.icv3-tour__ico-play,
.icv3-tour__player.is-paused .icv3-tour__ico-pause { display: none; }
.icv3-tour__player.is-paused .icv3-tour__ico-play { display: block; }

/* ── Stage and scenes ──────────────────────────────────────────────── */
.icv3-tour__stage { --iw: 100%; position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: #f6f6fb; }
.icv3-tour__scene {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms var(--v3-ease), visibility 0s linear 700ms;
}
.icv3-tour__scene.is-active { z-index: 1; opacity: 1; visibility: visible; transition-delay: 0s; }
.icv3-tour__cam {
  position: absolute;
  top: 0;
  left: calc((100% - var(--iw)) * var(--px));
  width: var(--iw);
  height: 100%;
  transform-origin: var(--x) var(--y);
}
.icv3-tour__shot { display: block; width: 100%; height: 100%; object-fit: cover; }
.icv3-tour__scene.is-playing .icv3-tour__cam { animation: icv3-tour-cam var(--tour-ms) cubic-bezier(0.3, 0, 0.25, 1) both; }

@media (max-width: 767.98px) {
  .icv3-tour__stage { --iw: 200%; aspect-ratio: 4 / 5; }
  .icv3-tour__cam { left: calc((100% - var(--iw)) * var(--pm)); }
}

/* Cursor: glides in, then clicks (or carries a block across). */
.icv3-tour__cursor { position: absolute; left: var(--tx); top: var(--ty); z-index: 3; width: 0; height: 0; }
.icv3-tour__pointer { position: absolute; left: -5px; top: -3px; width: 24px; height: 24px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.icv3-tour__ripple { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border: 2px solid var(--v3-violet); border-radius: 50%; opacity: 0; }
.icv3-tour__carry {
  position: absolute;
  left: 14px;
  top: 16px;
  padding: 7px 12px;
  border: 1.5px dashed var(--v3-violet);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 20, 79, 0.18);
  color: var(--v3-ink-strong);
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}
.icv3-tour__scene.is-playing .icv3-tour__cursor { animation: icv3-tour-move 1200ms var(--v3-ease) 600ms both; }
.icv3-tour__scene.is-playing .icv3-tour__ripple { animation: icv3-tour-ripple 650ms ease-out 1850ms both; }
.icv3-tour__scene.is-playing .icv3-tour__cursor.is-drag .icv3-tour__ripple { animation-delay: 450ms; }
.icv3-tour__scene.is-playing .icv3-tour__carry { animation: icv3-tour-drop 1800ms var(--v3-ease) 600ms both; }

/* One floating card per scene. */
.icv3-tour__float {
  position: absolute;
  left: var(--fl);
  top: var(--ft);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(340px, 46%);
  padding: 12px 18px 12px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 20, 79, 0.06), 0 22px 44px rgba(17, 20, 79, 0.2);
}
.icv3-tour__scene.is-playing .icv3-tour__float { animation: icv3-tour-pop 560ms var(--v3-ease-out) 2200ms both; }
.icv3-tour__float-ico { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #e5f8ed; color: #1c9d5a; }
.icv3-tour__float-ico svg { width: 20px; height: 20px; }
.icv3-tour__float--pri .icv3-tour__float-ico { background: #eceafd; color: var(--v3-violet); }
.icv3-tour__float--info .icv3-tour__float-ico { background: #e6f1ff; color: var(--v3-blue); }
.icv3-tour__float--warn .icv3-tour__float-ico { background: #fff3df; color: #b86e00; }
.icv3-tour__float-txt { display: grid; gap: 2px; min-width: 0; }
.icv3-tour__float-txt b { color: var(--v3-ink-strong); font-family: var(--font-display); font-size: 14.5px; line-height: 1.3; }
.icv3-tour__float-txt span { color: var(--v3-body); font-size: 12.5px; line-height: 1.4; }
.icv3-tour__float-txt strong { color: var(--v3-ink-strong); font-family: var(--font-display); font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.15; }

/* AI Assistant panel, drawn from the section data. */
.icv3-tour__chat {
  position: absolute;
  top: 5%;
  right: 2.5%;
  bottom: 5%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  width: min(400px, 42%);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 20, 79, 0.06), 0 26px 54px rgba(17, 20, 79, 0.22);
}
.icv3-tour__scene.is-playing .icv3-tour__chat { animation: icv3-tour-slide 600ms var(--v3-ease-out) 300ms both; }
.icv3-tour__chat-head { display: grid; gap: 2px; margin: 0; padding: 12px 16px; border-bottom: 1px solid #ebebf3; }
.icv3-tour__chat-head b { color: var(--v3-ink-strong); font-size: 14px; }
.icv3-tour__chat-head small { color: var(--v3-muted); font-size: 11.5px; }
.icv3-tour__chat-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; min-height: 0; padding: 14px; overflow: hidden; }
.icv3-tour__msg {
  align-self: flex-start;
  max-width: 88%;
  margin: 0;
  padding: 9px 12px;
  border-radius: 14px 14px 14px 4px;
  background: #f1f1f6;
  color: var(--v3-ink);
  font-size: 13px;
  line-height: 1.45;
}
.icv3-tour__msg.is-me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--v3-violet); color: #fff; }
.icv3-tour__acard { padding: 10px 12px; border: 1px solid #e4e4ef; border-radius: 12px; font-size: 12px; }
.icv3-tour__acard > p:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.icv3-tour__acard > p:first-child b { color: var(--v3-ink-strong); font-size: 12.5px; }
.icv3-tour__acard > p:first-child span { padding: 2px 8px; border-radius: 99px; background: #fff3df; color: #b86e00; font-size: 10.5px; font-weight: 600; }
.icv3-tour__acard dl { display: grid; gap: 3px; margin: 0 0 10px; }
.icv3-tour__acard dl div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
.icv3-tour__acard dt { color: var(--v3-muted); font-weight: 400; }
.icv3-tour__acard dd { margin: 0; color: var(--v3-ink); }
.icv3-tour__acard-btns { display: flex; gap: 8px; margin: 0; }
.icv3-tour__acard-btns b,
.icv3-tour__acard-btns span { padding: 5px 12px; border-radius: 7px; font-size: 11.5px; font-weight: 600; }
.icv3-tour__acard-btns b { background: #1c9d5a; color: #fff; }
.icv3-tour__acard-btns span { border: 1px solid #f3b4b4; color: #d23b3b; }
.icv3-tour__scene.is-playing .icv3-tour__msg,
.icv3-tour__scene.is-playing .icv3-tour__acard { animation: icv3-tour-rise 420ms var(--v3-ease-out) calc(900ms + var(--d, 0) * 1300ms) both; }
.icv3-tour__scene.is-playing .icv3-tour__acard-btns b { animation: icv3-tour-press 500ms var(--v3-ease) calc(1700ms + var(--d, 0) * 1300ms) both; }
.icv3-tour__chat-input { margin: 0 12px 6px; padding: 9px 12px; border: 1px solid #e4e4ef; border-radius: 10px; color: var(--v3-muted); font-size: 12px; }
.icv3-tour__chat-foot { margin: 0 12px 10px; color: var(--v3-muted); font-size: 10.5px; opacity: 0.85; }

@media (max-width: 767.98px) {
  .icv3-tour__float { left: 5%; right: 5%; top: auto; bottom: 5%; max-width: none; }
  .icv3-tour__chat { top: 4%; right: 4%; bottom: 4%; left: 4%; width: auto; }
  /* The panel is short here: open on the second exchange so the confirm card fits. */
  .icv3-tour__msg:nth-child(-n+2) { display: none; }
  .icv3-tour__msg:nth-child(3) { --d: 0 !important; }
  .icv3-tour__msg:nth-child(4) { --d: 1 !important; }
  .icv3-tour__acard { --d: 2 !important; }
  .icv3-tour__acard dl div:nth-child(n+3) { display: none; }
  .icv3-tour__pointer { width: 20px; height: 20px; }
}

/* End card: the CTA, then the tour starts again. */
.icv3-tour__end {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  background: radial-gradient(80% 90% at 50% 0%, var(--v3-violet-mid), var(--v3-violet-deep));
  color: #fff;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms var(--v3-ease), visibility 0s linear 600ms;
}
.icv3-tour__player.is-ended .icv3-tour__end { opacity: 1; visibility: visible; transition-delay: 0s; }
.icv3-tour__end p { margin: 0; }
.icv3-tour__end-title { max-width: 22ch; font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 40px); font-weight: 700; line-height: 1.15; text-wrap: balance; }
.icv3-tour__end-body { max-width: 46ch; color: rgba(255, 255, 255, 0.86); font-size: clamp(15px, 1.5vw, 17px); line-height: 1.5; }
.icv3-tour__end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px !important; }
.icv3-tour__replay {
  padding: 12px 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 99px;
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--v3-dur) var(--v3-ease), border-color var(--v3-dur) var(--v3-ease);
}
.icv3-tour__replay:hover { border-color: #fff; background: rgba(255, 255, 255, 0.12); }
.icv3-tour__end-note { color: rgba(255, 255, 255, 0.8); font-size: 13.5px; }
.icv3-tour__player.is-ended .icv3-tour__end > * { animation: icv3-tour-rise 500ms var(--v3-ease-out) both; }
.icv3-tour__player.is-ended .icv3-tour__end > :nth-child(2) { animation-delay: 120ms; }
.icv3-tour__player.is-ended .icv3-tour__end > :nth-child(3) { animation-delay: 240ms; }
.icv3-tour__player.is-ended .icv3-tour__end > :nth-child(4) { animation-delay: 360ms; }

/* ── Caption ───────────────────────────────────────────────────────── */
.icv3-tour__foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 32px; margin-top: 20px; }
.icv3-tour__captions { flex: 1 1 auto; min-width: 0; }
.icv3-tour__actions { display: flex; flex: none; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding-top: 2px; }
/* The end card carries its own buttons: step these aside while it shows. */
.icv3-tour__actions > * { transition: opacity 400ms var(--v3-ease), visibility 0s linear 0s; }
.icv3-tour__player.is-ended .icv3-tour__actions > * { opacity: 0; visibility: hidden; transition: opacity 400ms var(--v3-ease), visibility 0s linear 400ms; }
.icv3-tour__cta { display: grid; justify-items: center; gap: 8px; }
.icv3-tour__cta small { color: var(--v3-muted); font-size: 13px; }
.icv3-tour__next {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 7px 7px 18px;
  border: 1.5px solid rgba(73, 65, 227, 0.25);
  border-radius: 99px;
  background: #fff;
  color: var(--v3-body);
  font-size: 15px;
  cursor: pointer;
  transition: border-color var(--v3-dur) var(--v3-ease), box-shadow var(--v3-dur) var(--v3-ease);
}
.icv3-tour__next b { color: var(--v3-ink-strong); font-weight: 600; }
.icv3-tour__next:hover,
.icv3-tour__next:focus-visible { border-color: var(--v3-violet); box-shadow: 0 10px 24px rgba(73, 65, 227, 0.16); }
.icv3-tour__next:focus-visible { outline: 3px solid rgba(73, 65, 227, 0.35); outline-offset: 2px; }
.icv3-tour__next-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--v3-violet); color: #fff; transition: translate var(--v3-dur) var(--v3-ease-out); }
.icv3-tour__next:hover .icv3-tour__next-ico { translate: 3px 0; }
.icv3-tour__next-ico svg { width: 16px; height: 16px; }
@media (max-width: 767.98px) {
  .icv3-tour__cta { justify-items: start; }
}
@media (max-width: 767.98px) {
  .icv3-tour__foot { flex-direction: column; }
  .icv3-tour__actions { width: 100%; }
}
.icv3-tour__caption { display: grid; gap: 4px; margin: 0; }
.icv3-tour__caption.is-active { animation: icv3-tour-rise 450ms var(--v3-ease-out) both; }
.icv3-tour__caption b { color: var(--v3-ink-strong); font-family: var(--font-display); font-size: clamp(18px, 2vw, 22px); line-height: 1.3; }
.icv3-tour__caption > span:last-child { color: var(--v3-body); font-size: 15.5px; line-height: 1.5; }

/* Paused (by the button, or off screen): everything holds its frame. */
.icv3-tour__player.is-paused .icv3-tour__scene *,
.icv3-tour__player.is-paused .icv3-tour__bar > i > i { animation-play-state: paused !important; }

@keyframes icv3-tour-fill { from { width: 0; } to { width: 100%; } }
@keyframes icv3-tour-cam { from { scale: 1; } to { scale: var(--s); } }
@keyframes icv3-tour-move {
  from { left: var(--fx); top: var(--fy); opacity: 0; }
  20% { opacity: 1; }
  to { left: var(--tx); top: var(--ty); opacity: 1; }
}
@keyframes icv3-tour-ripple { from { opacity: 0.9; scale: 0.2; } to { opacity: 0; scale: 1.1; } }
@keyframes icv3-tour-drop { 0%, 75% { opacity: 1; scale: 1; } to { opacity: 0; scale: 0.6; } }
@keyframes icv3-tour-pop { from { opacity: 0; translate: 0 14px; scale: 0.92; } }
@keyframes icv3-tour-slide { from { opacity: 0; translate: 28px 0; } }
@keyframes icv3-tour-rise { from { opacity: 0; translate: 0 8px; } }
@keyframes icv3-tour-press { 50% { scale: 0.92; box-shadow: 0 0 0 4px rgba(28, 157, 90, 0.25); } }

@media (prefers-reduced-motion: reduce) {
  .icv3-tour__scene *,
  .icv3-tour__caption,
  .icv3-tour__end > * { animation: none !important; }
  .icv3-tour__scene { transition: none; }
}

