/* Ask Neuro hero visualization — scoped to .ask-viz. Outer canvas is transparent.
   Phases (data-phase): training → support → analytics. The screen behind the conversation
   crossfades to the place Ask Neuro is used; within each phase the question lands, Neuro
   types, then the answer and its source appear. */

.ask-viz {
  --av-ink: #172235;
  --av-muted: rgba(23, 34, 53, 0.6);
  --av-faint: rgba(23, 34, 53, 0.42);
  --av-line: rgba(23, 34, 53, 0.09);
  --av-cyan: #0ea5e9;
  --av-cyan-deep: #0369a1;
  --av-spot: #22b8ec;
  --av-teal: #0f766e;
  --av-green: #22c55e;
  --av-navy: #13324a;
  --av-ease: cubic-bezier(0.55, 0, 0.2, 1);
  container: ask-viz / inline-size;
  width: 100%;
  font-family: var(--font-inter-tight, "Inter Tight", system-ui, sans-serif);
  color: var(--av-ink);
}

:where(.ask-viz) p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
}

:where(.ask-viz) :is(ul, ol) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ask-viz__stage {
  position: relative;
  top: -20px;
  width: 100%;
  aspect-ratio: 4 / 3;
}

/* Elements tied to one phase (screen, context, conversation turn) switch on with --on.
   Delays use calc(var(--on) * …) so items stagger in but leave together. */
.ask-viz[data-phase="training"] [data-for="training"],
.ask-viz[data-phase="support"] [data-for="support"],
.ask-viz[data-phase="analytics"] [data-for="analytics"] {
  --on: 1;
}

/* App frame; one screen per place */
.ask-viz__app {
  position: absolute;
  top: 9%;
  left: 0;
  width: 74%;
  height: 70%;
  overflow: hidden;
  border-radius: 14px;
  background: #f3f5f8;
  box-shadow:
    0 0 0 1px rgba(23, 34, 53, 0.06),
    0 32px 60px -30px rgba(15, 23, 42, 0.5),
    0 14px 26px -18px rgba(15, 23, 42, 0.35);
}

/* Visibility (not just opacity) so the screen repaints once its capture image has decoded */
.ask-viz__screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

.ask-viz[data-phase="training"] .ask-viz__screen[data-for="training"],
.ask-viz[data-phase="support"] .ask-viz__screen[data-for="support"],
.ask-viz[data-phase="analytics"] .ask-viz__screen[data-for="analytics"] {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.ask-viz__mark {
  position: relative;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #7dd3fc, var(--av-cyan-deep) 70%);
}

.ask-viz__mark::after {
  content: "";
  position: absolute;
  inset: 28%;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* Operator app shell (training and support), recreated from the product */
.ask-viz__shell {
  display: grid;
  grid-template-columns: 27% minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

.ask-viz__side {
  min-width: 0;
  padding: 1.6cqw 1.4cqw;
  border-right: 1px solid var(--av-line);
  background: #f6f7f9;
}

.ask-viz__back {
  font-size: clamp(7px, 1.05cqw, 9px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--av-faint);
}

.ask-viz__back::before {
  content: "\2190";
  margin-right: 0.4em;
}

.ask-viz__kicker {
  margin-top: 1.4cqw;
  font-size: clamp(6.5px, 0.95cqw, 8px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--av-faint);
}

.ask-viz__title {
  margin-top: 0.3cqw;
  font-size: clamp(9px, 1.65cqw, 12.5px);
  font-weight: 600;
  line-height: 1.2;
}

.ask-viz__count {
  display: flex;
  justify-content: space-between;
  margin-top: 1.3cqw;
  padding: 0.7cqw 0;
  border-top: 1px solid var(--av-line);
  border-bottom: 1px solid var(--av-line);
  font-size: clamp(6.5px, 0.95cqw, 8px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--av-faint);
}

.ask-viz__list {
  display: grid;
  gap: 0.3cqw;
  margin-top: 0.9cqw;
}

.ask-viz__list li {
  display: flex;
  gap: 0.9cqw;
  padding: 0.7cqw 0.8cqw;
  border-radius: 6px;
  font-size: clamp(7.5px, 1.2cqw, 10px);
  line-height: 1.25;
  color: var(--av-faint);
}

.ask-viz__list li > span {
  flex-shrink: 0;
  font-size: 0.85em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ask-viz__list p {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ask-viz__list small {
  display: block;
  font-size: 0.85em;
  font-weight: 500;
}

.ask-viz__list li.is-current {
  background: #fff;
  box-shadow: inset 2px 0 0 var(--av-cyan-deep), 0 4px 10px -8px rgba(23, 34, 53, 0.5);
  color: var(--av-ink);
}

.ask-viz__list li.is-current > span {
  color: var(--av-cyan-deep);
}

/* Machine view: the capture, framed on the part in question */
.ask-viz__view {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  container-type: size;
  background: #0b0f16;
}

.ask-viz__scene {
  --sw: calc(max(100cqw, 124.56cqh) * 1.45);
  --sh: calc(max(100cqh, 80.28cqw) * 1.45);
  position: absolute;
  left: clamp(calc(100cqw - var(--sw)), calc(50cqw - var(--fx) * var(--sw)), 0px);
  top: clamp(calc(100cqh - var(--sh)), calc(50cqh - var(--fy) * var(--sh)), 0px);
  width: var(--sw);
  height: var(--sh);
}

.ask-viz__scene img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.ask-viz__spot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--sw) * 0.017);
  height: calc(var(--sw) * 0.017);
  border-radius: 50%;
  background: var(--av-spot);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9), 0 0 10px rgba(34, 184, 236, 0.7);
  transform: translate(-50%, -50%);
}

.ask-viz__spot.is-active {
  transform: translate(-50%, -50%) scale(1.25);
}

.ask-viz__spot.is-active::before,
.ask-viz__spot.is-active::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid #7dd3fc;
  opacity: 0;
  animation: ask-viz-ping 1.8s ease-out infinite;
}

