.demo-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-elev-1) 0%, var(--bg-elev-2) 100%);
  overflow: hidden;
}
.demo-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.demo-replay {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 5;
}

/* --- WhatsApp demos (shared) --- */
.demo-wrap--whatsapp {
  background: #0b141a;
  border-color: #222d34;
}
.demo-wrap--whatsapp:has(.req-demo) {
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
}
.demo-wrap--whatsapp::before {
  display: none;
}

/* Native scrollbars default to light chrome — hide in mockups (scroll still works). */
.demo-wrap--whatsapp .wa-thread-body,
.demo-wrap--whatsapp .wa-list-items,
.demo-wrap--whatsapp .wa-phone-body,
.demo-wrap--whatsapp .chat-thread-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.demo-wrap--whatsapp .wa-thread-body::-webkit-scrollbar,
.demo-wrap--whatsapp .wa-list-items::-webkit-scrollbar,
.demo-wrap--whatsapp .wa-phone-body::-webkit-scrollbar,
.demo-wrap--whatsapp .chat-thread-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.req-demo {
  container-type: inline-size;
  container-name: req-demo;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  height: clamp(400px, 72vh, 560px);
  background: #0b141a;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 48px rgba(0, 0, 0, 0.45);
}
.req-demo > .wa-inbox,
.req-demo > .wa-thread-panel {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.req-demo > .wa-inbox {
  flex: 0 0 clamp(132px, 38%, 340px);
  width: clamp(132px, 38%, 340px);
  max-width: 340px;
  border-right: none;
}
.req-demo > .wa-thread-panel {
  flex: 1 1 0;
  width: 0;
  border-left: 1px solid #222d34;
  padding: 0;
  position: static;
}
.req-demo > .wa-thread-panel .wa-thread-head {
  width: 100%;
  box-sizing: border-box;
}
.req-demo .wa-list-head {
  min-height: 59px;
  padding: 10px 18px;
  box-sizing: border-box;
}
@container req-demo (min-width: 560px) {
  .req-demo {
    height: clamp(440px, 70vh, 520px);
  }
  .req-demo > .wa-inbox {
    flex: 0 0 clamp(260px, 32%, 340px);
    width: clamp(260px, 32%, 340px);
  }
}
@container req-demo (max-width: 420px) {
  .req-demo .wa-list-search span {
    display: none;
  }
  .req-demo .wa-list-head {
    padding: 12px 12px 8px;
  }
  .req-demo .wa-list-title {
    font-size: 17px;
  }
  .req-demo .wa-list-actions {
    gap: 12px;
  }
  .req-demo .wa-chat-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
  }
  .req-demo .wa-chat-avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }
  .req-demo .wa-chat-name {
    font-size: 14px;
  }
  .req-demo .wa-chat-preview {
    font-size: 12px;
  }
  .req-demo .wa-chat-time {
    font-size: 11px;
  }
  .req-demo .wa-chat-badge {
    min-width: 18px;
    height: 18px;
    font-size: 11px;
  }
  .req-demo .wa-head-actions svg:last-child {
    display: none;
  }
}

