/* Disposable local V2. Layout, fonts and the loading composition are inherited unchanged. */
body[data-motion-lab-v2="true"] {
  --v2-ease-scene: cubic-bezier(.37, 0, .63, 1);
  --v2-ease-out: cubic-bezier(.22, 1, .36, 1);
}

@media (prefers-reduced-motion: no-preference) {
/* Each title is its own crisp layer; containers no longer add a second 3D entrance. */
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).is-canela-shifting .c-panel :is(.c-execution-copy, .c-presence-layout, .c-presence-heading, .c-presence-copy),
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).is-canela-shifting .c-panel > header {
  animation: none !important;
  opacity: 1;
  filter: none;
  transform: none;
}

body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).is-canela-shifting .c-panel.is-kc-active :is(h1, .c-execution-copy h2, header h2, .c-presence-heading h2) {
  animation: v2-title-arrive 740ms var(--v2-ease-out) 80ms both !important;
}
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).kc-first-arrival.is-canela-shifting .c-panel.is-kc-active :is(h1, .c-execution-copy h2, header h2, .c-presence-heading h2) {
  animation-duration: 900ms !important;
  animation-delay: 60ms !important;
}
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).is-canela-shifting .c-panel.is-kc-active h1 > em {
  animation: v2-title-second-line 640ms var(--v2-ease-out) 160ms both !important;
}
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).kc-first-arrival.is-canela-shifting .c-panel.is-kc-active h1 > em {
  animation-duration: 750ms !important;
  animation-delay: 180ms !important;
}
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).is-canela-shifting .c-panel.is-kc-active > :is(small, p, a),
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).is-canela-shifting .c-panel.is-kc-active :is(.c-section-kicker, .c-execution-copy > p, .c-presence-lead, .c-presence-heading > a) {
  animation: v2-detail-arrive 560ms var(--v2-ease-out) 280ms both !important;
}
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).is-canela-shifting .c-panel--sectors.is-kc-active > div > a,
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).is-canela-shifting .c-panel.is-kc-active .c-presence-copy > article {
  animation: v2-detail-arrive 440ms var(--v2-ease-out) calc(280ms + var(--v2-item-order, 0) * 30ms) both !important;
}
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c:not(.kc-awaiting-arrival).is-canela-shifting .c-panel.is-kc-leaving :is(h1, .c-execution-copy h2, header h2, .c-presence-heading h2) {
  animation: v2-title-leave 280ms var(--v2-ease-scene) both !important;
}

/* A quiet gold accent accompanies the scene change; no competing light wash. */
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c .kc-motion-atmosphere > b {
  display: none !important;
}
body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c.is-canela-shifting .kc-motion-atmosphere > i {
  animation: v2-rule-arrive 900ms var(--v2-ease-scene) both !important;
}
}

@keyframes v2-title-arrive {
  from { opacity: 0; filter: none; transform: translate3d(calc(var(--chapter-direction, 1) * 24px), 28px, 0); }
  to { opacity: 1; filter: none; transform: translate3d(0, 0, 0); }
}
@keyframes v2-title-second-line {
  from { opacity: .12; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes v2-title-leave {
  from { opacity: 1; filter: none; transform: translate3d(0, 0, 0); }
  to { opacity: 0; filter: none; transform: translate3d(calc(var(--chapter-direction, 1) * -14px), -8px, 0); }
}
@keyframes v2-detail-arrive {
  from { opacity: 0; filter: none; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; filter: none; transform: translate3d(0, 0, 0); }
}
@keyframes v2-rule-arrive {
  0%, 100% { opacity: 0; transform: scaleX(.2); }
  42% { opacity: .26; transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c .c-panel :is(h1, h2, header, small, p, a, .c-execution-copy, .c-presence-layout, article) {
    animation: none !important;
  }
  body[data-motion-lab-v2="true"]:not([data-motion-variant="original"]).concept-c .kc-motion-atmosphere { display: none !important; }
}

/* Local demonstration controls only. */
body[data-motion-lab-v2="true"] .trial-controls { max-width: calc(100vw - 32px); }
body[data-motion-lab-v2="true"] .trial-controls [data-v2-menu] { border-color: rgba(255,255,255,.22); }
/* Keep the demonstration toolbar above the native chapter HUD on small screens. */
@media (max-width: 1100px) {
  body[data-motion-lab-v2="true"] .trial-controls { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
  body[data-motion-lab-v2="true"] .trial-controls { max-width: none; }
}

/* The home payload retains its original inline social CSS. Keep network
   switches exclusive through this stylesheet already linked by both views. */
.kc-social-rail:has(.kc-social-rail__item[data-revealed]) .kc-social-rail__item:not([data-revealed]) .kc-social-rail__notice {
  transition: none;
}
