/* Fixed-light refinements shared by the selected app catalog and screencasts. */
.mx-app-visuals-reference,
.mx-screencast-workbench,
.mx-screencast.mx-ref-stack {
  color-scheme: light;
  --mx-app-font: "Hanken Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  --mx-app-background: #f4f6f8;
  --mx-app-surface: #fff;
  --mx-app-surface-muted: #f8fafc;
  --mx-app-foreground: #172033;
  --mx-app-text: #172033;
  --mx-app-muted: #64748b;
  --mx-app-accent: #a56b0a;
  --mx-app-accent-soft: #fff7df;
  --mx-app-border: #dce2e9;
  --mx-app-shadow: 0 1rem 3rem rgb(15 23 42 / 0.14);
  --mx-app-radius: 0.75rem;
}

.mx-app-visuals-reference .mx-ref-chat-message.is-user {
  background: var(--mx-app-surface-muted);
  color: var(--mx-app-text);
}

.mx-app-visuals-reference [data-screencast-target="composer.input"] {
  color: var(--mx-app-text);
  caret-color: var(--mx-app-text);
}

.mx-app-visuals-reference :where(.mx-ref-chat-response.is-visible, .mx-ref-chat-response.is-revealed, [data-screencast-target="composer.response"][data-screencast-state="visible"]) {
  opacity: 1;
  transform: translateY(0);
}

.mx-app-visuals-reference :where(.mx-ref-chat-response.is-hidden, [data-screencast-target="composer.response"][data-screencast-state="hidden"]) {
  opacity: 0;
  transform: translateY(0.35rem);
}

.mx-app-visuals-reference :where(.mx-ref-workspace, .mx-ref-composer, .mx-ref-rendered-web, .mx-ref-modal, .mx-ref-document-panel, .mx-ref-card) {
  background-color: var(--mx-app-surface);
  color: var(--mx-app-foreground);
}

.mx-ref-chat-thinking {
  white-space: nowrap;
}

.mx-ref-chat-thinking-dot {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgb(var(--mx-gold));
  animation: mx-pulse 1s infinite;
}

.mx-ref-chat-thinking .mx-ref-chat-thinking-label {
  width: auto;
  height: auto;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 0;
  background: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: none;
}

.mx-ref-stack .mx-ref-chat-thinking-dot {
  background: rgb(var(--mx-gold));
  opacity: 0.75;
}

.mx-ref-pinned-composer-shell {
  width: min(100%, 350px);
}

.mx-ref-pinned-composer {
  position: relative;
  display: block;
  width: 100%;
  max-width: 350px;
  min-height: 3.75rem;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgb(var(--mx-gold) / 0.68);
  border-radius: 0.5rem;
  background: #f8fafc;
  color: #17243a;
  padding: 0.72rem 0.85rem;
  box-shadow: 0 0.8rem 1.5rem rgb(15 23 42 / 0.08);
  color-scheme: light;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.mx-ref-pinned-composer-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
}

.mx-ref-pinned-composer-copy strong {
  color: #17243a;
  font-family: var(--mx-font-accent);
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
}

.mx-ref-pinned-composer-reasoning {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  color: #5c6d83;
  font-size: clamp(0.62rem, 1.15vw, 0.75rem);
  line-height: 1.25;
  white-space: nowrap;
}

