/* The editor's whole look lives in this one file. Change the values below first.
   It follows the public site: Geist, cool paper, deep ink, one blue, hairlines, square corners.
   (The preview pane uses the site's own CSS from /site/, not this file.) */
@font-face { font-family: Geist; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/geist-latin.woff2) format("woff2"); }
:root {
  --papier: #f4f9fe;      /* site: paper */
  --flaeche: #ffffff;     /* fields only */
  --tinte: #0e1a27;       /* site: ink */
  --tinte-2: #4a5663;     /* quiet text: 6.9:1 on the paper */
  --linie: #6b7a89;       /* borders of fields: 4.4:1 on white */
  --haar: #d3e0ec;        /* quiet dividers only */
  --akzent: #0067b9;      /* site: blue. Saving, links, selection */
  --akzent-dunkel: #004999;
  --akzent-hell: #e3eef8; /* site: paper-2 */
  --gefahr: #9a1b1b;      /* only for removing and discarding */
  --gefahr-hell: #f8e1de;
  --gut: #1f5c3a;
  --gut-hell: #e0efe4;
  --warn: #7a5200;
  --warn-hell: #fbeecb;
  --schrift: Geist, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --groesse: 20px;
  --knopf-hoehe: 56px;
  --radius: 2px;
  --abstand: 20px;
  --breite-leiste: 256px;
  --kopf: 72px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: var(--groesse); }
