/* ═══════════════════════════════════════════════════════════
   MuleSoft AE Research Assistant – Premium UI
   Tokens defined in design-system.css
   ═══════════════════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* ─── Background (legacy elements hidden — noise in design-system.css) ── */
.bg-grid, .bg-glow, .bg-glow-1, .bg-glow-2, .bg-glow-3 {
  display: none;
}

/* ─── Header ───────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-icon svg, .logo-icon img {
  height: 36px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
}

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

.status-dot.disconnected {
  background: var(--accent-red);
}

/* ─── Mode Toggle ──────────────────────────────────────── */
.mode-toggle {
  display: flex;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
}

.mode-btn {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1;
}

.mode-btn:first-child {
  border-radius: 7px 0 0 7px;
}

.mode-btn:last-child {
  border-radius: 0 7px 7px 0;
}

.mode-btn:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
}

.mode-btn.active[data-mode="pro"] {
  background: rgba(139, 92, 246, 0.25);
  color: #a78bfa;
}

.mode-btn.active[data-mode="flash"] {
  background: rgba(34, 211, 238, 0.2);
  color: #67e8f9;
}

.mode-disclaimer {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.82rem;
  color: #fca5a5;
  line-height: 1.5;
  margin-bottom: 20px;
  text-align: center;
}

.mode-disclaimer strong {
  color: #f87171;
}

.mode-disclaimer a {
  color: #f87171;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mode-toggle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.mode-hint {
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0.7;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ─── Usage Badges ─────────────────────────────────────── */
.usage-badges {
  display: flex;
  gap: 6px;
  align-items: center;
}

.usage-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255,255,255,0.08);
}

.usage-badge-pro {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.25);
}

.usage-badge-flash {
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.2);
}

.usage-badge-label {
  opacity: 0.7;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.usage-badge-value {
  font-variant-numeric: tabular-nums;
}

.usage-badge.exhausted {
  opacity: 0.5;
  border-color: rgba(239, 68, 68, 0.3);
}

.usage-badge.exhausted .usage-badge-value {
  color: #f87171;
}

/* ─── Main ─────────────────────────────────────────────── */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
  z-index: 1;
}

/* ─── Search ───────────────────────────────────────────── */
.search-section {
  padding: 80px 0 40px;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero-line1 {
  display: block;
}

.hero-line2 {
  display: block;
  color: var(--accent-gold);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.search-form {
  max-width: 620px;
  margin: 0 auto;
}


.targeting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto 12px;
}

.targeting-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.targeting-field-full {
  grid-column: 1 / -1;
}

.targeting-field label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.targeting-field label span {
  color: #ff6b6b;
}

.targeting-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
}

.targeting-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.targeting-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* ─── Section Divider ─────────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  margin: 16px auto 12px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.section-divider span {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Research Focus Section ──────────────────────────────── */
.research-focus-grid {
  max-width: 620px;
  margin: 0 auto 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: center;
}

.research-focus-grid .targeting-field { text-align: center; }
.research-focus-grid .targeting-field > label { display: block; text-align: center; }

.scope-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.scope-btn {
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scope-btn:not(:last-child) {
  border-right: 1px solid var(--border-subtle);
}

.scope-btn:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.scope-btn.active {
  color: var(--text-primary);
  background: var(--accent-gold-muted);
  font-weight: 600;
}

.product-picker-wrap {
  margin-top: 12px;
  animation: fadeIn 0.2s ease;
}

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

.email-pref-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 620px;
  margin: 0 auto 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: center;
}

.email-pref-grid .targeting-field { text-align: center; }
.email-pref-grid .targeting-field > label { display: block; text-align: center; }
.email-pref-grid .toggle-wrapper { justify-content: center; }

.pov-preview {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.pov-section {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--mule-blue);
}

.pov-section:last-of-type {
  margin-bottom: 0;
}

.pov-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mule-blue);
  margin: 0 0 10px 0;
  letter-spacing: 0.01em;
}

.pov-section-content {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.pov-section-content p {
  margin: 0 0 8px 0;
}

.pov-section-content p:last-child {
  margin-bottom: 0;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 4px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input-wrapper:focus-within {
  border-color: var(--mule-blue);
  box-shadow: 0 0 0 2px var(--border-focus);
}

.search-icon {
  width: 20px;
  height: 20px;
  margin-left: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: var(--font-body);
  padding: 14px 16px;
  font-weight: 500;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-btn {
  background: var(--accent-gold);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-btn:hover {
  opacity: 0.85;
}

.search-btn:active {
  opacity: 0.7;
}

.search-btn.loading .btn-text {
  display: none;
}

.search-btn .btn-loader {
  display: none;
}

.search-btn.loading .btn-loader {
  display: flex;
}

.search-btn.loading {
  pointer-events: none;
  padding: 14px 20px;
}

.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

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

.search-examples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.search-examples span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.example-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}

.example-btn:hover {
  background: var(--accent-gold-muted);
  border-color: var(--mule-blue);
  color: var(--mule-blue);
}

/* ─── Loading ──────────────────────────────────────────── */
.loading-section {
  display: none;
  padding: 20px 0;
}

.loading-section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.loading-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  backdrop-filter: blur(12px);
}

/* (Old loading-steps and progress-total removed — replaced by dot stepper in design-system.css) */

/* ─── Toggle Switch ────────────────────────────────────── */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  transition: all 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--accent-gold-muted);
  border-color: var(--accent-gold);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
  background: var(--mule-blue);
}

.toggle-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.2;
}

/* (Old progress bar removed — replaced by dot stepper in design-system.css) */

/* ─── Error ────────────────────────────────────────────── */
.error-section {
  display: none;
  padding: 20px 0;
}

.error-section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.error-card {
  background: var(--bg-card);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
}

.error-icon {
  width: 48px;
  height: 48px;
  color: var(--accent-red);
  margin-bottom: 16px;
}

.error-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.error-message {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.retry-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.retry-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ─── Results ──────────────────────────────────────────── */
.results-section {
  display: none;
  padding: 20px 0;
}

.results-section.active {
  display: block;
}

/* ─── Cards ────────────────────────────────────────────── */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(20px);
  animation: cardReveal 0.5s ease forwards;
}

.result-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card);
}

.result-card:nth-child(1) {
  animation-delay: 0s;
}