.mx-ref-pinned-composer-reasoning b {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mx-ref-pinned-composer-reasoning i {
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgb(var(--mx-gold));
}

.mx-ref-pinned-composer.is-animating {
  animation: mx-pinned-composer-accent-pulse 1.8s ease-in-out infinite;
}

.mx-ref-pinned-composer.is-animating .mx-ref-pinned-composer-reasoning i {
  animation: mx-pinned-composer-dot-pulse 1s ease-in-out infinite;
}

.mx-ref-pinned-composer-expanded {
  width: min(calc(100vw - 2rem), 38rem);
  margin-top: 0.65rem;
}

.mx-ref-pinned-composer-expanded[hidden] {
  display: none;
}

.mx-ref-pinned-composer-expanded.is-reference-expanded {
  display: block;
}

@keyframes mx-pinned-composer-accent-pulse {
  0%, 100% { box-shadow: 0 0.8rem 1.5rem rgb(15 23 42 / 0.08), 0 0 0 0 rgb(var(--mx-gold) / 0); }
  50% { box-shadow: 0 0.8rem 1.5rem rgb(15 23 42 / 0.08), 0 0 0 0.25rem rgb(var(--mx-gold) / 0.12); }
}

@keyframes mx-pinned-composer-dot-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Approved app-visual fidelity layer, isolated from the frozen marketing theme. */
.mx-ref-stack {
  --mx-ref-radius: 0.625rem;
  --mx-ref-foreground: #0f172a;
  --mx-ref-muted: #64748b;
  --mx-ref-surface: #fff;
  --mx-ref-panel: #f1f5f9;
  --mx-ref-border: #e2e8f0;
  --mx-ref-input: #e2e8f0;
  --mx-ref-ring: #94a3b8;
  --mx-ref-primary: #1e293b;
  --mx-ref-primary-foreground: #f8fafc;
  --mx-ref-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
  --mx-ref-shadow-hover: 0 8px 18px rgb(15 23 42 / 0.07);
  /* Legacy reference aliases used by the original component rules. */
  --mx-ref-app-foreground: var(--mx-ref-foreground);
  --mx-ref-app-muted: var(--mx-ref-muted);
  --mx-ref-app-soft: var(--mx-ref-muted);
  --mx-ref-app-border: var(--mx-ref-border);
  --mx-ref-app-border-quiet: color-mix(in oklch, var(--mx-ref-border) 70%, transparent);
  --mx-ref-app-panel: var(--mx-ref-panel);
  --mx-ref-app-surface: var(--mx-ref-surface);
  --mx-ref-app-shadow: var(--mx-ref-shadow);
  --mx-ref-app-shadow-tight: var(--mx-ref-shadow);
  container-type: inline-size;
}

.mx-ref-stack :where(
  .mx-ref-composer,
  .mx-ref-card,
  .mx-ref-context-tile,
  .mx-ref-document-panel,
  .mx-ref-workspace,
  .mx-ref-app-frame,
  .mx-ref-modal,
  .mx-ref-review-card,
  .mx-ref-content-group,
  .mx-ref-email-source,
  .mx-ref-email-destination,
  .mx-ref-design-grid article,
  .mx-ref-rendered-web > div,
  .mx-ref-rendered-slide > div,
  .mx-ref-rendered-newsletter > div
) {
  border: 1px solid var(--mx-ref-border);
  border-radius: var(--mx-ref-radius);
  background: var(--mx-ref-surface);
  color: var(--mx-ref-foreground);
  box-shadow: var(--mx-ref-shadow);
}

.mx-ref-stack :where(
  .mx-ref-composer,
  .mx-ref-card,
  .mx-ref-context-tile,
  .mx-ref-document-panel,
  .mx-ref-workspace,
  .mx-ref-app-frame,
  .mx-ref-modal,
  .mx-ref-review-card,
  .mx-ref-content-group
) {
  color-scheme: light;
}

.mx-ref-stack :where(
  .mx-ref-composer,
  .mx-ref-card,
  .mx-ref-context-tile,
  .mx-ref-document-panel,
  .mx-ref-workspace,
  .mx-ref-app-frame,
  .mx-ref-modal,
  .mx-ref-review-card,
  .mx-ref-content-group
) :where(p, small, li, td) {
  color: var(--mx-ref-muted);
  font-family: var(--mx-app-font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5rem;
}

.mx-ref-stack :where(
  .mx-ref-card h3,
  .mx-ref-context-tile h4,
  .mx-ref-document-panel h5,
  .mx-ref-review-body h3,
  .mx-ref-workbench-list article strong,
  .mx-ref-user-list article strong,
  .mx-ref-content-group strong
) {
  color: var(--mx-ref-foreground);
  font-family: var(--mx-app-font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.mx-ref-stack :where(.mx-ref-workspace-title h3, .mx-ref-workspace-head h3) {
  color: var(--mx-ref-foreground);
  font-family: var(--mx-app-font-sans);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.18;
}

.mx-ref-stack .mx-ref-workspace-title h3,
.mx-ref-stack .mx-ref-workspace-head h3,
.mx-ref-stack .mx-ref-modal-head h3,
.mx-ref-stack .mx-ref-card h3,
.mx-ref-stack .mx-ref-context-tile h4,
.mx-ref-stack .mx-ref-review-body h3 {
  color: var(--mx-ref-foreground);
}

.mx-ref-stack :where(.mx-ref-modal-head h3, .mx-ref-document-panel > h4) {
  color: var(--mx-ref-foreground);
  font-family: var(--mx-app-font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.mx-ref-stack .mx-ref-document-panel > h4,
.mx-ref-stack .mx-ref-document-panel h5 {
  color: var(--mx-ref-foreground);
}

.mx-ref-stack :where(
  .mx-ref-tabs,
  .mx-ref-document-nav,
  .mx-ref-calendar-shell aside,
  .mx-ref-calendar-board,
  .mx-ref-review-actions,
  .mx-ref-user-list article,
  .mx-ref-design-grid article
) {
  border-color: var(--mx-ref-border);
  background: var(--mx-ref-panel);
}

.mx-ref-stack :where(.mx-ref-tabs, .mx-ref-document-nav, .mx-ref-user-list article, .mx-ref-design-grid article, .mx-ref-review-card) {
  border-width: 1px;
}

.mx-ref-stack :where(.mx-ref-tabs button, .mx-ref-document-nav button, .mx-ref-modal-head button, .mx-ref-action-row button) {
  border: 1px solid var(--mx-ref-border);
  border-radius: calc(var(--mx-ref-radius) - 2px);
  background: var(--mx-ref-surface);
  color: var(--mx-ref-muted);
  font-family: var(--mx-app-font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.mx-ref-stack :where(.mx-ref-tabs button.is-active, .mx-ref-document-nav button.is-active) {
  background: var(--mx-ref-surface);
  color: var(--mx-ref-foreground);
  box-shadow: var(--mx-ref-shadow);
}

.mx-ref-stack :where(.mx-ref-tabs button:hover, .mx-ref-document-nav button:hover, .mx-ref-modal-head button:hover, .mx-ref-action-row button:hover) {
  border-color: color-mix(in oklch, var(--mx-ref-ring) 45%, var(--mx-ref-border));
  background: color-mix(in oklch, var(--mx-ref-panel) 70%, var(--mx-ref-surface));
  color: var(--mx-ref-foreground);
  box-shadow: var(--mx-ref-shadow-hover);
}

.mx-ref-stack :where(.mx-ref-pill, .mx-ref-user-chip-row span, .mx-ref-channel-row span, .mx-ref-search, .mx-ref-context-chip, .mx-ref-attachment-chip) {
  border: 1px solid var(--mx-ref-border);
  border-radius: 999px;
  background: var(--mx-ref-surface);
  color: var(--mx-ref-muted);
  font-family: var(--mx-app-font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
}

.mx-ref-stack .mx-ref-pill.is-gold {
  border-color: rgb(180 126 22 / 0.35);
  background: rgb(245 158 11 / 0.12);
  color: #a16207;
}

.mx-ref-stack .mx-ref-pill.is-green {
  border-color: rgb(22 163 74 / 0.28);
  background: rgb(34 197 94 / 0.1);
  color: #15803d;
}

.mx-ref-stack .mx-ref-pill.is-dark {
  border-color: var(--mx-ref-border);
  background: var(--mx-ref-panel);
  color: var(--mx-ref-muted);
}

.mx-ref-stack :where(.mx-ref-chat-message, .mx-ref-chat-stream) {
  border: 1px solid var(--mx-ref-border);
  border-radius: var(--mx-ref-radius);
  background: var(--mx-ref-surface);
  color: var(--mx-ref-foreground);
}

.mx-ref-stack .mx-ref-chat-message.is-user {
  border-color: var(--mx-ref-primary);
  background: var(--mx-ref-primary);
  color: var(--mx-ref-primary-foreground);
}

.mx-ref-stack .mx-ref-chat-message.is-user .mx-ref-chat-text {
  color: var(--mx-ref-primary-foreground);
  font-weight: 500;
}

.mx-ref-stack .mx-ref-chat-stream {
  border-bottom-left-radius: calc(var(--mx-ref-radius) - 4px);
  background: var(--mx-ref-panel);
  color: var(--mx-ref-muted);
}

.mx-ref-stack .mx-ref-chat-thinking {
  border: 1px solid var(--mx-ref-border);
  border-radius: var(--mx-ref-radius);
  background: var(--mx-ref-panel);
  color: var(--mx-ref-muted);
  font-weight: 400;
}

.mx-ref-stack :where(.mx-ref-chat-attach, .mx-ref-chat-send) {
  border: 1px solid var(--mx-ref-border);
  border-radius: 999px;
}

.mx-ref-stack .mx-ref-chat-attach {
  background: var(--mx-ref-surface);
  color: var(--mx-ref-muted);
}

.mx-ref-stack .mx-ref-chat-send {
  border-color: var(--mx-ref-primary);
  background: var(--mx-ref-primary);
  color: var(--mx-ref-primary-foreground);
  box-shadow: var(--mx-ref-shadow);
}

.mx-ref-stack :where(.mx-ref-metric-row span, .mx-ref-user-list article, .mx-ref-calendar-grid > div, .mx-ref-document-body table, .mx-ref-review-actions) {
  border-color: var(--mx-ref-border);
}

.mx-ref-stack :where(.mx-ref-metric-row span, .mx-ref-user-list article) {
  background: var(--mx-ref-surface);
}

.mx-ref-stack .mx-ref-progress,
.mx-ref-stack .mx-ref-workbench-progress,
.mx-ref-stack .mx-ref-workbench-item-bar {
  background: var(--mx-ref-panel);
}

.mx-ref-stack .mx-ref-icon-tile {
  border-radius: calc(var(--mx-ref-radius) - 2px);
}

.mx-ref-stack .mx-ref-user-list article > span:not(.mx-ref-pill) {
  background: var(--mx-ref-primary);
  color: var(--mx-ref-primary-foreground);
  font-weight: 600;
}

.mx-ref-stack .mx-ref-user-list article > .mx-ref-pill {
  border-color: var(--mx-ref-primary);
  background: var(--mx-ref-primary);
  color: var(--mx-ref-primary-foreground);
}

.mx-ref-stack :where(.mx-ref-calendar-shell aside, .mx-ref-calendar-board) {
  background: var(--mx-ref-surface);
}

.mx-ref-stack :where(.mx-ref-calendar-weekdays span, .mx-ref-calendar-grid > div span, .mx-ref-review-time, .mx-ref-review-time strong) {
  color: var(--mx-ref-muted);
  font-weight: 500;
}

.mx-ref-stack .mx-ref-action-row button {
  background: var(--mx-ref-primary);
  color: var(--mx-ref-primary-foreground);
}

.mx-ref-stack .mx-ref-action-row button.is-green {
  background: #15803d;
  color: #fff;
}

.mx-ref-stack .mx-ref-action-row button.is-red {
  background: #b91c1c;
  color: #fff;
}

@container (max-width: 48rem) {
  .mx-ref-stack :where(.mx-ref-workspace-title h3, .mx-ref-workspace-head h3) {
    font-size: 1.5rem;
  }

  .mx-ref-stack :where(.mx-ref-modal-head h3, .mx-ref-document-panel > h4) {
    font-size: 1.25rem;
  }
}

/* Intake refinements for the annotated reference surfaces. */
.mx-ref-stack .mx-ref-phone-screen {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding-top: 1.8rem;
}

.mx-ref-stack .mx-ref-phone-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  min-width: 0;
  color: #425066;
  font-size: 0.65rem;
}

.mx-ref-stack .mx-ref-phone-app-bar > span {
  color: #147efb;
  font-size: 1.15rem;
  line-height: 1;
}

.mx-ref-stack .mx-ref-phone-app-bar div {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 0.08rem;
}

.mx-ref-stack .mx-ref-phone-app-bar strong {
  color: #07111d;
  font-size: 0.68rem;
  line-height: 1;
}

.mx-ref-stack .mx-ref-phone-app-bar small {
  color: #7b8798;
  font-size: 0.47rem;
  line-height: 1.1;
  white-space: nowrap;
}

.mx-ref-stack .mx-ref-phone-status {
  margin-top: 0.2rem;
}

.mx-ref-stack .mx-ref-phone-project-card {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  width: fit-content;
  max-width: 92%;
  border: 1px solid #dbe3ec;
  border-radius: 0.55rem;
  background: #f5f7fa;
  padding: 0.38rem 0.46rem;
  color: #07111d;
}

.mx-ref-stack .mx-ref-phone-project-card > span {
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.32rem;
  background: #147efb;
  color: #fff;
}

.mx-ref-stack .mx-ref-phone-project-card div {
  display: grid;
  gap: 0.08rem;
}

.mx-ref-stack .mx-ref-phone-project-card strong,
.mx-ref-stack .mx-ref-phone-project-card small {
  color: inherit;
  font-size: 0.48rem;
  line-height: 1.15;
}

.mx-ref-stack .mx-ref-phone-project-card small {
  color: #7b8798;
}

.mx-ref-stack .mx-ref-phone-composer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.38rem;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  background: #fff;
  padding: 0.25rem 0.35rem;
  color: #7b8798;
  font-size: 0.52rem;
}

.mx-ref-stack .mx-ref-phone-composer > span,
.mx-ref-stack .mx-ref-phone-composer > b {
  display: inline-flex;
  width: 0.9rem;
  height: 0.9rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef2f6;
  color: #147efb;
  font-size: 0.7rem;
  line-height: 1;
}

.mx-ref-stack .mx-ref-phone-composer > small {
  flex: 1;
  color: #7b8798;
  font-size: 0.48rem;
  line-height: 1;
}

.mx-ref-stack .mx-ref-email-step {
  color: var(--mx-ref-muted);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.mx-ref-stack .mx-ref-email-route b {
  position: absolute;
  left: 50%;
  top: -1.3rem;
  padding: 0 0.35rem;
  background: var(--mx-ref-surface);
  color: var(--mx-ref-muted);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.mx-ref-stack .mx-ref-media-thumb > .mx-ref-stock-image,
.mx-ref-stack .mx-ref-review-media > .mx-ref-stock-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mx-ref-stack .mx-ref-media-thumb::after,
.mx-ref-stack .mx-ref-review-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 44%, rgb(7 17 29 / 0.48));
  pointer-events: none;
}

.mx-ref-stack .mx-ref-media-thumb > span,
.mx-ref-stack .mx-ref-review-media > b {
  z-index: 1;
}

.mx-ref-stack .mx-ref-content-group > .mx-ref-stock-image {
  display: block;
  width: 100%;
  height: 5.75rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

@media (max-width: 720px) {
  .mx-ref-stack .mx-ref-phone-app-bar small {
    font-size: 0.42rem;
  }

  .mx-ref-stack .mx-ref-phone-project-card {
    max-width: 96%;
  }

  .mx-ref-stack .mx-ref-email-route b {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
  }

  .mx-ref-stack .mx-ref-content-group > .mx-ref-stock-image {
    height: 7rem;
  }
}

/*
 * App visuals reference preview refinement.
 * Keep preview geometry, stock imagery, and responsive behavior inside the
 * reference library; the app token fidelity layer above remains authoritative.
 */
.mx-ref-stack :where(
  .mx-ref-preview-browser,
  .mx-ref-preview-hero,
  .mx-ref-preview-feature-grid,
  .mx-ref-preview-metrics,
  .mx-ref-deck-preview,
  .mx-ref-deck-slide,
  .mx-ref-deck-dots,
  .mx-ref-newsletter-preview,
  .mx-ref-newsletter-hero,
  .mx-ref-stock-image,
  .mx-ref-review-media img,
  .mx-ref-media-thumb img
) {
  min-width: 0;
}

.mx-ref-stack :where(
  .mx-ref-preview-browser,
  .mx-ref-deck-preview,
  .mx-ref-newsletter-preview
) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--mx-ref-border);
  border-radius: var(--mx-ref-radius);
  background: var(--mx-ref-surface);
  color: var(--mx-ref-foreground);
  box-shadow: var(--mx-ref-shadow);
}

.mx-ref-stack .mx-ref-preview-browser {
  display: grid;
  gap: clamp(0.7rem, 1.5cqw, 1.15rem);
  padding: clamp(0.6rem, 1.5cqw, 0.9rem);
  background: var(--mx-ref-panel);
}

.mx-ref-stack .mx-ref-preview-browser::before {
  display: none;
}

.mx-ref-stack .mx-ref-browser-bar {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
  color: var(--mx-ref-muted);
  font-size: 0.65rem;
}

.mx-ref-stack .mx-ref-browser-bar span {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f87171;
}

.mx-ref-stack .mx-ref-browser-bar span:nth-child(2) {
  background: #fbbf24;
}

.mx-ref-stack .mx-ref-browser-bar span:nth-child(3) {
  background: #34d399;
}

.mx-ref-stack .mx-ref-browser-bar small {
  overflow: hidden;
  margin-left: 0.3rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mx-ref-stack .mx-ref-preview-browser > * {
  min-width: 0;
}

.mx-ref-stack :where(.mx-ref-preview-hero, .mx-ref-newsletter-hero) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: calc(var(--mx-ref-radius) - 2px);
  background:
    radial-gradient(circle at 78% 18%, rgb(245 158 11 / 0.34), transparent 24%),
    linear-gradient(135deg, #dbeafe 0%, #93c5fd 48%, #475569 100%);
  color: #fff;
}

.mx-ref-stack .mx-ref-preview-hero {
  display: grid;
  min-height: clamp(11rem, 24cqw, 18rem);
  align-content: end;
  padding: clamp(1rem, 2.5cqw, 1.6rem);
}

.mx-ref-stack .mx-ref-preview-hero::after,
.mx-ref-stack .mx-ref-newsletter-hero::after,
.mx-ref-stack .mx-ref-deck-slide::after {
  position: absolute;
  z-index: 0;
  content: "";
  inset: 0;
  background: linear-gradient(180deg, rgb(15 23 42 / 0.02), rgb(15 23 42 / 0.72));
  pointer-events: none;
}

.mx-ref-stack :where(.mx-ref-preview-hero, .mx-ref-newsletter-hero) > :not(.mx-ref-stock-image),
.mx-ref-stack .mx-ref-deck-slide > :not(.mx-ref-stock-image) {
  position: relative;
  z-index: 1;
}

.mx-ref-stack :where(.mx-ref-preview-hero h1, .mx-ref-preview-hero h2, .mx-ref-preview-hero h3, .mx-ref-preview-hero p, .mx-ref-newsletter-hero h1, .mx-ref-newsletter-hero h2, .mx-ref-newsletter-hero h3, .mx-ref-newsletter-hero p, .mx-ref-deck-slide h1, .mx-ref-deck-slide h2, .mx-ref-deck-slide h3, .mx-ref-deck-slide p) {
  max-width: 34rem;
  margin: 0;
  color: inherit;
}

.mx-ref-stack :where(.mx-ref-preview-feature-grid, .mx-ref-preview-metrics) {
  display: grid;
  gap: clamp(0.55rem, 1.2cqw, 0.85rem);
}

.mx-ref-stack .mx-ref-preview-feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mx-ref-stack .mx-ref-preview-feature-grid > * {
  min-width: 0;
  border: 1px solid var(--mx-ref-border);
  border-radius: calc(var(--mx-ref-radius) - 2px);
  background: var(--mx-ref-surface);
  padding: clamp(0.65rem, 1.5cqw, 0.95rem);
  box-shadow: var(--mx-ref-shadow);
}

.mx-ref-stack .mx-ref-preview-feature-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--mx-ref-radius) - 4px);
  object-fit: cover;
}

.mx-ref-stack .mx-ref-preview-metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.5rem), 1fr));
}