body { margin: 0; background: var(--papier); color: var(--tinte); font-family: var(--schrift); line-height: 1.6; letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
h1 { font-size: 2.1rem; font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: 1.2rem; font-weight: 500; letter-spacing: -.01em; margin: 1.4em 0 .4em; }
p { margin: .6em 0; }
a { color: var(--akzent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

/* buttons */
.knopf, .knopf-klein {
  display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none;
  font: inherit; font-weight: 600; cursor: pointer; border-radius: var(--radius);
  border: 1px solid var(--tinte); background: transparent; color: var(--tinte);
  transition: background-color .12s ease-out, border-color .12s ease-out, transform .12s ease-out;
}
@media (hover: hover) { .knopf:hover, .knopf-klein:hover { background: var(--tinte); color: var(--papier); } }
.knopf:active, .knopf-klein:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .knopf, .knopf-klein { transition: none; } .knopf:active, .knopf-klein:active { transform: none; } }
.knopf { min-height: var(--knopf-hoehe); padding: 8px 22px; }
.knopf-klein { min-height: 46px; padding: 4px 14px; font-size: .9rem; }
.knopf-haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
@media (hover: hover) { .knopf-haupt:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); color: #fff; } }
/* near-black = "this goes on the website" (the site's own call-to-action colour); blue = "save my work" */
.knopf-online { background: var(--tinte); border-color: var(--tinte); color: #fff; }
@media (hover: hover) { .knopf-online:hover { background: #26384c; border-color: #26384c; color: #fff; } }
.knopf-gefahr { color: var(--gefahr); border-color: var(--haar); background: transparent; }
@media (hover: hover) { .knopf-gefahr:hover { background: var(--gefahr-hell); border-color: var(--gefahr); color: var(--gefahr); } }
.knopf-neu { width: 100%; min-height: 48px; padding: 6px 8px; margin-bottom: 8px; font-size: .9rem; white-space: nowrap; border-color: var(--akzent); color: var(--akzent); }
@media (hover: hover) { .knopf-neu:hover { background: var(--akzent); color: #fff; } }
button:disabled { opacity: .5; cursor: default; }
button:disabled:active { transform: none; }
.fett { font-weight: 800; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--abstand); }

/* frame */
.kopf {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--abstand);
  padding: 8px var(--abstand) 8px 28px; background: var(--papier); border-bottom: 1px solid var(--haar);
}
.kopf-titel { font-weight: 500; letter-spacing: -.01em; white-space: nowrap; color: var(--tinte); text-decoration: none; margin-right: auto; }
.kopf-name { color: var(--tinte-2); font-size: .9rem; }
.gesamt { display: grid; grid-template-columns: var(--breite-leiste) minmax(0, 1.3fr) minmax(20rem, 1fr); align-items: start; }
.seitenleiste { position: sticky; top: var(--kopf); height: calc(100vh - var(--kopf)); overflow-y: auto; padding: 24px 16px; border-right: 1px solid var(--haar); background: var(--papier); }
.seitenleiste h2 { font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--tinte-2); margin: 32px 12px 8px; }
.seitenleiste h2:first-child { margin-top: 0; }
.seitenleiste ul { list-style: none; margin: 0; padding: 0; }
.seitenleiste li a, .leiste-knopf {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  min-height: 46px; padding: 6px 12px; border-radius: var(--radius); color: var(--tinte); text-decoration: none; font-size: .95rem;
  transition: background-color .12s ease-out;
  font: inherit; background: none; border: 0; cursor: pointer; text-align: left;
}
@media (hover: hover) { .seitenleiste li a:hover, .leiste-knopf:hover { background: var(--akzent-hell); } }
.seitenleiste li a[aria-current="page"] { background: var(--akzent-hell); font-weight: 600; color: var(--akzent-dunkel); }
/* "Online" is the normal state: the list only marks what differs */
.seitenleiste .marke-online { display: none; }
.haupt { padding: 40px 40px 0; min-width: 0; }
.haupt:has(+ .vorschau[hidden]) { grid-column: 2 / 4; max-width: 52rem; }
.haupt:has(+ .vorschau[hidden]):has(.punkte, .verlaufsliste, .schritte) { max-width: 46rem; }
.vorschau { position: sticky; top: var(--kopf); height: calc(100vh - var(--kopf)); padding: 24px; border-left: 1px solid var(--haar); background: var(--akzent-hell); display: flex; flex-direction: column; }
.vorschau h2 { margin: 0; font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--tinte-2); }
.vorschau .hilfe { margin: .3em 0 12px; font-size: .85rem; }
.vorschau iframe { flex: 1; width: 100%; min-height: 0; border: 1px solid var(--haar); border-radius: 0; background: #fff; }
.zurueck { display: none; margin-bottom: 12px; }
.titelzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 24px; }

/* start page */
.start-lead { font-size: 1.15rem; color: var(--tinte-2); margin: .5em 0 56px; }
.schritte { list-style: none; counter-reset: s; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 32px; }
.schritte li { counter-increment: s; padding: 16px 0 0; border-top: 1px solid var(--haar); color: var(--tinte-2); font-size: .95rem; }
.schritte li::before { content: counter(s, decimal-leading-zero); display: block; margin-bottom: 12px; font-size: .78rem; font-weight: 500; letter-spacing: .16em; color: var(--akzent); }
.schritte b { display: block; margin-bottom: 4px; color: var(--tinte); font-size: 1.1rem; font-weight: 500; }

/* status badges */
.marke { flex: none; padding: 2px 8px; border-radius: 2px; font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.marke-online { background: var(--gut-hell); color: var(--gut); }
.marke-entwurf { background: var(--warn-hell); color: var(--warn); }
.marke-entfernt { background: var(--gefahr-hell); color: var(--gefahr); }

/* messages */
/* floats over the page, so a message never pushes the layout down */
.meldung { position: fixed; z-index: 20; top: 10px; left: 50%; transform: translateX(-50%); width: min(36rem, calc(100vw - 560px));
  padding: 12px 18px; border-radius: var(--radius); border: 1px solid currentColor; font-weight: 500; font-size: .95rem; line-height: 1.35; cursor: pointer;
  animation: meldung-rein .18s ease-out; }
@keyframes meldung-rein { from { opacity: 0; transform: translate(-50%, -8px); } }
@media (prefers-reduced-motion: reduce) { .meldung { animation: none; } }
.meldung-gut { background: var(--gut-hell); color: var(--gut); }
.meldung-fehler { background: var(--gefahr-hell); color: var(--gefahr); }
.hilfe { color: var(--tinte-2); font-size: .9rem; }
.hinweis { padding: 12px 16px; background: var(--warn-hell); border-radius: var(--radius); font-size: .95rem; }
.stand-online { background: var(--gut-hell); color: var(--gut); font-weight: 700; }
.stand-fehler, .stand-nicht-aktiv, .stand-unbekannt { background: var(--gefahr-hell); color: var(--gefahr); font-weight: 700; }

/* forms */
.zeile { margin-bottom: 28px; }
.zeile-kurz { max-width: 14rem; }
.zeile .hilfe { margin: 0 0 8px; }
.zeile label, .feldname { display: block; font-weight: 600; margin-bottom: 6px; }
.feld { width: 100%; min-height: 52px; padding: 10px 12px; font: inherit; color: inherit; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); transition: border-color .12s ease-out; }
.feld:focus-visible { border-color: var(--akzent); }
textarea.feld { resize: vertical; }
.gruppe { border: 1px solid var(--haar); border-radius: var(--radius); margin: 0 0 28px; padding: 16px 20px; }
.gruppe legend { font-weight: 700; padding: 0 6px; }
.wort { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.klein { font-size: .9rem; font-weight: 600; display: block; }

.reich { border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); }
.werkzeuge { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; border-bottom: 1px solid var(--haar); position: sticky; top: var(--kopf); background: var(--flaeche); z-index: 2; border-radius: 0; }
.textbox { min-height: 14rem; max-height: 55vh; overflow-y: auto; padding: 16px 20px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; }
.textbox:focus-visible { box-shadow: inset 0 0 0 3px var(--akzent); }
.textbox h2 { margin: 1em 0 .3em; font-size: 1.25rem; }
.textbox p { margin: 0 0 .9em; }

.reiterleiste { display: flex; flex-wrap: wrap; gap: 0 4px; margin-bottom: 32px; border-bottom: 1px solid var(--haar); }
.reiter { min-height: 52px; margin-bottom: -1px; padding: 6px 16px; font: inherit; font-weight: 500; background: none; color: var(--tinte-2); border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.reiter[aria-selected="true"] { color: var(--akzent); border-bottom-color: var(--akzent); }

.listenblock { margin-bottom: 28px; }
.liste { list-style: none; margin: 8px 0; padding: 0; }
.liste > li { border: 1px solid var(--haar); border-radius: var(--radius); margin-bottom: 8px; background: var(--flaeche); }
.listenkopf { display: flex; align-items: stretch; gap: 6px; padding: 6px; }
.listentitel { flex: 1; min-height: 46px; min-width: 0; padding: 4px 8px; font: inherit; font-weight: 600; text-align: left; background: none; border: 0; cursor: pointer; color: inherit; overflow-wrap: anywhere; }
.listeninhalt { padding: 16px; border-top: 1px solid var(--haar); }

.ablage { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border: 1px dashed var(--linie); border-radius: var(--radius); }
.ablage.drueber { border-color: var(--akzent); background: var(--akzent-hell); }
.ablage-text { color: var(--tinte-2); }
.fotos { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.foto img { display: block; width: 100%; max-width: 320px; height: 180px; object-fit: cover; border-radius: var(--radius); background: var(--papier); margin-bottom: 6px; }
.fotos .foto { padding: 8px; background: var(--flaeche); border: 1px solid var(--haar); border-radius: var(--radius); }
.fotoknoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.speicherleiste { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 40px -40px 0; padding: 16px 40px; background: var(--papier); border-top: 1px solid var(--haar); }
.speicherleiste .knopf-gefahr { margin-left: auto; }
.speicherleiste .knopf:not(.knopf-haupt) { min-height: 48px; padding: 6px 12px; font-size: .85rem; }
.speicherleiste .knopf-haupt { padding: 8px 18px; }
.verlauf { margin: 32px 0; }
.verlauf summary { font-weight: 600; cursor: pointer; min-height: 46px; padding: 8px 0; }
.verlaufsliste, .punkte { list-style: none; margin: 8px 0; padding: 0; }
.verlaufsliste li, .punkte li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--haar); }
.punkte li span { color: var(--tinte-2); font-size: .95rem; }
.punkte { margin: 16px 0 32px; }

.dialog { width: min(36rem, calc(100vw - 32px)); padding: 32px; border: 1px solid var(--haar); border-radius: var(--radius); background: var(--papier); color: var(--tinte); }
.dialog::backdrop { background: rgb(14 26 39 / .5); }
.dialog h2 { margin-top: 0; }
.dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }

.anmeldung { max-width: 30rem; margin: 6vh auto; padding: var(--abstand); }
.anmeldung .meldung { top: 16px; }
.anmeldung .knopf { width: 100%; }
.marke-name { color: var(--tinte-2); margin: 0 0 4px; }

/* narrower screens: the preview moves below the form */
@media (max-width: 1180px) {
  .gesamt { grid-template-columns: var(--breite-leiste) minmax(0, 1fr); }
  .meldung { width: min(30rem, calc(100vw - 520px)); }
  .haupt { padding: 32px 32px 0; }
  .speicherleiste { margin: 40px -32px 0; padding: 16px 32px; }
  .haupt:has(+ .vorschau[hidden]) { grid-column: 2; }
  .vorschau { grid-column: 2; position: static; height: 80vh; border-left: 0; border-top: 1px solid var(--haar); }
  .textbox { max-height: none; }
}

/* phones: list or form, one at a time, everything stacked */
@media (max-width: 760px) {
  :root { --abstand: 16px; --groesse: 19px; }
  .gesamt { display: block; }
  .haupt, .haupt:has(+ .vorschau[hidden]) { padding: 24px var(--abstand) 0; }
  .seitenleiste { border-right: 0; min-height: 0; padding: 24px var(--abstand); }
  .speicherleiste { margin: 24px calc(var(--abstand) * -1) 0; padding: 12px var(--abstand); }
  .beim-bearbeiten .seitenleiste { display: none; }
  .zurueck { display: block; }
  .kopf { position: static; padding: 8px var(--abstand); }
  .kopf { gap: 8px; padding-right: 12px; }
  .kopf-titel { font-size: .82rem; min-width: 0; white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
  .kopf-name { display: none; }
  .seitenleiste { position: static; height: auto; overflow: visible; }
  .meldung { top: 8px; width: calc(100vw - 32px); }
  .kopf .knopf { min-height: 48px; padding: 6px 12px; font-size: .9rem; white-space: nowrap; }
  .vorschau { height: 70vh; }
  .werkzeuge { top: 0; }
  .speicherleiste .knopf { flex: 1 1 calc(50% - 6px); min-height: 48px; padding: 6px 12px; font-size: .9rem; }
  .speicherleiste .knopf-haupt { flex-basis: 100%; min-height: var(--knopf-hoehe); font-size: 1rem; }
  .speicherleiste .knopf-gefahr { margin-left: 0; }
  .schritte { gap: 24px; }
  .dialog { padding: 20px; }
  .dialog .knopfreihe .knopf { flex: 1 1 100%; min-height: 52px; }
  .werkzeuge { position: static; gap: 6px; padding: 6px; }
  .werkzeuge .knopf-klein { min-height: 44px; padding: 4px 12px; }
}
.hilfe-warnung { color: var(--warn); font-weight: 600; }
.meldung-zu { display: block; margin: 10px 0 0 auto; min-height: 44px; padding: 4px 16px; font: inherit; font-size: .9rem; font-weight: 600; color: inherit; background: transparent; border: 2px solid currentColor; border-radius: var(--radius); cursor: pointer; }
.laden { color: var(--tinte-2); font-size: 1.1rem; padding: var(--abstand) 0; }
