/* Unterseiten von bus.roringen.de (Datenschutz, Impressum): Zeitungsdruck wie die Tafel,
   hell/dunkel, selbst gehostete Schriften aus fonts/ */

/* Schriften: dieselben selbst gehosteten Dateien wie die Abfahrtstafel (fonts/).
   Fehlen sie, greifen die System-Schriften aus den Stapeln unten. */
@font-face {
    font-family: 'Besley';
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
    src: url(fonts/besley-normal-600-900-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Besley';
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
    src: url(fonts/besley-normal-600-900-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Besley';
    font-style: italic;
    font-weight: 700 900;
    font-display: swap;
    src: url(fonts/besley-italic-700-900-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url(fonts/publicsans-normal-400-800-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url(fonts/publicsans-normal-400-800-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(fonts/ibmplexmono-normal-500-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light dark;
    --paper: #F8F4EA;
    --paper-dim: #EFE9DA;
    --ink: #211D14;
    --ink-soft: #46412F;
    --muted: #5F5847;
    --hairline: #D9D1BC;
    --hairline-strong: #BFB69D;
    --accent: #0B66A8;
    --font-display: 'Besley', Georgia, 'Times New Roman', serif;
    --font-ui: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

/* Anthrazit-Druck wie auf der Abfahrtstafel */
@media (prefers-color-scheme: dark) {
    :root {
        --paper: #1B1C1F;
        --paper-dim: #232428;
        --ink: #ECE6D8;
        --ink-soft: #CFC9B9;
        --muted: #A29B89;
        --hairline: #35363B;
        --hairline-strong: #4A4B51;
        --accent: #74AEDE;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}
@media (min-width: 640px) {
    .wrap { padding-left: 24px; padding-right: 24px; }
    body { font-size: 17px; }
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--hairline-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Zeitungskopf + Druckfarben-Band ---------- */
.masthead-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.85rem;
    padding-bottom: 0.55rem;
}
.brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.012em;
    text-decoration: none;
    white-space: nowrap;
}
.brand em { font-style: italic; font-weight: 700; }
.masthead-meta {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 0.2rem;
}
.lineband {
    display: flex;
    height: 5px;
    border-top: 2px solid var(--ink);
}
.lineband span { flex: 1; }
.lineband .b91 { background: #0B66A8; }
.lineband .be91 { background: #0F8554; }
.lineband .b92 { background: #C75000; }
.lineband .be92 { background: #6650B8; }
.lineband .b160 { background: #B5246D; }
.lineband .b170 { background: #E3B505; }
.lineband .b21 { background: #1E7F73; }
.lineband .b22 { background: #8A5A32; }
.lineband .b23 { background: #6B7717; }
.lineband .bN4 { background: #3B4B9A; }

/* ---------- Text ---------- */
main { padding-top: 1.1rem; padding-bottom: 2.5rem; }

.back {
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--hairline-strong);
    padding: 0.2rem 0;
}
.back:hover { border-bottom-color: currentColor; }

.kicker {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 1.8rem 0 0.35rem;
}
h1 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -0.015em;
    margin: 0;
}
.stand {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    margin: 0.55rem 0 1.4rem;
}
.lead { font-size: 1.06em; color: var(--ink-soft); }

h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.45rem;
    line-height: 1.2;
    margin: 2.6rem 0 0.8rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--ink);
}
h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.14rem;
    line-height: 1.25;
    margin: 1.9rem 0 0.5rem;
}
p { margin: 0 0 0.85rem; }
p, li, dd { hyphens: auto; -webkit-hyphens: auto; }
ul, ol { margin: 0 0 0.9rem; padding-left: 1.25rem; }
li { margin: 0.22rem 0; }
address { font-style: normal; margin: 0 0 0.9rem; }
code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    background: var(--paper-dim);
    padding: 0.05em 0.3em;
    border-radius: 2px;
    overflow-wrap: anywhere;
}

/* Kurzfassung */
.summary {
    background: var(--paper-dim);
    border-left: 4px solid var(--ink);
    padding: 1rem 1.1rem 0.35rem;
    margin: 1.6rem 0;
}
.summary h2 {
    border: 0;
    padding: 0;
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

/* Inhaltsverzeichnis */
.toc { margin: 1.6rem 0 0; }
.toc-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.4rem;
}
.toc ol { margin: 0; padding-left: 1.4rem; }
@media (min-width: 640px) {
    .toc ol { columns: 2; column-gap: 2.5rem; }
    .toc li { break-inside: avoid; }
}

/* Was / Wozu / Rechtsgrundlage / Speicherdauer */
.facts {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    gap: 0.45rem 1rem;
    margin: 0.9rem 0 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hairline);
}
.facts dt {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 0.3rem;
}
.facts dd { margin: 0; }
.facts dd p:last-child, .facts dd ul:last-child { margin-bottom: 0; }
.facts a { overflow-wrap: anywhere; }
@media (max-width: 560px) {
    .facts { grid-template-columns: 1fr; gap: 0.1rem; }
    .facts dd { margin-bottom: 0.6rem; }
}

/* Hinweis-Kasten und Widerspruch */
.box {
    background: var(--paper-dim);
    border-left: 4px solid var(--accent);
    padding: 0.9rem 1.1rem 0.15rem;
    margin: 1.2rem 0;
}
.box h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.02rem;
    margin: 0 0 0.35rem;
}
.notice {
    border: 2px solid var(--ink);
    padding: 0.9rem 1.1rem 0.15rem;
    margin: 1.4rem 0;
}
.notice h3 { margin-top: 0; }

/* Einträge im Browser-Speicher */
.keys { margin: 1rem 0 1.2rem; border-top: 2px solid var(--ink); }
.keys div {
    display: grid;
    grid-template-columns: 13.5rem 1fr;
    gap: 0.2rem 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--hairline);
}
.keys dt, .keys dd { margin: 0; }
@media (max-width: 560px) {
    .keys div { grid-template-columns: 1fr; }
}

footer {
    border-top: 1px solid var(--hairline-strong);
    padding-top: 1rem;
    padding-bottom: 2.5rem;
    font-size: 0.92rem;
    color: var(--muted);
}
footer p { margin: 0 0 0.5rem; }

@media print {
    .lineband, .back { display: none; }
    body { background: #fff; color: #000; }
}

/* Gemeinsame Navigation der Unterseiten (Fuss): Abfahrtstafel, Statistik, Impressum, Datenschutz */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    padding: 0.2rem 0 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: currentColor; }
.site-nav a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--ink); }
