/* Fixed host primitives shared by the homepage benefit screencasts. */
.mx-screencast[data-canvas="feature"][data-scenario^="feature-"] {
  --mx-feature-canvas-inline-size: 720px;
  --mx-feature-canvas-block-size: 576px;
  --mx-feature-canvas-aspect: 5 / 4;
  --mx-feature-plane-scale: 1;
  --mx-feature-surface-gap: clamp(0.5rem, 2cqi, 1rem);
  position: relative;
  inline-size: min(var(--mx-feature-canvas-inline-size), 100%);
  aspect-ratio: var(--mx-feature-canvas-aspect);
  isolation: isolate;
}

.mx-screencast[data-canvas="feature"][data-scenario^="feature-"] .mx-feature-native-plane {
  position: absolute;
  inset: 0 auto auto 0;
  inline-size: var(--mx-feature-canvas-inline-size);
  block-size: var(--mx-feature-canvas-block-size);
  container: mx-feature-plane / size;
  overflow: hidden;
  contain: strict;
  transform: scale(var(--mx-feature-plane-scale));
  transform-origin: top left;
}

.mx-screencast[data-canvas="feature"][data-scenario^="feature-"] .mx-app-visual-catalog-surface {
  min-inline-size: 0;
  min-block-size: 0;
  box-sizing: border-box;
}

.mx-ref-slack-thread,
.mx-ref-mcp-terminal {
  display: none;
}

/* Collaboration scenario base scope. */
.mx-screencast[data-scenario="feature-collaboration"] {
  --mx-feature-duration: 11s;
  --mx-feature-surface-count: 1;
}

/* Portable context scenario base scope. */
.mx-screencast[data-scenario="feature-portable"] {
  --mx-feature-duration: 5s;
  --mx-feature-surface-count: 3;
  --mx-portable-phone-height: 22rem;
  --mx-portable-mark-height: 18rem;
}

/* Feedback scenario base scope. */
.mx-screencast[data-scenario="feature-feedback"] {
  --mx-feature-duration: 12s;
  --mx-feature-surface-count: 1;
}

/* Project memory scenario base scope. */
.mx-screencast[data-scenario="feature-memory"] {
  --mx-feature-duration: 11s;
  --mx-feature-surface-count: 5;
}

/* Collaboration: five canonical people populate, hold, stack, and exit. */
.mx-screencast[data-scenario="feature-collaboration"] .mx-feature-collaboration-projection {
  position: absolute;
  inset: 4%;
  inline-size: 92%;
  block-size: 92%;
  max-block-size: none;
  overflow: visible;
}

.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-users-modal {
  box-sizing: border-box;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  overflow: hidden;
  padding: clamp(0.8rem, 2.2cqi, 1.25rem);
}

.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-modal-head {
  margin-block-end: clamp(0.45rem, 1.2cqi, 0.75rem);
}

.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-modal-head h3 {
  font-size: clamp(1rem, 3.2cqi, 1.55rem);
}

.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-chip-row {
  gap: 0.45rem;
  margin-block-end: clamp(0.4rem, 1.2cqi, 0.7rem);
}

.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-list {
  gap: clamp(0.3rem, 0.9cqi, 0.55rem);
  perspective: 700px;
}

.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-list article {
  --mx-feature-exit-x: -115cqi;
  --mx-feature-stack-x: -1.2cqi;
  position: relative;
  min-block-size: 0;
  border: 1px solid var(--mx-ref-border);
  background: var(--mx-ref-surface);
  padding: clamp(0.42rem, 1.15cqi, 0.66rem);
  opacity: 0;
  transform: none;
  transform-origin: center;
  animation-name: var(--mx-feature-row-animation), mx-feature-collaboration-glass;
  animation-duration: var(--mx-feature-duration), var(--mx-feature-duration);
  animation-timing-function: linear, linear;
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: both, both;
  will-change: opacity, transform;
}

.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-list article:nth-child(even) {
  --mx-feature-exit-x: 115cqi;
  --mx-feature-stack-x: 1.2cqi;
}

.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-list article:nth-child(1) { --mx-feature-row-animation: mx-feature-collaboration-row-1; }
.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-list article:nth-child(2) { --mx-feature-row-animation: mx-feature-collaboration-row-2; }
.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-list article:nth-child(3) { --mx-feature-row-animation: mx-feature-collaboration-row-3; }
.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-list article:nth-child(4) { --mx-feature-row-animation: mx-feature-collaboration-row-4; }
.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-list article:nth-child(5) { --mx-feature-row-animation: mx-feature-collaboration-row-5; }

.mx-screencast[data-scenario="feature-collaboration"] .mx-ref-user-list article small {
  font-size: clamp(0.58rem, 1.55cqi, 0.76rem);
}

@keyframes mx-feature-collaboration-row-1 {
  0%, 6.36% { opacity: 0; transform: translate3d(0, 0.45rem, 0); }
  11.82%, 42.73% { opacity: 1; transform: translate3d(0, 0, 0); }
  65.45% { opacity: 1; transform: perspective(700px) translate3d(var(--mx-feature-stack-x), calc(var(--mx-feature-row-index) * -0.25cqi), calc(var(--mx-feature-row-index) * -4px)) rotateY(-1.2deg); }
  95.45% { opacity: 0; transform: perspective(700px) translate3d(var(--mx-feature-exit-x), -1cqi, -12px) rotateY(-3deg); }
  100% { opacity: 0; transform: none; }
}

@keyframes mx-feature-collaboration-row-2 {
  0%, 11.82% { opacity: 0; transform: translate3d(0, 0.45rem, 0); }
  17.27%, 42.73% { opacity: 1; transform: translate3d(0, 0, 0); }
  65.45%, 67.55% { opacity: 1; transform: perspective(700px) translate3d(var(--mx-feature-stack-x), calc(var(--mx-feature-row-index) * -0.25cqi), calc(var(--mx-feature-row-index) * -4px)) rotateY(1.2deg); }
  95.45% { opacity: 0; transform: perspective(700px) translate3d(var(--mx-feature-exit-x), -1cqi, -12px) rotateY(3deg); }
  100% { opacity: 0; transform: none; }
}

