/* Reader pages (/reader/...): his FrontPage markup rendered inside the new shell. Loaded after
   _site.css (the front page's stylesheet, tokens --paper --ink --link --accent --rule --measure
   --serif). Everything is scoped under main.reader and touches presentation only - the text is
   his, untouched. build-reader.mjs copies this file to /_reader.css. ASCII only. */

main.reader { padding: 2.25rem 0 1rem; }
main.reader > h1 {
  font-weight: 500; font-size: clamp(1.7rem, 4.8vw, 2.4rem); line-height: 1.15;
  letter-spacing: -0.015em; margin: 0 0 1.5rem;
}

/* one face, one scale: <font face>, <font size>, Word's inline pt sizes and its colour
   attributes all go back to the shell's serif and ink */
main.reader font,
main.reader [style*="font-family"], main.reader [style*="font-size"], main.reader [style*="color"],
main.reader [face] {
  font-family: inherit !important; font-size: 1em !important; color: inherit !important;
}
main.reader font[size="1"], main.reader font[size="2"],
main.reader font[size="-1"], main.reader font[size="-2"] { font-size: 0.9em !important; }
main.reader font[size="4"], main.reader font[size="5"],
main.reader font[size="6"], main.reader font[size="7"],
main.reader font[size^="+"] { font-size: 1.15em !important; line-height: 1.3; }
main.reader :is(h1, h2, h3, h4, h5, h6, sup, sub) :is(font, span, a, b, i, u, em, strong, small)
  { font-size: inherit !important; }

/* text carriers: a measure and a line-height; his justified paragraphs read ragged-right here */
main.reader p, main.reader li, main.reader dd, main.reader dt, main.reader blockquote {
  max-width: var(--measure); line-height: 1.55; margin-top: 0; margin-bottom: 0.85em;
}
main.reader [align="justify"], main.reader [style*="justify"] { text-align: left !important; }
main.reader p, main.reader div, main.reader ul, main.reader ol, main.reader dl, main.reader blockquote,
main.reader center, main.reader pre { width: auto !important; }
main.reader ul, main.reader ol { padding-left: 1.5em; }
main.reader blockquote { margin-left: 1em; margin-right: 0; }
main.reader pre { white-space: pre-wrap; }
main.reader [nowrap], main.reader nobr { white-space: normal !important; }
/* an unbreakable run (his underscore rules, a long URL) wraps instead of widening the page */
main.reader { overflow-wrap: anywhere; }
main.reader h1, main.reader h2, main.reader h3, main.reader h4, main.reader h5, main.reader h6 {
  font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; margin: 1.5em 0 0.5em;
}
main.reader h2 { font-size: 1.55rem; }
main.reader h3 { font-size: 1.3rem; }
main.reader h4, main.reader h5, main.reader h6 { font-size: 1.1rem; }
main.reader b, main.reader strong { font-weight: 600; }
main.reader i, main.reader em { font-style: italic; }
main.reader u { text-decoration: underline; }

/* the classes of his Simmel stylesheet (stylsheetsimmel.css is not loaded here): the roles they
   played, in the shell's scale */
main.reader .haupttitel { font-size: 1.45em; font-weight: 500; line-height: 1.2; margin: 0 0 0.35em; }
main.reader .untertitel { font-size: 1.1em; color: var(--meta); margin: 0 0 1.25em; }
main.reader .zwischentitel, main.reader .titelspezial { font-size: 1.25em; font-weight: 500; line-height: 1.25; margin: 1.5em 0 0.6em; }
main.reader .zwischentitel2, main.reader .zwischentitel3, main.reader .schriftspezial, main.reader .normalschriftgross
  { font-size: 1.05em; font-weight: 600; margin: 1.25em 0 0.5em; }
