/* ═══════════════════════════════════════════════════════
   ENVOY — Design System
   Black. Clean. Precise.
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --black:   #000000;
  --surface: #0d0d0d;
  --surface-2: #141414;
  --surface-3: #1a1a1a;
  --surface-hover: #1f1f1f;

  --border:  rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(255, 255, 255, 0.35);

  --white:   #ffffff;
  --text-1:  rgba(255, 255, 255, 0.95);
  --text-2:  rgba(255, 255, 255, 0.55);
  --text-3:  rgba(255, 255, 255, 0.28);

  --green:   #22c55e;
  --green-bg: rgba(34, 197, 94, 0.1);
  --red:     #ef4444;
  --red-bg:  rgba(239, 68, 68, 0.1);
  --amber:   #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.1);
  --blue:    #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.1);

  /* legacy aliases so existing references still work */
  --bg-primary:    var(--black);
  --bg-secondary:  var(--surface);
  --bg-card:       var(--surface-2);
  --bg-card-hover: var(--surface-hover);
  --bg-glass:      var(--surface-2);
  --bg-glass-strong: var(--surface-3);
  --border-subtle: var(--border);
  --border-medium: var(--border-2);
  --border-accent: rgba(255,255,255,0.2);
  --text-primary:  var(--text-1);
  --text-secondary: var(--text-2);
  --text-muted:    var(--text-3);
  --accent:        var(--white);
  --accent-light:  rgba(255,255,255,0.8);
  --accent-glow:   rgba(255,255,255,0.06);
  --accent-gradient: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.85) 100%);
  --success:       var(--green);
  --success-bg:    var(--green-bg);
  --warning:       var(--amber);
  --warning-bg:    var(--amber-bg);
  --danger:        var(--red);
  --danger-bg:     var(--red-bg);
  --positive:      var(--green);
  --negative:      var(--red);
  --neutral-sentiment: var(--amber);
  --info:          var(--blue);
  --info-bg:       var(--blue-bg);

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.6);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 0 1px rgba(255,255,255,0.1);

  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', 'JetBrains Mono', monospace;

  --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--text-1);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--text-2); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--white); }

/* ── Layout ──────────────────────────────────────────── */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container-wide {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════════════ */

/* ── Landing Nav ────────────────────────────────────── */
.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.landing-brand {
  font-size: 1.1875rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.landing-signin {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.landing-signin:hover { color: var(--white); }

.landing-cta-btn {
  padding: 9px 20px;
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--black);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.landing-cta-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 72px;
  max-width: 1160px;
  width: 100%;
  padding: 120px 0 80px;
}

.hero-left {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 4.5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 20px;
}

.hero-headline-muted { color: rgba(255,255,255,0.35); }

.hero-sub {
  font-size: 1.0625rem;
  color: var(--text-2);
  line-height: 1.72;
  max-width: 440px;
  margin: 0 0 40px;
}
.hero-sub strong { color: rgba(255,255,255,0.88); font-weight: 600; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-primary-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--black);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.hero-primary-btn:hover { opacity: 0.88; transform: translateY(-2px); color: var(--black); }

.hero-helper {
  font-size: 0.8125rem;
  color: var(--text-3);
  line-height: 1.75;
  font-weight: 400;
}

/* ── Hero Chat Preview ───────────────────────────────── */
.hero-right {
  flex-shrink: 0;
  width: 420px;
  position: relative;
  z-index: 1;
}

.hero-chat-preview {
  background: #111;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.preview-agent-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.preview-agent-logo {
  width: 18px; height: 18px;
  object-fit: contain;
  display: block;
}
.preview-agent-meta {
  display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0;
}
.preview-agent-name-row {
  display: flex; align-items: center; gap: 5px;
}
.preview-verified { flex-shrink: 0; }
.preview-agent-sub {
  font-size: 0.7rem; color: var(--text-3); font-family: var(--font-sans);
}
.preview-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
  flex-shrink: 0;
}

.preview-agent-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-1);
}

.preview-messages {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-msg {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 87%;
}

.preview-msg-agent {
  background: var(--surface-3);
  color: var(--text-1);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

.preview-msg-user {
  background: var(--white);
  color: var(--black);
  align-self: flex-end;
  border-bottom-right-radius: 3px;
  font-weight: 500;
}

.preview-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 20px 20px;
  padding: 11px 14px;
  background: var(--surface-3);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.preview-input-placeholder {
  font-size: 0.8125rem;
  color: var(--text-3);
}

.preview-send-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  border: none;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════
   FORM SECTION (on landing page)
   ══════════════════════════════════════════════════════ */
.form-section {
  background: var(--surface);
  padding: 80px 0 100px;
  border-top: 1px solid var(--border);
}

.page-header {
  text-align: center;
  padding: 0 0 48px;
}

.form-section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-1);
  margin-bottom: 8px;
}

.form-section-sub {
  font-size: 1rem;
  color: var(--text-2);
}

.form-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-label-optional {
  font-weight: 400;
  color: var(--text-3);
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition-base);
}
.card:hover { border-color: var(--border-2); }

.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ── Forms ───────────────────────────────────────────── */
.form-group { margin-bottom: 22px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-3); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%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;
  padding-right: 36px;
}

.form-select option { background: #1a1a1a; color: var(--text-1); }

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.65;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
  position: relative;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--white);
  color: var(--black);
  text-decoration: none;
}
.btn-primary:hover { opacity: 0.82; background: var(--white); color: var(--black); transform: translateY(-1px); text-decoration: none; }
.btn-primary:active { transform: translateY(0); opacity: 1; }

