:root {
  --bg: #0a0a0b;
  --surface: #111113;
  --surface-2: #18181b;
  --border: #27272a;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success: #22c55e;
  --radius: 8px;
  --font-text: 'Century Gothic', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-numbers: 'DM Sans', 'Century Gothic', 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* State 1: Configuration Screen */
#config-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at 50% 30%, #002244 0%, #001226 60%, #0a0a0b 100%);
}

.config-card {
  width: 100%;
  max-width: 440px;
  background: rgba(17, 17, 19, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.brand-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.config-card h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.config-card .subtitle {
  margin: 0 0 24px 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

.avatar-select-group {
  margin-bottom: 24px;
}

.config-card label {
  display: block;
  margin-bottom: 8px;
  color: #d4d4d8;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.avatar-select {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid #3f3f46;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.avatar-select:focus,
.avatar-select:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.connect-btn,
.config-card button {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.connect-btn:hover,
.config-card button:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.connect-btn:active,
.config-card button:active {
  transform: translateY(1px);
}

.connect-btn:disabled,
.config-card button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* State 2: Live Booth Experience (Stage Left/Center, Sidebar Right) */
#call-screen {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Full Video Stage with Zscaler Booth Visual Mesh Gradient */
#stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #003a63 0%, #00152e 60%, #000c1f 100%);
  overflow: hidden;
}

#stage::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(0, 145, 213, 0.15) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* Dynamic Stage Background Layer (Zscaler Blue / Navy Zenith Live Palette in Dashboard Mode) */
.stage-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 58, 99, 0.35), rgba(0, 21, 46, 0.75)),
              radial-gradient(circle at 50% 30%, #003a63 0%, #00152e 65%, #000c1f 100%);
  opacity: 0;
  transition: opacity 0.6s ease, background 0.6s ease;
  z-index: 1;
}

#call-screen[data-stage='dashboard'] .stage-background,
#call-screen[data-stage='customer-story'] .stage-background {
  opacity: 1;
}

/* ThreatLabz Stage Background (Figma node 42-4730 & 42-3886 Dark Red/Maroon Mesh) */
#call-screen[data-stage='threatlabz'] .stage-background {
  opacity: 1;
  background: linear-gradient(135deg, rgba(30, 6, 15, 0.95), rgba(12, 3, 7, 0.98)),
              radial-gradient(circle at 80% 50%, #3b0712 0%, #1a040b 55%, #080104 100%);
}

#call-screen[data-stage='threatlabz'] #stage::before {
  background-image: radial-gradient(rgba(244, 63, 94, 0.22) 1px, transparent 1px);
}

/* Avatar Container Layer: Full Stage in Intro, PIP Tile in Dashboard (Bottom-Right Media Anchor), Left-Split in ThreatLabz */
.avatar-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid transparent;
  transition: inset 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.5s ease,
              border-color 0.5s ease;
}

/* ThreatLabz Mode: Avatar stays full height on Left side with rounded right edge (Figma 42-3886 & 6-4292) */
#call-screen[data-stage='threatlabz'] .avatar-layer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(100% - 430px);
  max-width: 58vw;
  height: 100vh;
  overflow: hidden;
  border-radius: 0 24px 24px 0;
  z-index: 5;
  pointer-events: none;
}

#call-screen[data-stage='threatlabz'] .avatar-video,
#call-screen[data-stage='threatlabz'] .avatar-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 0 24px 24px 0;
}

.avatar-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  border-radius: inherit;
}

.avatar-canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  transform: scale(1.15);
  transform-origin: center bottom;
  transition: transform 0.6s ease;
}

/* Customer Story Mode: Avatar docks precisely inside the designated media slot in the BOTTOM-RIGHT quadrant */
#call-screen[data-stage='dashboard'] .avatar-layer,
#call-screen[data-stage='customer-story'] .avatar-layer {
  position: absolute;
  right: clamp(24px, 2.5vw, 36px);
  top: calc(62% + 19%);
  transform: translateY(-50%);
  bottom: auto;
  left: auto;
  width: clamp(220px, 20vw, 300px);
  height: clamp(140px, 12.5vw, 190px);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.4);
  z-index: 25;
  overflow: hidden;
  pointer-events: auto;
}

#call-screen[data-stage='dashboard'] .avatar-video,
#call-screen[data-stage='dashboard'] .avatar-canvas,
#call-screen[data-stage='customer-story'] .avatar-video,
#call-screen[data-stage='customer-story'] .avatar-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.video-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.video-container.keyed {
  opacity: 0;
  pointer-events: none;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Cold-Start Loading Curtain Overlay */
