.md {
    color: var(--md-sys-color-on-surface);
    font-size: 16px;
    line-height: 1.7;
}

.md h1, .md h2, .md h3, .md h4 {
    font-family: var(--font-display);
    line-height: 1.25;
    margin: 1.6em 0 0.5em;
    letter-spacing: -0.01em;
}

.md h1 { font-size: 1.8em; }
.md h2 {
    font-size: 1.45em;
    color: var(--md-sys-color-on-surface);
    padding-bottom: 0.3em;
    position: relative;
}
.md h2::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 0.35em;
    width: 5px;
    height: 0.95em;
    border-radius: var(--shape-full);
    background: var(--md-sys-color-primary);
}
.md h3 { font-size: 1.2em; color: var(--md-sys-color-on-surface-variant); }

.md p { margin: 0.8em 0; }

.md ul, .md ol { padding-left: 1.4em; margin: 0.8em 0; }
.md li { margin: 0.4em 0; }
.md li::marker { color: var(--md-sys-color-primary); }

.md strong {
    padding: 0 2px;
    border-radius: 3px;
}

.md em { color: var(--md-sys-color-on-surface-variant); }

.md code {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
    background: var(--md-sys-color-surface-container);
    padding: 2px 6px;
    border-radius: var(--shape-xs);
    font-size: 0.9em;
    color: var(--md-sys-color-on-surface);
}

.md pre {
    background: var(--md-sys-color-surface-container);
    padding: 16px 18px;
    border-radius: var(--shape-md);
    overflow-x: auto;
    font-size: 0.92em;
    line-height: 1.5;
}
.md pre code { background: transparent; padding: 0; }

.md blockquote {
    margin: 1em 0;
    padding: 12px 18px;
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
    border-radius: var(--shape-md);
    font-style: italic;
}

.md hr {
    border: none;
    height: 1px;
    background: var(--md-sys-color-surface-container-high);
    margin: 1.6em 0;
}

.md a {
    color: var(--md-sys-color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.md table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    font-size: 0.92em;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--shape-md);
    overflow: hidden;
}
.md th, .md td {
    padding: 10px 14px;
    text-align: left;
}
.md th {
    background: var(--md-sys-color-surface-container);
    font-weight: 600;
}
.md tr + tr td { border-top: 1px solid var(--md-sys-color-surface-container-high); }
