/* IT-Wissensbasis – ruhiges, helles Design mit automatischem Dunkelmodus */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #ebebef;
  --line: rgba(0, 0, 0, .08);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #8e8e93;
  --accent: #0a66d6;
  --accent-bg: rgba(10, 102, 214, .09);
  --on-accent: #ffffff;
  --ok: #1f7a3d;
  --ok-bg: rgba(31, 122, 61, .1);
  --warn: #9a5b00;
  --warn-bg: rgba(200, 130, 0, .1);
  --err: #c0362c;
  --err-bg: rgba(192, 54, 44, .09);
  --info: #5e4fb5;
  --info-bg: rgba(94, 79, 181, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
  --r: 12px;
  --r-sm: 10px;
  --ease: .18s ease;
  --graph-bg: #ffffff;
  --graph-edge: rgba(0, 0, 0, .13);
  --card-line: transparent;
  --pop-shadow: 0 10px 40px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131417; --bg-2: #1b1c20; --bg-3: #25272c; --line: rgba(255, 255, 255, .075);
    --text: #ececef; --text-2: #a0a1a8; --text-3: #74757d;
    --graph-bg: #131417; --graph-edge: rgba(255, 255, 255, .11);
    --card-line: rgba(255, 255, 255, .06); --pop-shadow: 0 12px 44px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
    --accent: #4c9bff; --accent-bg: rgba(76, 155, 255, .14); --on-accent: #0b1220;
    --ok: #5fcf85; --ok-bg: rgba(95, 207, 133, .13); --warn: #f0b456; --warn-bg: rgba(240, 180, 86, .13);
    --err: #ff7b70; --err-bg: rgba(255, 123, 112, .13); --info: #b0a6ff; --info-bg: rgba(176, 166, 255, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131417; --bg-2: #1b1c20; --bg-3: #25272c; --line: rgba(255, 255, 255, .075);
  --text: #ececef; --text-2: #a0a1a8; --text-3: #74757d;
  --graph-bg: #131417; --graph-edge: rgba(255, 255, 255, .11);
  --card-line: rgba(255, 255, 255, .06); --pop-shadow: 0 12px 44px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  --accent: #4c9bff; --accent-bg: rgba(76, 155, 255, .14); --on-accent: #0b1220;
  --ok: #5fcf85; --ok-bg: rgba(95, 207, 133, .13); --warn: #f0b456; --warn-bg: rgba(240, 180, 86, .13);
  --err: #ff7b70; --err-bg: rgba(255, 123, 112, .13); --info: #b0a6ff; --info-bg: rgba(176, 166, 255, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.9rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; margin: 0 0 .5rem; }
h2 { font-size: 1.12rem; letter-spacing: -.01em; font-weight: 600; margin: 0 0 .7rem; }
h3 { font-size: .98rem; font-weight: 600; margin: 0 0 .4rem; }
p { margin: 0 0 .7rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bg); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }
.muted { color: var(--text-2); }
.small { font-size: .85rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 10px max(20px, calc((100% - 1120px) / 2));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input, .hero-search input {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 8px 12px 8px 36px; transition: background var(--ease), border-color var(--ease);
}
.search input:focus, .hero-search input:focus { outline: none; background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.search-ico { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
body.home .top .search { visibility: hidden; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--text-2); white-space: nowrap; font-size: .92rem; }
.nav a:hover { text-decoration: none; color: var(--text); background: var(--bg-2); }
.nav a.on { color: var(--text); font-weight: 600; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: 0; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Seitenrahmen ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; outline: none; }
main.narrow { max-width: 820px; }
main:focus, main:focus-visible { outline: none; }
section { margin-bottom: 36px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sec-h h2 { margin: 0; }
.sec-h a, .sec-h button { font-size: .88rem; }

/* ---------- Startseite ---------- */
.hero { text-align: center; padding: 36px 0 12px; }
.hero h1 { font-size: 2.3rem; }
.hero p { color: var(--text-2); font-size: 1.05rem; }
.hero-search { position: relative; max-width: 640px; margin: 22px auto 14px; }
.hero-search input { font-size: 1.12rem; padding: 15px 18px 15px 48px; border-radius: 14px; box-shadow: var(--shadow); }
.hero-search .search-ico { left: 17px; width: 20px; height: 20px; }
.hero .chips { justify-content: center; }
.home-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li a {
  display: flex; align-items: center; gap: 12px; padding: 10px 4px;
  border-bottom: 1px solid var(--line); color: var(--text);
}
.plain-list li:last-child a { border-bottom: 0; }
.plain-list li a:hover { text-decoration: none; color: var(--accent); }
.plain-list .pl-title { flex: 1; min-width: 0; }
.plain-list .pl-meta { color: var(--text-3); font-size: .82rem; white-space: nowrap; }
.chev { width: 14px; height: 14px; flex: 0 0 14px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--bg-2); border: 0; border-radius: var(--r); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; transition: background var(--ease);
}
.tile:hover { background: var(--bg-3); }
.tile-ico { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 9px; background: color-mix(in srgb, var(--c, var(--accent)) 13%, var(--bg)); display: flex; align-items: center; justify-content: center; }
.tile-ico svg, .cat-ico { width: 20px; height: 20px; fill: none; stroke: var(--c, var(--accent)); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile-txt { display: flex; flex-direction: column; min-width: 0; }
.tile-name { font-weight: 600; font-size: .95rem; }
.tile-count { color: var(--text-2); font-size: .82rem; }

/* ---------- Statistik ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 16px; background: var(--bg-2); border: 0; border-radius: var(--r); font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.stat:hover { background: var(--bg-3); }
.stat-n { font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- Buttons, Badges, Chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; border: 0;
  background: var(--bg-2); color: var(--text); font: inherit; font-size: .92rem; font-weight: 500;
  cursor: pointer; transition: background var(--ease);
}
.btn:hover { background: var(--bg-3); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-bg); }
.btn.danger { color: var(--err); background: transparent; }
.btn.danger:hover { background: var(--err-bg); }
.btn.small { padding: 5px 12px; font-size: .85rem; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.fav-on svg { fill: #f2b01e; stroke: #f2b01e; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 7px; }
.st-importiert { color: var(--info); }
.st-generiert { color: var(--text-3); }
.st-ungeprueft { color: var(--warn); }
.st-benutzer_geprueft { color: var(--accent); }
.st-erfolgreich_getestet { color: var(--ok); }
.st-verifiziert { color: var(--ok); font-weight: 650; }
.o-geloest { color: var(--ok); }
.o-nicht_geloest { color: var(--err); }
.o-info { color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 12px; border-radius: 999px; border: 0; background: var(--bg-2); color: var(--text); font: inherit; font-size: .84rem; cursor: pointer; transition: background var(--ease); }
button.chip:hover { background: var(--bg-3); }
.chip.static { cursor: default; color: var(--text-2); }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; color: var(--text-2); font-size: .85rem; }
.note { background: var(--warn-bg); color: var(--text); padding: 10px 14px; border-radius: var(--r-sm); font-size: .9rem; }

/* ---------- Trefferliste ---------- */
.results-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
.res-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.res-head h1 { font-size: 1.5rem; margin: 0; }
.results { list-style: none; margin: 0; padding: 0; }
.result {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
  padding: 11px 8px; border-bottom: 1px solid var(--line); color: var(--text); border-radius: 0;
  transition: background var(--ease);
}
.result:hover { background: var(--bg-2); text-decoration: none; border-radius: 8px; }
.result-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-cat { color: var(--text-2); font-size: .84rem; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.result .badge { min-width: 120px; }
.empty { padding: 40px 20px; text-align: center; background: var(--bg-2); border-radius: var(--r); }
.btn.more { margin: 16px auto 0; display: flex; }

/* ---------- Filter / Sheet ---------- */
.filters h3 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; margin: 20px 0 6px; }
.filters h3:first-child { margin-top: 4px; }
.flist { list-style: none; margin: 0; padding: 0; }
.fbtn {
  display: flex; justify-content: space-between; gap: 8px; width: 100%;
  padding: 5px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer;
}
.fbtn:hover { background: var(--bg-2); }
.fbtn.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.fbtn.sub { padding-left: 22px; font-size: .86rem; }
.count { color: var(--text-3); font-size: .8rem; font-variant-numeric: tabular-nums; }
.fcheck { display: flex; align-items: center; gap: 8px; padding: 4px 10px; font-size: .9rem; cursor: pointer; border-radius: 8px; }
.fcheck:hover { background: var(--bg-2); }
.fcheck .count { margin-left: auto; }
.fcheck input { accent-color: var(--accent); }
.filter-toggle { display: none; }
.sheet-head { display: none; }
.scrim { display: none; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin: 12px 0; }
.field label { font-size: .84rem; color: var(--text-2); }
.help { font-size: .78rem; color: var(--text-3); }
input[type=text], textarea, select {
  font: inherit; font-size: .93rem; color: var(--text); width: 100%;
  background: var(--bg-2); border: 1px solid transparent; border-radius: var(--r-sm); padding: 9px 11px;
  transition: border-color var(--ease), background var(--ease);
}
input[type=text]:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); background: var(--bg); }
textarea { resize: vertical; }
input[type=file] { font: inherit; font-size: .88rem; max-width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.row select { width: auto; }
.row input[type=text] { flex: 1; min-width: 180px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 .field { margin: 6px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.msg { margin: 6px 0 0; font-size: .88rem; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.panel { background: var(--bg-2); border-radius: var(--r); padding: 18px 20px; margin-bottom: 20px; }
.panel h2 { font-size: 1rem; }

/* ---------- Detail ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; font-size: .92rem; margin-bottom: 14px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-head h1 { margin-top: 6px; }
.lead { font-size: 1.08rem; color: var(--text-2); max-width: 760px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 24px; }
.diag {
  background: var(--bg-2); border-radius: 16px; padding: 26px 28px; margin-bottom: 28px;
}
.diag-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.diag-head h2 { margin: 0; }
.progress { height: 4px; background: var(--bg-3); border-radius: 4px; overflow: hidden; margin-bottom: 18px; }
.progress span { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }
.diag-step { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 6px; }
.diag-step.ok { color: var(--ok); font-weight: 600; }
.diag-q { font-size: 1.32rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; margin-bottom: 18px; max-width: 760px; }
.diag-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.diag-btns .btn { padding: 12px 26px; font-size: 1rem; min-width: 150px; background: var(--bg); box-shadow: var(--shadow); }
.diag-btns .btn.primary { background: var(--accent); }
.diag-btns .btn.ghost { box-shadow: none; background: transparent; min-width: 0; }
.diag-intro { color: var(--text-2); }
.diag-path { margin-top: 18px; font-size: .84rem; color: var(--text-2); }
.diag textarea { margin: 6px 0 12px; background: var(--bg); }
.flow-details { margin-bottom: 28px; }
.flow-details > summary {
  cursor: pointer; font-weight: 600; font-size: 1.05rem; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 8px;
}
.flow-details > summary::-webkit-details-marker { display: none; }
.flow-details > summary::before { content: "›"; display: inline-block; transition: transform var(--ease); color: var(--text-3); font-size: 1.3rem; line-height: 1; }
.flow-details[open] > summary::before { transform: rotate(90deg); }
.flow-svg { overflow-x: auto; padding: 8px 0; }
.dsec { padding: 22px 0; border-top: 1px solid var(--line); }
.dsec h2 { font-size: 1.02rem; }
.dsec-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.dsec-grid > h2 { margin: 0; color: var(--text); }
.bul { margin: 0; padding-left: 1.1rem; }
.bul li { margin: 4px 0; }
.bul.links { list-style: none; padding: 0; }
.steps { margin: 0; padding-left: 1.3rem; }
.steps li { margin: 0 0 10px; }
.step-q { display: block; }
.step-fix { display: block; font-size: .87rem; color: var(--text-2); }
.obs, .hist { list-style: none; margin: 0 0 12px; padding: 0; }
.obs li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hist li { display: flex; gap: 14px; align-items: baseline; padding: 6px 0; font-size: .9rem; }
.hist li .muted { flex: 0 0 auto; }
.obs-meta { display: flex; gap: 10px; align-items: center; }
.obs-form label { font-size: .84rem; color: var(--text-2); display: block; margin-bottom: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 10px; }

/* ---------- Flowchart ---------- */
.flowchart { width: 100%; height: auto; display: block; min-width: 620px; }
.fc-node rect { fill: var(--bg-2); stroke: var(--line); stroke-width: 1; transition: fill var(--ease); }
.fc-node { cursor: pointer; }
.fc-node:hover rect { fill: var(--bg-3); }
.fc-node:focus { outline: none; }
.fc-node:focus-visible rect { stroke: var(--accent); stroke-width: 2; }
.fc-start rect, .fc-end rect { fill: var(--accent-bg); stroke: none; }
.fc-action rect { fill: var(--warn-bg); stroke: none; }
.fc-text { fill: var(--text); font-size: 14px; }
.fc-badge { fill: var(--text-3); font-size: 10.5px; letter-spacing: .05em; }
.fc-edge { stroke: var(--text-3); stroke-width: 1.2; }
.fc-edge-no { stroke-dasharray: 4 4; }
.fc-edge.is-visited { stroke: var(--accent); stroke-width: 2; stroke-dasharray: none; }
.fc-arrowhead { fill: var(--text-3); }
.fc-label { fill: var(--text-2); font-size: 12px; }
.fc-node.is-visited rect { stroke: var(--accent); stroke-width: 1.5; }
.fc-node.is-active rect { fill: var(--accent); stroke: var(--accent); }
.fc-node.is-active .fc-text, .fc-node.is-active .fc-badge { fill: var(--on-accent); }

/* ---------- Editor ---------- */
.sim-box:not(:empty) { background: var(--bg-2); border-radius: var(--r); padding: 12px 14px; margin: 12px 0; }
.sim-list { list-style: none; margin: 0; padding: 0; }
.sim-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.sim-pct { font-variant-numeric: tabular-nums; color: var(--text-2); min-width: 44px; }
.sim-pct.hi { color: var(--err); font-weight: 600; }
.cat-hint:not(:empty) { margin: -4px 0 6px; }

/* ---------- Import ---------- */
.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tbl-wrap { max-height: 340px; overflow: auto; border-radius: var(--r-sm); background: var(--bg); margin-bottom: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tbl th, .tbl td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--bg-2); position: sticky; top: 0; font-weight: 600; }
pre.code { background: var(--bg); padding: 12px; border-radius: var(--r-sm); font-size: .78rem; overflow-x: auto; white-space: pre; }

/* ---------- Fusszeile ---------- */
.foot { max-width: 1120px; margin: 0 auto; padding: 18px 20px 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .85rem; color: var(--text-3); }
.foot a { color: var(--text-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); z-index: 40;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--err); color: #fff; }
.noscript { padding: 20px; }

/* ---------- Karten: feine Linie im Dunkelmodus ---------- */
.tile, .stat, .panel, .diag, .empty, .graph-box, .local-graph { box-shadow: inset 0 0 0 1px var(--card-line); }
.tile { transition: background var(--ease), transform var(--ease); }
.tile:hover { transform: translateY(-1px); }

/* ---------- Vorschläge beim Tippen ---------- */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  list-style: none; margin: 0; padding: 6px; text-align: left;
  background: var(--bg); border-radius: 12px; box-shadow: var(--pop-shadow);
  max-height: min(60vh, 420px); overflow: auto;
}
.suggest[hidden] { display: none; }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.suggest li.on { background: var(--accent-bg); }
.s-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.suggest .s-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.suggest .s-meta { color: var(--text-3); font-size: .8rem; white-space: nowrap; }
.suggest .s-all { color: var(--accent); font-weight: 500; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.suggest .s-head { cursor: default; padding: 4px 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }

/* ---------- Meinten Sie / Rückfragen ---------- */
.dym { margin: 0 0 10px; color: var(--text-2); }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; font-weight: 600; }
.linkbtn:hover { text-decoration: underline; }
.clarify { background: var(--bg-2); border-radius: var(--r); padding: 12px 14px; margin: 4px 0 14px; box-shadow: inset 0 0 0 1px var(--card-line); }
.clarify p { margin: 0 0 8px; font-size: .9rem; }
.clarify .chip { background: var(--bg); }
.clarify button.chip:hover { background: var(--accent-bg); color: var(--accent); }

/* ---------- Befehlspalette ---------- */
.kbd-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.kbd-btn:hover { color: var(--text); background: var(--bg-2); }
kbd { font: 500 .74rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 3px 5px; border-radius: 5px; background: var(--bg-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.pal-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .28); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.pal-scrim[hidden] { display: none; }
.palette { width: 100%; max-width: 620px; background: var(--bg); border-radius: 16px; box-shadow: var(--pop-shadow); overflow: hidden; animation: popIn .16s ease-out; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pal-in svg { width: 18px; height: 18px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; flex: 0 0 18px; }
.pal-in input { flex: 1; border: 0; background: none; font: inherit; font-size: 1.05rem; color: var(--text); outline: none; min-width: 0; }
.pal-list { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }
.pal-list .s-head { padding: 8px 10px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.pal-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.pal-item.on { background: var(--accent-bg); }
.pal-item svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: var(--text-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pal-item .s-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .s-meta { color: var(--text-3); font-size: .8rem; white-space: nowrap; }
.pal-foot { display: flex; gap: 14px; padding: 8px 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: .78rem; }
.pal-empty { padding: 18px 12px; color: var(--text-2); text-align: center; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- Wissensgraph ---------- */
main.wide { max-width: 1400px; }
.graph-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.graph-head h1 { margin: 0; font-size: 1.5rem; }
.graph-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.graph-tools input[type=text] { width: 240px; max-width: 100%; }
.graph-tools .fcheck { padding: 4px 8px; }
.graph-tools .spacer { flex: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 12px; }
.legend .chip { display: inline-flex; align-items: center; gap: 6px; }
.legend .chip.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.graph-box { position: relative; height: calc(100vh - 290px); min-height: 420px; background: var(--graph-bg); border-radius: 16px; overflow: hidden; }
:root:not([data-theme="dark"]) .graph-box { box-shadow: inset 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .graph-box { box-shadow: inset 0 0 0 1px var(--card-line); } }
.graph-canvas { display: block; touch-action: none; cursor: grab; }
.graph-canvas:active { cursor: grabbing; }
.graph-zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 4px; }
.graph-zoom .icon-btn { background: var(--bg); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.graph-hint { position: absolute; left: 14px; bottom: 10px; font-size: .78rem; color: var(--text-3); pointer-events: none; }
.graph-card {
  position: absolute; left: 14px; top: 14px; width: min(340px, calc(100% - 80px)); padding: 14px 16px;
  background: var(--bg); border-radius: 14px; box-shadow: var(--pop-shadow); animation: popIn .16s ease-out;
}
.graph-card[hidden] { display: none; }
.graph-card h3 { font-size: 1rem; margin: 4px 0 6px; }
.graph-card p { font-size: .86rem; color: var(--text-2); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.graph-card .meta-line { font-size: .78rem; }
.graph-card .row { margin-top: 0; }
.graph-card .x { position: absolute; right: 6px; top: 6px; }
/* ---------- Showcase-Bühne (nur im Graph-Tab, immer dunkel) ---------- */
.graph-head .graph-sub { margin: 4px 0 0; }
.pres-btn svg { fill: currentColor; stroke: none; }
.graph-box.showcase {
  height: calc(100vh - 270px); min-height: 460px; border-radius: 20px; color: #e8edf8;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(64, 92, 190, .20), transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 85%, rgba(150, 70, 190, .10), transparent 70%),
    linear-gradient(180deg, #0b0f1c 0%, #070a13 100%);
  box-shadow: 0 24px 70px rgba(5, 10, 30, .28), inset 0 0 0 1px rgba(255, 255, 255, .06) !important;
}
.showcase .graph-hint { color: rgba(214, 224, 248, .42); left: auto; right: 16px; bottom: 12px; }
.showcase .graph-zoom .icon-btn { background: rgba(20, 26, 44, .7); color: rgba(226, 234, 255, .85); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.showcase .graph-zoom .icon-btn:hover { background: rgba(40, 52, 86, .85); color: #fff; }
.showcase .graph-zoom { top: 16px; right: 16px; }
.g-stats { position: absolute; left: 20px; top: 16px; display: flex; gap: 26px; pointer-events: none; z-index: 1; }
.g-stat b { display: block; font-size: 1.45rem; font-weight: 650; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.15; text-shadow: 0 0 18px rgba(120, 160, 255, .35); }
.g-stat span { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(214, 224, 248, .55); }
.showcase .graph-card {
  top: auto; bottom: 16px; left: 16px; width: min(360px, calc(100% - 32px)); padding: 16px 18px 16px 20px;
  background: rgba(14, 19, 34, .78); color: #e8edf8; -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .09);
  overflow: hidden;
}
.showcase .graph-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); box-shadow: 0 0 16px var(--c); }
.showcase .graph-card h3 { color: #fff; font-size: 1.05rem; line-height: 1.3; }
.showcase .graph-card p { color: rgba(214, 224, 248, .72); }
.showcase .graph-card .x { color: rgba(226, 234, 255, .7); }
.showcase .graph-card .x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.gc-cat { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: rgba(214, 224, 248, .7); padding-right: 28px; }
.gc-cat .s-dot { box-shadow: 0 0 10px var(--c); }
.gc-meta { display: flex; gap: 16px; font-size: .78rem; color: rgba(214, 224, 248, .6); margin-bottom: 12px; }
.gc-meta b { color: #fff; font-weight: 650; }
.gc-code { font: 500 .78rem ui-monospace, "Cascadia Mono", Consolas, monospace; color: rgba(214, 224, 248, .7); }
.showcase .graph-card .btn.primary { background: #4c8dff; color: #fff; }
.showcase .graph-card .btn.primary:hover { background: #6aa0ff; }
.g-tour { position: absolute; left: 50%; bottom: 34px; transform: translate(-50%, 8px); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; opacity: 0; transition: opacity .6s ease, transform .6s ease; text-align: center; }
.g-tour.on { opacity: 1; transform: translate(-50%, 0); }
.g-tour-name { font-size: 2rem; font-weight: 650; letter-spacing: -.02em; color: #fff; text-shadow: 0 0 28px var(--c), 0 0 2px rgba(0, 0, 0, .6); }
.g-tour-n { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(214, 224, 248, .65); }
.g-exit { display: none; position: absolute; top: 16px; left: 50%; transform: translateX(-50%); align-items: center; gap: 6px; padding: 6px 14px; border: 0; border-radius: 999px; background: rgba(20, 26, 44, .7); color: rgba(226, 234, 255, .85); font: inherit; font-size: .82rem; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); z-index: 2; }
.g-exit svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.g-exit:hover { background: rgba(40, 52, 86, .9); color: #fff; }
.graph-box.presenting { position: fixed; inset: 0; z-index: 100; height: auto; min-height: 0; border-radius: 0; }
.graph-box.presenting .g-exit { display: inline-flex; }
.graph-box.presenting .graph-card, .graph-box.presenting .graph-hint { display: none; }
.graph-box.presenting .g-stats { top: 22px; left: 28px; }
.graph-box.presenting .g-stat b { font-size: 1.8rem; }
.graph-box.presenting .g-tour-name { font-size: 2.8rem; }
.graph-box:fullscreen { width: 100%; height: 100%; border-radius: 0; }
body.no-scroll { overflow: hidden; }

.local-graph { position: relative; height: 280px; background: var(--graph-bg); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
:root:not([data-theme="dark"]) .local-graph { box-shadow: inset 0 0 0 1px var(--line); }
.local-graph .graph-hint { font-size: .74rem; }
.local-graph .graph-canvas { touch-action: pan-y; }

/* ---------- Diagnose als Kartenfluss ---------- */
.diag-body.enter { animation: cardIn .24s ease-out; }
@keyframes cardIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.progress span { transition: width .3s ease; }

/* ---------- Lernen ---------- */
.learn-box .row { margin-top: 10px; }

/* ---------- Responsiv ---------- */
@media (max-width: 900px) {
  .home-cols, .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .results-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .filter-toggle { display: inline-flex; }
  .filters-wrap {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 78vh; overflow: auto;
    background: var(--bg); border-radius: 18px 18px 0 0; padding: 8px 20px 28px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
    transform: translateY(105%); transition: transform .25s ease; visibility: hidden;
  }
  .filters-wrap.open { transform: none; visibility: visible; }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--bg); padding: 10px 0; }
  .sheet-head::before { content: ""; position: absolute; top: 0; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--bg-3); }
  .scrim.open { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .3); }
  .dsec-grid { grid-template-columns: 1fr; gap: 6px; }
  .result { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .result-title { white-space: normal; grid-column: 1 / -1; }
  .result .badge { min-width: 0; justify-self: end; }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  body.home .top .search { display: none; }
  .nav a { padding: 6px 7px; font-size: .86rem; }
  .nav a.opt { display: none; }
  main { padding: 20px 16px 50px; }
  h1 { font-size: 1.5rem; }
  .hero { padding: 16px 0 4px; }
  .hero h1 { font-size: 1.7rem; }
  .hero-search input { font-size: 1rem; padding: 13px 14px 13px 42px; }
  .diag { padding: 20px 18px; border-radius: 14px; }
  .diag-q { font-size: 1.15rem; }
  .diag-btns .btn { flex: 1 1 auto; min-width: 0; }
  .row2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 12px; gap: 10px; }
  .tile-ico { width: 32px; height: 32px; flex-basis: 32px; }
  .detail-top { flex-direction: column; gap: 0; }
  .kbd-btn { display: none; }
  .graph-tools input[type=text] { width: 100%; }
  .graph-box { height: calc(100vh - 330px); min-height: 380px; border-radius: 14px; }
  .graph-hint { display: none; }
  .graph-box.showcase { height: calc(100vh - 300px); min-height: 430px; border-radius: 16px; }
  .graph-box.showcase.presenting { height: auto; border-radius: 0; }
  .g-stats { left: 14px; top: 12px; gap: 14px; }
  .g-stat b { font-size: 1.05rem; }
  .g-stat span { font-size: .6rem; letter-spacing: .06em; }
  .showcase .graph-zoom { top: auto; bottom: 12px; right: 12px; }
  .showcase .graph-card { bottom: 10px; left: 10px; right: 10px; width: auto; }
  .g-tour-name { font-size: 1.5rem; }
  .graph-head .pres-btn { font-size: .8rem; }
  .legend { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; scrollbar-width: none; }
  .legend .chip { flex: 0 0 auto; }
  .graph-head h1 { font-size: 1.4rem; }
  .graph-card { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; }
  .pal-scrim { padding-top: 8vh; }
  .suggest .s-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Druck ---------- */
@media print {
  :root { --bg: #fff; --bg-2: #f3f3f3; --text: #000; --text-2: #333; --line: #ccc; }
  .top, .tools, .actions, .diag, .obs-form, .status-form, .back, .toast, .filters-wrap, .scrim, .no-print, .local-graph, .pal-scrim, .suggest { display: none !important; }
  main { max-width: none; padding: 0; }
  body { font-size: 11pt; }
  h1 { font-size: 18pt; }
  .dsec { break-inside: avoid; padding: 10px 0; }
  .flow-details > summary::before { display: none; }
  .flowchart { min-width: 0; max-height: 24cm; }
  a { color: #000; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
