/* Barrierearme Umfrage: hoher Kontrast, große Schrift, große Bedienflächen */

:root {
  --bg: #fff;
  --fg: #000;
  --accent: #00008b;
  --accent-fg: #fff;
  --focus: #00008b;
  --border: #000;
}

html[data-theme="dark"] {
  --bg: #000;
  --fg: #fff;
  --accent: #fff;
  --accent-fg: #000;
  --focus: #ffd400;
  --border: #fff;
}

html {
  font-size: 125%; /* 20px */
}
html[data-scale="125"] { font-size: 156.25%; }
html[data-scale="150"] { font-size: 187.5%; }
html[data-scale="175"] { font-size: 218.75%; }
html[data-scale="200"] { font-size: 250%; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

main {
  max-width: 40em;
  margin: 0 auto;
  padding: 1rem;
}

h1 {
  font-size: 1.6rem;
  line-height: 1.3;
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1.3rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
}
html[data-theme="dark"] a {
  color: var(--fg);
}

ul.plain {
  padding-left: 1.2rem;
}

.big {
  font-size: 1.3rem;
  font-weight: 600;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Fokus: sehr deutlich, auf allen fokussierbaren Elementen */
:focus,
:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.progress {
  font-weight: 700;
  margin: 0;
}

.section {
  margin: 0 0 1rem;
}

fieldset.question {
  border: 0;
  margin: 1rem 0;
  padding: 0;
  min-width: 0;
}

.question {
  margin: 1rem 0;
}

.qtext {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 0;
  margin-bottom: 0.5rem;
}

.hint {
  margin: 0 0 0.75rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.options.horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.35rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 0.4rem;
}

.option:has(input:checked) {
  border-width: 5px;
  padding: calc(0.35rem - 3px) calc(0.75rem - 3px);
  font-weight: 700;
}

.option input[type="radio"],
.option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 0;
  accent-color: var(--accent);
}

.option label {
  flex: 1 1 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.scale .option {
  flex: 1 1 8em;
}

.other-field {
  margin-top: 0.75rem;
}

.other-field label,
label.qtext {
  display: block;
  margin-bottom: 0.4rem;
}

.other-field label {
  font-weight: 700;
}

input[type="text"],
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 3px solid var(--border);
  border-radius: 0.4rem;
}

textarea {
  resize: vertical;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

button {
  min-height: 48px;
  min-width: 48px;
  padding: 0.6rem 1.25rem;
  font: inherit;
  font-weight: 700;
  color: var(--fg);
  background: var(--bg);
  border: 3px solid var(--border);
  border-radius: 0.4rem;
  cursor: pointer;
}

button.primary {
  color: var(--accent-fg);
  background: var(--accent);
}

button:disabled {
  opacity: 1;
  text-decoration: line-through;
  cursor: not-allowed;
}

#alert {
  margin-top: 1rem;
  font-weight: 700;
}

#alert:not(:empty) {
  padding: 0.75rem 1rem;
  border: 4px solid var(--border);
  border-radius: 0.4rem;
}

ul.keys li {
  margin-bottom: 0.4rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
