/* IT-Discovery Navigator – ruhige, kontraststarke Oberfläche, ohne externe Ressourcen */
:root {
  --bg: #f5f6f4;
  --flaeche: #ffffff;
  --flaeche-2: #eef0ec;
  --text: #1d2420;
  --text-2: #56605a;
  --linie: #d9ddd7;
  --akzent: #1f6b5c;
  --akzent-hell: #e1efeb;
  --rot: #a3261b;   --rot-bg: #fbe9e6;
  --gelb: #7a5300;  --gelb-bg: #fbf1d9;
  --gruen: #1d6a36; --gruen-bg: #e3f2e7;
  --blau: #24508f;  --blau-bg: #e5edf8;
  --lila: #6b3a8c;  --lila-bg: #f1e8f7;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(20, 30, 25, .06), 0 2px 8px rgba(20, 30, 25, .04);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816; --flaeche: #1c211e; --flaeche-2: #242a26; --text: #e7ebe8; --text-2: #a7b0aa; --linie: #343b36;
    --akzent: #6cc4ae; --akzent-hell: #1f332d;
    --rot: #ff9c90; --rot-bg: #3a1e1b; --gelb: #f0c66b; --gelb-bg: #352b14; --gruen: #8ed6a3; --gruen-bg: #1a3223;
    --blau: #9dbcf0; --blau-bg: #1d2738; --lila: #d0a8ec; --lila-bg: #2c2135;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 15.5px; line-height: 1.5; }
a { color: var(--akzent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .6em; }
small { font-size: .85em; }
.muted { color: var(--text-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--akzent); color: #fff; padding: .5em 1em; z-index: 10; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

/* Layout */
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--flaeche); border-right: 1px solid var(--linie); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
main { padding: 28px clamp(16px, 4vw, 44px) 60px; max-width: 1040px; width: 100%; }
main:focus { outline: none; }
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.brand-mark { font-size: 1.6rem; color: var(--akzent); }
.brand small { display: block; color: var(--text-2); }
.nav-toggle { display: none; }
.nav-block { margin-bottom: 18px; }
.nav-label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-bottom: 6px; }
.nav-block select { width: 100%; }
.nav-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.nav-link { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: .92rem; }
.nav-link:hover { background: var(--flaeche-2); }
.nav-link.aktiv { background: var(--akzent-hell); color: var(--akzent); font-weight: 600; }
.nav-module { list-style: none; margin: 0; padding: 0; }
.nav-module .nr { width: 1.6em; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; flex: none; }
.nav-module .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-module .pfad { font-size: .7rem; font-weight: 700; background: var(--akzent); color: var(--flaeche); border-radius: 4px; padding: 0 5px; }
.nav-module .fz { font-size: .75rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.nav-fuss { font-size: .8rem; color: var(--text-2); }
.warn-text { color: var(--rot); }

/* Bausteine */
.seitenkopf { margin-bottom: 18px; }
.overline { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin: 0 0 4px; }
.lead { color: var(--text-2); font-size: 1.02rem; }
.abschnitt { margin: 28px 0 10px; }
.abschnitt small { font-weight: 400; color: var(--text-2); }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--schatten); margin-bottom: 14px; }
.liste { padding-left: 1.2em; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 0; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 18px; margin: 10px 0; }
.meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.meta dd { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: .92rem; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--akzent); background: var(--akzent); color: var(--flaeche); cursor: pointer; text-decoration: none; min-height: 38px; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--akzent); }
.btn-klein { padding: 4px 10px; font-size: .82rem; min-height: 30px; }
.btn-gefahr { color: var(--rot); border-color: var(--rot); }

input, select, textarea { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 7px; padding: 7px 9px; width: 100%; }
textarea { resize: vertical; }
.feld { margin-bottom: 10px; }
.feld label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 3px; }
.feld small { display: block; margin-top: 2px; }

.chip { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--flaeche-2); color: var(--text-2); white-space: nowrap; }
.chip-pfad { background: var(--akzent-hell); color: var(--akzent); }
.chip-demo { background: var(--lila-bg); color: var(--lila); }
.chip-rot { background: var(--rot-bg); color: var(--rot); }
.chip-gelb { background: var(--gelb-bg); color: var(--gelb); }
.st-confirmed { background: var(--gruen-bg); color: var(--gruen); }
.st-reported { background: var(--blau-bg); color: var(--blau); }
.st-unknown { background: var(--gelb-bg); color: var(--gelb); }
.st-conflicting { background: var(--rot-bg); color: var(--rot); }

