/* Prose styling for rendered Markdown */
.prose h1 { font-size: 1.5rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.prose h2 { font-size: 1.25rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.25rem; }
.prose h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1rem; margin-bottom: 0.5rem; }
.prose p  { margin-top: 0.5rem; margin-bottom: 0.5rem; line-height: 1.7; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin: 0.5rem 0; }
.prose ol { list-style: decimal; padding-left: 1.5rem; margin: 0.5rem 0; }
.prose li { margin-bottom: 0.25rem; }
.prose code { background: #f3f4f6; padding: 0.15rem 0.35rem; border-radius: 0.25rem; font-size: 0.85em; }
.prose pre  { background: #1f2937; color: #e5e7eb; padding: 1rem; border-radius: 0.5rem; overflow-x: auto; margin: 0.75rem 0; }
.prose pre code { background: transparent; padding: 0; }
.prose blockquote { border-left: 3px solid #3b82f6; padding-left: 1rem; color: #6b7280; margin: 0.75rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; font-size: 0.9em; }
.prose th, .prose td { border: 1px solid #e5e7eb; padding: 0.5rem 0.75rem; text-align: left; }
.prose th { background: #f9fafb; font-weight: 600; }
.prose a { color: #2563eb; text-decoration: underline; }
.prose hr { border: none; border-top: 1px solid #e5e7eb; margin: 1.5rem 0; }

/* Mobile-friendly prose adjustments */
@media (max-width: 640px) {
  .prose h1 { font-size: 1.25rem; }
  .prose h2 { font-size: 1.1rem; }
  .prose h3 { font-size: 1rem; }
  .prose table { font-size: 0.8em; display: block; overflow-x: auto; }
  .prose th, .prose td { padding: 0.35rem 0.5rem; white-space: nowrap; }
  .prose pre { padding: 0.75rem; font-size: 0.8em; }
}

/* Line clamp utility (used in mobile card views) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Streaming output cursor blink */
#streamingOutput::after {
  content: '▊';
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Smooth scroll for tab containers */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Touch-friendly minimum tap targets */
@media (max-width: 640px) {
  button, a[href], input[type="radio"], input[type="checkbox"] {
    min-height: 36px;
  }
}
