/* KRYPTON – Autonomous Intelligence Network. Designsystem: tiefes Schwarz, dünne Linien, eisiges Blau als einziger Akzent,
   Michroma nur für Marke, Seitentitel und große Zahlen. Zahlen sind tabellarisch gesetzt und immer belegt. */

:root {
  /* KRYPTON: tiefes Schwarz, eisiges Silber, dunkles Blau, ein elektrischer Akzent */
  --ground: #030407;
  --rail: #05070c;
  --surface: #080c13;
  --surface-2: #0d1420;
  --surface-3: #142034;
  --line: rgba(121, 191, 255, 0.09);
  --line-2: rgba(121, 191, 255, 0.16);
  --line-3: rgba(121, 191, 255, 0.28);
  --ink: #f2f6fc;
  --ink-2: #c3cedd;
  --muted: #8493a8;
  --faint: #6f7e93;

  --akzent: #79bfff;
  --akzent-hell: #b8d9ff;
  --akzent-ink: #031020;
  --akzent-weich: rgba(121, 191, 255, 0.12);
  --akzent-linie: rgba(121, 191, 255, 0.42);
  --glanz: 0 0 0 1px rgba(121, 191, 255, 0.35), 0 0 18px -4px rgba(121, 191, 255, 0.55);

  /* Agent-Farben: kühles Spektrum, gedämpft */
  --a-ceo: #b8d9ff;
  --a-research: #79bfff;
  --a-analyst: #6fd3c7;
  --a-cto: #8fa8ff;
  --a-autor: #c9b6ff;
  --a-qa: #e59a9a;
  --a-waechter: #e2c07e;
  --a-memory: #9ee0b5;
  --a-automation: #f0b37e;
  --a-strategy: #d9dee8;
  --a-validator: #9fd6e8;
  --a-optimizer: #e6a8d0;

  /* Datenreihen */
  --d-ein: #6fd3c7;
  --d-aus: #e5867e;
  --d-api: #79bfff;

  --ok: #74d3ae;
  --warn: #e8c27a;
  --err: #e5867e;
  --ok-weich: rgba(116, 211, 174, 0.12);
  --warn-weich: rgba(232, 194, 122, 0.12);
  --err-weich: rgba(229, 134, 126, 0.12);

  --r: 8px;
  --r-klein: 6px;
  --schatten: 0 18px 44px -22px rgba(0, 0, 0, 0.9), 0 2px 6px -2px rgba(0, 0, 0, 0.6);
  --display: "Michroma", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

@font-face {
  font-family: "Michroma";
  src: url("/fonts/michroma-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--akzent);
}
::selection { background: rgba(121, 191, 255, 0.3); color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--akzent-hell); text-underline-offset: 3px; text-decoration-color: var(--akzent-linie); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid var(--ground); }
::-webkit-scrollbar-track { background: transparent; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.klein { font-size: 12px; }
.ink2 { color: var(--ink-2); }
.pos { color: var(--ok); }
.neg { color: var(--err); }
.leer { color: var(--muted); padding: 14px 0; max-width: 60ch; margin: 0; }
.leer b { color: var(--ink-2); font-weight: 600; }
.error { color: var(--err); margin: 0; }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: var(--r-klein);
  background: transparent; color: var(--ink-2); border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-3); color: var(--ink); }
.btn:active:not(:disabled) { background: var(--surface-3); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primaer { background: var(--akzent); color: var(--akzent-ink); border-color: transparent; font-weight: 600; }
.btn.primaer:hover:not(:disabled) { background: var(--akzent-hell); color: var(--akzent-ink); }
.btn.ruhig { border-color: transparent; color: var(--muted); }
.btn.ruhig:hover:not(:disabled) { color: var(--ink); background: var(--surface-2); }
.btn.gefahr { color: var(--err); }
.btn.gefahr:hover:not(:disabled) { background: var(--err-weich); border-color: rgba(214, 119, 106, 0.4); color: var(--err); }
.btn.gross { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.mini { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.an { background: var(--surface-3); color: var(--ink); border-color: var(--line-3); }
.btn.laedt { position: relative; color: transparent !important; pointer-events: none; }
.btn.laedt::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--muted); border-top-color: transparent; animation: drehen 0.7s linear infinite;
}
.btn.primaer.laedt::after { border-color: var(--akzent-ink); border-top-color: transparent; }
@keyframes drehen { to { transform: rotate(360deg); } }
kbd {
  font: 11px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 4px; padding: 2px 5px; background: var(--surface);
}

/* ---------- Formulare ---------- */
.feld { display: grid; gap: 5px; min-width: 0; }
.feld > span { font-size: 12px; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r-klein);
  padding: 7px 10px; min-height: 34px; transition: border-color 0.15s, background 0.15s;
}
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--akzent-linie); background: var(--surface-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--akzent); outline-offset: 0; }
select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%238a968d' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 12px; }
.formular { display: grid; gap: 12px; }
.zeile { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.zeile > .feld { flex: 1 1 140px; }
.zeile.mitte { align-items: center; }
.zeile.ende { justify-content: flex-end; }
.hinweis { font-size: 12px; color: var(--muted); max-width: 70ch; margin: 0; }
.formfehler { font-size: 12.5px; color: var(--err); margin: 0; }

.segment { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-klein); padding: 2px; gap: 2px; background: var(--surface); flex-wrap: wrap; }
.segment button { border: 0; background: transparent; color: var(--muted); height: 26px; padding: 0 10px; border-radius: 4px; font-size: 12.5px; }
.segment button:hover { color: var(--ink); }
.segment button.an { background: var(--surface-3); color: var(--ink); }

.schalter { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.schalter input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.schalter span { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 99px; transition: background 0.15s; pointer-events: none; }
.schalter span::before { content: ""; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; background: var(--muted); border-radius: 50%; transition: transform 0.2s var(--ease), background 0.15s; }
.schalter input:checked + span { background: var(--akzent-weich); border-color: var(--akzent-linie); }
.schalter input:checked + span::before { transform: translateX(14px); background: var(--akzent); }
.schalter input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---------- Anmeldung ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; position: relative; overflow: hidden; }
.login-karte {
  position: relative; z-index: 1; width: min(360px, 100%); display: grid; gap: 14px;
  background: rgba(13, 19, 17, 0.9); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 28px; box-shadow: var(--schatten);
}
.login-karte .marke { padding: 0; }
.login-karte h1 { font-size: 18px; }
.login-karte p { margin: 0; color: var(--muted); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); height: 100%; }
.rail {
  background: var(--rail); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0; position: relative;
}
.rail > * { position: relative; }
.marke { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.marke img { flex: none; }
.nav { flex: 1; overflow-y: auto; padding: 4px 8px 12px; display: grid; gap: 1px; align-content: start; }
.nav-gruppe { font-size: 11.5px; color: var(--faint); padding: 14px 10px 5px; font-weight: 500; }
.nav a {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--r-klein);
  color: var(--ink-2); text-decoration: none; font-size: 13.5px; transition: background 0.12s, color 0.12s;
}
.nav a .icon { color: var(--muted); transition: color 0.12s; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a.aktiv { background: var(--surface-2); color: var(--ink); }
.nav a.aktiv .icon { color: var(--akzent); }
.nav .zaehler { margin-left: auto; font-size: 11.5px; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--warn-weich); color: var(--warn); font-variant-numeric: tabular-nums; }
.rail-fuss { border-top: 1px solid var(--line); padding: 12px 16px 14px; display: grid; gap: 10px; }
.budget-mini { display: grid; gap: 6px; font-size: 12px; color: var(--muted); text-decoration: none; }
.budget-mini .zahl { display: flex; justify-content: space-between; }
.budget-mini b { color: var(--ink-2); font-weight: 500; }