.loading-curtain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 11, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.5s ease;
}

.loading-curtain.fading {
  opacity: 0;
  pointer-events: none;
}

.curtain-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Case Study Dashboard Layer (BEHIND Avatar Layer: z-index 10) */
.booth-dashboard-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 10;
}

#call-screen[data-stage='dashboard'] .booth-dashboard-layer,
#call-screen[data-stage='customer-story'] .booth-dashboard-layer {
  opacity: 1;
  pointer-events: auto;
}

#call-screen[data-stage='threatlabz'] .booth-dashboard-layer {
  position: absolute;
  right: 0;
  left: auto;
  top: 0;
  bottom: 0;
  width: 430px;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  z-index: 10;
  opacity: 1;
  pointer-events: auto;
}

/* Enterprise Placeholder Dashboard Card (High-Contrast White Layout) */
.dashboard-card {
  position: relative;
  width: 100%;
  max-width: 880px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  color: #0c1f2e;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.4s ease;
  animation: slideUp 0.4s ease-out;
}

/* ThreatLabz Specialized Research Card Theme (Figma node 42-4730 / 42-3886 / 6-4292) */
.dashboard-card.threatlabz-card {
  background: #0a0205;
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(244, 63, 94, 0.2);
  color: #f8fafc;
  border-radius: 20px;
  padding: 26px 28px;
  gap: 14px;
}

#call-screen[data-stage='threatlabz'] .dashboard-card.threatlabz-card {
  margin: 0;
  width: 100%;
  max-width: 390px;
}

.tl-figma-brand-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.tl-brand-sub {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.tl-brand-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
}

.tl-brand-year {
  color: #f43f5e;
  font-size: 16px;
  vertical-align: super;
  font-weight: 800;
  margin-left: 2px;
}

.tl-pill-badge {
  display: inline-block;
  margin-top: 8px;
  border: 1px solid #f43f5e;
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.08);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tl-dashboard-title {
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 6px;
  margin-bottom: 2px;
  line-height: 1.3;
  letter-spacing: -0.1px;
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.25);
  transition: opacity 0.2s ease-in-out;
}

.dashboard-card.card-updating {
  opacity: 0.3;
  transition: opacity 0.12s ease-out;
}

/* Figma 42-3886 / 6-4292 ThreatLabz Typography & Inset Stat Box */
.tl-huge-stat-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.tl-huge-stat-value {
  font-family: var(--font-numbers);
  font-size: 64px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -1.5px;
  text-shadow: 0 0 16px rgba(244, 63, 94, 0.3);
}

.tl-huge-stat-label {
  font-family: var(--font-text);
  font-size: 18px;
  font-weight: 500;
  color: #f1f5f9;
  line-height: 1.35;
}

.tl-secondary-stat-box {
  background: rgba(22, 6, 12, 0.95);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  margin-bottom: 6px;
  box-shadow: inset 0 0 12px rgba(244, 63, 94, 0.1);
}

.tl-sec-stat-value {
  font-family: var(--font-numbers);
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.tl-sec-stat-label {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  color: #94a3b8;
  line-height: 1.3;
}

.tl-red-accent-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #ef4444 0%, #f43f5e 65%, transparent 100%);
  margin: 6px 0;
}

.tl-citation-footer {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  text-align: left;
}

#call-screen[data-stage='dashboard'] .dashboard-card,
#call-screen[data-stage='customer-story'] .dashboard-card {
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

/* ============================================================
   FIGMA NODE 65-5855: 4-QUADRANT CUSTOMER STORY DASHBOARD
   ============================================================ */

.dashboard-card.cs-dashboard-card {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
}

.cs-dashboard-card .close-card-btn {
  color: #94a3b8;
  z-index: 30;
  top: 14px;
  right: 18px;
}

.cs-dashboard-card .close-card-btn:hover {
  color: #ffffff;
}

