/* OSP-Server-Monitor · css/ansichten/wissen.css — Wissen & Memory (v1.0.0, Stufe C, AP-13)
   Lernsysteme (Vergleich · Entwicklung · Erkenntnisse), Wissensgraph mit Zeitregler, Memory.
   Höhenbudget Rahmen 2.6: die Ansicht füllt den Inhaltsbereich (main hat 8 px Polster oben und unten, im Dichtemodus 4 px), die Seite scrollt
   nie; nur Tabellenrumpf, Legende und Kartenliste scrollen. Schrift mindestens 12 px, Ziele mindestens 24 px. Nur dunkel. */

/* ── Gerüst ── */
.ls { display: flex; flex-direction: column; min-height: 420px; }
html[data-rahmen="neu"] .ls { height: calc(100dvh - 44px - 16px); min-height: 0; }
@media (max-height: 560px) { html[data-rahmen="neu"] .ls { height: calc(100dvh - 44px - 8px); } }
.ls-kopf { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 32px; margin-bottom: 4px; }
.ls-fluss { flex: 1 1 0; min-width: 0; }
.ls-flaeche { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; position: relative; }
.ls-leer { margin: auto; padding: 24px 12px; max-width: 75ch; color: var(--text-2); text-align: center; font-size: 13px; line-height: 1.55; }
.ls a:focus-visible, .ls button:focus-visible, .ls input:focus-visible, .ls-chart:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 1px; }

/* ── Bereichswahl und Darstellung (wie die Reiterleiste des Rahmens) ── */
.ls-nav { display: inline-flex; gap: 4px; }
.ls-nav a {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 8px; color: var(--text-2);
  font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.ls-nav a:hover { background: var(--panel); color: var(--text); }
.ls-nav a[aria-current="page"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--blue-2); }
.ls-nav2 { padding-left: 12px; border-left: 1px solid var(--border-2); }
.ls-nav2 a { font-weight: 500; }
.ls-zahl { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; border: 1px solid rgba(220, 80, 15, .5); background: rgba(220, 80, 15, .16); color: var(--orange-text); font-size: 12px; line-height: 16px; text-align: center; }
.ls-lerninfo { display: inline-flex; align-items: center; gap: 4px; }
.ls-stand { font-size: 12px; color: var(--text-2); white-space: nowrap; }
@media (max-width: 1399px) { .ls-stand { display: none; } }        /* sonst bricht die Kopfzeile um; die Zahl steht dann im Tooltip des Knopfs */
.ls-kopf .iconbtn { width: 28px; height: 28px; }

/* ── Knöpfe in Werkzeugzeilen ── */
.ls-werkzeug { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 32px; margin-bottom: 4px; }
.ls-gruppe { display: inline-flex; align-items: center; gap: 4px; }
.ls-gl { font-size: 12px; color: var(--text-2); margin-right: 2px; }
.ls-sb {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--panel);
  color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.ls-sb:hover { color: var(--text); background: var(--panel-2); }
.ls-sb[aria-pressed="true"] { color: var(--text); border-color: var(--blue-2); background: rgba(0, 128, 201, .16); }
@media (max-width: 1250px) { .ls-gl { display: none; } }

/* ── Vergleich: Tabelle füllt die Fläche, Legende im Kopf ── */
.ls-tab { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ls-tab > .ot { flex: 1 1 auto; height: auto; min-height: 0; }
.ls-legende { display: inline-flex; align-items: center; gap: 10px; }
.ls-leg { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.ls-leg i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
@media (max-width: 1559px) { .ls-leg { display: none; } }          /* sonst bricht die Kopfzeile um; die Farben stehen dann hinter dem ⓘ */
.ls-balken { display: inline-flex; width: 88px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--border); vertical-align: middle; }
.ls-balken i { display: block; min-width: 2px; }
.ls-tab .ot-tabelle td[data-spalte="name"] a { color: var(--ot-link, var(--blue-2)); text-decoration: underline; text-underline-offset: 2px; }
.ls-tab .ot-tabelle td[data-spalte="name"] .info { margin: -5px 0 -5px 2px; }
.ls-tab .ot-z .badge { white-space: nowrap; }

/* ── Entwicklung: Diagramm links, Legende rechts ── */
.ls-ent { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ls-ent-kern { flex: 1 1 auto; min-height: 0; display: flex; gap: 12px; }
.ls-chart { flex: 1 1 auto; min-width: 0; min-height: 0; position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.ls-chart > svg { position: absolute; inset: 0; display: block; }
.ls-chart > .ls-leer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; }
.ls-tip { position: absolute; z-index: 3; min-width: 150px; max-width: 260px; padding: 6px 9px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border-2); font-size: 12px; line-height: 1.5; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); pointer-events: none; }
.ls-tip-d { font-weight: 600; margin-bottom: 2px; }
.ls-tip i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2px; }
.ls-lgd { flex: 0 0 290px; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.ls-lgd-kopf { margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.ls-lgd-e { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--border); }
.ls-lgd-e:first-of-type { border-top: 0; }
.ls-lin { flex: none; width: 36px; height: 12px; margin-top: 5px; }
.ls-lin-aus { border-top: 2px dotted var(--text-3); height: 0; margin-top: 11px; }
.ls-lgd-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; }
.ls-lgd-n { display: flex; justify-content: space-between; gap: 8px; }
.ls-lgd-n b { font-variant-numeric: tabular-nums; font-weight: 600; }
.ls-lgd-z { font-size: 12px; line-height: 1.4; color: var(--text-2); }
.ls-lgd-aus .ls-lgd-n { color: var(--text-2); }
.ls-lgd .badge { align-self: flex-start; }
@media (max-width: 1000px) {
  .ls-ent-kern { flex-direction: column; }
  .ls-lgd { flex: 0 0 auto; max-height: 45%; }
}

