/* ============================================
   SoloGrowth.io — Diagnostic UI
   Synced with LP design system (indigo / Inter)
   ============================================ */
#cookie-banner { display: none !important; }

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

:root {
  /* ── Shared with style.css ── */
  --bg-dark:       #0a0a0f;
  --bg-card:       #12121a;
  --bg-card-hover: #1a1a26;
  --accent:        #6366f1;
  --accent-light:  #818cf8;
  --accent-glow:   rgba(99, 102, 241, 0.15);
  --text-primary:  #f1f1f4;
  --text-secondary:#9ca3af;
  --text-muted:    #6b7280;
  --border:        #1e1e2e;
  --danger:        #ef4444;
  --success:       #22c55e;
  --warning:       #f59e0b;

  /* ── Diagnostic-specific ── */
  --surface2:      #1a1a26;
  --radius:        10px;
  --radius-sm:     8px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}


/* ── Progress Bar ─────────────────────────────────────────── */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width .4s ease;
  z-index: 1000;
}


/* ── Top Bar ──────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-logo {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.topbar-name {
  color: var(--text-primary);
  font-weight: 500;
}

.topbar-email {
  color: var(--text-muted);
  font-size: 12px;
}


/* ── Container ────────────────────────────────────────────── */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 120px;
}


/* ── Step Header ──────────────────────────────────────────── */

.step-header {
  margin-bottom: 32px;
}

.step-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 6px;
}

.step-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.step-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}


/* ── Question Card ────────────────────────────────────────── */

.question {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 14px;
  transition: border-color 0.2s, opacity 0.3s;
}

.question:hover {
  border-color: #2a2a3e;
}

.question.has-value {
  border-left: 3px solid var(--accent);
}

.question.has-error {
  border-left: 3px solid var(--danger);
}

.question.hidden {
  display: none;
}

.q-label {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 500;
}

.q-id {
  color: var(--accent-light);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 3px;
}

.q-text {
  flex: 1;
}

.q-required {
  color: var(--danger);
  margin-left: 2px;
}

.q-optional {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 4px;
}


/* ── Inputs ───────────────────────────────────────────────── */

select,
input[type="text"],
textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

select:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

select option {
  background: var(--surface2);
  color: var(--text-primary);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.char-count.warning {
  color: var(--warning);
}

.char-count.met {
  color: var(--success);
}


/* ── Radio / Checkbox ─────────────────────────────────────── */

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
}

.radio-option:hover,
.checkbox-option:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.radio-option.selected,
.checkbox-option.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.radio-option input,
.checkbox-option input {
  accent-color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
}


/* ── Step Navigation ──────────────────────────────────────── */

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.step-nav-stats {
  font-size: 13px;
  color: var(--text-muted);
}

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: -0.2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.btn-ghost {
  background: none;
  color: var(--text-muted);
  border: none;
  padding: 12px 16px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-group {
  display: flex;
  gap: 12px;
}


/* ── Transition Card ──────────────────────────────────────── */

.transition-card {
  text-align: center;
  padding: 80px 32px;
  animation: fadeIn 0.3s ease;
}

.transition-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 20px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.transition-heading {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.transition-body {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
}


/* ── Completed / Locked ───────────────────────────────────── */

.locked-card {
  text-align: center;
  padding: 80px 32px;
}

.locked-card h2 {
  font-size: 22px;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.locked-card p {
  color: var(--text-muted);
  font-size: 15px;
}


/* ── Toast ────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.3s ease;
  background: var(--bg-card);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.toast.show {
  transform: translateX(0);
}


/* ── Exit Intent Modal ────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  width: 440px;
  max-width: 90vw;
  text-align: center;
}

.modal-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.modal h3 {
  font-size: 18px;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.modal p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ── Idle Nudge ───────────────────────────────────────────── */

.idle-nudge {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-muted);
  transition: transform 0.3s ease, opacity 0.3s;
  opacity: 0;
  z-index: 500;
  pointer-events: none;
}

.idle-nudge.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}


/* ── Validation Error Banner ──────────────────────────────── */

.error-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  padding: 12px 20px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #f87171;
  display: none;
}

.error-banner.visible {
  display: block;
}


/* ── Animations ───────────────────────────────────────────── */

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

.fade-in {
  animation: fadeIn 0.3s ease;
}


/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 600px) {
  .container {
    padding: 16px 14px 120px;
  }

  .question {
    padding: 16px 18px;
  }

  .step-title {
    font-size: 18px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .topbar {
    padding: 10px 14px;
  }

  .topbar-email {
    display: none;
  }

  .modal {
    padding: 28px 24px;
    border-radius: 12px;
  }

  .transition-card {
    padding: 48px 20px;
  }
}