/* ============================================
   Tutorial Onboarding - bienvenido.css
   ============================================ */

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

:root {
  --primary: #95e0ff;
  --primary-dark: #2bc0ff;
  --primary-light: #caf0ff;
  --bg-main: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border: #e2e8f0;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
  --step-transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-main);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ============================================
   Layout
   ============================================ */

.tutorial {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Header: Progress bar + dots + skip
   ============================================ */

.tutorial-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 8px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
}

.header-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 12.5%;
}

.progress-dots {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  border: none;
  padding: 0;
}

.progress-dot:hover {
  transform: scale(1.3);
}

.progress-dot.active {
  background: var(--primary-dark);
  transform: scale(1.2);
}

.progress-dot.completed {
  background: var(--primary);
}

.skip-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.skip-btn:hover {
  color: var(--text);
  background: var(--bg-input);
}

/* ============================================
   Steps container
   ============================================ */

.steps-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(60px);
  transition: opacity var(--step-transition), transform var(--step-transition);
}

.step.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.step.exit-left {
  opacity: 0;
  transform: translateX(-60px);
}

.step.exit-right {
  opacity: 0;
  transform: translateX(60px);
}

.step-content {
  width: 100%;
  max-width: 720px;
  padding: 16px 0;
}

.step-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.step-description {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
  max-width: 540px;
}

/* ============================================
   Step 1: Welcome
   ============================================ */

.step-welcome {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome-logo {
  margin-bottom: 24px;
}

.logo-img {
  width: 180px;
  height: auto;
  animation: logoFloat 3s ease-in-out infinite;
}

.welcome-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 36px;
}

.welcome-features {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.welcome-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
}

.welcome-feature.animate {
  animation: fadeInUp 0.5s ease forwards;
}

.feature-icon {
  color: var(--primary-dark);
  display: flex;
}

/* ============================================
   Mockup: App layout
   ============================================ */

.mockup-container {
  position: relative;
}

.mockup-app {
  display: flex;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  height: 340px;
  box-shadow: var(--shadow-lg);
}

.mockup-app-with-panel .mockup-sidebar-narrow {
  width: 140px;
  min-width: 140px;
}

.mockup-app-with-panel .mockup-chat-narrow {
  flex: 1;
  min-width: 0;
}

/* Sidebar */
.mockup-sidebar {
  width: 200px;
  min-width: 200px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.mockup-sidebar-header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mockup-logo-small {
  width: 80px;
  height: 16px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 4px;
  opacity: 0.6;
}

.mockup-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-dark);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.mockup-patient-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mockup-patient {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: default;
}

.mockup-patient.active {
  background: var(--primary-light);
  color: var(--text);
  font-weight: 500;
}

.mockup-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}


/* Chat area */
.mockup-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  position: relative;
}

.mockup-chat-dimmed {
  opacity: 0.3;
}

.mockup-chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  background: var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mockup-panel-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  cursor: default;
  color: var(--text-muted);
}

