/* Gruzzi — gemeinsames Stylesheet. Farbwerte aus den App-Assets
   (Assets.xcassets/Farben), alle Paare mit Kontrast >= 7:1 geprüft. */

:root {
  --hintergrund: #ECE9F3;
  --flaeche: #FFFFFF;
  --text: #1D1826;
  --text-schwach: #4B4553;
  --primaer: #3B3068;
  --akzent: #45327E;
  --rand: #CFC9DE;
  --knopf-text: #FFFFFF;
  --erfolg: #12561F;
  --erfolg-flaeche: #E4F4E8;
  --fehler: #8C111C;
  --fehler-flaeche: #FBE9EA;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hintergrund: #131118;
    --flaeche: #26222F;
    --text: #EDEAF4;
    --text-schwach: #C0B9CC;
    --primaer: #4A3D82;
    --akzent: #C3B4F5;
    --rand: #3E3850;
    --knopf-text: #FFFFFF;
    --erfolg: #86E0A0;
    --erfolg-flaeche: #1C2B20;
    --fehler: #FF9EA2;
    --fehler-flaeche: #33191B;
  }
}

* { box-sizing: border-box; }

html {
  font-size: 17px; /* Zielgruppe: Grundschrift bewusst groß */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--hintergrund);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ------------------------------------------------------------- Kopf & Fuß */

.kopf {
  background: var(--primaer);
  padding: 0.6rem 1rem;
}

.leiste {
  max-width: 44rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.marke {
  font-size: 1.35rem;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  padding: 0.4rem 0;
}

.leiste a:not(.marke) {
  color: #FFFFFF;
  text-decoration: underline;
  padding: 0.4rem 0;
}

.fuss {
  margin-top: auto;
  border-top: 1px solid var(--rand);
  padding: 1.25rem 1rem 2rem;
  color: var(--text-schwach);
}

.fuss p {
  max-width: 44rem;
  margin: 0.35rem auto;
}

.fuss a { color: var(--akzent); }

/* ------------------------------------------------------------------ Inhalt */

main {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

h1 { font-size: 1.8rem; line-height: 1.25; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2rem 0 0.5rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 0.35rem; }

a { color: var(--akzent); }

p, li { max-width: 40rem; }

.schwach { color: var(--text-schwach); }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

/* --------------------------------------------------------------- Startseite */

.held {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}

.held-text { flex: 1 1 18rem; }

.held img {
  width: 11rem;
  max-width: 40vw;
  height: auto;
  flex: 0 0 auto;
}

.untertitel {
  font-size: 1.2rem;
  margin: 0.25rem 0 1rem;
}

.merksatz {
  font-weight: 600;
  margin: 1rem 0;
}

/* ------------------------------------------------------------------ Knöpfe */

.knopf,
button.knopf {
  display: inline-block;
  min-height: 48px; /* Touchziel */
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 10px;
  background: var(--primaer);
  color: var(--knopf-text);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.knopf.platzhalter {
  cursor: default;
  opacity: 0.85;
}

button.knopf:disabled { opacity: 0.6; cursor: wait; }

:focus-visible {
  outline: 3px solid var(--akzent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- Formulare */

form label {
  display: block;
  font-weight: 600;
  margin: 1.1rem 0 0.25rem;
}

form .hinweis {
  font-weight: 400;
  color: var(--text-schwach);
  display: block;
  font-size: 0.95rem;
}

input, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 8px;
}

textarea { min-height: 7rem; resize: vertical; }

form button.knopf { margin-top: 1.5rem; }

.meldung-ok,
.meldung-fehler {
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.meldung-ok {
  background: var(--erfolg-flaeche);
  color: var(--erfolg);
  border: 1px solid var(--erfolg);
}

.meldung-fehler {
  background: var(--fehler-flaeche);
  color: var(--fehler);
  border: 1px solid var(--fehler);
}

/* --------------------------------------------------------------- Prüfseite */

.pruef-foto {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--rand);
  display: block;
}

.pruef-aussage {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin: 0.75rem 0;
}

.pruef-aussage .zeichen {
  font-weight: 700;
  flex: 0 0 auto;
}

.zeichen.gut { color: var(--erfolg); }
.zeichen.offen { color: var(--text-schwach); }

details {
  margin: 0.75rem 0;
}

details summary {
  cursor: pointer;
  color: var(--akzent);
  font-weight: 600;
  padding: 0.5rem 0; /* Touchziel */
}

.pruefsumme {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
  background: var(--hintergrund);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.verlauf { list-style: none; padding: 0; margin: 0.5rem 0; }

.verlauf li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rand);
}

.verlauf li:last-child { border-bottom: none; }

.verlauf .wann {
  display: block;
  color: var(--text-schwach);
  font-size: 0.95rem;
}

dl.angaben { margin: 0.5rem 0; }
dl.angaben dt { font-weight: 600; margin-top: 0.75rem; }
dl.angaben dd { margin: 0.15rem 0 0; }