.btn-secondary {
  background: var(--surface-3);
  color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--border-2); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 8px 16px;
}
.btn-ghost:hover { color: var(--text-1); background: var(--surface-2); }

.btn-lg { padding: 14px 28px; font-size: 0.9375rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 12px; font-size: 0.8125rem; border-radius: var(--radius-sm); }

.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }

/* ── Tags & Badges ───────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid var(--border);
  letter-spacing: 0.01em;
}

.tag-accent  { background: rgba(255,255,255,0.08); color: var(--text-1); border-color: rgba(255,255,255,0.15); }
.tag-success { background: var(--green-bg); color: var(--green); border-color: rgba(34,197,94,0.2); }
.tag-warning { background: var(--amber-bg); color: var(--amber); border-color: rgba(245,158,11,0.2); }
.tag-danger  { background: var(--red-bg); color: var(--red); border-color: rgba(239,68,68,0.2); }

/* ── Sentiment ───────────────────────────────────────── */
.sentiment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 500;
}
.sentiment-dot { width: 7px; height: 7px; border-radius: 50%; }
.sentiment-positive .sentiment-dot { background: var(--green); }
.sentiment-negative .sentiment-dot { background: var(--red); }
.sentiment-neutral  .sentiment-dot { background: var(--amber); }
.sentiment-positive { color: var(--green); }
.sentiment-negative { color: var(--red); }
.sentiment-neutral  { color: var(--amber); }

/* ── Stepper ─────────────────────────────────────────── */
.stepper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
  position: relative;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.3;
  transition: opacity var(--transition-base);
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--border-2);
  margin: 0 16px;
}

.step.active  { opacity: 1; }
.step.completed { opacity: 0.7; }

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-2);
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.step.active .step-number {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.step.completed .step-number {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.step-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
}
.step.active .step-label { color: var(--text-1); }

/* ── Step Sections ───────────────────────────────────── */
.step-section { display: none; animation: fadeUp 0.28s ease; }
.step-section.active { display: block; }

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

/* ── Emoji Picker ────────────────────────────────────── */
.emoji-picker { display: flex; gap: 8px; flex-wrap: wrap; }

.emoji-option {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.emoji-option:hover { background: var(--surface-hover); border-color: var(--border-2); transform: scale(1.08); }
.emoji-option.selected { border-color: var(--white); background: rgba(255,255,255,0.08); }

/* ── Topic / Question Items ──────────────────────────── */
.topics-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }

.topic-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: fadeUp 0.18s ease;
}

.topic-item span { flex: 1; font-size: 0.9rem; color: var(--text-1); }
.question-num { flex: none !important; color: var(--text-3) !important; font-size: 0.8rem !important; font-weight: 600; min-width: 20px; }

.topic-remove {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.topic-remove:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }

.topic-add-row { display: flex; gap: 8px; }
.topic-add-row .form-input { flex: 1; }

/* ── Success State ───────────────────────────────────── */
.success-state {
  text-align: center;
  padding: 60px 0;
}

.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 auto 24px;
}

.success-state h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.success-state p  { color: var(--text-2); margin-bottom: 32px; }

.share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
}

.share-link-input {
  flex: 1;
  padding: 11px 14px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  outline: none;
}

/* ══════════════════════════════════════════════════════
   CHAT PAGE
   ══════════════════════════════════════════════════════ */
.chat-page-nav {
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-brand {
  font-size: 1.0625rem;
  font-weight: 800;
  color: rgba(255,255,255,0.4);
  letter-spacing: -0.03em;
}

.chat-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 57px);
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
}

.chat-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  font-family: var(--font-sans);
  text-transform: uppercase;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.15s;
}
.chat-avatar:hover { opacity: 0.85; }
.chat-avatar-wrap { flex-shrink: 0; }

.chat-info-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.chat-info-btn:hover { color: var(--text-1); background: var(--surface-2); }

.chat-agent-info { flex: 1; min-width: 0; }
.chat-agent-info h3 { font-size: 0.9375rem; font-weight: 600; }
.chat-agent-info p  { font-size: 0.8125rem; color: var(--text-3); }
.chat-agent-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-verified-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.chat-verified-badge.hidden,
.hidden { display: none !important; }

/* ── Bio panel (WhatsApp-style right slide) ── */
.bio-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.bio-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 32px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.bio-panel.bio-panel-open {
  transform: translateX(0);
}
.bio-panel-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  margin-bottom: 20px;
  transition: color 0.15s;
}
.bio-panel-close:hover { color: var(--text-1); }

.bio-panel-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.bio-panel-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-2);
  font-family: var(--font-sans);
  text-transform: uppercase;
  overflow: hidden;
  letter-spacing: -0.02em;
}
.bio-panel-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 5px;
}
.bio-panel-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.025em;
  margin: 0;
  text-align: center;
}
.bio-panel-verified {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.bio-panel-brand {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-3);
  margin: 0 0 18px;
}
.bio-panel-bio {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.bio-panel-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bio-panel-link-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.8375rem;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.bio-panel-link-pill:hover { border-color: var(--border-2); color: var(--text-1); }

/* ── Mode toggle (Step 2) ── */
.mode-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.mode-card:hover { border-color: var(--border-2); }
.mode-card-active {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 7%, var(--surface));
}
.mode-card-active:hover { border-color: var(--green); }
.mode-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-1);
  font-family: var(--font-sans);
}
.mode-card-active .mode-card-title { color: var(--green); }
.mode-card-desc {
  font-size: 0.73rem;
  color: var(--text-3);
  font-family: var(--font-sans);
  line-height: 1.4;
}
.create-body-open { grid-template-columns: 1fr !important; }