.mockup-panel-toggle.active {
  background: var(--primary-light);
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.mockup-messages {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.mockup-message {
  display: flex;
}

.mockup-message.user {
  justify-content: flex-end;
}

.mockup-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
}

.mockup-bubble.user {
  background: var(--primary-dark);
  color: white;
  border-bottom-right-radius: 4px;
}

.mockup-bubble.assistant {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.mockup-message {
  opacity: 0;
  transform: translateY(8px);
}

.mockup-message.animate {
  animation: messageAppear 0.4s ease forwards;
}

.mockup-input {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.mockup-input-field {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

/* Modal */
.mockup-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.mockup-modal-overlay.animate {
  animation: fadeIn 0.3s ease forwards;
}

.mockup-modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  opacity: 0;
}

.mockup-modal-overlay.animate .mockup-modal {
  animation: scaleIn 0.3s ease 0.1s forwards;
}

.mockup-modal h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

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

.mockup-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.mockup-field .optional {
  font-weight: 400;
  color: var(--text-dim);
}

.mockup-textarea {
  min-height: 40px;
}

.mockup-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.mockup-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: default;
}

.mockup-btn.primary {
  background: var(--primary-dark);
  color: white;
}

.mockup-btn.secondary {
  background: var(--bg-input);
  color: var(--text-muted);
}

/* Panel (step 4) */
.mockup-panel {
  width: 220px;
  min-width: 220px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(20px);
}

.mockup-panel.animate {
  animation: panelSlide 0.4s ease forwards;
}

.mockup-panel-header {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.mockup-panel-sections {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mockup-section {
  border-radius: 8px;
}

.mockup-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: default;
}

.mockup-section.open .mockup-section-header {
  color: var(--text);
}

.mockup-section-content {
  padding: 4px 10px 10px 30px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

.mockup-section-content p {
  margin-bottom: 2px;
}

/* ============================================
   Red highlight focus box
   ============================================ */

.highlight-focus {
  outline: 2.5px solid var(--error) !important;
  outline-offset: 3px;
  border-radius: 8px;
  animation: highlightPulse 2s ease-in-out infinite;
}

/* ============================================
   Step 5: Voice dictation
   ============================================ */

.mockup-input-voice {
  padding: 10px 16px;
}

.mockup-voice-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mockup-input-field.mockup-voice-field {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 20px;
}

.mockup-voice-text {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
}

.mockup-voice-placeholder {
  font-size: 13px;
  color: var(--text-dim);
}

.mockup-voice-cursor {
  display: none;
  width: 2px;
  height: 14px;
  background: var(--primary-dark);
  animation: blink 0.8s step-end infinite;
  vertical-align: middle;
  margin-left: 1px;
  flex-shrink: 0;
}

.mockup-voice-cursor.active {
  display: inline-block;
}

.mockup-mic-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  flex-shrink: 0;
  transition: all 0.3s;
}

.mockup-mic-btn.recording {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
  animation: micPulse 1.5s ease-in-out infinite;
}

.mockup-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease, margin-top 0.3s ease;
}

.mockup-waveform.active {
  height: 20px;
  margin-top: 6px;
}

.wave-bar {
  width: 3px;
  background: var(--primary-dark);
  border-radius: 2px;
  height: 4px;
  opacity: 0.7;
}

.mockup-waveform.active .wave-bar {
  animation: waveAnim 0.8s ease-in-out infinite;
}

.mockup-waveform.active .wave-bar:nth-child(1) { animation-delay: 0s; }
.mockup-waveform.active .wave-bar:nth-child(2) { animation-delay: 0.12s; }
.mockup-waveform.active .wave-bar:nth-child(3) { animation-delay: 0.24s; }
.mockup-waveform.active .wave-bar:nth-child(4) { animation-delay: 0.08s; }
.mockup-waveform.active .wave-bar:nth-child(5) { animation-delay: 0.20s; }
.mockup-waveform.active .wave-bar:nth-child(6) { animation-delay: 0.04s; }
.mockup-waveform.active .wave-bar:nth-child(7) { animation-delay: 0.16s; }
.mockup-waveform.active .wave-bar:nth-child(8) { animation-delay: 0.10s; }
.mockup-waveform.active .wave-bar:nth-child(9) { animation-delay: 0.22s; }

.mockup-waveform.active .wave-bar:nth-child(odd) {
  animation-duration: 0.7s;
}

/* ============================================
   Step 6: Session transcription
   ============================================ */

/* Upload button in header */
.mockup-upload-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--primary);
  background: var(--primary-faint);
  color: var(--primary-dark);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: default;
}

/* Transcription flow container */
.mockup-transcription-flow {
  flex: 1;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.mock-phase {
  opacity: 0;
  transform: translateY(10px);
}

.mock-phase.animate {
  animation: messageAppear 0.4s ease forwards;
}

/* File card */
.mock-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f5f3ff;
  border: 1px solid #e0d5fc;
  border-radius: 10px;
}

.mock-file-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #ede9fe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mock-file-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.mock-file-size {
  font-size: 10px;
  color: var(--text-dim);
}

.mock-file-check {
  flex-shrink: 0;
}

/* Progress card */
.mock-progress-card {
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.mock-progress-card.done {
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.mock-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.mock-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.mock-progress-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

.mock-progress-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.mock-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
  transition: width 0.08s linear;
}

/* Transcript result */
.mock-transcript-result {
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.mock-result-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.mock-result-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 500;
  color: var(--primary-dark);
  background: var(--primary-faint);
  padding: 2px 8px;
  border-radius: 10px;
}

.mock-transcript-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.transcript-line.compact {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  opacity: 1;
  transform: none;
}

.transcript-line.therapist {
  background: #f0f9ff;
  border-left: 3px solid var(--primary-dark);
}

.transcript-line.patient {
  background: #fefce8;
  border-left: 3px solid #f59e0b;
}

.transcript-line.compact .transcript-speaker {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  min-width: 55px;
}

.transcript-line.therapist .transcript-speaker {
  color: var(--primary-dark);
}

.transcript-line.patient .transcript-speaker {
  color: #d97706;
}

.transcript-line.compact .transcript-text {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text);
}