.result-card:nth-child(2) {
  animation-delay: 0.06s;
}

.result-card:nth-child(3) {
  animation-delay: 0.12s;
}

.result-card:nth-child(4) {
  animation-delay: 0.18s;
}

.result-card:nth-child(5) {
  animation-delay: 0.24s;
}

.result-card:nth-child(6) {
  animation-delay: 0.3s;
}

.result-card:nth-child(7) {
  animation-delay: 0.36s;
}

.result-card:nth-child(8) {
  animation-delay: 0.42s;
}

.result-card:nth-child(9) {
  animation-delay: 0.48s;
}

.result-card:nth-child(10) {
  animation-delay: 0.54s;
}

.result-card:nth-child(11) {
  animation-delay: 0.6s;
}

.result-card:nth-child(12) {
  animation-delay: 0.66s;
}

@keyframes cardReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  cursor: pointer;
  user-select: none;
}

.card-header:hover {
  opacity: 0.9;
}

.card-collapse-indicator {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.card-collapse-indicator svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.result-card.is-collapsed .card-collapse-indicator svg {
  transform: rotate(-90deg);
}

.result-card.is-collapsed .card-body {
  display: none;
}

.result-card.is-collapsed {
  opacity: 0.7;
}

.result-card.is-collapsed:hover {
  opacity: 1;
}

/* ─── Collapse/Expand All toggle ──────────── */
.cards-toggle-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.cards-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.cards-toggle-btn:hover {
  border-color: var(--mule-blue);
  color: var(--mule-blue);
}

.cards-toggle-btn svg {
  width: 14px;
  height: 14px;
}

.card-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gold-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon svg {
  width: 18px;
  height: 18px;
  color: var(--mule-blue);
}

.card-icon.icon-mule {
  background: var(--accent-gold-muted);
}

.card-icon.icon-mule svg {
  color: var(--mule-purple-light);
}

.card-icon.icon-roi {
  background: var(--signal-quickwin-bg);
}

.card-icon.icon-roi svg {
  color: var(--accent-green);
}

.card-icon.icon-discovery {
  background: rgba(243, 156, 18, 0.1);
}

.card-icon.icon-discovery svg {
  color: var(--accent-amber);
}

.card-icon.icon-triggers {
  background: var(--accent-gold-muted);
}

.card-icon.icon-triggers svg {
  color: var(--accent-cyan);
}

.card-icon.icon-maturity {
  background: var(--accent-gold-muted);
}

.card-icon.icon-maturity svg {
  color: var(--mule-blue);
}

.card-icon.icon-pain {
  background: rgba(231, 76, 60, 0.1);
}

.card-icon.icon-pain svg {
  color: var(--accent-red);
}

.card-icon.icon-refs {
  background: var(--accent-gold-muted);
}

.card-icon.icon-refs svg {
  color: var(--sf-blue);
}

.card-icon.icon-email {
  background: var(--accent-gold-muted);
}

.card-icon.icon-email svg {
  color: var(--accent-cyan);
}

.card-icon.icon-usecases {
  background: var(--signal-quickwin-bg);
}

.card-icon.icon-usecases svg {
  color: var(--accent-green);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: 1;
}

.card-badge {
  background: var(--accent-gold-muted);
  color: var(--mule-blue);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-size {
  background: var(--accent-gold-muted);
  color: var(--mule-purple-light);
  margin-left: 6px;
}

/* ─── Company ──────────────────────────────────────────── */
.company-summary {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ─── Tech Stack ───────────────────────────────────────── */
.tech-group {
  margin-bottom: 20px;
}

.tech-group:last-child {
  margin-bottom: 0;
}

.tech-group-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tech-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.tech-indicator.confirmed {
  background: var(--accent-green);
  box-shadow: none;
}

.tech-indicator.likely {
  background: var(--accent-amber);
  box-shadow: 0 0 6px rgba(243, 156, 18, 0.4);
}

.tech-indicator.industry-std {
  background: #7c8ef5;
  box-shadow: 0 0 6px rgba(124, 142, 245, 0.4);
}

.tech-group-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 2px 0 10px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}

.tech-tag:hover {
  background: var(--accent-gold-muted);
  border-color: rgba(212, 168, 83, 0.3);
  color: var(--mule-blue);
}

.tech-tag.highlight {
  background: var(--accent-gold-muted);
  border-color: rgba(212, 168, 83, 0.25);
  color: var(--mule-blue);
}

.tech-tag-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

/* Source badges for all tech stack items */
.tech-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.3;
}

.tech-source-badge.source-hiring {
  color: #e5a93a;
  background: rgba(229, 169, 58, 0.1);
}

.tech-source-badge.source-web-intel {
  color: #56b8e6;
  background: rgba(86, 184, 230, 0.1);
}

.tech-source-badge.source-known-intel {
  color: var(--accent-gold);
  background: var(--accent-gold-muted);
}

.tech-source-badge.source-scrape {
  color: #7c8ef5;
  background: rgba(124, 142, 245, 0.1);
}

.tech-source-badge.source-search {
  color: #b088f5;
  background: rgba(176, 136, 245, 0.1);
}

.tech-source-badge.source-llm {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

.tech-source-badge.source-industry-context {
  color: #7c8ef5;
  background: rgba(124, 142, 245, 0.1);
}

/* API capability and complexity badges (inline on tech stack items) */
.tech-api-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.3;
}

.tech-api-badge.api-full {
  color: var(--signal-quickwin);
  background: var(--signal-quickwin-bg);
}

.tech-api-badge.api-partial {
  color: #f39c12;
  background: rgba(243, 156, 18, 0.1);
}

.tech-api-badge.api-none {
  color: var(--signal-trigger);
  background: rgba(231, 76, 60, 0.1);
}

.tech-api-badge.api-unknown {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

.tech-api-badge.complexity-high {
  color: var(--signal-trigger);
  background: rgba(231, 76, 60, 0.08);
}

.tech-api-badge.complexity-medium {
  color: #f39c12;
  background: rgba(243, 156, 18, 0.08);
}

.tech-api-badge.complexity-low {
  color: var(--signal-quickwin);
  background: var(--signal-quickwin-bg);
}

/* Strategic Intent section in Company Overview card */
.strategic-intent-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color-subtle);
}