/* ── Step 3 Identity styles ── */
.id-top-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.id-mandatory-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.id-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 0;
}
.id-avatar-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.id-avatar-circle {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px dashed var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.id-avatar-label:hover .id-avatar-circle {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 6%, var(--surface-3));
}
.id-avatar-initials {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: -0.03em;
  font-family: var(--font-sans);
  line-height: 1;
  user-select: none;
}
.id-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
  color: #fff;
}
.id-avatar-label:hover .id-avatar-overlay { opacity: 1; }
.id-avatar-circle.has-photo .id-avatar-initials { display: none; }
.id-avatar-circle.has-photo .id-avatar-overlay { opacity: 0; }
.id-avatar-circle.has-photo:hover .id-avatar-overlay { opacity: 1; }
.id-avatar-hint {
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: var(--font-sans);
  text-align: center;
}
.id-required {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 5px;
}
.id-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--text-3);
  font-size: 0.75rem;
  font-family: var(--font-sans);
}
.id-divider::before,
.id-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Avatar upload widget (create + edit) ── */
.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}
.avatar-upload-preview {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-2);
  font-family: var(--font-sans);
  text-transform: uppercase;
  overflow: hidden;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.avatar-upload-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Agent bio strip */
.chat-agent-bio {
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  background: var(--surface);
  flex-shrink: 0;
}
.chat-agent-bio-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 100%;
}
.chat-agent-bio-text {
  font-size: 0.8rem;
  color: var(--text-3);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.chat-agent-bio-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.chat-agent-bio-link:hover { color: var(--text-1); border-color: var(--text-3); }

.online-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  color: var(--green);
}
.online-indicator::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.message {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.9375rem;
  line-height: 1.62;
  animation: fadeUp 0.25s ease;
}

.message-assistant {
  align-self: flex-start;
  background: var(--surface-3);
  color: var(--text-1);
  border-bottom-left-radius: 3px;
}

.message-user {
  align-self: flex-end;
  background: var(--white);
  color: var(--black);
  border-bottom-right-radius: 3px;
  font-weight: 500;
}

.chat-input-area {
  padding: 14px 24px 24px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(20px);
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color var(--transition-fast);
}
.chat-input:focus { border-color: var(--border-focus); }
.chat-input::placeholder { color: var(--text-3); }

.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--white);
  border: none;
  color: var(--black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}
.chat-send-btn:hover:not(:disabled) { opacity: 0.85; transform: scale(1.04); }
.chat-send-btn:disabled { opacity: 0.25; cursor: not-allowed; transform: none; }
.chat-send-btn svg { width: 18px; height: 18px; }

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 15px;
  align-self: flex-start;
  background: var(--surface-3);
  border-radius: 14px;
  border-bottom-left-radius: 3px;
}

.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-complete {
  text-align: center;
  padding: 16px;
  color: var(--text-3);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════════
   DASHBOARD — fixed no-scroll layout
   ══════════════════════════════════════════════════════ */
html.dash-html,
body.dash-page { height: 100%; overflow: hidden; }

/* ── Nav ─────────────────────────────────────────────── */
.dash-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-brand {
  font-size: 1.0625rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Profile avatar + dropdown ── */
.dash-profile-wrap {
  position: relative;
}
.dash-profile-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  background: var(--surface-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
  padding: 0;
}
.dash-profile-btn:hover { border-color: var(--text-3); }
.dash-profile-initials {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-1);
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  line-height: 1;
}
.dash-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 300;
  overflow: hidden;
}
.dash-profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
}
.dash-profile-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-1);
  font-family: var(--font-sans);
}
.dash-profile-email {
  font-size: 0.75rem;
  color: var(--text-3);
  font-family: var(--font-sans);
  word-break: break-all;
}
.dash-profile-divider {
  height: 1px;
  background: var(--border);
}
.dash-profile-signout {
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.dash-profile-signout:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.dash-new-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--black);
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity var(--transition-fast);
}
.dash-new-btn:hover { opacity: 0.85; color: var(--black); }

/* ── Layout shell ────────────────────────────────────── */
.dash-layout {
  position: fixed;
  top: 52px; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  background: var(--black);
}

.dash-wrap {
  width: 100%;
  max-width: 1160px;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* ── Top strip: agent + centered stats + actions ─────── */
.dash-strip {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 62px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dash-strip-left {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 24px;
  min-width: 0;
}

.das-avatar {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
  font-family: var(--font-sans);
  color: var(--text-2);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.das-text { min-width: 0; }

.das-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.das-desc {
  font-size: 0.72rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.dash-strip-stats {
  display: flex;
  align-items: center;
  gap: 0;
}

.das-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  border-left: 1px solid var(--border);
  gap: 2px;
}
.das-stat:first-child { border-left: none; }

.das-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-1);
  line-height: 1;
}

.das-lbl {
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  white-space: nowrap;
}

.dash-strip-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  gap: 8px;
}

/* ── Body: two columns ───────────────────────────────── */
.dash-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 290px;
  min-height: 0;
  overflow: hidden;
}

.dash-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dash-col-responses {
  border-right: 1px solid var(--border);
}

.dash-col-data {
  background: var(--surface);
}

