/* Browser defaults for everything, except where they fall short. */

/* Use the browser's light or dark default, whichever the reader prefers. */
:root { color-scheme: light dark; }

/* Without this, lines are as wide as the window. */
body { max-width: 40rem; margin: 0 auto; padding: 0 1rem; }

/* Long lines of code and wide equations scroll instead of widening the page. */
pre, p:has(> math[display="block"]) { overflow-x: auto; }

/* Syntax highlighting: pandoc emits token classes, we pick the colours. */
code span.kw, code span.cf, code span.im, code span.pp { color: light-dark(#7a3e9d, #d19af0); }
code span.dt, code span.bu, code span.cn, code span.fu { color: light-dark(#0b5cad, #7ab4f0); }
code span.st, code span.ss, code span.vs, code span.ch, code span.sc { color: light-dark(#0b6e4f, #7fd0a8); }
code span.dv, code span.bn, code span.fl { color: light-dark(#b34700, #f0a060); }
code span.co, code span.do, code span.an, code span.cv, code span.in { color: light-dark(#5c5c5c, #9a9a9a); }
code span.al, code span.er, code span.wa { color: light-dark(#b00020, #ff8080); }
