/* Markdown on the new page (util.js md()): the body of an inbox question, the text of a
   message, a note in the conversation. Lists, a fenced code block, headings, a pipe table,
   a quote and the space between blocks; .md p + p and .md code are in home.css. */

.md > * + * { margin-top: 6px; }
.md ul, .md ol { margin: 0; padding-left: 1.35em; }
.md li + li { margin-top: 2px; }
.md pre {
  margin: 0; padding: 6px 8px; border-radius: 6px; background: var(--sunk);
  font-size: .84em; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 320px; overflow: auto;
}
.md pre code { background: none; padding: 0; font-size: inherit; }
.md i { font-style: italic; }

/* Headings of a message: small, the dialog has its own h2 and h3. */
.md h4, .md h5, .md h6 { margin: 0; line-height: 1.25; font-weight: 700; }
.md h4 { font-size: 1.02em; }
.md h5 { font-size: .96em; }
.md h6 { font-size: .86em; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.md * + h4, .md * + h5, .md * + h6 { margin-top: 10px; }

/* A pipe table scrolls sideways in its own box; the box keeps its place on a repaint
   (scroll-keep.js finds it again by its class). A cell wraps only past a reading width. */
.md .md-table { overflow-x: auto; max-width: 100%; }
.md .md-table table { border-collapse: collapse; font-size: .86em; font-variant-numeric: tabular-nums; }
.md .md-table th, .md .md-table td { border-bottom: 1px solid var(--line); padding: 2px 12px 2px 0; text-align: left; vertical-align: top; overflow-wrap: normal; min-width: 6ch; max-width: 48ch; }
.md .md-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.md .md-table .r { text-align: right; }
.md .md-table .c { text-align: center; }

/* A quote: a bar at the left, the text a little softer. */
.md blockquote { margin: 0; padding: 0 0 0 10px; border-left: 3px solid var(--line); color: var(--muted); }

/* The body of an inbox question: the text of the card, a line under its title. */
.in-body { line-height: 1.45; }

/* A claude-ask question as a card of the conversation: its body under the head, the held
   mark in the head, and the line "Dismiss this question?" in place of the buttons (also on
   the card of the inbox). */
.ask-body { font-size: .9rem; line-height: 1.45; }
.card-h .in-held { margin-left: 4px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.ask-confirm, .in-confirm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ask-q { font-size: .84rem; font-weight: 600; color: var(--bad); }

/* A note in the conversation stays small and centred; a list in one reads from the left. */
.conv-note.md ul, .conv-note.md ol, .conv-note.md pre { text-align: left; display: inline-block; }
