.md { font-size: 14px; line-height: 1.68; color: var(--text); overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote, .md .code-block, .md .table-wrap, .md details { margin: 0 0 12px; }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--font-display); letter-spacing: -.015em; line-height: 1.3; margin: 22px 0 10px; }
.md h1 { font-size: 21px; font-weight: 700; }
.md h2 { font-size: 17.5px; font-weight: 680; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.md h3 { font-size: 15px; font-weight: 660; }
.md h4 { font-size: 13.5px; font-weight: 660; color: var(--text-2); }
.md a { color: var(--accent-fg); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; transition: text-decoration-color var(--t); }
.md a:hover { text-decoration-color: currentColor; }
.md strong { font-weight: 650; }
.md ul, .md ol { padding-left: 22px; }
.md li { margin: 3px 0; }
.md li::marker { color: var(--text-3); }
.md li > input[type="checkbox"] { margin: 0 6px 0 -18px; accent-color: var(--accent); }
.md blockquote { border-left: 3px solid var(--border-2); padding: 2px 0 2px 14px; color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.md img { max-width: 100%; border-radius: 8px; }
.md code { font: 500 .86em/1.5 var(--mono); padding: 1.5px 5px; border-radius: 5px; background: var(--surface-3); color: light-dark(#8a3412, #ffb595); }
.md pre code { background: none; padding: 0; border-radius: 0; color: inherit; font-weight: 400; }
.md .mention { color: var(--accent-fg); background: var(--accent-soft); border-radius: 5px; padding: 0 4px; font-weight: 620; }
.code-block { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: light-dark(#fbfaf8, #121211); }
.code-head { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 4px 0 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); font: 500 11.5px var(--mono); color: var(--text-3); }
.code-head .btn { color: var(--text-3); }
.code-head .btn.is-done { color: var(--s-done); }
.code-block pre { margin: 0; padding: 12px 14px; overflow-x: auto; font: 12.75px/1.65 var(--mono); color: light-dark(#2b2925, #e4e1da); tab-size: 2; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.md table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.md th, .md td { padding: 7px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.md tr:last-child td { border-bottom: 0; }
.md th { background: var(--surface-2); font-weight: 650; font-size: 12.5px; color: var(--text-2); }
.md td + td, .md th + th { border-left: 1px solid var(--border); }
