.markblocks-markdown-body {
    --markblocks-border: #d9e0ea;
    --markblocks-muted: #667085;
    --markblocks-accent: #2563eb;
    line-height: 1.72;
    overflow-wrap: anywhere;
}

.markblocks-markdown-body > :first-child { margin-block-start: 0; }
.markblocks-markdown-body > :last-child { margin-block-end: 0; }
.markblocks-markdown-body h1,
.markblocks-markdown-body h2,
.markblocks-markdown-body h3,
.markblocks-markdown-body h4,
.markblocks-markdown-body h5,
.markblocks-markdown-body h6 {
    margin-block: 1.55em .55em;
    line-height: 1.22;
}
.markblocks-markdown-body p { margin-block: 0 1.15em; }
.markblocks-markdown-body ul,
.markblocks-markdown-body ol {
    margin-block: 0 1.15em;
    margin-inline-start: 1.35em;
    padding: 0;
}
.markblocks-markdown-body li { margin-block: .28em; }
.markblocks-markdown-body li > input[type="checkbox"] { margin-inline-end: .45em; }
.markblocks-markdown-body a {
    color: var(--markblocks-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.markblocks-markdown-body a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.markblocks-markdown-body blockquote {
    margin-block: 1.4em;
    padding-block: .2em;
    padding-inline-start: 1.15em;
    border-inline-start: 4px solid var(--markblocks-accent);
    color: var(--markblocks-muted);
}
.markblocks-markdown-body blockquote > :last-child { margin-block-end: 0; }
.markblocks-markdown-body hr {
    margin-block: 2em;
    border: 0;
    border-block-start: 1px solid var(--markblocks-border);
}
.markblocks-markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.markblocks-markdown-image { margin-block: 1.4em; }
.markblocks-inline-code {
    padding: .16em .4em;
    border: 1px solid rgba(127, 127, 127, .2);
    border-radius: 5px;
    background: rgba(127, 127, 127, .09);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .9em;
}

.markblocks-table-wrap {
    --markblocks-border: #d9e0ea;
    --markblocks-accent: #2563eb;
    width: 100%;
    margin-block: 1.4em;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.markblocks-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: .96em;
}
.markblocks-table-wrap table th,
.markblocks-table-wrap table td {
    padding: .72em .85em;
    border: 1px solid var(--markblocks-border);
    vertical-align: middle;
    text-align: left !important;
}
.markblocks-table-wrap table th {
    border-block-end: 2px solid var(--markblocks-accent);
    background: rgba(127, 127, 127, .06);
    font-weight: 700;
}
.markblocks-table-wrap table .markblocks-align-left { text-align: left !important; }
.markblocks-table-wrap table .markblocks-align-center { text-align: center !important; }
.markblocks-table-wrap table .markblocks-align-right { text-align: right !important; }

.markblocks-code-block {
    --markblocks-code-bg: #0b1220;
    --markblocks-code-toolbar: #111b2e;
    --markblocks-code-text: #e5edf8;
    --markblocks-code-muted: #a4b3c8;
    --markblocks-code-border: rgba(255, 255, 255, .14);
    position: relative;
    margin-block: 1.4em;
    overflow: hidden;
    border: 1px solid var(--markblocks-code-border);
    border-radius: 10px;
    background: var(--markblocks-code-bg);
    box-shadow: 0 12px 30px rgba(2, 8, 23, .16);
}
.markblocks-code-block.markblocks-theme-light {
    --markblocks-code-bg: #f8fafc;
    --markblocks-code-toolbar: #eef2f7;
    --markblocks-code-text: #172033;
    --markblocks-code-muted: #475569;
    --markblocks-code-border: #d8e0eb;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.markblocks-code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding-inline: 15px 12px;
    border-block-end: 1px solid var(--markblocks-code-border);
    background: var(--markblocks-code-toolbar);
}
.markblocks-code-language {
    color: var(--markblocks-code-muted);
    font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.markblocks-copy-code {
    min-width: 52px;
    min-height: 32px;
    padding: 5px 9px;
    appearance: none;
    border: 1px solid var(--markblocks-code-border);
    border-radius: 6px;
    background: transparent;
    color: var(--markblocks-code-muted);
    cursor: pointer;
    font: 600 11px/1.2 system-ui, sans-serif;
}
.markblocks-copy-code:hover {
    border-color: currentColor;
    color: var(--markblocks-code-text);
}
.markblocks-copy-code:focus-visible {
    border-color: currentColor;
    outline: 2px solid var(--markblocks-code-text);
    outline-offset: 2px;
    color: var(--markblocks-code-text);
}
.markblocks-code-block pre {
    max-width: 100%;
    margin: 0;
    padding: 18px 20px 20px;
    overflow: auto;
    background: transparent;
    color: var(--markblocks-code-text);
    tab-size: 4;
}
.markblocks-code-block code {
    display: block;
    min-width: max-content;
    color: inherit;
    background: transparent;
    white-space: pre;
    font: 13.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    text-shadow: none;
}
.markblocks-code-block.markblocks-wrap-lines code {
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.markblocks-token.comment { color: #93a4bc; font-style: italic; }
.markblocks-token.string { color: #a7e3a1; }
.markblocks-token.keyword { color: #7dcfff; font-weight: 600; }
.markblocks-token.number,
.markblocks-token.boolean { color: #c4a7ff; }
.markblocks-token.function { color: #ffd580; }
.markblocks-token.property,
.markblocks-token.decorator { color: #ff9fb5; }
.markblocks-token.variable { color: #f6c177; }
.markblocks-token.operator { color: #8bd5ca; }
.markblocks-token.builtin { color: #f5a97f; }
.markblocks-token.tag { color: #ff8fa3; }
.markblocks-token.entity { color: #8bd5ca; }
.markblocks-theme-light .markblocks-token.comment { color: #596579; }
.markblocks-theme-light .markblocks-token.string { color: #18794e; }
.markblocks-theme-light .markblocks-token.keyword { color: #005cc5; }
.markblocks-theme-light .markblocks-token.number,
.markblocks-theme-light .markblocks-token.boolean { color: #6f42c1; }
.markblocks-theme-light .markblocks-token.function { color: #8a4b08; }
.markblocks-theme-light .markblocks-token.property,
.markblocks-theme-light .markblocks-token.decorator { color: #b31d28; }
.markblocks-theme-light .markblocks-token.variable { color: #8a5a00; }
.markblocks-theme-light .markblocks-token.operator,
.markblocks-theme-light .markblocks-token.entity { color: #0b6574; }
.markblocks-theme-light .markblocks-token.builtin { color: #963800; }
.markblocks-theme-light .markblocks-token.tag { color: #b31d28; }

.markblocks-source-hidden-note {
    padding: 12px 14px;
    border: 1px dashed #98a2b3;
    border-radius: 8px;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
}
.markblocks-markdown-error {
    padding: .75rem 1rem;
    border: 1px solid currentColor;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .markblocks-markdown-body *,
    .markblocks-code-block * {
        scroll-behavior: auto !important;
    }
}

@media print {
    .markblocks-copy-code { display: none; }
    .markblocks-code-block { box-shadow: none; break-inside: avoid; }
    .markblocks-table-wrap { overflow: visible; }
}
