div.header
{
    margin-top: 0em;
    margin-bottom: 1em;
}

div.header img
{
  width: 400px; max-width:100%
}


:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --border: #d9dde3;
  --track: #e5e7eb;
  --thumb: #374151;
  --gelb: #f5c518;
  --blau: #2f6fdf;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

main {
  max-width: 720px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
}

.intro {
  margin: -0.75rem 0 1.5rem;
  font-style: italic;
}

.loader {
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: #fff7e0;
  border: 1px solid #f0d58a;
  border-radius: 8px;
}

.questions {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: frage;
}

.question {
  counter-increment: frage;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem 1.25rem;
  margin-bottom: 1rem;
}

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

.question-text::before {
  content: counter(frage) ". ";
  color: var(--muted);
}

.summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}

.summary p {
  margin: 0.25rem 0;
}

.loader-status {
  margin: 0.5rem 0 0;
  color: #9a3412;
}

.evaluation {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}

.evaluation.locked {
  filter: blur(6px);
  opacity: 0.45;
  user-select: none;
  pointer-events: none;
}

.evaluation {
  transition: filter 0.4s, opacity 0.4s;
}

.evaluation h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.results {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.result {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--muted);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.result h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.result p {
  margin: 0;
}

.result.highlight {
  border: 2px solid var(--blau);
  background: #eaf1fd;
  color: var(--text);
}

.footer {
  max-width: 720px;
  margin: 2.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer p {
  margin: 0.25rem 0;
}

.footer a {
  color: var(--blau);
}

/* Row: Nein [Slider] Ja. Equal side columns keep the slider exactly
   centred, so it lines up with the color circle above it. */
.answer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.answer-row .label:first-child {
  justify-self: end;
}

.answer-row .label:last-child {
  justify-self: start;
}

.label {
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  color: var(--muted);
}

.label.active {
  color: var(--text);
}

/* Color indicator, between question text and slider.
   Hidden with visibility so the space is reserved and nothing jumps. */
.color {
  display: flex;
  justify-content: center;
  margin-bottom: 0.6rem;
  visibility: hidden;
}

.color.visible {
  visibility: visible;
}

.swatch {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.swatch.gelb { background: var(--gelb); }
.swatch.blau { background: var(--blau); }

/* Slider (two-position switch) */
.slider {
  position: relative;
  width: 128px;
  height: 30px;
  border: none;
  border-radius: 15px;
  background: var(--track);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.slider:focus-visible {
  outline: 2px solid var(--blau);
  outline-offset: 2px;
}

.slider .thumb {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  border-radius: 50%;
  background: #b0b6bf;
  transition: left 0.2s, margin-left 0.2s, background 0.2s;
}

.slider[data-value="nein"] .thumb {
  left: 3px;
  margin-left: 0;
  background: var(--thumb);
}

.slider[data-value="ja"] .thumb {
  left: calc(100% - 27px);
  margin-left: 0;
  background: var(--thumb);
}

@media (max-width: 480px) {
  .answer-row {
    gap: 0.5rem;
  }
}