/* Inbox (left pane) */
.wa-inbox,
.wa-chat-list {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #111b21;
  border-right: 1px solid #222d34;
}
.wa-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  background: #202c33;
  color: #e9edef;
}
.wa-list-title {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.wa-list-actions {
  display: inline-flex;
  gap: 18px;
  color: #aebac1;
}
.wa-list-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 12px 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #202c33;
  color: #8696a0;
  font-size: 13px;
}
.wa-list-items {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.wa-chat-item {
  display: grid;
  grid-template-columns: 49px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 180ms ease-out;
}
.wa-chat-item:hover {
  background: #233138;
}
.wa-chat-item.is-active,
.wa-chat-item.is-focus {
  background: #2a3942;
}
.wa-chat-avatar {
  width: 49px;
  height: 49px;
  border-radius: 50%;
  background: #6b7c85;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.wa-chat-avatar--thread,
.wa-chat-avatar--phone {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

/* Split-pane conversation (requests demo) */
.wa-thread-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  position: static;
  background: #0b141a;
}
.wa-thread-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  height: 59px;
  min-height: 59px;
  box-sizing: border-box;
  background: #202c33;
  color: #e9edef;
  border-bottom: 1px solid #2a3942;
  flex-shrink: 0;
  box-sizing: border-box;
}
.wa-thread-head .wa-chat-avatar--thread {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  margin: 0;
  align-self: center;
}
.wa-thread-head .wa-head-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  min-width: 0;
  gap: 1px;
}
.wa-thread-head .wa-head-name,
.wa-thread-head .wa-head-status {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}
.wa-thread-head .wa-head-actions {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  gap: 22px;
  margin: 0;
  padding: 0;
  height: auto;
  color: #aebac1;
}
.wa-thread-head .wa-head-actions svg {
  display: block;
  flex-shrink: 0;
}
.wa-thread-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  background-color: #0b141a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='0.028'%3E%3Cpath d='M14 10h4v4h-4zM44 50h4v4h-4zM64 20h4v4h-4zM24 64h4v4h-4z'/%3E%3C/g%3E%3C/svg%3E");
}
.wa-thread-body > .wa-messages {
  min-height: 0;
}
.wa-thread-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  min-height: 59px;
  background: #202c33;
  border-top: 1px solid #2a3942;
  flex-shrink: 0;
  box-sizing: border-box;
}
.wa-thread-composer .wa-composer-plus,
.wa-thread-composer .wa-composer-mic {
  flex-shrink: 0;
  align-self: center;
  margin: 0;
}
.wa-thread-composer .wa-composer-field {
  flex: 1;
  align-self: center;
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 14px;
  border-radius: 8px;
  background: #2a3942;
  font-size: 15px;
  line-height: 1.25;
  color: #8696a0;
}
.wa-composer-plus {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: #8696a0;
}
.wa-day-chip {
  align-self: center;
  margin: 8px auto 10px;
  padding: 5px 12px 6px;
  border-radius: 8px;
  background: #182229;
  color: #8696a0;
  font-size: 12px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.wa-chat-main { min-width: 0; }
.wa-chat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wa-chat-name {
  font-size: 16px;
  color: #e9edef;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-chat-time {
  font-size: 12px;
  color: #8696a0;
  flex-shrink: 0;
}
.wa-chat-preview {
  font-size: 14px;
  color: #8696a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.wa-chat-badge {
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #00a884;
  color: #111b21;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease-out, color 200ms ease-out;
}
.wa-chat-item.is-approved .wa-chat-badge {
  background: transparent;
  color: #53bdeb;
  min-width: auto;
  padding: 0;
  font-size: 14px;
}

/* WhatsApp phone shell */
.wa-phone {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  min-height: 380px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0b141a;
  overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.35);
}
.wa-phone--solo {
  max-width: 360px;
}
.wa-phone--slim .wa-phone-head {
  padding-top: 10px;
}
.wa-phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 2px;
  background: #202c33;
  color: #e9edef;
  font-size: 12px;
  font-weight: 600;
}
.wa-phone-icons {
  display: inline-flex;
  gap: 4px;
  align-items: flex-end;
}
.wa-phone-icons span {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: #e9edef;
}
.wa-phone-icons span:nth-child(1) { height: 4px; }
.wa-phone-icons span:nth-child(2) { height: 6px; }
.wa-phone-icons span:nth-child(3) { height: 8px; }

.wa-phone-head {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 10px;
  background: #202c33;
  color: #e9edef;
}
.wa-back {
  display: inline-flex;
  color: #00a884;
}
.wa-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #6b7c85;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 500;
}
/* legacy alias */
.wa-phone-head .wa-chat-avatar { margin: 0; }
.wa-head-meta { min-width: 0; }
.wa-head-name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-head-status {
  font-size: 13px;
  color: #8696a0;
  line-height: 1.2;
}
.wa-head-actions {
  display: inline-flex;
  gap: 18px;
  color: #aebac1;
}

.wa-phone-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background-color: #0b141a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='0.028'%3E%3Cpath d='M14 10h4v4h-4zM44 50h4v4h-4zM64 20h4v4h-4zM24 64h4v4h-4z'/%3E%3C/g%3E%3C/svg%3E");
}
.wa-messages {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 14px;
  min-height: 100%;
}

.wa-phone-composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  background: #202c33;
  color: #8696a0;
}
.wa-composer-emoji { font-size: 20px; line-height: 1; }
.wa-composer-field {
  padding: 9px 12px;
  border-radius: 8px;
  background: #2a3942;
  font-size: 15px;
}
.wa-composer-mic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #8696a0;
  flex-shrink: 0;
}
.wa-composer-mic svg {
  display: block;
}

