.demo-frame[hidden], .demo-tour-controls[hidden] { display: none; }
/* Match the embed loader's panel size, including its reader. */
.demo-stage {
  --demo-panel-width: 380px;
  --demo-panel-height: min(680px, calc(100vh - 112px));
  --demo-reader-height: min(840px, calc(100vh - 112px));
}
.demo-window {
  width: var(--demo-panel-width);
  height: var(--demo-panel-height);
  flex: 0 0 auto;
  max-width: 100%;
  border: 0;
  border-radius: 18px;
}
.demo-frame { height: 100%; pointer-events: none; user-select: none; }
.demo-frame.is-preparing { position: absolute; inset: 0; opacity: 0; }
.demo-window { user-select: none; }
.reader-expanded .demo-window { height: var(--demo-reader-height); border-radius: 24px; }
.reader-expanded .demo-frame { height: 100%; }
@media (max-width: 1000px) {
  .product-section { grid-template-columns: 1fr; }
}
@media (min-width: 601px) and (max-width: 1100px) {
  .product-section.reader-expanded { padding-left: 0; padding-right: 0; }
}
@media (min-width: 601px) and (max-width: 800px) {
  .product-section.reader-expanded { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 640px) {
  .demo-stage {
    --demo-panel-height: min(680px, calc(100dvh - 112px));
    --demo-reader-height: var(--demo-panel-height);
  }
  .product-section.reader-expanded .demo-window {
    width: var(--demo-panel-width);
    border-radius: 18px;
  }
}
@media (max-width: 600px) {
  .demo-stage {
    /* Product padding is 22px plus the page's 8px: keep the embed's 20px gutter. */
    margin-left: -10px;
    margin-right: -10px;
    padding: 0;
  }
}
.demo-tour-controls { position: relative; z-index: 1; width: 380px; max-width: 100%; margin-top: 14px; }
.demo-tour-progress { display: flex; justify-content: space-between; gap: 12px; color: #536f8a; font-size: 11px; line-height: 1.6; }
#demo-tour-count { flex: none; color: #7693b0; }
.demo-stage .demo-disclaimer { margin-top: 12px; }

/* The chapter list follows the walkthrough. A click replays from that chapter. */
.product-copy .chapter-hint { display: flex; align-items: center; gap: 8px; margin: 22px 0 -12px; font-size: 11px; color: #7693b0; }
.chapter-hint svg { width: 19px; height: 19px; flex: none; }
.scenario { transition: color .2s, background .2s; }
.scenario > span { flex: 1; min-width: 0; }
.chapter-arrow { width: 16px; height: 16px; flex: none; margin-left: auto; opacity: .6; transition: transform .2s, opacity .2s; }
.scenario:hover .chapter-arrow, .scenario:focus-visible .chapter-arrow, .scenario[data-state="active"] .chapter-arrow { color: #4776ab; opacity: 1; transform: translateX(3px); }
.scenario[data-state="active"] { border-radius: 12px; border-bottom-color: transparent; background: #ffffffb3; color: #24384e; }
.scenario[data-state="active"] small { color: #4776ab; }
.scenario[data-state="done"] { color: #536f8a; }
.tour-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 28px;
  height: 34px;
  pointer-events: none;
  transition: transform 400ms cubic-bezier(.22,.8,.25,1);
  filter: drop-shadow(0 2px 3px #24384e40);
}
.tour-cursor[hidden] { display: none; }
.tour-cursor svg { display: block; width: 100%; height: 100%; }
.tour-cursor.is-clicking::before {
  content: "";
  position: absolute;
  top: -15px;
  left: -15px;
  width: 34px;
  height: 34px;
  border: 2px solid #4776ab;
  border-radius: 50%;
  animation: tour-click 500ms ease-out both;
}
@keyframes tour-click { from { opacity: .85; transform: scale(.45); } to { opacity: 0; transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) {
  .tour-cursor { transition: none; }
  .tour-cursor.is-clicking::before { animation: none; opacity: .6; }
}