.strategic-intent-text {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.core-imperatives-section {
  margin-top: 12px;
}

.tech-tag.verified {
  background: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.25);
  color: #28a745;
}

/* ─── Pitch ────────────────────────────────────────────── */
.pitch-text {
  background: var(--accent-gold-muted);
  border: none;
  border-left: 3px solid var(--mule-blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.8;
  font-style: normal;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.copy-btn:hover {
  background: var(--accent-gold-muted);
  border-color: var(--mule-blue);
  color: var(--mule-blue);
}

.copy-btn.copied {
  background: var(--signal-quickwin-bg);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* ─── Use Cases (expanded cards) ───────────────────────── */
.usecase-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.usecase-card:last-child {
  margin-bottom: 0;
}

.usecase-card:hover {
  border-color: rgba(16, 185, 129, 0.2);
}

.uc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.usecase-number {
  background: var(--accent-gold);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.uc-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.uc-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 10px;
}

.uc-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.uc-product-tag {
  background: var(--accent-gold-muted);
  color: var(--mule-blue);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.uc-value {
  font-size: 0.82rem;
  color: var(--accent-green);
  line-height: 1.6;
}

.uc-value strong {
  color: var(--accent-green);
}

/* ─── ROI Stats ────────────────────────────────────────── */
.roi-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.roi-item {
  background: var(--signal-quickwin-bg);
  border: 1px solid var(--signal-quickwin-bg);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: border-color 0.2s;
}

.roi-item:hover {
  border-color: rgba(16, 185, 129, 0.25);
}

.roi-stat {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.roi-source {
  font-size: 0.78rem;
  color: var(--accent-green);
  font-weight: 500;
  margin-bottom: 6px;
}

.roi-source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--accent-green);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 6px;
  padding: 3px 10px;
  background: var(--signal-quickwin-bg);
  border-radius: 6px;
  transition: all 0.2s;
}

.roi-source-link:hover {
  background: var(--signal-quickwin-bg);
  color: #fff;
  text-decoration: none;
}

.roi-relevance {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Discovery Questions ──────────────────────────────── */
.question-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(243, 156, 18, 0.03);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
  transition: background 0.2s;
}

.question-item:hover {
  background: rgba(243, 156, 18, 0.06);
}

.q-number {
  background: rgba(243, 156, 18, 0.15);
  color: var(--accent-amber);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── Two Column Row ───────────────────────────────────── */
.two-col-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.two-col-row .result-card {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .two-col-row {
    grid-template-columns: 1fr;
  }
}

/* ─── Trigger Events ──────────────────────────────────── */
.trigger-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trigger-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.trigger-bolt {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ─── Integration Maturity ─────────────────────────────── */
.maturity-meter {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.maturity-level {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ml-dot {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.3s;
}

.maturity-level.active .ml-dot {
  background: var(--mule-blue);
}

.maturity-level.current .ml-dot {
  background: var(--accent-gold);
  box-shadow: none;
}

.ml-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}

.maturity-level.current .ml-label {
  color: var(--mule-blue);
  font-weight: 700;
}

.maturity-assessment {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}

.maturity-rec {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  line-height: 1.6;
}

.maturity-rec strong {
  color: var(--accent-cyan);
}

/* ─── Competitive Insight ──────────────────────────────── */
.competitive-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ─── Industry Pain Points ─────────────────────────────── */
.pain-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pain-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.pain-icon {
  flex-shrink: 0;
}

/* ─── Customer References ──────────────────────────────── */
.ref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ref-tag {
  background: var(--accent-gold-muted);
  border: 1px solid var(--accent-gold-muted);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.ref-tag:hover {
  background: var(--accent-gold-muted);
  border-color: var(--mule-blue);
}

/* ─── Outreach Email ───────────────────────────────────── */
.email-preview {
  background: var(--accent-gold-muted);
  border: 1px solid var(--accent-gold-muted);
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.9;
  white-space: pre-wrap;
  font-family: var(--font-body);
}

/* ─── Empty state ──────────────────────────────────────── */
.empty-state {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ─── Footer ───────────────────────────────────────────── */
.results-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 0;
  opacity: 0;
  animation: cardReveal 0.5s ease forwards;
  animation-delay: 0.7s;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.meta-item svg {
  width: 14px;
  height: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .search-input-wrapper {
    flex-direction: column;
    padding: 8px;
  }

  .search-icon {
    display: none;
  }

  .search-input {
    width: 100%;
    text-align: center;
  }

  .search-btn {
    width: 100%;
    justify-content: center;
  }

  .result-card {
    padding: 20px;
  }

  .loading-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 12px 16px;
  }

  .main {
    padding: 0 16px 60px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .search-section {
    padding: 48px 0 24px;
  }
}

/* ─── Export Bar ────────────────────────────────────────── */
.export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 16px 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  opacity: 0;
  animation: cardReveal 0.5s ease forwards;
}

.export-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.export-buttons {
  display: flex;
  gap: 10px;
}

.export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.export-btn svg {
  width: 16px;
  height: 16px;
}

.export-btn:hover {
  background: var(--accent-gold-muted);
  border-color: var(--mule-blue);
  color: var(--mule-blue);
}

.export-btn:active {
  transform: scale(0.96);
}

.export-btn-gem {
  border-color: rgba(168, 85, 247, 0.3);
  color: rgba(168, 85, 247, 0.8);
}

.export-btn-gem:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.6);
  color: rgba(168, 85, 247, 1);
}

.export-btn-gdoc {
  border-color: rgba(52, 168, 83, 0.35);
  color: rgba(52, 168, 83, 0.85);
}

.export-btn-gdoc:hover {
  background: rgba(52, 168, 83, 0.1);
  border-color: rgba(52, 168, 83, 0.7);
  color: rgba(52, 168, 83, 1);
}

/* ─── Product Focus Multi-Select Grid ─────────────────────── */
.product-focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.product-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.015);
  border-radius: var(--radius-sm);
}

.product-group:first-child {
  border-right: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding-right: 14px;
}

.product-group:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding-left: 14px;
}

.product-group-label {
  width: 100%;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mule-blue);
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent-gold-muted);
}

.product-group:last-child .product-group-label {
  color: rgba(168, 85, 247, 0.8);
  border-bottom-color: rgba(168, 85, 247, 0.1);
}