.hauptbereich { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.kopf {
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 24px;
  border-bottom: 1px solid var(--line); background: var(--ground); flex: none;
}
.kopf h1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf .unter { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf .luecke { flex: 1; }
.menue-knopf { display: none; }
.befehl-knopf {
  display: flex; align-items: center; gap: 8px; height: 32px; width: 300px; padding: 0 8px 0 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-klein); color: var(--faint); font-size: 13px;
}
.befehl-knopf:hover { border-color: var(--line-3); color: var(--muted); }
.befehl-knopf span { flex: 1; text-align: left; }
.live-pille {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 99px;
  border: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; background: transparent; text-decoration: none; white-space: nowrap;
}
.live-pille i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.live-pille.aktiv { color: var(--ink); border-color: var(--akzent-linie); }
.live-pille.aktiv i { background: var(--akzent); animation: puls 1.8s ease-in-out infinite; }
@keyframes puls { 50% { opacity: 0.35; } }
.glocke { position: relative; width: 32px; padding: 0; }
.glocke .zahl {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; border-radius: 99px; padding: 0 4px;
  background: var(--warn); color: #1a1205; font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
}
.inhalt { flex: 1; overflow-y: auto; min-height: 0; }
.inhalt.voll { overflow: hidden; }
.seite { padding: 24px; display: grid; gap: 20px; align-content: start; max-width: 1480px; margin: 0 auto; width: 100%; animation: erscheinen 0.22s var(--ease); }
@keyframes erscheinen { from { opacity: 0; transform: translateY(4px); } }

/* ---------- Flächen ---------- */
.flaeche { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.flaeche-kopf { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; min-height: 44px; flex-wrap: wrap; }
.flaeche-kopf h2 { font-size: 13.5px; }
.flaeche-kopf .anzahl { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.flaeche-kopf .rechts { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.flaeche-inhalt { padding: 12px 16px 16px; }
.raster { display: grid; gap: 20px; }
.raster.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster.briefing { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.raster.haupt-seite { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.liste { display: grid; }
.liste > * + * { border-top: 1px solid var(--line); }
.eintrag { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; min-width: 0; }
.eintrag .haupt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.eintrag .titel { color: var(--ink); overflow-wrap: anywhere; }
.eintrag .meta { color: var(--muted); font-size: 12px; }
.eintrag .aktionen { display: flex; gap: 6px; flex: none; align-items: center; }
button.eintrag { background: none; border: 0; text-align: left; width: 100%; color: inherit; border-radius: 0; }
button.eintrag:hover .titel { color: var(--akzent-hell); }

/* Status-Marken */
.marke-status {
  display: inline-flex; align-items: center; gap: 6px; height: 21px; padding: 0 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 500; background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.marke-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.marke-status.ok { background: var(--ok-weich); color: var(--ok); }
.marke-status.warn { background: var(--warn-weich); color: var(--warn); }
.marke-status.fehler { background: var(--err-weich); color: var(--err); }
.marke-status.akzent { background: var(--akzent-weich); color: var(--akzent-hell); }
.marke-status.neutral { color: var(--muted); }
.punkt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.punkt.ok { background: var(--ok); } .punkt.warn { background: var(--warn); } .punkt.fehler { background: var(--err); } .punkt.akzent { background: var(--akzent); }

/* Rollenfarben (Nennwerte) */
.r-ceo { --rf: var(--a-ceo); } .r-research { --rf: var(--a-research); } .r-analyst { --rf: var(--a-analyst); }
.r-cto { --rf: var(--a-cto); } .r-autor { --rf: var(--a-autor); } .r-qa { --rf: var(--a-qa); } .r-waechter { --rf: var(--a-waechter); }
.r-memory { --rf: var(--a-memory); } .r-automation { --rf: var(--a-automation); } .r-strategy { --rf: var(--a-strategy); }
.r-validator { --rf: var(--a-validator); } .r-optimizer { --rf: var(--a-optimizer); }
.rolle { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.rolle::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--rf, var(--muted)); }

/* Messbalken */
.messung { height: 4px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.messung i { display: block; height: 100%; width: 0; background: var(--akzent); border-radius: 99px; transition: width 0.6s var(--ease); }
.messung.warn i { background: var(--warn); } .messung.fehler i { background: var(--err); } .messung.ok i { background: var(--ok); }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabelle th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 0 12px 8px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tabelle td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle .r { text-align: right; padding-right: 0; padding-left: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle tbody tr.klickbar { cursor: pointer; }
.tabelle tbody tr.klickbar:hover td { background: var(--surface-2); }
.tabelle tbody tr.klickbar:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }
.tabelle tbody tr.storniert td { color: var(--faint); }
.tabelle tbody tr.storniert td.betrag { text-decoration: line-through; text-decoration-color: var(--err); }
.tabelle-huelle { overflow-x: auto; }

/* Markdown */
.md { line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3, .md h4 { color: var(--ink); margin: 1.3em 0 0.45em; line-height: 1.3; }
.md h2 { font-size: 16px; } .md h3 { font-size: 14.5px; } .md h4 { font-size: 13.5px; }
.md p { margin: 0.55em 0; max-width: 75ch; }
.md ul, .md ol { padding-left: 1.3em; max-width: 75ch; }
.md li { margin: 0.2em 0; }
.md strong { color: var(--ink); }
.md code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.md pre { background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-klein); padding: 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { border-left: 1px solid var(--line-3); margin: 0.6em 0; padding-left: 12px; color: var(--muted); }
.md table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 13px; margin: 0.6em 0; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 6px 12px 6px 0; text-align: left; }
.md th { color: var(--muted); font-weight: 500; }

/* ---------- Seitenkopf ---------- */
.seitenkopf { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.seitenkopf .text { flex: 1; min-width: 260px; display: grid; gap: 4px; }
.seitenkopf h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.seitenkopf p { margin: 0; color: var(--muted); max-width: 70ch; }
.seitenkopf .aktionen { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Briefing ---------- */
.weg { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; padding: 22px; align-items: center; }
.rosette { width: 248px; height: 248px; display: block; }
.rosette .ring path { fill: none; stroke-width: 0.7; transition: stroke 0.3s, opacity 0.3s, stroke-width 0.3s; }
.rosette .ring.offen path { stroke: var(--ink-2); opacity: 0.16; }
.rosette .ring.erreicht path { stroke: var(--akzent); opacity: 0.85; }
.rosette .ring.naechster path { stroke: var(--akzent-hell); opacity: 0.38; }
.rosette .ring.hervor path { opacity: 1; stroke-width: 0.95; }
.rosette .ring.zeichnen path { stroke-dasharray: var(--laenge); stroke-dashoffset: var(--laenge); animation: gravieren 1.6s var(--ease) forwards; }
@keyframes gravieren { to { stroke-dashoffset: 0; } }
.rosette .mitte-zahl { fill: var(--ink); font: 300 34px var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rosette .mitte-text { fill: var(--muted); font: 500 9px var(--sans); letter-spacing: 0.14em; }
.weg-rechts { display: grid; gap: 16px; min-width: 0; }
.weg-rechts > h2 { font-size: 13.5px; }
.stufen { list-style: none; margin: 0; padding: 0; display: grid; }
.stufen li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.stufen li:last-child { border-bottom: 0; }
.stufen li i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-3); flex: none; display: grid; place-items: center; }
.stufen li.erreicht { color: var(--ink-2); }
.stufen li.erreicht i { background: var(--akzent); border-color: var(--akzent); }
.stufen li.erreicht i::after { content: ""; width: 6px; height: 3px; border: solid var(--akzent-ink); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg) translate(0.5px, -0.5px); }
.stufen li.naechster { color: var(--ink); font-weight: 500; }
.stufen li.naechster i { border-color: var(--akzent); box-shadow: inset 0 0 0 3px var(--surface); background: var(--akzent); }
.stufen li.hervor { color: var(--akzent-hell); }
.naechster-schritt { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.naechster-schritt h3 { font-size: 18px; letter-spacing: -0.015em; }
.naechster-schritt p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.naechster-schritt .aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.ergebnis { padding: 22px; display: grid; gap: 16px; align-content: start; }
.ergebnis-kopf { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ergebnis-kopf h2 { font-size: 13.5px; }
.ergebnis-kopf .monat { color: var(--muted); font-size: 12.5px; }
.nennwert { font-size: 46px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.nennwert small { font-size: 18px; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.posten { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 13px; }
.posten span { color: var(--muted); }
.posten b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.posten .summe { border-top: 1px solid var(--line-2); padding-top: 6px; color: var(--ink); }
.diagramm { width: 100%; display: block; overflow: visible; }
.diagramm text { fill: var(--muted); font: 10.5px var(--sans); font-variant-numeric: tabular-nums; }
.diagramm .achse { stroke: var(--line-3); stroke-width: 1; shape-rendering: crispEdges; }
.diagramm .gitter { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.diagramm .ein { fill: var(--d-ein); }
.diagramm .aus { fill: var(--d-aus); }
.diagramm .api { fill: var(--d-api); }
.diagramm .linie { fill: none; stroke: var(--akzent); stroke-width: 1.5; }
.diagramm g.monat:hover rect { opacity: 0.75; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 8px; height: 8px; border-radius: 2px; }
.legende .ein { background: var(--d-ein); } .legende .aus { background: var(--d-aus); } .legende .api { background: var(--d-api); }

.dauer { display: grid; gap: 3px; margin-top: 4px; }
.dauer-spur { height: 5px; }
.dauer-balken { height: 5px; border-radius: 1px; background: var(--rf, var(--muted)); opacity: 0.85; min-width: 3px; width: 0; transition: width 0.6s var(--ease); }
.dauer-balken.laeuft { background: repeating-linear-gradient(90deg, var(--rf, var(--muted)) 0 6px, transparent 6px 9px); opacity: 1; }

.stufenleiste { display: flex; height: 10px; border-radius: 2px; overflow: hidden; gap: 2px; }
.stufenleiste i { display: block; min-width: 3px; }
.stufen-zahlen { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 10px; }
.stufen-zahlen div { display: grid; gap: 1px; }
.stufen-zahlen b { font-size: 18px; font-weight: 400; font-variant-numeric: tabular-nums; }
.stufen-zahlen span { font-size: 11px; color: var(--muted); }

/* ---------- Pipeline ---------- */
.board { display: grid; grid-template-columns: repeat(6, minmax(172px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; align-items: stretch; }
.spalte { display: flex; flex-direction: column; gap: 8px; min-height: 260px; border-radius: var(--r); padding: 8px; background: rgba(17, 24, 21, 0.55); border: 1px solid var(--line); transition: background 0.15s, border-color 0.15s; }
.spalte.ziel { background: var(--akzent-weich); border-color: var(--akzent-linie); }
.spalte-kopf { display: flex; align-items: center; gap: 8px; padding: 4px 4px 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.spalte-kopf .anzahl { color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; margin-left: auto; }
.spalte-kopf .stufe-nr { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-3); font-size: 10px; display: grid; place-items: center; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.spalte-leer { font-size: 12px; color: var(--faint); padding: 14px 8px; border: 1px dashed var(--line-2); border-radius: var(--r-klein); text-align: center; }
.chance-karte {
  display: grid; gap: 9px; text-align: left; width: 100%; padding: 12px; border-radius: var(--r-klein);
  background: var(--surface-2); border: 1px solid var(--line-2); color: inherit; box-shadow: 0 1px 0 rgba(0,0,0,0.3);
  transition: border-color 0.15s, opacity 0.15s;
}
.chance-karte:hover { border-color: var(--line-3); }
.chance-karte[draggable=true] { cursor: grab; }
.chance-karte.zieht { opacity: 0.4; }
.chance-karte.fokus { border-color: var(--akzent-linie); }
.chance-karte .titel { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chance-karte .meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; white-space: nowrap; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chance-karte .marken { display: flex; gap: 6px; flex-wrap: wrap; }
.wertung { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; align-items: end; height: 14px; }
.wertung i { display: block; background: var(--line-3); border-radius: 1px; }
.wertung i.h1 { height: 20%; } .wertung i.h2 { height: 40%; } .wertung i.h3 { height: 60%; } .wertung i.h4 { height: 80%; } .wertung i.h5 { height: 100%; }
.wertung i.gut { background: var(--akzent); }
.verworfen-leiste { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.verworfen-leiste button { background: none; border: 1px solid var(--line); border-radius: var(--r-klein); color: var(--faint); padding: 5px 10px; font-size: 12.5px; text-decoration: line-through; text-decoration-color: var(--err); }
.verworfen-leiste button:hover { color: var(--muted); border-color: var(--line-2); }

/* Schublade (Detail rechts) */
.schublade-hintergrund { position: fixed; inset: 0; background: rgba(4, 6, 5, 0.5); z-index: 40; animation: einblenden 0.2s ease; }
@keyframes einblenden { from { opacity: 0; } }
.schublade {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); z-index: 41;
  background: var(--rail); border-left: 1px solid var(--line-2); box-shadow: -30px 0 60px -30px rgba(0,0,0,0.9);
  display: flex; flex-direction: column; animation: hereinschieben 0.28s var(--ease);
}
@keyframes hereinschieben { from { transform: translateX(32px); opacity: 0; } }
.schublade-kopf { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.schublade-kopf h2 { font-size: 17px; flex: 1; line-height: 1.35; }
.schublade-inhalt { flex: 1; overflow-y: auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 26px; }
.schublade-inhalt > * { flex: none; }
.abschnitt { display: grid; gap: 10px; }
.abschnitt > h3 { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.abschnitt > h3 .rechts { margin-left: auto; }
.stufenwahl { display: flex; flex-wrap: wrap; }
.stufenwahl button { flex: 1 1 auto; height: 30px; border: 1px solid var(--line-2); margin-left: -1px; background: var(--surface); color: var(--muted); font-size: 12px; padding: 0 8px; }
.stufenwahl button:first-child { border-radius: var(--r-klein) 0 0 var(--r-klein); margin-left: 0; }
.stufenwahl button:last-child { border-radius: 0 var(--r-klein) var(--r-klein) 0; }
.stufenwahl button:hover { color: var(--ink); }
.stufenwahl button.erreicht { color: var(--ink-2); background: var(--surface-2); }
.stufenwahl button.an { background: var(--akzent); color: var(--akzent-ink); border-color: var(--akzent); font-weight: 600; position: relative; }
.kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-klein); overflow: hidden; }
.kennzahlen div { background: var(--surface); padding: 10px 12px; display: grid; gap: 2px; }
.kennzahlen span { font-size: 11.5px; color: var(--muted); }
.kennzahlen b { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.kriterien { display: grid; gap: 7px; }
.kriterium { display: grid; grid-template-columns: 120px 1fr 24px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.kriterium b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.auftraege { display: grid; gap: 6px; }
.auftrag { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-klein); background: var(--surface); text-align: left; color: inherit; width: 100%; transition: border-color 0.15s, background 0.15s; }
.auftrag:hover:not(:disabled) { border-color: var(--akzent-linie); background: var(--surface-2); }
.auftrag:disabled { opacity: 0.5; cursor: default; }
.auftrag .haupt { flex: 1; display: grid; gap: 1px; min-width: 0; }
.auftrag .haupt b { font-weight: 600; font-size: 13px; }
.auftrag .haupt span { font-size: 12px; color: var(--muted); }
.auftrag > .icon { color: var(--muted); }
.experiment { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-klein); background: var(--surface); }
.experiment.bestaetigt { border-color: rgba(134, 183, 152, 0.35); }
.experiment.widerlegt, .experiment.abgebrochen { opacity: 0.72; }
.experiment .kopfzeile { display: flex; gap: 10px; align-items: flex-start; }
.experiment .kopfzeile b { flex: 1; font-weight: 600; font-size: 13px; line-height: 1.4; }
.experiment .fortschritt { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.experiment form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.experiment form input { width: 110px; flex: none; }
details.ausklapp > summary { cursor: pointer; color: var(--muted); font-size: 12.5px; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
details.ausklapp > summary::-webkit-details-marker { display: none; }
details.ausklapp > summary::before { content: ""; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform 0.15s; }
details.ausklapp[open] > summary::before { transform: rotate(45deg); }
details.ausklapp > summary:hover { color: var(--ink); }
details.ausklapp[open] > summary { margin-bottom: 12px; }
.belege { margin: 0; padding-left: 1.1em; font-size: 12.5px; display: grid; gap: 3px; overflow-wrap: anywhere; }

/* ---------- Befehlspalette ---------- */
dialog.palette {
  width: min(620px, calc(100vw - 32px)); max-height: min(520px, 72vh); margin: 12vh auto auto; padding: 0;
  background: var(--rail); color: var(--ink); border: 1px solid var(--line-3); border-radius: 10px; box-shadow: var(--schatten), 0 40px 120px -40px #000;
  overflow: hidden;
}
dialog.palette[open] { display: flex; flex-direction: column; animation: palette-auf 0.18s var(--ease); }
@keyframes palette-auf { from { opacity: 0; transform: translateY(-6px); } }
dialog.palette::backdrop { background: rgba(3, 5, 4, 0.62); }
.palette-feld { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line-2); }
.palette-feld .icon { color: var(--muted); }
.palette-feld input:not([type=checkbox]) { border: 0; background: transparent; height: 50px; font-size: 15px; padding: 0; }
.palette-feld input:focus, .palette-feld input:focus-visible { outline: none; background: transparent; }
.palette-liste { overflow-y: auto; padding: 6px; }
.palette-gruppe { font-size: 11.5px; color: var(--faint); padding: 10px 10px 4px; }
.palette-eintrag { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: var(--r-klein); background: transparent; color: var(--ink-2); text-align: left; font-size: 13.5px; }
.palette-eintrag .icon { color: var(--muted); }
.palette-eintrag .text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-eintrag .zusatz { font-size: 12px; color: var(--faint); white-space: nowrap; }
.palette-eintrag.an { background: var(--surface-2); color: var(--ink); }
.palette-eintrag.an .icon { color: var(--akzent); }
.palette-fuss { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); flex-wrap: wrap; }
.palette-leer { padding: 18px 10px; color: var(--muted); font-size: 13px; }

/* ---------- Benachrichtigungen ---------- */
.ablage {
  position: fixed; top: 60px; right: 16px; width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 80px); z-index: 30;
  background: var(--rail); border: 1px solid var(--line-3); border-radius: 10px; box-shadow: var(--schatten);
  display: flex; flex-direction: column; animation: palette-auf 0.18s var(--ease);
}
.ablage-kopf { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); gap: 8px; }
.ablage-kopf h2 { font-size: 13.5px; flex: 1; }
.ablage-inhalt { overflow-y: auto; padding: 4px 14px 12px; }
.ablage-inhalt h3 { font-size: 12px; color: var(--faint); font-weight: 500; padding: 12px 0 2px; }

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r);
  background: var(--surface-3); border: 1px solid var(--line-3); box-shadow: var(--schatten); font-size: 13px;
  animation: toast-ein 0.28s var(--ease);
}
.toast.weg { animation: toast-aus 0.2s ease forwards; }
.toast .punkt { margin-top: 6px; }
.toast .haupt { flex: 1; display: grid; gap: 2px; min-width: 0; }
.toast .haupt span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.toast .link { color: var(--akzent-hell); background: none; border: 0; padding: 0; font-size: 12.5px; text-decoration: underline; text-decoration-color: var(--akzent-linie); text-underline-offset: 3px; justify-self: start; }
@keyframes toast-ein { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-aus { to { opacity: 0; transform: translateY(6px); } }

/* ---------- Chat mit dem CEO ---------- */
.chat { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: 100%; min-height: 0; }
.chat-liste { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--rail); }
.chat-liste .kopfzeile { padding: 12px; border-bottom: 1px solid var(--line); }
.chat-liste .kopfzeile .btn { width: 100%; }
.lauf-liste { overflow-y: auto; padding: 6px; display: grid; gap: 1px; align-content: start; }
.lauf { text-align: left; background: transparent; border: 0; border-radius: var(--r-klein); padding: 8px 10px; display: grid; gap: 2px; color: var(--ink-2); }
.lauf:hover { background: var(--surface); }
.lauf.aktiv { background: var(--surface-2); color: var(--ink); }
.lauf .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.lauf .m { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chat-haupt { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-kopf { display: flex; align-items: center; gap: 10px; padding: 10px 24px; border-bottom: 1px solid var(--line); min-height: 48px; }
.chat-kopf h2 { font-size: 14px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-kopf .kosten { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.willkommen { flex: 1; overflow-y: auto; padding: 40px 24px; }
.willkommen > div { max-width: 820px; margin: 0 auto; display: grid; gap: 20px; }
.willkommen h2 { font-size: 22px; letter-spacing: -0.02em; }
.willkommen p { margin: 0; color: var(--muted); max-width: 65ch; }
.team-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.team-liste div { background: var(--surface); padding: 12px 14px; display: grid; gap: 3px; align-content: start; }
.team-liste b { font-size: 13px; }
.team-liste span { font-size: 12px; color: var(--muted); }
.team-liste .modell { font: 11px var(--mono); color: var(--faint); }
.beispiele { display: grid; gap: 6px; }
.beispiel { text-align: left; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: var(--r-klein); padding: 10px 14px; font-size: 13px; }
.beispiel:hover { border-color: var(--akzent-linie); color: var(--ink); }
.verlauf { flex: 1; overflow-y: auto; padding: 24px 24px 40px; }
.verlauf > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.msg-user { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 14px; margin-bottom: 18px; white-space: pre-wrap; color: var(--ink); }
.thinking { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.thinking summary { cursor: pointer; list-style: none; }
.thinking summary::before { content: "› "; }
.thinking .body { max-height: 260px; overflow-y: auto; margin-top: 6px; white-space: pre-wrap; }
.agents-row { display: grid; gap: 8px; margin-bottom: 16px; }
.agent-run { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.agent-run > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.agent-run > summary::-webkit-details-marker { display: none; }
.agent-run > summary .who { font-weight: 600; white-space: nowrap; font-size: 13px; }
.agent-run > summary .task { color: var(--muted); font-size: 12.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-run > summary .state { font-size: 11.5px; white-space: nowrap; }
.agent-run.running > summary .state { color: var(--warn); }
.agent-run.done > summary .state { color: var(--ok); }
.agent-run.failed > summary .state { color: var(--err); }
.agent-run .pulse { animation: puls 1.6s ease-in-out infinite; }
.agent-run .tools { padding: 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.agent-run .tool-chip { font-size: 11.5px; color: var(--muted); background: var(--surface-3); border-radius: 4px; padding: 2px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-run .out { padding: 10px 14px 14px; border-top: 1px solid var(--line); margin-top: 10px; max-height: 480px; overflow-y: auto; }
.final { padding: 4px 0 20px; }
.msg-error { color: var(--err); margin-bottom: 16px; }
.msg-info { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.eingabe { padding: 12px 24px 20px; border-top: 1px solid var(--line); background: var(--ground); }
.eingabe form { max-width: 860px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.eingabe textarea { min-height: 44px; max-height: 220px; padding: 11px 12px; }
.eingabe .btn { height: 44px; }

/* ---------- Team / Zentrale ---------- */
.hq-buehne { position: relative; border-radius: var(--r); overflow: hidden; background: #050807; border: 1px solid var(--line); }
.hq-leiste { position: absolute; left: 16px; right: 16px; top: 14px; z-index: 3; display: flex; gap: 10px; align-items: center; pointer-events: none; }
.hq-leiste > * { pointer-events: auto; }
.hq-leiste .status { color: var(--ink-2); font-size: 13px; background: rgba(5, 8, 7, 0.72); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; }
.hq-leiste .status b { color: var(--ink); font-weight: 600; }
.hq-leiste .btn { margin-left: auto; background: rgba(40, 28, 10, 0.78); border-color: rgba(219, 166, 80, 0.5); color: #f3dcb0; }
.hq { position: relative; width: 100%; }
.hq canvas { display: block; position: absolute; inset: 0; }
.energie-anzeige { position: absolute; left: 0; top: 0; z-index: 2; display: grid; justify-items: center; pointer-events: none; }
.energie-anzeige b { font: 300 26px var(--sans); letter-spacing: -0.01em; color: #f1efe6; font-variant-numeric: tabular-nums; }
.energie-anzeige span { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: #9fa99f; }
.station {
  position: absolute; left: 0; top: 0; z-index: 2; width: 178px; text-align: left; cursor: pointer;
  display: grid; gap: 3px; padding: 11px 13px 12px; color: var(--ink);
  background: rgba(10, 14, 12, 0.8); border: 1px solid rgba(220, 230, 220, 0.09); border-radius: var(--r);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.9); transition: border-color 0.4s, background 0.4s;
}
.station::before { content: ""; position: absolute; left: 12px; right: 12px; top: -1px; height: 1px; background: var(--farbe); opacity: 0.3; transition: opacity 0.4s; }
.station:hover, .station:focus-visible { border-color: rgba(220, 230, 220, 0.2); outline: none; }
.station-kopf { display: flex; align-items: center; gap: 8px; }
.station svg { width: 16px; height: 16px; fill: none; stroke: #c9d0c6; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.station-name { font-weight: 600; font-size: 13px; color: #f1efe6; }
.led { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #39423d; transition: background 0.4s, box-shadow 0.4s; }
.station-kraft { font-size: 10.5px; color: #85908a; text-transform: uppercase; letter-spacing: 0.12em; }
.station-status { font: 11.5px var(--mono); color: #a7b0a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.5em; margin-top: 2px; }
.station-ladung { height: 1px; background: rgba(255,255,255,0.05); overflow: hidden; }
.station-ladung i { display: block; height: 100%; width: 35%; background: var(--farbe); opacity: 0; }
.station.aktiv { border-color: rgba(220, 230, 220, 0.18); background: rgba(14, 19, 17, 0.88); }
.station.aktiv::before { opacity: 0.9; }
.station.aktiv .led { background: var(--farbe); box-shadow: 0 0 8px var(--farbe); animation: puls 1.6s ease-in-out infinite; }
.station.aktiv .station-status { color: #f1efe6; }
.station.aktiv .station-ladung i { opacity: 0.9; animation: abtasten 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes abtasten { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.hq-buehne:has(.hq.alarm) { border-color: rgba(219, 166, 80, 0.4); }
.feed { display: grid; font-size: 12.5px; }
.feed-zeile { display: grid; grid-template-columns: 46px 92px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); align-items: baseline; }
.feed-zeile:first-child { border-top: 0; }
.feed-zeile time { color: var(--faint); font-variant-numeric: tabular-nums; }
.feed-zeile .wer { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-zeile > span:last-child { color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- Wissensgraph ---------- */
.graph-seite { display: grid; gap: 12px; }
.graph-leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.graph-leiste input[type=search] { width: 240px; }
.graph-typen { display: flex; flex-wrap: wrap; gap: 4px; }
.typ-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: transparent; border: 1px solid var(--line-2); border-radius: 99px; height: 26px; padding: 0 10px; opacity: 0.6; }
.typ-chip.an { opacity: 1; color: var(--ink-2); border-color: var(--line-3); }
.typ-chip i { width: 7px; height: 7px; border-radius: 50%; }
#graph-zahlen { font-size: 12px; margin-left: auto; }
.graph-haupt { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; min-height: 72vh; }
.graph-flaeche { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #050807; min-height: 72vh; }
.graph canvas { display: block; position: absolute; inset: 0; touch-action: none; cursor: grab; }
.graph-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; white-space: nowrap; background: rgba(10, 14, 12, 0.94); border: 1px solid var(--line-3); border-radius: var(--r-klein); padding: 4px 9px; font-size: 12px; }
.graph-seitenleiste { overflow-y: auto; max-height: 76vh; display: grid; gap: 12px; align-content: start; padding: 16px; }
.graph-seitenleiste h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.notiz-vorschau { max-height: 320px; overflow-y: auto; font-size: 13px; }
.links-block { display: grid; gap: 6px; }
.links-block > div { display: flex; flex-wrap: wrap; gap: 4px; }
.link-chip { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 4px; padding: 3px 8px; text-align: left; }
.link-chip:hover { border-color: var(--line-3); color: var(--ink); }
.wikilink { background: none; border: 0; padding: 0; color: var(--akzent-hell); text-decoration: underline; text-decoration-color: var(--akzent-linie); text-underline-offset: 3px; cursor: pointer; }

/* ---------- Werkstatt ---------- */
.vorschau-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.vorschau-eintrag { text-align: left; display: grid; gap: 2px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-klein); padding: 10px 12px; color: var(--ink); }
.vorschau-eintrag:hover, .vorschau-eintrag.an { border-color: var(--akzent-linie); }
.vorschau-eintrag span { font-size: 12px; color: var(--muted); }
.vorschau-rahmen { display: grid; gap: 8px; margin-top: 12px; }
.vorschau-rahmen iframe { width: 100%; height: 70vh; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 1180px) {
  .raster.drei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster.haupt-seite, .raster.briefing { grid-template-columns: minmax(0, 1fr); }
  .befehl-knopf { width: 220px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform 0.25s var(--ease); }
  .rail.offen { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,0.6); }
  .menue-knopf { display: inline-flex; width: 32px; padding: 0; }
  .kopf { padding: 0 12px; gap: 8px; }
  .befehl-knopf { width: 32px; padding: 0; justify-content: center; }
  .befehl-knopf span, .befehl-knopf kbd { display: none; }
  .kopf .unter { display: none; }
  .seite { padding: 16px; gap: 16px; }
  .raster.zwei, .raster.drei { grid-template-columns: minmax(0, 1fr); }
  .weg { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 18px; }
  .weg-rechts { width: 100%; }
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat-liste { display: none; }
  .verlauf, .willkommen { padding: 18px 16px 32px; }
  .eingabe { padding: 10px 12px 14px; }
  .graph-haupt { grid-template-columns: minmax(0, 1fr); }
  .graph-flaeche { min-height: 62vh; }
  .graph-seitenleiste { max-height: none; }
  .station { width: 112px; padding: 8px 9px; gap: 1px; }
  .station-kraft { display: none; }
  .station-name { font-size: 12px; }
  .station-status { font-size: 10.5px; }
  .feed-zeile { grid-template-columns: 40px 70px minmax(0, 1fr); }
  .kennzahlen { grid-template-columns: 1fr 1fr; }
  .live-pille span { display: none; }
  .nennwert { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.abstand-oben { margin-top: 18px; font-weight: 500; }
.inhalt.still .seite { animation: none; }
.abstand-klein { margin-top: 6px; }
.luecke { flex: 1; }

/* ---------- KRYPTON: Marke, Anmeldung, Laden, Typografie ---------- */
.marke-zeichen, .marke-wort, .login-logo, .laden img { mix-blend-mode: screen; height: auto; }
a.marke { text-decoration: none; color: inherit; padding: 18px 14px 14px; gap: 8px; }
.marke-zeichen { width: 46px; flex: none; }
.marke-wort { width: 124px; }
.login { align-content: center; }
.login-karte { width: min(440px, 100%); background: transparent; border: 0; box-shadow: none; padding: 0; gap: 14px; }
.login-logo { width: 100%; display: block; margin: -24px 0 -36px; }
.claim { font: 11px var(--display); letter-spacing: 0.42em; text-transform: uppercase; color: var(--akzent-hell); text-align: center; margin: 0; }
.unterzeile { font: 9px var(--display); letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); text-align: center; margin: 0 0 18px !important; }
.laden { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--ground); }
.laden img { width: 120px; animation: atmen 2.4s ease-in-out infinite; }
@keyframes atmen { 50% { opacity: 0.5; } }

.kopf h1 { font: 11.5px var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.seitenkopf h2, .willkommen h2 { font-family: var(--display); font-weight: 400; font-size: 19px; letter-spacing: 0.02em; }
.naechster-schritt h3 { font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: 0.02em; }
.nennwert { font-family: var(--display); font-weight: 400; font-size: 36px; letter-spacing: -0.01em; }
.nennwert small { font-family: var(--sans); }
.rosette .mitte-zahl { font: 400 26px var(--display); }
.rosette .ring .orbit { fill: none; stroke-width: 0.5; stroke-dasharray: 1 5; }
.rosette .ring.erreicht path, .rosette .ring.erreicht .orbit { stroke: var(--akzent); }
.rosette .ring.erreicht { filter: drop-shadow(0 0 3px rgba(121, 191, 255, 0.55)); }
.rosette .ring.offen .orbit { stroke: var(--ink-2); opacity: 0.12; }
.rosette .ring.naechster .orbit { stroke: var(--akzent-hell); opacity: 0.35; }
.nav a.aktiv { box-shadow: inset 1px 0 0 var(--akzent); }
.btn.primaer:hover:not(:disabled) { box-shadow: 0 0 22px -6px rgba(121, 191, 255, 0.75); }
.live-pille.aktiv i { box-shadow: 0 0 8px var(--akzent); }
.login-karte { z-index: auto; isolation: auto; }

/* ---------- KRYPTON Phase 3: Tabs, Dashboard, Agent Center, Tools, System, Chat-Optionen ---------- */
.tab-leiste { display: flex; gap: 4px; max-width: 1480px; margin: 0 auto; padding: 16px 24px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab-leiste a { padding: 9px 12px 10px; color: var(--muted); text-decoration: none; font-size: 13px; border-bottom: 1px solid transparent; margin-bottom: -1px; }
.tab-leiste a:hover { color: var(--ink); }
.tab-leiste a.an { color: var(--ink); border-bottom-color: var(--akzent); }
.tab-leiste + div > .seite, .tab-leiste + .seite { padding-top: 20px; }

.abschnitt-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.abschnitt-kopf h2 { font: 11px var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }

.statusleiste { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.statusleiste > div { padding: 14px 16px; display: grid; gap: 3px; align-content: start; border-left: 1px solid var(--line); min-width: 0; }
.statusleiste > div:first-child { border-left: 0; }
.statusleiste span { font-size: 11.5px; color: var(--muted); }
.statusleiste b { font: 400 22px var(--display); letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.statusleiste b small { font: 12px var(--sans); color: var(--muted); }
.statusleiste b.klein-wert { font-size: 15px; padding: 4px 0 3px; }
.statusleiste b.warnwert, .warnwert { color: var(--warn); }
.statusleiste em { font-style: normal; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statusleiste .messung { margin-top: 4px; }

.agent-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.agent-raster.gross { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.agent-karte { display: grid; gap: 8px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; position: relative; overflow: hidden; transition: border-color 0.15s, background 0.15s; min-width: 0; }
.agent-karte::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--rf, var(--akzent)); opacity: 0.35; }
a.agent-karte:hover { border-color: var(--line-3); background: var(--surface-2); }
.agent-karte.arbeitet { border-color: var(--akzent-linie); }
.agent-karte.arbeitet::before { opacity: 1; box-shadow: 0 0 12px var(--rf, var(--akzent)); }
.agent-karte.deaktiviert { opacity: 0.6; }
.agent-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agent-kopf .rolle { font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; }
.agent-taetigkeit { font-size: 12.5px; color: var(--ink-2); min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-zahlen { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.agent-zahlen b { color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.agent-beschreibung { margin: 0; color: var(--ink-2); font-size: 13px; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { font-size: 11.5px; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 99px; padding: 2px 9px; }
.kennzahlen.sechs { grid-template-columns: repeat(3, 1fr); }
.rolle.gross { font: 400 19px var(--display); letter-spacing: 0.02em; }
.rolle.gross::before { width: 9px; height: 9px; }

.zeitleiste { display: grid; gap: 0; }
.zeitpunkt { display: grid; grid-template-columns: 10px 42px minmax(0, 1fr); gap: 8px; padding: 7px 0; position: relative; }
.zeitpunkt i { width: 7px; height: 7px; border-radius: 50%; background: var(--rf, var(--muted)); margin-top: 5px; position: relative; z-index: 1; }
.zeitpunkt::before { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.zeitpunkt:first-child::before { top: 12px; }
.zeitpunkt:last-child::before { bottom: calc(100% - 12px); }
.zeitpunkt time { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 1px; }
.zeitpunkt p { margin: 1px 0 0; font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.zeitpunkt .rolle { font-size: 11.5px; }

.ressourcen { display: grid; gap: 12px; }
.ressourcen > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.ressourcen span:first-child { font-size: 12.5px; color: var(--muted); }
.ressourcen b { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.ressourcen b small { color: var(--muted); font-weight: 400; }
.ressourcen .messung { grid-column: 1 / -1; }
.stufen-zahlen.fuenf { grid-template-columns: repeat(5, 1fr); margin-top: 0; }
.stufen-zahlen.ordner { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: 0; gap: 12px; }

.schichten { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); padding: 0; margin: 12px 16px 16px; border: 1px solid var(--line); border-radius: var(--r-klein); overflow: hidden; }
.schichten > div { background: var(--surface); padding: 12px; display: grid; gap: 4px; align-content: start; }
.schichten b { font: 400 11px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--akzent-hell); }
.schichten span { font-size: 12px; color: var(--ink-2); }
.schichten em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.code-feld { font: 12.5px/1.6 var(--mono); }
.grundregeln { font-size: 12.5px; color: var(--muted); border-left: 1px solid var(--line-3); padding-left: 12px; white-space: pre-wrap; }
.werkzeug-liste { display: grid; gap: 6px; }
.werkzeug { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-klein); background: var(--surface); cursor: pointer; }
.werkzeug:hover { border-color: var(--line-3); }
.werkzeug:has(input:checked) { border-color: var(--akzent-linie); background: var(--surface-2); }
.werkzeug.gesperrt { opacity: 0.5; cursor: not-allowed; }
.werkzeug input { margin-top: 3px; accent-color: var(--akzent); }
.werkzeug .haupt { flex: 1; display: grid; gap: 2px; min-width: 0; }
.werkzeug .haupt b { font: 600 12.5px var(--mono); }
.werkzeug .haupt span { font-size: 12px; color: var(--muted); }
.stufe { display: inline-grid; place-items: center; min-width: 30px; height: 20px; padding: 0 6px; border-radius: 4px; font: 600 10.5px var(--mono); border: 1px solid var(--line-2); color: var(--ink-2); flex: none; }
.stufe.s0 { color: var(--ok); border-color: rgba(116, 211, 174, 0.35); }
.stufe.s1 { color: var(--akzent); border-color: var(--akzent-linie); }
.stufe.s2 { color: var(--warn); border-color: rgba(232, 194, 122, 0.4); }
.stufe.s3 { color: var(--err); border-color: rgba(229, 134, 126, 0.4); }
code { font: 12px var(--mono); color: var(--akzent-hell); }
.mono { font-family: var(--mono); font-size: 11.5px; overflow-wrap: anywhere; }

.log-liste { max-height: 70vh; overflow: auto; display: grid; align-content: start; gap: 0; font-size: 12px; }
.log-zeile { display: grid; grid-template-columns: 116px 64px minmax(0, 1fr); gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); }
.log-zeile:first-child { border-top: 0; }
.log-zeile time { color: var(--faint); font-variant-numeric: tabular-nums; }
.log-zeile .stufe-text { color: var(--muted); }
.log-zeile.fehler .stufe-text { color: var(--err); }
.log-zeile.warnung .stufe-text { color: var(--warn); }
.log-zeile pre { margin: 0; font: 11.5px/1.5 var(--mono); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
#log-suche { width: 180px; min-height: 28px; padding: 4px 8px; }

.chat-optionen { max-width: 860px; margin: 0 auto 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.agent-wahl select { min-height: 28px; padding: 3px 28px 3px 8px; font-size: 12.5px; width: auto; }
.notiz-wahl input { min-height: 28px; padding: 3px 8px; font-size: 12.5px; width: 220px; }
.anhaenge { display: flex; gap: 6px; flex-wrap: wrap; }
.anhang { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--akzent-hell); background: var(--akzent-weich); border: 1px solid var(--akzent-linie); border-radius: 4px; padding: 2px 4px 2px 8px; max-width: 240px; }
.anhang span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anhang button { border: 0; background: none; color: var(--muted); padding: 0 4px; font-size: 14px; line-height: 1; }
.anhang button:hover { color: var(--ink); }
.msg-user .anhaenge { margin-top: 8px; }
.msg-user .anhang { padding-right: 8px; }

@media (max-width: 1180px) {
  .statusleiste { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .statusleiste > div:nth-child(4) { border-left: 0; }
  .statusleiste > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .schichten { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .statusleiste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statusleiste > div { border-left: 0; border-top: 1px solid var(--line); }
  .statusleiste > div:nth-child(-n + 2) { border-top: 0; }
  .statusleiste > div:nth-child(even) { border-left: 1px solid var(--line); }
  .agent-raster.gross { grid-template-columns: minmax(0, 1fr); }
  .schichten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab-leiste { padding: 12px 16px 0; }
  .log-zeile { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .notiz-wahl input { width: 160px; }
}
a.eintrag { text-decoration: none; color: inherit; }
a.eintrag:hover .titel { color: var(--akzent-hell); }

/* ---------- Phase 4: Workflows, Graph, Kommunikation ---------- */
.dag { position: relative; overflow-x: auto; padding: 4px 0; }
.dag-linien { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.dag-linien path { fill: none; stroke: var(--line-3); stroke-width: 1.2; }
.dag-linien path.aktiv { stroke: var(--akzent); stroke-opacity: 0.7; filter: drop-shadow(0 0 3px rgba(121, 191, 255, 0.5)); }
.dag-spalten { position: relative; display: flex; gap: 48px; align-items: center; min-width: min-content; }
.dag-spalte { display: grid; gap: 12px; flex: none; }
.dag-knoten { position: relative; width: 190px; display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--r-klein); background: var(--surface-2); border: 1px solid var(--line-2); }
.dag-knoten::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--rf, var(--akzent)); opacity: 0.6; }
.dag-knoten[data-task] { cursor: pointer; }
.dag-knoten[data-task]:hover { border-color: var(--line-3); }
.dag-knoten b { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.dag-kopf { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dag-kopf .rolle { font-size: 11.5px; }
.dag-freigabe .icon { width: 13px; height: 13px; color: var(--warn); }
.dag-knoten.st-laeuft { border-color: var(--akzent-linie); box-shadow: 0 0 16px -6px rgba(121, 191, 255, 0.6); }
.dag-knoten.st-fertig { border-color: rgba(116, 211, 174, 0.35); }
.dag-knoten.st-wartet_freigabe { border-color: rgba(232, 194, 122, 0.5); }
.dag-knoten.st-fehlgeschlagen { border-color: rgba(229, 134, 126, 0.5); }
.dag-knoten.st-geplant, .dag-knoten.st-abgebrochen { opacity: 0.6; }
.vorlagen { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 620px), 1fr)); gap: 14px; }
.fortschritt-zelle { min-width: 120px; }
.fortschritt-zelle .messung { margin-bottom: 4px; }
.auszug { color: var(--ink-2) !important; overflow-wrap: anywhere; }
.feld.schmal { flex: 0 1 120px !important; }
.chip-wahl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 99px; padding: 3px 10px; cursor: pointer; }
.chip-wahl:has(input:checked) { border-color: var(--akzent-linie); color: var(--akzent-hell); background: var(--akzent-weich); }
.chip-wahl input { accent-color: var(--akzent); margin: 0; }
.nachricht { border-top: 1px solid var(--line); padding: 8px 0; }
.nachricht:first-child { border-top: 0; }
.nachricht > summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: 12.5px; flex-wrap: wrap; }
.nachricht > summary::-webkit-details-marker { display: none; }
.nachricht .pfeil { color: var(--faint); }
.nachricht .betreff { flex: 1; min-width: 120px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nachricht time { color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.nachricht .md { font-size: 12.5px; margin: 8px 0 4px; padding-left: 12px; border-left: 1px solid var(--line-2); max-height: 320px; overflow: auto; }
.nachricht.art-frage summary .marke-status { color: var(--akzent-hell); }
.nachricht.art-hinweis summary .marke-status { color: var(--warn); }
.rechte-matrix { display: grid; gap: 8px; }
.rechte-matrix > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.rechte-matrix .ziele { display: flex; gap: 10px; flex-wrap: wrap; }
.rechte-matrix .ziele .rolle { font-size: 12px; }

/* ---------- Knowledge Evolution ---------- */
.zyklen td { white-space: nowrap; }
.phase-punkt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--faint); vertical-align: 1px; }
.phase-punkt.ok { background: var(--ok); } .phase-punkt.akzent { background: var(--akzent); box-shadow: 0 0 8px var(--akzent); } .phase-punkt.fehler { background: var(--err); } .phase-punkt.warn { background: var(--warn); }
.zeiten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prio { display: inline-grid; place-items: center; min-width: 26px; height: 20px; border-radius: 4px; font: 600 10.5px var(--mono); border: 1px solid var(--line-2); color: var(--muted); flex: none; }
.prio.p1 { color: var(--warn); border-color: rgba(232, 194, 122, 0.45); } .prio.p2 { color: var(--akzent); border-color: var(--akzent-linie); }
details.vorschlag { display: block; }
details.vorschlag > summary { display: flex; gap: 12px; align-items: flex-start; list-style: none; cursor: pointer; }
details.vorschlag > summary::-webkit-details-marker { display: none; }
details.vorschlag .md { font-size: 12.5px; margin-top: 8px; padding-left: 12px; border-left: 1px solid var(--line-2); }
.stufen-zahlen.evo-kurz { grid-template-columns: repeat(7, 1fr); margin-top: 0; }
@media (max-width: 900px) { .stufen-zahlen.evo-kurz { grid-template-columns: repeat(4, 1fr); } .zeiten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =====================================================================
   KRYPTON „Orbit“: weichere, dem Logo angepasste Formensprache.
   Rundungen wie der Orbit-Ring, Kristall-Licht als feine Oberkante,
   eisblaues Leuchten nur an aktiven Stellen. Überschreibt die Grundformen oben.
   ===================================================================== */
:root {
  --r: 20px;
  --r-klein: 12px;
  --r-pille: 999px;
  --kristall: linear-gradient(180deg, rgba(184, 217, 255, 0.07), rgba(184, 217, 255, 0) 38%);
  --flaeche-grund: linear-gradient(180deg, rgba(17, 27, 44, 0.72), rgba(8, 12, 19, 0.82));
  --kante: rgba(121, 191, 255, 0.11);
  --kante-hell: rgba(184, 217, 255, 0.22);
  --chrom: linear-gradient(180deg, #d6e8ff 0%, #9fcdff 45%, #6fb4f5 100%);
}

body {
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(54, 106, 178, 0.16), transparent 62%),
    radial-gradient(900px 520px at 6% 108%, rgba(40, 80, 140, 0.10), transparent 60%),
    var(--ground);
  background-attachment: fixed;
}
/* Orbit-Ringe im Hintergrund des Arbeitsbereichs (sehr zurückhaltend) */
.hauptbereich { position: relative; isolation: isolate; }
.hauptbereich::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800' fill='none'%3E%3Cg transform='rotate(-9 900 120)' stroke='%2379BFFF'%3E%3Cellipse cx='900' cy='120' rx='620' ry='150' stroke-opacity='.07'/%3E%3Cellipse cx='900' cy='120' rx='780' ry='200' stroke-opacity='.045'/%3E%3Cellipse cx='900' cy='120' rx='960' ry='255' stroke-opacity='.03'/%3E%3C/g%3E%3C/svg%3E") right top / 1200px auto no-repeat;
}

/* Flächen: abgerundet, mit Kristall-Oberkante */
.flaeche, .agent-karte, .chance-karte, .dag-knoten, .experiment, .werkzeug, .auftrag, .vorschau-eintrag, .team-liste, .kennzahlen, .schichten, .spalte, .msg-user, .agent-run, .beispiel, .ablage, dialog.palette, .toast, .login-karte input {
  border-radius: var(--r);
}
.flaeche, .agent-karte, .spalte, .ablage, .agent-run {
  background: var(--kristall), var(--flaeche-grund);
  border-color: var(--kante);
  box-shadow: inset 0 1px 0 rgba(184, 217, 255, 0.06), 0 24px 48px -36px rgba(0, 0, 0, 0.9);
}
.flaeche-kopf { padding: 16px 20px 0; }
.flaeche-inhalt { padding: 12px 20px 20px; }
.chance-karte, .dag-knoten, .experiment, .werkzeug, .auftrag, .vorschau-eintrag, .beispiel { border-radius: 16px; background: var(--kristall), rgba(16, 26, 42, 0.7); border-color: var(--kante); }
.kennzahlen, .team-liste, .schichten { border-radius: 16px; }

/* Knöpfe: Pillen, Primär in Chrom-Blau wie der Schriftzug */
.btn, .befehl-knopf, .live-pille, .segment, .segment button, .stufenwahl button, .typ-chip, .chip, .chip-wahl, .anhang, .link-chip, .marke-status, kbd { border-radius: var(--r-pille); }
.btn { padding: 0 16px; }
.btn.mini { padding: 0 12px; }
.btn.primaer { background: var(--chrom); color: #04111f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 6px 20px -10px rgba(121, 191, 255, 0.8); }
.btn.primaer:hover:not(:disabled) { background: var(--chrom); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 26px -6px rgba(121, 191, 255, 0.85); }
.btn.ruhig:hover:not(:disabled) { background: rgba(121, 191, 255, 0.08); }
.btn.glocke, .menue-knopf { width: 36px; height: 36px; border-radius: 50%; }
.glocke .zahl { border-radius: var(--r-pille); }
.stufenwahl { gap: 4px; }
.stufenwahl button { margin-left: 0; border-radius: var(--r-pille) !important; }
.segment { padding: 3px; }

/* Eingaben */
input:not([type=checkbox]):not([type=radio]), select, textarea { border-radius: 14px; background: rgba(13, 20, 32, 0.8); border-color: var(--kante); }
input[type=search], .notiz-wahl input, .graph-leiste input[type=search], #log-suche { border-radius: var(--r-pille); padding-left: 16px; }
input:focus, select:focus, textarea:focus { border-color: var(--akzent-linie); box-shadow: 0 0 0 4px rgba(121, 191, 255, 0.08); }

/* Navigation: Pillen mit leuchtendem Punkt statt Kante */
.rail { background: linear-gradient(180deg, rgba(8, 13, 22, 0.96), rgba(4, 6, 11, 0.98)); border-right-color: var(--kante); }
a.marke { flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 18px 18px; }
.marke-zeichen { width: 72px; margin: -6px 0 -10px -6px; }
.marke-wort { width: 132px; }
.nav { padding: 6px 10px 14px; gap: 2px; }
.nav a { height: 36px; padding: 0 14px; border-radius: var(--r-pille); position: relative; }
.nav a:hover { background: rgba(121, 191, 255, 0.06); }
.nav a.aktiv { background: linear-gradient(90deg, rgba(121, 191, 255, 0.16), rgba(121, 191, 255, 0.04)); box-shadow: inset 0 0 0 1px rgba(121, 191, 255, 0.16); }
.nav a.aktiv::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--akzent); box-shadow: 0 0 10px var(--akzent); }
.nav a.aktiv:has(.zaehler:not([hidden]))::after { display: none; }
.nav-gruppe { padding: 16px 14px 6px; letter-spacing: 0.04em; }
.rail-fuss { border-top-color: var(--kante); }
.budget-mini .messung, .messung { height: 5px; border-radius: var(--r-pille); }
.messung i { background: linear-gradient(90deg, #6fb4f5, #b8d9ff); box-shadow: 0 0 10px rgba(121, 191, 255, 0.45); }

/* Kopfzeile: schwebend, ohne harte Linie */
.kopf { background: transparent; border-bottom: 0; height: 64px; }
.befehl-knopf { height: 36px; padding: 0 10px 0 16px; background: rgba(13, 20, 32, 0.7); border-color: var(--kante); }
.live-pille { height: 36px; padding: 0 14px; border-color: var(--kante); }

/* Tabs als Pillen */
.tab-leiste { border-bottom: 0; gap: 6px; padding-top: 8px; }
.tab-leiste a { border-radius: var(--r-pille); padding: 8px 16px; border: 1px solid transparent; margin: 0; }
.tab-leiste a.an { border-color: rgba(121, 191, 255, 0.22); background: rgba(121, 191, 255, 0.10); }

/* Tabellen: weiche Zeilen */
.tabelle tbody tr.klickbar td:first-child { border-radius: 12px 0 0 12px; }
.tabelle tbody tr.klickbar td:last-child { border-radius: 0 12px 12px 0; }
.tabelle td { border-bottom-color: rgba(121, 191, 255, 0.06); }

/* Statusleiste: einzelne Kacheln mit Ring-Anzeigen */
.statusleiste { background: none; border: 0; box-shadow: none; gap: 12px; }
.statusleiste > div { border: 1px solid var(--kante) !important; border-radius: var(--r); background: var(--kristall), var(--flaeche-grund); padding: 16px 18px; }
.statusleiste .ring-kachel { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; }
.statusleiste .ring-kachel > span, .statusleiste .ring-kachel > em { grid-column: 2; }
.statusleiste .ring-kachel > svg { grid-row: 1 / span 3; }
svg.ring { width: 58px; height: 58px; transform: rotate(-90deg); flex: none; }
svg.ring circle { fill: none; stroke-width: 5; }
.ring .spur { stroke: rgba(121, 191, 255, 0.10); }
.ring .wert { stroke: url(#ring-verlauf); stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(121, 191, 255, 0.55)); transition: stroke-dashoffset 0.8s var(--ease); }
.ring.warn .wert { stroke: var(--warn); filter: none; }
.ring.fehler .wert { stroke: var(--err); filter: none; }

/* Agent-Karten: weicher, mit Orbit-Leuchtpunkt */
.agent-karte::before { left: 18px; right: 18px; border-radius: 1px; }
.agent-karte.arbeitet { box-shadow: inset 0 1px 0 rgba(184, 217, 255, 0.08), 0 0 0 1px rgba(121, 191, 255, 0.22), 0 18px 40px -24px rgba(121, 191, 255, 0.45); }
.rolle::before { border-radius: 50%; }
.dag-knoten::before { display: none; }
.dag-knoten { padding: 12px 14px; }
.dag-linien path { stroke-linecap: round; }

/* Schublade, Palette, Toasts */
.schublade { border-radius: var(--r) 0 0 var(--r); background: linear-gradient(180deg, rgba(10, 16, 27, 0.98), rgba(5, 8, 13, 0.99)); }
dialog.palette { border-color: rgba(121, 191, 255, 0.24); }
.palette-eintrag { border-radius: 14px; }
.toast { background: var(--kristall), rgba(16, 26, 42, 0.96); }

/* Zentrale, Graph, Werkstatt */
.hq-buehne, .graph-flaeche, .vorschau-rahmen iframe { border-radius: var(--r); }
.station { border-radius: 16px; }
.hq-leiste .status { border-radius: var(--r-pille); }

/* Abschnittstitel: dezentes Licht */
.abschnitt-kopf h2 { color: var(--akzent-hell); text-shadow: 0 0 18px rgba(121, 191, 255, 0.35); }

@media (max-width: 900px) {
  .statusleiste > div { border-top: 1px solid var(--kante) !important; }
  svg.ring { width: 46px; height: 46px; }
  .schublade { border-radius: 0; }
}
/* Orbit: Feinschliff nach Sichtprüfung */
.statusleiste { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.statusleiste b { font-size: 24px; white-space: nowrap; }
a.marke { align-items: center; padding: 20px 18px 16px; gap: 2px; }
.marke-zeichen { width: 92px; margin: 0; }
.marke-wort { width: 128px; margin-top: -4px; }
@media (max-width: 1180px) { .statusleiste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.marke-zeichen { width: 78px; }
.nav a { height: 34px; }
.wertung i { border-radius: 3px; }
.spalte-leer { border-radius: 14px; }
.stufenleiste { border-radius: var(--r-pille); }
.stufenleiste i:first-child { border-radius: var(--r-pille) 0 0 var(--r-pille); }
@media (max-width: 600px) {
  .statusleiste .ring-kachel { display: grid; grid-template-columns: 1fr; }
  .statusleiste .ring-kachel > svg { display: none; }
  .statusleiste .ring-kachel > span, .statusleiste .ring-kachel > em { grid-column: 1; }
  .statusleiste b { font-size: 20px; }
  .statusleiste > div { padding: 14px; }
}
/* Chat im Orbit-Stil */
.chat-liste { background: transparent; border-right-color: var(--kante); }
.chat-liste .kopfzeile { border-bottom: 0; }
.lauf { border-radius: 14px; padding: 9px 12px; }
.lauf.aktiv { background: rgba(121, 191, 255, 0.10); box-shadow: inset 0 0 0 1px rgba(121, 191, 255, 0.16); }
.chat-kopf { border-bottom-color: rgba(121, 191, 255, 0.07); }
.eingabe { background: linear-gradient(180deg, transparent, rgba(3, 4, 7, 0.85) 40%); border-top: 0; }
.eingabe textarea { border-radius: 24px; padding: 12px 18px; }
.eingabe .btn { height: 46px; padding: 0 22px; }
.agent-wahl select { border-radius: var(--r-pille); }
.msg-user { border-radius: 20px 20px 6px 20px; background: linear-gradient(180deg, rgba(121, 191, 255, 0.10), rgba(121, 191, 255, 0.05)); border-color: rgba(121, 191, 255, 0.18); }
kbd { border-radius: 6px; }

/* ---------- Konten: Login mit Registrierung, Kontozeile, Verwaltung ---------- */
.login-umschalter { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--kante-hell); border-radius: var(--r-pille); background: rgba(13, 20, 32, 0.7); }
.login-umschalter button { height: 34px; border: 0; border-radius: var(--r-pille); background: transparent; color: var(--muted); font: 600 13px var(--sans, inherit); cursor: pointer; transition: background 0.2s, color 0.2s; }
.login-umschalter button:hover { color: var(--ink); }
.login-umschalter button.an { background: linear-gradient(180deg, rgba(121, 191, 255, 0.30), rgba(121, 191, 255, 0.16)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--akzent-linie), 0 0 18px -6px var(--akzent); }
.login-umschalter button:not(.an) { background: transparent; box-shadow: none; }
.login-formular { display: grid; gap: 12px; }
.login-formular input { height: 42px; }
.login-hinweis { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--akzent-weich); border: 1px solid var(--akzent-linie); color: var(--akzent-hell) !important; font-size: 13px; line-height: 1.45; }
.login-fuss { text-align: center; font-size: 12.5px; line-height: 1.5; }
.login-formular .btn.gross { margin-top: 4px; }

.konto-zeile { display: flex; align-items: center; gap: 6px; }
.konto-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: var(--r-pille); text-decoration: none; color: var(--ink); transition: background 0.2s; }
.konto-link:hover { background: rgba(121, 191, 255, 0.08); }
.konto-text { display: grid; min-width: 0; line-height: 1.2; }
.konto-text b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konto-text em { font-style: normal; font-size: 11px; color: var(--muted); }
.konto-avatar { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 12px var(--display); color: var(--akzent-hell); background: radial-gradient(circle at 50% 30%, #17304f, #0a1220 75%); box-shadow: inset 0 0 0 1px var(--akzent-linie), 0 0 16px -6px var(--akzent); }
.konto-avatar.klein { width: 26px; height: 26px; font-size: 10px; }
.btn.icon-knopf { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; }
.nur-ansicht-pille { flex: none; }

.konto-zelle { display: inline-flex; align-items: center; gap: 8px; }
.konto-zelle b { font-weight: 600; }
.tabelle tr.inaktiv td { opacity: 0.55; }
.tabelle tr.bearbeiten-zeile td { background: rgba(121, 191, 255, 0.04); padding-top: 14px; padding-bottom: 16px; }
.tabelle tr.bearbeiten-zeile .formular { max-width: 860px; }
.nowrap { white-space: nowrap; }
.key-anfang { font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; color: var(--akzent-hell); letter-spacing: 0.04em; }
.key-neu { display: grid; gap: 8px; justify-items: start; margin-bottom: 16px; padding: 14px 16px; border-radius: 16px; background: var(--akzent-weich); border: 1px solid var(--akzent-linie); }
.key-neu code { font-family: var(--mono, ui-monospace, monospace); font-size: 17px; letter-spacing: 0.08em; color: var(--ink); user-select: all; word-break: break-all; }
.seitenkopf .text.konto-kopf { display: flex; align-items: center; gap: 14px; }
.tabelle.keys th:nth-child(4), .tabelle.keys td:nth-child(4) { padding-right: 28px; white-space: nowrap; }
.konto-kopf .konto-avatar { width: 48px; height: 48px; font-size: 17px; }

/* Nur-Ansicht-Konten: Bedienelemente zum Starten und Ändern ausblenden (der Server lehnt sie ohnehin ab) */
.nur-lesen .eingabe, .nur-lesen #new-run, .nur-lesen .seitenkopf .aktionen button, .nur-lesen [data-aktion], .nur-lesen [data-fortsetzen],
.nur-lesen .formular button[type=submit], .nur-lesen #inhalt form button, .nur-lesen .schalter { display: none !important; }
.nur-lesen #pw-form button[type=submit] { display: inline-flex !important; }

/* ======================================================================
   Handy (iPhone/Android): nach Durchsicht aller Seiten bei 393 px Breite
   ====================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, summary, label, select { touch-action: manipulation; }
.chats-knopf, .chat-hintergrund { display: none; }
.tabelle.stapel tr[hidden] { display: none !important; }

@media (max-width: 900px) {
  /* Ganze Bildschirmhöhe auch mit ein- und ausfahrender Safari-Leiste */
  .shell { height: 100%; height: 100dvh; }

  /* iOS zoomt in Felder mit weniger als 16 px Schrift hinein */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }

  /* Menü: deckend, abgedunkelter Hintergrund, eigenes Scrollen */
  .rail { background: #05080e; width: min(300px, 86vw); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); overscroll-behavior: contain; }
  .rail .nav { overscroll-behavior: contain; }
  .nav a { height: 44px; font-size: 15px; }
  .shell:has(.rail.offen)::after { content: ""; position: fixed; inset: 0; z-index: 45; background: rgba(2, 4, 8, 0.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

  /* Kopfzeile: Titel bekommt den Platz, Statuspunkt entfällt */
  .kopf { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) calc(10px + env(safe-area-inset-right)) 0 calc(6px + env(safe-area-inset-left)); gap: 6px; }
  .login { padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .seite { padding-left: calc(14px + env(safe-area-inset-left)) !important; padding-right: calc(14px + env(safe-area-inset-right)) !important; }
  .kopf h1 { font-size: 11px; letter-spacing: 0.1em; flex: 1; min-width: 0; }
  .kopf .luecke { display: none; }
  .menue-knopf, .befehl-knopf, .btn.glocke { width: 40px; height: 40px; flex: none; }
  .live-pille, .nur-ansicht-pille { display: none; }

  .seite { padding: 14px 14px 28px; gap: 14px; }
  .seitenkopf .text { min-width: 0; }
  .seitenkopf h2, .willkommen h2 { font-size: 18px; }
  .flaeche-kopf { padding: 14px 16px 0; flex-wrap: wrap; row-gap: 8px; }
  .flaeche-inhalt { padding: 10px 16px 16px; }

  /* Filter und Reiter: eine Zeile zum Wischen statt Umbruch */
  .segment { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .segment::-webkit-scrollbar, .tab-leiste::-webkit-scrollbar { display: none; }
  .segment button { flex: none; white-space: nowrap; height: 32px; }
  .tab-leiste { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 10px 14px 0; }
  .tab-leiste a { flex: none; white-space: nowrap; }
  .flaeche-kopf .rechts { margin-left: 0; width: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
  .flaeche-kopf .rechts input[type=search] { flex: 1; min-width: 0; }

  /* Größere Tippflächen */
  .btn { min-height: 38px; }
  .btn.mini { min-height: 32px; }

  /* Chat: Liste als Schublade, Eingabe kompakt und über der Home-Leiste */
  .chat { position: relative; }
  .chats-knopf { display: inline-flex; flex: none; gap: 6px; }
  .chat-kopf { padding: 8px 12px; gap: 8px; }
  .chat.liste-offen .chat-liste { display: flex; position: absolute; inset: 0 auto 0 0; z-index: 30; width: min(320px, 86vw); background: #05080e; border-right: 1px solid var(--kante); box-shadow: 30px 0 80px rgba(0, 0, 0, 0.6); animation: von-links 0.22s var(--ease); }
  .chat.liste-offen .chat-hintergrund { display: block; position: absolute; inset: 0; z-index: 29; background: rgba(2, 4, 8, 0.6); }
  .chat-liste .lauf { min-height: 48px; }
  .eingabe { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .chat-optionen { gap: 6px; margin-bottom: 6px; }
  .agent-wahl { flex: 1 1 100%; }
  .agent-wahl select { width: 100%; }
  .notiz-wahl { flex: 1; min-width: 0; }
  .notiz-wahl input { width: 100%; }
  .eingabe textarea { padding: 10px 16px; max-height: 40vh; }
  .eingabe .btn { height: 44px; padding: 0 16px; }
  .willkommen .team-liste { display: none; }
  .beispiel { font-size: 14px; }

  /* Pipeline: breite Spalten zum Wischen, rasten ein */
  .board { grid-template-columns: repeat(6, 82vw); scroll-snap-type: x mandatory; scroll-padding: 0 14px; }
  .board > .spalte { scroll-snap-align: start; }

  /* Live-Zentrale: Statuszeile über der Bühne statt über dem CEO */
  .hq-leiste { position: static; padding: 12px 12px 0; flex-wrap: wrap; }

  /* Schubladen und Dialoge über die volle Breite */
  .schublade { width: 100vw !important; max-width: 100vw; padding-bottom: env(safe-area-inset-bottom); }
  dialog.palette { width: calc(100vw - 20px); max-width: none; margin-top: 10px; max-height: calc(100dvh - 20px); }
  .ablage { left: 10px !important; right: 10px !important; width: auto !important; }
  .toasts { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); }
  .toast { width: auto; max-width: none; }
}

@keyframes von-links { from { transform: translateX(-24px); opacity: 0; } }

/* Breite Tabellen werden auf schmalen Bildschirmen zu Karten (Beschriftung setzt shell.js) */
@media (max-width: 640px) {
  .tabelle.stapel, .tabelle.stapel tbody { display: block; }
  .tabelle.stapel thead { display: none; }
  .tabelle.stapel tr { display: grid; gap: 6px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--kante); border-radius: 16px; background: rgba(13, 20, 32, 0.55); }
  .tabelle.stapel td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0; border: 0; text-align: right; min-width: 0; white-space: normal !important; }
  .tabelle.stapel td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: 12px; text-align: left; }
  .tabelle.stapel td[data-label=""]::before { display: none; }
  .tabelle.stapel td[data-label=""] { justify-content: flex-end; }
  .tabelle.stapel td:first-child { justify-content: flex-start; text-align: left; font-size: 14px; }
  .tabelle.stapel td:first-child::before { display: none; }
  .tabelle.stapel td[colspan] { display: block; text-align: left; }
  .tabelle.stapel tr.bearbeiten-zeile { margin-top: -6px; }
  .tabelle.stapel tbody tr.klickbar td:first-child { border-radius: 0; }
  .tabelle-huelle:has(.stapel) { overflow: visible; }
}
/* Handy, zweite Runde: Seitenkopf untereinander, Glocken-Ablage deckend */
.ablage { background: linear-gradient(180deg, rgba(10, 16, 27, 0.99), rgba(5, 8, 13, 0.995)); }
@media (max-width: 900px) {
  .seitenkopf { flex-direction: column; align-items: stretch; gap: 12px; }
  .seitenkopf .text { flex: none; }
  .seitenkopf .aktionen { justify-content: flex-start; }
  .tabelle.stapel td > div { text-align: right; }
}
/* Lernzyklus-Karten: Statuspunkt bleibt bei seinem Wort */
@media (max-width: 640px) {
  .tabelle.stapel td { justify-content: flex-end; }
  .tabelle.stapel td::before { margin-right: auto; }
  .tabelle.stapel td:first-child::before { margin-right: 0; }
}