.mx-ref-stack .mx-ref-preview-metrics > * {
  min-width: 0;
  border: 1px solid var(--mx-ref-border);
  border-radius: calc(var(--mx-ref-radius) - 2px);
  background: var(--mx-ref-surface);
  color: var(--mx-ref-muted);
  padding: clamp(0.6rem, 1.4cqw, 0.85rem);
  box-shadow: var(--mx-ref-shadow);
}

.mx-ref-stack .mx-ref-preview-metrics strong {
  display: block;
  color: var(--mx-ref-foreground);
  font-size: clamp(1rem, 2.5cqw, 1.35rem);
  line-height: 1.15;
}

.mx-ref-stack .mx-ref-preview-metrics span {
  display: block;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
}

.mx-ref-stack .mx-ref-deck-preview {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.65rem;
  aspect-ratio: 16 / 9;
  padding: clamp(0.6rem, 1.5cqw, 0.9rem);
  background: var(--mx-ref-panel);
}

.mx-ref-stack .mx-ref-deck-slide {
  position: relative;
  display: grid;
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  height: 100%;
  align-content: end;
  overflow: hidden;
  isolation: isolate;
  border-radius: calc(var(--mx-ref-radius) - 2px);
  background:
    radial-gradient(circle at 82% 20%, rgb(245 158 11 / 0.38), transparent 22%),
    linear-gradient(135deg, #0f172a 0%, #164e63 54%, #2563eb 100%);
  color: #fff;
  padding: clamp(1rem, 2.5cqw, 1.6rem);
}

.mx-ref-stack .mx-ref-deck-slide:not(.is-one) {
  display: none;
}

.mx-ref-stack .mx-ref-deck-slide.is-active {
  display: grid;
}

.mx-ref-stack .mx-ref-deck-preview[data-ref-deck-ready="true"] .mx-ref-deck-slide {
  display: none;
}

.mx-ref-stack .mx-ref-deck-preview[data-ref-deck-ready="true"] .mx-ref-deck-slide.is-active {
  display: grid;
}

.mx-ref-stack .mx-ref-deck-dots {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.mx-ref-stack .mx-ref-deck-dots > * {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--mx-ref-ring);
  opacity: 0.55;
}

.mx-ref-stack .mx-ref-deck-dots > :first-child,
.mx-ref-stack .mx-ref-deck-dots > *.is-active {
  background: var(--mx-ref-primary);
  opacity: 1;
}

.mx-ref-stack .mx-ref-newsletter-preview {
  display: grid;
  width: min(100%, 24rem);
  gap: clamp(0.75rem, 2cqw, 1.2rem);
  margin-inline: auto;
  padding: clamp(0.75rem, 2cqw, 1.2rem);
  background: #fff;
  color: #0f172a;
}

.mx-ref-stack .mx-ref-newsletter-hero {
  display: grid;
  min-height: clamp(8rem, 18cqw, 12rem);
  align-content: end;
  padding: clamp(0.85rem, 2cqw, 1.25rem);
}

.mx-ref-stack .mx-ref-newsletter-preview > * {
  min-width: 0;
}

.mx-ref-stack :where(
  .mx-ref-stock-image,
  .mx-ref-review-media img,
  .mx-ref-media-thumb img
) {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.96) contrast(1.02);
}

