/* Reviewer-Website – ein Lesearbeitsplatz (Pflichtenheft Abschnitt 7). Keine externen Schriften, keine Bilder. */

:root {
  --papier: #FBFBF8;
  --tinte: #1B2430;
  --linie: #D9DDE3;
  --gedaempft: #5F6B7A;
  --ein: #1F6F5C;
  --aus: #9B2D3A;
  --unklar: #B07A12;
  --verweis: #2B4C8C;
  --flaeche: #F2F3EF;
  --treffer: #F3E7C4;
  --luecke: #F4D9DC;
  --auf-farbe: #FFFFFF;
  --lesen: Charter, "Iowan Old Style", "Source Serif 4", Cambria, Georgia, serif;
  --bedienen: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #14181E;
    --tinte: #E4E7EB;
    --linie: #333B46;
    --gedaempft: #9AA5B2;
    --ein: #4FB394;
    --aus: #E07A87;
    --unklar: #E0AE4A;
    --verweis: #8FAEEB;
    --flaeche: #1C222A;
    --treffer: #4A3F1E;
    --luecke: #4D2A30;
    --auf-farbe: #10141A;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--bedienen);
  font-size: 1rem;
  line-height: 1.45;
}

a { color: var(--verweis); text-underline-offset: 0.15em; }

:focus-visible {
  outline: 3px solid var(--verweis);
  outline-offset: 2px;
  border-radius: 2px;
}

.sprung {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--papier);
  padding: 0.5rem 1rem;
  z-index: 20;
}
.sprung:focus { left: 1rem; }

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

/* Kopf */
.kopf {
  border-bottom: 1px solid var(--linie);
  padding: 0.5rem 1rem;
}
.kopf-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.projektname { margin: 0; font-weight: 600; }
.kopf nav ul, .unternavigation ul, .menue {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem;
}
.kopf nav a, .unternavigation a { text-decoration: none; color: var(--tinte); padding: 0.25rem 0; display: inline-block; }
.kopf nav a[aria-current="page"], .unternavigation a[aria-current="page"] {
  border-bottom: 2px solid var(--verweis);
  color: var(--verweis);
}
.nutzer { display: flex; align-items: center; gap: 0.75rem; color: var(--gedaempft); }
.nutzer form, .projektwahl { margin: 0; }
.projektwahl { display: flex; gap: 0.5rem; align-items: center; }

main { padding: 1rem; max-width: 76rem; margin: 0 auto; }
main:focus { outline: none; }

h1 { font-size: 1.5rem; font-weight: 600; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.2rem; font-weight: 600; margin: 1.5rem 0 0.75rem; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }

.schmal { max-width: 34rem; }
.leise-text { color: var(--gedaempft); font-size: 0.9rem; }

/* Meldungen */
.meldung {
  border-left: 4px solid var(--verweis);
  background: var(--flaeche);
  padding: 0.6rem 0.9rem;
  margin: 0 0 1rem;
  max-width: 60rem;
}
.meldung.fehler { border-left-color: var(--aus); }

/* Formulare */
.formular { max-width: 30rem; }
.feld { margin: 0 0 0.9rem; }
.feld label { display: block; margin-bottom: 0.25rem; }
input[type="text"], input[type="password"], input[type="number"], input[type="search"], input[type="file"], select, textarea {
  font: inherit;
  color: var(--tinte);
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: 4px;
  padding: 0.45rem 0.55rem;
  max-width: 100%;
}
.feld input:not([type="checkbox"]), .feld textarea { width: 100%; }
textarea { resize: vertical; }
button {
  font: inherit;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid var(--linie);
  background: var(--flaeche);
  color: var(--tinte);
  padding: 0.45rem 0.9rem;
}
button.haupt { background: var(--verweis); color: var(--auf-farbe); border-color: var(--verweis); }
button.leise { background: transparent; border-color: transparent; color: var(--verweis); text-decoration: underline; padding: 0.25rem; }
.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
fieldset { border: 1px solid var(--linie); border-radius: 4px; margin: 0 0 1rem; padding: 0.5rem 0.9rem; }
.wahl { margin-right: 1rem; white-space: nowrap; }
kbd {
  font-family: var(--bedienen);
  font-size: 0.75em;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0 0.3em;
  opacity: 0.8;
}