.product-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.product-chip:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.product-chip input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: none;
  position: absolute;
  pointer-events: none;
}

.product-chip:has(input:checked) {
  border-color: var(--border-focus);
  background: var(--accent-gold-muted);
  color: var(--text-primary);
  font-weight: 500;
}

.product-group:last-child .product-chip:has(input:checked) {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.1);
}

.field-hint {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: none;
}


@media (max-width: 600px) {
  .product-focus-grid {
    grid-template-columns: 1fr;
  }

  .product-group:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding-right: 12px;
    padding-bottom: 12px;
  }

  .product-group:last-child {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding-left: 12px;
    padding-top: 12px;
  }
}

/* ─── Email Persona Tabs ──────────────────────────────────── */
.email-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.email-tab {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.email-tab:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.email-tab.active[data-persona="challenger"] {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.1);
  color: rgb(245, 158, 11);
}

.email-tab.active[data-persona="partner"] {
  border-color: rgba(212, 168, 83, 0.5);
  background: var(--accent-gold-muted);
  color: rgb(0, 161, 224);
}

.email-tab.active[data-persona="technical_peer"] {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.1);
  color: rgb(16, 185, 129);
}

.email-subject-line {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.email-body-text {
  white-space: pre-wrap;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ─── Re-analyze Button ──────────────────────────────────── */
.reanalyze-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gold-muted);
  border: 1px solid var(--mule-blue);
  color: var(--mule-blue);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
  font-family: var(--font-body);
}

.reanalyze-btn svg {
  width: 18px;
  height: 18px;
}

.reanalyze-btn:hover {
  background: var(--accent-gold-muted);
  transform: translateY(-1px);
  box-shadow: none;
}

.reanalyze-btn:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .export-bar {
    flex-direction: column;
    gap: 12px;
  }

  .export-buttons {
    width: 100%;
    justify-content: center;
  }
}


/* ─── Account Notes ─────────────────────────────────────── */
.notes-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
}

.notes-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  line-height: 1.6;
  resize: vertical;
  transition: all 0.2s;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--mule-blue);
  background: rgba(255, 255, 255, 0.05);
}

.notes-textarea::placeholder {
  color: var(--text-muted);
}

.notes-status {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 600;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.3s;
}

.notes-status.visible {
  opacity: 1;
}

/* ─── Navigation Links ────────────────────────────────── */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--mule-blue);
  border-color: var(--border-subtle);
  background: var(--accent-gold-muted);
}

/* ─── Setup Wizard ───────────────────────────────────── */
.setup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11, 14, 23, 0.95);
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.setup-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 36px 32px;
  max-width: 520px;
  width: 92%;
  margin: 40px auto;
  text-align: center;
}

.setup-logo {
  margin-bottom: 16px;
}

.setup-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.setup-title { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.setup-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 24px; }

.setup-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
}

.setup-divider::before,
.setup-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.setup-divider span {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  white-space: nowrap;
}

.setup-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: left;
}

.setup-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  outline: none;
}

.setup-input:focus { border-color: var(--mule-blue); }

.setup-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: left;
}

.setup-hint a { color: var(--mule-blue); text-decoration: none; }
.setup-hint a:hover { text-decoration: underline; }

.setup-actions { margin-top: 20px; }

.setup-btn {
  padding: 14px 32px;
  background: var(--accent-gold);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.setup-btn:hover { opacity: 0.9; }
.setup-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.setup-btn-skip {
  padding: 12px 32px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-top: 8px;
  font-family: var(--font-body);
}
.setup-btn-skip:hover { border-color: var(--mule-blue); color: var(--text-primary); }

/* Provider preset selector */
.setup-preset-group {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.setup-preset-btn {
  flex: 1;
  padding: 10px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: var(--font-body);
}
.setup-preset-btn:hover {
  border-color: var(--mule-blue);
  color: var(--text-primary);
}
.setup-preset-btn.active {
  border-color: var(--mule-blue);
  background: rgba(0, 160, 223, 0.08);
  color: var(--text-primary);
}
.setup-preset-name {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 2px;
}
.setup-preset-desc {
  display: block;
  font-size: 0.72rem;
  opacity: 0.7;
}
.setup-key-section {
  margin-bottom: 12px;
}

.setup-key-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: left;
  margin: 2px 0 8px;
  line-height: 1.45;
}

.setup-key-desc strong {
  color: var(--text-primary);
}

.setup-status {
  margin-top: 14px;
  font-size: 0.85rem;
  min-height: 24px;
}

.setup-success {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 20px;
}

/* ─── Mode Selector (Wizard) ─────────────────────────── */
.mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 8px;
}

.mode-card {
  padding: 14px 14px 12px;
  background: var(--bg-primary);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.mode-card:hover {
  border-color: var(--mule-blue);
}

.mode-card.mode-selected {
  border-color: var(--mule-blue);
  background: var(--accent-gold-muted);
}

.mode-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.mode-icon-sm {
  font-size: 1rem;
  line-height: 1;
}

.mode-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.mode-card p {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.35;
}

.mode-stat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-green);
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--signal-quickwin-bg);
}

/* ─── Mode Toggle (Header) ──────────────────────────── */
.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--accent-gold-muted);
  color: var(--mule-blue);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.mode-toggle:hover {
  border-color: var(--mule-blue);
}

.mode-toggle.flash-mode {
  background: rgba(241, 196, 15, 0.12);
  color: var(--accent-gold);
}

.mode-toggle.flash-mode:hover {
  border-color: var(--accent-gold);
}

/* ─── Pro Cost Warning ───────────────────────────────── */
.pro-cost-warning {
  background: rgba(255, 179, 0, 0.08);
  border: 1px solid rgba(255, 179, 0, 0.25);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-secondary, #adb5bd);
  line-height: 1.5;
}
.pro-cost-warning strong {
  color: var(--accent-gold, #f5a623);
}
.pro-cost-warning a {
  color: #8b5cf6;
}

/* ─── Model Badge ────────────────────────────────────── */
.model-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.model-badge.pro {
  background: var(--accent-gold-muted);
  color: var(--mule-blue);
}

.model-badge.flash {
  background: rgba(241, 196, 15, 0.12);
  color: var(--accent-gold);
}

/* ─── History Action Bar (Re-analyze) ────────────────── */
.action-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--mule-blue);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.action-bar .selected-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.reanalyze-btn {
  padding: 8px 18px;
  background: var(--accent-gold);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--font-body);
}

