/*
 * Black Friday LP: live product demo. A browser-window frame around the real site
 * (/library and /courses/* in an iframe, scaled to fit), with the product screenshots as the
 * fallback while framing is not allowed. Scoped under .demo / .demo-*.
 */
.demo { margin-block: 28px 6px; text-align: start; font-size: 15px; line-height: 1.5; }
.demo *, .demo *::before, .demo *::after { box-sizing: border-box; }
.demo button { font: inherit; color: inherit; cursor: pointer; }
.demo p { margin: 0; }

.demo__intro { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-block-end: 16px; text-align: center; }
.demo__label {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 179, 64, .5); background: rgba(247, 144, 9, .12); color: var(--gold-hot, #ffb340);
  font-weight: 900; font-size: 14px; letter-spacing: .02em;
}
.demo__label i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: demo-pulse 2s ease-out infinite; }
.demo__hint { color: var(--ink-soft, #d9def2); font-size: 15px; max-width: 560px; }

.demo__tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-block-end: 16px; }
.demo__tab {
  min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line, rgba(239, 243, 255, .14));
  background: rgba(239, 243, 255, .06); color: var(--ink, #eff3ff); font-weight: 900; font-size: 15px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.demo__tab:hover { background: rgba(239, 243, 255, .12); }
.demo__tab[aria-selected="true"] { background: var(--gold, #f79009); border-color: var(--gold, #f79009); color: var(--purple-950, #14002b); }

.demo__win {
  position: relative; overflow: hidden; border-radius: 16px; background: #fff; color-scheme: light;
  border: 1px solid rgba(239, 243, 255, .22);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .4), 0 0 80px rgba(125, 99, 254, .22);
}
.demo__bar { display: flex; align-items: center; gap: 12px; height: 40px; padding-inline: 14px; background: #ece9f1; border-block-end: 1px solid #ded9e1; color: #14002b; }
.demo__dots { display: flex; gap: 6px; }
.demo__dots i { width: 10px; height: 10px; border-radius: 50%; background: #c7c0cd; }
.demo__url { flex: 1; max-width: 360px; margin-inline: auto; padding: 3px 12px; border-radius: 999px; background: #fff; color: #675e70; font-size: 12.5px; text-align: center; direction: ltr; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo__open {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: #330066; color: #fff;
  font-weight: 900; font-size: 13px; text-decoration: none; white-space: nowrap; transition: background-color .18s ease;
}
.demo__open:hover { background: #5b00c4; }
.demo__open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.demo__view { position: relative; overflow: hidden; background: #f7f7f7; }
.demo__stage { position: absolute; top: 0; left: 0; transform-origin: top left; } /* rtl-ok: the stage is a fixed-size box scaled from its corner */
.demo__stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; opacity: 0; transition: opacity .3s ease; }
.demo__stage iframe.is-live { opacity: 1; }
.demo__stage iframe[hidden] { display: none; }
.demo__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; background: #f7f7f7; animation: demo-in .3s ease both; }
.demo__view.is-fallback { height: auto !important; }
.demo__view.is-fallback .demo__stage { position: static; width: auto !important; height: auto !important; transform: none !important; }
.demo__view.is-fallback .demo__poster { position: static; height: auto; display: block; }

.demo__note { margin-block-start: 14px; color: var(--ink-muted, #b4afca); font-size: 13.5px; text-align: center; }

@media (max-width: 699px) {
  .demo__dots { display: none; }
  .demo__url { margin-inline: 0; max-width: none; }
  .demo__tab { padding-inline: 14px; font-size: 14px; }
}
@keyframes demo-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes demo-pulse { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
@media (prefers-reduced-motion: reduce) {
  .demo *, .demo *::before, .demo *::after { animation: none !important; transition: none !important; }
}