/* Sticky column header (outside scroll — responses column) */
.dash-col-hd {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px 12px;
  border-bottom: 1px solid var(--border);
}

/* Section header inside the scrollable data panel */
.das-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dash-col-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-3);
}

.dash-col-count {
  font-size: 0.7rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* Scrollable area within each column */
.dash-col-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.dash-col-scroll::-webkit-scrollbar { width: 3px; }
.dash-col-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Data panel utilities ────────────────────────────── */
.das-refresh {
  background: none; border: none;
  color: var(--text-3); cursor: pointer;
  font-size: 0.9rem; padding: 0 2px; line-height: 1;
  transition: color var(--transition-fast), transform 0.5s;
}
.das-refresh:hover { color: var(--text-2); transform: rotate(180deg); }

.das-empty {
  padding: 36px 4px;
  text-align: center;
}
.das-empty p {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.65;
}

/* ── Takeaways ───────────────────────────────────────── */
.analytics-card { padding: 0; background: transparent; border: none; }
.analytics-card-label { display: none; }

.analytics-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.analytics-card li {
  font-size: 0.82rem;
  color: var(--text-2);
  padding: 8px 8px 8px 16px;
  position: relative;
  border-radius: 6px;
  line-height: 1.55;
  transition: background var(--transition-fast);
}

.analytics-card li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 14px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--green);
}
.analytics-card li:hover { background: var(--surface-2); }

/* ── Response cards ──────────────────────────────────── */
#conversation-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conv-skel {
  height: 88px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  margin-bottom: 6px;
}

.conv-card {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  animation: fadeUp 0.18s ease both;
}
.conv-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-2);
}

.conv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.conv-status-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.conv-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.conv-dot-live {
  background: var(--green);
  box-shadow: 0 0 5px rgba(34,197,94,0.6);
}
.conv-dot-done { background: rgba(255,255,255,0.15); }

.conv-status-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
}
.conv-respondent-email {
  font-size: 0.7rem;
  color: var(--text-3);
  font-weight: 400;
  margin-left: 6px;
  padding: 1px 7px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  letter-spacing: 0;
}

.conv-time {
  font-size: 0.7rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.conv-summary {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.58;
  margin: 0;
}

.conv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.conv-chip {
  font-size: 0.72rem;
  color: var(--text-3);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}
.conv-chip b { color: var(--text-1); font-weight: 600; }
.conv-chip b.chip-yes { color: var(--green); }
.conv-chip b.chip-no  { color: var(--red); }

/* Legacy aliases for JS compatibility */
.agent-hero-avatar { width: 32px; height: 32px; border-radius: 7px; background: var(--surface-3); border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; flex-shrink: 0; }
.agent-hero-name { font-family: var(--font-display); font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-1); }
.agent-hero-desc { font-size: 0.72rem; color: var(--text-3); }

/* ── Modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeUp 0.2s ease;
}

.modal {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  max-width: 620px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 32px;
  animation: fadeUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal::-webkit-scrollbar { width: 3px; }
.modal::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.modal-close {
  float: right;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--red-bg); color: var(--red); border-color: var(--red); }

/* ── Transcript messages in modal ───────────────────── */
.transcript-msg {
  margin-bottom: 16px;
}
.transcript-role {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 3px;
}
.transcript-role-agent { color: var(--text-3); }
.transcript-role-user  { color: var(--text-2); }
.transcript-content {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════════
   SHARED UTILITIES
   ══════════════════════════════════════════════════════ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ── Loading ─────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.55s linear infinite;
  display: inline-block;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty State ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-3);
}
.empty-state .empty-icon { font-size: 2rem; margin-bottom: 14px; opacity: 0.4; }
.empty-state h3 { color: var(--text-2); margin-bottom: 6px; font-size: 1rem; font-weight: 600; }
.empty-state p  { font-size: 0.875rem; }

/* ── Toast ───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--white);
  color: var(--black);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 300;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  letter-spacing: -0.01em;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Toolbar ─────────────────────────────────────────── */
.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-actions { display: flex; gap: 8px; }

/* ── legacy dashboard-grid alias ───────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero { padding: 0 40px; }
  .hero-inner { gap: 48px; }
  .hero-right { width: 360px; }
  .how-section { padding: 80px 48px 96px; }
  .stats-strip { padding: 0 40px; }
}

@media (max-width: 900px) {
  .hero { padding: 0 24px; min-height: auto; }
  .hero-inner { flex-direction: column; padding: 100px 0 60px; gap: 48px; text-align: center; }
  .hero-left { display: flex; flex-direction: column; align-items: center; }
  .hero-sub { margin: 0 auto 40px; }
  .hero-right { width: 100%; max-width: 420px; }
  .landing-nav { padding: 18px 24px; }
  .stats-grid, .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .agent-hero-inner { flex-direction: column; align-items: flex-start; }
  .how-section { padding: 72px 32px 88px; }
  .stats-strip { padding: 0 24px; }
  .stats-strip-inner { flex-wrap: wrap; }
  .stats-strip-item { flex: 0 0 calc(50% - 1px); min-width: 0; padding: 28px 0; }
  .stats-strip-item:not(:first-child) { padding-left: 28px; }
  .stats-strip-divider { display: none; }
  .stats-strip-item { border-bottom: 1px solid var(--border); }
  .stats-strip-item:nth-child(odd) { border-right: 1px solid var(--border); padding-right: 28px; }
}

@media (max-width: 600px) {
  .hero-inner { padding: 88px 0 48px; }
  .hero-headline { font-size: 2.5rem; }
  .form-row-2 { grid-template-columns: 1fr; }
  .stats-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .container-wide { padding: 0 16px; }
  .message { max-width: 90%; }
  .stepper .step-label { display: none; }
  .dash-nav, .chat-page-nav { padding: 14px 16px; }
  .stats-strip-inner { flex-direction: column; }
  .stats-strip-item { flex: none; border-right: none !important; border-bottom: 1px solid var(--border); }
  .stats-strip-item:last-child { border-bottom: none; }
  .stats-strip-item:not(:first-child) { padding-left: 0; }
  .stats-strip-num { font-size: 2.25rem; }
}

/* ══════════════════════════════════════════════════════
   TRUSTED BAR
   ══════════════════════════════════════════════════════ */
