/* Stylesheet aus der Vorversion (site/assets/app.css), ergänzt um Klassen für die Python-Version. */
:root {
  --akzent: #6b4fa0;
  --akzent-dunkel: #523b7d;
  --akzent-hell: #efe9f7;
  --text: #2a2533;
  --text-leise: #6a6475;
  --grund: #faf8f5;
  --flaeche: #ffffff;
  --linie: #e6e1ea;
  --ok: #2f7a4f; --ok-hell: #e3f2e9;
  --warn: #9a6200; --warn-hell: #fbefd9;
  --bad: #a3343a; --bad-hell: #f8e1e2;
  --draft: #5d6470; --draft-hell: #eceef1;
  --radius: 12px;
  --schatten: 0 1px 2px rgba(40, 30, 60, .06), 0 4px 16px rgba(40, 30, 60, .05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--grund);
}
@media (prefers-color-scheme: dark) {
  :root {
    --akzent: #b39ddb; --akzent-dunkel: #cdbbec; --akzent-hell: #2e2640;
    --text: #ece8f2; --text-leise: #a9a2b5; --grund: #17151b; --flaeche: #211e27; --linie: #36313f;
    --ok: #7cc79b; --ok-hell: #1e3328; --warn: #e6b45c; --warn-hell: #3a2f1a;
    --bad: #ef8f95; --bad-hell: #3b2023; --draft: #b4bac4; --draft-hell: #2b2d33;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); line-height: 1.55; font-size: 16.5px; }
a { color: var(--akzent); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: .2em 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin: 1.8em 0 .6em; }
h3 { font-size: 1.05rem; margin: .3em 0; }
main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }
code { background: var(--akzent-hell); padding: 1px 5px; border-radius: 4px; font-size: .9em; }

.kopf { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 10; }
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; }
.marke small { display: block; color: var(--text-leise); font-size: .78rem; }
.logo { width: 34px; height: 34px; border-radius: 50%; background: var(--akzent); position: relative; flex: none; }
.logo::before { content: ""; position: absolute; left: 12px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.logo::after { content: ""; position: absolute; left: 8px; top: 18px; width: 18px; height: 9px; border: 2.5px solid #fff; border-bottom: 0; border-radius: 10px 10px 0 0; }
.kopf nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kopf nav a { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.kopf nav a:hover { background: var(--akzent-hell); }
.kopf nav a[aria-current] { background: var(--akzent-hell); color: var(--akzent-dunkel); font-weight: 600; }
.kopf nav a.abmelden { color: var(--text-leise); }
.kopf nav a.knopf { color: #fff; }
.menu-knopf { display: none; background: none; border: 1px solid var(--linie); border-radius: 8px; font-size: 1.2rem; padding: 4px 10px; color: var(--text); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--akzent); color: #fff; font-size: .75rem; text-align: center; margin-left: 4px; }
@media (max-width: 860px) {
  .menu-knopf { display: block; }
  .kopf { flex-wrap: wrap; }
  .kopf nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  body.menu-offen .kopf nav { display: flex; }
}

.knopf { display: inline-flex; align-items: center; gap: 6px; background: var(--akzent); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none; font-family: inherit; }
.knopf:hover { background: var(--akzent-dunkel); }
.knopf.zweit { background: var(--flaeche); color: var(--akzent-dunkel); border: 1px solid var(--linie); }
.knopf.zweit:hover { background: var(--akzent-hell); }
.knopf.gefahr { background: var(--flaeche); color: var(--bad); border: 1px solid var(--bad); }
.knopf.ok { background: var(--ok); }
.knopf.klein { padding: 6px 12px; font-size: .88rem; }
.knopf[disabled] { opacity: .5; cursor: wait; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

.held { padding: 24px 0 8px; }
.held p { color: var(--text-leise); font-size: 1.1rem; margin-top: 0; }
.suche-gross form { display: flex; gap: 8px; max-width: 640px; }
.suche-gross input, .filter input, .filter select, .formular input, .formular select, .formular textarea, .editor textarea, textarea {
  font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }

.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 24px 0; }
.zahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); box-shadow: var(--schatten); }
.zahl strong { display: block; font-size: 2rem; line-height: 1; }
.zahl span { color: var(--text-leise); font-size: .9rem; }
.zahl.ok strong { color: var(--ok); } .zahl.warn strong { color: var(--warn); } .zahl.draft strong { color: var(--draft); } .zahl.neu strong { color: var(--akzent); }

.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kachel { border-radius: var(--radius); padding: 18px 16px; text-decoration: none; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-left: 5px solid var(--f); box-shadow: var(--schatten); }
.kachel strong { display: block; overflow-wrap: anywhere; hyphens: auto; }
.kachel span { color: var(--text-leise); font-size: .88rem; }
.kachel:hover { transform: translateY(-1px); }

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.karte { display: block; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); box-shadow: var(--schatten); }
.karte:hover { border-color: var(--akzent); }
.karte p { color: var(--text-leise); margin: .3em 0 .6em; font-size: .94rem; }
.karte-kopf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.typ { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-leise); font-weight: 600; }
.meta { font-size: .82rem; color: var(--text-leise); margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent-dunkel); text-decoration: none; white-space: nowrap; }
.chip.bereich { background: color-mix(in srgb, var(--f) 14%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--f) 40%, transparent); }
.status-ok { background: var(--ok-hell); color: var(--ok); } .status-warn { background: var(--warn-hell); color: var(--warn); }
.status-bad { background: var(--bad-hell); color: var(--bad); } .status-draft { background: var(--draft-hell); color: var(--draft); }
.chip.evidenz { background: transparent; border: 1px solid var(--linie); color: var(--text-leise); }