.hinweis { border-left: 4px solid var(--blau); background: var(--blau-bg); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 14px; }
.hinweis-demo { border-color: var(--lila); background: var(--lila-bg); }
.hinweis-stopp { border-color: var(--rot); background: var(--rot-bg); color: var(--text); }
.hinweis-stopp strong { color: var(--rot); }
.hinweis p { margin: 4px 0; }
.link-block { display: block; text-decoration: none; }
.projekthinweise { margin: 0 0 14px; padding-left: 1.2em; color: var(--text-2); font-size: .92rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.kpi { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; font-size: .85rem; color: var(--text-2); }
.kpi .zahl { font-size: 1.6rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi.rot { border-color: var(--rot); } .kpi.rot .zahl { color: var(--rot); }
.kpi.gelb { border-color: var(--gelb); } .kpi.gelb .zahl { color: var(--gelb); }

.modulgitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.modulkarte { display: flex; flex-direction: column; gap: 6px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--text); box-shadow: var(--schatten); }
.modulkarte:hover { border-color: var(--akzent); }
.modulkarte h3 { margin: 0; font-size: .98rem; }
.mk-kopf { display: flex; justify-content: space-between; align-items: center; }
.mk-kopf .nr { font-weight: 700; color: var(--akzent); font-size: 1.1rem; }
.einstieg { color: var(--text-2); font-size: .88rem; margin: 0; flex: 1; }
.mk-fuss { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--text-2); }
.balken { height: 5px; background: var(--flaeche-2); border-radius: 99px; overflow: hidden; }
.balken span { display: block; height: 100%; background: var(--akzent); }
.fortschritt { display: flex; gap: 12px; align-items: center; font-size: .85rem; color: var(--text-2); }
.fortschritt .balken { width: 180px; }

.pfadinfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 8px; }
.pfadinfo > div { background: var(--akzent-hell); border-radius: var(--radius); padding: 12px 14px; }
.pfadinfo h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--akzent); }
.pfadinfo p { margin: 0; font-size: .92rem; }

/* Fragekarten */
.frage { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--akzent); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--schatten); }
.frage-kopf { display: flex; gap: 6px; margin-bottom: 6px; }
.optionen { border: 0; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--linie); border-radius: 8px; padding: 9px 11px; cursor: pointer; background: var(--flaeche); }
.option:hover { border-color: var(--akzent); }
.option input { width: auto; margin-top: 3px; accent-color: var(--akzent); }
.option small { display: block; color: var(--text-2); font-weight: 400; }
.option strong { font-weight: 500; }
.option:has(input:checked) { border-color: var(--akzent); background: var(--akzent-hell); }
.option-standard { border-style: dashed; }
.option-stopp strong::after { content: " ⚠"; color: var(--rot); }
.andere-feld { grid-column: 1 / -1; }
.status { border: 0; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.status legend { font-weight: 600; font-size: .88rem; margin-bottom: 4px; width: 100%; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; }
.status-pill input { width: auto; margin: 0; }
.status-pill:has(input:checked) { border-color: currentColor; }
.herkunft, .hilfe details { margin: 6px 0; }
.herkunft summary, .hilfe summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--akzent); padding: 3px 0; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; margin-top: 8px; }
.raster .breit { grid-column: 1 / -1; }
.hilfe { border-top: 1px solid var(--linie); margin-top: 10px; padding-top: 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.hilfe p { font-size: .9rem; background: var(--flaeche-2); padding: 8px 10px; border-radius: 7px; margin: 4px 0 6px; }
.fehler { color: var(--rot); font-weight: 600; font-size: .9rem; }
.fehler:empty { display: none; }

.verlauf { list-style: none; padding: 0; margin: 0; }
.verlauf-eintrag { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; }
.vf { font-weight: 600; margin: 0 0 2px; }
.va { margin: 0 0 4px; }
.va .notiz { display: block; color: var(--text-2); font-size: .88rem; }
.vh { margin: 0; font-size: .85rem; }

.punkte { list-style: none; padding: 0; margin: 0; }
.punkt { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--gelb); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; }
.punkt.blockierend { border-left-color: var(--rot); }
.punkt.blockierend strong { color: var(--rot); }
.punkt p { margin: 0 0 3px; }
.punkt .muted { font-size: .84rem; }
.zitat { font-style: italic; color: var(--text-2); font-size: .9rem; }

#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 32px); z-index: 20; }
#toast.sichtbar { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Mobil */
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--linie); padding: 12px 16px; }
  .brand { margin-bottom: 8px; }
  .nav-toggle { display: inline-flex; font: inherit; font-weight: 600; padding: 6px 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche-2); color: var(--text); cursor: pointer; }
  #sidenav { display: none; margin-top: 12px; }
  .sidebar.offen #sidenav { display: block; }
  main { padding: 20px 16px 60px; }
  .verlauf-eintrag { flex-direction: column; }
  .fortschritt .balken { width: 100px; }
}
@media print {
  .sidebar, .aktionen, .btn, #toast { display: none !important; }
  .layout { display: block; }
}
