/* static/css/prose.css
   Минимальные стили для .prose — markdown-контент уроков.
   Заменяет @tailwindcss/typography, который мы не устанавливали.
*/

.prose {
    color: var(--fallback-bc, #1f2937);
    line-height: 1.7;
    max-width: none;
}

.prose > * + * {
    margin-top: 1rem;
}

.prose p {
    margin: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    font-weight: 700;
    line-height: 1.25;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.prose h1 { font-size: 1.875rem; }
.prose h2 { font-size: 1.5rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.25rem; }
.prose h3 { font-size: 1.25rem; }
.prose h4 { font-size: 1.1rem; }

.prose ul,
.prose ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
    margin: 0.25rem 0;
}

.prose li > ul,
.prose li > ol {
    margin: 0.25rem 0;
}

.prose blockquote {
    border-left: 4px solid #6366f1;
    padding-left: 1rem;
    color: #4b5563;
    font-style: italic;
    margin: 1rem 0;
}

.prose a {
    color: #6366f1;
    text-decoration: underline;
}

.prose a:hover {
    color: #4f46e5;
}

.prose code {
    background: #f3f4f6;
    color: #db2777;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.9em;
}

.prose pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.prose pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 1em;
}

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

.prose th,
.prose td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.prose th {
    background: #f9fafb;
    font-weight: 600;
}

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

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Тёмная тема */
[data-theme="dark"] .prose {
    color: #e5e7eb;
}
[data-theme="dark"] .prose h2 {
    border-bottom-color: #374151;
}
[data-theme="dark"] .prose code {
    background: #374151;
    color: #f472b6;
}
[data-theme="dark"] .prose pre {
    background: #111827;
}
[data-theme="dark"] .prose th {
    background: #374151;
}
[data-theme="dark"] .prose th,
[data-theme="dark"] .prose td {
    border-color: #374151;
}
[data-theme="dark"] .prose blockquote {
    color: #9ca3af;
}
[data-theme="dark"] .prose hr {
    border-top-color: #374151;
}
