@charset "UTF-8";

/* Nur die drei freigegebenen Rechtstexte. Markenfarben aus Design 05. */
.public-content .rechtstext-entwurf {
  display: inline-block;
  margin: 0 0 24px;
  padding: 8px 12px;
  background: var(--gc-accent);
  color: var(--gc-ink);
  font-weight: 600;
  line-height: 1.5;
}

.public-content .rechtstext-offen {
  display: inline;
  padding: 0.08em 0.25em;
  border-radius: 3px;
  background: var(--gc-accent);
  color: var(--gc-ink);
  font-size: 0.875em;
  line-height: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  overflow-wrap: anywhere;
}

.public-content .rechtstext-prose table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.65;
}

.public-content .rechtstext-prose :is(th, td) {
  padding: 10px 8px;
  border-bottom: 1px solid var(--gc-line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.public-content .rechtstext-prose th {
  background: var(--gc-canvas-2);
  color: var(--gc-ink);
}

.public-content .rechtstext-stand {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--gc-line);
  color: var(--gc-ink);
  font-weight: 600;
}

/* Lesen im Seitencontainer: Navigation zuerst, Text mit ruhigem Zeilenmaß. */
.public-content .rechtstext-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  max-width: none;
}

.public-content .rechtstext-layout > .rechtstext-prose {
  --content-copy: 78ch;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.public-content .rechtstext-prose :is(h2, h3),
.public-content .rechtstext-prose :is(h2, h3):target,
.public-content #rechtstext-title {
  scroll-margin-top: 24px;
}

.rechtstext-navigation { min-width: 0; }
.rechtstext-navigation__desktop { display: none; }
.rechtstext-navigation__mobil {
  border-block: 1px solid var(--gc-line);
}
.rechtstext-navigation__mobil summary {
  min-height: 44px;
  padding: 12px;
  color: var(--gc-ink);
  font-weight: 600;
  cursor: pointer;
}
.rechtstext-navigation__titel {
  margin: 0 0 12px;
  color: var(--gc-ink);
  font-weight: 600;
}
.rechtstext-inhalt ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rechtstext-inhalt a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--gc-ink);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.rechtstext-inhalt__unterpunkt a { padding-left: 24px; }
.rechtstext-inhalt--aktiv .rechtstext-inhalt__gruppe:not(.rechtstext-inhalt__gruppe--aktuell) > ul {
  display: none;
}
.rechtstext-inhalt__gruppe--aktuell > a { font-weight: 600; }
.rechtstext-inhalt a:hover { text-decoration: underline; }
.rechtstext-inhalt a[aria-current="location"] {
  background: var(--gc-accent);
  font-weight: 600;
}
/* Auch nach Zeigerbedienung und programmgesteuertem Fokus sichtbar. */
.rechtstext-inhalt a:focus,
.rechtstext-navigation summary:focus,
.rechtstext-tabelle:focus,
.rechtstext-nach-oben:focus {
  outline: 3px solid var(--gc-ink);
  outline-offset: 3px;
}
/* Innenliegende Ringe werden von den Scrollcontainern nicht abgeschnitten. */
.rechtstext-inhalt a:focus,
.rechtstext-navigation summary:focus,
.rechtstext-tabelle:focus {
  outline-offset: -3px;
}
/* Der Knopf liegt fest über hellem Text und über dem dunklen Fuß: heller Innenring
   plus dunkler Außenring, einer von beiden hebt sich immer ab (vorher 2:1 am Fuß). */
.rechtstext-nach-oben:focus { box-shadow: 0 0 0 3px var(--gc-canvas); }
.rechtstext-inhalt { padding: 4px; }
.public-content .rechtstext-prose .rechtstext-tabelle {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 24px;
  padding: 4px;
}
.public-content .rechtstext-tabelle table {
  min-width: 640px;
  max-width: none;
  margin-top: 0;
}
.rechtstext-nach-oben {
  position: fixed;
  right: var(--gc-gutter);
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  background: var(--gc-ink);
  color: var(--gc-canvas);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.rechtstext-nach-oben[hidden] { display: none; }

@media (min-width: 1024px) {
  .public-content .rechtstext-layout {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }
  .rechtstext-navigation {
    position: sticky;
    top: calc(var(--kopf-h) + 24px);
    max-height: calc(100dvh - var(--kopf-h) - 48px);
    overflow-y: auto;
    scrollbar-color: var(--gc-ink) var(--gc-canvas);
  }
  .rechtstext-navigation__desktop { display: block; }
  .rechtstext-navigation__mobil { display: none; }
}

/* Die mobile Schnellnavigation belegt 80px plus sicheren unteren Rand. */
@media (max-width: 767px) {
  .rechtstext-nach-oben {
    bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

@media print {
  .rechtstext-navigation,
  .rechtstext-nach-oben { display: none !important; }
  .public-content .rechtstext-layout { display: block; }
  .public-content .rechtstext-layout > .rechtstext-prose,
  .public-content .rechtstext-prose :is(p, ul, ol, table) { max-width: none; }
  .public-content .rechtstext-prose .rechtstext-tabelle { overflow: visible; }
  .public-content .rechtstext-tabelle table { min-width: 0; }
}