.reanalyze-btn:hover {
  opacity: 0.9;
}

.reanalyze-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rate-warning {
  font-size: 0.75rem;
  color: var(--signal-quickwin);
  margin-left: auto;
}

/* ─── Gem Setup Modal ────────────────────────────────── */
.gem-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(11, 14, 23, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.gem-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gem-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.gem-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.gem-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.gem-modal-close:hover { color: var(--text-primary); }

.gem-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.gem-instructions {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.gem-steps {
  padding-left: 20px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.gem-steps a { color: var(--mule-blue); text-decoration: none; }
.gem-steps a:hover { text-decoration: underline; }

.gem-prompt-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gem-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.gem-copy-btn {
  padding: 5px 12px;
  background: var(--mule-blue);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.gem-copy-btn:hover { opacity: 0.85; }

.gem-prompt-content {
  padding: 16px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
  margin: 0;
}

/* ─── Tier Badges (for results page) ─────────────────── */
.tier-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.tier-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.tier-badge-inline.tier-1 { background: rgba(46,204,113,0.15); color: var(--accent-green); }
.tier-badge-inline.tier-2 { background: rgba(241,196,15,0.15); color: var(--accent-gold); }
.tier-badge-inline.tier-3 { background: rgba(148,163,184,0.1); color: var(--text-muted); }

.qw-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--signal-quickwin-bg);
  color: var(--signal-quickwin);
}

/* ─── Print Styles (for PDF export) ────────────────────── */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .bg-grid,
  .bg-glow,
  .bg-glow-1,
  .bg-glow-2,
  .bg-glow-3 {
    display: none !important;
  }

  .header,
  .search-section,
  .loading-section,
  .error-section {
    display: none !important;
  }

  .export-bar,
  .copy-btn,
  .export-btn {
    display: none !important;
  }

  .results-section {
    display: block !important;
    padding: 0 !important;
  }

  .main {
    max-width: 100% !important;
    padding: 0 20px !important;
  }

  .result-card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    page-break-inside: avoid;
    margin-bottom: 12px !important;
    padding: 16px !important;
  }

  .card-title {
    color: #000 !important;
  }

  .card-badge {
    background: #eee !important;
    color: #333 !important;
  }

  .company-summary,
  .competitive-text,
  .pitch-text,
  .uc-desc,
  .roi-relevance,
  .sh-messaging,
  .sh-pain,
  .maturity-assessment,
  .maturity-rec {
    color: #333 !important;
  }

  .pitch-text {
    background: #f5f5f5 !important;
    border-left-color: #0077B5 !important;
    color: #000 !important;
  }

  .email-preview {
    background: #f5f5f5 !important;
    border-color: #ddd !important;
    color: #333 !important;
  }

  .tech-tag {
    background: #f0f0f0 !important;
    border-color: #ccc !important;
    color: #333 !important;
  }

  .tech-tag.highlight {
    background: #e0f0ff !important;
    color: #0077B5 !important;
  }

  .roi-source-link {
    color: #0077B5 !important;
    background: none !important;
  }

  .card-icon {
    background: #f0f0f0 !important;
  }

  .card-icon svg {
    color: #333 !important;
  }

  .results-footer {
    opacity: 1 !important;
    animation: none !important;
  }

  .results-footer span {
    color: #666 !important;
  }

  .two-col-row {
    grid-template-columns: 1fr 1fr !important;
  }

  .usecase-card,
  .roi-item {
    background: #fafafa !important;
    border-color: #ddd !important;
  }

  .question-item {
    background: #fafafa !important;
  }

  .ref-tag {
    background: #f0f0f0 !important;
    border-color: #ccc !important;
    color: #333 !important;
  }

  .ml-dot {
    background: #ccc !important;
  }

  .maturity-level.active .ml-dot {
    background: #0077B5 !important;
  }

  .maturity-level.current .ml-dot {
    background: #0077B5 !important;
    box-shadow: none !important;
  }

  .ml-label {
    color: #666 !important;
  }

  .maturity-level.current .ml-label {
    color: #0077B5 !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   Core AE Input
   ═══════════════════════════════════════════════════════════ */

.ae-name-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ae-name-wrapper:focus-within {
  border-color: var(--mule-purple-light);
  box-shadow: 0 0 0 2px var(--border-focus);
}

.ae-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ae-name-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
}

.ae-name-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.ae-label {
  background: var(--accent-gold);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   Known Intel Panel
   ═══════════════════════════════════════════════════════════ */

.intel-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 0;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.25s;
  max-width: 280px;
}

.intel-toggle svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.intel-toggle:hover {
  color: var(--mule-blue);
  border-color: rgba(212, 168, 83, 0.25);
  background: var(--accent-gold-muted);
}

.intel-chevron {
  transition: transform 0.3s ease;
}

.intel-toggle.open .intel-chevron {
  transform: rotate(180deg);
}

.intel-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
  opacity: 0;
  margin-top: 0;
}

.intel-panel.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 16px;
}

.intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

.intel-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.intel-field-full {
  grid-column: 1 / -1;
}

.intel-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.intel-label svg {
  width: 14px;
  height: 14px;
  color: var(--accent-gold);
  opacity: 0.7;
}

.intel-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
  resize: vertical;
  transition: border-color var(--transition-fast);
  min-height: 44px;
}

.intel-textarea::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.intel-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.intel-textarea-lg {
  min-height: 60px;
}

@media (max-width: 600px) {
  .targeting-grid {
    grid-template-columns: 1fr;
  }

  .email-pref-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .targeting-field-full {
    grid-column: 1;
  }

  .intel-grid {
    grid-template-columns: 1fr;
  }

  .intel-field-full {
    grid-column: 1;
  }
}

/* ═══════════════════════════════════════════════════════════
   History Drawer
   ═══════════════════════════════════════════════════════════ */

