/* One stylesheet, no framework. Deliberately plain: the interface should get
   out of the way of the conversation, and every rule here has to be explainable. */

:root {
  --text: #1b1b1b;
  --muted: #5a5a5a;
  --line: #d8d5cf;
  --ground: #faf8f5;
  --card: #ffffff;
  --accent: #2f5d50;
  --accent-text: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1rem 4rem;
  background: var(--ground);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

main { max-width: 42rem; margin: 0 auto; }

h1, h2, h3 { line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.7rem; margin: 0 0 1.25rem; }
h3 { font-size: 1.15rem; margin: 2rem 0 .5rem; }

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

.karte {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

/* Long legal prose is easier to skim when the notice is visually quieter
   than the thing being asked. */
.hinweis { font-size: .95rem; color: var(--muted); }
.hinweis h3 { color: var(--text); }

.kaestchen { display: flex; gap: .75rem; align-items: flex-start; margin: 1.25rem 0; }
.kaestchen input { margin-top: .35rem; width: 1.15rem; height: 1.15rem; flex: none; }
.kaestchen label { cursor: pointer; }
/* The label now carries the document's full wording, so its paragraphs need to
   sit flush with the box rather than bring their own outer spacing. */
.kaestchen label > :first-child { margin-top: 0; }
.kaestchen label > :last-child { margin-bottom: 0; }

.frage { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.frage:first-child { border-top: 0; padding-top: .25rem; }
.frage p { margin: 0 0 1rem; }

.skala { display: flex; gap: .4rem; flex-wrap: wrap; }
.skala button {
  flex: 1 1 2.5rem; min-width: 2.5rem; padding: .6rem 0;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--text); font: inherit; cursor: pointer;
}
.skala button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.enden { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-top: .5rem; }

input[type="range"] { width: 100%; }
textarea { width: 100%; min-height: 6rem; font: inherit; padding: .6rem; border: 1px solid var(--line); border-radius: 6px; }

.wahl { display: flex; flex-direction: column; gap: .5rem; }
.wahl label { display: flex; gap: .6rem; align-items: center; cursor: pointer; }

button.weiter {
  background: var(--accent); color: var(--accent-text);
  border: 0; border-radius: 8px; padding: .8rem 1.6rem;
  font: inherit; font-weight: 600; cursor: pointer;
}
button.weiter:disabled { background: #b9b9b9; cursor: not-allowed; }

.fehler { color: #a3271f; margin-top: 1rem; }
.leise { color: var(--muted); font-size: .9rem; }

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ececec; --muted: #a8a8a8; --line: #3a3a3a;
    --ground: #17181a; --card: #202225; --accent: #6fae9c; --accent-text: #12211c;
  }
}

/* --- the conversation --------------------------------------------------- */

.kopf {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.steuerung { display: flex; gap: .5rem; }

button.klein {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 6px; padding: .4rem .8rem; font: inherit; font-size: .9rem;
  cursor: pointer;
}
button.klein:hover { border-color: var(--accent); }

.hinweis-stumm {
  background: #f6efe2; border: 1px solid #e2d3ae; color: #5a4a20;
  border-radius: 8px; padding: .7rem 1rem; font-size: .92rem; margin: 0 0 1rem;
}

.verlauf { display: flex; flex-direction: column; gap: .75rem; }

.beitrag {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: .9rem 1.1rem; max-width: 85%;
}
.beitrag .wer { font-size: .82rem; color: var(--muted); margin-bottom: .3rem; }
.beitrag p { margin: 0; white-space: pre-wrap; }
.beitrag.eigen { align-self: flex-end; background: #eef3f1; }

/* The mediator is visibly not one of the two. It must be helpful without
   presenting itself as a person (technical-plan.md 4.6), so it gets its own
   shape rather than a third chat bubble. */
.beitrag.mediator {
  align-self: stretch; max-width: none; background: transparent;
  border: 0; border-left: 3px solid var(--accent);
  border-radius: 0; padding: .3rem 0 .3rem 1rem; color: var(--muted);
}

.status { min-height: 1.4rem; color: var(--muted); font-size: .92rem; margin: 1rem 0; }
.senden { display: flex; align-items: center; gap: 1rem; margin-top: .75rem; }

@media (prefers-color-scheme: dark) {
  .beitrag.eigen { background: #26302c; }
  .hinweis-stumm { background: #2e2a1d; border-color: #4b4227; color: #ded0a8; }
}

/* --- the private suggestion --------------------------------------------- */

.vorschlag { border-color: var(--accent); }
.vorschlag > p:first-child { margin-top: 0; font-weight: 600; }

.variante {
  display: block; width: 100%; text-align: left;
  background: var(--ground); border: 1px solid var(--line);
  border-radius: 8px; padding: .8rem 1rem; margin-bottom: .6rem;
  font: inherit; color: var(--text); cursor: pointer;
}
.variante:hover { border-color: var(--accent); }
.variante[aria-pressed="true"] { border-color: var(--accent); background: #eef3f1; }

@media (prefers-color-scheme: dark) {
  .variante[aria-pressed="true"] { background: #26302c; }
}

/* --- the observer view --------------------------------------------------- */

.ereignis {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem; color: var(--muted);
  padding: .25rem 0 .25rem .75rem;
  border-left: 2px solid var(--line);
  margin: .2rem 0;
  word-break: break-word;
}

/* --- Anmeldeseite ----------------------------------------------------------
   Textfelder und Auswahlliste gab es bisher nirgends; der Rest der Anwendung
   kommt mit Knöpfen, Schiebereglern und Textbereichen aus. Eng auf das
   Anmeldeformular begrenzt, damit sich sonst nichts ändert. */
#anmeldung label { display: block; margin-bottom: .35rem; }
#anmeldung input[type="text"],
#anmeldung input[type="email"],
#anmeldung select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  margin-bottom: .5rem;
}
#anmeldung input:focus, #anmeldung select:focus, #anmeldung textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
#anmeldung .frage { margin-bottom: 1.1rem; }
#anmeldung .kaestchen { margin: 1.2rem 0; }