.mx-ref-stack .mx-ref-preview-feature-grid > * {
  min-height: 0;
  overflow: hidden;
}

.mx-ref-stack .mx-ref-preview-feature-grid .mx-ref-stock-image {
  height: auto;
  aspect-ratio: 16 / 9;
}

.mx-ref-stack img[src$="/preview-team.jpg"] {
  object-position: 50% 34%;
}

.mx-ref-stack :where(.mx-ref-preview-hero, .mx-ref-newsletter-hero, .mx-ref-deck-slide) > .mx-ref-stock-image,
.mx-ref-stack :where(.mx-ref-review-media, .mx-ref-media-thumb) > img {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
}

.mx-ref-stack :where(.mx-ref-review-media, .mx-ref-media-thumb) {
  isolation: isolate;
  background:
    radial-gradient(circle at 74% 25%, rgb(245 158 11 / 0.48), transparent 22%),
    linear-gradient(135deg, #bae6fd, #38bdf8 48%, #1d4ed8);
}

.mx-ref-stack :where(.mx-ref-review-media, .mx-ref-media-thumb)::after {
  position: absolute;
  z-index: 0;
  content: "";
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgb(15 23 42 / 0.48));
  pointer-events: none;
}

.mx-ref-stack :where(.mx-ref-review-media, .mx-ref-media-thumb) > :not(img) {
  z-index: 1;
}

