/* Wissensdatenbank: ein Stylesheet, keine fremden Quellen, hell und dunkel. */
:root {
  color-scheme: light dark;
  --grund: #ffffff;
  --flaeche: #f4f5f7;
  --text: #1b1f24;
  --neben: #55606e;
  --linie: #c9cfd6;
  --akzent: #1f4e79;
  --akzent-text: #ffffff;
  --link: #1a4f8a;
  --ok-grund: #e6f4ea;
  --ok-text: #14532d;
  --warn-grund: #fff4d6;
  --warn-text: #5c3d00;
  --fehler-grund: #fde8e8;
  --fehler-text: #7f1d1d;
  --heikel: #a61b1b;
  --breite: 62rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #14171b;
    --flaeche: #1e2329;
    --text: #e6e9ed;
    --neben: #a3adb9;
    --linie: #3a424c;
    --akzent: #8fbde8;
    --akzent-text: #0e1114;
    --link: #9cc7f0;
    --ok-grund: #173322;
    --ok-text: #b7e4c7;
    --warn-grund: #3d3010;
    --warn-text: #ffe08a;
    --fehler-grund: #44191b;
    --fehler-text: #ffc9c9;
    --heikel: #ff9b9b;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 1.2rem 0 0.3rem; }
p, ul, ol, dl, table, fieldset { margin: 0 0 1rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; overflow-wrap: anywhere; }

.unsichtbar {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.sprung { position: absolute; left: -999rem; top: 0; background: var(--akzent); color: var(--akzent-text); padding: 0.6rem 1rem; z-index: 10; }
.sprung:focus { left: 0; }

.kopf { border-bottom: 1px solid var(--linie); background: var(--flaeche); }
.kopf-innen, .haupt ul, main, .fuss { max-width: var(--breite); margin-inline: auto; padding-inline: 1rem; }
.kopf-innen { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between; padding-block: 0.8rem; }
.marke { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.suchfeld { display: flex; gap: 0.4rem; flex: 1 1 16rem; max-width: 26rem; }
.suchfeld input { flex: 1; min-width: 0; }
.haupt ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; align-items: center; padding-block: 0 0.5rem; margin-block: 0; }
.haupt a, .haupt button { display: inline-block; padding: 0.45rem 0; }
.haupt a[aria-current="page"] { font-weight: 700; text-decoration-thickness: 2px; }
.haupt .rechts { margin-left: auto; }
.haupt form { margin: 0; }

main { padding-block: 1.5rem 3rem; }
.fuss { color: var(--neben); font-size: 0.85rem; padding-block: 1rem 2rem; border-top: 1px solid var(--linie); }
.schmal { max-width: 28rem; }
.neben, .hilfe { color: var(--neben); font-size: 0.92rem; }
.hilfe { margin: 0.25rem 0 0; }
.einleitung { font-size: 1.08rem; }
.pfad { font-size: 0.92rem; color: var(--neben); margin-bottom: 0.6rem; }
.art { display: inline-block; font-size: 0.78rem; font-weight: 400; color: var(--neben); border: 1px solid var(--linie); border-radius: 999px; padding: 0 0.5rem; vertical-align: middle; }
.wert { font-weight: 700; }
.wert.gross { font-size: 1.6rem; }

.meldung { border: 1px solid var(--linie); border-left-width: 0.35rem; border-radius: 4px; padding: 0.6rem 0.9rem; background: var(--flaeche); }
.meldung.ok { background: var(--ok-grund); color: var(--ok-text); border-color: var(--ok-text); }
.meldung.warnung { background: var(--warn-grund); color: var(--warn-text); border-color: var(--warn-text); }
.meldung.fehler { background: var(--fehler-grund); color: var(--fehler-text); border-color: var(--fehler-text); }
.meldung a { color: inherit; }
.meldung.klein { font-size: 0.9rem; padding: 0.3rem 0.6rem; }

label, legend { font-weight: 600; }
.feld { display: flex; flex-direction: column; gap: 0.25rem; }
.stapel { display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; margin-bottom: 1rem; }
.stapel .feld, .stapel input:not([type="checkbox"]):not([type="radio"]), .stapel select { width: 100%; }
.reihe { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; margin-bottom: 1rem; }
.reihe form { margin: 0; }
input, select, button { font: inherit; color: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select {
  background: var(--grund); border: 1px solid var(--neben); border-radius: 4px; padding: 0.5rem 0.6rem; min-height: 2.75rem; max-width: 100%;
}
button { background: var(--akzent); color: var(--akzent-text); border: 1px solid var(--akzent); border-radius: 4px; padding: 0.5rem 1rem; min-height: 2.75rem; font-weight: 600; cursor: pointer; }
button:hover { filter: brightness(1.1); }
button.schlicht { background: none; border: none; color: var(--link); text-decoration: underline; padding-inline: 0; font-weight: 400; min-height: 0; }
button.heikel { background: none; color: var(--heikel); border-color: var(--heikel); }
fieldset { border: 1px solid var(--linie); border-radius: 4px; padding: 0.6rem 0.9rem; min-width: 0; }
.wahl { display: block; font-weight: 400; padding: 0.3rem 0; }
.wahl input { width: 1.1rem; height: 1.1rem; margin-right: 0.4rem; vertical-align: -0.15rem; }
details { margin-bottom: 0.4rem; }
summary { cursor: pointer; color: var(--link); padding: 0.2rem 0; }
details .stapel { margin-top: 0.5rem; }

.kacheln { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.kacheln li, .karte { border: 1px solid var(--linie); border-radius: 6px; padding: 0.9rem 1rem; background: var(--flaeche); }
.kacheln h2, .karte h2 { margin-top: 0; }
.kacheln p:last-child { margin-bottom: 0; }
.karte { margin-bottom: 1rem; }
.liste { list-style: none; padding: 0; }
.liste > li { padding: 0.55rem 0; border-bottom: 1px solid var(--linie); }
.liste > li.reihe { margin-bottom: 0; justify-content: space-between; }
.treffer { padding-left: 1.4rem; }
.treffer li { margin-bottom: 1.4rem; }
.treffer h3 { margin-top: 0; }
.quelle { color: var(--neben); font-size: 0.88rem; }
.unter ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; border-bottom: 1px solid var(--linie); padding-bottom: 0.5rem; }

.tabelle { overflow-x: auto; margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.7rem 0.5rem 0; border-bottom: 1px solid var(--linie); }
thead th { font-size: 0.88rem; color: var(--neben); white-space: nowrap; }
tbody th { font-weight: 600; }
tr.hervor td { background: var(--warn-grund); color: var(--warn-text); }

.kopfdaten { border-top: 1px solid var(--linie); margin-top: 2rem; }
.kopfdaten dl, .kopfdaten-liste { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0.3rem 1.2rem; }
.kopfdaten dt, .kopfdaten-liste dt { color: var(--neben); }
dd { margin: 0; }
dd ul { margin: 0; padding-left: 1.1rem; }
.herkunft { color: var(--neben); font-size: 0.92rem; }
.eintrag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; padding: 0.8rem 1rem; }
.eintrag dt { color: var(--neben); font-size: 0.92rem; }

.text { max-width: 44rem; overflow-wrap: break-word; }
.text h1 { font-size: 1.35rem; margin-top: 1.6rem; }
.text h2 { font-size: 1.2rem; }
.text table { width: auto; display: block; overflow-x: auto; }
.text th, .text td { padding-right: 1.2rem; }
.text blockquote { margin: 0 0 1rem; padding-left: 1rem; border-left: 0.25rem solid var(--linie); color: var(--neben); }
.text pre { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 4px; padding: 0.7rem; overflow-x: auto; }

@media (max-width: 36rem) {
  h1 { font-size: 1.4rem; }
  .haupt .rechts { margin-left: 0; }
  .kopfdaten dl, .kopfdaten-liste { grid-template-columns: 1fr; gap: 0; }
  .kopfdaten dd, .kopfdaten-liste dd { margin-bottom: 0.5rem; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .kopf, .fuss, .sprung { display: none; } }

/* Ein Wert zum Abschreiben: Zugriffstoken, Adresse des MCP-Servers. */
code.geheim { display: block; padding: 0.5rem 0.7rem; overflow-wrap: anywhere; user-select: all; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 4px; color: var(--text, inherit); }

/* Bearbeiten */
textarea { font: inherit; color: inherit; background: var(--grund); border: 1px solid var(--neben); border-radius: 4px; padding: 0.5rem 0.6rem; width: 100%; max-width: 100%; resize: vertical; }
textarea.schreibfeld { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95rem; line-height: 1.5; min-height: 8rem; }
input[type="date"] { background: var(--grund); border: 1px solid var(--neben); border-radius: 4px; padding: 0.5rem 0.6rem; min-height: 2.75rem; }
.stapel.breit { align-items: stretch; }
.stapel.breit .reihe { margin-bottom: 0; }
button.zweit { background: var(--grund); color: var(--text); border-color: var(--neben); }
a.knopf { display: inline-block; background: var(--akzent); color: var(--akzent-text); border: 1px solid var(--akzent); border-radius: 4px; padding: 0.5rem 1rem; font-weight: 600; text-decoration: none; }
a.knopf:hover { filter: brightness(1.1); }
.auswahl { list-style: none; padding: 0; }
.auswahl li { border: 1px solid var(--linie); border-radius: 4px; padding: 0.6rem 0.9rem; margin-bottom: 0.5rem; }
.auswahl a { font-weight: 600; }
.vorschau-kopf { font-size: 1.4rem; margin-top: 0.4rem; }
.nebeneinander { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.nebeneinander > div { border: 1px solid var(--linie); border-radius: 4px; padding: 0.5rem 0.8rem; background: var(--grund); }
.nebeneinander h4 { margin: 0 0 0.3rem; font-size: 0.92rem; color: var(--neben); }
.nebeneinander p { margin: 0; }
.umbruch { white-space: pre-wrap; overflow-wrap: anywhere; }
.fundstelle { margin-bottom: 1rem; }
.fundstelle h3 { margin-top: 0; }
.vergleich { border: 1px solid var(--linie); border-radius: 4px; padding: 0.5rem 0; margin-bottom: 1rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; overflow-x: auto; }
.vergleich del, .vergleich ins, .vergleich .gleich { display: block; white-space: pre-wrap; overflow-wrap: anywhere; padding: 0 0.6rem; text-decoration: none; }
.vergleich del { background: var(--fehler-grund); color: var(--fehler-text); }
.vergleich ins { background: var(--ok-grund); color: var(--ok-text); }
.vergleich .zeichen { display: inline-block; width: 1.2rem; font-weight: 700; }
table.eingabe input[type="text"] { min-height: 2.2rem; padding: 0.3rem 0.4rem; width: 100%; min-width: 5rem; }
table.eingabe input[type="checkbox"] { width: 1.2rem; height: 1.2rem; }
