/* content.css — how a DOCUMENT looks, the same in the editor, the print preview and the HTML export
   (which inlines this file). Scoped to .prose. The named styles' own rules (fonts, sizes, spacing)
   are generated from the document (render.js stylesCss); this file is everything else: lists,
   tables, pictures, columns, contents, breaks. Colours here are the PAPER's, never the app's theme:
   a page is white in dark mode too. */
.prose { color: #000; overflow-wrap: break-word; }
.prose .ps { white-space: pre-wrap; }
.prose .ps:empty::before { content: "\200b"; }        /* an empty line keeps its height */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { break-after: avoid; }
.prose a { color: #1a4fb4; text-decoration: underline; }
.prose .badlink { text-decoration: underline dotted; }
.prose mark { color: inherit; }
.prose sup, .prose sub { font-size: .7em; line-height: 0; }
.prose ul, .prose ol { margin: 0 0 6pt; padding-left: .32in; }
.prose li > .ps { margin-bottom: 2pt; }
.prose ul { list-style-type: disc; }
.prose ul ul { list-style-type: circle; }
.prose ul ul ul { list-style-type: square; }
.prose ol { list-style-type: decimal; }
.prose ol ol { list-style-type: lower-alpha; }
.prose ol ol ol { list-style-type: lower-roman; }
.prose hr { border: 0; border-top: 1px solid #8a8a8a; margin: 10pt 0; }

/* tables: borders all · outer · rows · none */
.prose table { border-collapse: collapse; width: 100%; margin: 6pt 0 10pt; table-layout: fixed; }
.prose td, .prose th { vertical-align: top; padding: 3pt 5pt; min-width: 2em; position: relative; }
.prose th { font-weight: 700; text-align: left; }
.prose td > .ps:last-child, .prose th > .ps:last-child { margin-bottom: 0; }
.prose .tb-all td, .prose .tb-all th { border: 1px solid #7a7a7a; }
.prose .tb-outer { border: 1px solid #7a7a7a; }
.prose .tb-rows tr + tr td, .prose .tb-rows tr + tr th { border-top: 1px solid #9a9a9a; }
.prose .tb-rows { border-top: 1px solid #7a7a7a; border-bottom: 1px solid #7a7a7a; }
.prose tr { break-inside: avoid; }

/* pictures: a figure is a block (left · center · right) or floated with text wrapping round it */
.prose figure { margin: 6pt 0 10pt; break-inside: avoid; }
.prose figure img { display: block; width: 100%; height: auto; }
.prose figcaption { font-size: .85em; color: #444; margin-top: 3pt; text-align: center; }
.prose .fig-left { margin-right: auto; }
.prose .fig-center { margin-left: auto; margin-right: auto; }
.prose .fig-right { margin-left: auto; }
.prose .fig-float-left { float: left; margin: 2pt 14pt 8pt 0; }
.prose .fig-float-right { float: right; margin: 2pt 0 8pt 14pt; }
.prose img.inl { display: inline-block; vertical-align: baseline; max-width: 100%; height: auto; break-inside: avoid; }

/* columns */
.prose .sect { column-gap: .3in; margin: 0 0 6pt; }
.prose .cols-1 { column-count: 1; }
.prose .cols-2 { column-count: 2; }
.prose .cols-3 { column-count: 3; }
.prose .sect::after { content: ""; display: block; clear: both; }
.prose .colbreak { break-after: column; height: 0; }
.prose .pagebreak { break-after: page; height: 0; }

/* contents */
.prose .toc { margin: 6pt 0 12pt; }
.prose .toc-h { font-weight: 700; font-size: 1.15em; margin-bottom: 6pt; }
.prose .toc ol { list-style: none; padding: 0; margin: 0; }
.prose .toc li { margin: 0 0 3pt; }
.prose .toc-l2 { padding-left: .25in; } .prose .toc-l3 { padding-left: .5in; }
.prose .toc-l4 { padding-left: .75in; } .prose .toc-l5 { padding-left: 1in; } .prose .toc-l6 { padding-left: 1.25in; }
.prose .toc a.toc-a, .prose .toc span.toc-a { color: inherit; text-decoration: none; display: flex; gap: 6pt; }
.prose .toc .toc-t { flex: 0 1 auto; }
.prose .toc .toc-empty { color: #777; font-style: italic; }
