/* Lösung: Wahlkurs Informatik (barriereärmer) */

/* Schriftgröße vom Browser übernehmen, alles weitere in rem */
html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: Verdana, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #1a1a1a;          /* Kontrast auf Weiß ca. 17:1 */
  background: #ffffff;
}

/* Skip-Link: nur sichtbar, wenn er den Fokus hat */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  padding: 0.5rem 1rem;
  background: #ffffff;
  color: #0b4f9c;
  border: 2px solid #0b4f9c;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}

header {
  background: #eef3fa;
  border-bottom: 3px solid #0b4f9c;
  padding: 0.75rem 1rem;
}

.seitenname {
  margin: 0 0 0.5rem;
  font-weight: bold;
  font-size: 1.25rem;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

nav a {
  display: inline-block;
  padding: 0.5rem 0;        /* größere Klickfläche */
}

main {
  max-width: 40rem;         /* ca. 60 bis 70 Zeichen pro Zeile */
  margin: 0 auto;
  padding: 1rem;
}

h1 { font-size: 2rem;     line-height: 1.2; margin: 1rem 0; }
h2 { font-size: 1.5rem;   line-height: 1.3; margin: 2rem 0 0.5rem; }

img {
  max-width: 100%;
  height: auto;
}

p, li {
  text-align: left;         /* kein Blocksatz */
}

li {
  margin-bottom: 0.5rem;
}

/* Links: Farbe + Unterstreichung, Kontrast auf Weiß ca. 8:1 */
a {
  color: #0b4f9c;
  text-decoration: underline;
}
a:visited {
  color: #5b2a86;
}
a:hover {
  text-decoration-thickness: 3px;
}

/* Fokus immer deutlich sichtbar */
a:focus-visible,
pre:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid #0b4f9c;
  outline-offset: 3px;
}

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

label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

input {
  font: inherit;
  width: 100%;
  max-width: 20rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.5rem;
  border: 2px solid #595959;   /* Rahmen-Kontrast ca. 7:1 */
  border-radius: 4px;
  box-sizing: border-box;
}

.hinweis,
.hilfe {
  margin: 0.25rem 0 0.75rem;
  color: #404040;
}

button {
  font: inherit;
  font-weight: bold;
  min-height: 2.75rem;
  padding: 0.5rem 1.5rem;
  color: #ffffff;
  background: #0b4f9c;         /* weiß auf blau ca. 8:1 */
  border: 2px solid #0b4f9c;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}
button:hover {
  background: #083a73;
}

#meldung {
  font-weight: bold;
}

/* Arbeitsauftrag und Prüfbogen */
.kasten {
  background: #eef3fa;
  border: 2px solid #0b4f9c;
  border-radius: 4px;
  padding: 0.5rem 1rem 1rem;
  margin: 1rem 0;
}

fieldset {
  border: 2px solid #595959;
  border-radius: 4px;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem 1rem;
}

legend {
  font-weight: bold;
  padding: 0 0.5rem;
}

.auswahl {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-bottom: 0.5rem;
}

.auswahl label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  margin: 0;
  padding: 0.5rem 0;
}

input[type="radio"] {
  width: 1.5rem;
  height: 1.5rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: #0b4f9c;
}

/* Anleitung Quelltext: Code, Tasten, Tabelle */
code, pre, kbd {
  font-family: Consolas, "Courier New", monospace;
  font-size: 1rem;
}

pre {
  background: #f2f2f2;
  border: 2px solid #595959;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
}

code {
  background: #f2f2f2;
  padding: 0 0.25rem;
  border-radius: 3px;
}

pre code {
  background: none;
  padding: 0;
}

kbd {
  background: #ffffff;
  border: 2px solid #595959;
  border-radius: 4px;
  padding: 0 0.4rem;
  white-space: nowrap;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

caption {
  font-weight: bold;
  text-align: left;
  padding-bottom: 0.5rem;
}

th, td {
  border: 2px solid #595959;
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: #eef3fa;
}

/* Bemerkungsfeld: nur sichtbar, wenn "Nein" angekreuzt ist.
   Browser ohne :has() zeigen das Feld einfach immer an. */
@supports selector(:has(*)) {
  .feld.notiz {
    display: none;
  }
  fieldset:has(input[value="nein"]:checked) .feld.notiz {
    display: block;
  }
}

/* Dropdown "Welche Barriere ist das?" */
details.barriere {
  background: #eef3fa;
  border-left: 4px solid #0b4f9c;
  border-radius: 4px;
  padding: 0 0.75rem;
  margin: 0.5rem 0 1rem;
}

details.barriere summary {
  color: #0b4f9c;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.5rem 0;
  min-height: 2.75rem;
  box-sizing: border-box;
}

details.barriere summary:focus-visible {
  outline: 3px solid #0b4f9c;
  outline-offset: 3px;
}

#auswertung {
  margin-top: 1rem;
}

textarea {
  font: inherit;
  width: 100%;
  max-width: 30rem;
  min-height: 6rem;
  padding: 0.5rem;
  border: 2px solid #595959;
  border-radius: 4px;
  box-sizing: border-box;
}

footer {
  background: #eef3fa;
  border-top: 3px solid #0b4f9c;
  padding: 1rem;
  margin-top: 2rem;
}
footer p {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1rem;
}

/* Bewegung abschalten, wenn die Person das im System eingestellt hat */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
