/* Redaktion — ein Arbeitswerkzeug, kein Schaufenster.
 *
 * Regeln, die hier gelten:
 * - Bedeutung nie allein über Farbe. Rechtelage, Export und „zu überprüfen“
 *   tragen immer ein Wort; unterschieden wird über Helligkeit und Form
 *   (gefüllt / Rahmen / gestrichelt), nicht über den Farbton.
 * - Ein sichtbarer Fokus an allem, was bedienbar ist.
 * - Bis 375 px lesbar: Die Liste wird unter 720 px zu gestapelten Einträgen.
 */
:root {
  --papier: #f5f4f0;
  --flaeche: #ffffff;
  --tinte: #1b1a17;
  --leise: #5b5850;
  --linie: #d8d5cc;
  --linie-kraeftig: #8f8b80;
  --getoent: #ebe9e2;
  --verweis: #1d3f6e;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font: 16px/1.5 var(--schrift);
}
a { color: var(--verweis); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tinte); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0; text-wrap: balance; }
h2 { font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--leise);
     margin: 0 0 0.75rem; font-weight: 700; }
h3 { font-size: 1.0625rem; margin: 0 0 0.5rem; }
.leise { color: var(--leise); }
.klein { font-size: 0.875rem; }
.unsichtbar, .sprung:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.sprung:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: var(--flaeche); padding: 8px 12px; }