main.reader .liste { margin: 0 0 0.35em 1.25em; font-weight: 500; font-size: 0.95em; }
main.reader .zitat { font-style: italic; margin-left: 1.25em; margin-right: 0; color: var(--ink-soft); }
main.reader .fussnoten { font-size: 0.9em; color: var(--ink-soft); }
main.reader .haupttitel a, main.reader .untertitel a { color: inherit; text-decoration: none; }
main.reader .haupttitel a:hover, main.reader .untertitel a:hover { color: var(--accent); }
main.reader :is(.haupttitel, .untertitel, .zwischentitel, .zwischentitel2, .zwischentitel3, .liste) b,
main.reader :is(.haupttitel, .untertitel, .zwischentitel, .zwischentitel2, .zwischentitel3, .liste) strong
  { font-weight: inherit; }

/* tables. build-reader.mjs classifies every table (see classifyTable): layout tables
   (.tbl-layout — frames, sidebars, anything nesting tables or holding prose) stack into blocks in
   source order; data tables (.tbl-data — grids of short cells) keep their grid inside a scroll
   box. Borders and cell heights of layout tables are dropped: they drew the old frame. */
main.reader table { max-width: 100% !important; height: auto !important; margin: 1em 0; }
main.reader table[width], main.reader table[style*="width"] { width: auto !important; }
main.reader table.tbl-layout,
main.reader table.tbl-layout > :is(tbody, thead, tfoot),
main.reader table.tbl-layout > :is(tbody, thead, tfoot) > tr,
main.reader table.tbl-layout > :is(tbody, thead, tfoot) > tr > :is(td, th)
  { display: block; width: auto !important; height: auto !important; margin: 0; padding: 0; border: 0 !important; }
main.reader table.tbl-layout > tbody > tr > :is(td, th) { padding: 0.25em 0; }
/* hollow tables (build-reader.mjs isHollowTable: no letter or digit, no image, rule or control)
   were FrontPage spacers and dotted frames - nothing to show */
main.reader table.tbl-hollow { display: none; }
main.reader .table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0; }
main.reader .table-scroll > table { border-collapse: collapse; margin: 0; }
main.reader .table-scroll td, main.reader .table-scroll th
  { padding: 0.3em 0.6em; vertical-align: top; overflow-wrap: break-word; font-size: 0.95em; border: 1px solid var(--rule); }
main.reader .table-scroll th { font-weight: 600; text-align: left; }

/* lists (.tbl-list - his publication and link lists, icon | author | title): no grid, one light
   rule under each row, the author column bold. The cell roles come from build-reader.mjs
   (markListCells): .cell-empty holds nothing, .cell-icon an image only, .cell-author the first
   worded cell of a row that has two (author | title). At phone width each row becomes a block,
   author above title; only cells without any text are hidden. */
main.reader table.tbl-list { border-collapse: collapse; border: 0 !important; width: 100% !important; }
main.reader table.tbl-list :is(td, th)
  { padding: 0.45em 0.6em 0.45em 0; height: auto !important; vertical-align: top; text-align: left;
    overflow-wrap: break-word; border: 0 !important; border-bottom: 1px solid var(--rule) !important; }
main.reader table.tbl-list :is(td, th):last-child { padding-right: 0; }
main.reader table.tbl-list tr:last-child > :is(td, th) { border-bottom: 0 !important; }
main.reader table.tbl-list .cell-author, main.reader table.tbl-list .cell-author a { font-weight: 600; }
main.reader table.tbl-list .cell-icon { border-bottom: 0 !important; }
main.reader table.tbl-list tr:not(:has(> :is(td, th):not(.cell-empty):not(.cell-icon))) > :is(td, th)
  { border-bottom: 0 !important; padding: 0; }
