@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&f[]=cabinet-grotesk@400,500,700,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --bg-dark: #fafaf7;          /* warm white background */
  --bg-card: #ffffff;          /* pure white cards */
  --bg-card-hover: #f3f5f2;    /* subtle warm hover */
  --border-color: #e2ede7;     /* light sage border */
  --border-glow: rgba(11, 61, 46, 0.06);
  
  --primary-cyan: #0b3d2e;     /* deep ink green */
  --primary-glow: rgba(11, 61, 46, 0.15);
  --secondary-blue: #e8efea;   /* sage green */
  --secondary-glow: rgba(232, 239, 234, 0.6);
  --accent-purple: #8b5cf6;    /* detail violet */
  --accent-green: #10b981;     /* success emerald */
  --accent-gold: #d4a437;      /* gold accent */
  --accent-gold-glow: rgba(212, 164, 55, 0.15);
  
  --text-primary: #1c1e1d;     /* charcoal dark text */
  --text-secondary: #474f4a;   /* medium slate green-gray */
  --text-muted: #7a8c82;       /* muted green-gray */
  
  --font-display: 'Cabinet Grotesk', 'Clash Display', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius: 0.75rem;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  overflow-wrap: break-word;
}

/* Background grid styling inspired by modsapp warm design */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(11, 61, 46, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(212, 164, 55, 0.04) 0%, transparent 40%),
    linear-gradient(rgba(11, 61, 46, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 61, 46, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
  z-index: -1;
  pointer-events: none;
}

/* Container */
.app-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header styling */
header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.badge {
  background: var(--secondary-blue);
  border: 1px solid rgba(11, 61, 46, 0.15);
  color: var(--primary-cyan);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1.main-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary-cyan);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

/* Progress Tracker */
.progress-container {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(11, 61, 46, 0.03);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.time-indicator {
  color: var(--accent-gold);
  font-weight: 700;
  font-family: var(--font-display);
}

.progress-steps-bar {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 0.5rem;
  padding: 0 0.5rem;
}

.progress-steps-line {
  position: absolute;
  top: 10px;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.progress-steps-line-fill {
  position: absolute;
  top: 10px;
  left: 1.5rem;
  width: 0%;
  height: 2px;
  background: var(--primary-cyan);
  z-index: 2;
  transition: width var(--transition-normal);
}

.step-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.step-bullet {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: var(--transition-normal);
}

.step-label {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-normal);
  white-space: nowrap;
}

.step-node.active .step-bullet {
  border-color: var(--primary-cyan);
  background: var(--primary-cyan);
  color: var(--bg-dark);
  box-shadow: 0 0 8px var(--primary-glow);
}

.step-node.active .step-label {
  color: var(--primary-cyan);
  font-weight: 800;
}

.step-node.completed .step-bullet {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
  color: var(--bg-dark);
}

.step-node.completed .step-label {
  color: var(--text-secondary);
}

/* Main Split Panel Layout */
.main-workspace {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  flex-grow: 1;
  min-height: 520px;
  margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
  .main-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

/* Visual Panel (Left) */
.visual-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(11, 61, 46, 0.02);
  min-height: 400px;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.visual-panel.active-step {
  border-color: rgba(11, 61, 46, 0.2);
  box-shadow: 0 10px 30px rgba(11, 61, 46, 0.05);
}

/* Explanation Panel (Right) */
.explanation-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(11, 61, 46, 0.02);
  overflow-y: auto;
  max-height: 650px;
}

/* Custom Scrollbar for Right Panel */
.explanation-panel::-webkit-scrollbar {
  width: 6px;
}
.explanation-panel::-webkit-scrollbar-track {
  background: var(--bg-dark);
  border-radius: 10px;
}
.explanation-panel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}
.explanation-panel::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Explanation Header Section */
.step-title-area {
  margin-bottom: 1.5rem;
}

.step-num {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.step-heading {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary-cyan);
  line-height: 1.2;
}

/* Structured Breakdown Grid */
.explanation-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-cyan);
}

.info-text {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Specially Formatted Callouts */
.takeaway-card {
  background: var(--secondary-blue);
  border: 1px solid rgba(11, 61, 46, 0.15);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

.takeaway-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--primary-cyan);
}

.takeaway-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-cyan);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  letter-spacing: 0.05em;
}

.takeaway-content {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-cyan);
  line-height: 1.4;
}

/* Presenter Notes Section */
.presenter-notes {
  margin-top: 1rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 1rem;
}

.presenter-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.presenter-toggle:hover {
  color: var(--text-secondary);
}

