/* Privatbüro – ruhig, klar, dunkle Akzente. Keine externen Ressourcen. */
:root {
  --grund: #f4f3ef;
  --flaeche: #ffffff;
  --flaeche-2: #f8f7f4;
  --text: #1d2126;
  --text-2: #5b626b;
  --linie: #e1ded7;
  --akzent: #1f2a37;
  --akzent-text: #ffffff;
  --link: #24508a;
  --gut: #1f7a4d;
  --gut-bg: #e3f3ea;
  --warn: #8a5a00;
  --warn-bg: #fbf0d9;
  --schlecht: #a12c2c;
  --schlecht-bg: #f9e3e1;
  --neutral-bg: #eceae4;
  --demo: #6b3fa0;
  --demo-bg: #efe6fa;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(20, 24, 30, .06), 0 2px 8px rgba(20, 24, 30, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #121418;
    --flaeche: #1a1d22;
    --flaeche-2: #20242a;
    --text: #e7e9ec;
    --text-2: #a2a9b2;
    --linie: #2d3239;
    --akzent: #d9dee5;
    --akzent-text: #121418;
    --link: #8db4ea;
    --gut: #6cd09b;
    --gut-bg: #183324;
    --warn: #f0c46b;
    --warn-bg: #3a2e14;
    --schlecht: #f29a92;
    --schlecht-bg: #3d1d1b;
    --neutral-bg: #2a2f36;
    --demo: #c9a6f2;
    --demo-bg: #2f2340;
    --schatten: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .8rem; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; color: var(--text-2); text-transform: none; }
h4 { font-size: .9rem; margin: .8rem 0 .3rem; }
code { font-size: .85em; background: var(--flaeche-2); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }

.kopf { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; padding: .55rem 1rem; background: var(--akzent); color: var(--akzent-text); }
.marke { font-weight: 650; color: inherit; text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.nav { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: inherit; opacity: .78; text-decoration: none; padding: .35rem .6rem; border-radius: 6px; white-space: nowrap; font-size: .92rem; }
.nav a:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.nav a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, .16); }
@media (prefers-color-scheme: dark) { .nav a:hover { background: rgba(0, 0, 0, .08); } .nav a[aria-current="page"] { background: rgba(0, 0, 0, .14); } }
.abmelden button { color: inherit; border-color: transparent; opacity: .8; }

