/* Zustimmungswahl – Gestaltung
   Bildsprache eines Stimmzettels: Weiß, Schwarz, Linien, Kästchen,
   und ein rotes Kreuz als einzige Akzentfarbe.
   Schrift: Fira Sans (SIL Open Font License).
   Ohne JavaScript; das Menü funktioniert mit CSS allein. */

/* Schrift – je Schnitt zwei Dateien: Latein mit Symbolen und
   Griechisch/Kyrillisch/Vietnamesisch. Die zweite lädt der Browser
   nur, wenn eine Seite diese Zeichen tatsächlich enthält. */

@font-face { font-family: "Fira Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/fira-sans-regular.woff") format("woff");
  unicode-range: U+0000-024F, U+0259, U+02B0-036F, U+2000-22FF, U+25A0-25FF, U+FB00-FB06; }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/fira-sans-regular-erweitert.woff") format("woff");
  unicode-range: U+0370-04FF, U+1E00-1EFF; }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("fonts/fira-sans-italic.woff") format("woff");
  unicode-range: U+0000-024F, U+0259, U+02B0-036F, U+2000-22FF, U+25A0-25FF, U+FB00-FB06; }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("fonts/fira-sans-italic-erweitert.woff") format("woff");
  unicode-range: U+0370-04FF, U+1E00-1EFF; }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/fira-sans-semibold.woff") format("woff");
  unicode-range: U+0000-024F, U+0259, U+02B0-036F, U+2000-22FF, U+25A0-25FF, U+FB00-FB06; }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/fira-sans-semibold-erweitert.woff") format("woff");
  unicode-range: U+0370-04FF, U+1E00-1EFF; }

:root {
  --papier: #fdfdfd;
  --tinte: #050505;
  --grau: #5c5c5c;
  --linie: #050505;
  --feine-linie: #c8c8c8;
  --kreuz: #d4140b;

  /* Stärke der schwarzen Linien (Kopf, Überschriften, Tabellen, Fuß) */
  --strich: 1px;

  --schrift: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  --breite: 44rem;
  --rand: 1.5rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #101010;
    --tinte: #f2f2f2;
    --grau: #a3a3a3;
    --linie: #f2f2f2;
    --feine-linie: #3d3d3d;
    --kreuz: #ff4a3d;
  }
  /* Grafiken haben einen weißen Hintergrund – sie bekommen eine helle Fläche */
  main img { background: #fff; padding: 0.75rem; }
}

/* Grundlage */

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift);
  line-height: 1.6;
  font-kerning: normal;
}

p, li, dd, blockquote {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 7 3 3;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--kreuz);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { color: var(--kreuz); }

strong { font-weight: 600; }

/* Kästchen mit Kreuz – Logo und Navigation.
   Gleiche Geometrie wie die Grafik „einfach – besser – fair“:
   schwarzer Rahmen, darüber ein rotes Kreuz von Ecke zu Ecke. */

.kaestchen {
  flex: none;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.45em;
  overflow: visible;
  vertical-align: -0.08em;
}
.kaestchen .rahmen {
  fill: none;
  stroke: currentColor;
  stroke-width: 8;
}
.kaestchen .kreuz {
  fill: none;
  stroke: var(--kreuz);
  stroke-width: 9.5;
  opacity: 0;
}

/* Kopf */

.kopf {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 1.75rem var(--rand) 0;
}

.marke {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--tinte);
}
.marke:hover { color: var(--tinte); }
.marke .kaestchen { width: 0.9em; height: 0.9em; margin-right: 0.5em; }
.marke .kaestchen .rahmen { stroke-width: 9; }
.marke .kaestchen .kreuz { stroke-width: 10; opacity: 1; }

/* Hauptnavigation: oben die Bereiche, darunter die Seiten des
   aktuellen Bereichs. Zeigt man auf einen anderen Bereich,
   erscheinen an derselben Stelle dessen Seiten. */

.bereiche {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  column-gap: 2rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-bottom: var(--strich) solid var(--linie);
  min-height: 5.9rem;
}
/* Ohne aktuellen Bereich (Startseite) keine leere Zeile freihalten */
.bereiche:not(:has(.aktuell)) { min-height: 0; }
.bereich { display: contents; }

.bereich-link {
  order: 0;
  display: inline-flex;
  align-items: center;
  padding: 0 0 0.7rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--tinte);
}
.bereich-link:hover { color: var(--tinte); }
.bereich-link:hover .kreuz { opacity: 1; }
.aktuell > .bereich-link .kreuz { opacity: 1; }

.unterseiten {
  order: 1;
  flex-basis: 100%;
  display: none;
  flex-wrap: wrap;
  gap: 0.2rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0.6rem 0 0.8rem;
  border-top: 1px solid var(--feine-linie);
}
.unterseiten li { margin: 0; text-align: left; white-space: nowrap; }
.unterseiten a {
  text-decoration: none;
  color: var(--tinte);
}
.unterseiten a:hover {
  color: var(--kreuz);
}
.unterseiten a[aria-current="page"] {
  text-decoration: underline 2px var(--kreuz);
  text-underline-offset: 0.25em;
}