.trusted-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--black);
  overflow: hidden;
}

.trusted-label {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  padding-left: 48px;
  white-space: nowrap;
}

.trusted-track-wrap {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

@keyframes trusted-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.trusted-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: trusted-scroll 22s linear infinite;
}

.trusted-track:hover {
  animation-play-state: paused;
}

.trusted-logo {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-3);
  white-space: nowrap;
  transition: color 0.2s;
  cursor: default;
  font-family: var(--font-display);
}

.trusted-logo:hover {
  color: var(--text-1);
}

/* ══════════════════════════════════════════════════════
   STATS STRIP
   ══════════════════════════════════════════════════════ */
.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 80px;
}
.stats-strip-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}
.stats-strip-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 36px 0;
}
.stats-strip-item:not(:first-child) {
  padding-left: 48px;
}
.stats-strip-num {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1;
}
.stats-strip-label {
  font-size: 0.875rem;
  color: var(--text-3);
  font-weight: 400;
  line-height: 1.4;
  max-width: 180px;
}
.stats-strip-divider {
  width: 1px;
  background: var(--border);
  margin: 28px 48px 28px 0;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════
   LANDING — eyebrow + How it works
   ══════════════════════════════════════════════════════ */
.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 18px;
  display: block;
}

.how-section {
  position: relative;
  border-top: 1px solid var(--border);
  padding: 96px 80px 112px;
  overflow: hidden;
  background: #0a0a0a;
}
.how-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 50%, rgba(40,40,40,0.9) 0%, transparent 70%),
              radial-gradient(ellipse 60% 80% at 80% 30%, rgba(28,28,28,0.8) 0%, transparent 65%),
              radial-gradient(ellipse 50% 50% at 50% 100%, rgba(20,20,20,0.6) 0%, transparent 60%);
  animation: how-bg-drift 12s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes how-bg-drift {
  0%   { opacity: 1; transform: scale(1) translateX(0); }
  50%  { opacity: 0.85; transform: scale(1.04) translateX(1%); }
  100% { opacity: 1; transform: scale(1.02) translateX(-1%); }
}
.how-inner { max-width: 960px; margin: 0 auto; position: relative; z-index: 1; }
.how-eyebrow {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--green); margin-bottom: 16px;
}
.how-headline {
  font-family: var(--font-display);
  font-size: 2.75rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text-1); margin-bottom: 56px; line-height: 1.1;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 56px;
}
.how-step {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  backdrop-filter: blur(4px);
}
.how-step-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
}
.how-step-body h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem; font-weight: 600; color: var(--text-1);
  margin-bottom: 10px; letter-spacing: -0.02em;
}
.how-step-body p { font-size: 0.9rem; color: var(--text-3); line-height: 1.7; margin: 0; }
.how-step-divider { display: none; }
.how-cta {
  display: inline-flex; align-items: center; padding: 13px 26px;
  border-radius: var(--radius-full); background: var(--white); color: var(--black);
  font-family: var(--font-display);
  font-size: 0.9375rem; font-weight: 600; text-decoration: none; letter-spacing: -0.01em;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.how-cta:hover { opacity: 0.85; color: var(--black); transform: translateY(-1px); }

/* ══════════════════════════════════════════════════════
   SITE FOOTER
   ══════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer-left {
  font-size: 0.8125rem;
  color: var(--text-3);
  letter-spacing: -0.01em;
}
.site-footer-left strong {
  color: var(--text-2);
  font-weight: 600;
}
.site-footer-right {
  font-size: 0.8125rem;
  color: var(--text-3);
  letter-spacing: -0.01em;
}

/* Chat promo banner */
/* Chat inline signin card */
.chat-signin-card {
  margin: 16px auto 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 22px 20px;
  max-width: 340px;
  width: calc(100% - 32px);
}
.chat-signin-heading {
  font-size: 0.9rem;
  color: var(--text-2);
  margin: 0 0 18px;
  line-height: 1.5;
}
.chat-signin-heading strong { color: var(--text-1); font-weight: 600; }
.chat-signin-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--text-1);
  color: var(--black);
  border: none;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: opacity 0.15s;
  margin-bottom: 14px;
}
.chat-signin-google:hover { opacity: 0.88; }
.chat-signin-google:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-signin-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-3);
  font-size: 0.72rem;
}
.chat-signin-divider::before,
.chat-signin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.chat-signin-field { margin-bottom: 10px; }
.chat-signin-submit {
  width: 100%;
  padding: 11px;
  margin-top: 4px;
  background: var(--text-1);
  color: var(--black);
  border: none;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: opacity 0.15s;
}
.chat-signin-submit:hover { opacity: 0.88; }
.chat-signin-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-signin-error {
  font-size: 0.78rem;
  color: var(--red);
  min-height: 16px;
  margin-top: 8px;
}
.chat-signin-footer {
  font-size: 0.78rem;
  color: var(--text-3);
  margin: 12px 0 0;
  text-align: center;
}
.chat-signin-footer a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
}
.chat-signin-footer a:hover { color: var(--text-1); }