.presenter-content {
  display: none;
  margin-top: 0.5rem;
  background: var(--bg-dark);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-left: 2px solid var(--text-muted);
  line-height: 1.4;
}

.presenter-content.show {
  display: block;
}

/* Animations Areas for Visual Panel */
.animation-stage {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 350px;
}

.hidden-stage {
  display: none !important;
}

/* Screen 1 Intro CSS */
.intro-layout {
  text-align: center;
  max-width: 600px;
}

.intro-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--primary-cyan);
  color: var(--bg-dark);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(11, 61, 46, 0.15);
  font-size: 2.2rem;
}

.intro-desc {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.input-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
  box-shadow: inset 0 2px 4px rgba(11, 61, 46, 0.01);
}

.input-label {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: block;
}

.preset-message {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-cyan);
  border-left: 3px solid var(--accent-gold);
  padding-left: 1rem;
  margin-bottom: 1.25rem;
}

.input-separator {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 1rem 0;
}
.input-separator::before, .input-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.input-separator:not(:empty)::before {
  margin-right: .5em;
}
.input-separator:not(:empty)::after {
  margin-left: .5em;
}

.custom-input-group {
  display: flex;
  gap: 0.75rem;
}

.custom-input {
  flex-grow: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.custom-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 2px rgba(11, 61, 46, 0.08);
}

.btn-use-custom {
  background: var(--primary-cyan);
  border: 1px solid var(--primary-cyan);
  color: var(--bg-dark);
  padding: 0 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-use-custom:hover {
  background: #154f3e;
  border-color: #154f3e;
}

.intro-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-cyan);
  margin-bottom: 1rem;
}

.intro-small-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Chat bubble styling — Asymmetric bubble borders matching modsapp */
.chat-container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chat-bubble {
  position: relative;
  max-width: 85%;
  padding: 1.25rem 1.5rem;
  font-size: 1.15rem;
  line-height: 1.5;
  box-shadow: var(--border-glow);
  transform-origin: left bottom;
  white-space: pre-wrap;
}

/* User Bubble: bubble-l style */
.chat-bubble.user-bubble {
  background: var(--secondary-blue);
  border: 1px solid rgba(11, 61, 46, 0.1);
  border-radius: 1rem 1rem 1rem 0.25rem; /* asymmetric */
  color: var(--primary-cyan);
  align-self: flex-start;
  font-weight: 600;
}

/* Bot Bubble: bubble-r style */
.chat-bubble.bot-bubble {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 1rem 1rem 0.25rem 1rem; /* asymmetric */
  color: var(--text-primary);
  align-self: flex-end;
  box-shadow: 0 4px 16px rgba(11, 61, 46, 0.02);
}

/* Animated character output indicator */
.char-span {
  opacity: 0;
  display: inline-block;
  transform: translateY(4px);
  animation: charFadeIn 0.03s forwards;
  white-space: pre;
}

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

/* Tokenization visuals */
.token-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 550px;
}

.token-card {
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(11, 61, 46, 0.02);
  transition: all var(--transition-normal);
  transform: scale(0.8);
  opacity: 0;
}

.token-card.animate-token {
  transform: scale(1);
  opacity: 1;
  border-color: var(--primary-cyan);
  background: var(--secondary-blue);
}

.token-analogy-box {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-dark);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Text cleaning comparisons */
.clean-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 500px;
}

.clean-row {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
}

.clean-row-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.clean-row-content {
  font-size: 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary-cyan);
  white-space: pre-wrap;
}

.clean-tag {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  transition: all 0.5s ease;
}

.clean-tag.modified {
  background: rgba(192, 57, 43, 0.1);
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.5;
}

.clean-tag.cleaned {
  background: var(--secondary-blue);
  color: var(--primary-cyan);
  border: 1px solid rgba(11, 61, 46, 0.15);
}

/* Word to Number matrix visual */
.vector-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 550px;
}

.vector-cards-container {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.vector-word-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.4s ease;
}

.vector-word-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.vector-word-nums {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-cyan);
  background: var(--secondary-blue);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  letter-spacing: -0.02em;
}