.mx-ref-stack :where(.mx-ref-chat-response .mx-ref-chat-stream, .mx-ref-chat-box .mx-ref-chat-stream) {
  min-height: 4.1rem;
  padding: clamp(1rem, 1.6vw, 1.25rem) clamp(1.05rem, 2vw, 1.35rem);
}

.mx-ref-stack .mx-ref-chat-stream > span {
  display: block;
}

@container (min-width: 48rem) {
  .mx-ref-stack :where(.mx-ref-grid.two, .mx-ref-grid.three) {
    align-items: stretch;
  }

  .mx-ref-stack :where(.mx-ref-preview-browser, .mx-ref-deck-preview, .mx-ref-newsletter-preview) {
    width: 100%;
  }

  .mx-ref-stack .mx-ref-preview-hero {
    min-height: clamp(12rem, 25cqw, 19rem);
  }
}

@media (max-width: 720px) {
  .mx-ref-stack :where(.mx-ref-preview-feature-grid, .mx-ref-preview-metrics) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mx-ref-stack .mx-ref-preview-feature-grid > * {
    padding: 0.7rem;
  }

  .mx-ref-stack :where(.mx-ref-preview-hero, .mx-ref-deck-slide) {
    min-height: 10.5rem;
    padding: 0.9rem;
  }

  .mx-ref-stack .mx-ref-newsletter-preview {
    width: 100%;
  }

  .mx-ref-stack .mx-ref-newsletter-hero {
    min-height: 8rem;
    padding: 0.85rem;
  }

  .mx-ref-stack :where(.mx-ref-chat-response .mx-ref-chat-stream, .mx-ref-chat-box .mx-ref-chat-stream) {
    min-height: 3.9rem;
    padding: 0.95rem 1rem;
  }
}