.chat-envoy-promo {
  text-align: center;
  padding: 10px 24px;
  font-size: 0.75rem;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.chat-envoy-promo a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.chat-envoy-promo a:hover { color: var(--text-1); }

/* ══════════════════════════════════════════════════════
   CREATE PAGE — full-height, no scroll
   ══════════════════════════════════════════════════════ */
html.create-html,
body.create-page {
  height: 100%;
  overflow: hidden;
}

.create-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 56px; gap: 24px;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.create-nav-center { flex: 1; max-width: 280px; }
.create-progress-track {
  height: 2px; background: var(--surface-3); border-radius: 2px; overflow: hidden;
}
.create-progress-fill {
  height: 100%; background: var(--green); border-radius: 2px;
  transition: width 0.45s cubic-bezier(0.4,0,0.2,1); width: 0%;
}
.create-nav-back {
  font-size: 0.875rem; font-weight: 500; color: var(--text-3);
  text-decoration: none; transition: color var(--transition-fast); white-space: nowrap;
}
.create-nav-back:hover { color: var(--text-1); }

/* Full-height shell */
.create-main {
  position: fixed;
  top: 56px; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

/* Steps container — each step fills the shell */
.create-step {
  display: none;
  width: 100%;
  flex-direction: column;
  animation: stepIn 0.28s cubic-bezier(0.4,0,0.2,1);
}
.create-step.active { display: flex; }

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

/* Inner layout for step 1 & 2 — centred max-width wrapper */
.create-step-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 48px;
  min-height: 0;
}
.create-step-shell-narrow {
  max-width: 620px;
}
.cf-textarea-purpose {
  min-height: 180px;
  font-size: 1rem;
  line-height: 1.6;
}

/* Step header — compact, fixed height */
.create-step-header {
  padding: 28px 0 20px;
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.create-step-num {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-3); white-space: nowrap; flex-shrink: 0;
}
.create-step-headline {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.create-step-title {
  font-family: var(--font-display);
  font-size: 1.375rem; font-weight: 700; letter-spacing: -0.025em;
  color: var(--text-1); line-height: 1.2; margin: 0;
}
.create-step-sub { font-size: 0.875rem; color: var(--text-3); line-height: 1.5; margin: 0; }

/* Two-column content area — fills remaining space */
.create-body {
  flex: 1;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  min-height: 0;
}
.create-body-1-2 { grid-template-columns: 1fr 340px; }
.create-body-1-1 { grid-template-columns: 1fr 1fr; }

.create-col {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 28px;
  gap: 16px;
}
.create-col::-webkit-scrollbar { width: 3px; }
.create-col::-webkit-scrollbar-thumb { background: var(--border-2); }
.create-col-right {
  background: var(--surface-2);
  overflow-y: auto;
  gap: 0;
  padding: 0;
}
.create-col-right::-webkit-scrollbar { width: 3px; }
.create-col-right::-webkit-scrollbar-thumb { background: var(--border-2); }

/* Left col: purpose textarea stretches */
.create-col-left-label {
  flex-shrink: 0;
}
.cf-textarea-fill {
  flex: 1;
  resize: none;
  min-height: 0;
  height: 100%;
}

/* Right col: stacked sections with dividers */
.create-aside-section {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.create-aside-section:last-child { border-bottom: none; flex: 1; }

/* Footer bar */
.create-footer {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 20px;
}

/* Form primitives */
.cf-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-2); margin-bottom: 0; display: block;
}
.cf-optional {
  font-weight: 400; color: var(--text-3); text-transform: none;
  letter-spacing: 0; font-size: 0.7rem; margin-left: 4px;
}

.cf-input, .cf-textarea, .cf-select {
  width: 100%; padding: 10px 13px;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-1);
  font-family: var(--font-sans); font-size: 0.9rem; outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.cf-input:focus, .cf-textarea:focus, .cf-select:focus {
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.cf-input::placeholder, .cf-textarea::placeholder { color: var(--text-3); }
.cf-input.cf-error, .cf-textarea.cf-error {
  border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg);
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}
.cf-textarea { resize: none; line-height: 1.65; }
.cf-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.25)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.cf-select option { background: #111; }
.cf-hint { font-size: 0.78rem; color: var(--text-3); line-height: 1.5; }
.cf-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cf-group { display: flex; flex-direction: column; gap: 6px; }

.cf-tag-list { display: flex; flex-direction: column; gap: 5px; }
.cf-tag-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 11px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px;
  animation: stepIn 0.18s ease;
}
.cf-tag-item span { flex: 1; font-size: 0.85rem; color: var(--text-1); }
.cf-tag-num { flex: none !important; font-size: 0.72rem !important; color: var(--text-3) !important; font-weight: 600; min-width: 16px; }
.cf-tag-remove {
  width: 18px; height: 18px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-3); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.85rem; line-height: 1; transition: all var(--transition-fast); flex-shrink: 0;
}
.cf-tag-remove:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.cf-add-row { display: flex; gap: 6px; }
.cf-add-row .cf-input { flex: 1; }
.cf-add-btn {
  padding: 0 14px; background: var(--surface-3);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-2); font-size: 0.825rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all var(--transition-fast); height: 38px;
}
.cf-add-btn:hover { background: var(--surface-hover); color: var(--text-1); border-color: var(--border-2); }

