/* Оформление Markdown (sochiham_markdown.py): описания вопросов экзамена и предпросмотр в админке. Светлая и тёмная тема. */
.md { line-height:1.6; overflow-wrap:anywhere; }
.md > :first-child { margin-top:0; }
.md p { margin:0 0 12px; }
.md h3, .md h4, .md h5, .md h6 { line-height:1.3; margin:20px 0 8px; font-weight:750; }
.md .md-h1 { font-size:1.35em; } .md .md-h2 { font-size:1.2em; } .md .md-h3 { font-size:1.1em; } .md .md-h4, .md .md-h5, .md .md-h6 { font-size:1em; }
.md ul, .md ol { padding-left:24px; margin:0 0 12px; } .md li { margin:0 0 6px; } .md li > ul, .md li > ol { margin:6px 0 0; }
.md li > p { margin:0 0 6px; }
.md a { color:#1f6b45; text-decoration:underline; text-underline-offset:2px; }
.md code { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.9em; background:rgba(31,107,69,.08); border:1px solid rgba(31,107,69,.15); border-radius:5px; padding:1px 5px; }
.md pre { background:#f3f5f3; border:1px solid #e4e7e4; border-radius:10px; padding:12px 14px; overflow-x:auto; margin:0 0 12px; line-height:1.45; }
.md pre code { background:none; border:0; padding:0; font-size:14px; white-space:pre; overflow-wrap:normal; }
.md blockquote { margin:0 0 12px; padding:8px 14px; border-left:4px solid #1f6b45; background:rgba(31,107,69,.06); border-radius:0 10px 10px 0; }
.md blockquote > :last-child { margin-bottom:0; }
.md hr { border:0; border-top:1px solid #e4e7e4; margin:18px 0; }
.md .md-table { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 0 12px; border:1px solid #e4e7e4; border-radius:10px; }
.md table { border-collapse:collapse; width:100%; min-width:max-content; font-size:.95em; }
.md th, .md td { padding:8px 12px; border-bottom:1px solid #e4e7e4; text-align:left; vertical-align:top; overflow-wrap:normal; }
.md th { background:#f3f5f3; font-weight:700; } .md tr:last-child td { border-bottom:0; }
.md td + td, .md th + th { border-left:1px solid #e4e7e4; }
.md img.md-img { max-width:100%; height:auto; border-radius:8px; }
/* формулы: простая подстановка LaTeX, без сторонних библиотек */
.md .md-math { font-family:"Cambria Math","STIX Two Math","Latin Modern Math",Georgia,"Times New Roman",serif; font-size:1.08em; white-space:nowrap; }
.md .md-mathblock { display:block; text-align:center; white-space:normal; margin:4px 0 14px; padding:10px 12px; background:rgba(31,107,69,.06); border-radius:10px; overflow-x:auto; font-size:1.2em; }
.md .md-frac { display:inline-flex; flex-direction:column; vertical-align:middle; text-align:center; margin:0 2px; line-height:1.15; }
.md .md-frac > span:first-child { border-bottom:1px solid currentColor; padding:0 3px 1px; }
.md .md-frac > span:last-child { padding:1px 3px 0; }
.md .md-sqrt { border-top:1px solid currentColor; padding:0 2px; }
.md sup, .md sub { font-size:.72em; line-height:0; }
body.dark .md a { color:#8fd1ac; }
body.dark .md code { background:rgba(143,209,172,.10); border-color:rgba(143,209,172,.2); }
body.dark .md pre { background:#1a1f1c; border-color:#3a403c; }
body.dark .md blockquote { border-left-color:#8fd1ac; background:rgba(143,209,172,.07); }
body.dark .md hr, body.dark .md .md-table, body.dark .md th, body.dark .md td { border-color:#3a403c; }
body.dark .md th { background:#1f2421; }
body.dark .md .md-mathblock { background:rgba(143,209,172,.07); }
@media (max-width:600px){ .md pre code { font-size:13px; } .md th, .md td { padding:7px 9px; } .md .md-mathblock { font-size:1.1em; } }
