/* Das Text-Dokument (Dokument-Leser, Form „Text“) — templates/rechtliches/_text_dokument.html.
   Farben und Schriften NUR als var(--…) aus der Quelle der Gästeseiten (pms/_journal_stil.html); hier steht kein HEX-Wert und
   kein Schriftname. Maße in rem/em: die Schriftstufe der Leiste (--leser-stufe) skaliert alles mit. */

main.td-main{max-width:74rem}
.td{--td-nav-breite:18rem}
.td p,.td li{max-width:none}

.td-kopfzeile{margin:0 0 1rem;font-family:var(--sans);font-size:.9375rem}
.td-kopfzeile p{margin:0 0 .5rem}
.td-pruef summary,.td-nav summary{cursor:pointer;min-height:44px;display:list-item;list-style-position:inside;line-height:44px}
.td-pruef dl{display:grid;grid-template-columns:max-content 1fr;gap:.25rem 1rem;margin:.5rem 0}
.td-pruef code{word-break:break-all;font-size:.8125rem}

.td-suche{margin:0 0 1.25rem;font-family:var(--sans);font-size:.9375rem}
.td-suche[hidden]{display:none}
.td-suche label{display:block;font-weight:600;margin-bottom:.25rem}
.td-suche-reihe{display:flex;flex-wrap:wrap;gap:.5rem}
.td-suche input{flex:1 1 14rem;min-height:44px;padding:0 .75rem;font:inherit;color:var(--tinte);background:var(--papier);border:1px solid var(--tinte);border-radius:.25rem}
.td-suche button{min-height:44px;padding:0 1rem;font:inherit;color:var(--tinte);background:var(--grund);border:1px solid var(--tinte);border-radius:.25rem;cursor:pointer}
.td-suche button[hidden]{display:none}
.td-status{display:block;min-height:1.5em;margin-top:.35rem}

.td-rahmen{display:grid;grid-template-columns:minmax(0,1fr);gap:1.25rem}
.td-rahmen > *{min-width:0}
@media (min-width:60rem){
  .td-rahmen{grid-template-columns:var(--td-nav-breite) minmax(0,42rem);gap:2.5rem;align-items:start}
  .td-nav{position:sticky;top:1rem;max-height:calc(100vh - 2rem);overflow:auto}
}
.td-nav{font-family:var(--sans);font-size:.875rem;line-height:1.4}
.td-nav summary{font-weight:600}
.td-nav ol{list-style:none;margin:0;padding:0}
.td-nav ol ol{margin:.15rem 0 .75rem;padding-left:.75rem;border-left:1px solid var(--linie2)}
.td-nav a{display:block;padding:.3rem .25rem;min-height:2rem}
.td-nav > details > ol > li > a{font-weight:600}

/* Der Text. Die Stufe der Leiste (1 = Grundgröße) wirkt auf den ganzen Kasten. */
.td-text{font-size:calc(1.125rem * var(--leser-stufe,1));line-height:1.6;overflow-wrap:break-word;hyphens:auto}
.td-text :target{background:color-mix(in srgb,var(--gelb) 38%,transparent)}
.td-text [id]{scroll-margin-top:1rem}
.td-deckblatt{margin:0 0 2rem}
.td-deckblatt h1{margin:0 0 .5rem}
.td-untertitel{margin:.15rem 0}
.td-kennung{margin:.75rem 0 0;font-family:var(--sans);font-size:.875em;font-weight:600;letter-spacing:.14em}
.td-inhalt{margin:0 0 1rem}
.td-inhalt ul{margin:.25rem 0 0;padding-left:1.25rem}
.td-inhalt li{margin:.15rem 0}
.td-inhalt a{display:block;padding:.2rem 0}
.td-text h2{font-size:1.5em;margin:2.5rem 0 .5rem}
.td-text h3{font-size:1em;margin:1.75rem 0 .35rem}
.td-text h4{font-family:var(--sans);font-size:.9375em;font-style:italic;font-weight:600;margin:1.25rem 0 .25rem}
.td-text p{margin:.5rem 0}
.td-absatz{margin:.5rem 0}
.td-absatz p{margin:0}
.td-nr{font-family:var(--sans);font-size:.9em;font-weight:600;white-space:nowrap}
.td-punkte{list-style:none;margin:.25rem 0 .25rem 1.25rem;padding:0}
.td-punkte li{margin:.2rem 0}
.td-text .tabelle{margin:1rem 0}
.td-text table{font-size:inherit}
.td-text tbody th{font-family:inherit;font-weight:inherit}
.td-text td:empty{min-width:9rem;border-bottom:1px solid var(--tinte)}
.td-stelle{display:inline-block;min-width:1.5rem;min-height:1.5rem;text-align:center;text-decoration:none;color:var(--gold);font-family:var(--sans);font-weight:600}
.td-stelle::before{content:"#"}
@media (hover:hover){
  .td-stelle{visibility:hidden}
  .td-text h2:hover .td-stelle,.td-text h3:hover .td-stelle,.td-absatz:hover .td-stelle,.td-stelle:focus-visible{visibility:visible}
}
mark.td-treffer{background:var(--gelb);color:var(--tinte)}
mark.td-aktiv{outline:2px solid var(--tinte);outline-offset:1px}

.td-druckfuss{display:none}

@media print{
  @page{margin:18mm 16mm 22mm}
  body{background:none}
  .sprung,a.heim,nav.recht,.recht-fuss,.td-kopfzeile,.td-suche,.td-nav,.td-stelle,[data-leser-leiste]{display:none!important}
  main.td-main{max-width:none;padding:0}
  .td-rahmen{display:block}
  .td-text{font-size:10.5pt;line-height:1.4}
  .td-text :target{background:none}
  /* Das Inhaltsverzeichnis des PDF steht auf der ersten Seite, jede Beilage beginnt auf einer neuen. */
  .td-deckblatt{margin:0 0 1.5rem}
  .td-inhalt{break-after:page}
  .td-text h2.td-teil{break-before:page;margin-top:0}
  .td-text h2,.td-text h3,.td-text h4{break-after:avoid}
  .td-absatz,.td-text tr{break-inside:avoid}
  .td-druckfuss{display:block;position:fixed;left:0;right:0;bottom:0;margin:0;text-align:center;font-family:var(--sans);font-size:8.5pt}
  a{text-decoration:none;color:inherit}
}
@media (prefers-reduced-motion:reduce){mark.td-aktiv{scroll-margin:0}}