/* Live preview */
.cf-preview { background: var(--surface-3); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; flex: 1; }
.cf-preview-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.cf-preview-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px rgba(34,197,94,0.5); flex-shrink: 0;
}
.cf-preview-name { font-size: 0.875rem; font-weight: 600; color: var(--text-1); }
.cf-preview-bubble {
  margin: 16px; padding: 11px 14px;
  background: var(--surface-2); border-radius: 12px; border-bottom-left-radius: 3px;
  font-size: 0.9rem; color: var(--text-2); line-height: 1.6; font-style: italic;
}

/* Nav buttons */
.create-next-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px;
  border-radius: var(--radius-full); background: var(--white); color: var(--black);
  font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 600; border: none; cursor: pointer;
  letter-spacing: -0.01em; transition: opacity var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}
.create-next-btn:hover { opacity: 0.87; transform: translateY(-1px); color: var(--black); }
.create-next-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.create-back-btn {
  display: inline-flex; align-items: center; padding: 11px 18px;
  border-radius: var(--radius-full); background: transparent;
  border: 1px solid var(--border); color: var(--text-2);
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition-fast); text-decoration: none;
}
.create-back-btn:hover { background: var(--surface-2); color: var(--text-1); border-color: var(--border-2); }
.create-btn-arrow { font-size: 1rem; }

/* Success state */
.create-success {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; text-align: center; padding: 0 32px;
}
.create-success-mark {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green); color: var(--black);
  font-size: 1.25rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;
}
.create-success-title {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text-1); margin-bottom: 8px;
}
.create-success-sub { font-size: 0.9375rem; color: var(--text-2); margin-bottom: 32px; line-height: 1.6; }
.create-share-box { display: flex; align-items: center; gap: 8px; max-width: 480px; margin: 0 auto 28px; width: 100%; }
.create-share-input {
  flex: 1; padding: 11px 14px; background: var(--surface-2);
  border: 1px solid var(--border-2); border-radius: var(--radius-md);
  color: var(--text-1); font-family: var(--font-mono); font-size: 0.8125rem; outline: none;
}
.create-copy-btn {
  padding: 11px 20px; border-radius: var(--radius-md);
  background: var(--white); color: var(--black);
  font-size: 0.875rem; font-weight: 700; border: none;
  cursor: pointer; transition: opacity var(--transition-fast); white-space: nowrap;
}
.create-copy-btn:hover { opacity: 0.85; }
.create-success-actions {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
}

/* Section label (old cf-section kept for compat) */
.cf-section { display: flex; flex-direction: column; gap: 10px; }
.cf-section-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--text-3);
}

/* ── Dashboard viz ───────────────────────────────────── */
.completion-bar-wrap { margin-top: 10px; }
.completion-bar-track {
  height: 3px; background: var(--surface-3); border-radius: 2px; overflow: hidden;
}
.completion-bar-fill {
  height: 100%; background: var(--white); border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.completion-bar-label {
  font-size: 0.75rem; color: var(--text-3); margin-top: 5px; font-family: var(--font-mono);
}

.sentiment-bar-wrap { display: flex; flex-direction: column; gap: 8px; }
.sentiment-bar-row { display: flex; align-items: center; gap: 10px; }
.sentiment-bar-key {
  font-size: 0.75rem; font-weight: 600; width: 58px; flex-shrink: 0; color: var(--text-2);
}
.sentiment-bar-track {
  flex: 1; height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden;
}
.sentiment-bar-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.sentiment-bar-fill.positive { background: var(--green); }
.sentiment-bar-fill.neutral  { background: var(--amber); }
.sentiment-bar-fill.negative { background: var(--red); }
.sentiment-bar-count { font-size: 0.75rem; color: var(--text-3); font-family: var(--font-mono); width: 20px; text-align: right; }

.topic-quality-table { width: 100%; border-collapse: collapse; }
.topic-quality-table th {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3); text-align: left; padding: 0 0 10px; border-bottom: 1px solid var(--border);
}
.topic-quality-table th:not(:first-child) { text-align: center; }
.topic-quality-table td {
  font-size: 0.875rem; color: var(--text-2); padding: 10px 0;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.topic-quality-table td:not(:first-child) { text-align: center; }
.topic-quality-table tr:last-child td { border-bottom: none; }
.tq-topic { font-weight: 500; color: var(--text-1); }
.tq-count { font-family: var(--font-mono); font-size: 0.8rem; }

/* ── Question builder ────────────────────────────────── */
.qb-builder {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.qb-row2 {
  display: flex;
  gap: 7px;
}

.qb-row2 .cf-select {
  flex: 1;
  min-width: 0;
}

.qb-options-wrap {
  padding: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Type badges on question list items */
.qb-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  border: 1px solid var(--border);
  color: var(--text-3);
  background: var(--surface-3);
}

.qb-badge-number { color: var(--blue); border-color: rgba(59,130,246,0.25); background: var(--blue-bg); }
.qb-badge-yesno  { color: var(--green); border-color: rgba(34,197,94,0.25); background: var(--green-bg); }
.qb-badge-choice { color: var(--amber); border-color: rgba(245,158,11,0.25); background: var(--amber-bg); }

.qb-options-preview {
  font-size: 0.8rem;
  color: var(--text-3);
  font-style: italic;
}

/* ── Responsive create ───────────────────────────────── */
@media (max-width: 900px) {
  .create-nav { padding: 0 20px; }
  .create-step-shell { padding: 0 20px; }
  .create-body-1-2,
  .create-body-1-1 { grid-template-columns: 1fr; }
  .create-col-right { max-height: 280px; }
  .create-step-header { padding: 18px 0 14px; }
}
@media (max-width: 640px) {
  .cf-row-2    { grid-template-columns: 1fr; }
  .how-section { padding: 60px 24px 72px; }
  .how-steps   { grid-template-columns: 1fr; gap: 12px; }
}

/* ══════════════════════════════════════════════════════
   LANDING — hero eyebrow pill + hero glow
   ══════════════════════════════════════════════════════ */
.hero-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px 5px 10px;
  border-radius: var(--radius-full);
  background: var(--green-bg);
  border: 1px solid rgba(34,197,94,0.22);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-eyebrow-pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(34,197,94,0.7);
  flex-shrink: 0;
}
.hero-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(34,197,94,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-headline-accent { color: var(--green); }

/* ══════════════════════════════════════════════════════
   CREATE — section card grouping
   ══════════════════════════════════════════════════════ */
.cf-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cf-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
  margin-bottom: 2px;
}

/* ══════════════════════════════════════════════════════
   DASHBOARD — quantitative charts
   ══════════════════════════════════════════════════════ */
@keyframes bar-grow {
  from { width: 0%; opacity: 0; }
  to   { opacity: 1; }
}

.quant-charts-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quant-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  animation: fadeUp 0.25s ease both;
}

