/* ============================================================
   Prose — styles for Markdown-generated content
   ============================================================ */

.prose h1 {
  font-size: 1.875rem;
  font-weight: 900;
  color: transparent;
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 1rem;
}

.prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #334155;
}

.prose h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #818cf8;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose p {
  color: #cbd5e1;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.prose a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose a:hover { color: #a5b4fc; }

.prose ul {
  list-style: disc !important;
  padding-left: 1.5rem !important;
  color: #cbd5e1;
  margin-bottom: 1rem;
}
.prose ol {
  counter-reset: ol-counter;
  list-style: none !important;
  padding-left: 0;
  color: #cbd5e1;
  margin-bottom: 1rem;
}
.prose ol > li {
  counter-increment: ol-counter;
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.35rem;
}
.prose ol > li::before {
  content: counter(ol-counter) ".";
  position: absolute;
  left: 0;
  color: #818cf8;
  font-weight: 700;
  font-size: 0.9em;
}
.prose ul li { margin-bottom: 0.35rem; }
.prose li > ul, .prose li > ol { margin-bottom: 0; margin-top: 0.25rem; }

.prose strong { color: #e2e8f0; font-weight: 700; }
.prose em     { color: #94a3b8; }

.prose hr {
  border: none;
  border-top: 1px solid #334155;
  margin: 1.75rem 0;
}

.prose blockquote {
  background: rgba(30, 41, 59, 0.5);
  border-left: 3px solid #6366f1;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.75rem 1rem;
  color: #94a3b8;
  font-style: italic;
  margin: 1rem 0;
}
.prose blockquote > *:last-child { margin-bottom: 0; }

/* ============================================================
   Code
   ============================================================ */

.prose code {
  background: #1e293b;
  color: #a5b4fc;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid #334155;
}

.prose pre {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.88em;
}

/* ============================================================
   Tables
   ============================================================ */

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}

.prose table thead tr {
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.prose table th {
  color: #818cf8;
  font-weight: 700;
  text-align: left;
  padding: 0.6rem 0.875rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose table td {
  padding: 0.6rem 0.875rem;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.prose table tr:hover td { background: rgba(30, 41, 59, 0.4); }

.prose table td:first-child { white-space: nowrap; }

/* ============================================================
   Collapsible sections
   ============================================================ */

.prose details {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.prose details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  color: #e2e8f0;
  padding: 0.875rem 1.125rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}
.prose details summary::-webkit-details-marker { display: none; }

.prose details summary::before {
  content: '▶';
  font-size: 0.65rem;
  color: #6366f1;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.prose details[open] summary::before { transform: rotate(90deg); }

.prose details[open] summary {
  border-bottom: 1px solid #334155;
  color: #818cf8;
}

.prose details > *:not(summary) {
  padding: 0.75rem 1.125rem 1rem;
}

.prose details p {
  margin-bottom: 0;
}

.prose details table {
  margin-top: 0.5rem;
}

/* ============================================================
   Scrollbar
   ============================================================ */

::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: #0f172a; }
::-webkit-scrollbar-thumb  { background: rgba(99, 102, 241, 0.5); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.8); }
