/* ==========================================================================
   Gemeinsame Bildschirm-Ergänzung der eigenständigen Dokumente
   (beitraege/*.html, uebersichten/*.html)

   Die Dokumente behalten ihre eigene Gestaltung und ihren A4-Druck. Diese
   Datei fügt nur hinzu, was am Bildschirm fehlt:
   1. eine Leiste mit dem Weg zurück zur Website und dem Druck-/PDF-Knopf,
   2. größere, linksbündige Lesegrade auf schmalen Bildschirmen.
   Alles steht unter @media screen; im Druck wirkt diese Datei nicht.
   Wird nach dem Inline-Stil des Dokuments geladen und gewinnt deshalb bei
   gleicher Spezifität.
   ========================================================================== */

/* Grundschriften der Beiträge, Latin-Teil (a–z, Umlaute, Satzzeichen).
   Die im Dokument eingebundenen Dateien fonts/sw-minimal-*.woff2 enthalten nur
   den Latin-Ext-Teil; ohne diese Ergänzung fiel der Fließtext bis 09/2026 auf
   Ersatzschriften zurück. Gilt für Bildschirm und Druck. Quelle: Fontsource,
   SIL Open Font License 1.1.
   Seit 11/2026 tragen die Inline-Deklarationen den passenden Latin-Ext-
   unicode-range: Je Schnitt gibt es damit genau zwei sich ergänzende
   Deklarationen statt zweier, die beide „alles“ abdecken. font-display: swap
   statt block, damit der Text nicht bis zu drei Sekunden unsichtbar bleibt. */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('fonts/sw-minimal-newsreader-latin-normal.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: 'Newsreader'; font-style: italic; font-weight: 200 800; font-display: swap; src: url('fonts/sw-minimal-newsreader-latin-italic.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: 'Hanken Grotesk'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('fonts/sw-minimal-hanken-grotesk-latin-normal.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: 'Hanken Grotesk'; font-style: italic; font-weight: 300 800; font-display: swap; src: url('fonts/sw-minimal-hanken-grotesk-latin-italic.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: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('fonts/sw-minimal-jetbrains-mono-latin-normal.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: 'JetBrains Mono'; font-style: italic; font-weight: 100 800; font-display: swap; src: url('fonts/sw-minimal-jetbrains-mono-latin-italic.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; }

/* Rahmen um die Blätter (Leiste, Ende) in der Schrift der Hauptseiten; die Blätter behalten ihre eigene Typografie. */
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('fonts/eb-garamond-latin-wght-normal.woff2') format('woff2-variations'); }

@media screen {
  .doc-leiste {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
    min-height: 52px; padding: 6px max(16px, calc((100vw - 794px) / 2));
    background: rgba(17, 17, 18, .94);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid #26272B;
    font-family: 'EB Garamond', Garamond, Georgia, serif;
    font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
    color: #C6C5C2;
  }
  .doc-leiste a, .doc-leiste button {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
    color: inherit; text-decoration: none; font: inherit; letter-spacing: inherit; text-transform: inherit;
  }
  .doc-leiste a:hover { color: #FAFAF8; }
  .doc-leiste .doc-ort { color: #B0B1B4; font-weight: 400; letter-spacing: .1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; text-align: center; }
  .doc-leiste button {
    background: #FAFAF8; color: #111112; border: 0; border-radius: 0; padding: 0 16px; cursor: pointer;
  }
  .doc-leiste button:hover { background: #D8D7D2; }
  .doc-leiste :focus-visible { outline: 1.5px solid #FAFAF8; outline-offset: 3px; }

  /* Titel am Bildschirm mit kräftigerem Haarstrich: Bei opsz 96 / wght 340
     verschwindet der Querstrich des „e" in der Rasterung („Wcnn dic").
     Im Druck bleibt der Originalschnitt, dort trägt die Haarlinie. */
  .title { font-variation-settings: 'opsz' 60, 'wght' 370 !important; }
  .title em { font-variation-settings: 'opsz' 60, 'wght' 350 !important; }

  /* Die Leiste ersetzt den frei schwebenden PDF-Knopf. */
  .print-btn { display: none !important; }

  /* Abstand zwischen Leiste und erstem Blatt; die Leiste sitzt ganz oben. */
  body:has(> .doc-leiste) { padding-top: 0 !important; }
  .doc-leiste { margin-bottom: 30px; }
  .doc-leiste + .sheet, .doc-leiste + .blatt { margin-top: 0; }

  .doc-ende {
    max-width: 794px; margin: 0 auto 40px; padding: 18px 0 0;
    display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
    font-family: 'EB Garamond', Garamond, Georgia, serif;
    font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  }
  .doc-ende { color: #C6C5C2; }
  .doc-ende a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
  body.sw-screen .doc-ende { color: #3c3c38; }
}

/* Papier auf Tinte: Wie die Arbeitsprobe auf der Startseite und das
   Arbeitsblatt liegen auch die Beiträge am Bildschirm auf dem dunklen Grund
   der Website. Das Blatt selbst bleibt unverändert. */
@media screen and (min-width: 861px) {
  body.sw-screen { background: #09090A; }
  body.sw-screen .doc-ende { color: #C6C5C2; }
  .sheet { box-shadow: none; }
}

/* Mitwachsen: Auf breiten Bildschirmen wird jedes Blatt als Ganzes vergrößert
   (zoom), damit der für A4 gesetzte Fließtext (13,5 px) nicht winzig wirkt.
   Satz, Umbrüche und Seitenaufteilung bleiben dabei exakt gleich. */
@media screen and (min-width: 1200px) { :root { --blatt-zoom: 1.1; } }
@media screen and (min-width: 1440px) { :root { --blatt-zoom: 1.18; } }
@media screen and (min-width: 1700px) { :root { --blatt-zoom: 1.28; } }
@media screen and (min-width: 1900px) { :root { --blatt-zoom: 1.38; } }
@media screen and (min-width: 2300px) { :root { --blatt-zoom: 1.55; } }
@media screen and (min-width: 861px) {
  .sheet, .blatt { zoom: var(--blatt-zoom, 1); }
  .doc-leiste {
    padding-left: max(16px, calc((100vw - 794px * var(--blatt-zoom, 1)) / 2));
    padding-right: max(16px, calc((100vw - 794px * var(--blatt-zoom, 1)) / 2));
  }
  .doc-ende { max-width: calc(794px * var(--blatt-zoom, 1)); }
}

/* Schmal: Leseschrift größer und linksbündig, Blätter klar getrennt. */
@media screen and (max-width: 860px) {
  .doc-leiste { padding-left: 16px; padding-right: 16px; }
  .doc-leiste .doc-ort { display: none; }
  .doc-leiste { gap: 8px; font-size: 12px; letter-spacing: .06em; }
  .doc-leiste a, .doc-leiste button { white-space: nowrap; flex-shrink: 0; }
  .doc-leiste button { padding: 0 12px; }
  .doc-leiste { margin-bottom: 12px; }
  body.sw-screen .doc-leiste { margin-bottom: 0; }
  .mast { padding-right: 0 !important; }
  .sheet + .sheet { border-top: 10px solid #09090A; }

  .lead { font-size: 15.5px !important; }
  p.body { font-size: 15.5px; line-height: 1.62; }
  .card-body, .step-body, .method p, .ws-task { font-size: 14.5px; line-height: 1.55; }
  .card-title { font-size: 15.5px; }
  .card-cite, .ws-sol { font-size: 12.5px; }
  .finding, .loop-text, .turn-text { font-size: 14.5px; }
  .finding b, .loop-text b { font-size: 14px; }
  .gate-note p, .gate-note { font-size: 14px; }
  .verdict p { font-size: 15px; }
  .prompt-text { font-size: 12px; }
  table { font-size: 13.5px; }
  .brand-sub, .mast-meta, .foot { font-size: 11px; }
  .foot span { white-space: normal !important; overflow-wrap: anywhere; }
  .foot span { flex-shrink: 1 !important; min-width: 0; }
  /* Zweispaltige Einschübe und breite Tabellen: untereinander bzw. in sich scrollbar */
  .eingabe { display: block !important; }
  .eingabe > * + * { margin-top: 12px; }
  table { display: block; max-width: 100%; overflow-x: auto; }
  table.probe td { white-space: normal; }
  .lead, p.body, .card-body, .finding, .verdict p, .faustregel p,
  .loop-text, .gate-note p, .step-body, .method p {
    text-align: left !important;
  }
  .doc-ende { padding: 18px 22px 0; }
}

@media print {
  .doc-leiste, .doc-ende { display: none !important; }
}

/* Nach dem letzten Blatt folgt am Bildschirm noch die Ende-Leiste. Damit
   das letzte Blatt im Druck trotzdem keinen Seitenumbruch (und keine leere
   Seite) nach sich zieht, gilt hier :last-of-type statt :last-child. */
@media print {
  section.sheet:last-of-type, section.blatt:last-of-type { break-after: auto !important; }
}

/* Quellen am Bildschirm als Links erkennbar, Marginalien mit kräftigerer Schrift. */
@media screen {
  .brand-sub,.mast-meta,.kicker,.card-cite,.foot { color:#565854; }
  .card-cite { font-size:12.5px; line-height:1.5; }
  .sheet a { color:inherit; text-decoration:underline; text-underline-offset:2px; overflow-wrap:anywhere; }
}