.quant-card-topic {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Number card */
.quant-big-num {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-1);
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 2px;
}

.quant-num-label {
  font-size: 0.68rem;
  color: var(--text-3);
  margin-bottom: 12px;
}

.quant-num-row {
  display: flex;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.quant-num-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quant-num-cell + .quant-num-cell {
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

.quant-num-cell-val {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.quant-num-cell-key {
  font-size: 0.62rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Bar chart (choice) */
.quant-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.quant-bar-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  width: 72px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quant-bar-track {
  flex: 1;
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
}

.quant-bar-fill {
  height: 100%;
  border-radius: 3px;
  animation: bar-grow 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quant-bar-fill-green  { background: var(--green); }
.quant-bar-fill-blue   { background: var(--blue); }
.quant-bar-fill-amber  { background: var(--amber); }
.quant-bar-fill-red    { background: var(--red); }

.quant-bar-count {
  font-size: 0.7rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  width: 18px;
  text-align: right;
  flex-shrink: 0;
}

/* Yes/No card */
.yesno-split-track {
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  margin-bottom: 8px;
  background: var(--surface-3);
}

.yesno-yes-fill {
  background: var(--green);
  animation: bar-grow 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.yesno-no-fill {
  background: var(--red);
  flex: 1;
}

.yesno-labels { display: flex; justify-content: space-between; }
.yesno-label-yes { font-size: 0.75rem; font-weight: 600; color: var(--green); }
.yesno-label-no  { font-size: 0.75rem; font-weight: 600; color: var(--red); }

/* Modal content */
.modal-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-3);
}

.modal-summary-block {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 22px;
}

.modal-quant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.modal-quant-cell {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
}
.modal-quant-cell-text {
  grid-column: 1 / -1;
}
.modal-quant-topic {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 5px;
}
.modal-quant-value {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}

/* ══════════════════════════════════════════════════════
   DASHBOARD — text answer cards
   ══════════════════════════════════════════════════════ */
.quant-text-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.quant-text-item {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.45;
  padding: 7px 10px;
  background: var(--surface-3);
  border-radius: 6px;
  border-left: 2px solid var(--border);
}

/* ══════════════════════════════════════════════════════
   DASHBOARD — edit agent modal form
   ══════════════════════════════════════════════════════ */
.edit-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.edit-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
}
.edit-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}
.edit-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.edit-add-row .cf-input {
  flex: 1;
}
.edit-qb {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.edit-qb .cf-input {
  flex: 1;
  min-width: 160px;
}
.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════
   CHAT — Structured answer input (yes/no, choice, number)
   ══════════════════════════════════════════════════════ */

.answer-choices {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
}
.answer-choices.answer-choices-visible {
  display: flex;
}

.answer-choice-btn {
  padding: 9px 20px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.answer-choice-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}
.answer-choice-btn:active { transform: translateY(0); }

.answer-choice-yes {
  border-color: rgba(34,197,94,0.35);
  color: var(--green);
}
.answer-choice-yes:hover {
  background: var(--green-bg);
  border-color: var(--green);
}

.answer-choice-no {
  border-color: rgba(239,68,68,0.3);
  color: var(--red);
}
.answer-choice-no:hover {
  background: var(--red-bg);
  border-color: var(--red);
}

.answer-number-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.answer-number-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.answer-number-input:focus { border-color: var(--border-focus); }
.answer-number-input::placeholder { color: var(--text-3); }
.answer-number-submit {
  padding: 10px 18px;
  background: var(--white);
  color: var(--black);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}
.answer-number-submit:hover { opacity: 0.85; }

/* ── Create — question reorder buttons ────────────────── */
.cf-q-move {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}
.cf-q-move:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--border-2);
  color: var(--text-1);
}
.cf-q-move:disabled { opacity: 0.2; cursor: not-allowed; }