/* --- Kopfleiste */
.leiste { background: var(--tinte); color: #fff; }
.leiste-innen { max-width: 1280px; margin: 0 auto; padding: 10px 24px; display: flex; flex-wrap: wrap;
                align-items: center; gap: 8px 28px; }
.leiste a { color: #fff; }
.leiste :focus-visible { outline-color: #fff; }
.marke { font-weight: 700; font-size: 1.0625rem; text-decoration: none; letter-spacing: 0.01em; }
.marke-klein { font-weight: 400; opacity: 0.75; }
.leiste nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.leiste nav a { display: block; padding: 6px 12px; border-radius: 4px; text-decoration: none; }
.leiste nav a:hover { background: rgba(255,255,255,0.14); }
.leiste nav a[aria-current] { background: #fff; color: var(--tinte); font-weight: 600; }
.konto { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 0.9375rem; }
.konto form { margin: 0; }
.konto-rollen { opacity: 0.75; margin-left: 8px; }
.konto-rollen::before { content: "("; } .konto-rollen::after { content: ")"; }

main { max-width: 1280px; margin: 0 auto; padding: 28px 24px 64px; }
section + section, .haupt > section + section { margin-top: 28px; }

/* --- Knöpfe und Formulare */
.knopf, .knopf-leise {
  font: inherit; cursor: pointer; border-radius: 6px; padding: 9px 18px; min-height: 44px;
}
.knopf { background: var(--tinte); color: #fff; border: 2px solid var(--tinte); font-weight: 600; }
.knopf:hover { background: #3a3832; }
.knopf-leise { background: transparent; color: inherit; border: 1px solid currentColor; padding: 5px 12px; min-height: 0; }
.knopf-leise:hover { background: rgba(255,255,255,0.14); }
input[type=text], input[type=password], input[type=search], input[type=email], select {
  font: inherit; color: var(--tinte); background: var(--flaeche); border: 1px solid var(--linie-kraeftig);
  border-radius: 6px; padding: 8px 10px; min-height: 44px; width: 100%;
}
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--tinte); margin: 0; }
label { font-size: 0.875rem; font-weight: 600; }
.schmal { max-width: 26rem; margin: 6vh auto 0; background: var(--flaeche); border: 1px solid var(--linie);
          border-radius: 10px; padding: 28px; }
.schmal h1 { margin-bottom: 20px; }
.formular { display: grid; gap: 6px; }
.formular label { margin-top: 10px; }
.formular .knopf { margin-top: 20px; }
.hilfe ul { margin: 4px 0 0; padding-left: 1.1em; }
.meldung { border: 2px solid var(--tinte); border-radius: 6px; padding: 10px 12px; background: var(--flaeche); margin: 8px 0; }

/* --- Seitenkopf */
.seitenkopf { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.zahl { margin: 0; color: var(--leise); font-variant-numeric: tabular-nums; }
.zahl strong { color: var(--tinte); }
.pfad { margin: 0 0 8px; font-size: 0.9375rem; color: var(--leise); }

/* --- Filter */
.filter { display: grid; grid-template-columns: minmax(14rem, 2fr) repeat(4, minmax(8.5rem, 1fr)); gap: 12px 14px;
          align-items: end; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
          padding: 16px; margin-bottom: 20px; }
.feld { display: grid; gap: 4px; min-width: 0; }
.feld-haken { display: flex; align-items: center; gap: 8px; min-height: 44px; grid-column: 1 / 3; }
.feld-haken label { font-size: 1rem; font-weight: 400; }
.feld-knopf { display: flex; align-items: center; gap: 16px; grid-column: 3 / -1; justify-content: flex-end; }

/* --- Zustände: Wort + Form + Helligkeit */
.lage { display: inline-block; font-size: 0.8125rem; font-weight: 600; line-height: 1.2; padding: 3px 9px;
        border-radius: 999px; white-space: nowrap; border: 1.5px solid var(--tinte); }
.lage-frei { background: var(--flaeche); color: var(--tinte); }
.lage-geschuetzt { background: var(--tinte); color: #fff; }
.lage-ungeprueft { background: var(--getoent); color: var(--tinte); border-style: dashed; }
.ja { font-weight: 600; white-space: nowrap; }
.marke-pruefen, .hinweis-pruefen { border-left: 4px solid var(--tinte); background: var(--getoent); }
.marke-pruefen { display: inline-block; padding: 2px 8px; font-size: 0.875rem; }
.hinweis-pruefen { padding: 10px 14px; margin: 0 0 20px; border-radius: 0 6px 6px 0; }

/* --- Liste */
.liste { width: 100%; border-collapse: collapse; background: var(--flaeche); border: 1px solid var(--linie);
         border-radius: 10px; overflow: hidden; font-size: 0.9375rem; }
.liste th, .liste td { text-align: left; padding: 10px 12px; vertical-align: top; border-top: 1px solid var(--linie); }
.liste thead th { border-top: 0; background: var(--getoent); font-size: 0.8125rem; letter-spacing: 0.03em;
                  white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.liste tbody tr:hover { background: #faf9f6; }
.liste .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--leise); width: 4rem; }
.liste .titel { font-weight: 400; min-width: 14rem; }
.liste .titel a { font-weight: 600; font-size: 1rem; }
.weitere { display: block; color: var(--leise); font-size: 0.875rem; }
.leer { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 24px; }

/* --- Liedseite */
.liedkopf { margin-bottom: 20px; }
.status { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.spalten { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 24px; align-items: start; }
.haupt > section, .rand > section { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 18px 20px; }
.rand > section + section { margin-top: 16px; }
.anzahl { font-variant-numeric: tabular-nums; background: var(--getoent); border-radius: 999px; padding: 1px 8px;
          margin-left: 4px; color: var(--tinte); letter-spacing: 0; }
.paare { display: grid; grid-template-columns: minmax(7rem, auto) minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 0.9375rem; }
.paare dt { color: var(--leise); }
.paare dd { margin: 0; overflow-wrap: anywhere; }
.paare.breit { grid-template-columns: 1fr; }
.paare.breit dd { margin-bottom: 10px; }
.paare.technisch { font-family: var(--mono); font-size: 0.8125rem; margin-top: 10px; }
.feldname { color: var(--leise); font-size: 0.875rem; }
.schlicht { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; }
.schlicht li + li { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--linie); }
.schlicht a { overflow-wrap: anywhere; }
details { margin-top: 10px; }
summary { cursor: pointer; padding: 6px 0; font-weight: 600; font-size: 0.9375rem; }

.kein-werk { border: 1.5px dashed var(--linie-kraeftig); border-radius: 8px; padding: 16px 18px; margin: 0;
             background: var(--papier); max-width: 44rem; }
.kein-werk.klein { padding: 8px 12px; font-size: 0.9375rem; }
.noten { min-height: 6rem; }
.noten svg { display: block; max-width: 100%; height: auto; }
.klang { margin-bottom: 8px; }
.textwahl { margin: 0 0 12px; font-size: 0.9375rem; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.textwahl a { padding: 3px 10px; border: 1px solid var(--linie-kraeftig); border-radius: 999px; text-decoration: none; color: var(--tinte); }
.textwahl a[aria-current] { background: var(--tinte); color: #fff; border-color: var(--tinte); font-weight: 600; }
.text + .text { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--linie); }
.textmeta { display: block; font-size: 0.875rem; font-weight: 400; color: var(--leise); }
.liedtext, .quelltext { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.liedtext { font: inherit; line-height: 1.6; }
.quelltext { font: 0.8125rem/1.5 var(--mono); background: var(--papier); padding: 10px 12px; border-radius: 6px; }

/* --- Protokoll, Tabellen, Konten */
.rechts { margin: 0 0 0 auto; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
a.knopf { text-decoration: none; display: inline-flex; align-items: center; }
.karte, .vorgang { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 18px 20px; margin-top: 20px; }
.vorgang-kopf { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--tinte); }
.vorgang .liste { border-radius: 6px; margin-top: 10px; }
.protokoll .wert, .liste .wert { overflow-wrap: anywhere; max-width: 28rem; }
.liste .schluessel { min-width: 0; font-variant-numeric: tabular-nums; }
.technisch-namen dt { font-family: var(--mono); font-size: 0.8125rem; }
.blaettern { display: flex; gap: 20px; align-items: center; margin-top: 20px; }
.schmal.breiter { max-width: 34rem; margin-top: 16px; }
.haken { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.haken label { font-size: 1rem; font-weight: 400; margin: 0; }
.formular .haken label { margin-top: 0; }
.liste-breit { overflow-x: auto; }

/* --- Schmal */
@media (max-width: 960px) {
  .spalten { grid-template-columns: minmax(0, 1fr); }
  .filter { grid-template-columns: 1fr 1fr; }
  .feld-suche, .feld-haken, .feld-knopf { grid-column: 1 / -1; }
  .feld-knopf { justify-content: flex-start; }
}
@media (max-width: 720px) {
  main { padding: 20px 16px 48px; }
  .leiste-innen { padding: 10px 16px; }
  .konto { margin-left: 0; width: 100%; }
  h1 { font-size: 1.5rem; }
  .liste, .liste tbody, .liste tr, .liste th, .liste td { display: block; }
  .liste { border: 0; background: none; }
  .liste thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .liste tr { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px;
              margin-bottom: 10px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .liste th, .liste td { border: 0; padding: 0; width: auto; }
  .liste .titel { grid-column: 1; grid-row: 1; min-width: 0; }
  .liste .num { grid-column: 2; grid-row: 1; text-align: right; }
  .liste .num::before { content: "Nr. "; }
  .liste td:not(.num) { grid-column: 1 / -1; }
  .liste td:not(.num)::before { content: attr(data-name) ": "; color: var(--leise); font-size: 0.875rem; }
  .liste td.pruefen:empty { display: none; }
  .paare { grid-template-columns: 1fr; gap: 0; }
  .paare dd { margin-bottom: 8px; }
  .haupt > section, .rand > section { padding: 16px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.knopf-zweit { font: inherit; font-size: 0.875rem; cursor: pointer; border-radius: 6px; padding: 4px 10px;
               background: var(--flaeche); color: var(--tinte); border: 1px solid var(--tinte); text-decoration: none; }
.band-probe { margin: 0; padding: 8px 24px; background: var(--getoent); border-bottom: 2px dashed var(--tinte);
              text-align: center; font-size: 0.9375rem; }

/* --- Zweiter Schritt der Anmeldung (Etappe 5) --- */
.schritt { font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--leise); margin: 0 0 4px; }
.code-feld { font-size: 1.5rem; letter-spacing: 0.18em; font-variant-numeric: tabular-nums; text-align: center; padding: 10px; }
.schritte { list-style: none; padding: 0; margin: 20px 0; counter-reset: schritt; display: grid; gap: 20px; }
.schritte > li { counter-increment: schritt; border-top: 1px solid var(--linie); padding-top: 16px; }
.schritte h2 { font-size: 1.0625rem; margin: 0 0 6px; }
.schritte h2::before { content: counter(schritt) ". "; }
.qr { display: block; background: #fff; border: 1px solid var(--linie); border-radius: 6px; }
.schluessel { font-family: ui-monospace, Menlo, monospace; font-size: 1rem; letter-spacing: 0.06em; word-spacing: 0.3em;
  background: var(--getoent); border-radius: 6px; padding: 10px 12px; overflow-wrap: anywhere; user-select: all; }
.codes { list-style: none; padding: 14px 16px; margin: 16px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px;
  border: 2px solid var(--tinte); border-radius: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 1.125rem; letter-spacing: 0.08em; }
.knopfzeile { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }
.ausweg { margin-top: 24px; border-top: 1px solid var(--linie); padding-top: 14px; }
.ausweg summary { cursor: pointer; }
.abbruch { margin-top: 16px; }
.stand { font-size: 1.0625rem; }
@media print {
  .leiste, .sprung, .knopfzeile, .band-probe { display: none !important; }
  .schmal { border: 0; margin: 0; max-width: none; }
}
.fuss { margin: 48px auto 24px; padding: 0 24px; max-width: var(--breite, 72rem); font-size: 0.8125rem; color: var(--leise); }
@media print { .fuss { display: none; } }