/* ─── Header Actions ──────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.history-toggle-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.history-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.history-toggle-btn:hover {
  background: var(--accent-gold-muted);
  border-color: var(--mule-blue);
  color: var(--mule-blue);
}

.history-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-gold);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  box-shadow: none;
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── Overlay ──────────────────────────────────────────── */
.history-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.history-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Drawer ───────────────────────────────────────────── */
.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 90vw;
  background: rgba(11, 14, 23, 0.95);
  backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-subtle);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.4);
}

.history-drawer.open {
  transform: translateX(0);
}

body.drawer-active {
  overflow: hidden;
}

/* ─── Drawer Header ────────────────────────────────────── */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title-row svg {
  width: 22px;
  height: 22px;
  color: var(--mule-blue);
}

.drawer-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--accent-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-close svg {
  width: 16px;
  height: 16px;
}

.drawer-close:hover {
  background: rgba(231, 76, 60, 0.1);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* ─── Drawer Search ────────────────────────────────────── */
.drawer-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.drawer-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
}

.drawer-search-input::placeholder {
  color: var(--text-muted);
}

/* ─── Drawer Body ──────────────────────────────────────── */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-body::-webkit-scrollbar {
  width: 5px;
}

.drawer-body::-webkit-scrollbar-track {
  background: transparent;
}

.drawer-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.drawer-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ─── Empty State ──────────────────────────────────────── */
.drawer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
}

.drawer-empty svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.4;
}

