/* How-To Demos modal (T-311). New file — tour.css already carries the
   unrelated .help-* block as a lodger, this doesn't join it. Styled on the
   .research-modal content shell (research.css:419-472), which is already a
   scrollable-body dialog. Tokens only. */

.demos-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--shadow-rgb), 0.4);
  animation: demos-fade var(--speed) ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .demos-overlay { animation: none; }
}

@keyframes demos-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.demos-modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  width: min(640px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(var(--shadow-rgb), 0.28);
}

.demos-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.demos-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.demos-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.demos-back {
  display: block;
  background: transparent;
  border: none;
  padding: 0 0 6px;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: color var(--speed);
}

.demos-back:hover { color: var(--text); }

.demos-close {
  background: transparent;
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background var(--speed), color var(--speed);
  flex-shrink: 0;
}

.demos-close:hover {
  background: var(--bg-warm);
  color: var(--text);
}

.demos-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
}

.demos-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demos-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  transition: border-color var(--speed), background var(--speed);
}

.demos-card:hover {
  border-color: var(--gold);
  background: var(--bg-warm);
}

.demos-card-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.demos-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demos-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.demos-card-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.demos-body-player {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demos-player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-warm);
}

.demos-player-frame iframe,
.demos-player-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.demos-player-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
