.demo-hero {
  padding: 86px clamp(20px, 5vw, 64px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16, 36, 31, 0.94), rgba(16, 36, 31, 0.76)),
    url("https://images.unsplash.com/photo-1621905252507-b35492cc74b4?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
}

.demo-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: end;
}

.demo-hero h1 {
  max-width: 860px;
  font-size: clamp(2.8rem, 7vw, 5.7rem);
}

.demo-status {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(10, 23, 20, 0.7);
}

.demo-status span,
.demo-status small {
  color: rgba(255, 255, 255, 0.72);
}

.demo-status strong {
  font-size: 1.22rem;
}

.demo-surface {
  background: var(--mist);
}

.scenario-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.demo-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--forest);
  background: var(--surface);
  cursor: pointer;
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.scenario-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.scenario-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.scenario-tab svg {
  width: 18px;
  height: 18px;
  color: var(--lake);
}

.scenario-tab.is-active {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.scenario-tab.is-active svg {
  color: #fff;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  grid-template-areas:
    "call summary"
    "call actions";
  gap: 18px;
  align-items: stretch;
}

.demo-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(22, 41, 35, 0.07);
}

.call-panel {
  grid-area: call;
  min-height: 570px;
}

.summary-panel {
  grid-area: summary;
}

.action-panel {
  grid-area: actions;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading svg {
  width: 19px;
  height: 19px;
  color: var(--forest);
}

.panel-heading h3 {
  margin: 0;
}

.call-window {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 500px;
  padding: 20px;
}

.message {
  display: grid;
  gap: 4px;
  width: min(86%, 640px);
  padding: 13px 14px;
  border-radius: 8px;
}

.message span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message.ai {
  justify-self: start;
  color: var(--ink);
  background: #edf5f0;
}

.message.caller {
  justify-self: end;
  color: #fff;
  background: var(--lake);
}

.message.system {
  justify-self: center;
  width: 100%;
  color: #5f451f;
  background: var(--warn);
}

.handoff-grid,
.action-list {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
}

.handoff-item,
.action-item {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0ec;
}

.handoff-item.pending,
.action-item.pending {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8faf7;
}

.handoff-item span,
.action-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.handoff-item strong,
.action-item strong {
  line-height: 1.25;
}

.route-box {
  margin: 0 20px 20px;
  padding: 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--forest);
  font-weight: 760;
}

.route-box.pending {
  color: var(--muted);
  background: #f1f4f0;
}

.demo-close {
  background: var(--surface);
}

@media (max-width: 920px) {
  .demo-hero-grid,
  .demo-grid,
  .scenario-tabs {
    grid-template-columns: 1fr;
  }

  .demo-grid {
    grid-template-areas:
      "call"
      "summary"
      "actions";
  }

  .scenario-header {
    align-items: start;
    flex-direction: column;
  }

  .call-panel {
    min-height: auto;
  }

  .call-window {
    min-height: 380px;
  }
}

@media (max-width: 520px) {
  .demo-controls {
    width: 100%;
    align-items: stretch;
  }

  .demo-controls .button {
    width: auto;
    flex: 1;
  }

  .message {
    width: 100%;
  }
}