/* Message bubbles */
.wa-bubble {
  position: relative;
  display: flex;
  max-width: min(88%, 320px);
  font-size: 14.2px;
  line-height: 1.4;
  color: #e9edef;
  animation: waBubbleIn 260ms var(--ease-out) both;
}
.wa-thread-panel .wa-bubble,
.chat-thread .wa-bubble {
  max-width: min(92%, 300px);
}
.wa-bubble-inner {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 2px 6px;
  padding: 6px 8px 7px 10px;
  border-radius: 8px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.wa-bubble-text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  white-space: pre-wrap;
}
.wa-bubble--in {
  align-self: flex-start;
  margin-right: auto;
}
.wa-bubble--in .wa-bubble-inner {
  background: #202c33;
  border-top-left-radius: 2px;
}
.wa-bubble--in::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 6px 8px 0;
  border-color: transparent #202c33 transparent transparent;
}
.wa-bubble--out {
  align-self: flex-end;
  margin-left: auto;
}
.wa-bubble--out .wa-bubble-inner {
  background: #005c4b;
  border-top-right-radius: 2px;
}
.wa-bubble--out::before {
  content: '';
  position: absolute;
  right: -6px;
  top: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 8px 6px;
  border-color: transparent transparent transparent #005c4b;
}
.wa-bubble-meta {
  position: static;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding-top: 2px;
  font-size: 11px;
  line-height: 1;
  color: rgba(233, 237, 239, 0.55);
  white-space: nowrap;
}
.wa-bubble--out .wa-bubble-meta { color: rgba(233, 237, 239, 0.55); }
.wa-ticks {
  display: inline-flex;
  color: #53bdeb;
  line-height: 0;
}
@keyframes waBubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-thread .wa-bubble {
  animation: waBubbleIn 320ms var(--ease-out) both;
  animation-delay: var(--bubble-delay, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .chat-thread .wa-bubble { animation: none; }
}

/* Telegram variant */
.wa-phone--tg .wa-phone-head,
.wa-phone--tg .wa-phone-status,
.wa-phone--tg .wa-phone-composer {
  background: #17212b;
}
.wa-phone--tg .wa-back { color: #6ab2f2; }
.wa-phone--tg .wa-phone-body { background-color: #0e1621; }
.wa-phone--tg .wa-bubble--in .wa-bubble-inner,
.chat-thread--tg .wa-bubble--in .wa-bubble-inner { background: #182533; }
.wa-phone--tg .wa-bubble--in::before,
.chat-thread--tg .wa-bubble--in::before { border-color: transparent #182533 transparent transparent; }
.wa-phone--tg .wa-bubble--out .wa-bubble-inner,
.chat-thread--tg .wa-bubble--out .wa-bubble-inner { background: #2b5278; }
.wa-phone--tg .wa-bubble--out::before,
.chat-thread--tg .wa-bubble--out::before { border-color: transparent transparent transparent #2b5278; }
.wa-phone--tg .wa-composer-field { background: #242f3d; }

/* --- schedule demo --- */
.sched-demo {
  padding: 20px;
}
.sched-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.sched-toolbar .week {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.sched-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  min-height: 280px;
}

.sched-col {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.sched-col .head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.sched-col .slots {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
}

.slot {
  position: relative;
  border-radius: 4px;
  padding: 4px 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--text);
  min-height: 28px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}
.slot.is-in { opacity: 1; transform: none; }
.slot.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  opacity: 1;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.slot.beg { background: rgba(63, 141, 224, 0.18); border: 1px solid rgba(63, 141, 224, 0.35); }
.slot.int { background: rgba(245, 165, 36, 0.16); border: 1px solid rgba(245, 165, 36, 0.32); }
.slot.kid { background: rgba(63, 224, 122, 0.16); border: 1px solid rgba(63, 224, 122, 0.32); }
.slot .lbl {
  display: block;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sched-col.is-holiday .slots {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 76, 76, 0.06) 0,
    rgba(255, 76, 76, 0.06) 6px,
    transparent 6px,
    transparent 12px
  );
}
.sched-col.is-holiday .off {
  margin: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--danger);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid rgba(255, 76, 76, 0.32);
  border-radius: var(--radius-pill);
  background: rgba(255, 76, 76, 0.08);
}

@media (max-width: 640px) {
  .sched-grid { gap: 4px; }
  .sched-col .head { font-size: 9px; }
  .slot { font-size: 9px; padding: 3px 4px; min-height: 24px; }
  .slot .lbl { display: none; }
}

/* --- chat demo threads --- */
.demo-wrap--whatsapp:has(.chat-demo) {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.chat-demo {
  padding: 0;
  background: transparent;
}
.chat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
@media (min-width: 760px) {
  .chat-grid {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 24px;
  }
}

.chat-thread {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: min(480px, 62vh);
  border-radius: 14px;
  overflow: hidden;
  background: #0b141a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 20px 44px rgba(0, 0, 0, 0.42);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}
.chat-thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #202c33;
  color: #e9edef;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.chat-thread-head .wa-head-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  min-width: 0;
  gap: 1px;
}
.chat-thread-head .wa-head-name,
.chat-thread-head .wa-head-status {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}
.chat-thread-head .wa-brand-avatar,
.chat-thread-head .chat-thread-back {
  align-self: center;
  flex-shrink: 0;
}
.chat-channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}
.chat-channel-badge svg {
  display: block;
  flex-shrink: 0;
}
.chat-channel-badge--wa {
  color: #00a884;
  background: rgba(0, 168, 132, 0.12);
}
.chat-channel-badge--tg {
  color: #6ab3f3;
  background: rgba(106, 179, 243, 0.14);
}
.chat-thread--tg .chat-thread-head {
  background: #17212b;
}
.chat-thread-back {
  display: inline-flex;
  color: #00a884;
  margin-right: -4px;
}
.chat-thread--tg .chat-thread-back {
  color: #6ab3f3;
}
.wa-brand-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  overflow: hidden;
  background: transparent;
  line-height: 0;
  color: #f5f5f5;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.chat-thread--wa .wa-brand-avatar {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 2px rgba(0, 168, 132, 0.35);
}
.chat-thread--tg .wa-brand-avatar {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 2px rgba(106, 179, 243, 0.35);
}
.wa-brand-avatar .logo-mark--avatar,
.wa-brand-avatar .logo-mark-img {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.chat-thread-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background-color: #0b141a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23ffffff' fill-opacity='0.022'%3E%3Ccircle cx='12' cy='18' r='1.2'/%3E%3Ccircle cx='52' cy='8' r='1'/%3E%3Ccircle cx='78' cy='42' r='1.1'/%3E%3Ccircle cx='28' cy='72' r='1'/%3E%3Ccircle cx='88' cy='82' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
}
.chat-thread--tg .chat-thread-body {
  background-color: #0e1621;
}
.chat-thread-body .wa-messages {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px 14px;
  min-height: 100%;
}
.chat-thread .wa-bubble {
  max-width: min(92%, 300px);
}
.ml-demo .chat-thread {
  max-width: 360px;
  margin: 0 auto;
}

/* --- stats demo --- */
.stats-demo {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 760px) {
  .stats-demo { grid-template-columns: repeat(2, 1fr); }
}

.kpi-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.kpi {
  padding: 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.kpi .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.kpi .value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.kpi .delta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.kpi .delta.neg { color: var(--danger); }

.chart-card {
  padding: 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.chart-card .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.chart-card svg {
  width: 100%;
  height: 100px;
  overflow: visible;
}
.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-area {
  fill: url(#chartGrad);
  opacity: 0.6;
}
.h-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
  justify-content: center;
}
.h-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 22px;
}
.h-bar-label {
  flex: 0 0 52px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  line-height: 1;
}
.h-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.h-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  transition: width var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.h-bar-fill.is-top { background: var(--accent); }

.ai-narrative {
  grid-column: 1 / -1;
  padding: 14px 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-narrative .ai-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #2a9c5a);
  flex-shrink: 0;
}
.ai-narrative .ai-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.ai-narrative .ai-text::after {
  content: '▌';
  margin-left: 2px;
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}
.ai-narrative.is-done .ai-text::after { display: none; }
@keyframes blink { 50% { opacity: 0; } }

.demo-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 16px 14px;
}

/* --- multilang demo --- */
.ml-demo {
  padding: 16px;
  background: #111b21;
}
.ml-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: #202c33;
  border: 1px solid #2a3942;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.ml-tabs button {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #8696a0;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.ml-tabs button.is-active {
  color: #e9edef;
  background: #2a3942;
}