.cs-4quad-container {
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 62% 38%;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* --- QUADRANT 1: TOP-LEFT (White #FFFFFF) --- */
.cs-quad-top-left {
  background: #ffffff;
  padding: clamp(18px, 2vh, 28px) clamp(22px, 2vw, 34px);
  color: #0a1b39;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  height: 100%;
  overflow: hidden;
}

.cs-brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.cs-logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.cs-logo-img {
  max-height: 34px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.cs-logo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-logo-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.cs-brand-name {
  font-family: var(--font-text);
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 800;
  color: #0a1b39;
  letter-spacing: -0.3px;
}

.cs-headline {
  font-family: var(--font-text);
  font-size: clamp(19px, 1.6vw, 25px);
  font-weight: 800;
  color: #0a1b39;
  line-height: 1.2;
  letter-spacing: -0.4px;
  margin: 8px 0 6px 0;
}

.cs-hl-blue {
  color: #0d6efd;
  font-weight: 800;
}

.cs-subtitle {
  font-family: var(--font-text);
  font-size: clamp(12px, 0.9vw, 13.5px);
  font-weight: 400;
  color: #334155;
  line-height: 1.38;
  margin: 0 0 10px 0;
}

.cs-snapshot-box {
  background: #f8fafc;
  border-radius: 7px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  margin-top: auto;
}

.cs-snapshot-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.cs-blue-bullet {
  color: #0070f3;
  font-size: 11px;
  line-height: 1;
}

.cs-snapshot-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #0070f3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cs-snapshot-desc {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.35;
  margin: 0 0 6px 0;
}

.cs-metadata-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.cs-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #0d6efd;
}

.cs-meta-icon {
  width: 14px;
  height: 14px;
  stroke: #0d6efd;
  flex-shrink: 0;
}

/* --- QUADRANT 2: TOP-RIGHT (Deep Navy #001B44 + Side Hero Image) --- */
.cs-quad-top-right {
  background: #001b44;
  color: #f8fafc;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr clamp(170px, 16vw, 240px);
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: 100%;
  overflow: hidden;
}

.cs-top-right-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(6px, 0.8vh, 12px);
  height: 100%;
  overflow: hidden;
  padding: clamp(18px, 2vh, 26px) clamp(18px, 1.8vw, 28px);
}

.cs-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-block-title {
  font-size: clamp(13px, 0.95vw, 15px);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1px 0;
  letter-spacing: -0.2px;
}

.cs-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cs-bullet-list li {
  font-size: clamp(11px, 0.82vw, 12.5px);
  line-height: 1.35;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.cs-sq-cyan {
  color: #00d2ff;
  font-size: 8.5px;
  line-height: 1.4;
  flex-shrink: 0;
}

.cs-bullet-list li strong {
  color: #ffffff;
  font-weight: 700;
}

.cs-what-they-did-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #64748b;
  text-transform: uppercase;
  margin: 1px 0 3px 0;
}

.cs-pill-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-prod-pill {
  background: #0a2558;
  border: 1px solid #1d4ed8;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: clamp(10px, 0.72vw, 11px);
  font-weight: 600;
  color: #ffffff;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: fit-content;
}

.cs-hero-img-col {
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.cs-hero-img-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #001738;
  margin: 0;
  padding: 0;
}

.cs-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

/* --- QUADRANT 3: BOTTOM-LEFT (Dark Navy #001738) --- */
.cs-quad-bottom-left {
  background: #001738;
  padding: clamp(18px, 2vh, 28px) clamp(28px, 2.8vw, 48px);
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  height: 100%;
  overflow: hidden;
}

.cs-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.5vw, 24px);
  width: 100%;
}

.cs-metric-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-metric-val {
  font-family: var(--font-numbers);
  font-size: clamp(32px, 2.9vw, 48px);
  font-weight: 800;
  color: #00ff9d;
  line-height: 1;
  letter-spacing: -0.5px;
  text-shadow: 0 0 16px rgba(0, 255, 157, 0.25);
}

.cs-metric-lbl {
  font-family: var(--font-text);
  font-size: clamp(11px, 0.85vw, 13px);
  font-weight: 500;
  color: #ffffff;
  line-height: 1.25;
}

/* --- QUADRANT 4: BOTTOM-RIGHT (Royal Blue #0B57D0) --- */
.cs-quad-bottom-right {
  background: #0b57d0;
  color: #ffffff;
  padding: clamp(14px, 1.5vh, 22px) clamp(18px, 1.8vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 1.5vw, 22px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  height: 100%;
  overflow: hidden;
}

.cs-quote-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}

