/* Talentakte · Rechtstexte unter talentakte.de/rechtliches/. Ergänzt /assets/site.css (Farben, Schriften, Kopfzeile).
   Erzeugt werden die Seiten aus docs/vertrag/*.md mit docs/vertrag/build_html.py. */

/* Kopfzeile: Aufbau und Stil aus site.css (.kopfzeile, .marke, .kopf-aktionen, .anmelden, .knopf) */
.kopf-aktionen a:focus-visible { outline: 3px solid var(--himbeer-25); outline-offset: 3px; }

/* Raster: Titel, Inhaltsverzeichnis, Text */
.r-seite { padding: clamp(36px, 6vw, 72px) 0 clamp(64px, 9vw, 112px); }
.r-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.r-kopf { display: grid; gap: 12px; justify-items: start; }
.r-kopf h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.12; letter-spacing: -.015em; max-width: 37rem; overflow-wrap: break-word; }
.r-stand { color: var(--text-mute); font-size: .95rem; }
.r-text { min-width: 0; }
.r-text > * { max-width: 37rem; }
.breit .r-text > .r-tabelle { max-width: 100%; }

@media (min-width: 1100px) {
  .r-raster { grid-template-columns: 240px minmax(0, 37rem); column-gap: 72px; justify-content: center; align-items: start; }
  .r-kopf { grid-column: 1 / -1; }
  .r-kopf h1 { max-width: none; }
  .r-toc { grid-column: 1; grid-row: 2; position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow: auto; }
  .r-text { grid-column: 2; grid-row: 2; }
  .r-raster.ohne-toc { grid-template-columns: minmax(0, 37rem); }
  .r-raster.ohne-toc .r-kopf, .r-raster.ohne-toc .r-text { grid-column: 1; }
  .r-raster.breit { grid-template-columns: minmax(0, 1fr); justify-content: stretch; }
}

/* Inhaltsverzeichnis */
.r-toc { font-size: .9rem; line-height: 1.35; border-left: 2px solid var(--linie); padding: 2px 0 2px 18px; }
.r-toc-titel { font: 700 .74rem/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--grau-75); margin-bottom: 10px; }
.r-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.r-toc a { color: var(--grau); text-decoration: none; }
.r-toc a:hover { color: var(--himbeer); text-decoration: underline; text-underline-offset: 3px; }
.r-toc a:focus-visible { outline: 3px solid var(--himbeer-25); outline-offset: 2px; border-radius: 3px; }
@media (max-width: 1099px) {
  .r-toc { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 20px; max-width: 37rem; }
  .r-toc ol { gap: 9px; }
}
@media (min-width: 720px) and (max-width: 1099px) {
  .r-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
}

