:root {
  --petrol: #006d77; --petrol-dunkel: #00545c; --petrol-hell: #e3f1f2;
  --grund: #f6f5f1; --flaeche: #ffffff; --linie: #dedbd2; --text: #1d2a2c; --leise: #5f6f72;
  --rot: #b3261e; --rot-hell: #fbe9e7; --gruen: #1b6e3c; --gruen-hell: #e4f3ea; --gelb-hell: #fff4d6;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--grund); color: var(--text);
  font-family: Inter, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; line-height: 1.5; }
a { color: var(--petrol); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; } h2 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; } h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.kopf { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; background: var(--flaeche);
  border-bottom: 1px solid var(--linie); flex-wrap: wrap; position: sticky; top: 0; z-index: 20; }
.marke { font-weight: 700; color: var(--petrol-dunkel); text-decoration: none; letter-spacing: .01em; }
.haupt { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.haupt a { padding: .35rem .7rem; border-radius: var(--radius); text-decoration: none; color: var(--text); }
.haupt a:hover { background: var(--petrol-hell); } .haupt a.aktiv { background: var(--petrol); color: #fff; }
.abmelden { display: flex; align-items: center; gap: .6rem; margin-left: auto; } .wer { color: var(--leise); font-size: .85rem; }
.seite { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.breit { max-width: none; padding: 1rem; }
.schmal { max-width: 440px; margin: 3rem auto; padding: 0 1rem; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.knopf { display: inline-block; border: 1px solid var(--petrol); background: var(--petrol); color: #fff; padding: .5rem .9rem;
  border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.knopf:hover { background: var(--petrol-dunkel); }
.knopf.leise { background: transparent; color: var(--petrol-dunkel); border-color: var(--linie); font-weight: 500; }
.knopf.leise:hover { background: var(--petrol-hell); }
.knopf.klein { padding: .2rem .55rem; font-size: .85rem; }
.knopf.gefahr { background: var(--rot); border-color: var(--rot); }
.knopf[disabled] { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=time],
select, textarea { width: 100%; padding: .5rem .6rem; border: 1px solid var(--linie); border-radius: 6px; font: inherit; background: #fff; color: var(--text); }
textarea { min-height: 5rem; resize: vertical; }
input:focus, select:focus, textarea:focus, .knopf:focus-visible, a:focus-visible { outline: 2px solid var(--petrol); outline-offset: 1px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: .7rem 0 .25rem; }
.hilfe, .leise-text { color: var(--leise); font-size: .85rem; }
.pubwahl select { width: auto; padding: .3rem .5rem; }
.meldung { padding: .6rem .8rem; border-radius: var(--radius); background: var(--petrol-hell); margin: 0 0 .6rem; }
.meldung.error { background: var(--rot-hell); color: var(--rot); } .meldung.success { background: var(--gruen-hell); color: var(--gruen); }
.meldung.warning { background: var(--gelb-hell); }
.fehlerliste, .errorlist { color: var(--rot); font-size: .9rem; padding-left: 1.1rem; }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--leise); }
.marke-klein, .plakette { display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: var(--petrol-hell); color: var(--petrol-dunkel); white-space: nowrap; }
.plakette.rot { background: var(--rot-hell); color: var(--rot); } .plakette.gruen { background: var(--gruen-hell); color: var(--gruen); }
.plakette.gelb { background: var(--gelb-hell); color: #6b5200; } .plakette.grau { background: #ecebe6; color: var(--leise); }
.reihe { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; } .schieben { margin-left: auto; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } @media (max-width: 800px) { .zwei { grid-template-columns: 1fr; } }

/* Ausgabe-Editor */
.editor { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(360px, 640px); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } }
.vorschau-spalte { position: sticky; top: 4.2rem; }
.vorschau-rahmen { width: 100%; height: calc(100vh - 9rem); border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; }
.block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); margin-bottom: .6rem; }
.block.aus { opacity: .55; }
.block > summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; cursor: pointer; }
.block > summary::-webkit-details-marker { display: none; }
.griff { cursor: grab; color: var(--leise); user-select: none; font-size: 1.1rem; }
.block-titel { font-weight: 600; flex: 1; }
.block-inhalt { padding: 0 .9rem .9rem; border-top: 1px solid var(--linie); }
.zeile { display: flex; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid #efede7; align-items: flex-start; }
.zeile:last-child { border-bottom: 0; } .zeile input[type=checkbox], .zeile input[type=radio] { margin-top: .3rem; }
.zeile .rumpf { flex: 1; min-width: 0; } .zeile .titel { font-weight: 600; }
.zeile.raus .titel { color: var(--leise); font-weight: 400; }
.tag-kopf { font-weight: 700; margin: .9rem 0 .2rem; color: var(--petrol-dunkel); }
.fortschritt { color: var(--leise); font-size: .85rem; } .htmx-request .fortschritt, .htmx-request.fortschritt { color: var(--petrol); }
.htmx-indicator { opacity: 0; transition: opacity .2s; } .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.sortable-ghost { opacity: .4; }
details.fein > summary { cursor: pointer; color: var(--petrol-dunkel); font-size: .9rem; margin-top: .4rem; }
pre.protokoll { white-space: pre-wrap; font-size: .82rem; background: #f1efe9; padding: .6rem; border-radius: 6px; max-height: 18rem; overflow: auto; }

/* Konto, 2FA und Botschutz */
.falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.konto h1 { margin-top: .2rem; } .konto form { margin: 0; }
.qr { text-align: center; margin: .5rem 0; } .qr img { background: #fff; padding: .4rem; border: 1px solid var(--linie); border-radius: 6px; max-width: 100%; height: auto; }
input.schluessel, input.link-feld, pre.codes { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
input.schluessel { letter-spacing: .06em; } input.link-feld { min-width: 16rem; font-size: .8rem; }
pre.codes { background: #f1efe9; padding: .8rem 1rem; border-radius: 6px; font-size: 1.05rem; letter-spacing: .08em; line-height: 1.7; columns: 2; margin: .6rem 0; }
.schritte { padding-left: 1.2rem; margin: .4rem 0; }