.cs-quote-text {
  font-family: var(--font-text);
  font-size: clamp(11px, 0.82vw, 12.8px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-speaker-info {
  margin-top: 2px;
}

.cs-speaker-name {
  font-size: clamp(12px, 0.9vw, 13.5px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.cs-speaker-title {
  font-size: clamp(10.5px, 0.78vw, 11.5px);
  font-weight: 500;
  color: #bfdbfe;
  line-height: 1.2;
}

.cs-speaker-thumb-col {
  width: clamp(220px, 20vw, 300px);
  height: clamp(140px, 12.5vw, 190px);
  flex-shrink: 0;
}

.cs-speaker-thumb-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
}

#call-screen[data-stage='customer-story'] .cs-speaker-thumb-wrapper,
#call-screen[data-stage='dashboard'] .cs-speaker-thumb-wrapper {
  visibility: hidden;
}

.cs-speaker-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.close-card-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  color: #5b6b78;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.close-card-btn:hover {
  color: #0c1f2e;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid #0091d5;
  padding-bottom: 12px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #0091d5;
}

.vertical-tag {
  background: #e7f0f8;
  border: 1px solid #0091d5;
  color: #003a63;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.verified-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #0a8a4f;
  background: #e6f6ee;
  border: 1px solid #bfe6d1;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.dashboard-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #0c1f2e;
}

.metric-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-tile {
  background: linear-gradient(160deg, #f2f7fb, #e7f0f8);
  border: 1px solid #dbe7f1;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.stat-tile.highlighted {
  outline: 3px solid #e6007e;
  box-shadow: 0 0 0 4px rgba(230, 0, 126, 0.18);
  transform: translateY(-2px);
}

.stat-tile__value {
  font-family: var(--font-numbers);
  font-size: 26px;
  font-weight: 800;
  color: #0091d5;
  font-variant-numeric: tabular-nums;
}

.stat-tile__label {
  font-size: 12.5px;
  color: #5b6b78;
  margin-top: 4px;
  line-height: 1.3;
}

.summary-box {
  background: #f6f9fc;
  border-left: 4px solid #0091d5;
  border-radius: 8px;
  padding: 16px;
}

.summary-box h3 {
  margin: 0 0 6px 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #5b6b78;
}

.summary-box p {
  margin: 0;
  font-size: 14px;
  color: #0c1f2e;
  line-height: 1.5;
}

/* Dashboard tap-to-speak tappable elements */
.dashboard-card .tappable {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  border-radius: 6px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.dashboard-card .tappable:hover {
  background-color: rgba(0, 58, 99, 0.06);
  box-shadow: 0 0 0 2px rgba(0, 145, 213, 0.15);
}

.dashboard-card .tappable.tapped {
  background-color: rgba(0, 145, 213, 0.18);
  transform: scale(0.99);
  box-shadow: 0 0 0 3px rgba(0, 145, 213, 0.25);
}

.stat-tile.tappable {
  cursor: pointer;
}

/* Right Sidebar (Matching zscaler-avatar-2026-feat-experience-eval) */
#sidebar {
  display: flex;
  flex-direction: column;
  width: 350px;
  min-width: 320px;
  max-width: 380px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 20;
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.conversation-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
  margin-bottom: 8px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52525b;
}

.status-dot.connected {
  background: var(--success);
}

/* Latency Panel & Toggle Switch */
.latency-panel {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.latency-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.latency-metrics {
  display: flex;
  gap: 20px;
}

.latency-item {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #3f3f46;
  transition: 0.3s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* Interactive Story Chips */
.chips-panel {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.15);
  color: #fff;
}

/* Live Transcript */
.transcript-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 14px 20px;
}

.transcript-panel h2 {
  margin: 0 0 8px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

#transcript {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.transcript-entry {
  margin-bottom: 10px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.transcript-entry .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.transcript-entry .role {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.transcript-entry .role.you { color: #60a5fa; }
.transcript-entry .role.pal { color: #34d399; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.modal-card h2 { margin: 0 0 4px 0; font-size: 18px; }
.modal-subtitle { margin: 0 0 16px 0; font-size: 12px; color: var(--text-muted); }
.modal-card label { display: block; margin-bottom: 12px; font-size: 11px; color: var(--text-muted); }
.modal-card input { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

.primary-btn { background: var(--accent); color: #fff; border: none; border-radius: var(--radius); padding: 8px 12px; font-size: 13px; font-weight: 500; cursor: pointer; }
.danger-btn { background: var(--danger); color: #fff; border: none; border-radius: var(--radius); padding: 8px 12px; font-size: 13px; font-weight: 500; cursor: pointer; }
.secondary-btn { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; font-weight: 500; cursor: pointer; }
.icon-btn { padding: 4px 8px; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); font-size: 11px; border-radius: 4px; cursor: pointer; }
