/* Dense demo-data layer: realistic fixtures + restrained live-state animation. */

.demo-live-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted, #9b9a94);
}
.demo-live-dot.running { background: #2f7d5b; animation: demo-live-pulse 1.8s ease-in-out infinite; }
.demo-live-dot.review { background: #b27a2b; }
.demo-live-dot.scheduled { background: #65758b; }
.demo-live-dot.idle { background: #a3a19a; }
@keyframes demo-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 125, 91, .12); }
  50% { box-shadow: 0 0 0 7px rgba(47, 125, 91, 0); }
}

.demo-autopilot-page { max-width: 1380px; }
.demo-run-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border, #dedbd3);
  border-bottom: 1px solid var(--border, #dedbd3);
  margin: 8px 0 22px;
}
.demo-run-summary > div {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  border-right: 1px solid var(--border, #dedbd3);
}
.demo-run-summary > div:last-child { border-right: 0; }
.demo-run-summary strong { font-size: 22px; font-weight: 650; }
.demo-run-summary small { color: var(--muted, #77746d); }

.demo-run-layout {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(460px, 1.35fr);
  gap: 22px;
  align-items: start;
}
.demo-run-layout.workspace { grid-template-columns: minmax(280px, .75fr) minmax(440px, 1.25fr); }
.demo-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.demo-section-head h2 { margin: 3px 0 0; font-size: 18px; }
.demo-section-head small { color: var(--muted, #77746d); }
.demo-run-list { display: grid; gap: 2px; max-height: min(68vh, 700px); overflow: auto; padding-right: 4px; }

.demo-run-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 11px;
  align-items: center;
  text-align: left;
  padding: 13px 10px;
  border: 0;
  border-bottom: 1px solid var(--border, #e3e0d9);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.demo-run-card:hover, .demo-run-card.active { background: var(--surface-2, rgba(126, 119, 103, .07)); }
.demo-run-card > div { min-width: 0; }
.demo-run-card strong, .demo-run-card small { display: block; }
.demo-run-card strong { font-size: 13px; margin-bottom: 4px; }
.demo-run-card small { color: var(--muted, #77746d); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-run-card > b { font-size: 12px; font-weight: 650; }
.demo-run-card > em { font-size: 11px; font-style: normal; color: var(--muted, #77746d); white-space: nowrap; }

.demo-run-detail { min-width: 0; border-left: 1px solid var(--border, #dedbd3); padding-left: 22px; }
.demo-run-detail > header { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.demo-run-detail h2 { margin: 3px 0 7px; font-size: 22px; }
.demo-run-detail header p { margin: 0; color: var(--muted, #6f6c65); line-height: 1.55; max-width: 700px; }
.demo-run-status { white-space: nowrap; font-size: 11px; font-weight: 650; padding: 5px 8px; border-radius: 999px; background: var(--surface-2, #f0eee8); }
.demo-run-status.running { color: #256a4d; }
.demo-run-status.review { color: #9a6420; }
.demo-run-status.scheduled { color: #52657b; }

.demo-progress-track { height: 5px; background: var(--surface-2, #eeece6); overflow: hidden; border-radius: 999px; position: relative; }
.demo-progress-track > span { display: block; height: 100%; border-radius: inherit; background: #3b7961; position: relative; overflow: hidden; }
.demo-progress-track > span::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: demo-progress-scan 2.4s linear infinite;
}
@keyframes demo-progress-scan { to { transform: translateX(100%); } }
.demo-progress-copy { display: flex; justify-content: space-between; gap: 18px; margin: 7px 0 18px; color: var(--muted, #77746d); font-size: 12px; }

.demo-flow-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; }
.demo-flow-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-height: 58px;
  position: relative;
}
.demo-flow-steps li::before { content: ''; position: absolute; left: 13px; top: 27px; bottom: -5px; width: 1px; background: var(--border, #dedbd3); }
.demo-flow-steps li:last-child::before { display: none; }
.demo-flow-steps li > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border, #d6d2c9);
  border-radius: 50%;
  background: var(--surface, #fff);
  font-size: 11px;
  z-index: 1;
}
.demo-flow-steps li.done > b { background: #edf6f1; border-color: #b9d7c8; color: #24694b; }
.demo-flow-steps li.active > b { border-color: #77a891; color: #256a4d; animation: demo-step-ring 1.8s ease-in-out infinite; }
@keyframes demo-step-ring { 50% { box-shadow: 0 0 0 6px rgba(47, 125, 91, .08); } }
.demo-flow-steps li > span { padding-top: 2px; }
.demo-flow-steps strong, .demo-flow-steps small { display: block; }
.demo-flow-steps strong { font-size: 13px; margin-bottom: 4px; }
.demo-flow-steps small { color: var(--muted, #77746d); line-height: 1.42; }
.demo-flow-steps.compact li { min-height: 50px; }

.demo-run-footer { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; border-top: 1px solid var(--border, #dedbd3); margin-top: 14px; padding-top: 14px; }
.demo-run-footer > div { display: grid; gap: 2px; }
.demo-run-footer span { font-size: 11px; color: var(--muted, #77746d); }
.demo-run-footer strong { font-size: 12px; }
.demo-run-footer button { margin-left: auto; border: 0; background: transparent; color: inherit; font-weight: 650; cursor: pointer; }
.demo-run-muted { margin-left: auto; }
.demo-safety-note { display: flex; gap: 10px; margin-top: 14px; padding: 12px 0; border-top: 1px solid var(--border, #dedbd3); color: var(--muted, #6f6c65); }
.demo-safety-note > span { width: 22px; height: 22px; border: 1px solid var(--border, #dedbd3); border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.demo-safety-note strong { font-size: 12px; }
.demo-safety-note p { margin: 3px 0 0; font-size: 12px; line-height: 1.5; }

.demo-vibe-page { max-width: 1180px; }
.demo-vibe-now { border-top: 1px solid var(--border, #dedbd3); border-bottom: 1px solid var(--border, #dedbd3); padding: 18px 0 12px; margin-bottom: 26px; }
.demo-vibe-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.demo-vibe-title .demo-live-dot { margin-top: 8px; }
.demo-vibe-title h2 { margin: 3px 0 6px; font-size: 21px; }
.demo-vibe-title p { margin: 0; color: var(--muted, #77746d); }
.demo-vibe-chats { margin-top: 24px; }
.demo-vibe-thread-list { display: grid; }
.demo-vibe-thread-list button {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 4px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border, #e1ded6);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.demo-vibe-thread-list button:hover { background: var(--surface-2, rgba(126, 119, 103, .06)); }
.demo-vibe-thread-list strong, .demo-vibe-thread-list small { display: block; }
.demo-vibe-thread-list small { color: var(--muted, #77746d); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-vibe-thread-list b { font-size: 12px; font-weight: 650; }
.demo-vibe-thread-list em { font-style: normal; color: var(--muted, #77746d); }

.demo-chat-run-strip {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  align-items: center;
  gap: 11px;
  margin: 8px 24px 14px;
  padding: 10px 12px;
  border-top: 1px solid var(--border, #dedbd3);
  border-bottom: 1px solid var(--border, #dedbd3);
}
.demo-chat-run-strip strong, .demo-chat-run-strip small { display: block; }
.demo-chat-run-strip strong { font-size: 12px; }
.demo-chat-run-strip small { margin-top: 2px; color: var(--muted, #77746d); font-size: 11px; }
.demo-chat-run-strip > b { font-size: 12px; }
.demo-chat-running { display: flex; gap: 3px; }
.demo-chat-running i { width: 4px; height: 4px; border-radius: 50%; background: #5e806f; animation: demo-dot 1.2s ease-in-out infinite; }
.demo-chat-running i:nth-child(2) { animation-delay: .16s; }
.demo-chat-running i:nth-child(3) { animation-delay: .32s; }
@keyframes demo-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-3px); opacity: 1; } }

.conversation-mini-list.dense { max-height: 340px; overflow: auto; }
.conversation-mini-more { padding: 8px 12px 4px 34px; font-size: 11px; color: var(--muted, #77746d); }
.demo-inbox-list { display: grid; border-top: 1px solid var(--border, #dedbd3); }
.demo-inbox-list button { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 12px; align-items: center; text-align: left; padding: 14px 2px; border: 0; border-bottom: 1px solid var(--border, #dedbd3); background: transparent; color: inherit; }
.demo-inbox-list button > span { width: 7px; height: 7px; border-radius: 50%; background: #9d9a92; }
.demo-inbox-list strong, .demo-inbox-list small { display: block; }
.demo-inbox-list small { margin-top: 3px; color: var(--muted, #77746d); }
.demo-inbox-list b { font-size: 11px; font-weight: 650; color: var(--muted, #77746d); }

@media (max-width: 1100px) {
  .demo-run-layout, .demo-run-layout.workspace { grid-template-columns: 1fr; }
  .demo-run-detail { border-left: 0; border-top: 1px solid var(--border, #dedbd3); padding-left: 0; padding-top: 18px; }
  .demo-run-list { max-height: 360px; }
}
@media (max-width: 760px) {
  .demo-run-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .demo-run-summary > div:nth-child(2) { border-right: 0; }
  .demo-run-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--border, #dedbd3); }
  .demo-run-card { grid-template-columns: auto minmax(0,1fr) auto; }
  .demo-run-card > em { display: none; }
  .demo-run-detail > header { display: grid; }
  .demo-run-status { justify-self: start; }
  .demo-run-footer { display: grid; grid-template-columns: 1fr 1fr; }
  .demo-run-footer button, .demo-run-muted { margin-left: 0; grid-column: 1 / -1; text-align: left; }
  .demo-chat-run-strip { margin-inline: 12px; grid-template-columns: auto minmax(0,1fr) auto; }
  .demo-chat-running { display: none; }
  .demo-vibe-thread-list button { grid-template-columns: auto minmax(0,1fr) auto; }
  .demo-vibe-thread-list em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-live-dot.running,
  .demo-flow-steps li.active > b,
  .demo-progress-track > span::after,
  .demo-chat-running i { animation: none !important; }
}