/* ── Erkenntnisse: Karten in einer Liste, nur sie scrollt ── */
.ls-erk { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; display: flex; flex-direction: column; }
.ls-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; align-content: start; }
.ls-karte { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.ls-karte.ls-warn { border-color: rgba(210, 153, 34, .45); }
.ls-karte header { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.ls-karte h3 { margin: 0; font-size: 14px; }
.ls-k-sys { grid-column: 1 / -1; margin: 0 0 4px; font-size: 12px; color: var(--text-2); }
.ls-k-zahl { grid-row: 3 / span 2; align-self: center; margin: 0; min-width: 4.5em; font-size: 22px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ls-k-befund, .ls-k-vorschlag { margin: 0; font-size: 13px; line-height: 1.45; max-width: 75ch; }
.ls-k-vorschlag { color: var(--text-2); }
.ls-k-l { font-weight: 600; color: var(--text); margin-right: 4px; }
.ls-k-link { grid-column: 1 / -1; justify-self: end; display: inline-flex; align-items: center; min-height: 24px; margin-top: 4px; font-size: 12px; font-weight: 600; }

/* ── Wissensgraph mit Zeitregler ── */
.ls-graph { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ls-zeit { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 280px; min-width: 0; }
.ls-zeit input[type="range"] { flex: 1 1 140px; min-width: 100px; max-width: 360px; height: 24px; margin: 0; accent-color: var(--blue-2); cursor: pointer; }
.ls-zeit output { min-width: 118px; font-size: 12px; font-family: var(--mono); color: var(--text); white-space: nowrap; }
.ls-zeit-aus { font-size: 12px; color: var(--text-2); }
.kgwrap { position: relative; flex: 1 1 auto; height: auto; min-height: 120px; padding: 0; overflow: hidden; }
.kgwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.kgtip { position: absolute; display: none; max-width: 250px; padding: 8px 10px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--border-2); pointer-events: none; z-index: 5;
  font-size: 12px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.kgtip b { display: block; font-size: 12px; margin-bottom: 3px; }
.kgtip span { display: block; color: var(--text-2); }
.kglegend { position: absolute; z-index: 2; top: 8px; left: 8px; max-height: calc(100% - 48px); overflow-y: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.kglg { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; font-size: 12px; padding: 2px 10px; border-radius: 20px;
  border: 1px solid var(--border-2); background: rgba(15, 19, 28, .88); color: var(--text-2); cursor: pointer; }
.kglg:hover { color: var(--text); }
.kglg[aria-pressed="true"] { color: #fff; border-color: rgba(0, 128, 201, .7); background: rgba(0, 90, 150, .85); }
.kglg .dot { width: 9px; height: 9px; border-radius: 3px; }
.kglg b { font-family: var(--mono); color: var(--text-2); font-weight: 600; }
.kglg[aria-pressed="true"] b { color: #fff; }
.ls-gfuss { position: absolute; z-index: 2; left: 8px; right: 8px; bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; pointer-events: none; }
.ls-gzahl, .ls-ghilf { padding: 2px 8px; border-radius: 8px; background: rgba(15, 19, 28, .85); font-size: 12px; color: var(--text-2); }
.ls-ghilf { margin-left: auto; }
.ls-sperre { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 8px; border-radius: 8px; background: rgba(15, 19, 28, .9); font-size: 12px; color: var(--warn); }
.ls-sperre svg { width: 14px; height: 14px; flex: none; }
.ls-sperre .ls-sb { min-height: 24px; padding: 0 8px; }

/* ── Memory ── */
.ls-mem { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ls-mem-weg { flex: none; margin: 0 0 4px; font-size: 13px; color: var(--text-2); line-height: 24px; }
.ls-sperrbox { display: flex; gap: 10px; align-items: flex-start; max-width: 75ch; margin: 24px auto; padding: 14px 16px; border: 1px solid rgba(210, 153, 34, .4); border-radius: 10px; background: rgba(210, 153, 34, .06); }
.ls-sperrbox svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--warn); }
.ls-sperrbox p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; }

/* ── Dichtemodus (Fensterhöhe unter 560 px) ── */
@media (max-height: 560px) {
  .ls-lgd { padding: 4px 8px; }
  .ls-lgd-e { padding: 3px 0; }
  .ls-karte { padding: 6px 10px; }
}