/* Text */
.r-text { font-size: 1.0625rem; line-height: 1.68; }
.r-text p, .r-text ul, .r-text ol { margin: 0 0 .95em; }
.r-text h2 { font-size: clamp(1.32rem, 2.1vw, 1.6rem); line-height: 1.25; margin: 2.1em 0 .8em; padding-top: 1.15em; border-top: 1px solid var(--linie); scroll-margin-top: 96px; }
.r-text h3 { font-size: 1.14rem; line-height: 1.3; margin: 1.7em 0 .55em; scroll-margin-top: 96px; }
.r-text > h2:first-child, .r-einleitung + h2 { margin-top: 1.6em; }
.r-einleitung > * { max-width: 37rem; }
.r-einleitung p { color: var(--ink); }
.r-text a { color: var(--himbeer-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.r-text a:hover { color: var(--himbeer); }
.r-text a:focus-visible { outline: 3px solid var(--himbeer-25); outline-offset: 2px; border-radius: 3px; }
.r-text strong { font-weight: 700; color: var(--grau); }
.r-text .r-zwischen { margin: 1.3em 0 .45em; }
.r-text ul, .r-text ol { padding-left: 1.35em; }
.r-text li { margin: .32em 0; padding-left: .2em; }
.r-text li::marker { color: var(--grau-75); }
.r-text .abs { position: relative; padding-left: 2.5em; }
.r-text .abs-nr { position: absolute; left: 0; top: 0; color: var(--grau-75); font-variant-numeric: tabular-nums; }
.r-text .abs-liste { margin-left: 2.5em; }
.r-hinweis { background: var(--info-soft); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 1.2em; }
.r-hinweis p { margin: 0; }

/* Tabellen */
.r-tabelle { overflow-x: auto; margin: 1.1em 0 1.6em; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); }
.r-tabelle table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.5; }
.r-tabelle th, .r-tabelle td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--grau-10); }
.r-tabelle tr:last-child th, .r-tabelle tr:last-child td { border-bottom: 0; }
.r-tabelle thead th, .r-tabelle thead td { background: var(--papier-2); font: 700 .8rem/1.35 var(--font-body); letter-spacing: .02em; color: var(--grau); }
.r-tabelle tbody th { font-weight: 700; color: var(--grau); }
.r-tabelle.stapel table { min-width: 860px; }
/* Gestapelte Darstellung: breite Tabellen bis 899 px, alle Tabellen bis 560 px */
@media (max-width: 899px) {
  .r-tabelle.stapel { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .r-tabelle.stapel table { min-width: 0; }
  .r-tabelle.stapel thead { display: none; }
  .r-tabelle.stapel table, .r-tabelle.stapel tbody, .r-tabelle.stapel tr, .r-tabelle.stapel th, .r-tabelle.stapel td { display: block; width: auto; }
  .r-tabelle.stapel tr { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
  .r-tabelle.stapel tbody th { font-size: 1.02rem; padding: 14px 16px 8px; border: 0; }
  .r-tabelle.stapel td { border: 0; padding: 6px 16px 10px; }
  .r-tabelle.stapel td::before { content: attr(data-spalte); display: block; font: 700 .68rem/1.4 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--grau-75); margin-bottom: 2px; }
  .r-tabelle.stapel tr td:last-child { padding-bottom: 16px; }
}
@media (max-width: 560px) {
  .r-tabelle { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .r-tabelle thead { display: none; }
  .r-tabelle table, .r-tabelle tbody, .r-tabelle tr, .r-tabelle th, .r-tabelle td { display: block; width: auto; }
  .r-tabelle tr { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
  .r-tabelle tbody th { font-size: 1rem; padding: 12px 16px 6px; border: 0; }
  .r-tabelle td { border: 0; padding: 4px 16px 8px; }
  .r-tabelle td::before { content: attr(data-spalte); display: block; font: 700 .68rem/1.4 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--grau-75); margin-bottom: 2px; }
  .r-tabelle tr td:last-child { padding-bottom: 14px; }
}

/* Übersicht der Rechtstexte */
.r-dokumente { list-style: none; padding: 0 !important; margin: 1.6em 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; max-width: none !important; }
.r-dok a { display: grid; gap: 8px; height: 100%; padding: 22px 22px 20px; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--ink); box-shadow: var(--schatten); transition: border-color .2s, transform .2s var(--ease); }
.r-dok a:hover { border-color: var(--himbeer-25); transform: translateY(-1px); }
.r-dok-titel { font: 500 1.16rem/1.3 var(--font-accent); color: var(--grau); }
.r-dok-text { font-size: .95rem; color: var(--text-mute); line-height: 1.55; }
.r-dok-stand { font: 700 .7rem/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--himbeer); margin-top: 4px; }
.r-text .r-dok { margin: 0; padding: 0; }

/* Fuß */
.r-fuss { padding: 40px 0 52px; border-top: 1px solid var(--linie); background: var(--weiss); font-size: .92rem; color: var(--text-mute); }
.r-fuss .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.r-fuss-marke { display: grid; gap: 12px; justify-items: start; }
.r-fuss .marke img { height: 26px; }
.r-fuss-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.r-fuss-nav a { color: var(--grau); text-decoration: none; }
.r-fuss-nav a:hover, .r-fuss-nav a[aria-current="page"] { color: var(--himbeer); text-decoration: underline; text-underline-offset: 3px; }
.r-fuss-nav a:focus-visible { outline: 3px solid var(--himbeer-25); outline-offset: 2px; border-radius: 3px; }
@media (min-width: 900px) {
  .r-fuss .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); align-items: start; gap: 40px; }
  .r-fuss-nav { justify-content: flex-end; }
}

/* Schmal */
@media (max-width: 720px) {
  .r-text .abs { padding-left: 2.1em; }
  .r-text .abs-liste { margin-left: 2.1em; }
}

/* Druck */
@media print {
  .kopfzeile, .sprung, .r-toc, .r-fuss-nav { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .r-seite { padding: 0; }
  .r-raster { display: block; }
  .r-text > *, .r-einleitung > * { max-width: none; }
  .r-text a { color: inherit; text-decoration: none; }
  .r-text h2 { break-after: avoid; border-top: 0; padding-top: 0; }
  .r-tabelle { border: 1px solid #999; overflow: visible; }
  .r-tabelle.stapel table { min-width: 0; }
  .r-tabelle tr { break-inside: avoid; }
  .r-fuss { border: 0; padding: 12pt 0 0; background: none; }
}
