/* Illustrated reference-book theme. Bootstrap and colour samples remain intact. */
@font-face { font-family: 'Source Sans 3'; src: url('../font/source-sans-3-latin-400-normal.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('../font/source-sans-3-latin-600-normal.woff') format('woff'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('../font/source-sans-3-latin-700-normal.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('../font/source-serif-4-latin-400-normal.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('../font/source-serif-4-latin-400-italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('../font/source-serif-4-latin-700-normal.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
:root { --book-ink: #222522; --book-red: #b6262d; --book-line: #d9d9d1; --book-muted: #60635c; --book-sans: 'Source Sans 3', Arial, sans-serif; --book-serif: 'Source Serif 4', Georgia, serif; --bs-body-font-family: var(--book-serif); --bs-body-color: var(--book-ink); --bs-link-color: #a31e26; --bs-link-hover-color: #73151b; }
html { scroll-padding-top: 2rem; }
body { margin: 0; background: #e9e8e2; font-family: var(--book-serif); font-size: 1.0625rem; line-height: 1.75; }
::selection { background: #f5d8cf; color: #222522; }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--book-red); outline-offset: 4px; }
.book-shell { max-width: 1600px; padding: 0; margin: 0 auto; background: white; box-shadow: 0 0 50px #27251c12; overflow: visible !important; }
.book-layout { margin: 0; min-height: 100vh; height: auto !important; overflow: visible !important; align-items: stretch; }
.book-sidebar { flex: 0 0 268px; width: 268px; align-self: flex-start; height: 100vh; overflow-y: auto; top: 0; padding: 35px 22px !important; background: #f4f3ee !important; border-top: 8px solid var(--book-red); border-right: 1px solid var(--book-line); font-family: var(--book-sans); }
.book-sidebar > div { padding: 0 !important; display: block !important; min-width: 0; color: var(--book-ink) !important; }
.book-sidebar > div > a { color: var(--book-ink) !important; padding-bottom: 28px !important; margin-bottom: 24px !important; border-bottom: 2px solid var(--book-ink); }
.book-sidebar > div > a .fs-5 { font: 700 1.75rem/1.05 var(--book-sans) !important; letter-spacing: -.055em; }
.book-sidebar .d-none { display: inline !important; }
#menu { display: block; counter-reset: chapter; }
#menu::before { content: 'INHALT'; display: block; color: var(--book-muted); letter-spacing: .18em; font-size: .7rem; font-weight: 700; margin-bottom: 16px; }
#menu > li { counter-increment: chapter; border-bottom: 1px solid var(--book-line); }
#menu .nav-link { position: relative; padding: 12px 0 12px 28px; color: #383b36; font-size: .94rem; line-height: 1.3; }
#menu > li > .nav-link::before { content: counter(chapter, decimal-leading-zero); position: absolute; left: 0; top: 14px; color: var(--book-red); font-size: .7rem; font-weight: 700; }
#menu .nav-link > i { display: none; }
#menu .nav-link:hover, #menu .nav-link[aria-current='page'] { color: var(--book-red); background: #eae8df; }
#menu .nav-link[aria-current='page'] { font-weight: 700; }
#menu .ms-1 { margin-left: 0 !important; }
#menu .collapse, #menu .collapsing { margin-left: 28px !important; padding-bottom: 10px; }
#menu .collapse .nav-link, #menu .collapsing .nav-link { font-size: .86rem; padding: 7px 0; }
.book-content { min-width: 0; padding: 0 clamp(24px, 4.5vw, 76px); border-top: 8px solid var(--book-ink); }
.book-content::before { content: 'LÄNDERBAHNZEIT / GESCHICHTE & MODELLBAU'; display: block; padding: 24px 0 17px; border-bottom: 1px solid var(--book-line); color: var(--book-muted); font: 600 .7rem/1.5 var(--book-sans); letter-spacing: .16em; }
main.tab { margin: 0; overflow: visible !important; }
main.tab > .col { min-width: 0; padding: 38px 0 60px !important; }
h1, h2, h3, h4, h5, h6 { margin: 1.5rem 0 .5rem; color: var(--book-ink); font-family: var(--book-sans); font-weight: 700; line-height: 1.2; text-wrap: balance; overflow-wrap: break-word; break-after: avoid; }
h1 { font-size: clamp(3rem, 4.8vw, 4.8rem); letter-spacing: -.04em; line-height: 1.08; }
h2 { font-size: clamp(2.45rem, 3.8vw, 3.6rem); letter-spacing: -.035em; }
h3 { font-size: clamp(2rem, 3vw, 2.8rem); letter-spacing: -.025em; }
h4 { font-size: clamp(1.65rem, 2.2vw, 2.05rem); letter-spacing: -.015em; }
h5 { font-size: clamp(1.4rem, 1.8vw, 1.65rem); }
h6 { font-size: clamp(1.25rem, 1.5vw, 1.35rem); }
/* Keep spacing independent of heading size; tighten headings without body text between them. */
main :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }
main :is(h1, h2, h3, h4, h5, h6):has(+ :is(h1, h2, h3, h4, h5, h6)) { margin-bottom: .75rem; }
main :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) { margin-top: 0; }
main > .col > :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; padding-bottom: 24px; border-bottom: 5px solid var(--book-red); }
main p { margin-bottom: 1.2rem; max-width: 76ch; hyphens: auto; overflow-wrap: break-word; }
main li { margin-bottom: .55rem; hyphens: auto; }
main li::marker { color: var(--book-red); }
main img { max-width: 100%; height: auto; }
main .figure { margin: 1.4rem 0 2rem; }
.figure-caption, caption { font: 400 .88rem/1.5 var(--book-sans); color: var(--book-muted); padding: .75rem 0; }
.figure-caption { border-top: 1px solid var(--book-line); }
#home > .col > p:has(> img) { max-width: none; margin: 1.8rem 0; padding-bottom: 1.5rem; border-bottom: 1px solid var(--book-line); }
#home > .col > p:has(> img) img { display: block; width: 100%; }
#home > .col > p:has(> img) + p { font-size: 1.18rem; line-height: 1.7; }
#home > .col > ul { padding: 1.4rem 1.6rem 1rem 2.7rem; border-top: 3px solid var(--book-red); background: #f4f3ee; font-family: var(--book-sans); }
/* Include plain HTML tables and legacy header rows without a thead. */
main table { display: block; width: fit-content; max-width: 100%; overflow-x: auto; margin: 1.6rem 0 2rem; border-collapse: collapse; border-spacing: 0; border-top: 3px solid var(--book-red); border-bottom: 2px solid var(--book-ink); color: var(--book-ink); font: 400 1rem/1.55 var(--book-sans); --bs-table-color: var(--book-ink); --bs-table-bg: transparent; --bs-table-hover-color: var(--book-ink); --bs-table-hover-bg: #eeece3; }
main table > :not(caption) > tr > :is(th, td) { padding: .8rem 1rem; border: 1px solid var(--book-line); vertical-align: top; text-align: start; }
main table > tbody > tr:nth-child(even) > td { background-color: #f7f6f2; }
main table > :not(caption) > tr > th { background-color: #eae8df; color: var(--book-ink); font-weight: 700; border-bottom: 2px solid #aaa99e; }
main table > thead > tr > :is(th, td) { background-color: #eae8df; font-weight: 700; border-bottom: 2px solid var(--book-ink); }
main table > tfoot > tr > :is(th, td) { border-top: 2px solid var(--book-ink); background-color: #f1f0eb; font-weight: 600; }
main table :is(th, td) > :last-child { margin-bottom: 0; }
main table caption { caption-side: top; text-align: start; font-weight: 600; color: var(--book-ink); }
blockquote { margin: 2rem 0; padding: .8rem 1.5rem; border-left: 4px solid var(--book-red); background: #f4f3ee; }
.form-control, .form-label, .btn, .alert, .code-header { font-family: var(--book-sans); }
.form-control, .btn, .alert, .card { border-radius: 0; }
.form-control { max-width: 32rem; border-color: #a8aaa1; }
.form-control:focus { border-color: var(--book-red); box-shadow: 0 0 0 .2rem #b6262d20; }
/* Reference-book code listings: paper background, compact ruled rows and a numbered gutter. */
.code-card { border-radius: 0; min-width: 0; max-width: 100%; border: 1px solid var(--book-line); border-top: 3px solid var(--book-red); background: #fff; box-shadow: none !important; }
.code-card .code-header { flex-wrap: wrap; gap: .6rem 1rem; background: #eae8df; color: var(--book-ink); border-bottom: 2px solid var(--book-ink); font-size: 1rem; line-height: 1.5; }
.code-header > div { min-width: 0; overflow-wrap: anywhere; }
.code-header strong { font-weight: 700; }
.code-header .btn { --bs-btn-color: var(--book-red); --bs-btn-border-color: var(--book-red); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--book-red); --bs-btn-hover-border-color: var(--book-red); --bs-btn-active-color: #fff; --bs-btn-active-bg: #73151b; --bs-btn-active-border-color: #73151b; --bs-btn-disabled-color: var(--book-muted); --bs-btn-disabled-border-color: var(--book-line); flex-shrink: 0; font-weight: 600; }
.code-card .code-wrap { max-width: 100%; margin: 0; padding: 0; background: #fff; color: var(--book-ink); overflow-x: auto; white-space: normal; }
main .code-table { display: table; width: 100%; max-width: none; margin: 0; border: 0; overflow: visible; font: 400 .9rem/1.6 Consolas, Monaco, 'Courier New', monospace; tab-size: 4; }
main .code-table > tbody > tr > td { padding: .12rem .85rem; border: 0; border-bottom: 1px solid #eae9e2; vertical-align: top; white-space: pre; background: #fff; }
main .code-table > tbody > tr:nth-child(even) > td { background: #f7f6f2; }
main .code-table > tbody > tr > .line-number { width: 1%; min-width: 3.5em; text-align: right; color: var(--book-muted); background: #eeece4; border-right: 1px solid #c5c3b8; user-select: none; font-variant-numeric: tabular-nums; }
main .code-table > tbody > tr > .line-code { min-width: 0; text-align: left; }
main .code-table > tbody > tr:last-child > td { border-bottom: 0; }
/* Override the imported dark syntax theme only inside code listings. */
.code-card .hljs { background: transparent; color: var(--book-ink); }
.code-card :is(.hljs-keyword, .hljs-type, .hljs-selector-tag, .hljs-deletion) { color: #a31e26; }
.code-card :is(.hljs-string, .hljs-regexp, .hljs-addition, .hljs-meta .hljs-string) { color: #36613d; }
.code-card :is(.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet) { color: #805018; }
.code-card :is(.hljs-title, .hljs-title.function_, .hljs-title.class_, .hljs-built_in, .hljs-section) { color: #285c7a; }
.code-card :is(.hljs-meta, .hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-selector-class) { color: #68467c; }
.code-card :is(.hljs-comment, .hljs-quote) { color: #60635c; font-style: italic; }
.code-card :is(.hljs-params, .hljs-subst, .hljs-punctuation, .hljs-operator) { color: var(--book-ink); }
@media print { .code-card .code-wrap { overflow: visible; } main .code-table { table-layout: fixed; font-size: 8pt; } main .code-table > tbody > tr > .line-number { width: 4em; } main .code-table > tbody > tr > .line-code { white-space: pre-wrap; overflow-wrap: anywhere; } .code-header .btn { display: none; } }
.bibtitle { font-weight: 700; }
#literatur ol { padding-left: 1.6rem; }
#literatur li { padding: .8rem 0 .8rem .5rem; border-bottom: 1px solid var(--book-line); }
.bibmenu { font: 600 .8rem var(--book-sans); }
.book-content > footer { background: white !important; border-top: 1px solid var(--book-ink); margin-left: 0; margin-right: 0; padding: 18px 0 !important; }
.book-content > footer .col::before { content: 'LÄNDERBAHNZEIT'; color: var(--book-muted); font: 600 .7rem var(--book-sans); letter-spacing: .15em; }
@media (min-width: 1400px) { #home > .col { column-count: 2; column-gap: 42px; column-rule: 1px solid var(--book-line); } #home > .col > h3:first-child, #home > .col > p:has(> img), #home > .col > p:has(> img) + p { column-span: all; } #home h4 { break-after: avoid; } #home li { break-inside: avoid; } }
@media (max-width: 900px) { .book-sidebar { flex-basis: 225px; width: 225px; padding: 25px 16px !important; } .book-sidebar > div > a .fs-5 { font-size: 1.5rem !important; } .book-content { padding: 0 26px; } }
@media (max-width: 650px) { body { font-size: 1rem; } .book-layout { display: block; } .book-sidebar { position: relative !important; width: 100%; height: auto; border-right: 0; padding: 20px !important; } .book-sidebar > div > a { padding-bottom: 14px !important; margin-bottom: 14px !important; } #menu { display: flex; flex-wrap: wrap; gap: 0 16px; } #menu::before { width: 100%; margin-bottom: 8px; } #menu > li { width: auto !important; max-width: 100%; } #menu .nav-link { font-size: .85rem; } #menu .collapse, #menu .collapsing { margin-left: 0 !important; } .book-content { padding: 0 22px; border-top-width: 4px; } main.tab > .col { padding-top: 28px !important; } main :is(h1, h2, h3, h4, h5, h6) { overflow-wrap: anywhere; } .book-content::before { font-size: .61rem; letter-spacing: .1em; } }
@media print { body, .book-shell { background: white; box-shadow: none; } .book-sidebar { display: none !important; } .book-content { padding: 0; border: 0; } .book-layout { display: block; } main.tab > .col { padding: 20px 0 !important; } h3, h4, h5 { break-after: avoid; } figure, tr { break-inside: avoid; } main table { display: table; width: auto; overflow: visible; font-size: 9pt; } .code-wrap { white-space: pre-wrap; } a { color: inherit; } }
/* Bootstrap computes link colours from RGB tokens. */
:root { --bs-link-color-rgb: 163, 30, 38; --bs-link-hover-color-rgb: 115, 21, 27; }
.article-meta {
    margin-top: 0.4em;
    color: #666;
    font-size: 0.9em;
}

.article-meta .separator {
    margin: 0 0.5em;
}
