/* Shared document typography. Only pages with document-content opt in. */
.document-content{font:18.75px/1.55 Georgia,"Times New Roman",serif;min-width:0;color:#292929}
.document-content h1{font:var(--page-heading-font);margin:0 0 var(--page-heading-gap);text-align:left;letter-spacing:normal}
.document-content h2{font:700 20px/1.3 Arial,sans-serif;margin:24px 0 10px;text-align:left;letter-spacing:normal}
.document-content h3{font:700 18px/1.35 Arial,sans-serif;margin:18px 0 7px;text-align:left;letter-spacing:normal}
.document-content h4{font:700 17px/1.4 Arial,sans-serif;margin:14px 0 5px;text-align:left;letter-spacing:normal}
.document-content h1 .sel{font:inherit}
.document-content p{margin:0 0 .85em;line-height:1.55}
.document-content li{margin-bottom:.35em}
.document-content ul,.document-content ol{padding-left:1.5em}
/* Readable emphasis in serif prose; keep the original sel markup. */
.document-content :is(.sel,b,strong,.bi){font-family:Arial,Helvetica,sans-serif;font-size:.9em;font-weight:700}
.document-content :is(.sel,b,strong,.bi) :is(.sel,b,strong,.bi){font-size:1em}
.document-content :is(h1,h2,h3,h4,.catalogue-item,.page-nav,.navp,.book-pair-nav,.book-chapter-nav) :is(.sel,b,strong,.bi){font-family:inherit;font-size:1em}
.document-content i,.document-content em{font-style:italic}
.document-content .bi{font-style:italic;font-weight:bold}
.document-content .pindent,.document-content .pnfindent{margin-left:1.5em}
.document-content .note,.document-content .pquote,.document-content .piquote{color:#626262;font-size:.92em}
.document-content .pquote,.document-content .piquote{padding-left:1em;border-left:2px solid #dededb}
.document-content .piquote{font-style:italic}
.document-content .pright,.document-content .descr{text-align:right}
.document-content .rdescr{text-align:left}
.document-content .centerpic,.document-content .centerpicT,.document-content .pcintable{text-align:center}
.document-content .pintable,.document-content .pcintable{margin-left:0}
.document-content .code,.document-content .icode,.document-content pre{font-family:Consolas,monospace;color:#687034}
.document-content .icode{font-style:italic}
.document-content pre{white-space:pre-wrap;overflow-wrap:anywhere}
.document-content .number,.document-content .book-date{font:13.75px/1.5 Arial,sans-serif;color:#777}
.document-content img{max-width:100%;height:auto}
.document-content table{border-collapse:collapse;max-width:100%}
.document-content table.info,.document-content table.gray,.document-content table.grayE{width:100%;margin:1em 0}
.document-content table.info td,.document-content table.info th,.document-content table.gray td,.document-content table.grayE td{border:1px solid #c9c9c3;padding:.4em .5em;vertical-align:top;text-align:left;font:inherit}
.document-content table.info th{font-weight:bold;background:#f7edc8}
.document-content table.gray,.document-content table.grayE{color:#777}
.document-content table p{margin:0 0 .5em}
.document-content .table-scroll{max-width:100%;overflow-x:auto;margin:1em 0;overscroll-behavior-x:contain}
.document-content .table-scroll>table{margin:0}
.document-content .page-nav,.document-content .navp,.document-content .book-chapter-nav,.document-content .book-pair-nav{font:15px/1.55 Arial,sans-serif;text-align:left;margin:1em 0}
.document-content :target{scroll-margin-top:1em}
.document-content .catalogue-item:target{background:#fff5d8}
.document-content .catalogue-item{display:grid;grid-template-columns:80px minmax(0,1fr);gap:15px;padding:11.25px 0;border-top:1.25px solid #d2d2ce;font:15px/21.25px Arial,sans-serif}
.document-content .catalogue-item:last-child{border-bottom:1.25px solid #d2d2ce}
.document-content .catalogue-cover{width:80px;height:auto;max-height:none;align-self:start}
.document-content .bname{font:400 18.75px/25px Arial,sans-serif;margin:0 0 3.75px}
.document-content .bdescr{font:15px/1.5 Arial,sans-serif;margin:0 0 .45em}
.document-content .book-description{font:15px/1.55 Arial,sans-serif}
.document-content .book-downloads{margin:.6em 0;font:15px/1.6 Arial,sans-serif}
.document-content .download-item{display:inline-block;max-width:100%;vertical-align:top}
.document-content .download-info{font-size:.9em;color:#626262}
.document-content .download-separator{color:#999;padding:0 .3em}
.document-content .download-help{font:15px/1.55 Arial,sans-serif;color:#626262;margin-bottom:1.5em}
.document-content .section-links{list-style:none;padding:0;columns:2;column-gap:2em;font:18.75px/1.5 Arial,sans-serif}
.document-content .section-links li{break-inside:avoid;padding:.5em 0;border-bottom:1px solid #dededb;margin:0}
.af-breadcrumbs{white-space:normal;min-width:0}
/* Mobile scale follows the library author catalogue. */
@media(max-width:875px){
.document-content{font-size:12.5px;line-height:1.48}
.document-content h1{font:var(--page-heading-font);margin-bottom:var(--page-heading-gap)}
.document-content h2{font-size:12px;margin-top:16px;margin-bottom:4px}
.document-content h3{font-size:11.33333px;margin-top:12px;margin-bottom:3px}
.document-content h4{font-size:10.66667px;margin-top:10px;margin-bottom:2px}
.document-content p{line-height:1.48;margin-bottom:8px}
.document-content li{margin-bottom:.2em}
.document-content .catalogue-item{grid-template-columns:80px minmax(0,1fr);gap:15px;padding:8px 0;font-size:10px;line-height:14.16667px}
.document-content .catalogue-cover{width:80px;height:auto;max-height:none}
.document-content .bname{font-size:12.5px;line-height:16.66667px;margin:0 0 3.75px;text-box-trim:trim-start;text-box-edge:cap alphabetic}
.document-content .bdescr,.document-content .book-description,.document-content .book-downloads{font-size:10px;line-height:15px}
.document-content .catalogue-item p{line-height:inherit;margin-bottom:4px}
.document-content .book-downloads{margin:4px 0}
.document-content .book-date,.document-content .number{font-size:9.16667px;line-height:15px}
.document-content .download-help{font-size:10px;line-height:15px;margin-bottom:10px}
.document-content .section-links{columns:1;font-size:12.5px;line-height:1.48}
.document-content .section-links li{padding:.3em 0}
.document-content .pindent,.document-content .pnfindent{margin-left:1em}
.document-content .book-chapter-nav,.document-content .book-pair-nav,.document-content .page-nav,.document-content .navp{font-size:10px;line-height:15px}
}

.sidebar .book-date{font:13.75px/1.5 Arial,sans-serif;color:#777}

/* Whole-block indentation: wrapped lines keep the same left edge. */
.document-content .indent1,.document-content .indent2,.document-content .indent3{display:block;text-indent:0}
.document-content .indent1{margin-inline-start:1.5em}
.document-content .indent2{margin-inline-start:3em}
.document-content .indent3{margin-inline-start:4.5em}
@media(max-width:875px){
.document-content .indent1{margin-inline-start:1em}
.document-content .indent2{margin-inline-start:2em}
.document-content .indent3{margin-inline-start:3em}
}

/* Legacy catalogue anchors must not occupy grid cells. */
.catalogue-item{position:relative}
.catalogue-item > span[id]{position:absolute;top:0;left:0}

/* Outline follows the cover image, including white title pages. */
.document-content .catalogue-cover{outline:1px solid #777;outline-offset:0}

/* Fourth outline level in the Greek textbook contents. */
.document-content .indent4{display:block;text-indent:0;margin-inline-start:6em}
@media(max-width:875px){.document-content .indent4{margin-inline-start:4em}}

.document-content .indent0{display:block;text-indent:0;margin-inline-start:0}

.lang-index .document-content .section-links li{border-bottom:0}

/* Symmetric catalogue rows: the final paragraph adds no extra bottom gap. */
.document-content .catalogue-item > div > :last-child{margin-bottom:0}

/* Desktop uses the library line box; mobile keeps cap-height alignment. */
@media(min-width:875.01px){.document-content .catalogue-cover{position:relative;top:4px}}

/* Download, description and update date form consecutive compact lines. */
.document-content .catalogue-item :is(.book-downloads,.book-date){margin-top:0;margin-bottom:0}
.document-content .catalogue-item .book-description > :first-child{margin-top:0}
.document-content .catalogue-item .book-description > :last-child{margin-bottom:0}

/* Older generated catalogues also put each downloadable file on its own line. */
.document-content .book-downloads .download-separator{display:block;height:0;overflow:hidden;padding:0}

/* Heading spacing also applies before lists and consecutive subheadings. */
.document-content :is(h1,h2,h3,h4) + :is(p,ul,ol,h2,h3,h4){margin-top:0}

/* Contents: each wrapped line retains its hierarchy level. */
.document-content .book-contents .toc-group{margin:.65em 0;text-indent:0}
.document-content .indent5{display:block;text-indent:0;margin-inline-start:7.5em}
@media(max-width:875px){.document-content .indent5{margin-inline-start:5em}}

/* Deep contents markers sit inside the existing indent, including on phones. */
.document-content .book-contents :is(.indent3,.indent4,.indent5){position:relative}
.document-content .book-contents :is(.indent3,.indent4,.indent5)::before{content:"";position:absolute;inset-inline-start:-.65em;top:.65em;width:3px;height:3px;border-radius:50%;background:currentColor;pointer-events:none}

/* Shared light-grey footnotes and notes; return links remain easy to tap. */
.document-content :is(.note,.footnotes,.book-footnotes,.editorial-footnotes,ol:has(>li>a[name^="fn"]),ol:has(>li[id^="fn"])){color:#999999}
@media(max-width:875px){
.document-content a[href^="#back"]{display:inline;position:relative;vertical-align:baseline;line-height:0;text-indent:0;border-bottom:0;text-decoration:none;white-space:nowrap}
.document-content a[href^="#back"] .bs{font-family:Arial,sans-serif;font-size:22px;line-height:0}
.document-content a[href^="#back"]::after{content:"";position:absolute;width:44px;height:44px;left:50%;top:50%;transform:translate(-50%,-50%)}
}

/* Hanging numbered footnotes: markers at the left, wrapped text indented. */
.document-content ol:is(.footnotes,.book-footnotes,:has(>li>a[name^="fn"]),:has(>li[id^="fn"])){margin:1em 0 0;padding:.65em 0 0;border-top:1px solid #999999;list-style-position:outside}
.document-content ol:is(.footnotes,.book-footnotes,:has(>li>a[name^="fn"]),:has(>li[id^="fn"]))>li{margin-left:1.5em;padding-left:0;text-indent:0}

/* SSI contents: regular entries sit one level below bold section labels. */
.textbook-sidebar-contents .rblock>a{display:block;width:fit-content;max-width:calc(100% - 1em);margin-inline-start:1em}
.textbook-sidebar-contents .rblock>a+br{display:none}

/* Compact navigation lists: shared spacing, aligned labels and wrapping. */
.document-content table.compact-index{width:100%;border-collapse:collapse;border-spacing:0;margin:0 0 1em;font:inherit}
.document-content table.compact-index th,.document-content table.compact-index td{border:0;background:none;padding:0;vertical-align:top;text-align:left;font:inherit}
.document-content table.compact-index th{width:1%;white-space:nowrap;padding-right:20px}
.document-content table.compact-index tr+tr>th,.document-content table.compact-index tr+tr>td{padding-top:.3em}
.document-content ul.compact-columns{list-style:none;columns:3;column-gap:1.2em;margin:0 0 1em;padding:0;font:inherit}
.document-content ul.compact-columns li{break-inside:avoid;margin:0 0 .3em;padding:0;border:0}
@media(max-width:875px){.document-content table.compact-index th{width:1%;white-space:nowrap}.document-content ul.compact-columns{columns:2}}

/* Download categories and exam preparation, separate from online textbooks. */
.document-content ul.material-links{list-style:disc outside;margin:.85em 0;padding:0 0 0 1.2em;font:inherit}
.document-content ul.material-links li{margin:0;padding:0;line-height:inherit}

/* Article dates retain the original homepage date typography. */
.document-content h1 .page-date{font-family:Georgia,"Times New Roman",Times,serif;color:#999999;letter-spacing:normal}

/* Bottom navigation has its own gap; no empty paragraph is needed. */
.document-content .page-nav,.document-content .navp{margin-top:var(--bottom-menu-gap,2.5em)}

/* Chapter navigation at the start needs a compact gap below breadcrumbs. */
.page-layout:has(> .document-content > .book-chapter-nav:first-child){padding-top:10px}
.document-content > .book-chapter-nav:first-child{margin-top:0}