main.reader table.tbl-list .cell-icon p { margin: 0; }
main.reader table.tbl-list .cell-icon img { display: block; margin: 0.25em 1em 0.25em 0; max-width: 12rem; }
main.reader table.tbl-list a { text-decoration: none; }
main.reader table.tbl-list a:hover { text-decoration: underline; }
@media (max-width: 40em) {
  main.reader table.tbl-list,
  main.reader table.tbl-list > :is(tbody, thead, tfoot),
  main.reader table.tbl-list > :is(tbody, thead, tfoot) > tr,
  main.reader table.tbl-list > :is(tbody, thead, tfoot) > tr > :is(td, th)
    { display: block; width: auto !important; }
  main.reader table.tbl-list > :is(tbody, thead, tfoot) > tr
    { padding: 0.55em 0; border-bottom: 1px solid var(--rule); }
  main.reader table.tbl-list > :is(tbody, thead, tfoot) > tr:last-child { border-bottom: 0; }
  main.reader table.tbl-list :is(td, th) { padding: 0.1em 0 !important; border: 0 !important; }
  main.reader table.tbl-list .cell-empty { display: none; }
  main.reader table.tbl-list .cell-icon { display: inline-block; padding: 0 !important; }
  main.reader table.tbl-list .cell-icon p, main.reader table.tbl-list .cell-icon font { display: inline; }
  main.reader table.tbl-list .cell-icon img { display: inline-block; max-height: 3rem; width: auto; margin: 0 0.5em 0.25em 0; vertical-align: middle; }
  main.reader table.tbl-list .cell-author { display: block; }
  main.reader table.tbl-list > :is(tbody, thead, tfoot) > tr:not(:has(> :is(td, th):not(.cell-empty):not(.cell-icon)))
    { border-bottom: 0; padding: 0; }
}
main.reader * { background-image: none !important; background-color: transparent !important; }

/* images */
main.reader img { max-width: 100%; height: auto; }
main.reader img[align="left"] { margin: 0.25em 1em 0.5em 0; }
main.reader img[align="right"] { margin: 0.25em 0 0.5em 1em; }
main.reader img[hspace] { margin-left: 0; margin-right: 0.3em; }

/* links: the site's, except footnote references - small and navy, as in the original */
main.reader a { color: var(--link); text-decoration: underline; }
main.reader a[href^="#"] { font-size: 0.8em; color: navy; text-decoration: none; }
main.reader a[href^="#"]:hover { color: var(--accent); text-decoration: underline; }
main.reader sup { line-height: 0; }
main.reader a[name]:target, main.reader [id]:target { scroll-margin-top: 1rem; }

/* rules */
main.reader hr { border: 0; border-top: 1px solid var(--rule); height: 0; margin: 1.5em 0; width: 100% !important; }

/* the colophon's original-page line sits with the takedown note */
footer.colophon p.original { color: var(--ink-soft); }

/* his style: colours come in as tokens on <html> (see build-reader.mjs); keep the page light,
   his tints were designed for a white screen */
html.his-colours { color-scheme: light; }
.chrome { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1.5rem; padding: 1.5rem 0 0.5rem; }
.chrome img { max-width: 100%; height: auto; display: block; }
.chrome img[width] { width: auto; max-height: 7rem; }

/* image QA 22.09.2026 (measured on 27 pages at 390/1100): a data grid squeezed his rowspan photo
   column to 24px, dead FrontPage counters showed a broken icon, 1-2px spacer gifs became squares */
main.reader .table-scroll img { max-width: min(100vw - 2.5rem, 40rem); }
main.reader img[src*="fpcount.exe"] { display: none; }
main.reader img[height="1"] { height: 1px; }
main.reader img[height="2"] { height: 2px; }
main.reader a { overflow-wrap: anywhere; }

/* publication years (build-reader.mjs markYears, data from tools/paper_years.py): a small grey
   year after a link to a dated paper on list pages - a real <span class="added year">, so the
   PDF glyph of _site.css keeps the link's own ::after and colour. */
main.reader .year { font-size: 0.8em; color: var(--meta); margin-left: 0.4em; white-space: nowrap; font-style: normal; font-weight: 400; }
main.reader a.a-empty::after, main.reader a.a-empty ::after { content: none !important; padding: 0 !important; margin: 0 !important; }
