/* Artikelabstimmung – Farb- und Designschema von Black Forest Baudit:
   dunkelblaue Kopfzeile, Petrol für Handlungen, weiße Karten auf hellgrauem Grund,
   Ampel-Chips für Urteile. Keine fremden Schriften, kein eingebetteter Stil. */
:root {
  --navy: #1b2a44;          /* Kopfzeile, Überschriften, aktive Auswahl */
  --navy-2: #2c3c5c;        /* aktiver Menüpunkt in der Kopfzeile */
  --petrol: #2f7a87;        /* Schaltflächen, Logo, Fortschritt */
  --petrol-dunkel: #256571;
  --petrol-hell: #d7e9ec;
  --blau: #2c5d8f;          /* Verweise */
  --blau-hell: #e9eef5;
  --gruen: #3d6b2f;  --gruen-voll: #5b8a4a;  --gruen-flaeche: #e7f0e2;
  --ocker: #7f5c1c;  --ocker-voll: #a67c2e;  --ocker-flaeche: #f6ecd8;
  --rot: #8f2f3a;    --rot-voll: #a3424e;    --rot-flaeche: #f8e5e7;
  --creme: #f5ecd9;
  --text: #1f2937;
  --leise: #5f6b7a;
  --linie: #e1e6ed;
  --rand: #cfd6df;
  --grund: #f4f6f9;
  --karte: #ffffff;
  --rund: 12px;
}
* { box-sizing: border-box; }
html { font-size: 14px; }
body {
  margin: 0; color: var(--text); background: var(--grund); line-height: 1.45;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--blau); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0.2rem 0 0.4rem; font-weight: 700; color: var(--navy); }
h2 { font-size: 1.15rem; margin: 1.4rem 0 0.6rem; font-weight: 700; color: var(--navy); }
h3 { font-size: 0.98rem; margin: 0.6rem 0 0.3rem; font-weight: 700; color: var(--navy); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; }
.dachzeile { margin: 0 0 0.2rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gruen); }

