/* Markdown rendered content */
.prose {
  font-size: var(--text-base);
}
.prose h1,
.prose h2,
.prose h3 {
  margin-top: 1.2rem;
  font-family: var(--font-sans);
}
.prose code {
  background: var(--surface-2);
  padding: 0.12rem 0.38rem;
  border-radius: 5px;
  font-size: 0.85em;
}
.prose pre {
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid #3a342d;
  background: #2a2622;
  color: #e8e3d8;
}
.prose pre code {
  background: none;
  padding: 0;
}
.prose img {
  max-width: 100%;
  height: auto;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}
/* Inline prose: keep short generated text (options, card fronts) on one line while still styling `code`. */
.prose-inline {
  display: inline;
  font-size: inherit;
}
/* Tighten block prose (e.g. a code block) when embedded in compact spots. */
.qtext .prose,
.flashcard .front .prose,
.flashcard .back .prose {
  margin: 0.4rem 0 0;
  font-size: inherit;
}
.qtext .prose p,
.flashcard .prose p {
  margin: 0.3rem 0;
}
.prose blockquote {
  border-left: 3px solid var(--border);
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
}

/* Loading shimmer */
.loading {
  color: var(--muted);
  font-style: italic;
}
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* Submit spinner (application.js / busy controller): follows the button's text colour. */
[data-submit-spinner] {
  margin-left: 0.5em;
  border-color: currentColor;
  border-top-color: transparent;
}
input + [data-submit-spinner] {
  color: var(--accent);
}