.filter { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
@media (max-width: 760px) { .filter { grid-template-columns: 1fr; } }
.treffer { color: var(--text-leise); font-size: .9rem; }
.leer, .laedt { color: var(--text-leise); }

.artikel { max-width: 820px; }
.brotkrumen { font-size: .88rem; color: var(--text-leise); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lead { font-size: 1.12rem; color: var(--text-leise); }
.eckdaten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.eckdaten div { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 8px 12px; }
.eckdaten dt { font-size: .75rem; color: var(--text-leise); text-transform: uppercase; letter-spacing: .04em; }
.eckdaten dd { margin: 0; font-weight: 600; }
@media (max-width: 600px) { .eckdaten { grid-template-columns: 1fr 1fr; } }
.text { font-size: 1.04rem; }
.text h2 { border-bottom: 1px solid var(--linie); padding-bottom: 4px; }
.text blockquote { margin: 1em 0; padding: 10px 16px; background: var(--akzent-hell); border-left: 4px solid var(--akzent); border-radius: 0 8px 8px 0; }
.text table, .historie table, .qm-tabelle { border-collapse: collapse; width: 100%; font-size: .92rem; background: var(--flaeche); }
.text th, .text td, .historie th, .historie td, .qm-tabelle th, .qm-tabelle td { border: 1px solid var(--linie); padding: 6px 10px; text-align: left; vertical-align: top; }
.qm-tabelle { display: block; overflow-x: auto; }
.zitat a { text-decoration: none; font-size: .8em; }
.zitat.fehlt { color: var(--bad); }
.quellen { padding-left: 0; list-style: none; }
.quellen li { margin-bottom: 8px; }
.quellen .nr { color: var(--text-leise); }
.quelle-meta { display: block; font-size: .84rem; color: var(--text-leise); margin-left: 28px; }
.keywords { display: flex; flex-wrap: wrap; gap: 6px; }

.hinweis { background: var(--akzent-hell); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.hinweis.warn { background: var(--warn-hell); }
.hinweis.ok { background: var(--ok-hell); }
.hinweis.fehler { background: var(--bad-hell); }
.hinweis ul { margin: 4px 0 0; }

.formular { display: grid; gap: 14px; max-width: 760px; }
.formular label { display: grid; gap: 4px; font-weight: 600; }
.formular small { font-weight: 400; color: var(--text-leise); }
.formular fieldset { border: 1px solid var(--linie); border-radius: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
label.check { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
label.check input { width: auto; }
.wahl { display: flex; gap: 8px; flex-wrap: wrap; }
.hilfe { font-size: .9rem; color: var(--text-leise); }
.hilfe-box { margin-top: 16px; font-size: .9rem; color: var(--text-leise); }

.editor textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; min-height: 60vh; line-height: 1.5; }
.editor .leiste { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.editor .leiste input { flex: 1; min-width: 200px; }

.vorschlag-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--schatten); display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.vorschlag-karte h3 { margin: 0 0 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin: 16px 0; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; color: var(--text-leise); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--akzent-dunkel); border-bottom-color: var(--akzent); font-weight: 600; }
.diff { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.diff div { padding: 1px 10px; }
.diff .plus { background: var(--ok-hell); } .diff .minus { background: var(--bad-hell); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.diff .info { color: var(--text-leise); background: var(--akzent-hell); }
.entscheidung { position: sticky; bottom: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px; margin-top: 24px; box-shadow: 0 -4px 20px rgba(0, 0, 0, .06); display: grid; gap: 10px; }

.fuss { text-align: center; color: var(--text-leise); font-size: .82rem; padding: 24px 16px; }

.login { max-width: 380px; margin: 12vh auto; background: var(--flaeche); padding: 28px; border-radius: 16px; border: 1px solid var(--linie); box-shadow: var(--schatten); }

@media print {
  .kopf, .aktionen, .fuss, .verwandt, .menu-knopf, .hilfe-box { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .karte, .eckdaten div { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}

/* ── Themen-Beiträge nach dem Vorbild „Wissensspeicher #1“ ─────────────────── */
.byline { color: var(--text-leise); margin: -.3em 0 .8em; font-size: .95rem; }
.karte h3 .nummer, .artikel h1 .nummer { color: var(--akzent); font-weight: 700; }
.auf-einen-blick { background: var(--akzent-hell); border: 1px solid var(--linie); border-left: 5px solid var(--akzent); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.auf-einen-blick h2 { margin: 0 0 .4em; font-size: 1.15rem; color: var(--akzent-dunkel); }
.auf-einen-blick .kern { font-weight: 600; margin: 0 0 .6em; }
.auf-einen-blick ul { margin: 0; padding-left: 1.1em; }
.auf-einen-blick li { margin: .3em 0; }
.aufbau { color: var(--text-leise); font-size: .95rem; }
.inhalt { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px 20px; margin: 16px 0 24px; }
.inhalt ol { margin: .4em 0 0; padding-left: 1.4em; columns: 2 260px; column-gap: 32px; }
.inhalt li { margin: .15em 0; break-inside: avoid; }
.inhalt a { text-decoration: none; }
.inhalt a:hover { text-decoration: underline; }
.text h2, .text h3, #quellen { scroll-margin-top: 80px; }
.text table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.text td, .text th { min-width: 120px; }
.text th { background: var(--akzent-hell); }
.text img { max-width: 100%; height: auto; display: block; margin: 12px auto 4px; border-radius: 8px; background: #fff; border: 1px solid var(--linie); }
.text img + em, .text p > em:only-child { display: block; text-align: center; color: var(--text-leise); font-size: .9rem; }
.text ul:has(input[type=checkbox]) { list-style: none; padding-left: .3em; }
.text input[type=checkbox] { margin-right: .5em; transform: translateY(1px); }
.quellen-abschnitt .stand { color: var(--text-leise); font-size: .93rem; }
.quellen-gruppe { font-size: .98rem; margin: 1.2em 0 .3em; }
@media print {
  .inhalt ol { columns: 1; }
  .text table { display: table; }
  .auf-einen-blick { break-inside: avoid; }
}
.historie, .qm-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.historie table { min-width: 480px; }
.text h3 { margin-top: 1.4em; }

/* ---- Ergänzungen Python-Version ---- */
/* Bereichsfarben als Klassen (Content-Security-Policy erlaubt keine style-Attribute) */
.b-kinderwunsch { --f: #8a6fb0; } .b-schwangerschaft { --f: #6b4fa0; } .b-geburt { --f: #a0507a; }
.b-wochenbett { --f: #3f7f8c; } .b-stillzeit { --f: #5b8c4f; } .b-kurse { --f: #b07a2f; } .b-allgemein { --f: #6b6b6b; }
.kopf nav form.abmelden { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--text-leise); cursor: pointer; text-decoration: underline; }
.aktionen form { display: inline; }
.diff .gleich { color: var(--text-leise); }
span.plus { color: var(--ok); } span.minus { color: var(--bad); }
li.aufgabe { list-style: none; margin-left: -1.2em; }
.kaestchen { display: inline-block; width: 1.2em; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.45; }
.hinweis.info { border-left: 4px solid var(--akzent); }
.einrichtung-karte, .karte.schmal { max-width: 28rem; margin-inline: auto; }
section.karte { margin: 16px 0; }
.schmal { max-width: 28rem; margin-inline: auto; }