/* Tabellen */
.tabelle-rahmen { overflow-x: auto; }
table { border-collapse: collapse; margin: 0 0 1rem; min-width: 20rem; }
th, td { text-align: left; padding: 0.4rem 0.75rem 0.4rem 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
thead th { font-weight: 600; color: var(--gedaempft); }
.zahl { text-align: right; font-variant-numeric: tabular-nums; }
dl.zahlen { display: grid; grid-template-columns: max-content max-content; gap: 0.25rem 1.5rem; font-variant-numeric: tabular-nums; }
dl.zahlen dt { color: var(--gedaempft); }
dl.zahlen dd { margin: 0; text-align: right; }

.votum-marke { font-weight: 600; }
.votum-ein { color: var(--ein); }
.votum-aus { color: var(--aus); }
.votum-unklar { color: var(--unklar); }

/* Titellose Werke und geschätzte Sprache */
.hinweis-marke {
  display: inline-block;
  font-family: var(--bedienen);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gedaempft);
  border: 1px dashed var(--gedaempft);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
}
.werktitel.kein-titel { font-size: 1.1rem; font-weight: 400; }
.ersatzangabe { color: var(--gedaempft); }
.geschaetzt .erklaerung { color: var(--gedaempft); font-style: italic; }

/* Sichten */
.seite-sichten main { padding-bottom: 9rem; }
.sichten-raster {
  display: grid;
  grid-template-columns: minmax(0, 72ch) minmax(16rem, 22rem);
  gap: 2rem;
  justify-content: space-between;
}
.werktext { font-family: var(--lesen); font-size: 1.125rem; line-height: 1.6; max-width: 72ch; }
.werkkennung { font-family: var(--bedienen); font-size: 0.85rem; color: var(--gedaempft); margin: 0 0 0.25rem; }
.werktitel { font-family: var(--lesen); font-size: 1.6rem; line-height: 1.3; font-weight: 600; margin: 0 0 0.5rem; }
.werkmeta { font-family: var(--bedienen); font-size: 0.9rem; color: var(--gedaempft); margin: 0 0 1.25rem; }
.zusammenfassung p { margin: 0 0 1em; }
.zusammenfassung.leer .ohne { border-left: 4px solid var(--unklar); padding-left: 0.75rem; }
.verweise { font-family: var(--bedienen); font-size: 0.9rem; }
.luecken-hinweis { font-family: var(--bedienen); font-size: 0.85rem; color: var(--gedaempft); }
mark { color: inherit; border-radius: 2px; padding: 0 0.1em; }
mark.treffer { background: var(--treffer); }
mark.luecke { background: var(--luecke); outline: 1px dotted var(--aus); cursor: help; }
.ohne-hervorhebung mark.treffer { background: transparent; }

.seitenspalte { font-size: 0.95rem; }
.seitenspalte details { border-top: 1px solid var(--linie); padding: 0.5rem 0; }
.seitenspalte summary { cursor: pointer; font-weight: 600; padding: 0.25rem 0; }
.kriterien { list-style: none; padding: 0; margin: 0.5rem 0; }
.kriterien li { margin: 0 0 0.4rem; }
.kriterien label { display: flex; gap: 0.4rem; align-items: baseline; cursor: pointer; }
.kriterien-aus.wahl-aktiv { outline: 2px solid var(--aus); outline-offset: 4px; border-radius: 4px; }
.hilfe { color: var(--gedaempft); font-size: 0.85rem; }
.eigenes-votum { border-left: 4px solid currentColor; padding-left: 0.6rem; }