.ask-viz__spot.is-active::after {
  animation-delay: 0.9s;
}

@keyframes ask-viz-ping {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(3.2); opacity: 0; }
}

.ask-viz__tag {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(11, 15, 22, 0.8);
  font-size: clamp(8px, 3.2cqh, 11px);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  color: #fff;
  transform: translateX(-50%);
}

.ask-viz__close {
  position: absolute;
  top: 3cqh;
  left: 3cqh;
  width: max(14px, 7cqh);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.5);
}

.ask-viz__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  width: 26%;
  height: 26%;
  border-left: 1.5px solid var(--av-ink);
  border-bottom: 1.5px solid var(--av-ink);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* In-app Ask Neuro button: lights up as the question is asked */
.ask-viz__ask {
  position: absolute;
  top: 3cqh;
  right: 3cqh;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  font-size: clamp(8px, 3.4cqh, 11px);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.4s ease calc(var(--on, 0) * 0.25s);
}

.ask-viz__ask,
.ask-viz__admin-ask {
  --av-glow: calc(var(--on, 0) * 4px);
}

.ask-viz [data-for] .ask-viz__ask {
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.5), 0 0 0 var(--av-glow) rgba(14, 165, 233, 0.35);
}

.ask-viz__strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.8cqh 2.2cqw;
  background: rgba(255, 255, 255, 0.94);
  font-size: clamp(7px, 2.6cqh, 9.5px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ask-viz__strip > span:not(.ask-viz__strip-dot) {
  font-weight: 500;
  letter-spacing: 0;
  color: var(--av-muted);
}

.ask-viz__strip .ask-viz__strip-end {
  margin-left: auto;
}

.ask-viz__strip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--av-green);
}

.ask-viz__nav {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-around;
  padding: 0.9cqw 0 1cqw;
  background: #1b2230;
}

.ask-viz__nav span {
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: clamp(6.5px, 0.95cqw, 8.5px);
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.62);
}

.ask-viz__nav span.is-current {
  color: #fff;
}

