/* ==========================================================================
   Passwort-Übergabe – im Design der Robert-Rösler-Anwendungen
   Farben und Schrift: nur dieser Block. Keine externen Fonts (DSGVO):
   Inter wird genutzt, wenn lokal installiert, sonst Systemschrift.
   ========================================================================== */
:root {
  --seite: #F6F7F7;
  --punkt: #D9DEDC;
  --kopf: rgba(255, 255, 255, 0.88);
  --flaeche: #FFFFFF;
  --text: #18191B;
  --text-leise: #6B7075;
  --linie: #E5E8E7;
  --gruen: #1E7A55;
  --gruen-dunkel: #176445;
  --gruen-hell: #E9F5EF;
  --verlauf: linear-gradient(90deg, #22A06B 0%, #3BA79B 45%, #6C86E8 100%);
  --knopf: #1B1B1D;
  --knopf-hover: #000000;
  --knopf-text: #FFFFFF;
  --fehler: #B42318;
  --fehler-hell: #FEF0EE;
  --ring: rgba(30, 122, 85, 0.22);

  --schrift: "Inter", "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 16px;
  --radius-feld: 10px;
  --radius-knopf: 12px;
  --schatten: 0 1px 2px rgba(16, 24, 20, 0.04), 0 6px 20px rgba(16, 24, 20, 0.04);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --seite: #0E1211;
    --punkt: #1E2624;
    --kopf: rgba(20, 25, 24, 0.88);
    --flaeche: #161B1A;
    --text: #ECEFEE;
    --text-leise: #9BA3A0;
    --linie: #27302D;
    --gruen: #4CC490;
    --gruen-dunkel: #6ED3A6;
    --gruen-hell: #14271F;
    --verlauf: linear-gradient(90deg, #3DD08F 0%, #4CC0B4 45%, #8AA2FF 100%);
    --knopf: #F2F4F3;
    --knopf-hover: #FFFFFF;
    --knopf-text: #111312;
    --fehler: #F59A8E;
    --fehler-hell: #351A17;
    --ring: rgba(76, 196, 144, 0.28);
    --schatten: none;
  }
}

/* Grundlagen ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background-color: var(--seite);
  background-image: radial-gradient(var(--punkt) 1px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--text);
  font: 1rem/1.55 var(--schrift);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  padding: 0 env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

a { color: var(--gruen); text-decoration: none; font-weight: 550; }
a:hover { color: var(--gruen-dunkel); text-decoration: underline; text-underline-offset: 0.2em; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }

.sprung {
  position: absolute; left: 1rem; top: -3rem; z-index: 10;
  padding: 0.5rem 0.9rem; background: var(--knopf); color: var(--knopf-text);
  border-radius: var(--radius-knopf);
}
.sprung:focus { top: 0.75rem; }

/* Kopfleiste ------------------------------------------------------------- */
.kopf {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 60px;
  padding: env(safe-area-inset-top, 0) clamp(1rem, 4vw, 3rem) 0;
  background: var(--kopf);
  border-bottom: 1px solid var(--linie);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.marke:hover { color: var(--text); text-decoration: none; }
.monogramm {
  font-weight: 850;
  font-size: 1.15rem;
  letter-spacing: -0.12em;
  padding-right: 0.12em;
}

.reiter { display: flex; align-self: stretch; }
.reiter a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 0.25rem;
  color: var(--text-leise);
  font-weight: 450;
  font-size: 0.95rem;
}
.reiter a:hover { color: var(--text); text-decoration: none; }
.reiter a[aria-current="page"] { color: var(--text); }
.reiter a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--verlauf);
}

