/* A Markdown document as agents_md_dom.js renders it (a catalog's AGENTS.md, a hosted agent's instructions), on the
   account page and on a public catalog's page: one stylesheet for both, linked after each page's own.

   The founder, 2026-10-23: the document's headings in the serif, so it reads like a published technical document;
   its text, lists and tables in the UI's sans; code in mono. The renderer shifts a document's # to <h2> (the page owns
   the <h1>), so h2, h3 and h4 are the document's three heading levels. The file's own HTML carries no style or class
   (agents_md_dom.js keeps only language-* and data-task), so this is all the styling it gets. */
.md { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; contain: paint; min-width: 0; max-width: 100%; }   /* min-width: in a grid or flex cell a code block widened the whole document past its card (an agent's instructions at 400px) */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }

/* headings: the serif for the document's three levels, the sans below them */
.md :is(h2, h3, h4) { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; color: var(--ink); margin: 24px 0 8px; max-width: none; font-variation-settings: normal; text-wrap: balance; }   /* max-width: the site's h2 is 22ch */
.md h2 { font-size: 22px; }
.md h3 { font-size: 18px; }
.md h4 { font-size: 15.5px; }
.md :is(h5, h6) { font-family: var(--sans); font-size: 13.5px; font-weight: 600; line-height: 1.3; margin: 18px 0 6px; }

/* blocks */
.md :is(p, ul, ol, blockquote, pre, .md-table, details, .md-diagram) { margin: 0 0 12px; }
.md :is(ul, ol) { padding-left: 22px; }
.md li > :is(ul, ol) { margin: 2px 0 0; }
.md li.md-task { list-style: none; margin-left: -20px; }
.md li.md-task > input { margin: 0 6px 0 0; vertical-align: -1px; }
.md blockquote { border-left: 3px solid var(--rule); padding: 2px 0 2px 12px; color: var(--ink-soft); }
.md hr { border: 0; border-top: 1px solid var(--rule); margin: 18px 0; }
.md a { overflow-wrap: anywhere; }
.md img, .md svg { max-width: 100%; height: auto; }
.md summary { cursor: pointer; }

/* code: mono, inline on a soft ground, blocks on the SQL editor's light surface */
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--bg-soft); border-radius: 4px; padding: 1px 5px; }
.md pre, .md pre.hl { max-width: 100%; box-sizing: border-box; background: #fcfaf7; color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.6; }
.md pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

/* tables: a table of facts, in the sans, the header on the soft ground */
.md .md-table { overflow-x: auto; }
.md table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.45; overflow-wrap: break-word; }   /* not .md's anywhere: a cell breaks a word only when the word alone is wider */
.md :is(th, td) { border: 1px solid var(--rule); padding: 6px 10px; vertical-align: top; text-align: left; }
.md th { font-weight: 600; background: var(--bg-soft); }
.md :is(th, td)[align=right] { text-align: right; }
.md :is(th, td)[align=center] { text-align: center; }
.md :is(td, th) code { white-space: nowrap; }
.md td:has(> code:only-child) { width: 1%; white-space: nowrap; }

/* diagrams (```mermaid, drawn by agents_md_dom.js as an image) */
.md .md-diagram { overflow-x: auto; }
.md .md-diagram > img { display: block; max-width: 100%; height: auto; }
.md .md-diagram-src summary { font-size: 12px; color: var(--muted); margin-top: 4px; }
.md .md-diagram figcaption { margin-top: 4px; }
