/* ─────────────────────────────────────────────
   Markdown URL Display – Frontend Styles
   Scoped to .mud-content so nothing bleeds
   into the surrounding theme.
───────────────────────────────────────────── */

.mud-content {
    font-family: inherit;
    color: inherit;
    line-height: 1.75;
    word-wrap: break-word;
}

/* ── Headings ── */
.mud-content h1,
.mud-content h2,
.mud-content h3,
.mud-content h4,
.mud-content h5,
.mud-content h6 {
    margin-top: 1.6em;
    margin-bottom: 0.5em;
    font-weight: 700;
    line-height: 1.25;
}
.mud-content h1 { font-size: 2em; }
.mud-content h2 { font-size: 1.55em; border-bottom: 1px solid #e2e8f0; padding-bottom: .3em; }
.mud-content h3 { font-size: 1.25em; }
.mud-content h4 { font-size: 0em; }
.mud-content h5 { font-size: 1.05em; }

/* ── Paragraphs & spacing ── */
.mud-content p  { margin: 0 0 1.1em; }

/* ── Links ── */
.mud-content a            { color: #2563eb; text-decoration: underline; }
.mud-content a:hover      { color: #1d4ed8; }

/* ── Strong / Em ── */
.mud-content strong { font-weight: 700; }
.mud-content em     { font-style: italic; }
.mud-content del    { text-decoration: line-through; opacity: .6; }

/* ── Inline code ── */
.mud-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: .88em;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: .15em .4em;
}

/* ── Code blocks ── */
.mud-content pre {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1.2em 1.5em;
    overflow-x: auto;
    margin: 1.4em 0;
    font-size: .87em;
    line-height: 1.6;
}
.mud-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

/* ── Blockquote ── */
.mud-content blockquote {
    margin: 1.2em 0;
    padding: .8em 1.2em;
    border-left: 4px solid #6366f1;
    background: #f8fafc;
    border-radius: 0 6px 6px 0;
    color: #475569;
}
.mud-content blockquote p:last-child { margin-bottom: 0; }

/* ── Lists ── */
.mud-content ul,
.mud-content ol { margin: 0 0 1.1em 1.6em; padding: 0; }
.mud-content li { margin-bottom: .35em; }
.mud-content ul li { list-style-type: disc; }
.mud-content ol li { list-style-type: decimal; }
.mud-content ul ul,
.mud-content ol ol,
.mud-content ul ol,
.mud-content ol ul { margin-top: .35em; margin-bottom: .35em; }

/* ── Horizontal rule ── */
.mud-content hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2em 0;
}

/* ── Images ── */
.mud-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 1em auto;
}

/* ── Tables ── */
.mud-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: .93em;
}
.mud-content th,
.mud-content td {
    border: 1px solid #cbd5e1;
    padding: .55em .9em;
    text-align: left;
}
.mud-content th {
    background: #f1f5f9;
    font-weight: 600;
}
.mud-content tr:nth-child(even) td {
    background: #f8fafc;
}

/* ── Error message ── */
.mud-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 6px;
    padding: .75em 1em;
    margin: .5em 0;
}

/* ── Source link ── */
.mud-source-link {
    font-size: .82em;
    color: #64748b;
    margin-bottom: 1.2em;
    padding-bottom: .6em;
    border-bottom: 1px dashed #e2e8f0;
}
.mud-source-link a { color: #64748b; }
