/* Gruzzi Radio Studio. Farben wie das Gruzzi-Admin: Petrol als Akzent, Papierweiß als Grund.
   Ruhig und groß: Grundschrift 17 px, Bedienelemente mindestens 48 px hoch. Keine Verläufe,
   keine externen Ressourcen, kein JavaScript. */

:root {
  color-scheme: light dark;
  --grund: #f4f3ef;
  --karte: #ffffff;
  --text: #1c1b18;
  --schwach: #5c5b55;
  --rand: #dedcd4;
  --feldrand: #8f8d84;
  --akzent: #0a5c3e;
  --akzent-text: #ffffff;
  --akzent-zart: #e3efe9;
  --gut: #1a7a4a;
  --gut-zart: #e5f3ea;
  --warn: #8a5300;
  --warn-rand: #c98a1b;
  --warn-zart: #fff4d6;
  --schlecht: #b3261e;
  --schlecht-zart: #fbe9e7;
  --auf-schlecht: #ffffff;
  --neutral-zart: #eeede8;
  --fokus: #1c1b18;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #151513;
    --karte: #201f1d;
    --text: #ecebe6;
    --schwach: #b0afa7;
    --rand: #3a3934;
    --feldrand: #77766f;
    --akzent: #4fae85;
    --akzent-text: #10130f;
    --akzent-zart: #1d3229;
    --gut: #6fcf97;
    --gut-zart: #1b3326;
    --warn: #f0b860;
    --warn-rand: #c98a1b;
    --warn-zart: #3a2f1a;
    --schlecht: #ff8a80;
    --schlecht-zart: #3a1d1b;
    --auf-schlecht: #1c1b18;
    --neutral-zart: #2a2926;
    --fokus: #ecebe6;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--akzent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

h1 { font-size: 27px; line-height: 1.25; margin: 8px 0 16px; }
h2 { font-size: 21px; line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 8px; }
p { margin: 0 0 12px; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
}
.mono { word-break: break-all; }

/* Sprungmarke für Tastatur und Bildschirmleser */
.sprungmarke {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  background: var(--karte);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid var(--akzent);
}
.sprungmarke:focus { left: 16px; }

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

/* ------------------------------------------------------------------ Kopf und Navigation */
.kopf { background: var(--akzent); color: var(--akzent-text); }
.kopf :focus-visible { outline-color: var(--akzent-text); }
.kopf-innen { max-width: 980px; margin: 0 auto; padding: 10px 16px 0; }
.marke {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--akzent-text);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}
.navigation { max-width: 980px; margin: 0 auto; padding: 0 8px 8px; }
.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}
.navigation a,
.navigation button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  color: var(--akzent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.navigation a:hover,
.navigation button:hover { text-decoration: underline; text-underline-offset: 6px; }
.navigation a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}
.navigation form { margin: 0; }

/* ------------------------------------------------------------------ Inhalt */
main {
  display: block;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}
main:focus { outline: none; }

.einleitung { font-size: 18px; max-width: 46em; }
.zurueck { margin: 0 0 4px; }
.zurueck a { display: inline-flex; align-items: center; min-height: 48px; }

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 14px;
  padding: 18px;
  margin: 0 0 18px;
}
.karte > :last-child { margin-bottom: 0; }
.schmal { max-width: 520px; }

.hilfe { color: var(--schwach); font-size: 16px; margin: 6px 0 12px; max-width: 46em; }
.klein { font-size: 15px; color: var(--schwach); }

/* Meldungen */
.banner {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 18px;
  font-weight: 600;
  border: 2px solid;
  border-left-width: 8px;
}
.banner-ok { background: var(--gut-zart); border-color: var(--gut); }
.banner-fehler { background: var(--schlecht-zart); border-color: var(--schlecht); }
.banner ul { margin: 6px 0 0; padding-left: 22px; }
.banner li { margin: 4px 0; }