.vector-table-container {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.vector-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.vector-table th, .vector-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.vector-table th {
  background: var(--secondary-blue);
  color: var(--primary-cyan);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

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

.vector-table td.found-yes {
  color: var(--accent-gold);
  font-weight: 800;
}

.vector-table td.found-no {
  color: var(--text-muted);
}

/* Intent confidence charts */
.intent-container {
  width: 100%;
  max-width: 500px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
}

.intent-headline {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
  text-align: center;
}

.intent-row {
  margin-bottom: 1rem;
}

.intent-row:last-child {
  margin-bottom: 0;
}

.intent-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.intent-name {
  color: var(--text-secondary);
}

.intent-score {
  font-family: var(--font-display);
  color: var(--text-primary);
}

.intent-track {
  height: 8px;
  background: var(--bg-card);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.intent-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: var(--text-muted);
  transition: width 1s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.intent-row.winner .intent-name {
  color: var(--primary-cyan);
}

.intent-row.winner .intent-score {
  color: var(--primary-cyan);
  font-weight: 800;
}

.intent-row.winner .intent-fill {
  background: var(--primary-cyan);
  box-shadow: 0 0 6px var(--primary-glow);
}

.intent-badge-result {
  margin-top: 1.5rem;
  background: var(--secondary-blue);
  border: 1px solid rgba(11, 61, 46, 0.2);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-cyan);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s ease 0.5s;
}

.intent-badge-result.show {
  opacity: 1;
  transform: translateY(0);
}

/* Entity extraction displays */
.entity-container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.entity-bubble {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  font-size: 1.25rem;
  line-height: 1.6;
}

.entity-word {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.entity-word.highlight-topic {
  background: rgba(11, 61, 46, 0.1);
  border: 1px solid var(--primary-cyan);
  color: var(--primary-cyan);
}

.entity-word.highlight-date {
  background: var(--accent-gold-glow);
  border: 1px solid var(--accent-gold);
  color: #a47614;
}

.entity-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.entity-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.entity-card.topic {
  border-left: 4px solid var(--primary-cyan);
}

.entity-card.date {
  border-left: 4px solid var(--accent-gold);
}

.entity-card-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.entity-card-val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Workflow Flowchart visuals */
.workflow-map {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.workflow-node {
  width: 100%;
  background: var(--bg-dark);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all 0.4s ease;
}

.workflow-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: arrowPulse 1.5s infinite;
}

@keyframes arrowPulse {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(3px); opacity: 1; }
}

.workflow-node.active-node {
  border-color: var(--primary-cyan);
  background: var(--secondary-blue);
  color: var(--primary-cyan);
  box-shadow: 0 4px 10px rgba(11, 61, 46, 0.04);
  transform: scale(1.03);
}

/* Screen 9 summary pipeline flow */
.pipeline-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  max-width: 450px;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  transform: translateX(-10px);
  opacity: 0;
  transition: all 0.3s ease;
}

.pipeline-step.show {
  transform: translateX(0);
  opacity: 1;
}

.pipeline-step.active {
  border-color: var(--primary-cyan);
  background: var(--secondary-blue);
}

.pipeline-num {
  font-weight: 800;
  color: var(--primary-cyan);
  font-family: var(--font-display);
}

.pipeline-label {
  font-weight: 700;
  color: var(--text-primary);
}

.pipeline-details {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Compare Screen 10 tables */
.compare-container {
  width: 100%;
  max-width: 600px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.compare-table th, .compare-table td {
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--border-color);
}

.compare-table th {
  background: var(--bg-dark);
  color: var(--primary-cyan);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
}

.compare-table td {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  font-weight: 500;
}

.compare-table th:first-child {
  color: var(--text-secondary);
}

.compare-table th:last-child {
  color: var(--primary-cyan);
  background: var(--secondary-blue);
}

.compare-table tr:hover td {
  background: var(--bg-dark);
}

.final-agent-callout {
  margin-top: 1.5rem;
  text-align: center;
  background: var(--secondary-blue);
  border: 1px solid rgba(11, 61, 46, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
}

.final-agent-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary-cyan);
  margin-bottom: 0.25rem;
}

.final-agent-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  font-weight: 500;
}

/* Typing indicator dot animations */
.typing-indicator {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  height: 20px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* Navigation controls bar */
.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 -4px 20px rgba(11, 61, 46, 0.02);
}

.nav-buttons-group {
  display: flex;
  gap: 0.75rem;
}

.btn {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  user-select: none;
}

.btn-secondary {
  background: var(--bg-dark);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border-color);
  color: var(--primary-cyan);
}

.btn-primary {
  background: var(--primary-cyan);
  color: var(--bg-dark);
  box-shadow: 0 4px 12px rgba(11, 61, 46, 0.1);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #154f3e;
  box-shadow: 0 6px 16px rgba(11, 61, 46, 0.2);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

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

/* App Footer */
footer {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Responsive fixes */
@media (max-width: 600px) {
  h1.main-title {
    font-size: 1.7rem;
  }
  .progress-steps-bar {
    display: none;
  }
  .explanation-panel {
    max-height: none;
  }
  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}
