/* Pricing-Werkstatt · Stil nach dem Vorbild von claude.ai:
   warmer Cremegrund, dunkle Serifen-Überschriften, viel Luft, weiche Kanten,
   ein einziger warmer Akzent. Markenfarben (Navy, Teal, Gold) nur für Daten. */

:root {
  --bg: #F5F3EE;
  --bg-2: #EEEBE3;
  --paper: #FBFAF7;
  --ink: #1F1E1C;
  --ink-2: #4B4945;
  --ink-3: #7A776F;
  --line: #E4E0D6;
  --line-2: #D6D1C4;
  --accent: #D97757;
  --accent-2: #C4643F;
  --accent-soft: #F7E7DE;
  --navy: #1B2A4A;
  --blue: #3A6B9F;
  --teal: #2A9D8F;
  --teal-soft: #E1F2EF;
  --gold: #C49A2A;
  --gold-soft: #F6EED8;
  --red: #B4432F;
  --red-soft: #F6E1DC;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 2px rgba(31, 30, 28, .04), 0 8px 24px -16px rgba(31, 30, 28, .18);
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; margin: 0 0 .4em; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46em; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.serif { font-family: var(--serif); }
code, .mono { font-family: var(--mono); font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.narrow { max-width: 760px; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 20; background: rgba(245, 243, 238, .86); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.15rem; }
.brand svg { width: 28px; height: 28px; }
.brand img { height: 22px; width: auto; flex: 0 0 auto; display: block; }
.brand small { font-family: var(--sans); color: var(--ink-3); font-size: .8rem; margin-left: 4px; }
nav.main { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
nav.main a { padding: 7px 12px; border-radius: 999px; color: var(--ink-2); font-size: .93rem; }
nav.main a:hover { background: var(--bg-2); text-decoration: none; color: var(--ink); }
nav.main a.active { background: var(--ink); color: #fff; }
nav.main .menu { position: relative; }
nav.main .menu .caret { font-size: .7em; opacity: .7; margin-left: 2px; }
nav.main .submenu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow); padding: 6px; display: none; flex-direction: column; gap: 2px; z-index: 30; }
nav.main .submenu a { border-radius: 7px; padding: 8px 12px; white-space: nowrap; display: block; }
nav.main .submenu a.active { background: var(--bg-2); color: var(--ink); font-weight: 600; }
nav.main .menu:hover .submenu, nav.main .menu:focus-within .submenu, nav.main .menu.open .submenu { display: flex; }
.userchip { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-2); }
.userchip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.userchip .dot.pending { background: var(--gold); }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-size: .95rem; cursor: pointer; transition: transform .08s ease, background .15s ease; }
.btn:hover { background: #000; text-decoration: none; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--bg-2); }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-2); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.danger { background: transparent; border-color: var(--line-2); color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Formulare */
input[type=text], input[type=email], textarea, select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-s);
  background: #fff; font: inherit; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(217, 119, 87, .35); border-color: var(--accent); }
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-size: .85rem; color: var(--ink-2); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 200px; }
.row > .badge, .row > span:has(> .badge) { flex: 0 0 auto; }
.code-input { font-size: 2rem; letter-spacing: .4em; text-align: center; font-family: var(--mono); }