/* Status als Text in einem Abzeichen, nie nur über die Farbe */
.status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid var(--rand);
  background: var(--neutral-zart);
  color: var(--text);
  white-space: nowrap;
}
.status-gut { background: var(--gut-zart); border-color: var(--gut); }
.status-wartet { background: var(--warn-zart); border-color: var(--warn-rand); }
.status-schlecht { background: var(--schlecht-zart); border-color: var(--schlecht); }
.status-arbeit { background: var(--akzent-zart); border-color: var(--akzent); }
.status-aus { background: var(--neutral-zart); border-color: var(--rand); }

/* Wertelisten */
.werte { margin: 0 0 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 16px; }
.werte dt { font-weight: 700; font-size: 15px; color: var(--schwach); margin-top: 8px; }
.werte dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 700px) {
  .werte { grid-template-columns: 15em minmax(0, 1fr); }
  .werte dt { margin-top: 0; padding: 6px 0; }
  .werte dd { padding: 6px 0; }
}

/* Listen von Einträgen */
.liste { list-style: none; margin: 0; padding: 0; }
.listeneintrag { padding: 14px 0; border-bottom: 1px solid var(--rand); }
.listeneintrag:first-child { padding-top: 0; }
.listeneintrag:last-child { border-bottom: 0; padding-bottom: 0; }
.eintrag-kopf { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 4px; }
.eintrag-titel { font-weight: 700; font-size: 18px; min-height: 48px; display: inline-flex; align-items: center; }
.listeneintrag p { margin: 2px 0; }

/* ------------------------------------------------------------------ Formulare */
form { margin: 0; }
label, legend { display: block; font-weight: 700; margin: 16px 0 6px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

input[type="text"],
input[type="url"],
input[type="password"],
input[type="search"],
input:not([type]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: var(--karte);
  border: 2px solid var(--feldrand);
  border-radius: 10px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
select { appearance: auto; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--fokus);
  outline-offset: 2px;
  border-color: var(--akzent);
}
input[type="file"] {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px;
  font: inherit;
  border: 2px dashed var(--feldrand);
  border-radius: 10px;
  background: var(--karte);
}

/* Ankreuzfelder und Auswahlknöpfe mit großer Fläche */
.auswahl {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  margin: 6px 0;
  padding: 10px 12px;
  font-weight: 500;
  border: 2px solid var(--rand);
  border-radius: 12px;
  background: var(--karte);
  cursor: pointer;
}
.auswahl input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--akzent);
}
.auswahl:has(input:checked) { border-color: var(--akzent); background: var(--akzent-zart); }
.auswahl .klein { display: block; }

/* Knöpfe */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 22px;
  margin: 14px 0 0;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  color: var(--akzent-text);
  background: var(--akzent);
  border: 2px solid var(--akzent);
  border-radius: 12px;
  cursor: pointer;
}
.knopf:hover { text-decoration: underline; }
.knopf-zweit { color: var(--akzent); background: transparent; }
.knopf-gefahr { color: var(--auf-schlecht); background: var(--schlecht); border-color: var(--schlecht); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.knopfreihe form { margin: 0; }
@media (max-width: 599px) {
  .knopf { width: 100%; }
  .knopfreihe { display: block; }
}

/* ------------------------------------------------------------------ Übersicht */
.kennzahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.kennzahl {
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--grund);
}
.kennzahl .zahl { display: block; font-size: 28px; font-weight: 800; line-height: 1.2; }
.kennzahl .einheit { display: block; font-weight: 600; }
.kennzahl.ausserhalb { border: 2px solid var(--warn-rand); background: var(--warn-zart); }
.kennzahl.schlecht { border: 2px solid var(--schlecht); background: var(--schlecht-zart); }

/* ------------------------------------------------------------------ Befunde */
.befunde { list-style: none; margin: 0; padding: 0; }
.befund {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid var(--rand);
  border-left-width: 8px;
  background: var(--neutral-zart);
}
.befund-fehler { background: var(--schlecht-zart); border-color: var(--schlecht); }
.befund-warnung { background: var(--warn-zart); border-color: var(--warn-rand); }
.befund-hinweis { background: var(--neutral-zart); border-color: var(--feldrand); }
.befund a { font-weight: 700; }
.karte.befund { margin: 0 0 18px; padding: 18px; }