.ask-viz__nav svg {
  width: clamp(9px, 1.5cqw, 13px);
  height: clamp(9px, 1.5cqw, 13px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Admin console (analytics), recreated from the Executive overview */
.ask-viz__admin {
  display: grid;
  grid-template-columns: 19% minmax(0, 1fr);
  background: #f7f8fa;
}

.ask-viz__admin-side {
  min-width: 0;
  padding: 1.6cqw 1cqw;
  border-right: 1px solid var(--av-line);
  background: #fff;
}

.ask-viz__brand {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 0.6cqw;
  font-size: clamp(8px, 1.35cqw, 11px);
  font-weight: 700;
  line-height: 1.3;
}

.ask-viz__brand span {
  width: 1.2em;
  height: 1.2em;
  border-radius: 50%;
  border: 2px solid var(--av-cyan-deep);
  border-right-color: var(--av-cyan);
}

.ask-viz__admin-side ul {
  display: grid;
  gap: 0.2cqw;
  margin-top: 1.8cqw;
}

.ask-viz__admin-side li {
  padding: 0.6cqw 0.7cqw;
  border-radius: 6px;
  font-size: clamp(7px, 1.1cqw, 9.5px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--av-muted);
}

.ask-viz__admin-side li.is-current {
  background: #eef1f5;
  font-weight: 600;
  color: var(--av-ink);
}

.ask-viz__admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.3cqw;
  padding: 1.8cqw 2cqw;
}

.ask-viz__admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ask-viz__admin-title {
  margin-top: 0.3cqw;
  font-size: clamp(11px, 2.2cqw, 16px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.ask-viz__admin-sub {
  margin-top: 0.3cqw;
  font-size: clamp(6.5px, 1cqw, 8.5px);
  line-height: 1.3;
  color: var(--av-faint);
}

.ask-viz__admin-head .ask-viz__kicker {
  margin-top: 0;
}

.ask-viz__admin-ask {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: var(--av-navy);
  font-size: clamp(7.5px, 1.2cqw, 10px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  color: #fff;
  box-shadow: 0 0 0 var(--av-glow) rgba(14, 165, 233, 0.3);
  transition: box-shadow 0.4s ease calc(var(--on, 0) * 0.25s);
}

.ask-viz__kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9cqw;
}

.ask-viz__kpis li {
  min-width: 0;
  padding: 1cqw 1.1cqw 1.1cqw;
  border: 1px solid var(--av-line);
  border-radius: 7px;
  background: #fff;
}

.ask-viz__kpis p {
  overflow: hidden;
  font-size: clamp(6px, 0.9cqw, 8px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--av-muted);
}

.ask-viz__kpis b {
  display: block;
  margin-top: 0.3cqw;
  font-size: clamp(10px, 2cqw, 15px);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ask-viz__kpis i {
  display: block;
  height: 3px;
  margin-top: 0.7cqw;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--av-teal) calc(var(--v) * 100%), rgba(23, 34, 53, 0.08) 0);
}

.ask-viz__matrix {
  min-height: 0;
  padding: 1.1cqw 1.2cqw;
  border: 1px solid var(--av-line);
  border-radius: 7px;
  background: #fff;
}

.ask-viz__matrix-title {
  font-size: clamp(7px, 1.15cqw, 9.5px);
  font-weight: 600;
  line-height: 1.3;
}

.ask-viz__matrix table {
  width: 100%;
  margin-top: 0.8cqw;
  border-collapse: separate;
  border-spacing: 0.4cqw 0.3cqw;
  table-layout: fixed;
  font-size: clamp(6px, 0.95cqw, 8.5px);
  line-height: 1.2;
}

.ask-viz__matrix th {
  overflow: hidden;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--av-muted);
}

.ask-viz__matrix thead th {
  font-size: 0.92em;
  color: var(--av-faint);
}

.ask-viz__matrix thead th:first-child,
.ask-viz__matrix tbody th {
  width: 30%;
}

.ask-viz__matrix td {
  padding: 0;
  border-radius: 4px;
}

.ask-viz__cell {
  display: block;
  padding: 0.35cqw 0;
  border-radius: 3px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.ask-viz__cell--full { background: #16a34a; }
.ask-viz__cell--partial { background: #f59e0b; }
.ask-viz__cell--low { background: #ef4444; }
.ask-viz__cell--empty { background: #eef0f3; }

.ask-viz__cell--empty::before {
  content: "\00a0";
}

/* The Die-cut 1 column is outlined once Neuro has answered */
.ask-viz__matrix .is-asked {
  box-shadow: 0 0 0 calc(var(--on, 0) * 1.5px) var(--av-cyan);
  transition: box-shadow 0.4s ease calc(var(--on, 0) * 2.2s);
}

.ask-viz__matrix thead .is-asked {
  border-radius: 3px;
  color: var(--av-cyan-deep);
  transition: box-shadow 0.4s ease calc(var(--on, 0) * 2.2s), color 0.4s ease calc(var(--on, 0) * 2.2s);
}

/* Steps panel: each place is clickable */
.ask-viz__panel {
  position: absolute;
  top: 3%;
  right: 0;
  width: clamp(170px, 27%, 210px);
  padding: 9px 14px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 28px -16px rgba(23, 34, 53, 0.28), 0 0 0 1px rgba(23, 34, 53, 0.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}

.ask-viz__panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(11.5px, 2.05cqw, 13px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.ask-viz__panel-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--av-cyan);
}

.ask-viz__panel-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--av-cyan);
  opacity: 0;
  animation: ask-viz-echo 1.4s ease-out infinite;
}

@keyframes ask-viz-echo {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.6); opacity: 0; }
}

.ask-viz__steps {
  display: grid;
  gap: 2px;
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid rgba(23, 34, 53, 0.08);
}

.ask-viz__step {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% + 10px);
  margin: 0 -5px;
  padding: 2px 5px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: clamp(11px, 1.95cqw, 12.5px);
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  color: rgba(23, 34, 53, 0.42);
  cursor: pointer;
  transition: color 0.35s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ask-viz__step:hover {
  background: rgba(23, 34, 53, 0.05);
}

.ask-viz__step:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.ask-viz__step[data-state="active"] {
  color: var(--av-ink);
}

.ask-viz__step[data-state="done"] {
  color: rgba(23, 34, 53, 0.78);
}

.ask-viz__step-mark {
  position: relative;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(23, 34, 53, 0.2);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ask-viz__step[data-state="active"] .ask-viz__step-mark {
  border-color: var(--av-cyan);
  border-right-color: rgba(14, 165, 233, 0.15);
  animation: ask-viz-spin 0.9s linear infinite;
}

.ask-viz.is-pinned .ask-viz__step[data-state="active"] .ask-viz__step-mark {
  animation: none;
  border-color: var(--av-cyan);
  background: rgba(14, 165, 233, 0.15);
}

.ask-viz__step[data-state="done"] .ask-viz__step-mark {
  border-color: var(--av-cyan-deep);
  background: var(--av-cyan-deep);
}

.ask-viz__step[data-state="done"] .ask-viz__step-mark::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 1.5px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

@keyframes ask-viz-spin {
  to { transform: rotate(360deg); }
}

/* Conversation card: stays put while the place behind it changes */
.ask-viz__chat {
  position: absolute;
  right: 0;
  bottom: 2%;
  width: clamp(240px, 44%, 330px);
  padding: 11px 14px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px -18px rgba(23, 34, 53, 0.4), 0 0 0 1px rgba(23, 34, 53, 0.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}

.ask-viz__chat-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(23, 34, 53, 0.08);
  font-size: clamp(11.5px, 2cqw, 13px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.ask-viz__swaps {
  display: inline-grid;
}

.ask-viz__swap {
  grid-area: 1 / 1;
  opacity: var(--on, 0);
  transform: translateY(calc((1 - var(--on, 0)) * 3px));
  transition: opacity 0.3s ease calc(var(--on, 0) * 0.3s), transform 0.3s ease calc(var(--on, 0) * 0.3s);
}

.ask-viz__context {
  min-width: 0;
  margin-left: auto;
  justify-items: end;
}

.ask-viz__context .ask-viz__swap {
  overflow: hidden;
  max-width: 100%;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(3, 105, 161, 0.08);
  font-size: 0.82em;
  font-weight: 600;
  text-overflow: ellipsis;
  color: var(--av-cyan-deep);
}

.ask-viz__thread {
  display: grid;
  margin-top: 10px;
}

.ask-viz__turn {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.ask-viz__q {
  align-self: flex-end;
  max-width: 88%;
  padding: 6px 10px;
  border-radius: 12px 12px 3px 12px;
  background: var(--av-navy);
  font-size: clamp(10.5px, 1.8cqw, 12px);
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  opacity: var(--on, 0);
  transform: translateY(calc((1 - var(--on, 0)) * 6px));
  transition: opacity 0.35s ease calc(var(--on, 0) * 0.5s), transform 0.35s ease calc(var(--on, 0) * 0.5s);
}

.ask-viz__reply {
  display: grid;
}

.ask-viz__reply > * {
  grid-area: 1 / 1;
}

.ask-viz__typing {
  align-self: start;
  display: inline-flex;
  gap: 3px;
  width: max-content;
  padding: 7px 10px;
  border-radius: 12px 12px 12px 3px;
  background: rgba(23, 34, 53, 0.06);
  opacity: 0;
}

.ask-viz__typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--av-faint);
  animation: ask-viz-dot 0.9s ease-in-out infinite;
}

.ask-viz__typing i:nth-child(2) { animation-delay: 0.15s; }
.ask-viz__typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes ask-viz-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-2px); opacity: 1; }
}

.ask-viz[data-phase="training"] [data-for="training"] .ask-viz__typing,
.ask-viz[data-phase="support"] [data-for="support"] .ask-viz__typing,
.ask-viz[data-phase="analytics"] [data-for="analytics"] .ask-viz__typing {
  animation: ask-viz-typing 1.1s ease 1s both;
}

@keyframes ask-viz-typing {
  0% { opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { opacity: 0; }
}

.ask-viz__a {
  font-size: clamp(10.5px, 1.8cqw, 12px);
  line-height: 1.45;
  color: var(--av-ink);
  opacity: var(--on, 0);
  transform: translateY(calc((1 - var(--on, 0)) * 4px));
  transition: opacity 0.4s ease calc(var(--on, 0) * 2s), transform 0.4s ease calc(var(--on, 0) * 2s);
}

.ask-viz__a-list {
  display: grid;
  gap: 3px;
  counter-reset: ask-step;
}

.ask-viz__a-list li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  counter-increment: ask-step;
}

.ask-viz__a-list li::before {
  content: counter(ask-step);
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(3, 105, 161, 0.1);
  font-size: 9px;
  font-weight: 700;
  color: var(--av-cyan-deep);
}

.ask-viz__source {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: clamp(9px, 1.5cqw, 10.5px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--av-teal);
}

.ask-viz__source::before {
  content: "";
  width: 8px;
  height: 10px;
  flex-shrink: 0;
  border: 1.5px solid currentColor;
  border-radius: 1.5px;
}

.ask-viz.is-paused *,
.ask-viz.is-paused *::before,
.ask-viz.is-paused *::after {
  animation-play-state: paused !important;
}

/* Narrow containers: taller stage, panel on top, app full width without sidebars, conversation below */
@container ask-viz (max-width: 480px) {
  .ask-viz__stage {
    aspect-ratio: 0.72;
  }

  .ask-viz__app {
    top: 23%;
    width: 100%;
    height: 40%;
    border-radius: 12px;
  }

  .ask-viz__shell,
  .ask-viz__admin {
    grid-template-columns: minmax(0, 1fr);
  }

  .ask-viz__side,
  .ask-viz__admin-side,
  .ask-viz__admin-sub,
  .ask-viz__strip-end {
    display: none;
  }

  .ask-viz__admin-main {
    gap: 2.2cqw;
    padding: 3cqw;
  }

  .ask-viz__nav span {
    font-size: 7px;
  }

  .ask-viz__panel {
    top: 0;
    width: 58%;
    padding: 7px 9px 8px;
    border-radius: 10px;
  }

  .ask-viz__panel-title {
    gap: 6px;
    font-size: 11px;
  }

  .ask-viz__steps {
    margin-top: 6px;
    padding-top: 5px;
  }

  .ask-viz__step {
    gap: 6px;
    font-size: 10.5px;
  }

  .ask-viz__step-mark {
    width: 11px;
    height: 11px;
  }

  .ask-viz__step[data-state="done"] .ask-viz__step-mark::after {
    left: 2.6px;
    top: 0.8px;
  }

  .ask-viz__chat {
    bottom: 0;
    width: 88%;
    padding: 9px 11px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ask-viz *,
  .ask-viz *::before,
  .ask-viz *::after {
    animation: none !important;
    transition: none !important;
  }
}
