/* Rendered markdown (posts) and the editor share the same look. */
.md { line-height: 1.65; overflow-wrap: anywhere; }
.md > * + * { margin-top: 0.6em; }
.md h1 { font-size: 1.35em; font-weight: 600; }
.md h2 { font-size: 1.2em; font-weight: 600; }
.md h3 { font-size: 1.05em; font-weight: 600; }
.md ul { list-style: disc; padding-left: 1.4em; }
.md ol { list-style: decimal; padding-left: 1.4em; }
.md li > p { margin: 0; }
.md a { color: #1c1917; text-decoration: underline; text-decoration-color: #a8a29e; text-underline-offset: 2px; }
.md a:hover { text-decoration-color: #1c1917; }
.md blockquote { border-left: 3px solid #d6d3d1; padding-left: 0.9em; color: #57534e; }
.md code { background: #f5f5f4; border-radius: 4px; padding: 0.1em 0.35em; font-size: 0.9em; }
.md pre { background: #f5f5f4; border-radius: 8px; padding: 0.75em 1em; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md hr { border-color: #e7e5e4; }

/* Tiptap editor */
.editor { min-height: 4.5rem; padding-right: 2.5rem; outline: none; }
.editor p.is-editor-empty:first-child::before {
  content: attr(data-placeholder); color: #a8a29e; float: left; height: 0; pointer-events: none;
}

/* Task lists: "- [ ] todo" rendered by the server, and Tiptap's task list in the editor. */
.md li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.4em; }
.md li > input[type="checkbox"] { margin-right: 0.5em; vertical-align: -0.1em; accent-color: #1c1917; }
.md ul[data-type="taskList"] { list-style: none; padding-left: 0; }
.md ul[data-type="taskList"] li { display: flex; gap: 0.5em; align-items: baseline; }
.md ul[data-type="taskList"] li > label input { accent-color: #1c1917; }
.md ul[data-type="taskList"] li > div { flex: 1; }