@keyframes mx-feature-collaboration-row-3 {
  0%, 17.27% { opacity: 0; transform: translate3d(0, 0.45rem, 0); }
  22.73%, 42.73% { opacity: 1; transform: translate3d(0, 0, 0); }
  65.45%, 69.65% { opacity: 1; transform: perspective(700px) translate3d(var(--mx-feature-stack-x), calc(var(--mx-feature-row-index) * -0.25cqi), calc(var(--mx-feature-row-index) * -4px)) rotateY(-1.2deg); }
  95.45% { opacity: 0; transform: perspective(700px) translate3d(var(--mx-feature-exit-x), -1cqi, -12px) rotateY(-3deg); }
  100% { opacity: 0; transform: none; }
}

@keyframes mx-feature-collaboration-row-4 {
  0%, 22.73% { opacity: 0; transform: translate3d(0, 0.45rem, 0); }
  28.18%, 42.73% { opacity: 1; transform: translate3d(0, 0, 0); }
  65.45%, 71.75% { opacity: 1; transform: perspective(700px) translate3d(var(--mx-feature-stack-x), calc(var(--mx-feature-row-index) * -0.25cqi), calc(var(--mx-feature-row-index) * -4px)) rotateY(1.2deg); }
  95.45% { opacity: 0; transform: perspective(700px) translate3d(var(--mx-feature-exit-x), -1cqi, -12px) rotateY(3deg); }
  100% { opacity: 0; transform: none; }
}

@keyframes mx-feature-collaboration-row-5 {
  0%, 28.18% { opacity: 0; transform: translate3d(0, 0.45rem, 0); }
  33.64%, 42.73% { opacity: 1; transform: translate3d(0, 0, 0); }
  65.45%, 73.85% { opacity: 1; transform: perspective(700px) translate3d(var(--mx-feature-stack-x), calc(var(--mx-feature-row-index) * -0.25cqi), calc(var(--mx-feature-row-index) * -4px)) rotateY(-1.2deg); }
  95.45% { opacity: 0; transform: perspective(700px) translate3d(var(--mx-feature-exit-x), -1cqi, -12px) rotateY(-3deg); }
  100% { opacity: 0; transform: none; }
}

@keyframes mx-feature-collaboration-glass {
  0%, 42.73% {
    border: 1px solid var(--mx-ref-border);
    background: var(--mx-ref-surface);
    padding: clamp(0.42rem, 1.15cqi, 0.66rem);
    backdrop-filter: blur(0) saturate(100%);
    box-shadow: none;
  }
  65.45%, 95.45% {
    border: 1px solid rgb(255 255 255 / 0.58);
    background: rgb(255 255 255 / 0.3);
    padding: clamp(0.42rem, 1.15cqi, 0.66rem);
    backdrop-filter: blur(18px) saturate(145%);
    box-shadow: 0 1rem 2.5rem rgb(15 23 42 / 0.2);
  }
  100% {
    border: 1px solid var(--mx-ref-border);
    background: var(--mx-ref-surface);
    padding: clamp(0.42rem, 1.15cqi, 0.66rem);
    backdrop-filter: blur(0) saturate(100%);
    box-shadow: none;
  }
}

/* Portable: the phone, Slack planning thread, and MCP setup terminal share one five-second loop. */
.mx-screencast[data-scenario="feature-portable"] .mx-screencast-layer--3 {
  display: block;
}