/* ---------------------------------------------------------- Kopfzeile */
.kopf { display: flex; align-items: center; gap: 1.6rem; background: var(--navy); color: #fff; padding: 0.7rem 1.6rem; flex-wrap: wrap; }
.kopf a { color: #fff; }
.kopf a:hover { text-decoration: none; }
.marke-app { display: flex; align-items: center; gap: 0.75rem; }
.logo { width: 2.5rem; height: 2.5rem; border-radius: 9px; background: var(--petrol); display: grid; place-items: center; flex: none; }
.logo svg { width: 1.35rem; height: 1.35rem; }
.app-name { display: flex; flex-direction: column; line-height: 1.15; }
.app-name strong { font-size: 1.1rem; font-weight: 700; }
.app-name .fassung { font-size: 0.85rem; color: rgba(255, 255, 255, 0.78); }
nav.haupt { display: flex; gap: 0.3rem; }
nav.haupt a { padding: 0.55rem 0.95rem; border-radius: 8px; font-weight: 600; font-size: 1.02rem; }
nav.haupt a:hover { background: rgba(255, 255, 255, 0.08); }
nav.haupt a.aktiv { background: var(--navy-2); }
.wer { margin-left: auto; display: flex; gap: 1rem; align-items: center; font-size: 0.92rem; }
.wer .person { background: var(--creme); color: var(--navy); font-weight: 600; padding: 0.35rem 0.8rem; border-radius: 999px; }
.wer form { margin: 0; }
.kopf button.leise { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.kopf button.leise:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------------------------------------------------------- Seite */
main { padding: 1.6rem 2rem 2.5rem; max-width: 120rem; margin: 0 auto; }
.fuss { color: var(--leise); font-size: 0.8rem; padding: 0.8rem 2rem; border-top: 1px solid var(--linie); }
.untertitel { color: var(--leise); margin-top: 0; font-size: 1.02rem; }
.klein { font-size: 0.85rem; color: var(--leise); }
.leise { color: var(--leise); }

.meldung { background: var(--petrol-hell); color: var(--navy); border-left: 4px solid var(--petrol); border-radius: 8px; padding: 0.7rem 1rem; margin-bottom: 1rem; }
.meldung.fehler { background: var(--rot-flaeche); color: var(--rot); border-left-color: var(--rot-voll); }
.meldung.wichtig { background: var(--ocker-flaeche); color: var(--ocker); border-left-color: var(--ocker-voll); }

/* ---------------------------------------------------------- Bedienelemente */
button, .knopf-link {
  background: var(--petrol); color: #fff; border: 1px solid var(--petrol); border-radius: 8px;
  padding: 0.55rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover, .knopf-link:hover { background: var(--petrol-dunkel); border-color: var(--petrol-dunkel); text-decoration: none; }
button.leise { background: #fff; color: var(--navy); border: 1px solid var(--rand); padding: 0.35rem 0.8rem; }
button.leise:hover { background: var(--grund); }
input, select, textarea {
  font: inherit; color: var(--text); padding: 0.5rem 0.7rem; border: 1px solid var(--rand); border-radius: 8px; background: #fff;
}
/* Fokus deutlich sichtbar, Kontrast mindestens 3:1 zur Umgebung (WCAG 2.2, 1.4.11). */
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--petrol); outline-offset: 1px; border-color: var(--petrol); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.kopf a:focus-visible, .kopf button:focus-visible { outline-color: #fff; }
textarea { width: 100%; resize: vertical; }
input[type=radio], input[type=checkbox] { accent-color: var(--petrol); }

.schmal { max-width: 30rem; margin: 2.5rem auto; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: 1.6rem 1.8rem; }
.schmal h1 { margin-top: 0; }
.formular { display: flex; flex-direction: column; gap: 0.9rem; }
.formular label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; color: var(--navy); }
.formular.breit { max-width: 36rem; margin-top: 1rem; }
.formular .haken, label.haken { flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 400; }
.hinweis { color: var(--leise); font-size: 0.9rem; }
.schritte { padding-left: 1.2rem; }
.qr { margin: 1rem 0; }
.qr svg { background: #fff; padding: 8px; border: 1px solid var(--linie); border-radius: 8px; }
.geheimnis { font-size: 1.05rem; letter-spacing: 0.05em; background: var(--blau-hell); color: var(--navy); padding: 0.2rem 0.5rem; border-radius: 6px; }

/* ---------------------------------------------------------- Tabellen */
.tabelle { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); }
.tabelle th, .tabelle td { border-bottom: 1px solid var(--linie); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle thead th { background: #f7f8fa; color: #4a5565; font-weight: 600; font-size: 0.86rem; position: sticky; top: 0; z-index: 1; }
.tabelle thead th:first-child { border-top-left-radius: var(--rund); }
.tabelle thead th:last-child { border-top-right-radius: var(--rund); }
.tabelle tbody tr:hover td { background: #f7f9fb; }
.tabelle tr.eigene td:first-child { box-shadow: inset 4px 0 0 var(--petrol); }
.tabelle .zahl, .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle.felder th { width: 14rem; font-weight: 500; color: var(--leise); background: transparent; }
.tabelle.felder thead th { background: #f7f8fa; }
.tabelle.felder tr.geaendert td:last-child { font-weight: 700; color: var(--navy); }
.block .tabelle { border: 0; border-radius: 0; }
.block .tabelle thead th { border-radius: 0; }

meter { width: 8rem; height: 0.6rem; vertical-align: middle; border-radius: 999px; background: #e6e9ee; }
meter::-webkit-meter-bar { background: #e6e9ee; border: 0; border-radius: 999px; height: 0.6rem; }
meter::-webkit-meter-optimum-value,
meter::-webkit-meter-suboptimum-value,
meter::-webkit-meter-even-less-good-value { background: var(--petrol); border-radius: 999px; }
meter::-moz-meter-bar { background: var(--petrol); border-radius: 999px; }

/* ---------------------------------------------------------- Artikelliste */
.liste-seite { display: grid; grid-template-columns: 18rem 1fr; gap: 1.4rem; align-items: start; }
.leiste {
  background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: 0.4rem 0.8rem 0.9rem;
  font-size: 0.92rem; position: sticky; top: 0.8rem; max-height: calc(100vh - 1.6rem); overflow: auto;
}
.leiste h2 { font-size: 1rem; margin: 0.8rem 0.3rem 0.3rem; }
.leiste h3 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--leise); margin: 0.9rem 0.4rem 0.25rem; }
.leiste ul { list-style: none; margin: 0; padding: 0; }
.leiste li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0.5rem; border-radius: 8px; }
.leiste li a { color: var(--navy); }
.leiste li.aktiv { background: var(--petrol-hell); font-weight: 700; }
.leiste li.aktiv a { color: var(--petrol-dunkel); }
.leiste > p { margin: 0.8rem 0.4rem 0.2rem; }
.anzahl { color: var(--leise); font-variant-numeric: tabular-nums; }

.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.9rem 0; }
.filter input[type=search] { min-width: 18rem; }
.treffer { color: var(--leise); margin: 0.5rem 0; }
.treffer a { margin-left: 0.6rem; font-weight: 600; }
.tabelle.artikel td:nth-child(2) { max-width: 32rem; }
.tabelle.artikel td:first-child a { font-weight: 600; }
.alt { color: var(--leise); text-decoration: line-through; }

.banner { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: 1.1rem 1.4rem; }
.banner h1 { font-size: 1.5rem; }
.banner p { margin: 0.3rem 0; }
.block { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: 0.6rem 1.3rem 1.1rem; margin-top: 1.1rem; }
.sammel { max-width: 46rem; display: flex; flex-direction: column; gap: 0.6rem; }
.sammel label { display: flex; gap: 0.5rem; align-items: center; }

/* ---------------------------------------------------------- Artikelkarte */
.navigation { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.navigation a { font-weight: 600; }
.karte-raster { display: grid; grid-template-columns: minmax(22rem, 1fr) minmax(24rem, 1.1fr); gap: 1.1rem; align-items: start; }
.punkt-karte { border-top: 1px solid var(--linie); padding: 0.6rem 0 0.8rem; }
.punkt-karte:first-of-type { border-top: 0; }
.punkt-karte h3 a { color: var(--navy); }
.urteile { list-style: none; padding: 0; margin: 0.4rem 0; }
.urteile li { margin: 0.3rem 0; }
.urteil-formular { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.wahlen { display: flex; gap: 1rem; flex-wrap: wrap; }
.wahl { display: flex; gap: 0.35rem; align-items: center; }
form.inline { display: inline; margin: 0 0.2rem 0 0; }

/* ---------------------------------------------------------- Urteile als Ampel-Chips */
.marke {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.12rem 0.55rem; border-radius: 6px;
  font-size: 0.8rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.marke::before { font-size: 0.72rem; line-height: 1; }
.marke-passt { background: var(--gruen-flaeche); color: var(--gruen); }
.marke-passt::before { content: "●"; color: var(--gruen-voll); }
.marke-rueckfrage { background: var(--ocker-flaeche); color: var(--ocker); }
.marke-rueckfrage::before { content: "◆"; color: var(--ocker-voll); }
.marke-aendern { background: var(--rot-flaeche); color: var(--rot); }
.marke-aendern::before { content: "■"; color: var(--rot-voll); }
.marke-kommentar { background: var(--blau-hell); color: var(--blau); }
.marke-kommentar::before { content: "●"; color: var(--blau); }
.marke-offen { background: #eef0f3; color: var(--leise); }
.marke-offen::before { content: "○"; }

@media (max-width: 900px) {
  .liste-seite, .karte-raster { grid-template-columns: 1fr; }
  .leiste { position: static; max-height: none; }
  main { padding: 1.2rem 1rem 2rem; }
}
