.product-demo {
  --demo-ink: #192633;
  --demo-muted: #505e6e;
  --demo-border: #d3deeb;
  --demo-accent: #213a60;
  width: min(100% - 48px, 1000px);
  margin-inline: auto;
  color: var(--demo-ink);
  scroll-margin-top: 80px;
}

.product-demo [hidden] { display: none !important; }

.demo-switcher {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 16px;
  gap: 4px;
  padding: 4px;
  border-radius: 99px;
  background: #eff1f4;
}

.demo-switcher button {
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--demo-muted);
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 550;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
}

.demo-switcher button:hover { color: var(--demo-ink); }
.demo-switcher button[aria-selected="true"] {
  background: white;
  color: var(--demo-ink);
  box-shadow: 0 1px 3px #14284516;
}

.demo-stage {
  display: grid;
  align-items: center;
  min-height: 382px;
  padding: 44px clamp(22px, 9%, 96px);
  border: 1px solid #e0e8f2;
  border-radius: 20px;
  background: #eef4fb;
}

.demo-window {
  min-width: 0;
  min-height: 290px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 40px #2449721a, 0 2px 6px #24497214;
}

.demo-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 44px;
  gap: 12px;
  padding-inline: 16px;
  color: var(--demo-muted);
  background: #f8fafc;
  border-bottom: 1px solid #e6ebf0;
  font-size: 13px;
  font-weight: 550;
}

.demo-lights { display: flex; align-items: center; gap: 6px; }
.demo-lights i { width: 9px; height: 9px; border-radius: 50%; background: #d9e0e9; }
.demo-caption { justify-self: end; white-space: nowrap; font-size: 12px; font-weight: 400; }

.demo-workspace { padding: 28px 38px 24px; }
.demo-workspace h2 {
  margin: 0;
  font-family: inherit;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: 0;
  font-weight: 630;
}

.demo-editor {
  min-height: 93px;
  margin: 16px 0 14px;
  padding: 16px 18px;
  border-radius: 8px;
  background: #f5f8fc;
  color: var(--demo-ink);
  font-size: 15px;
  line-height: 1.65;
}

.demo-caret { display: inline-block; width: 2px; height: 1.12em; margin-left: 5px; vertical-align: -0.18em; border-radius: 1px; background: #4771a6; }
.demo-editor mark { padding-block: 1px; color: inherit; background: #dbe9fc; }
.demo-editor[lang="en"] { font-size: 16px; }

.demo-transcript { display: grid; align-content: center; gap: 8px; }
.demo-transcript p { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: baseline; margin: 0; font-size: 14px; }
.demo-timestamp { color: var(--demo-accent); font: 12px ui-monospace, monospace; }
.demo-source { margin: 0; color: var(--demo-accent); font: 13px / 1.8 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.demo-action-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.demo-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 8px 12px;
  border: 1px solid var(--demo-border);
  border-radius: 7px;
  background: #fff;
  color: var(--demo-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.demo-action:hover { background: #eef4fb; border-color: #b9cbe0; }
.demo-hint { color: var(--demo-muted); font-size: 13px; }
.demo-hint kbd { padding-inline: 0.25em; border: 1px solid var(--demo-border); border-radius: 4px; background: #f8fafc; color: var(--demo-accent); font: inherit; }
.product-demo button:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: 3px; }

@media (max-width: 680px) {
  .product-demo { width: min(100% - 28px, 1000px); }
  .demo-switcher button { padding: 9px 13px; }
  .demo-stage { min-height: 368px; padding: 16px; border-radius: 14px; }
  .demo-workspace { padding: 22px 16px 20px; }
  .demo-workspace h2 { font-size: 21px; }
  .demo-editor { min-height: 116px; padding: 12px; }
  .demo-transcript p { gap: 7px; overflow-wrap: anywhere; }
  .demo-action-row { gap: 8px 10px; }
}