/* Summary card */
.mock-summary-card {
  padding: 10px 12px;
  background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%);
  border: 1px solid #e0d5fc;
  border-radius: 10px;
}

.mock-summary-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #7c3aed;
}

.mock-summary-text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text);
}

/* ============================================
   Step 7: Security cards
   ============================================ */

.step-security {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.security-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 560px;
}

.security-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
}

.security-card.animate {
  animation: fadeInUp 0.4s ease forwards;
}

.security-icon {
  color: var(--primary-dark);
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.security-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.security-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================
   Step 8: Finish
   ============================================ */

.step-finish {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.finish-icon {
  color: var(--success);
  margin-bottom: 20px;
  opacity: 0;
  transform: scale(0.5);
}

.finish-icon.animate {
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.finish-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
  text-align: left;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text);
  opacity: 0;
  transform: translateX(-10px);
}

.summary-item.animate {
  animation: fadeInRight 0.3s ease forwards;
}

.summary-item svg {
  color: var(--success);
  flex-shrink: 0;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--primary-dark);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(43, 192, 255, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 192, 255, 0.4);
}

.cta-button:active {
  transform: translateY(0);
}

/* ============================================
   Footer navigation
   ============================================ */

.tutorial-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 24px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.nav-btn:hover:not(:disabled) {
  background: var(--bg-input);
  border-color: var(--text-dim);
}

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

.nav-btn-next {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.nav-btn-next:hover:not(:disabled) {
  background: #1ab0f0;
  border-color: #1ab0f0;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
  transform: translateY(-1px);
}

.step-counter {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   Animations
   ============================================ */

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes highlightPulse {
  0%, 100% { outline-color: var(--error); }
  50% { outline-color: rgba(239, 68, 68, 0.4); }
}

@keyframes waveAnim {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============================================
   Reduced motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .logo-img {
    animation: none;
  }

  .step {
    transition: opacity 0.15s;
    transform: none !important;
  }

  .step.exit-left,
  .step.exit-right {
    transform: none !important;
  }
}

/* ============================================
   Responsive: Tablet
   ============================================ */

@media (max-width: 768px) {
  .tutorial {
    padding: 0 16px;
  }

  .welcome-title {
    font-size: 28px;
  }

  .welcome-subtitle {
    font-size: 16px;
  }

  .welcome-features {
    gap: 16px;
  }

  .mockup-app {
    height: 280px;
  }

  .mockup-sidebar {
    width: 150px;
    min-width: 150px;
  }

  .mockup-app-with-panel .mockup-sidebar-narrow {
    width: 100px;
    min-width: 100px;
  }

  .mockup-panel {
    width: 180px;
    min-width: 180px;
  }

  .security-cards {
    gap: 12px;
  }

  .security-card {
    padding: 18px 14px;
  }

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

  .mock-summary-text,
  .transcript-line.compact .transcript-text {
    font-size: 10px;
  }
}

/* ============================================
   Responsive: Mobile
   ============================================ */

@media (max-width: 480px) {
  .tutorial {
    padding: 0 12px;
  }

  .welcome-title {
    font-size: 24px;
  }

  .welcome-subtitle {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .welcome-features {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .welcome-feature {
    justify-content: center;
  }

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

  .step-description {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .mockup-app {
    height: 240px;
    flex-direction: column;
  }

  .mockup-sidebar,
  .mockup-app-with-panel .mockup-sidebar-narrow {
    width: 100%;
    min-width: 100%;
    height: 60px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
  }

  .mockup-sidebar-header {
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 8px;
  }

  .mockup-patient-list {
    flex-direction: row;
    overflow: hidden;
    padding: 4px 8px;
    align-items: center;
  }

  .mockup-callout-inline {
    display: none;
  }

  .mockup-panel {
    display: none;
  }

  .mockup-callout {
    position: relative;
    bottom: auto;
    margin-top: 12px;
  }

  .security-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .security-card {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
  }

  .security-icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .security-card h3 {
    margin-bottom: 2px;
  }

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

  .nav-btn-next {
    padding: 12px 24px;
    font-size: 15px;
  }

  .cta-button {
    padding: 14px 28px;
    font-size: 16px;
    width: 100%;
    justify-content: center;
  }

  .tutorial-footer {
    padding: 12px 0 20px;
  }

  .mockup-waveform {
    display: none;
  }

  .mock-file-name {
    font-size: 11px;
  }

  .mock-summary-text,
  .transcript-line.compact .transcript-text {
    font-size: 10px;
  }
}
