/* Shared layout for the demo overlay and the concept switcher.
   Each concept sets the --demo-* tokens to its own palette. */

.demo {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--demo-scrim, rgba(5, 4, 3, 0.82));
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.demo.is-open { opacity: 1; }

.demo__panel {
  width: min(1200px, 100%);
  background: var(--demo-panel, #111);
  color: var(--demo-ink, #fff);
  border-radius: var(--demo-radius, 12px);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.demo.is-open .demo__panel { transform: none; }

.demo__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  font-family: var(--demo-font, system-ui);
}
.demo__title { font-weight: 700; }
.demo__tag { opacity: 0.6; font-size: 0.85em; margin-right: auto; }
.demo__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.demo__close:hover { background: rgba(127, 127, 127, 0.2); }

.demo__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - 120px);
  background: #000 center / cover no-repeat;
  display: grid;
  place-items: center;
}
.demo__stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.demo__gate,
.demo__note {
  display: grid;
  gap: 10px;
  max-width: 440px;
  margin: 16px;
  padding: 24px;
  text-align: center;
  background: var(--demo-card, rgba(10, 8, 6, 0.86));
  color: var(--demo-ink, #fff);
  border-radius: var(--demo-radius, 12px);
  font-family: var(--demo-font, system-ui);
  line-height: 1.45;
}
.demo__gate strong,
.demo__note strong { font-size: 1.15em; }
.demo__gate span,
.demo__note span { opacity: 0.75; font-size: 0.92em; }
.demo__actions { display: flex; gap: 10px; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
.demo__btn {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.demo__btn--yes { background: var(--demo-accent, #fff); border-color: var(--demo-accent, #fff); color: var(--demo-on-accent, #000); }

@media (max-width: 640px) {
  .demo { padding: 0; align-items: end; }
  .demo__panel { border-radius: 16px 16px 0 0; }
  .demo__stage { aspect-ratio: 3 / 4; }
  .demo__tag { display: none; }
}

/* Review aid only */
.concept-switch {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 90;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.88);
  color: #fff;
  font: 600 12px/1 system-ui, sans-serif;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.concept-switch span { padding: 0 8px; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.concept-switch a { color: inherit; text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.concept-switch a[aria-current] { background: #fff; color: #111; }
@media (max-width: 480px) {
  .concept-switch span { display: none; }
  .concept-switch a { padding: 8px 9px; }
}
