/* ===========================================================================
   Online-Benutzerdoku.
   Setzt auf gestaltung.css auf — Farben, Schriften und Kanten kommen von dort.
   Hier steht nur, was diese Seite zusätzlich braucht: das Gerüst aus
   Seitenleiste und Text, die Suche und die Merkkästen.
   =========================================================================== */

.dokuseite { display: grid; grid-template-columns: 268px minmax(0, 1fr); align-items: start; }

/* --- Seitenleiste -------------------------------------------------------- */
.dokunav {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--linie); padding: 26px 18px 60px;
  background: var(--grund);
}
.dokunav h2 {
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--leise); margin: 22px 0 8px 8px; font-weight: 700;
}
.dokunav h2:first-of-type { margin-top: 0; }
.dokunav a {
  display: block; padding: 6px 10px; color: var(--text); text-decoration: none;
  font-size: 14.5px; line-height: 1.4; border-left: 2px solid transparent;
}
.dokunav a:hover { background: var(--flaeche); color: var(--blau); }
.dokunav a.hier { border-left-color: var(--blau); color: var(--blau); font-weight: 600; background: var(--flaeche); }

/* --- Suche --------------------------------------------------------------- */
.dokusuche { position: relative; margin-bottom: 18px; }
.dokusuche input {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 14.5px;
  border: 1px solid var(--linie); border-radius: var(--rund);
  background: var(--flaeche); color: var(--text);
}
.dokusuche input:focus { outline: 2px solid var(--blau); outline-offset: 1px; border-color: var(--blau); }
.dokutreffer { font-size: 12.5px; color: var(--leise); margin: 6px 0 0 2px; }

/* --- Text ---------------------------------------------------------------- */
.dokutext { padding: 40px 44px 120px; max-width: 78ch; }
.dokutext h1 { margin: 0 0 10px; }
.dokutext .stand { color: var(--leise); font-size: 14px; margin: 0 0 30px; }
.dokutext h2 {
  margin: 46px 0 14px; padding-top: 10px; scroll-margin-top: 16px;
  border-top: 1px solid var(--linie-zart);
}
.dokutext h2:first-of-type { border-top: 0; margin-top: 30px; }
.dokutext h3 { margin: 26px 0 8px; scroll-margin-top: 16px; }
.dokutext p, .dokutext li { line-height: 1.68; }
.dokutext ul, .dokutext ol { padding-left: 22px; }
.dokutext li { margin-bottom: 6px; }
.dokutext table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.dokutext th {
  text-align: left; padding: 9px 12px; background: var(--flaeche);
  border-bottom: 1px solid var(--linie); font-size: 12px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--leise);
}
.dokutext td { padding: 9px 12px; border-bottom: 1px solid var(--linie-zart); vertical-align: top; }
.dokutext .tabellenrahmen { overflow-x: auto; }

/* --- Merkkästen ---------------------------------------------------------- */
.merk {
  margin: 20px 0; padding: 14px 16px; background: var(--flaeche);
  border-left: 3px solid var(--tuerkis); border-radius: 0 var(--rund) var(--rund) 0;
}
.merk.achtung { border-left-color: var(--warn); }
.merk.gut { border-left-color: var(--gut); }
.merk p:last-child { margin-bottom: 0; }
.merk b { color: var(--text); }

/* --- Schritte ------------------------------------------------------------ */
.schritte { counter-reset: schritt; list-style: none; padding-left: 0; }
.schritte > li {
  counter-increment: schritt; position: relative;
  padding-left: 42px; margin-bottom: 14px;
}
.schritte > li::before {
  content: counter(schritt); position: absolute; left: 0; top: -1px;
  width: 27px; height: 27px; display: grid; place-items: center;
  background: var(--blau); color: #fff; border-radius: 50%;
  font-size: 14px; font-weight: 700;
}

/* --- Kopfzeile mit Sprung zum Menü (schmal) ------------------------------ */
.dokukopf { display: none; }

@media (max-width: 900px) {
  .dokuseite { grid-template-columns: minmax(0, 1fr); }
  .dokunav {
    position: static; height: auto; border-right: 0;
    border-bottom: 1px solid var(--linie); display: none; padding: 18px;
  }
  .dokunav.offen { display: block; }
  .dokukopf {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-bottom: 1px solid var(--linie);
    position: sticky; top: 0; background: var(--grund); z-index: 5;
  }
  .dokukopf button {
    font: inherit; font-size: 14px; padding: 7px 13px; cursor: pointer;
    border: 1px solid var(--linie); border-radius: var(--rund);
    background: var(--flaeche); color: var(--text);
  }
  .dokutext { padding: 26px 18px 90px; }
  .dokutext .tabellenrahmen { margin: 0 -18px; padding: 0 18px; }
}

@media print {
  .dokunav, .dokukopf, header.leiste { display: none; }
  .dokuseite { display: block; }
  .dokutext { max-width: none; padding: 0; }
  .dokutext h2 { page-break-after: avoid; }
}