.haupt { max-width: 1240px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; box-shadow: var(--schatten); min-width: 0; }
.karte.schmal { max-width: 440px; margin: 2rem auto; }
.raster { display: grid; gap: 1rem; }
.raster-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.raster-dok { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
@media (max-width: 900px) { .raster-dok { grid-template-columns: minmax(0, 1fr); } }
.raster > .karte { margin-bottom: 0; }
.raster + .raster, .raster + .karte, .karte + .raster { margin-top: 1rem; }
.titelzeile { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.titelzeile h1, .titelzeile h2 { margin: 0; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { padding: .45rem 0; border-bottom: 1px solid var(--linie); overflow-wrap: anywhere; }
.liste li:last-child { border-bottom: 0; }
.liste li.erledigt { opacity: .55; }
.neben { color: var(--text-2); font-size: .88em; }
.leer { color: var(--text-2); font-style: italic; margin: .3rem 0; }

.badge { display: inline-block; font-size: .75rem; line-height: 1.5; padding: 0 .45rem; border-radius: 999px; background: var(--neutral-bg); color: var(--text-2); white-space: nowrap; vertical-align: 1px; }
.badge-gut { background: var(--gut-bg); color: var(--gut); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-schlecht { background: var(--schlecht-bg); color: var(--schlecht); }
.badge-demo { background: var(--demo-bg); color: var(--demo); font-weight: 600; }
.badge-k-claude { background: var(--neutral-bg); color: var(--text); }
.badge-k-manuell_chatgpt { background: var(--demo-bg); color: var(--demo); }
.badge-k-manuell_anbieter { background: var(--warn-bg); color: var(--warn); }
.badge-k-entscheidung { background: #e2ecfa; color: #24508a; }
.badge-k-blockiert { background: var(--schlecht-bg); color: var(--schlecht); }
@media (prefers-color-scheme: dark) { .badge-k-entscheidung { background: #1d2b40; color: #8db4ea; } }

.meldung { padding: .6rem .8rem; border-radius: 8px; margin: .5rem 0 1rem; background: var(--gut-bg); color: var(--gut); }
.meldung-warn { background: var(--warn-bg); color: var(--warn); }
.meldung-schlecht { background: var(--schlecht-bg); color: var(--schlecht); }
.warnkasten { border-color: var(--warn); background: var(--warn-bg); padding: .6rem .9rem; border-radius: 8px; margin-top: 1rem; }
.warnkasten h3 { color: var(--warn); margin-top: 0; }

.kennzahlen { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-bottom: 1rem; }
.kennzahl { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 8px; padding: .7rem .8rem; display: flex; flex-direction: column; }
.kennzahl summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; }
.kennzahl summary::-webkit-details-marker { display: none; }
.kennzahl summary::after { content: "Details ▾"; font-size: .75rem; color: var(--text-2); margin-top: .2rem; }
.kennzahl[open] summary::after { content: "Details ▴"; }
.kz-titel { font-size: .82rem; color: var(--text-2); }
.kz-wert { font-size: 1.35rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.definition { font-size: .82rem; color: var(--text-2); }

.tabelle-rahmen { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-weight: 600; color: var(--text-2); font-size: .8rem; border-bottom: 1px solid var(--linie); padding: .4rem .5rem; white-space: nowrap; }
td { border-bottom: 1px solid var(--linie); padding: .45rem .5rem; vertical-align: top; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.minus { color: var(--schlecht); font-variant-numeric: tabular-nums; }
.plus { color: var(--gut); font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--linie); padding: .4rem 0; }
  td { border: 0; padding: .15rem 0; }
  td[data-label]:not([data-label=""])::before { content: attr(data-label) ": "; color: var(--text-2); font-size: .8rem; }
}

.formular { display: flex; flex-direction: column; gap: .35rem; margin: .4rem 0; }
.formular label { font-size: .85rem; color: var(--text-2); margin-top: .25rem; }
.formular.reihe { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: .4rem .6rem; }
.formular.reihe label { width: 100%; margin: 0; }
.formular.reihe > input, .formular.reihe > select, .formular.reihe > textarea { flex: 1 1 160px; }
.formular.zweispaltig { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: .3rem 1rem; align-items: end; }
.formular.zweispaltig > label { grid-column: auto; }
.formular.zweispaltig > button, .formular.zweispaltig > p { grid-column: 1 / -1; justify-self: start; }
input, select, textarea { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 7px; padding: .5rem .6rem; width: 100%; min-height: 40px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.haken { display: flex; align-items: center; gap: .45rem; color: var(--text) !important; }
.haken input { width: auto; min-height: 0; }
fieldset { border: 1px solid var(--linie); border-radius: 8px; padding: .5rem .8rem; }
legend { font-size: .85rem; color: var(--text-2); }
.versteckt { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.knopf, .knopf-leise { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; font: inherit; font-weight: 550; border-radius: 7px; padding: .5rem .9rem; min-height: 40px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.knopf { background: var(--akzent); color: var(--akzent-text); border: 1px solid var(--akzent); }
.knopf:hover { filter: brightness(1.12); }
.knopf-leise { background: transparent; color: var(--text); border: 1px solid var(--linie); }
.knopf-leise:hover { background: var(--flaeche-2); }
form.inline { display: inline; }
.aktionen { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; align-items: center; }
.kamera { align-self: flex-start; }
.upload { max-width: 520px; }

.reiter { display: flex; gap: .3rem; margin-bottom: .8rem; overflow-x: auto; }
.reiter a { text-decoration: none; color: var(--text-2); padding: .35rem .7rem; border-radius: 6px; border: 1px solid transparent; white-space: nowrap; }
.reiter a[aria-current="page"] { color: var(--text); border-color: var(--linie); background: var(--flaeche); }

.prio { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; background: var(--linie); }
.prio-1 { background: var(--schlecht); }
.prio-2 { background: var(--warn); }

.vorschau { display: grid; gap: .6rem; }
.vorschau figure { margin: 0; }
.vorschau img { width: 100%; height: auto; border: 1px solid var(--linie); border-radius: 6px; background: #fff; }
.vorschau figcaption { font-size: .78rem; color: var(--text-2); }
pre.text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; background: var(--flaeche-2); padding: .7rem; border-radius: 7px; max-height: 60vh; overflow: auto; }
q { font-style: italic; color: var(--text-2); }
.aufklapp { border-top: 1px solid var(--linie); padding: .5rem 0; }
.aufklapp summary { cursor: pointer; font-weight: 550; }

.chronik { list-style: none; padding: 0; margin: 0; }
.chronik li { padding: .35rem 0 .35rem .8rem; border-left: 2px solid var(--linie); margin-left: .2rem; overflow-wrap: anywhere; }
.chronik time { color: var(--text-2); font-size: .82rem; margin-right: .3rem; }

.kalender { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-bottom: 1rem; }
.kalender .kw { font-size: .75rem; color: var(--text-2); text-align: center; padding: .2rem; }
.kalender .tag { min-height: 74px; background: var(--flaeche-2); border-radius: 5px; padding: .2rem .25rem; font-size: .75rem; overflow: hidden; }
.kalender .tag.fremd { opacity: .45; }
.kalender .tag.heute { outline: 2px solid var(--link); }
.kalender .nr { font-weight: 600; color: var(--text-2); }
.kalender .ereignis { display: block; text-decoration: none; color: var(--text); background: var(--neutral-bg); border-radius: 3px; padding: 0 .2rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kalender .typ-frist { background: var(--warn-bg); color: var(--warn); }
.kalender .st-zu_pruefen { outline: 1px dashed var(--warn); }
@media (max-width: 680px) { .kalender .tag { min-height: 48px; } .kalender .ereignis { font-size: 0; height: 6px; } }

.schritt-kopf { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.setup-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 650; }
.schritt h3 { color: var(--text); font-size: 1rem; margin: .5rem 0; }
.schritt-daten { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: .25rem .8rem; margin: .4rem 0; font-size: .9rem; }
.schritt-daten dt { color: var(--text-2); }
.schritt-daten dd { margin: 0; }
@media (max-width: 680px) { .schritt-daten { grid-template-columns: 1fr; } .schritt-daten dd { margin-bottom: .4rem; } }
.schritte { padding-left: 1.2rem; margin: .3rem 0; }
.schritte li { margin: .2rem 0; }
.geheim { font-size: 1rem; letter-spacing: .05em; user-select: all; }

.frage { border-bottom: 1px solid var(--linie); padding: .6rem 0; }
.antwort { background: var(--flaeche-2); padding: .6rem .8rem; border-radius: 7px; }

dialog { border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem; width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); background: var(--flaeche); color: var(--text); }
dialog::backdrop { background: rgba(10, 12, 16, .45); }
.dialog-kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.dialog-kopf h2 { margin: 0; }