@media (max-width: 420px) {
  .mx-ref-stack :where(.mx-ref-preview-feature-grid, .mx-ref-preview-metrics) {
    grid-template-columns: 1fr;
  }

  .mx-ref-stack .mx-ref-deck-slide {
    aspect-ratio: 4 / 3;
  }
}

/* Higher-specificity hooks keep the new preview markup ahead of legacy demo rules. */
.mx-ref-stack .mx-ref-preview-hero,
.mx-ref-stack .mx-ref-deck-slide,
.mx-ref-stack .mx-ref-newsletter-hero {
  background: transparent;
}

.mx-ref-stack .mx-ref-preview-hero > .mx-ref-stock-image,
.mx-ref-stack .mx-ref-deck-slide > .mx-ref-stock-image,
.mx-ref-stack .mx-ref-newsletter-hero > .mx-ref-stock-image {
  z-index: 0;
}

.mx-ref-stack .mx-ref-preview-hero::after,
.mx-ref-stack .mx-ref-deck-slide::after,
.mx-ref-stack .mx-ref-newsletter-hero::after {
  z-index: 1;
}

.mx-ref-stack .mx-ref-preview-hero > div,
.mx-ref-stack .mx-ref-deck-slide > div,
.mx-ref-stack .mx-ref-newsletter-hero > span {
  z-index: 2;
}

.mx-ref-stack .mx-ref-preview-hero h4,
.mx-ref-stack .mx-ref-preview-hero p,
.mx-ref-stack .mx-ref-deck-slide h4,
.mx-ref-stack .mx-ref-deck-slide p,
.mx-ref-stack .mx-ref-newsletter-hero span {
  color: #fff;
}

/* Final overrides for the stock-backed preview layers. */
.mx-ref-stack .mx-ref-preview-hero h4,
.mx-ref-stack .mx-ref-preview-hero p,
.mx-ref-stack .mx-ref-preview-hero small,
.mx-ref-stack .mx-ref-deck-slide h4,
.mx-ref-stack .mx-ref-deck-slide p,
.mx-ref-stack .mx-ref-deck-slide small,
.mx-ref-stack .mx-ref-newsletter-hero span {
  color: #fff !important;
}

.mx-ref-stack .mx-ref-preview-hero > .mx-ref-stock-image,
.mx-ref-stack .mx-ref-deck-slide > .mx-ref-stock-image,
.mx-ref-stack .mx-ref-newsletter-hero > .mx-ref-stock-image {
  opacity: 0.82;
}