.mx-screencast[data-scenario="feature-portable"] .mx-app-visual-catalog-surface {
  position: absolute;
  max-block-size: none;
  overflow: visible;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  opacity: 0;
  animation-duration: var(--mx-feature-duration);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

.mx-screencast[data-scenario="feature-portable"] .mx-app-visual-catalog-surface > .mx-ref-misc-card {
  inline-size: calc(100% / var(--mx-feature-leaf-scale));
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  transform: scale(var(--mx-feature-leaf-scale));
  transform-origin: top left;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-misc-card > .mx-ref-card-head {
  display: none;
}

.mx-screencast[data-scenario="feature-portable"] :where(.mx-ref-phone-visual, .mx-ref-slack-transform, .mx-ref-mcp-fractal) {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-phone-visual {
  min-height: var(--mx-portable-phone-height);
}

.mx-screencast[data-scenario="feature-portable"] :where(.mx-ref-slack-transform, .mx-ref-mcp-fractal) {
  min-height: var(--mx-portable-mark-height);
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-phone-hardware {
  inline-size: auto;
  block-size: var(--mx-portable-phone-height);
  max-inline-size: none;
  aspect-ratio: 9 / 18.6;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-slack-mark {
  inline-size: auto;
  block-size: var(--mx-portable-mark-height);
  max-inline-size: none;
  aspect-ratio: 1;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-mcp-logo {
  display: flex;
  inline-size: max-content;
  block-size: auto;
  max-inline-size: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  aspect-ratio: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.mx-screencast[data-scenario="feature-portable"] :is(.mx-ref-mcp-node-field, .mx-ref-fractal-node) {
  display: none;
}

.mx-screencast[data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-phone-message {
  --mx-feature-leaf-scale: 1;
  top: 19.4444%;
  left: 4%;
  width: 40%;
  block-size: var(--mx-portable-phone-height);
  animation-name: mx-feature-portable-phone;
}

.mx-screencast[data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-mcp-logo {
  --mx-feature-leaf-scale: 1;
  top: 21.875%;
  right: 4%;
  width: 40%;
  block-size: calc(var(--mx-portable-mark-height) + 2.25rem);
  animation-name: mx-feature-portable-mcp;
}

.mx-screencast[data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-slack-channel {
  --mx-feature-leaf-scale: 1;
  left: 30%;
  top: 25%;
  width: 40%;
  block-size: var(--mx-portable-mark-height);
  animation-name: mx-feature-portable-slack;
}

@keyframes mx-feature-portable-phone {
  0%, 39% { opacity: 1; }
  45%, 100% { opacity: 0; }
}

@keyframes mx-feature-portable-slack {
  0%, 39% { opacity: 0; }
  45%, 60.5% { opacity: 1; }
  66.5%, 100% { opacity: 0; }
}

@keyframes mx-feature-portable-mcp {
  0%, 60.5% { opacity: 0; }
  66.5%, 82% { opacity: 1; }
  88%, 100% { opacity: 0; }
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-message-bubble.is-user {
  animation: mx-feature-portable-phone-user var(--mx-feature-duration) linear infinite;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-message-bubble.is-agent {
  animation: mx-feature-portable-phone-agent var(--mx-feature-duration) linear infinite !important;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-message-thinking {
  animation: mx-feature-portable-phone-thinking var(--mx-feature-duration) linear infinite !important;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-message-thinking span {
  animation: mx-feature-portable-phone-dot 600ms ease-in-out infinite !important;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-phone-project-card {
  animation: mx-feature-portable-phone-project var(--mx-feature-duration) linear infinite;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-slack-mark {
  animation: mx-feature-portable-slack-mark var(--mx-feature-duration) ease-in-out infinite !important;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-slack-channel {
  color: #07111d;
  animation: mx-feature-portable-slack-channel var(--mx-feature-duration) ease-in-out infinite !important;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-mcp-logo {
  border: 0;
  background: transparent;
  box-shadow: none;
  animation: mx-feature-portable-mcp-logo var(--mx-feature-duration) ease-in-out infinite !important;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-mcp-logo img {
  inline-size: auto;
  block-size: var(--mx-portable-mark-height);
  flex: 0 0 auto;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-mcp-logo strong {
  display: block;
  inline-size: max-content;
  overflow: hidden;
  justify-self: center;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.15;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  animation: mx-feature-portable-mcp-text var(--mx-feature-duration) steps(3, end) infinite !important;
}

@keyframes mx-feature-portable-phone-user {
  0%, 2% { opacity: 0; transform: translate3d(0, 0.4rem, 0); }
  7%, 100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes mx-feature-portable-phone-thinking {
  0%, 10% { opacity: 0; transform: translate3d(0, 0.35rem, 0); }
  13%, 18% { opacity: 1; transform: translate3d(0, 0, 0); }
  21%, 100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

@keyframes mx-feature-portable-phone-dot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.16rem); }
}

@keyframes mx-feature-portable-phone-agent {
  0%, 18% { opacity: 0; transform: translate3d(0, 0.4rem, 0); }
  23%, 100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes mx-feature-portable-phone-project {
  0%, 25% { opacity: 0; transform: translate3d(0, 0.4rem, 0); }
  30%, 100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes mx-feature-portable-slack-mark {
  0%, 39% { opacity: 1; transform: rotate(0deg) scale(1); }
  52% { opacity: 1; transform: rotate(300deg) scale(1.15, 0.08); }
  58%, 100% { opacity: 0; transform: rotate(360deg) scale(1.35, 0.06); }
}

@keyframes mx-feature-portable-slack-channel {
  0%, 58% { opacity: 0; transform: translate3d(0, 0.5rem, 0) scale(0.94); }
  62%, 100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes mx-feature-portable-mcp-logo {
  0%, 60.5% { opacity: 0; transform: scale(0.84); }
  66.5%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes mx-feature-portable-mcp-text {
  0%, 66.5% { clip-path: inset(0 100% 0 0); }
  72%, 88% { clip-path: inset(0); }
  100% { clip-path: inset(0 100% 0 0); }
}

/* Portable redesign: preserve the working phone in the left column and use
 * the two existing intake surfaces as simultaneously active Slack and MCP
 * desktop context. The compact UI remains scene-only and decorative. */
.mx-screencast[data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-phone-message {
  top: 13%;
  left: 7%;
  width: 31%;
  block-size: var(--mx-portable-phone-height);
  opacity: 1;
  animation: none;
}

.mx-screencast[data-scenario="feature-portable"] :is(
  .mx-app-visual-catalog-surface--intake-slack-channel,
  .mx-app-visual-catalog-surface--intake-mcp-logo
) {
  --mx-feature-leaf-scale: 1;
  right: 6%;
  left: auto;
  width: 51%;
  block-size: 37%;
  opacity: 1;
  animation: none;
}

.mx-screencast[data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-slack-channel {
  top: 8%;
}

.mx-screencast[data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-mcp-logo {
  top: 55%;
}

.mx-screencast[data-scenario="feature-portable"] :is(.mx-ref-slack-transform, .mx-ref-mcp-fractal) {
  display: none;
}

.mx-screencast[data-scenario="feature-portable"] :is(.mx-ref-slack-thread, .mx-ref-mcp-terminal) {
  display: grid;
  box-sizing: border-box;
  inline-size: 100%;
  block-size: 100%;
  overflow: hidden;
  border: 1px solid rgb(79 98 127 / 0.3);
  border-radius: 0.75rem;
  background: #101b2b;
  color: #f4f7fb;
  box-shadow: 0 1rem 2rem rgb(10 23 42 / 0.12);
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-slack-thread {
  grid-template-rows: auto minmax(0, 1fr);
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-mcp-terminal {
  grid-template-rows: auto minmax(0, 1fr);
  background: #08111d;
  color: #dbe8f8;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-window-head {
  display: flex;
  min-inline-size: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid rgb(148 163 184 / 0.2);
  padding: 0.55rem 0.7rem;
  color: #b8c7db;
  font-size: clamp(0.52rem, 1.4cqi, 0.73rem);
  line-height: 1;
}

.mx-screencast[data-scenario="feature-portable"] :is(.mx-ref-portable-channel, .mx-ref-portable-terminal-label) {
  display: inline-flex;
  min-inline-size: 0;
  align-items: center;
  gap: 0.4rem;
}

.mx-screencast[data-scenario="feature-portable"] :is(.mx-ref-portable-channel, .mx-ref-portable-terminal-label) img {
  inline-size: 1.1rem;
  block-size: 1.1rem;
  object-fit: contain;
}

.mx-screencast[data-scenario="feature-portable"] :is(.mx-ref-portable-channel, .mx-ref-portable-terminal-label) strong {
  overflow: hidden;
  color: #f8fafc;
  font-size: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-window-head > small {
  flex: 0 0 auto;
  font-size: inherit;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-body {
  display: grid;
  align-content: start;
  gap: clamp(0.25rem, 0.7cqi, 0.42rem);
  padding: clamp(0.5rem, 1.2cqi, 0.72rem);
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-message {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.42rem;
  margin: 0;
  opacity: 0;
  transform: translate3d(0, 0.42rem, 0);
  animation: var(--mx-portable-thread-animation) var(--mx-feature-duration) linear infinite;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-message.is-one { --mx-portable-thread-animation: mx-feature-portable-thread-one; }
.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-message.is-two { --mx-portable-thread-animation: mx-feature-portable-thread-two; }
.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-message.is-three { --mx-portable-thread-animation: mx-feature-portable-thread-three; }

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-avatar {
  display: grid;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  place-items: center;
  border-radius: 0.38rem;
  color: #07111d;
  font-size: 0.62rem;
  font-weight: 1000;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-avatar.is-gold { background: rgb(var(--mx-gold)); }
.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-avatar.is-teal { background: rgb(var(--mx-teal)); }
.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-avatar.is-blue { background: #94b8ff; }

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-message > span:last-child {
  display: grid;
  min-inline-size: 0;
  gap: 0.08rem;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-message b {
  color: #f8fafc;
  font-size: clamp(0.54rem, 1.35cqi, 0.69rem);
  line-height: 1.1;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-message small {
  color: #bac8da;
  font-size: clamp(0.5rem, 1.25cqi, 0.65rem);
  line-height: 1.25;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-message em {
  color: #78b6ff;
  font-style: normal;
  font-weight: 900;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-thread-result,
.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-result {
  margin: clamp(0.1rem, 0.55cqi, 0.35rem) 0 0;
  color: #7be0c0;
  font-size: clamp(0.5rem, 1.35cqi, 0.66rem);
  font-weight: 900;
  line-height: 1.2;
  opacity: 0;
  transform: translate3d(0, 0.3rem, 0);
  animation: mx-feature-portable-result var(--mx-feature-duration) linear infinite;
}

.mx-screencast[data-scenario="feature-portable"] :is(.mx-ref-portable-thread-result, .mx-ref-portable-terminal-result) > span {
  display: inline-grid;
  inline-size: 1rem;
  place-items: center;
  border-radius: 999px;
  background: rgb(121 224 191 / 0.18);
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-dots {
  display: inline-flex;
  gap: 0.24rem;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-dots i {
  inline-size: 0.42rem;
  block-size: 0.42rem;
  border-radius: 50%;
  background: #ffbd4a;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-dots i:first-child { background: #f27272; }
.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-dots i:last-child { background: #6cddb2; }

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-body {
  display: grid;
  align-content: start;
  gap: clamp(0.34rem, 1cqi, 0.56rem);
  padding: clamp(0.58rem, 1.45cqi, 0.82rem);
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-command {
  width: 0;
  max-width: 100%;
  overflow: hidden;
  margin: 0;
  color: #dce8f8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.48rem, 1.25cqi, 0.63rem);
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  animation: var(--mx-portable-terminal-animation) var(--mx-feature-duration) steps(42, end) infinite;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-command span {
  color: #7be0c0;
}

.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-command.is-one { --mx-portable-terminal-animation: mx-feature-portable-terminal-one; }
.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-command.is-two { --mx-portable-terminal-animation: mx-feature-portable-terminal-two; }
.mx-screencast[data-scenario="feature-portable"] .mx-ref-portable-terminal-command.is-three { --mx-portable-terminal-animation: mx-feature-portable-terminal-three; }

@keyframes mx-feature-portable-thread-one {
  0%, 4% { opacity: 0; transform: translate3d(0, 0.42rem, 0); }
  11%, 91% { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

@keyframes mx-feature-portable-thread-two {
  0%, 17% { opacity: 0; transform: translate3d(0, 0.42rem, 0); }
  24%, 91% { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

@keyframes mx-feature-portable-thread-three {
  0%, 34% { opacity: 0; transform: translate3d(0, 0.42rem, 0); }
  42%, 91% { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

@keyframes mx-feature-portable-result {
  0%, 65% { opacity: 0; transform: translate3d(0, 0.3rem, 0); }
  73%, 91% { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

@keyframes mx-feature-portable-terminal-one {
  0%, 5% { width: 0; opacity: 0; }
  23%, 91% { width: 100%; opacity: 1; }
  100% { width: 0; opacity: 0; }
}

@keyframes mx-feature-portable-terminal-two {
  0%, 26% { width: 0; opacity: 0; }
  45%, 91% { width: 100%; opacity: 1; }
  100% { width: 0; opacity: 0; }
}

@keyframes mx-feature-portable-terminal-three {
  0%, 49% { width: 0; opacity: 0; }
  68%, 91% { width: 100%; opacity: 1; }
  100% { width: 0; opacity: 0; }
}

/* Feedback: four approved Composers resolve into the approved mail tile. */
.mx-screencast[data-scenario="feature-feedback"] .mx-screencast-layer--1 {
  padding: 0;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-projection {
  position: absolute;
  inset: 0;
  width: 100%;
  block-size: 100%;
  overflow: visible;
  transform: none;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item {
  --mx-feedback-composer-scale: 0.7;
  --mx-feedback-collapse-x: 0%;
  --mx-feedback-collapse-y: 0%;
  position: absolute;
  z-index: calc(var(--mx-feature-index) + 1);
  inline-size: 68%;
  block-size: 32%;
  animation-name: mx-feature-feedback-item;
  animation-duration: var(--mx-feature-duration);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  transform-origin: center;
  will-change: opacity, transform;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="1"] {
  --mx-feedback-collapse-x: 16.176%;
  --mx-feedback-collapse-y: 90.625%;
  top: 5%;
  left: 5%;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="2"] {
  --mx-feedback-collapse-x: 5.882%;
  --mx-feedback-collapse-y: 34.375%;
  top: 23%;
  left: 12%;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="3"] {
  --mx-feedback-collapse-x: -4.412%;
  --mx-feedback-collapse-y: -21.875%;
  top: 41%;
  left: 19%;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="4"] {
  --mx-feedback-collapse-x: -14.706%;
  --mx-feedback-collapse-y: -78.125%;
  top: 59%;
  left: 26%;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-composer {
  position: relative;
  z-index: 1;
  inline-size: 100%;
  animation-duration: var(--mx-feature-duration);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  transform-origin: center;
  will-change: opacity, transform;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="1"] .mx-feature-feedback-composer {
  animation-name: mx-feature-feedback-composer-1;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="2"] .mx-feature-feedback-composer {
  animation-name: mx-feature-feedback-composer-2;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="3"] .mx-feature-feedback-composer {
  animation-name: mx-feature-feedback-composer-3;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="4"] .mx-feature-feedback-composer {
  animation-name: mx-feature-feedback-composer-4;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-composer > .mx-ref-composer {
  inline-size: calc(100% / var(--mx-feedback-composer-scale));
  min-block-size: 16rem;
  transform: scale(var(--mx-feedback-composer-scale));
  transform-origin: top left;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-composer .mx-ref-chat-message.is-user .mx-ref-chat-text {
  font-size: 1.5em;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-composer .mx-ref-chat-message.is-user .mx-ref-chat-text > span {
  display: inline-block;
  inline-size: max-content;
  max-inline-size: 100%;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  animation-duration: var(--mx-feature-duration);
  animation-timing-function: steps(var(--mx-feedback-message-chars), end);
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="1"] .mx-ref-chat-text > span {
  animation-name: mx-feature-feedback-type-1;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="2"] .mx-ref-chat-text > span {
  animation-name: mx-feature-feedback-type-2;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="3"] .mx-ref-chat-text > span {
  animation-name: mx-feature-feedback-type-3;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-item[data-feedback-index="4"] .mx-ref-chat-text > span {
  animation-name: mx-feature-feedback-type-4;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-mail {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  display: grid;
  inline-size: auto;
  block-size: 20%;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0b1018;
  box-shadow: none;
  animation-name: mx-feature-feedback-mail;
  animation-duration: var(--mx-feature-duration);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  will-change: opacity, transform;
}

.mx-screencast[data-scenario="feature-feedback"] .mx-feature-feedback-mail .mx-ref-svg {
  display: block;
  inline-size: auto;
  block-size: 100%;
}

@keyframes mx-feature-feedback-type-1 {
  0% { clip-path: inset(0 100% 0 0); }
  5%, 100% { clip-path: inset(0); }
}

@keyframes mx-feature-feedback-type-2 {
  0%, 18% { clip-path: inset(0 100% 0 0); }
  23%, 100% { clip-path: inset(0); }
}

@keyframes mx-feature-feedback-type-3 {
  0%, 36% { clip-path: inset(0 100% 0 0); }
  41%, 100% { clip-path: inset(0); }
}

@keyframes mx-feature-feedback-type-4 {
  0%, 54% { clip-path: inset(0 100% 0 0); }
  59%, 100% { clip-path: inset(0); }
}

@keyframes mx-feature-feedback-item {
  0%, 72% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  82.9% { opacity: 1; transform: translate3d(var(--mx-feedback-collapse-x), var(--mx-feedback-collapse-y), 0) scale(0.18); }
  83%, 100% { opacity: 0; transform: translate3d(var(--mx-feedback-collapse-x), var(--mx-feedback-collapse-y), 0) scale(0.18); }
}

@keyframes mx-feature-feedback-composer-1 {
  0% { opacity: 0; transform: translate3d(0, 1rem, 0) scale(0.94); }
  5%, 72%, 83%, 100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes mx-feature-feedback-composer-2 {
  0%, 18% { opacity: 0; transform: translate3d(0, 1rem, 0) scale(0.94); }
  23%, 72%, 83%, 100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes mx-feature-feedback-composer-3 {
  0%, 36% { opacity: 0; transform: translate3d(0, 1rem, 0) scale(0.94); }
  41%, 72%, 83%, 100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes mx-feature-feedback-composer-4 {
  0%, 54% { opacity: 0; transform: translate3d(0, 1rem, 0) scale(0.94); }
  59%, 72%, 83%, 100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes mx-feature-feedback-mail {
  0%, 82.9% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(0.65); }
  83%, 90% { opacity: 0.7; transform: translate3d(-50%, -50%, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(60cqi, -50%, 0) scale(1); }
}

/* Memory: approved document leaves collapse into an approved Calendar. */
.mx-screencast[data-scenario="feature-memory"] .mx-screencast-layer--3 {
  display: block;
}

.mx-screencast[data-scenario="feature-memory"] .mx-screencast-layer--3::before {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  inline-size: 8rem;
  block-size: 8rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgb(var(--mx-gold) / 0.42) 0 7%, rgb(var(--mx-gold) / 0.15) 22%, rgb(var(--mx-gold) / 0) 68%);
  content: "";
  opacity: 0;
  animation-name: mx-feature-memory-gravity;
  animation-duration: var(--mx-feature-duration);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  pointer-events: none;
  will-change: opacity, transform;
}

.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--document-overlay,
.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--document-voice,
.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--document-sources,
.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--document-deliverables {
  --mx-memory-document-delay: 0s;
  --mx-memory-document-scale: 0.6;
  --mx-memory-shell-padding: clamp(0.55rem, 1cqi, 0.8rem);
  position: absolute;
  box-sizing: border-box;
  inline-size: 96.6667%;
  block-size: auto;
  max-block-size: none;
  overflow: visible;
  padding: var(--mx-memory-shell-padding);
  border: 1px solid rgb(255 255 255 / 0.58);
  background: rgb(255 255 255 / 0.3);
  backdrop-filter: blur(18px) saturate(145%);
  box-shadow: 0 1rem 2.5rem rgb(15 23 42 / 0.2);
  animation-name: mx-feature-memory-document, mx-feature-memory-shell-enter;
  animation-duration: var(--mx-feature-duration), .45s;
  animation-delay: 0s, var(--mx-memory-document-delay);
  animation-timing-function: linear, ease-out;
  animation-iteration-count: infinite, 1;
  animation-fill-mode: both, both;
  transform-origin: top left;
  will-change: opacity, transform;
}

.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--document-overlay {
  --mx-memory-document-delay: 0s;
  --mx-memory-gravity-x: 20.25rem;
  --mx-memory-gravity-y: 16.2rem;
  z-index: 4;
  top: 5%;
  left: 5%;
}

.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--document-voice {
  --mx-memory-document-delay: .45s;
  --mx-memory-gravity-x: 17.1rem;
  --mx-memory-gravity-y: 14.76rem;
  z-index: 5;
  top: 9%;
  left: 12%;
}

.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--document-sources {
  --mx-memory-document-delay: .9s;
  --mx-memory-gravity-x: 13.95rem;
  --mx-memory-gravity-y: 13.32rem;
  z-index: 6;
  top: 13%;
  left: 19%;
}

.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--document-deliverables {
  --mx-memory-document-delay: 1.35s;
  --mx-memory-gravity-x: 10.8rem;
  --mx-memory-gravity-y: 11.88rem;
  z-index: 7;
  top: 17%;
  left: 26%;
}

.mx-screencast[data-scenario="feature-memory"] :is(
  .mx-app-visual-catalog-surface--document-overlay,
  .mx-app-visual-catalog-surface--document-voice,
  .mx-app-visual-catalog-surface--document-sources,
  .mx-app-visual-catalog-surface--document-deliverables
) > .mx-ref-document-panel {
  inline-size: 100%;
  background: rgb(255 255 255);
  backdrop-filter: none;
  animation-name: mx-feature-memory-document-enter;
  animation-duration: var(--mx-feature-duration);
  animation-delay: var(--mx-memory-document-delay);
  animation-timing-function: linear;
  animation-iteration-count: 1;
  animation-fill-mode: both;
  transform-origin: top left;
  will-change: opacity, transform;
}

.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--modal-calendar {
  --mx-memory-shell-padding: clamp(0.55rem, 1cqi, 0.8rem);
  position: absolute;
  z-index: 3;
  top: 9%;
  left: 3%;
  width: 94%;
  block-size: 76%;
  max-block-size: none;
  overflow: hidden;
  padding: var(--mx-memory-shell-padding);
  border: 1px solid rgb(255 255 255 / 0.58);
  background: rgb(255 255 255 / 0.3);
  backdrop-filter: blur(18px) saturate(145%);
  box-shadow: 0 1rem 2.5rem rgb(15 23 42 / 0.2);
  scrollbar-width: none;
  opacity: 0;
  animation-name: mx-feature-memory-calendar;
  animation-duration: var(--mx-feature-duration);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  transform-origin: center;
  will-change: opacity, transform;
}

.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--modal-calendar > .mx-ref-calendar-modal {
  inline-size: calc(100% / 0.76);
  block-size: calc(100% / 0.76);
  background: rgb(255 255 255);
  backdrop-filter: none;
  transform: scale(0.76);
  transform-origin: top left;
}

.mx-screencast[data-scenario="feature-memory"] :where(.mx-ref-calendar-modal, .mx-ref-calendar-shell, .mx-ref-calendar-board, .mx-ref-calendar-grid) {
  overflow: hidden;
  scrollbar-width: none;
}

/* The feature canvas scales a full desktop calendar into a compact preview.
 * Its generic 42rem grid minimum pushed the final day columns beyond the
 * calendar board, where they were clipped. Keep the native shell geometry,
 * but let the calendar columns resolve to the available board width here. */
.mx-screencast[data-scenario="feature-memory"] :where(.mx-ref-calendar-weekdays, .mx-ref-calendar-grid) {
  min-inline-size: 0;
  inline-size: 100%;
}

.mx-screencast[data-scenario="feature-memory"] .mx-app-visual-catalog-surface--modal-calendar::-webkit-scrollbar,
.mx-screencast[data-scenario="feature-memory"] :where(.mx-ref-calendar-modal, .mx-ref-calendar-shell, .mx-ref-calendar-board, .mx-ref-calendar-grid)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.mx-screencast[data-scenario="feature-memory"] .mx-ref-cal-event.is-pop {
  animation-name: mx-feature-memory-event-pop !important;
  animation-duration: var(--mx-feature-duration) !important;
  animation-delay: var(--mx-cal-delay, 0ms) !important;
  animation-timing-function: linear !important;
  animation-iteration-count: infinite !important;
  animation-fill-mode: both !important;
  will-change: opacity, transform;
}

.mx-screencast[data-scenario="feature-memory"] .mx-ref-cal-event.is-span {
  animation-name: mx-feature-memory-event-span !important;
  animation-duration: var(--mx-feature-duration) !important;
  animation-delay: var(--mx-cal-delay, 0ms) !important;
  animation-timing-function: linear !important;
  animation-iteration-count: infinite !important;
  animation-fill-mode: both !important;
  will-change: opacity, transform;
}

@keyframes mx-feature-memory-document {
  0%, 29.09% { opacity: 1; transform: translate3d(0, 0, 0) scale(var(--mx-memory-document-scale)); }
  52.73% { opacity: 0; transform: translate3d(var(--mx-memory-gravity-x), var(--mx-memory-gravity-y), 0) scale(0.048); }
  67.27%, 100% { opacity: 0; transform: translate3d(var(--mx-memory-gravity-x), var(--mx-memory-gravity-y), 0) scale(0.048); }
}

@keyframes mx-feature-memory-document-enter {
  0% { opacity: 0; transform: translate3d(0, 1rem, 0); }
  4.09%, 100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes mx-feature-memory-shell-enter {
  0% {
    border-color: transparent;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }
  100% {
    border-color: rgb(255 255 255 / 0.58);
    background: rgb(255 255 255 / 0.3);
    backdrop-filter: blur(18px) saturate(145%);
    box-shadow: 0 1rem 2.5rem rgb(15 23 42 / 0.2);
  }
}

@keyframes mx-feature-memory-gravity {
  0%, 29.09% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  52.73% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  67.27%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

@keyframes mx-feature-memory-calendar {
  0%, 52.73% { opacity: 0; transform: scale(0.08); }
  67.27%, 95.45%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes mx-feature-memory-event-pop {
  0%, 67.27% { opacity: 0; transform: scale(0.72); }
  73.64%, 95.45% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes mx-feature-memory-event-span {
  0%, 67.27% { opacity: 0; transform: scaleX(0); }
  73.64%, 95.45% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 1; transform: scaleX(1); }
}

.mx-screencast[data-scenario^="feature-"][data-screencast-restarting][data-screencast] .mx-feature-native-plane :where(*, *::before, *::after) {
  animation: none !important;
}

/* Runtime playback owns every descendant feature animation. Keep this after
 * scenario shorthands so static-library !important overrides still pause. */
.mx-screencast[data-scenario^="feature-"]:not([data-playback-state="playing"]) :where(*, *::before, *::after) {
  animation-play-state: paused !important;
}

.mx-screencast[data-scenario="feature-portable"]:not([data-playback-state="playing"]) :is(
  .mx-ref-message-bubble.is-agent,
  .mx-ref-message-thinking,
  .mx-ref-message-thinking span,
  .mx-ref-slack-mark,
  .mx-ref-slack-channel,
  .mx-ref-mcp-logo,
  .mx-ref-mcp-logo strong
) {
  animation-play-state: paused !important;
}

/* Runtime reduced motion resolves each feature scene to its filled end frame. */
.mx-screencast[data-reduced-motion="true"][data-scenario="feature-collaboration"] :where(*, *::before, *::after),
.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] :where(*, *::before, *::after),
.mx-screencast[data-reduced-motion="true"][data-scenario="feature-feedback"] :where(*, *::before, *::after),
.mx-screencast[data-reduced-motion="true"][data-scenario="feature-memory"] :where(*, *::before, *::after) {
  animation-delay: 0ms !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  animation-fill-mode: both !important;
  animation-play-state: running !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-collaboration"] .mx-ref-user-list article {
  opacity: 1;
  transform: none;
  backdrop-filter: none;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] {
  --mx-portable-phone-height: 22rem;
  --mx-portable-mark-height: 10rem;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-slack-channel {
  top: 36.111%;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-mcp-logo {
  top: 4%;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-app-visual-catalog-surface {
  opacity: 1;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] :is(.mx-ref-message-bubble.is-user, .mx-ref-message-bubble.is-agent, .mx-ref-message-thinking span, .mx-ref-phone-project-card, .mx-ref-slack-channel, .mx-ref-mcp-logo) {
  opacity: 1;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-ref-mcp-logo strong {
  inline-size: max-content;
  overflow: visible;
  clip-path: none;
  opacity: 1;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] :is(.mx-ref-message-bubble.is-user, .mx-ref-message-bubble.is-agent, .mx-ref-slack-channel, .mx-ref-mcp-logo) {
  transform: none;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-ref-phone-project-card {
  transform-origin: top left;
  transform: translate3d(-0.4rem, 2.8rem, 0) scale(0.7);
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-ref-message-thinking {
  opacity: 0;
  transform: none;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-ref-slack-mark {
  opacity: 1;
  transform: none;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-ref-slack-channel {
  opacity: 0;
  transform: none;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-feedback"] .mx-feature-feedback-item {
  opacity: 1;
  transform: none;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-feedback"] .mx-feature-feedback-composer {
  opacity: 1;
  transform: none;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-feedback"] .mx-feature-feedback-composer .mx-ref-chat-message.is-user .mx-ref-chat-text > span {
  clip-path: none !important;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-feedback"] .mx-feature-feedback-mail {
  display: none;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-memory"] .mx-screencast-layer--3::before,
.mx-screencast[data-reduced-motion="true"][data-scenario="feature-memory"] :is(
  .mx-app-visual-catalog-surface--document-overlay,
  .mx-app-visual-catalog-surface--document-voice,
  .mx-app-visual-catalog-surface--document-sources,
  .mx-app-visual-catalog-surface--document-deliverables
) {
  display: none;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-memory"] .mx-app-visual-catalog-surface--modal-calendar {
  opacity: 1;
  transform: none;
  animation: none !important;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-memory"] .mx-ref-cal-event {
  opacity: 1;
  transform: none;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .mx-screencast[data-scenario="feature-collaboration"][data-screencast] :where(*, *::before, *::after),
  .mx-screencast[data-scenario="feature-portable"][data-screencast] :where(*, *::before, *::after),
  .mx-screencast[data-scenario="feature-feedback"][data-screencast] :where(*, *::before, *::after),
  .mx-screencast[data-scenario="feature-memory"][data-screencast] :where(*, *::before, *::after) {
    animation-delay: 0ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: both !important;
    animation-play-state: running !important;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] {
    --mx-portable-phone-height: 22rem;
    --mx-portable-mark-height: 10rem;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-app-visual-catalog-surface--intake-slack-channel {
    top: 36.111%;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-app-visual-catalog-surface--intake-mcp-logo {
    top: 4%;
  }

  .mx-screencast[data-scenario="feature-collaboration"][data-screencast] .mx-ref-user-list article {
    opacity: 1;
    transform: none;
    backdrop-filter: none;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-app-visual-catalog-surface {
    opacity: 1;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] :is(.mx-ref-message-bubble.is-user, .mx-ref-message-bubble.is-agent, .mx-ref-message-thinking span, .mx-ref-phone-project-card, .mx-ref-slack-channel, .mx-ref-mcp-logo) {
    opacity: 1;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-ref-mcp-logo strong {
    inline-size: max-content;
    overflow: visible;
    clip-path: none;
    opacity: 1;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] :is(.mx-ref-message-bubble.is-user, .mx-ref-message-bubble.is-agent, .mx-ref-slack-channel, .mx-ref-mcp-logo) {
    transform: none;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-ref-phone-project-card {
    transform-origin: top left;
    transform: translate3d(-0.4rem, 2.8rem, 0) scale(0.7);
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-ref-message-thinking {
    opacity: 0;
    transform: none;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-ref-slack-mark {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-ref-slack-channel {
    opacity: 0;
    transform: none;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-feedback"][data-screencast] .mx-feature-feedback-item {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-feedback"][data-screencast] .mx-feature-feedback-composer {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-feedback"][data-screencast] .mx-feature-feedback-composer .mx-ref-chat-message.is-user .mx-ref-chat-text > span {
    clip-path: none !important;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-feedback"][data-screencast] .mx-feature-feedback-mail {
    display: none;
  }

  .mx-screencast[data-scenario="feature-memory"][data-screencast] .mx-screencast-layer--3::before,
  .mx-screencast[data-scenario="feature-memory"][data-screencast] :is(
    .mx-app-visual-catalog-surface--document-overlay,
    .mx-app-visual-catalog-surface--document-voice,
    .mx-app-visual-catalog-surface--document-sources,
    .mx-app-visual-catalog-surface--document-deliverables
  ) {
    display: none;
  }

  .mx-screencast[data-scenario="feature-memory"][data-screencast] .mx-app-visual-catalog-surface--modal-calendar {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .mx-screencast[data-scenario="feature-memory"][data-screencast] .mx-ref-cal-event {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

/* Fixed feature planes keep native desktop app geometry even when the browser
 * viewport crosses the canonical app surface's responsive breakpoint. */
.mx-screencast[data-canvas="feature"][data-scenario="feature-memory"] .mx-feature-native-plane .mx-ref-calendar-modal {
  max-inline-size: none;
}

@media (max-width: 620px) {
  .mx-screencast[data-canvas="feature"][data-scenario="feature-collaboration"] .mx-feature-native-plane .mx-ref-modal-head {
    flex-direction: row;
  }

  .mx-screencast[data-canvas="feature"][data-scenario="feature-collaboration"] .mx-feature-native-plane .mx-ref-user-list article {
    align-items: center;
    flex-wrap: nowrap;
  }

  .mx-screencast[data-canvas="feature"][data-scenario="feature-collaboration"] .mx-feature-native-plane .mx-ref-user-list .mx-ref-pill {
    margin-left: 0;
  }

  .mx-screencast[data-canvas="feature"][data-scenario="feature-memory"] .mx-feature-native-plane .mx-ref-calendar-shell {
    grid-template-columns: 13rem minmax(0, 1fr);
  }

  .mx-screencast[data-canvas="feature"][data-scenario="feature-memory"] .mx-feature-native-plane .mx-ref-calendar-shell aside {
    border-right: 1px solid rgb(var(--mx-line));
    border-bottom: 0;
  }
}

/* Resolve the Portable scene to a complete, readable frame when motion is
 * reduced. These rules follow the legacy scene defaults so the two-column
 * composition remains intact in either reduced-motion path. */
.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] :is(
  .mx-app-visual-catalog-surface--intake-slack-channel,
  .mx-app-visual-catalog-surface--intake-mcp-logo
) {
  right: 6%;
  left: auto;
  width: 51%;
  block-size: 37%;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-slack-channel {
  top: 8%;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] .mx-app-visual-catalog-surface--intake-mcp-logo {
  top: 55%;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] :is(
  .mx-ref-slack-thread,
  .mx-ref-mcp-terminal
) {
  display: grid;
}

.mx-screencast[data-reduced-motion="true"][data-scenario="feature-portable"] :is(
  .mx-ref-portable-thread-message,
  .mx-ref-portable-thread-result,
  .mx-ref-portable-terminal-command,
  .mx-ref-portable-terminal-result
) {
  width: 100%;
  opacity: 1;
  transform: none;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .mx-screencast[data-scenario="feature-portable"][data-screencast] :is(
    .mx-app-visual-catalog-surface--intake-slack-channel,
    .mx-app-visual-catalog-surface--intake-mcp-logo
  ) {
    right: 6%;
    left: auto;
    width: 51%;
    block-size: 37%;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-app-visual-catalog-surface--intake-slack-channel {
    top: 8%;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] .mx-app-visual-catalog-surface--intake-mcp-logo {
    top: 55%;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] :is(
    .mx-ref-slack-thread,
    .mx-ref-mcp-terminal
  ) {
    display: grid;
  }

  .mx-screencast[data-scenario="feature-portable"][data-screencast] :is(
    .mx-ref-portable-thread-message,
    .mx-ref-portable-thread-result,
    .mx-ref-portable-terminal-command,
    .mx-ref-portable-terminal-result
  ) {
    width: 100%;
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}