.drawer-empty p {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.drawer-empty span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── History Card ─────────────────────────────────────── */
.history-card {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  overflow: hidden;
}

.history-card:hover {
  background: var(--accent-gold-muted);
  border-color: var(--accent-gold-muted);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hc-main {
  flex: 1;
  padding: 14px 16px;
  cursor: pointer;
  min-width: 0;
}

.hc-domain {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.hc-industry {
  background: var(--accent-gold-muted);
  color: var(--mule-blue);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hc-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.hc-summary {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── History Card Actions ─────────────────────────────── */
.hc-actions {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-subtle);
}

.hc-view-btn,
.hc-delete-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.hc-view-btn svg,
.hc-delete-btn svg {
  width: 14px;
  height: 14px;
}

.hc-view-btn:hover {
  background: var(--accent-gold-muted);
  color: var(--mule-blue);
}

.hc-delete-btn {
  border-top: 1px solid var(--border-subtle);
}

.hc-delete-btn:hover {
  background: rgba(231, 76, 60, 0.1);
  color: var(--accent-red);
}

/* ─── Print: hide history ──────────────────────────────── */
@media print {

  .history-drawer,
  .history-overlay,
  .history-toggle-btn {
    display: none !important;
  }
}

/* ─── Responsive history ───────────────────────────────── */
@media (max-width: 480px) {
  .history-drawer {
    width: 100vw;
    max-width: 100vw;
  }

  .history-toggle-btn {
    width: 34px;
    height: 34px;
  }
}

/* ─── AE Badge in history cards ────────────────────────── */
.hc-ae {
  background: var(--accent-gold-muted);
  color: var(--mule-purple-light);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ─── AE Filter Bar ────────────────────────────────────── */
.ae-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.ae-filter-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.ae-filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ae-filter-chip:hover {
  background: var(--accent-gold-muted);
  border-color: var(--mule-purple-light);
  color: var(--mule-purple-light);
}

.ae-filter-chip.active {
  background: var(--accent-gold-muted);
  border-color: var(--mule-purple-light);
  color: var(--mule-purple-light);
  font-weight: 600;
}

/* ─── Sources Modal (reusing structure but specific tweaks) ── */
#sourcesModal {
  max-width: 800px;
  height: 80vh;
  display: flex;
  flex-direction: column;
}

#sourcesListBody {
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.source-category {
  background: var(--bg-secondary);
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
}

.source-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s;
}

.source-item:last-child {
  border-bottom: none;
}

.source-item:hover {
  background: var(--accent-gold-muted);
}

.source-title {
  font-weight: 600;
  color: var(--mule-blue);
  margin-bottom: 4px;
  display: block;
  text-decoration: none;
  font-size: 0.95rem;
}

.source-title:hover {
  text-decoration: underline;
}

.source-snippet {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.source-link {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   Confidence Dots (Tech Stack)
   ═══════════════════════════════════════════════════════════ */

.confidence-dots {
  display: flex;
  gap: 3px;
  justify-content: center;
}

.conf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
}

.conf-dot.filled {
  background: var(--mule-blue);
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════
   Audit Banner
   ═══════════════════════════════════════════════════════════ */

.audit-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  opacity: 0;
  animation: cardReveal 0.5s ease forwards;
}

.audit-banner.audit-verified {
  border-color: rgba(16, 185, 129, 0.3);
}

.audit-banner.audit-flagged {
  border-color: rgba(243, 156, 18, 0.3);
}

.audit-banner.audit-skipped {
  border-color: rgba(255, 255, 255, 0.1);
}

.audit-banner.audit-pending {
  border-color: rgba(52, 152, 219, 0.3);
}

.audit-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.audit-icon {
  font-size: 1rem;
}

.audit-redactions {
  background: rgba(231, 76, 60, 0.15);
  color: var(--accent-red);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
}

.audit-assumptions,
.audit-hallucinations {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

.audit-assumptions strong,
.audit-hallucinations strong {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.audit-assumptions ul,
.audit-hallucinations ul {
  padding-left: 16px;
  margin-top: 4px;
}

.audit-assumptions li {
  color: var(--accent-amber);
  font-size: 0.8rem;
}

.audit-hallucinations li {
  color: var(--accent-red);
  font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════════════════
   Email Persona Badge & Subject Line
   ═══════════════════════════════════════════════════════════ */

.persona-badge {
  background: var(--accent-gold-muted);
  color: var(--accent-cyan);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.email-subject-line {
  background: var(--accent-gold-muted);
  border: 1px solid var(--accent-gold-muted);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.email-subject-line strong {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 8px;
}

.email-body-text {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

/* ─── Print: hide AE elements ──────────────────────────── */
@media print {

  .ae-name-wrapper,
  .ae-filter-bar,
  .intel-toggle,
  .intel-panel,
  .search-examples,
  .search-form,
  .history-overlay,
  .history-drawer,
  .modal-overlay,
  .modal-window {
    display: none !important;
  }

  .audit-banner {
    opacity: 1 !important;
    animation: none !important;
    border-color: #ddd !important;
    background: #fafafa !important;
  }

  .confidence-dots .conf-dot.filled {
    background: #0077B5 !important;
    box-shadow: none !important;
  }

  .persona-badge {
    background: #eee !important;
    color: #333 !important;
  }
}

/* Collapsible result cards */
.card-collapse-toggle {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 4px 10px;
  cursor: pointer;
}

.result-card.is-collapsed .card-body {
  display: none;
}

/* Proof points */
.proof-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.proof-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.proof-type,
.proof-year {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.audit-inline-note {
  margin-bottom: 10px;
  font-size: 0.75rem;
  color: var(--accent-amber);
  background: rgba(243, 156, 18, 0.06);
  border: 1px solid rgba(243, 156, 18, 0.15);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 1.4;
}

.audit-inline-note strong {
  margin-right: 4px;
}

.audit-corrected-field {
  border-left: 3px solid rgba(243, 156, 18, 0.4) !important;
  padding-left: 12px;
}

/* Audit corrections section */
.audit-corrections {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

.audit-corrections strong {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.audit-corrections ul {
  padding-left: 16px;
  margin-top: 4px;
}

.audit-corrections li {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.audit-field-name {
  font-weight: 600;
  color: var(--mule-blue);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.76rem;
  background: var(--accent-gold-muted);
  padding: 1px 6px;
  border-radius: 4px;
}

.audit-count-badge {
  display: inline-block;
  background: rgba(243, 156, 18, 0.15);
  color: var(--accent-amber);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

.audit-show-more {
  display: inline-block;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.audit-show-more:hover {
  background: var(--accent-gold-muted);
  border-color: var(--mule-blue);
  color: var(--mule-blue);
}

/* ═══════════════════════════════════════════════════════════
   Executive Summary Table
   ═══════════════════════════════════════════════════════════ */
.exec-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.exec-summary-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  line-height: 1.5;
}

.exec-summary-table tr:last-child td {
  border-bottom: none;
}

.exec-label {
  font-weight: 600;
  color: var(--mule-blue);
  white-space: nowrap;
  width: 200px;
}

.exec-value {
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════
   Account Maturity Assessment
   ═══════════════════════════════════════════════════════════ */
.account-maturity {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--accent-gold-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.maturity-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.maturity-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.maturity-level {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 3px 12px;
  border-radius: 20px;
  background: var(--accent-gold-muted);
  color: var(--mule-purple-light);
}

.maturity-level.maturity-early {
  background: rgba(231, 76, 60, 0.15);
  color: var(--accent-red);
}

.maturity-level.maturity-point-to-point {
  background: rgba(243, 156, 18, 0.15);
  color: var(--accent-amber);
}

.maturity-level.maturity-growing {
  background: var(--accent-gold-muted);
  color: var(--mule-blue);
}

.maturity-level.maturity-mature {
  background: var(--signal-quickwin-bg);
  color: var(--accent-green);
}

.maturity-evidence {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
}

.maturity-recommendation {
  font-size: 0.84rem;
  color: var(--accent-cyan);
  font-style: italic;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   Outside-In Insights
   ═══════════════════════════════════════════════════════════ */
.card-insights .card-body {
  padding-top: 8px;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.insight-item {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-primary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.insight-item:last-child {
  border-bottom: none;
}

.insight-item strong {
  color: var(--mule-blue);
  margin-right: 4px;
}

.strategic-implication {
  margin: 16px 0;
  padding: 14px 18px;
  background: var(--accent-gold-muted);
  border-left: 3px solid var(--mule-purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
  font-style: italic;
}

.imperatives-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 12px;
}

.imperatives-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.imperative-item {
  padding: 12px 16px;
  background: var(--accent-gold-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  line-height: 1.5;
}

.imperative-item strong {
  color: var(--mule-blue);
}

.imperative-desc {
  color: var(--text-secondary);
  margin-left: 4px;
}

/* ═══════════════════════════════════════════════════════════
   Value Driver
   ═══════════════════════════════════════════════════════════ */
.value-driver {
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--accent-gold-muted);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
}

.value-driver-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-green);
  margin-bottom: 6px;
}

.value-driver-text {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.proof-section-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════
   Discovery Questions Split Sections
   ═══════════════════════════════════════════════════════════ */
.discovery-section {
  margin-bottom: 20px;
}

.discovery-section:last-of-type {
  margin-bottom: 0;
}

.discovery-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mule-blue);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ═══════════════════════════════════════════════════════════
   Industry Headwinds
   ═══════════════════════════════════════════════════════════ */
.headwinds-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Public Signals card ────────────────────────────────────────────────── */
.signals-intro {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  font-style: italic;
}

.signals-section {
  margin-bottom: 18px;
}

.signals-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.signals-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.signal-item {
  padding: 10px 13px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
}

.signal-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  font-size: 0.82rem;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.signal-title-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}
.signal-title-link:hover { color: var(--accent-blue); text-decoration: underline; }

.signal-year {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.signal-snippet {
  color: var(--text-secondary);
  font-size: 0.79rem;
  line-height: 1.5;
}

.signal-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--accent-blue);
  opacity: 0.7;
  word-break: break-all;
  text-decoration: none;
}
.signal-link:hover { opacity: 1; text-decoration: underline; }

/* ── end Public Signals ─────────────────────────────────────────────────── */

.headwind-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(231, 76, 60, 0.04);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.headwind-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(243, 156, 18, 0.15);
  color: var(--accent-amber);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.headwind-content {
  flex: 1;
}

.headwind-content strong {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.headwind-content p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   Technology Gap Analysis
   ═══════════════════════════════════════════════════════════ */
.gap-comparison {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

.gap-state {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.gap-current {
  background: rgba(231, 76, 60, 0.04);
  border-color: rgba(231, 76, 60, 0.2);
}

.gap-future {
  background: var(--signal-quickwin-bg);
  border-color: rgba(16, 185, 129, 0.2);
}

.gap-state-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.gap-current .gap-state-label {
  color: var(--accent-red);
}

.gap-future .gap-state-label {
  color: var(--accent-green);
}

.gap-state-content {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.gap-arrow {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.gap-risks {
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(243, 156, 18, 0.04);
  border: 1px solid rgba(243, 156, 18, 0.15);
  border-radius: var(--radius-md);
}

.gap-risks-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-amber);
  margin-bottom: 10px;
}

.gap-risks-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gap-risk-item {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}

.gap-risk-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-amber);
}

@media (max-width: 768px) {
  .gap-comparison {
    flex-direction: column;
  }
  .gap-arrow {
    justify-content: center;
    transform: rotate(90deg);
  }
}

/* ═══════════════════════════════════════════════════════════
   Product Positioning
   ═══════════════════════════════════════════════════════════ */
.product-positioning-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-position-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 14px 16px;
  background: var(--accent-gold-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  align-items: center;
}

.pp-challenge {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pp-arrow {
  color: var(--mule-blue);
  font-size: 1.2rem;
  font-weight: 700;
}

.pp-product {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mule-blue);
}

.pp-outcome {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   Competitive Differentiation
   ═══════════════════════════════════════════════════════════ */
.competitive-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.competitive-item {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.competitive-code {
  background: var(--accent-gold-muted);
  border-left: 3px solid var(--mule-blue);
}

.competitive-tool {
  background: var(--accent-gold-muted);
  border-left: 3px solid var(--mule-purple);
}

.competitive-alert {
  background: rgba(231, 76, 60, 0.04);
  border-left: 3px solid var(--accent-red);
}

.competitive-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.competitive-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Agentic Readiness Card ──────────────────────────────── */
.card-agentic-readiness .card-icon { color: var(--accent-gold); }

.badge-score {
  background: var(--accent-gold-muted);
  color: var(--accent-gold);
  font-weight: 700;
}

.agentic-score-bar {
  position: relative;
  height: 28px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.agentic-score-fill {
  height: 100%;
  border-radius: 14px;
  transition: width 0.6s ease;
}

.agentic-score-fill.score-low { background: linear-gradient(90deg, var(--signal-trigger), var(--signal-quickwin)); }
.agentic-score-fill.score-mid { background: linear-gradient(90deg, var(--signal-quickwin), var(--accent-gold)); }
.agentic-score-fill.score-high { background: linear-gradient(90deg, var(--signal-quickwin), var(--accent-gold)); }

.agentic-score-label {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.agentic-justification {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ─── Shadow AI Risk Card ─────────────────────────────────── */
.card-shadow-ai .card-icon { color: var(--signal-quickwin); }

.badge-risk {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-risk.risk-high {
  background: rgba(231, 76, 60, 0.18);
  color: var(--signal-trigger);
}

.badge-risk.risk-medium {
  background: rgba(230, 126, 34, 0.18);
  color: var(--signal-quickwin);
}

.badge-risk.risk-low {
  background: var(--signal-quickwin-bg);
  color: var(--signal-quickwin);
}

.shadow-ai-assessment {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ─── Data Gravity Analysis Card ──────────────────────────── */
.card-data-gravity .card-icon { color: var(--accent-gold); }

.data-gravity-narrative {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── Unified Value Proposition Card ──────────────────────── */
.card-unified-value .card-icon { color: var(--accent-gold); }

.badge-power-of-and {
  background: var(--accent-gold-muted);
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.unified-value-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 500;
  border-left: 4px solid var(--accent-gold);
  padding: 16px 20px;
  margin: 0;
  background: var(--accent-gold-muted);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   Audit Patch — visual flash when async audit corrects a field
   ═══════════════════════════════════════════════════════════ */

@keyframes auditPatchFlash {
  0% { background-color: rgba(243, 156, 18, 0.2); }
  100% { background-color: transparent; }
}

.audit-patched {
  animation: auditPatchFlash 3s ease-out;
  border-left: 3px solid rgba(243, 156, 18, 0.6);
}

/* Skeleton loading state for Phase 2 cards while Phase 1 is rendering */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.skeleton-loading {
  pointer-events: none;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-loading .card-header {
  opacity: 0.6;
}

.skeleton-loading .card-body {
  min-height: 60px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.06) 40px,
    rgba(255,255,255,0.03) 80px
  );
  border-radius: var(--radius-md);
}

/* ═══════════════════════════════════════════════════════════
   PRINT STYLES (PDF EXPORT)
   ═══════════════════════════════════════════════════════════ */
@media print {
  /* 1. Reset to Light Mode for clean paper reading */
  :root {
    --bg-primary: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f8f9fa;
    --bg-input: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #555555;
    --border-subtle: #dddddd;
    --border-active: #cccccc;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  body::before {
    display: none !important;
  }

  /* 2. Hide all interactive UI elements */
  .header,
  .search-section,
  .loading-section,
  .export-bar,
  .cards-toggle-bar,
  .copy-btn,
  .setup-overlay,
  .gem-modal-overlay,
  .intel-toggle,
  .reanalyze-btn,
  .card-collapse-indicator,
  .progress-stepper,
  .stepper-status,
  .stepper-total,
  .signal-row {
    display: none !important;
  }

  /* 3. Briefing card for print */
  .briefing-card {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .briefing-company-name {
    color: #000 !important;
  }

  .tier-border {
    display: none !important;
  }

  .score-arc-fill {
    stroke: #333 !important;
  }

  /* 4. Reformat Results Section for Paper */
  .results-section {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .result-card {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    border-radius: 4px !important;
  }

  .card-header {
    background: #f8f9fa !important;
    border-bottom: 1px solid #cccccc !important;
    padding: 12px 16px !important;
    color: #000 !important;
  }

  .card-title {
    color: #000 !important;
    font-size: 14pt !important;
  }

  .card-body {
    padding: 16px !important;
  }

  /* 5. Fix specific element colors for printing */
  .tech-tag {
    background: #f0f0f0 !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
  }

  .card-badge {
    background: #e0e0e0 !important;
    color: #000 !important;
    border: 1px solid #999 !important;
  }

  .audit-banner {
    page-break-inside: avoid;
    background: #fff8e1 !important;
    border: 1px solid #f3c200 !important;
    color: #000 !important;
  }

  /* 6. Expand all cards automatically for printing */
  .result-card.is-collapsed .card-body {
    display: block !important;
  }

  .drill-section-content {
    max-height: none !important;
    display: block !important;
  }

  @page {
    margin: 0.5in;
    size: letter;
  }

  a {
    color: #0056b3 !important;
    text-decoration: underline !important;
  }
}