/* Requested app-reference surface refinements. */
.mx-app-visuals-reference :where(.mx-ref-media-thumb > span, .mx-ref-review-media > b) {
  max-width: calc(100% - 1.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mx-app-visuals-reference .mx-ref-newsletter-hero::after {
  display: none;
}

.mx-app-visuals-reference .mx-ref-newsletter-hero > .mx-ref-stock-image {
  opacity: 1;
}

.mx-app-visuals-reference .mx-ref-newsletter-hero > span {
  min-height: 0;
  width: fit-content;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.78);
  padding: 0.38rem 0.58rem;
  font-size: 0.68rem;
  line-height: 1.2;
}

.mx-app-visuals-reference .mx-ref-preview-hero {
  min-height: clamp(8.4rem, 17.5cqw, 13.3rem);
}

.mx-app-visuals-reference .mx-ref-preview-hero > div {
  display: grid;
  max-width: min(100%, 31rem);
  justify-items: start;
  gap: clamp(0.55rem, 1.2cqw, 0.9rem);
}

.mx-app-visuals-reference .mx-ref-preview-hero :where(small, h4, p, b) {
  margin: 0;
}

.mx-app-visuals-reference .mx-ref-preview-hero b {
  margin-top: 0.25rem;
}

.mx-app-visuals-reference .mx-ref-deck-slide::after {
  background:
    linear-gradient(90deg, rgb(7 17 29 / 0.9) 0%, rgb(7 17 29 / 0.7) 58%, rgb(7 17 29 / 0.18) 100%),
    linear-gradient(180deg, transparent 38%, rgb(7 17 29 / 0.74) 100%);
}

.mx-app-visuals-reference.mx-ref-stack .mx-ref-deck-slide > div {
  position: relative;
  z-index: 2;
  width: min(100%, 72%);
}

.mx-ref-deck-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.mx-ref-deck-icon-row > span {
  display: grid;
  grid-template-columns: auto 1fr;
  min-width: 6.4rem;
  align-items: center;
  gap: 0.05rem 0.35rem;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 0.5rem;
  background: rgb(15 23 42 / 0.48);
  padding: 0.42rem 0.5rem;
}

.mx-ref-deck-icon-row .mx-ref-svg {
  grid-row: 1 / span 2;
  width: 1rem;
  height: 1rem;
}

.mx-ref-deck-icon-row b,
.mx-ref-deck-icon-row i {
  color: #fff;
  line-height: 1.05;
}

.mx-ref-deck-icon-row b {
  font-size: 0.72rem;
}

.mx-ref-deck-icon-row i {
  font-size: 0.55rem;
  font-style: normal;
  opacity: 0.78;
}

.mx-ref-stack .mx-ref-deck-dots > button {
  padding: 0;
  cursor: pointer;
}

.mx-ref-social-preview {
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.mx-ref-social-card {
  overflow: hidden;
  border: 1px solid var(--mx-ref-border);
  border-radius: var(--mx-ref-radius);
  background: #fff;
  color: #17243a;
  box-shadow: var(--mx-ref-shadow);
}

.mx-ref-social-card > :where(header, p, footer) {
  margin: 0;
  padding: 0.75rem 0.85rem;
}

.mx-ref-social-card > header,
.mx-ref-social-card > footer {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.55rem;
}

.mx-ref-social-card > header > div {
  display: grid;
  min-width: 0;
  flex: 1;
}

.mx-ref-social-card :where(header strong, footer strong) {
  color: #17243a;
  font-size: 0.75rem;
}

.mx-ref-social-card header small {
  overflow: hidden;
  color: #66758a;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mx-ref-social-avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.45rem;
  background: #17243a;
  color: #fff;
  font-family: var(--mx-font-accent);
}

.mx-ref-social-card > p {
  color: #3f4f65;
  font-size: 0.75rem;
  line-height: 1.45;
}

.mx-ref-social-media {
  position: relative;
  isolation: isolate;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #dbeafe;
}

.mx-ref-social-media > :where(.mx-ref-stock-image, video) {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  object-fit: cover;
}

.mx-ref-social-media time,
.mx-ref-social-image-chip {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.8);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}

.mx-ref-social-media time {
  right: 0.6rem;
  bottom: 0.55rem;
  padding: 0.28rem 0.42rem;
}

.mx-ref-social-image-chip {
  left: 0.65rem;
  bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.5rem;
}

.mx-ref-social-image-chip .mx-ref-svg {
  width: 0.85rem;
  height: 0.85rem;
}

.mx-ref-social-card > footer {
  justify-content: space-between;
}

.mx-ref-social-card > footer span {
  border-radius: 999px;
  background: #f2c56b;
  color: #17243a;
  padding: 0.35rem 0.52rem;
  font-size: 0.62rem;
  font-weight: 700;
}

@media (max-width: 720px) {
  .mx-app-visuals-reference .mx-ref-preview-hero {
    min-height: 7.35rem;
  }

  .mx-app-visuals-reference.mx-ref-stack .mx-ref-deck-slide > div {
    width: 100%;
  }
}

.mx-ref-stack .mx-ref-chat-response .mx-ref-chat-stream,
.mx-ref-stack .mx-ref-chat-box .mx-ref-chat-stream {
  min-height: 4.1rem;
  padding: clamp(1rem, 1.6vw, 1.25rem) clamp(1.05rem, 2vw, 1.35rem);
}

.mx-ref-stack .mx-ref-phone-screen .mx-ref-message-bubble {
  max-width: 86%;
  min-height: 2.45rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.62rem;
  line-height: 1.22;
}

@media (max-width: 720px) {
  .mx-ref-stack .mx-ref-email-route b {
    left: 50%;
    top: 50%;
    white-space: nowrap;
    transform: translate(-50%, -50%);
  }
}

.mx-ref-brand-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.8rem;
}

.mx-ref-capability-icon-grid {
  display: grid;
  gap: 0.9rem;
}

.mx-ref-capability-icon-row {
  display: grid;
  grid-template-columns: minmax(12rem, 0.72fr) minmax(0, 1.28fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid var(--mx-app-border);
  border-radius: 1rem;
  background: var(--mx-app-surface);
  padding: 0.85rem;
}

.mx-ref-capability-icon-row__identity {
  display: grid;
}

.mx-ref-capability-icon-row__providers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
  gap: 0.65rem;
}

.mx-ref-reference-icon {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.7rem;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--mx-app-border);
  border-radius: 0.8rem;
  background: var(--mx-app-surface-muted);
  padding: 0.72rem;
  color: var(--mx-app-text);
}

.mx-ref-reference-icon__asset {
  grid-row: 1 / 3;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--mx-app-border);
  border-radius: 0.7rem;
  background: var(--mx-app-surface);
}

.mx-ref-reference-icon__asset img {
  display: block;
  width: 1.65rem;
  height: 1.65rem;
  object-fit: contain;
}

.mx-ref-reference-icon__label {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.15;
}

.mx-ref-reference-icon small {
  color: var(--mx-app-muted);
  font-size: 0.66rem;
  line-height: 1.15;
}

.mx-ref-reference-icon.is-generic {
  border-color: #f5c871;
  background: #fdf6e7;
}

.mx-ref-reference-icon.is-generic small {
  color: #5c6d83;
}

.mx-ref-reference-icon.is-generic .mx-ref-reference-icon__asset {
  background: #fbe8c3;
}

@media (max-width: 720px) {
  .mx-ref-brand-icon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mx-ref-capability-icon-row {
    grid-template-columns: 1fr;
  }

  .mx-ref-capability-icon-row__providers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 340px) {
  .mx-ref-brand-icon-grid,
  .mx-ref-capability-icon-row__providers {
    grid-template-columns: 1fr;
  }
}

/*
 * Shared motion contract.
 *
 * Reference pages provide stable surface and inner-target hooks. First-class
 * scenes own timing, transforms, cursors, and interaction state.
 */
.mx-motion-stage {
  position: relative;
}

[data-motion-surface="true"],
.mx-motion-surface {
  transform-origin: var(--mx-motion-origin, 50% 50%);
}