.bereich.aktuell > .unterseiten,
.bereich:hover > .unterseiten,
.bereich:focus-within > .unterseiten { display: flex; }

/* Zeigt man auf einen anderen Bereich, weicht die Zeile des aktuellen */
.bereiche:has(> .bereich:not(.aktuell):hover) > .aktuell > .unterseiten,
.bereiche:has(> .bereich:not(.aktuell):focus-within) > .aktuell > .unterseiten { display: none; }

/* Inhalt */

.seite {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 2.5rem var(--rand) 3rem;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  hyphens: manual;
}
h1 {
  font-size: 2.6rem;
  margin: 0 0 1.75rem;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.5rem;
  margin: 3rem 0 1rem;
  padding-top: 0.6rem;
  border-top: var(--strich) solid var(--linie);
}
h3 {
  font-size: 1.15rem;
  margin: 2.2rem 0 0.6rem;
}
h4 {
  font-size: 1rem;
  margin: 1.8rem 0 0.4rem;
}

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.3rem; }
li { margin: 0.3em 0; }

blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.2rem;
  border-left: 3px solid var(--kreuz);
  font-style: italic;
}

code {
  font-family: ui-monospace, "DejaVu Sans Mono", monospace;
  font-size: 0.88em;
}
pre {
  padding: 0.8rem 1rem;
  overflow-x: auto;
  border: 1px solid var(--feine-linie);
  line-height: 1.4;
}

hr {
  border: 0;
  border-top: var(--strich) solid var(--linie);
  margin: 3rem 0;
}

/* Inhaltsverzeichnis einer Seite: eine Liste mit kleinen Kästchen */

.inhalt {
  margin: 0 0 2.5rem;
  line-height: 1.4;
}
.inhalt > p {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grau);
}
.inhalt ul { list-style: none; margin: 0; padding: 0; }
.inhalt ul ul { display: none; }
.inhalt li {
  position: relative;
  margin: 0;
  padding: 0.15em 0 0.15em 1.3em;
  text-align: left;
}
.inhalt li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.53em;
  width: 0.55em;
  height: 0.55em;
  border: 1.5px solid currentColor;
  box-sizing: border-box;
}
.inhalt a { text-decoration: none; }
.inhalt a:hover { color: var(--kreuz); }

/* Bilder */

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
}
figure { margin: 2.25rem 0; }
figure img { margin: 0 auto; }
figcaption {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--grau);
  text-align: center;
}

/* Tabellen */

.tabelle {
  overflow-x: auto;
  margin: 1.75rem 0;
}
table {
  min-width: 60%;
  border-collapse: collapse;
  font-variant-numeric: lining-nums tabular-nums;
}
th, td {
  padding: 0.4rem 0.9rem 0.4rem 0;
  border-bottom: 1px solid var(--feine-linie);
  vertical-align: top;
}
th {
  font-weight: 600;
  vertical-align: bottom;
  border-bottom: var(--strich) solid var(--linie);
  hyphens: auto;
}
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: var(--strich) solid var(--linie); }

/* Literatur */

#refs {
  font-size: 0.9rem;
  line-height: 1.5;
}
.csl-entry {
  margin: 0 0 0.6rem;
  padding-left: 1.5rem;
  text-indent: -1.5rem;
  text-align: left;
}
#refs a { text-decoration-thickness: 1px; word-break: break-word; }

/* Übersicht aller Seiten auf der Startseite */

.uebersicht {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.5rem 2rem;
  margin: 3rem 0 0;
  padding-top: 1rem;
  border-top: var(--strich) solid var(--linie);
}
.uebersicht h2 {
  display: flex;
  align-items: center;
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
  font-size: 1.1rem;
}
.uebersicht ul { list-style: none; margin: 0; padding: 0; }
.uebersicht li { margin: 0.25em 0; text-align: left; }

/* Fuß */

.fuss {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 var(--rand) 2.5rem;
  font-size: 0.88rem;
  color: var(--grau);
}
.fuss p {
  margin: 0;
  padding-top: 1rem;
  border-top: var(--strich) solid var(--linie);
  text-align: left;
}
.fuss a { color: var(--grau); }
.fuss a:hover { color: var(--kreuz); }

/* Schmale Bildschirme */

@media (max-width: 34rem) {
  :root { --rand: 1rem; }
  html { font-size: 106.25%; }
  h1 { font-size: 2rem; }
  .bereiche { column-gap: 1.25rem; min-height: 0; }
  .bereich-link { font-size: 1rem; }
  th { hyphens: manual; }
}

/* Druck */

@media print {
  html { font-size: 10.5pt; }
  body { background: #fff; color: #000; }
  .kopf nav, .inhalt, .fuss { display: none; }
  .seite { max-width: none; padding: 1.5rem 0 0; }
  .seite a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }
  h2, h3 { break-after: avoid; }
  img, table, figure { break-inside: avoid; }
}
