/* ---- DEMO METADATA STRIP ---- */
.demo-meta {
  display: flex;
  gap: 2px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.demo-meta-item {
  flex: 1;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 18px 22px;
}

.demo-meta-item:first-child { border-radius: 8px 0 0 8px; }
.demo-meta-item:last-child { border-radius: 0 8px 8px 0; }

.demo-meta-key {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.demo-meta-val {
  display: block;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--fg);
}

/* ---- FLOW DIAGRAM ---- */
.flow-diagram {
  max-width: 680px;
  margin: 0 auto 64px;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-arrow {
  font-size: 1.5rem;
  color: var(--border);
  margin: 4px 0;
  line-height: 1;
}

/* ---- FLOW NODES ---- */
.flow-node {
  width: 100%;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.flow-node:hover { border-color: rgba(0,255,136,0.3); }

.flow-node-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.flow-node-source {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.flow-node-title {
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.flow-node-detail {
  color: var(--fg-muted);
  font-size: 0.87rem;
  line-height: 1.6;
}

/* Node color variants */
.flow-node-trigger { border-color: rgba(0,255,136,0.25); }
.flow-node-ai { border-color: rgba(180,100,255,0.25); }
.flow-node-crm { border-color: rgba(0,180,255,0.25); }
.flow-node-outcome { border-color: rgba(0,255,136,0.35); background: rgba(0,255,136,0.04); }
.flow-node-sequence { border-color: rgba(255,180,0,0.25); }

/* ---- BRANCH ---- */
.flow-step-branch {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-branch-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.flow-branches {
  display: flex;
  gap: 16px;
  width: 100%;
  align-items: flex-start;
}

.flow-branch { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.flow-branch-divider {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  align-self: center;
  flex-shrink: 0;
  padding: 8px 4px;
}

.flow-branch-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  align-self: flex-start;
}

.tag-pass { background: rgba(0,255,136,0.1); color: var(--accent); border: 1px solid rgba(0,255,136,0.3); }
.tag-fail { background: rgba(255,68,68,0.08); color: #ff7777; border: 1px solid rgba(255,68,68,0.25); }

.flow-arrow-single { margin-top: 4px; }

/* ---- PARSED TAGS ---- */
.parsed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg-muted);
}

.tag-intent { border-color: rgba(0,255,136,0.3); color: var(--accent); background: var(--accent-glow); }

/* ---- SEQUENCE STEPS ---- */
.flow-sequence-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.seq-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.87rem;
}

.seq-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-dim);
  width: 36px;
  flex-shrink: 0;
  padding-top: 2px;
}

.seq-action { color: var(--fg-muted); line-height: 1.5; }

/* ---- STATS STRIP ---- */
.demo-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-bottom: 56px;
}

.demo-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
}

.demo-stat:first-child { border-radius: 8px 0 0 8px; }
.demo-stat:last-child { border-radius: 0 8px 8px 0; }

.demo-stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.demo-stat-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.4;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .demo-meta { flex-direction: column; }
  .demo-meta-item { border-radius: 0; }
  .demo-meta-item:first-child { border-radius: 8px 8px 0 0; }
  .demo-meta-item:last-child { border-radius: 0 0 8px 8px; }
  .flow-branches { flex-direction: column; }
  .flow-branch-divider { align-self: flex-start; }
  .demo-stats { grid-template-columns: 1fr 1fr; }
  .demo-stat:first-child, .demo-stat:last-child { border-radius: 0; }
  .demo-stat:nth-child(1) { border-radius: 8px 0 0 0; }
  .demo-stat:nth-child(2) { border-radius: 0 8px 0 0; }
  .demo-stat:nth-child(3) { border-radius: 0 0 0 8px; }
  .demo-stat:nth-child(4) { border-radius: 0 0 8px 0; }
}