.mx-motion-inner {
  position: relative;
}

.mx-motion-cursor {
  position: absolute;
  z-index: 50;
  pointer-events: none;
  transform-origin: 0 0;
}

.mx-motion-cursor[data-motion-action="drag"],
.mx-motion-cursor[data-motion-action="click"],
.mx-motion-cursor[data-motion-action="type"] {
  will-change: transform, opacity;
}

/* App visuals are a static source library; animations are scene-owned. */
.mx-app-visuals-reference .mx-type-on-view::after,
.mx-app-visuals-reference .mx-ref-message-bubble.is-agent,
.mx-app-visuals-reference .mx-ref-message-thinking,
.mx-app-visuals-reference .mx-ref-message-thinking span,
.mx-app-visuals-reference .mx-ref-email-packet,
.mx-app-visuals-reference .mx-ref-slack-mark,
.mx-app-visuals-reference .mx-ref-slack-channel,
.mx-app-visuals-reference .mx-ref-fractal-node,
.mx-app-visuals-reference .mx-ref-mcp-logo {
  animation: none !important;
}

.mx-app-visuals-reference .mx-type-on-view::after {
  content: none;
}

.mx-app-visuals-reference .mx-ref-message-bubble.is-agent,
.mx-app-visuals-reference .mx-ref-message-thinking,
.mx-app-visuals-reference .mx-ref-message-thinking span,
.mx-app-visuals-reference .mx-ref-email-packet,
.mx-app-visuals-reference .mx-ref-slack-channel,
.mx-app-visuals-reference .mx-ref-mcp-logo {
  opacity: 1;
  transform: none;
}

.mx-app-visuals-reference .mx-ref-email-packet {
  left: 58%;
  opacity: 1;
  transform: translateY(-50%) scale(1) rotate(0deg);
}

.mx-app-visuals-reference .mx-ref-slack-mark {
  opacity: 0;
  transform: rotate(360deg) scale(2.95, 0.06);
}

.mx-app-visuals-reference .mx-ref-fractal-node {
  opacity: 1;
  transform: translate(var(--mx-end-x), var(--mx-end-y)) scale(1) rotate(180deg);
}

.mx-app-visuals-reference .mx-ref-mcp-logo {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 720px) {
  .mx-app-visuals-reference .mx-ref-email-packet {
    left: 50%;
    top: 14.2rem;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

.mx-app-visuals-reference:not(.mx-screencast) :where(*, *::before, *::after) {
  animation: none !important;
  transition: none !important;
}

.mx-app-visuals-reference .mx-ref-chat-thinking-dot {
  animation: mx-pulse 1s infinite !important;
}

.mx-app-visuals-reference .mx-ref-pinned-composer.is-animating {
  animation: mx-pinned-composer-accent-pulse 1.8s ease-in-out infinite !important;
}

.mx-app-visuals-reference .mx-ref-pinned-composer.is-animating .mx-ref-pinned-composer-reasoning i {
  animation: mx-pinned-composer-dot-pulse 1s ease-in-out infinite !important;
}

@media (prefers-reduced-motion: reduce) {
  .mx-app-visuals-reference .mx-ref-chat-thinking-dot,
  .mx-app-visuals-reference .mx-ref-pinned-composer.is-animating,
  .mx-app-visuals-reference .mx-ref-pinned-composer.is-animating .mx-ref-pinned-composer-reasoning i {
    animation: none !important;
  }
}

.mx-app-visuals-reference :where(
  .mx-file-card,
  .mx-reveal-card,
  .mx-app-card,
  .mx-ref-user-list article,
  .mx-ref-cal-event.is-pop,
  .mx-ref-cal-event.is-span
) {
  opacity: 1;
  transform: none;
}

.mx-app-visuals-reference .mx-ref-chat-box .mx-ref-chat-response,
.mx-app-visuals-reference .mx-ref-user-list article,
.mx-app-visuals-reference .mx-ref-cal-event.is-pop,
.mx-app-visuals-reference .mx-ref-cal-event.is-span {
  opacity: 1;
  transform: none;
}

/* Catalog wrapper preserves the approved pinned Composer's intrinsic footprint. */
.mx-app-visual-catalog-surface--composer-pinned .mx-ref-pinned-composer-shell,
.mx-app-visual-catalog-surface--composer-pinned .mx-ref-pinned-composer {
  width: fit-content;
}

.mx-ref-pinned-composer {
  color: #111827;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

/* App surfaces keep their approved light skin regardless of the host palette. */
:root .mx-ref-stack.mx-app-visuals-reference,
:root .mx-screencast.mx-ref-stack {
  --mx-ref-foreground: #0f172a;
  --mx-ref-muted: #64748b;
  --mx-ref-surface: #fff;
  --mx-ref-panel: #f1f5f9;
  --mx-ref-border: #e2e8f0;
  --mx-ref-input: #e2e8f0;
  --mx-ref-ring: #94a3b8;
  --mx-ref-primary: #1e293b;
  --mx-ref-primary-foreground: #f8fafc;
  --mx-ref-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
  --mx-ref-shadow-hover: 0 8px 18px rgb(15 23 42 / 0.07);
  color-scheme: light;
}

:root .mx-ref-stack.mx-app-visuals-reference :where(
  .mx-ref-composer,
  .mx-ref-card,
  .mx-ref-context-tile,
  .mx-ref-document-panel,
  .mx-ref-workspace,
  .mx-ref-app-frame,
  .mx-ref-modal,
  .mx-ref-review-card,
  .mx-ref-content-group
),
:root .mx-screencast.mx-ref-stack :where(
  .mx-ref-composer,
  .mx-ref-card,
  .mx-ref-context-tile,
  .mx-ref-document-panel,
  .mx-ref-workspace,
  .mx-ref-app-frame,
  .mx-ref-modal,
  .mx-ref-review-card,
  .mx-ref-content-group
) {
  color-scheme: light;
}
