:root {
  color-scheme: light dark;
  --text: #1f2328;
  --text-leise: #59636e;
  --hintergrund: #ffffff;
  --flaeche: #f6f8fa;
  --linie: #d1d9e0;
  --markierung: #ffe08a;
  --falsch: #b42318;
  --richtig: #1a7f37;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6edf3;
    --text-leise: #9198a1;
    --hintergrund: #0d1117;
    --flaeche: #161b22;
    --linie: #3d444d;
    --markierung: #6b5300;
    --falsch: #ff7b72;
    --richtig: #56d364;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  background: var(--hintergrund);
  color: var(--text);
  font: 400 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Wie in der untersuchten Seite: automatische Trennung, Notumbruch erlaubt. */
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

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

h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

a {
  color: inherit;
}

code {
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--flaeche);
  padding: 0.1em 0.3em;
  border-radius: 4px;
  hyphens: manual;
  -webkit-hyphens: manual;
}

mark {
  background: var(--markierung);
  color: inherit;
}

.einleitung {
  font-size: 1.15rem;
}

.hinweis {
  color: var(--text-leise);
  font-size: 0.9rem;
}

/* Fehlerfälle: feste Breite, damit der Umbruch auf der falschen Stelle landet. */
.faelle {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.fall {
  border: 1px solid var(--linie);
  border-radius: 8px;
  padding: 1rem;
  background: var(--flaeche);
}

.fall .wort {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  border-right: 2px dashed var(--falsch);
  text-wrap: wrap;
}

.fall dl {
  margin: 0;
  font-size: 0.9rem;
}

.fall dt {
  color: var(--text-leise);
}

.fall dd {
  margin: 0 0 0.25rem;
}

.fall .ist {
  color: var(--falsch);
}

.fall .soll {
  color: var(--richtig);
}

/* Tabelle mit allen Trennstellen */
.tabelle {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--linie);
}

th {
  font-size: 0.9rem;
}

td:not(:first-child) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  hyphens: manual;
  -webkit-hyphens: manual;
}

/* Box ohne Breite: der Browser muss an jeder bekannten Stelle trennen. */
.schmal {
  display: inline-block;
  width: 0;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: normal;
}

/* Überschriften in ziehbaren oder festen Boxen */
.ueberschrift {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: wrap;
}

.ziehbar {
  resize: horizontal;
  overflow: hidden;
  width: 22rem;
  min-width: 6rem;
  max-width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: var(--flaeche);
}

.ziehbar.eng {
  width: 12rem;
}

.serie {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.serie .ueberschrift {
  padding: 0.5rem;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: var(--flaeche);
  box-sizing: content-box;
}

.vergleich {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

figure {
  margin: 0;
}

figcaption {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.pretty {
  text-wrap: pretty;
}

.manuell {
  hyphens: manual;
  -webkit-hyphens: manual;
}

.grenzen {
  hyphenate-limit-chars: auto 6 3;
  -webkit-hyphenate-limit-before: 6;
  -webkit-hyphenate-limit-after: 3;
}
