:root {
  --rot: #cd1619;
  --grau: #5a5a59;
  --hell: #f7f7f7;
  --fokus: #005fcc;
  --rand: #dcdcdc;
  --text: #1c1c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--text);
  background: var(--hell);
}
main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }

/* ---- Kopfleiste ---- */
.kopf {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  background: #fff; border-bottom: 3px solid var(--rot);
  padding: 0.9rem 1.25rem;
}
.marke { font-weight: 700; color: var(--rot); text-decoration: none; font-size: 1.1rem; }
.marke span { color: var(--grau); font-weight: 400; }
.menue { display: flex; gap: 1.25rem; margin-right: auto; }
.menue a { color: var(--grau); text-decoration: none; padding: 0.35rem 0; }
.menue a:hover { color: var(--rot); }
.menue a.an { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--rot); }
.wer { display: flex; align-items: center; gap: 0.75rem; color: var(--grau); font-size: 0.9rem; }
.abmelden-form { margin: 0; }

/* ---- Flächen ---- */
.karte {
  background: #fff; border: 1px solid var(--rand); border-radius: 4px;
  padding: 1.25rem 1.5rem; margin-bottom: 1.25rem;
}
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 0.75rem; }
a { color: var(--fokus); }

/* ---- Liste der Inhalte ---- */
table.liste { width: 100%; border-collapse: collapse; }
table.liste th, table.liste td {
  text-align: left; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--rand);
  vertical-align: top;
}
table.liste th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--grau); }
table.liste tr:last-child td { border-bottom: none; }
td.rechts, th.rechts { text-align: right; }

/* ---- Zustandsmarken ---- */
.marke-zustand {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}
.zustand-veroeffentlicht { background: #e8f3e8; color: #1f6b23; }
.zustand-entwurf { background: #fdf3e0; color: #8a5a00; }
.zustand-eingereicht { background: #fde8e8; color: #a0181a; }
.zustand-gesperrt { background: #eee; color: var(--grau); }

/* ---- Formulare ---- */
label { display: block; font-weight: 600; margin: 1rem 0 0.35rem; }
input[type=text], input[type=password], select, textarea {
  width: 100%; padding: 0.55rem 0.6rem; font: inherit;
  border: 1px solid var(--rand); border-radius: 3px; background: #fff;
}
textarea { min-height: 22rem; font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; }
.hilfe { color: var(--grau); font-size: 0.88rem; margin: 0.3rem 0 0; }

button, .knopf {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
  padding: 0.55rem 1.1rem; border-radius: 3px; border: 1px solid var(--rot);
  background: var(--rot); color: #fff; text-decoration: none;
}
button:hover, .knopf:hover { background: #b01315; border-color: #b01315; }
.knopf-zweit { background: #fff; color: var(--text); border-color: var(--rand); }
.knopf-zweit:hover { background: var(--hell); border-color: var(--grau); }
.knopf-schlicht {
  background: none; border: none; color: var(--grau); padding: 0.35rem;
  text-decoration: underline; font-weight: 400;
}
.knopf-schlicht:hover { background: none; color: var(--rot); }
button[disabled] { opacity: 0.5; cursor: not-allowed; }
.knopfreihe { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; align-items: center; }

/* Tastaturfokus muss sichtbar sein -- sonst ist der Bereich ohne Maus
   nicht bedienbar. Gleiche Regel wie auf der Website (A-27). */
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }

/* ---- Einmal angezeigte Werte: Passwoerter, Geheimnisse, Codes ----
   Eigene Klassen statt style-Attributen: Die Sicherheitsrichtlinie erlaubt
   style-src 'self' ohne unsafe-inline. Ein Inline-Style wird still
   verworfen -- die Seite sieht dann falsch aus, ohne Fehlermeldung. */
.code-gross { font-size: 1.1rem; }
.code-passwort { font-size: 1.35rem; letter-spacing: 0.05em; }
.code-geheimnis { font-size: 1.1rem; letter-spacing: 0.08em; }
.code-umbruch { word-break: break-all; }
.codeliste { columns: 2; font-size: 1.05rem; line-height: 2; }
@media (max-width: 30rem) { .codeliste { columns: 1; } }
.form-schmal { margin: 0; }
.abstand-oben { margin-top: 1.25rem; }

/* ---- QR-Code ---- */
.qr {
  display: inline-block; padding: 0.75rem; background: #fff;
  border: 1px solid var(--rand); border-radius: 4px; line-height: 0;
}

/* ---- Hinweise ---- */
.hinweis { padding: 0.7rem 0.9rem; border-radius: 3px; border-left: 4px solid; margin: 0 0 1rem; }
.hinweis-erfolg { background: #e8f3e8; border-color: #1f6b23; }
.hinweis-fehler { background: #fde8e8; border-color: var(--rot); }
.hinweis-warnung { background: #fdf3e0; border-color: #c98a00; }
.hinweis-info { background: #eaf1fb; border-color: var(--fokus); }

/* ---- Anmeldung ---- */
body.anmeldung { display: grid; place-items: center; min-height: 100vh; background: var(--hell); }
body.anmeldung main { width: min(26rem, 100%); padding: 1rem; }

/* ---- Fuß ---- */
.fuss { color: var(--grau); font-size: 0.85rem; text-align: center; padding: 0 1rem 2rem; }
.fuss p { margin: 0; }

@media (max-width: 40rem) {
  .kopf { gap: 0.75rem; }
  .menue { width: 100%; order: 3; }
  table.liste th:nth-child(3), table.liste td:nth-child(3) { display: none; }
}
