.teams-public-demo {
  margin: 32px 0;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid rgba(23, 109, 89, 0.18);
  border-radius: 28px;
  background: linear-gradient(
    135deg,
    rgba(23, 109, 89, 0.1),
    rgba(255, 255, 255, 0.72)
  );
}

.teams-public-demo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.teams-public-demo-title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.teams-public-demo-browser > p {
  max-width: 720px;
  margin: 12px 0 0;
  line-height: 1.6;
}

.teams-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.teams-demo-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(23, 109, 89, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.teams-demo-card h2 {
  margin: 12px 0 8px;
}

.teams-demo-card p {
  min-height: 3.2em;
  margin: 0;
  line-height: 1.5;
}

.teams-demo-card small,
.teams-public-demo-note {
  color: #64746c;
}

.teams-demo-card small {
  display: block;
  margin-top: 14px;
}

.teams-demo-card .btn {
  width: 100%;
  margin-top: auto;
  padding-top: 18px;
}

.teams-demo-readonly-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: #8a4a00;
  background: #fff0ce;
  font-size: 0.78rem;
  font-weight: 800;
}

.teams-demo-detail-tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 18px;
  overflow-x: auto;
}

.teams-demo-detail-tabs button {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 999px;
  color: #176d59;
  background: transparent;
  cursor: pointer;
}

.teams-demo-detail-tabs button.is-active {
  color: #fff;
  background: #176d59;
}

.teams-demo-detail-content {
  min-height: 150px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(23, 109, 89, 0.08);
}

.teams-demo-selected .teams-demo-detail-content {
  display: grid;
  gap: 12px;
}

.teams-demo-selected .teams-demo-detail-content h3,
.teams-demo-selected .teams-demo-detail-content p {
  margin: 0;
}

.teams-demo-detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.teams-demo-detail-note {
  flex: 1 1 220px;
  margin: 0;
  color: #64746c;
  font-size: 0.86rem;
}

.teams-demo-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #176d59;
  background: rgba(23, 109, 89, 0.12);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.teams-public-demo-note {
  margin: 18px 0 0;
  font-size: 0.88rem;
}

@media (max-width: 760px) {
  .teams-public-demo-header {
    align-items: stretch;
    flex-direction: column;
  }

  .teams-demo-grid {
    grid-template-columns: 1fr;
  }

  .teams-demo-card p {
    min-height: 0;
  }
}

/* Keep the demo section toggle in the header's upper-right corner. */
.teams-public-demo-header {
  flex-wrap: nowrap;
}

.teams-public-demo-header > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.teams-public-demo-header > button {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: auto;
}

@media (max-width: 640px) {
  .teams-public-demo-header {
    align-items: flex-start;
  }
}