/* Karten */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card.tight { padding: 16px 18px; }
.card.accent { background: var(--accent-soft); border-color: #EFD3C5; }
.card.teal { background: var(--teal-soft); border-color: #C6E6E0; }
.grid { display: grid; gap: 14px; align-items: stretch; }
.grid > .card, .grid > .card + .card { margin-top: 0; height: 100%; }
.grid > .card > p:last-child { margin-bottom: 0; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Abzeichen */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; letter-spacing: .01em; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.badge.muss { background: var(--accent-soft); color: var(--accent-2); }
.badge.soll { background: var(--bg-2); color: var(--ink-2); }
.badge.offen { background: var(--bg-2); color: var(--ink-3); }
.badge.geliefert { background: var(--gold-soft); color: #8A6B12; }
.badge.geprueft { background: var(--teal-soft); color: #1E7A6F; }
.badge.ersatzweg { background: var(--gold-soft); color: #8A6B12; }
.badge.entfaellt { background: var(--bg-2); color: var(--ink-3); text-decoration: line-through; }
.badge.gate { background: var(--navy); color: #fff; }
.badge.fokus { background: var(--accent); color: #fff; }
.badge.critical { background: var(--red-soft); color: var(--red); }
.badge.high { background: var(--gold-soft); color: #8A6B12; }
.badge.moderate { background: var(--teal-soft); color: #1E7A6F; }
.badge.core { background: var(--navy); color: #fff; }
.badge.pending { background: var(--gold-soft); color: #8A6B12; }
.badge.approved { background: var(--teal-soft); color: #1E7A6F; }
.badge.blocked { background: var(--red-soft); color: var(--red); }
.badge.cat-Political { background: #E7E9F5; color: #3A4A8F; }
.badge.cat-Economic { background: var(--gold-soft); color: #8A6B12; }
.badge.cat-Social { background: var(--accent-soft); color: var(--accent-2); }
.badge.cat-Technological { background: #E1EEF7; color: var(--blue); }
.badge.cat-Environmental { background: var(--teal-soft); color: #1E7A6F; }
.badge.cat-Legal { background: #ECE7F5; color: #5B4B8A; }

/* Seiten */
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(32px, 6vw, 70px); }
.hero h1 { max-width: 16em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--ink-3); font-weight: 600; margin-bottom: 14px; }
section.block { padding: clamp(28px, 5vw, 56px) 0; }
section.block + section.block { border-top: 1px solid var(--line); }
.page-head { padding: 36px 0 18px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }

/* Reiter */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 6px 0 26px; }
.tabs a { padding: 10px 14px; border-radius: 8px 8px 0 0; color: var(--ink-2); font-size: .93rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--ink); background: var(--bg-2); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }

/* Tabellen */
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: 10px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
tr.gate td { background: #F1EFE8; }

/* Zeitleiste */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 0 22px 40px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--line-2); }
.timeline li.done::before { background: var(--teal); border-color: var(--teal); }
.timeline li.now::before { background: var(--accent); border-color: var(--accent); }
.timeline .when { font-size: .8rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }

/* Szenario-Kreuz */
.cross { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cross .cell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px 16px; min-height: 150px; }
.cross .cell.fokus { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cross .cell h4 { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; }
.prob { font-family: var(--serif); font-size: 1.8rem; color: var(--navy); line-height: 1; }
.axis-label { font-size: .78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }

/* Streudiagramm */
.scatter { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); }
.scatter text { font-family: var(--sans); }

/* Fortschritt */
.progress { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal); border-radius: 999px; transition: width .4s ease; }
.progress.accent > span { background: var(--accent); }
.kpi { font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--ink); }
.kpi + .small { margin-top: 6px; }

/* Listen */
.filelist { list-style: none; padding: 0; margin: 8px 0 0; }
.filelist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: .9rem; }
.filelist li:first-child { border-top: 0; }
.filelist .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--radius-s); padding: 14px; text-align: center; color: var(--ink-3); font-size: .9rem; background: #fff; cursor: pointer; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.comment { padding: 12px 0; border-top: 1px solid var(--line); }
.comment:first-child { border-top: 0; }
.comment .meta { font-size: .8rem; color: var(--ink-3); margin-bottom: 4px; }
.comment .meta b { color: var(--ink-2); font-weight: 600; }
details { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 16px; background: #fff; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details summary::-webkit-details-marker { display: none; }
details[open] summary { margin-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: .8rem; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Hinweise */
.notice { padding: 12px 16px; border-radius: var(--radius-s); background: var(--gold-soft); border: 1px solid #EBDDB3; font-size: .93rem; }
.notice.ok { background: var(--teal-soft); border-color: #C6E6E0; }
.notice.err { background: var(--red-soft); border-color: #EBC4BB; color: var(--red); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow); z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* Team */
.person { display: flex; gap: 14px; align-items: flex-start; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 1.2rem; flex: 0 0 52px; }

footer { padding: 40px 0 60px; color: var(--ink-3); font-size: .85rem; border-top: 1px solid var(--line); margin-top: 60px; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 1180px) {
  .brand small { display: none; }
  nav.main a { padding: 6px 10px; font-size: .88rem; }
}

@media (max-width: 720px) {
  .top .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  nav.main { width: 100%; margin-left: 0; }
  .cross { grid-template-columns: 1fr; }
}

/* ---------- Phasenmodell Workshop 2 ---------- */
.phase-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
@media (max-width: 1100px) { .phase-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .phase-strip { grid-template-columns: 1fr; } }
.phase-strip .fenster { background: var(--bg-2); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; border: 1px solid transparent; }
.phase-strip .fenster.heute { border-color: var(--accent); background: var(--accent-soft); }
.phase-strip .fenster-head { padding: 2px 4px 6px; }
.phase-chip { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; color: var(--ink); text-decoration: none; position: relative; transition: transform .12s, box-shadow .12s; }
.phase-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.phase-chip b { display: block; margin-top: 4px; font-size: .95rem; line-height: 1.3; }
.phase-chip.aktuell { border: 2px solid var(--accent); }
.phase-chip .hier { position: absolute; top: -9px; right: 10px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; }
.badge.st-offen { background: var(--bg-2); color: var(--ink-3); }
.badge.st-ki_laeuft { background: var(--gold-soft); color: #7A5A0E; }
.badge.st-vorlage { background: #E4ECF6; color: var(--blue); }
.badge.st-bearbeitung { background: var(--accent-soft); color: var(--accent-2); }
.badge.st-entschieden { background: var(--teal-soft); color: #1E7A6F; }
.badge.st-abgeschlossen { background: var(--navy); color: #fff; }
.badge.accent { background: var(--accent); color: #fff; }
.small.ok { color: #1E7A6F; font-weight: 600; }
.phase-head h2 { font-size: 1.7rem; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stepper li { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--paper); font-size: .92rem; }
.stepper li .who { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; text-align: center; }
.stepper li.ki .who { background: #E4ECF6; color: var(--blue); }
.stepper li.mensch .who { background: var(--accent-soft); color: var(--accent-2); }
.stepper li.done { opacity: .55; }
.stepper li.done .who::after { content: ' ✓'; }
.stepper li.now { border-color: var(--accent); background: #fff; box-shadow: var(--shadow); }
.col-title { font-size: 1.05rem; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.col-title.ki { border-color: var(--blue); }
.col-title.mensch { border-color: var(--accent); }
.phase-cols > div > .card, .phase-cols > div > .feld { margin-bottom: 12px; }
.auftrag details summary { cursor: pointer; color: var(--ink-2); }
.err { color: var(--red); }
.md { font-size: .93rem; line-height: 1.55; }
.md h1, .md h2, .md h3, .md h4, .md h5 { margin: 18px 0 8px; line-height: 1.25; }
.md h2 { font-size: 1.25rem; } .md h3 { font-size: 1.08rem; } .md h4, .md h5 { font-size: .98rem; }
.md p { margin: 8px 0; }
.md ul, .md ol { margin: 6px 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md table { width: 100%; border-collapse: collapse; font-size: .86rem; margin: 8px 0 14px; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; text-align: left; }
.md th { background: var(--bg-2); }
.md .table-wrap { overflow-x: auto; }
.md pre { background: var(--bg-2); border-radius: var(--radius-s); padding: 10px 12px; overflow-x: auto; font-size: .82rem; }
.md code { background: var(--bg-2); padding: 1px 5px; border-radius: 4px; font-size: .86em; }
.md blockquote { border-left: 3px solid var(--line-2); margin: 8px 0; padding: 4px 12px; color: var(--ink-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.doc-view { max-height: 70vh; overflow: auto; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; margin-top: 8px; }
.gate-card details ul { padding-left: 18px; }

/* ---------- Regie im Raum (Drehbuch V03) ---------- */
.regie { margin: 14px 0; padding: 16px 20px; }
.regie > summary { cursor: pointer; list-style: none; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.regie > summary::-webkit-details-marker { display: none; }
.regie > summary .eyebrow { margin: 0; }
.regie > summary::before { content: '▸'; color: var(--ink-3); font-size: .9rem; }
.regie[open] > summary::before { content: '▾'; }
.regie-body { margin-top: 12px; }
.regie-leitfrage { font-family: var(--serif); font-size: 1.05rem; color: var(--ink-2); border-left: 3px solid var(--gold); padding: 4px 12px; margin: 6px 0; }
.regie-tabelle { font-size: .9rem; margin: 6px 0; }
.regie-tabelle th, .regie-tabelle td { padding: 8px 8px; }
.regie-tabelle tr.jetzt td { background: var(--accent-soft); }
.regie-tabelle tr.done td { opacity: .55; }
.regie-portal { margin: 0; padding: 0; list-style: none; font-size: .86rem; }
.regie-portal li { margin: 2px 0 7px; line-height: 1.45; }
.regie-wer { font-weight: 600; color: var(--navy); }
.regie-link a { color: var(--blue); }
.badge.vb { background: #ECE7F5; color: #5B4B8A; }
.variante-b { border-style: dashed; opacity: .82; }
.variante-b:hover { opacity: 1; }
.ablauf-tabelle td { vertical-align: top; }
.ablauf-tabelle tr.pause td { background: var(--bg-2); color: var(--ink-3); font-size: .86rem; }
.ablauf-tabelle tr.orga td { color: var(--ink-2); }
.ablauf-tabelle tr.jetzt td { background: var(--accent-soft); }
.ablauf-tabelle tr.done td { opacity: .55; }
.ablauf-tabelle .phase-link { text-decoration: none; }
.flash { animation: flash 1.8s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: var(--shadow); } }
.run-status { flex: 2; }

/* ---------- Facilitator: Chat ---------- */
.chat { display: grid; grid-template-columns: 260px minmax(0, 1fr) 300px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; margin: 14px 0 24px; min-height: 560px; box-shadow: var(--shadow); }
.chat-left { background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-left-head { display: flex; gap: 8px; align-items: center; padding: 16px 16px 8px; font-size: .95rem; }
.chat-logo { width: 24px; height: 24px; border-radius: 6px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: 0 0 24px; }
.chat-new { margin: 6px 12px 10px; width: calc(100% - 24px); justify-content: center; display: inline-flex; gap: 6px; align-items: center; }
.chat-threads { flex: 1; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.chat-thread { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.chat-thread:hover { background: var(--paper); text-decoration: none; }
.chat-thread.active { background: var(--paper); box-shadow: var(--shadow); }
.chat-thread-title, .chat-trunc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-tools { display: none; gap: 2px; }
.chat-thread:hover .chat-thread-tools { display: flex; }
.chat-icon { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; padding: 3px 5px; border-radius: 6px; line-height: 1; display: inline-flex; align-items: center; }
.chat-icon:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
.chat-icon.danger:hover { color: var(--red); }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1.2s infinite; flex: 0 0 8px; }
.chat-left-foot { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 10px; align-items: center; }
.chat-user-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); flex: 0 0 9px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: .92rem; font-weight: 600; background: var(--paper); }
.chat-head .btn { display: inline-flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.chat-messages { flex: 1; overflow-y: auto; padding: 26px 24px; }
.chat-messages-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; }
.msg-bubble { background: var(--bg-2); border-radius: 16px 16px 4px 16px; padding: 10px 14px; max-width: 80%; font-size: .95rem; }
.msg-meta { font-size: .74rem; color: var(--ink-3); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.msg.agent { display: flex; gap: 12px; align-items: flex-start; }
.msg.agent .msg-meta { margin: 0 0 4px; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 34px; }
.msg-body { min-width: 0; flex: 1; }
.msg-content .md { font-size: .95rem; }
.msg-live { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: .9rem; margin-top: 6px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; flex: 0 0 14px; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .3; } }
.chat-empty { text-align: center; padding: 50px 0 20px; }
.chat-empty-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; }
.chat-empty-title { font-family: var(--serif); font-size: 1.7rem; margin: 0 0 8px; }
.chat-start { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chat-start .btn { white-space: normal; text-align: left; }
.chat-input { padding: 0 24px 14px; }
.chat-input-card { max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.chat-input-card textarea { width: 100%; border: 0; background: transparent; resize: none; padding: 14px 16px 6px; font: inherit; font-size: .98rem; outline: none; max-height: 220px; min-height: 48px; box-shadow: none; }
.chat-input-card textarea:focus { box-shadow: none; border: 0; }
.chat-input-row { display: flex; gap: 4px; align-items: center; padding: 4px 10px 10px; }
.chat-btn { border: 0; background: transparent; color: var(--ink-2); width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.chat-btn:hover { background: rgba(0, 0, 0, .05); }
.chat-btn:disabled { opacity: .4; cursor: default; }
.chat-btn.send { background: var(--ink); color: #fff; }
.chat-btn.send:hover { background: var(--navy); }
.chat-btn.rec { color: var(--accent); background: var(--accent-soft); }
.chat-files { max-width: 820px; margin: 0 auto 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chat-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .8rem; background: var(--bg-2); }
.chat-right { border-left: 1px solid var(--line); background: var(--paper); padding: 18px; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.chat-right h4 { margin: 0 0 8px; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 600; }
.chat-right .start-q { display: block; width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .86rem; cursor: pointer; margin-bottom: 6px; color: var(--ink); font-family: inherit; }
.chat-right .start-q:hover { border-color: var(--accent); background: #fff; }
@media (max-width: 1100px) { .chat { grid-template-columns: 240px minmax(0, 1fr); } .chat-right { display: none; } }
@media (max-width: 760px) { .chat { grid-template-columns: 1fr; height: auto !important; } .chat-left { max-height: 240px; } .chat-messages { max-height: 60vh; } }

/* ---------- Iteration 2 (10.09.2026): Phasenseite in nummerierten Schritten, Infoknopf, Review-Modus ---------- */
.steps { display: grid; gap: 14px; margin-top: 18px; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.step-nr { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 1.1rem; }
#step-gate .step-nr { background: var(--accent); }
.step-head h3 { font-size: 1.2rem; }
.step-body > .card + .card, .step-body > .card + .feld, .step-body > .feld + .card { margin-top: 10px; }
.step-body > .card, .step-body > .feld { margin-bottom: 0; }
.step-body > .card + .card { margin-top: 10px; }
.doc-preview { max-height: 46vh; }
.info-btn { gap: 6px; }
.info-i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; font-family: var(--serif); font-style: italic; font-size: .8rem; line-height: 1; }
.info-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.info-row:first-child { border-top: 0; }
.info-k { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; padding-top: 3px; }
.info-v { font-size: .95rem; line-height: 1.55; }
.info-steps li { grid-template-columns: 70px 1fr; }
@media (max-width: 720px) { .info-row { grid-template-columns: 1fr; gap: 4px; } }
.kern > summary { color: var(--ink-2); }
.kern .regie { margin: 0; }
body.noscroll { overflow: hidden; }

/* Modal (Info zur Phase, Vollbild-Ansicht eines Dokuments) */
.modal { position: fixed; inset: 0; background: rgba(31, 30, 28, .45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--paper); border-radius: var(--radius); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .5); width: min(880px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; }
.modal.wide .modal-card { width: min(1240px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px 22px 24px; overflow: auto; }
.doc-full .md { font-size: 1rem; }
.doc-full .md table { font-size: .92rem; }

/* Review-Modus: Vollbild-Editor */
.review { position: fixed; inset: 0; background: var(--bg); z-index: 70; display: flex; flex-direction: column; }
.review[hidden] { display: none; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 24px; background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.review-tools { display: flex; gap: 6px; align-items: center; padding: 8px 24px; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.review-doc { flex: 1; overflow: auto; background: #fff; margin: 18px auto; width: min(1100px, calc(100% - 48px)); padding: 32px 44px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 1rem; line-height: 1.6; outline: none; }
.review-doc:focus { box-shadow: 0 0 0 3px rgba(217, 119, 87, .25); }
.review-doc h2 { font-size: 1.5rem; margin: 14px 0 8px; } .review-doc h3 { font-size: 1.2rem; margin: 16px 0 6px; } .review-doc h4, .review-doc h5 { font-size: 1.02rem; margin: 12px 0 4px; }
.review-doc p { margin: 8px 0; }
.review-doc ul, .review-doc ol { margin: 6px 0 10px; padding-left: 24px; }
.review-doc table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: .95rem; }
.review-doc th, .review-doc td { border: 1px solid var(--line-2); padding: 6px 8px; vertical-align: top; text-align: left; min-width: 40px; }
.review-doc th { background: var(--bg-2); }
.review-doc td:focus, .review-doc th:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.review-doc blockquote { border-left: 3px solid var(--line-2); margin: 8px 0; padding: 4px 12px; color: var(--ink-2); }
.review-doc pre { background: var(--bg-2); border-radius: var(--radius-s); padding: 10px 12px; overflow-x: auto; font-size: .85rem; }
@media (max-width: 720px) { .review-doc { width: calc(100% - 16px); padding: 18px 16px; margin: 8px auto; } .step { padding: 14px 16px; } }
.step .row > .btn, .review-head .row > .btn, .doc-preview + .row > .btn { flex: 0 0 auto; }

.review-tools .tb { padding: 5px 10px; min-width: 34px; justify-content: center; }
.review-tools .tb-block { width: auto; padding: 5px 10px; font-size: .85rem; border-radius: 999px; }
.review-tools .tb-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.review-foot { padding: 0 24px 12px; }
.review-doc h2, .review-doc h3, .review-doc h4 { font-family: var(--serif); }
.review-doc ul li, .review-doc ol li { margin: 3px 0; }
.review-doc div { margin: 8px 0; }

/* ---------- Baustein 3: RMD-Monitoring ---------- */
.badge.rmd-gruen { background: var(--teal-soft); color: #1E7A6F; }
.badge.rmd-gelb { background: var(--gold-soft); color: #8A6B12; }
.badge.rmd-rot { background: var(--red-soft); color: var(--red); }
.badge.rmd-grau { background: var(--bg-2); color: var(--ink-3); }
.badge.prio-1 { background: var(--navy); color: #fff; }
.badge.prio-2 { background: var(--blue); color: #fff; }
.badge.prio-3 { background: var(--bg-2); color: var(--ink-2); }
.ampel-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.ampel-dot.gruen { background: var(--teal); } .ampel-dot.gelb { background: var(--gold); } .ampel-dot.rot { background: var(--red); } .ampel-dot.grau { background: var(--line-2); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi-row .card.tight { padding: 14px 16px; }
.kpi-row .kpi { font-size: 2rem; }
.kpi.rot { color: var(--red); } .kpi.gelb { color: #8A6B12; } .kpi.gruen { color: #1E7A6F; }
.rmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.rmd-card { display: block; text-decoration: none; color: inherit; padding: 16px 18px; border-left: 4px solid var(--line-2); transition: transform .12s, box-shadow .12s; }
.rmd-card:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(31,30,28,.06), 0 14px 30px -18px rgba(31,30,28,.3); text-decoration: none; }
.rmd-card.gruen { border-left-color: var(--teal); } .rmd-card.gelb { border-left-color: var(--gold); } .rmd-card.rot { border-left-color: var(--red); }
.rmd-card .wert { font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--ink); }
.rmd-card .wert small { font-family: var(--sans); font-size: .85rem; color: var(--ink-3); margin-left: 4px; }
.rmd-card .delta { font-size: .82rem; }
.delta.up { color: #1E7A6F; } .delta.down { color: var(--red); } .delta.neutral { color: var(--ink-3); }
.rmd-chart { width: 100%; height: auto; display: block; }
.rmd-chart text { font-family: var(--sans); fill: var(--ink-3); font-size: 11px; }
.rmd-chart .achse { stroke: var(--line-2); stroke-width: 1; }
.rmd-chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.rmd-chart .linie { fill: none; stroke: var(--navy); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.rmd-chart .linie.gemessen { stroke: var(--navy); }
.rmd-chart .punkt { fill: var(--navy); }
.rmd-chart .punkt.gemessen { fill: #fff; stroke: var(--navy); stroke-width: 2; }
.rmd-chart .trend { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 5; }
.rmd-chart .band { fill: var(--teal); fill-opacity: .07; }
.rmd-chart .schwelle { stroke: var(--red); stroke-width: 1.2; stroke-dasharray: 4 4; }
.rmd-chart .schwelle-text { fill: var(--red); font-weight: 600; }
.rmd-chart .basis { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 1 3; }
.rmd-chart .heute { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.rmd-chart .marker { stroke: var(--gold); stroke-width: 1.6; }
.rmd-chart .marker.geplant { stroke-dasharray: 5 4; }
.rmd-chart .marker-text { fill: #8A6B12; font-size: 10px; font-weight: 600; }
.rmd-chart .kreuz { fill: var(--accent); }
.rmd-chart .kreuz-text { fill: var(--accent-2); font-weight: 600; }
.rmd-chart .wert-text { fill: var(--navy); font-weight: 700; font-size: 12px; }
.legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--ink-3); margin-top: 8px; }
.legende span::before { content: ''; display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--line-2); margin-right: 6px; vertical-align: middle; }
.legende .l-linie::before { border-color: var(--navy); } .legende .l-trend::before { border-top-style: dashed; border-color: var(--accent); }
.legende .l-schwelle::before { border-top-style: dashed; border-color: var(--red); } .legende .l-marker::before { border-color: var(--gold); }
.legende .l-band::before { border: 0; height: 10px; background: var(--teal); opacity: .18; } .legende .l-basis::before { border-top-style: dotted; border-color: var(--ink-3); }
.rmd-fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; font-size: .92rem; }
.rmd-fakten .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.ereignis { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; align-items: start; }
.ereignis:first-child { border-top: 0; }
.ereignis.erledigt { opacity: .55; }
.register td.num { text-align: right; font-family: var(--mono); font-size: .85rem; }
@media (max-width: 720px) { .ereignis { grid-template-columns: 1fr; } }
.rmd-chart.multi .linie.multi { stroke-width: 2.4; }
.rmd-chart.multi .trend.multi { stroke-width: 1.6; opacity: .75; }
.rmd-chart .reihe-text { font-size: 11px; font-weight: 700; }
.multi-legende { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.multi-legende .chip { display: inline-flex; align-items: center; font-size: .82rem; padding: 5px 12px; }
.multi-legende .chip.on { color: #fff; }
.multi-legende .chip.on .ampel-dot { box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.schalter > * { flex: 0 0 auto; }

/* ---------- Baustein 3: Radar (Kategorien, Wettbewerber, Signale) ---------- */
.register tr.gruppe td { background: var(--bg-2); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); padding-top: 8px; padding-bottom: 8px; }
.wb-card { display: block; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
.wb-card:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(31,30,28,.06), 0 14px 30px -18px rgba(31,30,28,.3); text-decoration: none; }
.signal-timeline li.sig-hoch::before { border-color: var(--red); background: var(--red-soft); }
.signal-timeline li.sig-mittel::before { border-color: var(--gold); background: var(--gold-soft); }
.signal-timeline li.erledigt { opacity: .55; }
.radar-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 14px; align-items: end; }
.radar-form .field { margin: 0; }
.radar-form .wide { grid-column: 1 / -1; }
.kpi-row > .card + .card { margin-top: 0; }
.radar-form input[type=date] { width: 100%; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: #fff; font: inherit; color: var(--ink); }

/* ---------- Tanagra Portale (portal-verwaltung) ---------- */
.schritte { list-style: none; margin: 0; padding: 0; }
.schritte li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: start; }
.schritte li:last-child { border-bottom: 0; }
.schritte .punkt { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 600; background: var(--bg-2); color: var(--ink-3); }
.schritte .ok .punkt { background: var(--teal); color: #fff; }
.schritte .laeuft .punkt { background: var(--gold); color: #fff; animation: pulse 1.2s infinite; }
.schritte .fehler .punkt { background: var(--red); color: #fff; }
.schritte .rueckbau .punkt { background: var(--ink-3); color: #fff; }
.domain-vorschau { font-family: var(--mono); font-size: .92rem; background: var(--bg-2); border-radius: var(--radius-s); padding: 8px 12px; display: inline-block; margin-top: 6px; }
.status-punkt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--ink-3); }
.status-punkt.an { background: var(--teal); } .status-punkt.aus { background: var(--red); }
@keyframes pulse { 50% { opacity: .35; } }