/* ------------------------------------------------------------------ Skript */
.skriptzeile {
  border: 2px solid var(--rand);
  border-radius: 12px;
  padding: 4px 16px 14px;
  margin: 0 0 14px;
  background: var(--karte);
}
.skriptzeile legend {
  float: left;
  width: 100%;
  margin: 12px 0 2px;
  font-size: 18px;
}
.skriptzeile legend ~ * { clear: both; }
.skriptzeile.neu { border-style: dashed; }
.mit-befund-fehler { border-color: var(--schlecht); }
.mit-befund-warnung { border-color: var(--warn-rand); }
.zeilenkopf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; }
@media (min-width: 700px) {
  .zeilenkopf { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 9em; }
}
.zeilenkopf label { margin-top: 10px; }

.skript { margin: 0; padding-left: 30px; }
.skript li { margin: 0 0 14px; padding-left: 4px; }
.skript .sprecher { font-weight: 700; }
.quellenangabe { display: block; color: var(--schwach); font-size: 15px; }
.skript li.mit-befund-fehler { border-left: 6px solid var(--schlecht); padding-left: 10px; }
.skript li.mit-befund-warnung { border-left: 6px solid var(--warn-rand); padding-left: 10px; }

.quellenliste { list-style: none; margin: 0; padding: 0; }
.quellenliste li { padding: 8px 0; border-bottom: 1px solid var(--rand); }
.quellenliste li:last-child { border-bottom: 0; }
.kennung {
  display: inline-block;
  min-width: 3em;
  padding: 2px 8px;
  margin-right: 8px;
  border-radius: 8px;
  background: var(--akzent-zart);
  font-weight: 800;
  text-align: center;
}

.hinweisbox {
  border: 2px solid var(--warn-rand);
  border-left-width: 8px;
  background: var(--warn-zart);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
}
.regel {
  border: 2px solid var(--akzent);
  border-left-width: 8px;
  background: var(--akzent-zart);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 8px;
}
.regel ul { margin: 6px 0 0; padding-left: 22px; }

.freigabe { border: 2px solid var(--akzent); }
.ablehnen { border: 2px solid var(--schlecht); }

audio { display: block; width: 100%; margin: 6px 0 12px; }
progress { display: block; width: 100%; height: 24px; margin: 8px 0 12px; accent-color: var(--akzent); }

.quelltext {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 70vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--rand);
  border-radius: 10px;
  background: var(--grund);
}

details { margin: 8px 0 0; }
summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; }
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  padding: 12px;
  margin: 0;
  border: 1px solid var(--rand);
  border-radius: 10px;
  background: var(--grund);
}

/* Tabellen dürfen innerhalb ihres Rahmens seitlich rollen, die Seite nie. */
.tabellenrahmen { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--rand); }
.tabelle th { font-size: 15px; color: var(--schwach); }

.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { padding: 8px 0; border-bottom: 1px solid var(--rand); }
.verlauf li:last-child { border-bottom: 0; }
.verlauf .zeit { color: var(--schwach); font-size: 15px; margin-right: 6px; }
.verlauf .art { font-weight: 700; margin-right: 6px; }

.protokoll { list-style: none; margin: 0; padding: 0; }

.vorschlag { padding: 14px 0; border-bottom: 1px solid var(--rand); }
.vorschlag:last-child { border-bottom: 0; }

.sprecherplatz { border: 2px solid var(--rand); border-radius: 12px; padding: 4px 16px 16px; margin: 0 0 14px; }
.sprecherplatz legend { float: left; width: 100%; margin: 12px 0 4px; font-size: 18px; }
.sprecherplatz legend ~ * { clear: both; }
.zahlenreihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(9em, 1fr)); gap: 0 14px; }

.abschnitt { margin-top: 26px; }