.knopf-gruen {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--gruen);
  color: #FFFFFF;
  font-weight: 550;
  font-size: 0.95rem;
}
.knopf-gruen:hover { background: var(--gruen-dunkel); color: #FFFFFF; text-decoration: none; }
@media (prefers-color-scheme: dark) { .knopf-gruen, .knopf-gruen:hover { color: #0B1A13; } }

/* Fuß -------------------------------------------------------------------- */
.fuss {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 2rem clamp(1rem, 4vw, 3rem) 2.25rem;
  color: var(--text-leise);
  font-size: 0.875rem;
}
.fuss p { margin: 0; }
.fuss nav { display: flex; gap: 1.25rem; }
.fuss a { color: var(--text-leise); font-weight: 450; }
.fuss a:hover { color: var(--text); }

/* Inhalt ----------------------------------------------------------------- */
.haupt {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 6vh, 3.5rem) 1rem 1rem;
}

.buehne { margin-bottom: 2rem; }

.dachzeile {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.6rem;
  color: var(--gruen);
  font-size: 0.875rem;
  font-weight: 650;
}

.schloss { flex: none; color: var(--gruen); }
.schloss .loch { fill: var(--flaeche); }
.schloss .buegel {
  transform-origin: 32px 21px;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.schloss.offen .buegel { transform: translateY(-3px) rotate(32deg); }

h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2.2rem, 1.45rem + 3.2vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 750;
}
h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.verlauf {
  background: var(--verlauf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.einleitung {
  margin: 0;
  max-width: 34em;
  color: var(--text-leise);
  font-size: 1.1rem;
  line-height: 1.55;
}

.karte {
  margin: 0 0 1rem;
  padding: clamp(1.15rem, 4vw, 1.75rem);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}
.karte > :last-child { margin-bottom: 0; }
.karte p { margin: 0 0 1rem; }

/* Formular --------------------------------------------------------------- */
.feld { margin-bottom: 1.25rem; }

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}

input, select, textarea {
  display: block;
  width: 100%;
  min-height: 2.9rem;
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-feld);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gruen);
  box-shadow: 0 0 0 3px var(--ring);
}
.mono { font-family: var(--schrift-mono); font-size: 0.95rem; }

.feldhinweis {
  margin: 0.4rem 0 0;
  color: var(--text-leise);
  font-size: 0.875rem;
}
.karte .feldhinweis { margin-bottom: 0; }

.zusatz { margin: 0 0 1.5rem; }
.zusatz summary {
  width: fit-content;
  padding: 0.25rem 0;
  color: var(--gruen);
  font-weight: 550;
  cursor: pointer;
}
.zusatz summary:hover { color: var(--gruen-dunkel); }
.zusatz[open] summary { margin-bottom: 0.9rem; }
.zusatz .feld { margin-bottom: 0; }

/* Knöpfe ----------------------------------------------------------------- */
.knopf {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-weight: 550;
  color: var(--knopf-text);
  background: var(--knopf);
  border: 1px solid var(--knopf);
  border-radius: var(--radius-knopf);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.knopf:hover { background: var(--knopf-hover); border-color: var(--knopf-hover); }
.knopf:disabled { opacity: 0.55; cursor: progress; }

.knopf-leise {
  color: var(--text);
  background: var(--flaeche);
  border-color: var(--linie);
}
.knopf-leise:hover { background: var(--gruen-hell); border-color: var(--gruen); }
.knopf-leise:disabled { cursor: default; }

form .knopf[type="submit"] { width: 100%; }

.aktionen { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

.linkzeile { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.linkzeile input { flex: 1 1 15rem; width: auto; font-size: 0.85rem; }

/* Rückmeldungen ---------------------------------------------------------- */
.meldung {
  padding: 0.7rem 0.95rem;
  color: var(--fehler);
  background: var(--fehler-hell);
  border-radius: var(--radius-feld);
}

.hinweis {
  padding-left: 0.85rem;
  color: var(--text-leise);
  border-left: 2px solid var(--gruen);
}
.karte .hinweis { margin-top: 1rem; }

.geheimnis {
  font-size: 1.1rem;
  line-height: 1.5;
  background: var(--gruen-hell);
  border-color: var(--gruen);
  word-break: break-all;
}

/* Klein ------------------------------------------------------------------ */
@media (max-width: 40rem) {
  .kopf { gap: 1rem; }
  .reiter { display: none; }
  .knopf-gruen { padding: 0.5rem 0.9rem; }
}
@media (max-width: 30rem) {
  .aktionen .knopf { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