.entscheidungsleiste {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--papier);
  border-top: 1px solid var(--linie);
  padding: 0.4rem 1rem 0.75rem;
  z-index: 10;
}
.fortschritt { display: flex; align-items: center; gap: 0.75rem; max-width: 76rem; margin: 0 auto 0.4rem; font-size: 0.85rem; color: var(--gedaempft); font-variant-numeric: tabular-nums; }
.fortschritt progress { flex: 1; height: 3px; appearance: none; border: 0; background: var(--linie); }
.fortschritt progress::-webkit-progress-bar { background: var(--linie); }
.fortschritt progress::-webkit-progress-value { background: var(--verweis); }
.fortschritt progress::-moz-progress-bar { background: var(--verweis); }
.tasten {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.6rem;
  max-width: 76rem;
  margin: 0 auto;
}
.taste {
  border: 0;
  color: var(--auf-farbe);
  font-weight: 600;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
}
.taste.ein { background: var(--ein); }
.taste.aus { background: var(--aus); }
.taste.unklar { background: var(--unklar); }
.zurueck { align-self: center; padding: 0.5rem 0.75rem; white-space: nowrap; }
.zurueck.inaktiv { color: var(--gedaempft); }
.tasten-inline { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tasten-inline .taste { min-width: 9rem; }

/* Konflikte */
.voten-nebeneinander { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.votum-karte { border: 1px solid var(--linie); border-top: 4px solid currentColor; border-radius: 4px; padding: 0.5rem 0.9rem; color: var(--tinte); }
.votum-karte.votum-ein { border-top-color: var(--ein); }
.votum-karte.votum-aus { border-top-color: var(--aus); }
.votum-karte.votum-unklar { border-top-color: var(--unklar); }
.votum-karte .wer { color: var(--gedaempft); margin: 0; font-size: 0.9rem; }
.votum-karte .was { font-size: 1.2rem; font-weight: 600; margin: 0.25rem 0; }
.votum-karte .notiz { font-family: var(--lesen); }
.werk-zusammenfassung { max-width: 72ch; font-family: var(--lesen); }
.zeile { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* Schmale Bildschirme */
@media (max-width: 52rem) {
  .sichten-raster { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .werktitel { font-size: 1.35rem; }
  .tasten { grid-template-columns: 1fr 1fr 1fr; }
  .zurueck { grid-column: 1 / -1; text-align: center; padding: 0.25rem; }
  .taste kbd { display: none; }
  .seite-sichten main { padding-bottom: 11rem; }
}

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

/* Stufe 2b: Sprache, Volltext, Dubletten, PRISMA */
.sprachfeld { border: 1px solid var(--linie); border-radius: 4px; padding: 0.5rem 0.75rem; margin: 0.5rem 0 0.75rem; }
.sprachfeld legend { font-weight: 600; padding: 0 0.25rem; }
.sprachwahl { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center; margin-bottom: 0.5rem; }
.sprachwahl .wahl { margin-right: 0; }
.sprache-andere { width: 9rem; padding: 0.2rem 0.4rem; }
.sprache-knopf { font-size: 0.9rem; padding: 0.3rem 0.7rem; }
.herkunft { color: var(--gedaempft); font-size: 0.85rem; margin: 0.5rem 0 0.25rem; line-height: 1.5; }
.sprache-gesetzt { font-weight: 600; }
.tasten.zwei { grid-template-columns: 1fr 1fr auto; }
.volltext-verweis { font-family: var(--bedienen); font-size: 0.95rem; border-left: 4px solid var(--verweis); padding-left: 0.6rem; }
.stand { font-weight: 600; }
.stand-beschafft { color: var(--ein); }
.stand-nicht_beschaffbar { color: var(--aus); }
.stand-offen { color: var(--unklar); }
.zeile.klein { margin: 0 0 0.35rem; gap: 0.4rem; }
.zeile.klein input[type="text"] { width: 14rem; }
.schmal-zahl { width: 5rem; }
table.vergleich td { max-width: 30rem; }
table.vergleich tr.unterschied th, table.vergleich tr.unterschied td { background: var(--treffer); }
table.vergleich tr.unterschied th::after { content: " ≠"; color: var(--aus); }
.dublettenpaar { border-top: 1px solid var(--linie); padding-top: 0.5rem; margin-top: 1.5rem; }
.entschieden { color: var(--gedaempft); }
td.details code { font-size: 0.8rem; white-space: pre-wrap; word-break: break-word; }
.hinweis-text { border-left: 4px solid var(--unklar); padding-left: 0.75rem; max-width: 60rem; }
figure.prisma { margin: 0 0 1.5rem; max-width: 52rem; }
figure.prisma figcaption { color: var(--gedaempft); font-size: 0.85rem; }
.prisma-diagramm { width: 100%; height: auto; font-family: var(--bedienen); font-size: 14px; font-variant-numeric: tabular-nums; }
.prisma-diagramm .kasten { fill: var(--papier); stroke: var(--tinte); stroke-width: 1.2; }
.prisma-diagramm .kasten.ergebnis { stroke: var(--ein); stroke-width: 2; }
.prisma-diagramm .band { fill: var(--flaeche); stroke: var(--linie); }
.prisma-diagramm .band-text { fill: var(--gedaempft); font-size: 12px; font-weight: 600; }
.prisma-diagramm text { fill: var(--tinte); }
.prisma-diagramm tspan.kopf { font-weight: 600; }
.prisma-diagramm .pfeil { stroke: var(--gedaempft); stroke-width: 1.4; }
.prisma-diagramm .spitze { fill: var(--gedaempft); }

/* Abgabe und Pilot (Stufe 2d-1) */
.kennzahlen { display: grid; grid-template-columns: max-content max-content; gap: 0.25rem 1.5rem; margin: 1rem 0; }
.kennzahlen dt { color: var(--gedaempft); }
.kennzahlen dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.abgabe fieldset { margin: 1rem 0; }
.pilot-abweichung { border-top: 1px solid var(--linie); padding-top: 0.75rem; margin-top: 1rem; }
.eintraege li { margin-bottom: 0.75rem; }
