/* Energiekompass · Design-System */
:root {
  --bg: #f4f7f5; --surface: #ffffff; --surface-2: #f7faf8; --ink: #0c1f1b; --ink-2: #33504a; --muted: #6b827c;
  --line: #e4ece8; --line-2: #d3e0da;
  --brand: #10b981; --brand-2: #0d9488; --brand-ink: #065f46; --sun: #fbbf24; --heat: #f43f5e; --sky: #38bdf8;
  --ok: #10b981; --warn: #f59e0b; --no: #f43f5e; --open: #0ea5e9;
  --r-lg: 24px; --r: 16px; --r-sm: 10px;
  --sh-1: 0 1px 2px rgba(12,31,27,.04), 0 1px 1px rgba(12,31,27,.03);
  --sh-2: 0 1px 2px rgba(12,31,27,.04), 0 8px 24px -6px rgba(12,31,27,.08);
  --sh-3: 0 2px 4px rgba(12,31,27,.04), 0 24px 48px -12px rgba(12,31,27,.16);
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; font: 14.5px/1.55 "InterVariable", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-feature-settings: "cv11", "ss01"; color: var(--ink); background: var(--bg); }
a { color: var(--brand-2); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 700; } h2 { font-size: 18px; font-weight: 650; } h3 { font-size: 15.5px; font-weight: 650; } h4 { font-size: 14px; }
p { margin: 0; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .block { display: block; }
.good { color: #059669; font-weight: 650; } .r { text-align: right; }
code { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 6px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 22px 16px; background: var(--surface); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -.02em; padding: 0 8px; }
.brand b { color: var(--brand-2); font-weight: 750; }
.mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, #34d399, #0d9488); box-shadow: 0 6px 16px -4px rgba(13,148,136,.55), inset 0 1px 0 rgba(255,255,255,.35); }
.mark svg { width: 22px; height: 22px; }
.mark.big { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; } .mark.big svg { width: 34px; height: 34px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 520; transition: background .15s; }
.side-nav a:hover { background: var(--surface-2); }
.side-nav a.active { background: #ecfdf5; color: var(--brand-ink); font-weight: 620; }
.side-nav a .i { color: var(--muted); } .side-nav a.active .i { color: var(--brand-2); }
.side-label { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 18px 10px 6px; }
.hh-dot { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(140deg, #fbbf24, #f59e0b); }
.side-nav .muted-link { color: var(--muted); font-size: 13.5px; }
.side-foot { display: grid; gap: 10px; }
.side-foot > a { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 8px 10px; border-radius: 10px; }
.side-foot > a:hover { background: var(--surface-2); color: var(--ink); }
.side-card { display: flex; gap: 10px; padding: 14px; border-radius: 14px; background: linear-gradient(140deg, #ecfdf5, #f0fdfa); border: 1px solid #d1fae5; font-size: 12.5px; color: var(--ink-2); }
.side-card .i { color: var(--brand-2); } .side-card b { display: block; color: var(--ink); }
.main { padding: 34px 40px 60px; max-width: 1480px; width: 100%; }

.toast { display: flex; gap: 8px; align-items: center; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; margin-bottom: 20px; width: fit-content; box-shadow: var(--sh-3); animation: drop .4s var(--ease); }
.toast .i { color: #6ee7b7; } .toast.error { background: #fff1f2; color: #9f1239; box-shadow: none; margin: 0 auto 12px; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Bausteine ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 26px; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 6px; }
.lead { color: var(--muted); max-width: 78ch; margin-top: 8px; font-size: 15px; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 550; margin-bottom: 10px; }
.back:hover { color: var(--ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: 22px; }
.card + .card, section.card, details.card { margin-top: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head p { margin-top: 3px; }
.sub-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--ink); transition: transform .15s var(--ease), box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { color: #fff; background: linear-gradient(140deg, #10b981, #0d9488); box-shadow: 0 8px 20px -8px rgba(13,148,136,.7), inset 0 1px 0 rgba(255,255,255,.2); }
.btn.primary:hover { box-shadow: 0 12px 24px -8px rgba(13,148,136,.75); }
.btn.ghost { background: var(--surface); border-color: var(--line-2); box-shadow: var(--sh-1); }
.btn.light { background: rgba(255,255,255,.95); color: var(--brand-ink); }
.btn.link { background: none; padding: 6px 0; color: var(--muted); font-weight: 550; }
.btn.danger { color: #e11d48; } .btn.small { padding: 6px 11px; font-size: 13px; border-radius: 10px; } .btn.block { width: 100%; }
.icon-btn { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: #fff1f2; color: #e11d48; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(16,185,129,.15); }
textarea { resize: vertical; } input[type=file] { padding: 8px; background: var(--surface-2); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 12px; }
summary { cursor: pointer; list-style: none; } summary::-webkit-details-marker { display: none; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.pill.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700; }
.chip-ic { --c: var(--brand); width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); border: 1px solid color-mix(in srgb, var(--c) 22%, white); }
.chip-ic .i { width: 20px; height: 20px; }
.chip-ic.sm { width: 30px; height: 30px; border-radius: 9px; } .chip-ic.sm .i { width: 16px; height: 16px; }
.chip-ic.lg { width: 48px; height: 48px; border-radius: 14px; } .chip-ic.lg .i { width: 26px; height: 26px; }

/* Popover */
.pop { position: relative; }
.pop-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 20px; display: grid; gap: 6px; animation: drop .2s var(--ease); }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 22px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; width: fit-content; box-shadow: var(--sh-1); flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 11px; color: var(--muted); font-weight: 580; transition: all .15s; }
.tabs a:hover { color: var(--ink); background: var(--surface-2); }
.tabs a.active { color: #fff; background: linear-gradient(140deg, #10b981, #0d9488); box-shadow: 0 6px 14px -6px rgba(13,148,136,.7); }
.tabs a.active .count { background: rgba(255,255,255,.25); color: #fff; }

/* ---------- Login ---------- */
.view-login { background: #fff; }
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-art { position: relative; overflow: hidden; background: linear-gradient(170deg, #ecfeff 0%, #d1fae5 55%, #a7f3d0 100%); }
.sun { position: absolute; width: 220px; height: 220px; border-radius: 50%; top: 12%; right: 16%; background: radial-gradient(circle, #fde68a 0 45%, #fbbf24 70%, transparent 71%); box-shadow: 0 0 120px 40px rgba(251,191,36,.35); }
.hills { position: absolute; bottom: 0; width: 100%; height: 45%; }
.login-claim { position: absolute; left: 10%; top: 36%; max-width: 480px; }
.login-claim h2 { font-size: 38px; line-height: 1.12; letter-spacing: -.03em; color: #064e3b; }
.login-claim p { margin-top: 16px; color: #065f46; font-size: 16px; }
.login-panel { display: grid; place-items: center; padding: 30px; }
.login-card { width: min(360px, 100%); text-align: center; }
.login-card h1 b { color: var(--brand-2); }
.login-card form { display: grid; gap: 12px; margin-top: 26px; }
.login-card input { padding: 13px 14px; }

/* ---------- Home ---------- */
.hh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.hh-grid > .card { margin: 0; }
.hh-card { color: var(--ink); display: grid; gap: 18px; transition: transform .2s var(--ease), box-shadow .2s; }
.hh-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.hh-card-top { display: flex; gap: 14px; align-items: center; }
.hh-card-top > div { flex: 1; }
.avatar { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-weight: 750; font-size: 20px; color: #fff; background: linear-gradient(140deg, #fbbf24, #f97316); box-shadow: 0 8px 18px -8px rgba(249,115,22,.7); }
.go { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); transition: all .2s; }
.hh-card:hover .go { background: var(--brand); color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.hh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hh-stats div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.hh-stats b { display: block; font-size: 20px; } .hh-stats span { font-size: 12px; color: var(--muted); }
.hh-stats .warn b { color: #d97706; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #34d399, #0d9488); }
.hh-new { border-style: dashed; border-width: 1.5px; box-shadow: none; background: transparent; }
.hh-new h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }

/* ---------- Architektur-Diagramm ---------- */
.flow-card { padding: 22px; }
.flow-wrap { width: 100%; overflow-x: auto; border-radius: 18px; }
svg.arch { display: block; width: 100%; margin: 0 auto; min-width: min(960px, var(--arch-w, 960px)); height: auto; font-family: inherit; }
.arch .zone { fill: rgba(255,255,255,.72); stroke: var(--line); }
.arch .zone-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; fill: #8aa29b; }
.arch .edge .track { fill: none; stroke: color-mix(in srgb, var(--k) 20%, white); stroke-width: 8; stroke-linejoin: round; stroke-linecap: round; }
.arch .edge .line { fill: none; stroke: var(--k); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.arch .edge.daten .track { stroke-width: 5; stroke: color-mix(in srgb, var(--k) 14%, white); }
.arch .edge.daten .line { stroke-dasharray: 2 5; stroke-width: 2; }
.arch .edge .port { fill: #fff; stroke: var(--k); stroke-width: 2; }
.arch .edge:hover .line { stroke-width: 3.5; }
.arch .elabel rect { fill: #fff; stroke: color-mix(in srgb, var(--k, #ccc) 40%, white); }
.arch .elabel.strom { --k: #e9a800; } .arch .elabel.waerme { --k: #f43f5e; } .arch .elabel.daten { --k: #0ea5e9; }
.arch .elabel text { font-size: 11.5px; font-weight: 700; text-anchor: middle; fill: color-mix(in srgb, var(--k) 70%, black); }
.arch .pt { fill: var(--k); }
.arch.live .edge .line { opacity: .25; transition: opacity .3s; }
.arch.live .edge .track { stroke: #eef3f1; }
.arch.live .edge.active .line { opacity: 1; }
.arch.live .edge.active .track { stroke: color-mix(in srgb, var(--k) 28%, white); }
.card-fo { overflow: visible; }
.dev { box-sizing: border-box; width: 100%; height: 100%; display: flex; flex-direction: column; gap: 3px; padding: 13px 14px 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 1px 2px rgba(12,31,27,.05), 0 10px 22px -12px rgba(12,31,27,.22); position: relative; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; font-family: "InterVariable", "Inter", system-ui, sans-serif; color: var(--ink); }
.dev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.dev:hover { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent), 0 14px 28px -12px rgba(12,31,27,.3); }
.dev-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; min-width: 0; }
.dev-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); }
.dev-ic svg { width: 20px; height: 20px; }
.dev-type { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-open { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; flex: none; box-shadow: 0 0 0 3px #fef3c7; }
.dev-val { margin-left: auto; font-size: 12.5px; font-weight: 750; white-space: nowrap; padding: 3px 8px; border-radius: 99px; display: none; }
.dev-name { font-size: 16px; font-weight: 680; letter-spacing: -.01em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-model { font-size: 13px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dev-model b { color: var(--ink-2); font-weight: 650; }
.dev-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
.dev-specs { display: flex; gap: 4px; overflow: hidden; flex: 1; min-width: 0; }
.dev-specs span { font-size: 12px; font-weight: 650; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.dev-if { display: flex; gap: 3px; margin-left: auto; flex: none; }
.dev-if i, .legend .ifs i { font-style: normal; min-width: 17px; height: 17px; border-radius: 5px; font-size: 10px; font-weight: 750; display: grid; place-items: center; color: #fff; padding: 0 3px; }
.dev-if i.ok, .legend .ifs i.ok { background: var(--ok); } .dev-if i.warn, .legend .ifs i.warn { background: var(--warn); }
.dev-if i.no { background: var(--no); } .dev-if i.open, .legend .ifs i.open { background: var(--open); }
.legend .ifs::before { display: none; } .legend .ifs i { width: 10px; min-width: 10px; height: 10px; border-radius: 3px; padding: 0; }
.arch.live .dev-val { display: inline-block; background: #eef3f1; color: var(--muted); }
.arch.live .dev.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent), 0 14px 28px -14px color-mix(in srgb, var(--c) 60%, transparent); }
.arch.live .dev.on .dev-val { background: var(--c); color: #fff; }
.arch.live .dev.off { opacity: .62; } .arch.live .dev.off .dev-ic { filter: grayscale(1); }
.arch.live .dev.on .dev-type { display: none; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.legend .l { display: inline-flex; align-items: center; gap: 7px; }
.legend .l::before { content: ""; width: 20px; height: 5px; border-radius: 3px; }
.legend .strom::before { background: #f2b705; } .legend .waerme::before { background: #f43f5e; }
.legend .daten::before { background: repeating-linear-gradient(90deg, #38bdf8 0 3px, transparent 3px 7px); }
.legend .open::before { width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; }
.legend .daten::before { background: repeating-linear-gradient(90deg, #0ea5e9 0 3px, transparent 3px 7px); } .legend .strom::before { background: #e9a800; }

/* ---------- Übersicht ---------- */
.overview { display: grid; gap: 18px; }
.overview > .card { margin: 0; }
.ov-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; } .ov-side .card { margin: 0; }
.stat-card h3 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.stack-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 3px; margin-bottom: 14px; }
.stack-bar span.ok, .sw.ok { background: var(--ok); } .stack-bar span.warn, .sw.warn { background: var(--warn); }
.stack-bar span.no, .sw.no { background: var(--no); } .stack-bar span.open, .sw.open { background: var(--open); }
.stat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13.5px; }
.stat-list li { display: flex; align-items: center; gap: 10px; } .stat-list b { margin-left: auto; }
.sw { width: 10px; height: 10px; border-radius: 3px; }
.more { display: inline-flex; gap: 6px; align-items: center; margin-top: 16px; font-weight: 600; font-size: 13.5px; }
.stat-card.accent { position: relative; overflow: hidden; color: #fff; border: 0; background: linear-gradient(150deg, #10b981 0%, #0d9488 60%, #0f766e 100%); }
.stat-card.accent::after { content: ""; position: absolute; right: -50px; top: -50px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(253,230,138,.55), transparent 65%); }
.stat-card.accent h3 { margin: 12px 0 6px; } .stat-card.accent p { opacity: .9; margin-bottom: 16px; }
.big-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.mini-todo { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13px; color: var(--ink-2); }
.mini-todo li { display: flex; gap: 10px; align-items: center; }

.collapsible > summary { display: flex; justify-content: space-between; align-items: center; }
.collapsible > summary h3::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--muted); transition: transform .2s; }
.collapsible[open] > summary h3::before { transform: rotate(90deg); }
.conn-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-top: 18px; }
.conn-list { list-style: none; padding: 0; margin: 0; }
.conn-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.conn-list li > span:nth-child(2) { flex: 1; } .arr { color: var(--muted); font-style: normal; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; min-width: 52px; text-align: center; }
.tag.strom { background: #fef9c3; color: #854d0e; } .tag.waerme { background: #ffe4e6; color: #9f1239; } .tag.daten { background: #e0f2fe; color: #075985; }

/* ---------- Szenarien ---------- */
.scenario { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.scenario .card { margin: 0; }
.controls { display: grid; grid-template-columns: 250px minmax(0, 1fr) 230px; gap: 26px; align-items: start; }
.controls > h3 { grid-column: 1 / -1; margin-bottom: -10px; }
.controls .controls-body { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 16px; }
.controls .prices { border: 0; border-left: 1px solid var(--line); padding: 0 0 0 22px; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.presets button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.presets button .i { width: 22px; height: 22px; color: var(--brand-2); }
.presets button:hover { border-color: var(--brand); background: #ecfdf5; }
.presets button.active { background: var(--ink); color: #fff; border-color: var(--ink); } .presets button.active .i { color: var(--sun); }
.controls-body, .prices-body { display: grid; gap: 18px; }
.ctl { display: grid; gap: 10px; }
.ctl-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.ctl-head .i { color: var(--muted); }
.ctl-head output { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 9px; border-radius: 8px; font-size: 13px; }
.ctl.small .ctl-head { font-size: 13px; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 8px; padding: 0; border: 0; border-radius: 99px; background: linear-gradient(90deg, #10b981 0, #0d9488 var(--p, 50%), #e5ece9 var(--p, 50%)); box-shadow: none; }
input[type=range]:focus { box-shadow: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid #0d9488; box-shadow: 0 2px 8px rgba(13,148,136,.4); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #0d9488; box-shadow: 0 2px 8px rgba(13,148,136,.4); cursor: grab; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.switch input { display: none; }
.switch i { width: 42px; height: 24px; border-radius: 99px; background: #dbe5e1; position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--brand); } .switch input:checked + i::after { transform: translateX(18px); }
.prices { padding-top: 0; }
.prices summary { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
.prices[open] summary { margin-bottom: 14px; }
.sim-main { display: grid; gap: 18px; min-width: 0; } .sim-main > * { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; display: grid; gap: 2px; box-shadow: var(--sh-2); }
.kpi small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.kpi b { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi > span:last-child { font-size: 12px; color: var(--muted); }
.kpi-ic { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.kpi.good { background: linear-gradient(150deg, #ecfdf5, #ccfbf1); border-color: #a7f3d0; } .kpi.good b { color: #047857; } .kpi.good .kpi-ic { background: #fff; color: var(--brand); }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; color: var(--brand-ink); background: #ecfdf5; padding: 5px 11px; border-radius: 99px; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.sim-bottom { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; }
.sim-bottom h3 { margin-bottom: 14px; }
.mode { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } .mode:last-child { border: 0; }
.mode-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #ecfdf5; color: var(--brand-2); flex: none; }
.mode p { color: var(--muted); font-size: 13px; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: r; }
.rules li { counter-increment: r; position: relative; padding: 10px 12px 10px 42px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; }
.rules li::before { content: counter(r); position: absolute; left: 12px; top: 10px; width: 20px; height: 20px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.rules .if, .rules .then { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 5px; }
.rules .if { background: #e0f2fe; color: #075985; } .rules .then { background: #d1fae5; color: #065f46; margin: 0 2px; }
.save-scenario { display: flex; gap: 12px; align-items: center; padding: 12px 12px 12px 18px; }
.save-ic { color: var(--muted); display: grid; } .save-scenario input { border: 0; background: transparent; padding: 8px 0; } .save-scenario input:focus { box-shadow: none; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border: 0; } .table tr:hover td { background: var(--surface-2); }
.table .actions { display: flex; gap: 4px; justify-content: flex-end; }
.dots { display: inline-flex; gap: 4px; } .dots i { width: 8px; height: 8px; border-radius: 50%; background: #e2e8e5; } .dots i.on { background: var(--warn); }

/* ---------- Schnittstellen ---------- */
.if-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.if-summary .card { margin: 0; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.if-stat b { font-size: 28px; letter-spacing: -.03em; }
.if-stat span { font-size: 13px; color: var(--ink-2); font-weight: 600; line-height: 1.3; }
.if-stat { border-left: 5px solid; } .if-stat.ok { border-left-color: var(--ok); } .if-stat.warn { border-left-color: var(--warn); }
.if-stat.no { border-left-color: var(--no); } .if-stat.open { border-left-color: var(--open); }
.if-grid { columns: 2 460px; column-gap: 18px; }
.if-card { break-inside: avoid; margin: 0 0 18px !important; }
.if-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.if-card-head .chip-ic { --c: inherit; }
.if-row { border-top: 1px solid var(--line); }
.if-row > summary { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 12px 0; }
.if-name { font-weight: 620; } .if-meta { grid-column: 2; font-size: 12px; color: var(--muted); }
.if-row > summary .st { grid-row: span 2; }
.if-row[open] > summary .if-name { color: var(--brand-2); }
.st { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 8px; white-space: nowrap; min-width: 128px; text-align: center; }
.st.ok { background: #d1fae5; color: #065f46; } .st.warn { background: #fef3c7; color: #92400e; } .st.no { background: #ffe4e6; color: #9f1239; } .st.open { background: #e0f2fe; color: #075985; }
.if-body { padding: 0 0 16px 140px; display: grid; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.rw { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rw div { background: var(--surface-2); border-radius: 10px; padding: 9px 11px; }
.rw small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.edit > summary { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.edit[open] > summary { margin-bottom: 12px; }
.edit.add { border-top: 1px solid var(--line); padding-top: 12px; } .edit.add > summary { color: var(--brand-2); }
.empty { color: var(--muted); font-size: 13px; padding: 6px 0 10px; }

/* ---------- Komponenten ---------- */
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.comp-grid > .card { margin: 0; }
.comp-card { color: var(--ink); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.comp-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 90px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, white), transparent); pointer-events: none; }
.comp-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.comp-card .chip-ic { --c: inherit; background: #fff; box-shadow: var(--sh-2); }
.comp-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; position: relative; }
.comp-top .type { font-size: 11.5px; font-weight: 650; color: var(--muted); background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 99px; padding: 3px 9px; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.specs span { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 8px; }
.specs b { color: var(--ink); }
.comp-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.comp-foot > span:first-child { display: inline-flex; gap: 5px; align-items: center; }
.comp-card.add { border: 1.5px dashed var(--line-2); box-shadow: none; background: transparent; align-items: center; justify-content: center; text-align: center; gap: 12px; min-height: 200px; color: var(--brand-2); }
.comp-card.add::before { display: none; }
.narrow { max-width: 820px; }

/* ---------- Dokumente ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.doc { margin: 0 !important; padding: 0; overflow: hidden; position: relative; transition: transform .2s var(--ease), box-shadow .2s; }
.doc:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.thumb { display: block; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.doc:hover .thumb img { transform: scale(1.04); }
.thumb.file { display: grid; place-items: center; color: var(--brand-2); } .thumb.file .i { width: 42px; height: 42px; }
.doc figcaption { padding: 12px 14px 14px; display: grid; gap: 2px; font-size: 13.5px; }
.doc-del { position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity .2s; }
.doc:hover .doc-del { opacity: 1; } .doc-del .icon-btn { background: rgba(255,255,255,.95); box-shadow: var(--sh-2); }

/* ---------- Offen ---------- */
.todo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.todo-grid > .card { margin: 0; }
.todo { list-style: none; padding: 0; margin: 0; }
.todo li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.todo a { font-weight: 620; color: var(--ink); } .todo p { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(2, 1fr); }  }
@media (max-width: 1080px) {
  .controls { grid-template-columns: 1fr; } .controls .prices { border: 0; padding: 0; }
  .scenario, .sim-bottom, .conn-grid, .todo-grid { grid-template-columns: 1fr; }
  .controls { position: static; } .if-summary { grid-template-columns: repeat(2, 1fr); } .ov-side { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 10px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; } .side-label, .side-card, .side-nav .muted-link { display: none; }
  .side-foot { margin-left: auto; }
  .main { padding: 22px 16px 40px; }
  .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .page-head { flex-direction: column; } .pop-panel { left: 0; right: auto; width: min(380px, 90vw); }
  .if-body { padding-left: 0; } .rw { grid-template-columns: 1fr; }
}

/* ---------- Lernen & Erklären ---------- */
.term { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help; text-decoration: underline dotted color-mix(in srgb, var(--brand-2) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.term:hover { color: var(--brand-2); }
.term-pop { position: absolute; z-index: 60; width: 300px; background: var(--ink); color: #e7f2ee; border-radius: 14px; padding: 14px 16px; box-shadow: var(--sh-3); font-size: 13.5px; line-height: 1.5; animation: drop .15s var(--ease); }
.term-pop b { display: block; color: #fff; margin-bottom: 4px; font-size: 14px; }
.term-pop .more-btn { margin-top: 10px; background: none; border: 0; padding: 0; color: #6ee7b7; font: inherit; font-weight: 650; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(12,31,27,.25); opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); box-shadow: -20px 0 50px -20px rgba(12,31,27,.35); transform: translateX(100%); transition: transform .3s var(--ease); overflow-y: auto; padding: 30px 28px; }
.drawer:not(.open) .drawer-panel { visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; }
.drawer.open { pointer-events: auto; } .drawer.open .drawer-scrim { opacity: 1; } .drawer.open .drawer-panel { transform: none; }
.drawer-x { position: absolute; right: 16px; top: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 22px; cursor: pointer; color: var(--muted); }
.drawer-body { display: grid; gap: 14px; }
.drawer-body h2 { font-size: 22px; } .drawer-body h4 { margin-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.drawer-body p { color: var(--ink-2); }
.drawer-kicker { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); }
.drawer-lead { font-size: 16px; color: var(--ink) !important; font-weight: 550; }
.drawer-dev { display: flex; gap: 14px; align-items: center; padding-bottom: 6px; }
.drawer-learn { background: linear-gradient(150deg, #ecfdf5, #f0fdfa); border: 1px solid #d1fae5; border-radius: 16px; padding: 16px; display: grid; gap: 6px; }
.drawer-learn > b { display: flex; gap: 8px; align-items: center; color: var(--brand-ink); }
.drawer-learn summary { color: var(--brand-2); font-weight: 650; font-size: 13.5px; margin-top: 4px; }
.drawer-learn details[open] summary { margin-bottom: 6px; }
.drawer-ifs, .drawer-q { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.drawer-ifs li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 13.5px; }
.drawer-ifs p { font-size: 12.5px; color: var(--muted) !important; margin-top: 2px; }
.drawer-q li { padding: 10px 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; font-size: 13.5px; }
.drawer-body .btn { justify-self: start; margin-top: 8px; }

.story-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; counter-reset: s; }
.story-steps li { display: flex; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; }
.story-steps li b { display: block; margin-bottom: 3px; font-size: 14px; }
.story-steps li p { color: var(--ink-2); }
.story-steps li.highlight { background: linear-gradient(150deg, #fffbeb, #fef3c7); border-color: #fde68a; }
.step-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--brand-2); box-shadow: var(--sh-1); }
.highlight .step-ic { color: #d97706; }
.story { margin-bottom: 18px; }
.narrative { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-radius: 20px; background: linear-gradient(150deg, #ecfdf5, #f0fdfa); border: 1px solid #a7f3d0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.narrative b { color: var(--ink); }
.explain { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); max-width: 900px; }
.explain .i { color: #d97706; margin-top: 2px; }

.lex-group { margin-bottom: 28px; } .lex-group h2 { margin-bottom: 14px; }
.lex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.card.lex { margin: 0 !important; padding: 16px 18px; }
.lex summary { display: flex; gap: 14px; align-items: center; }
.lex summary b { display: block; }
.lex-short { display: block; font-size: 13px; color: var(--muted); }
.lex[open] { border-color: #a7f3d0; } .lex p { margin-top: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.lex:target { box-shadow: 0 0 0 3px rgba(16,185,129,.3); }

/* ---------- Berater ---------- */
.advisor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.advisor > .card, .advisor-side .card { margin: 0; }
.advisor-side { display: grid; gap: 18px; position: sticky; top: 20px; }
.chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: calc(100vh - 300px); min-height: 520px; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.chat-head > div { flex: 1; }
.avatar-ai { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #34d399, #0d9488); box-shadow: 0 8px 18px -8px rgba(13,148,136,.7); }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, #fbfdfc, #f6faf8); }
.msg { display: flex; } .msg.me { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.6; }
.msg.ai .bubble { background: #fff; border: 1px solid var(--line); border-top-left-radius: 6px; box-shadow: var(--sh-1); }
.msg.me .bubble { background: linear-gradient(140deg, #10b981, #0d9488); color: #fff; border-top-right-radius: 6px; }
.bubble p + p, .bubble p + ul, .bubble ul + p, .bubble h4 + p { margin-top: 8px; }
.bubble ul, .bubble ol { margin: 6px 0; padding-left: 20px; } .bubble li { margin: 3px 0; }
.bubble h4 { margin: 12px 0 4px; font-size: 14.5px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.bubble a { color: var(--brand-2); text-decoration: underline; }
.bubble.error { background: #fff1f2 !important; color: #9f1239; border-color: #fecdd3 !important; display: flex; gap: 8px; }
.attach { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.attach a { display: inline-flex; gap: 5px; align-items: center; color: #fff; background: rgba(255,255,255,.18); padding: 3px 9px; border-radius: 8px; font-size: 12.5px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; }
.acts span { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); background: #fff; border: 1px dashed var(--line-2); padding: 4px 10px; border-radius: 99px; }
.acts .i { width: 14px; height: 14px; }
.dots-anim { display: inline-flex; gap: 4px; margin-right: 8px; vertical-align: middle; }
.dots-anim i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: bounce 1.2s infinite; }
.dots-anim i:nth-child(2) { animation-delay: .15s; } .dots-anim i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.thinking .bubble { color: var(--muted); }
.proposal { align-self: stretch; background: #fff; border: 1.5px solid #a7f3d0; border-radius: 18px; padding: 16px 18px; box-shadow: 0 10px 24px -14px rgba(13,148,136,.45); }
.proposal.uebernommen { border-color: var(--line); box-shadow: none; opacity: .75; } .proposal.verworfen { border-color: var(--line); box-shadow: none; opacity: .5; }
.proposal-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; } .proposal-head b { display: block; }
.ops { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ops label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); cursor: pointer; font-size: 13.5px; }
.ops input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.op-ic { color: var(--brand-2); display: grid; margin-top: 1px; }
.op-detail, .op-reason { display: block; font-size: 12.5px; color: var(--muted); } .op-reason { font-style: italic; }
.proposal-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.composer { border-top: 1px solid var(--line); padding: 14px 18px 16px; background: #fff; display: grid; gap: 10px; }
.composer textarea { border: 0; padding: 6px 2px; resize: none; font-size: 15px; box-shadow: none !important; }
.composer-bar { display: flex; align-items: center; gap: 12px; }
.composer-bar .btn { margin-left: auto; }
.attach-btn { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 7px 12px; border-radius: 10px; cursor: pointer; }
.prompts { display: grid; gap: 8px; margin-top: 12px; }
.prompt { text-align: left; font: inherit; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: all .15s; }
.prompt:hover { border-color: var(--brand); background: #ecfdf5; color: var(--ink); }
.info-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.info-list li { display: flex; gap: 10px; } .info-list .i { color: var(--brand-2); margin-top: 1px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; max-width: 1100px; }
.admin-grid > .card { margin: 0; }
.test-form { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.check { display: flex !important; flex-direction: row; gap: 8px; align-items: center; font-weight: 500 !important; } .check input { width: auto; }
.status-line { display: flex; gap: 8px; align-items: center; font-weight: 650; margin-bottom: 14px; }
.status-line span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5d1; } .status-line.ok span { background: var(--ok); box-shadow: 0 0 0 4px #d1fae5; }
@media (max-width: 1080px) { .advisor, .admin-grid { grid-template-columns: 1fr; } .advisor-side { position: static; } .chat { height: 70vh; } .bubble { max-width: 92%; } }

/* ---------- Wissen & Erkenntnisse ---------- */
.busy-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 18px; border-radius: 14px; background: #ecfdf5; border: 1px solid #a7f3d0; color: var(--brand-ink); font-weight: 550; }
.busy-banner a { margin-left: auto; font-weight: 650; }
.intake { background: linear-gradient(160deg, #ffffff 40%, #f0fdf8); }
.intake-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.intake-head p { max-width: 80ch; }
.intake-form { display: grid; gap: 12px; }
.intake-form textarea { font-size: 15px; }
.dropzone { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 26px; border: 2px dashed #a7f3d0; border-radius: 18px; background: #f7fdfa; color: var(--brand-ink); cursor: pointer; text-align: left; transition: all .15s; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .i { width: 30px; height: 30px; color: var(--brand); }
.dropzone.over, .dropzone:hover { border-color: var(--brand); background: #ecfdf5; }
.dropzone.has { border-style: solid; }
.intake-bar { display: flex; align-items: center; gap: 12px; } .intake-bar .btn { margin-left: auto; }
.know-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; margin-top: 18px; }
.know-grid > .card { margin: 0; }
.topic + .topic { margin-top: 16px; }
.topic h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-2); margin-bottom: 6px; }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.facts li > span { flex: 1; } .facts .icon-btn { opacity: 0; padding: 2px; } .facts li:hover .icon-btn { opacity: 1; }
.facts .src { color: var(--muted); } .facts .src .i { width: 14px; height: 14px; }
.sources { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.sources li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.src-thumb { width: 56px; height: 56px; flex: none; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand-2); position: relative; }
.src-thumb img { width: 100%; height: 100%; object-fit: cover; }
.src-thumb .ext { position: absolute; bottom: 3px; font-size: 9px; font-weight: 750; color: var(--muted); }
.src-body { flex: 1; min-width: 0; font-size: 13.5px; } .src-body b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-body p { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.src-meta { font-size: 12px; color: var(--muted); }
.ok-badge { display: inline-flex; gap: 4px; align-items: center; color: #047857; font-weight: 650; } .ok-badge .i { width: 13px; height: 13px; }
.new-badge { background: #e0f2fe; color: #075985; font-weight: 700; font-size: 11px; padding: 1px 7px; border-radius: 6px; }
.potential { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; color: #fff; border: 0; background: linear-gradient(150deg, #10b981 0%, #0d9488 55%, #0f766e 100%); position: relative; overflow: hidden; }
.potential::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(253,230,138,.5), transparent 65%); }
.potential .eyebrow { color: #d1fae5; } .potential h2 { font-size: 30px; margin: 4px 0 6px; } .potential .muted { color: #d1fae5; margin-bottom: 16px; max-width: 60ch; }
.pot-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; z-index: 1; }
.pot-stats div { background: rgba(255,255,255,.14); border-radius: 14px; padding: 12px 16px; min-width: 110px; }
.pot-stats b { display: block; font-size: 24px; } .pot-stats span { font-size: 12.5px; color: #d1fae5; }
.ins-section { margin-top: 26px; } .sec-head { margin-bottom: 12px; } .sec-head h2 { font-size: 19px; }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.ins { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--sh-2); display: grid; gap: 8px; border-top: 4px solid var(--brand); }
.ins.potenzial { border-top-color: var(--sun); } .ins.risiko { border-top-color: var(--no); } .ins.erkenntnis { border-top-color: var(--sky); }
.ins.st-verworfen { opacity: .5; } .ins.st-umgesetzt { background: linear-gradient(160deg, #fff, #f0fdf4); }
.ins-top { display: flex; align-items: center; gap: 8px; }
.ins-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #ecfdf5; color: var(--brand-2); } .ins-ic .i { width: 16px; height: 16px; }
.potenzial .ins-ic { background: #fef9c3; color: #b45309; } .risiko .ins-ic { background: #ffe4e6; color: #be123c; } .erkenntnis .ins-ic { background: #e0f2fe; color: #0369a1; }
.ins-cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ins-eur { margin-left: auto; font-weight: 750; font-size: 13px; color: #047857; background: #d1fae5; padding: 3px 9px; border-radius: 99px; }
.ins h4 { font-size: 15.5px; letter-spacing: -.01em; }
.ins-body { font-size: 13.5px; color: var(--ink-2); } .ins-body p + p, .ins-body ul { margin-top: 6px; } .ins-body ul { padding-left: 18px; }
.ins-teaser { font-size: 13px; color: var(--muted); }
.ins-req { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.ins-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.lvl { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.lvl.hoch { background: #d1fae5; color: #065f46; border-color: #a7f3d0; } .lvl.eff-hoch { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.ins-status { margin-left: auto; } .ins-status select { padding: 4px 8px; font-size: 12.5px; border-radius: 8px; width: auto; }
.sum-pill { background: #d1fae5; color: #065f46; padding: 6px 14px; border-radius: 99px; font-size: 13.5px; }
.empty-state { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.empty-state > .i { width: 28px; height: 28px; color: var(--sun); } .empty-state > div { flex: 1; } .empty-state p { color: var(--muted); font-size: 13.5px; }
.top-opt { margin-top: 18px; }
@media (max-width: 1080px) { .know-grid, .potential { grid-template-columns: 1fr; } }
.proposal.angewendet { border-color: #bae6fd; box-shadow: 0 10px 24px -16px rgba(14,165,233,.5); }
.proposal.rueckgaengig { opacity: .55; border-color: var(--line); box-shadow: none; }
.proposal .proposal-head > div { flex: 1; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.ops.compact label { padding: 6px 10px; cursor: default; }
.dev-changed { font-size: 10px; font-weight: 750; color: #0369a1; background: #e0f2fe; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.arch.live .dev-changed { display: none; }

/* Berater & Wissen zusammengeführt */
.advisor { grid-template-columns: minmax(0, 1fr) 380px; }
.know-panel { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 300px); min-height: 520px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.seg a.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.seg .n { font-size: 11px; background: var(--line); color: var(--ink-2); padding: 0 6px; border-radius: 99px; }
.panel-hint { margin: 2px 2px 0; }
.panel-scroll { overflow-y: auto; flex: 1; margin: 0 -6px; padding: 0 6px; }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.know-panel .sources li { padding: 8px 0; } .know-panel .src-thumb { width: 44px; height: 44px; border-radius: 10px; }
.prompts.inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0; }
.prompts.inline .prompt { width: auto; padding: 8px 12px; border-radius: 99px; background: #fff; }
.chat.dropping { outline: 3px dashed var(--brand); outline-offset: -6px; }
.chat.dropping .chat-log::after { content: "Dateien hier loslassen, der Berater arbeitet sie ein"; position: sticky; bottom: 10px; align-self: center; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; }
.files-info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
@media (max-width: 1080px) { .know-panel { max-height: none; min-height: 0; } }
.advisor > *, .advisor-side, .know-panel, .know-panel .sources li { min-width: 0; }
.know-panel { overflow: hidden; }
.advisor-side { grid-template-columns: minmax(0, 1fr); }
.know-panel .src-body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Story kompakt: Schritte in einer Reihe, Potenzial als Band darunter */
.story-steps { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.story-steps li { padding: 14px; gap: 10px; }
.story-steps li.highlight { grid-column: 1 / -1; align-items: center; padding: 14px 18px; }
.story-steps li.highlight b { display: inline; margin-right: 8px; }
.story-steps li.highlight p { display: inline; }
.story-steps .step-ic { width: 32px; height: 32px; border-radius: 10px; }

/* Hinweise schweben oben rechts statt das Layout zu verschieben */
.main > .toast { position: fixed; top: 18px; right: 22px; z-index: 70; margin: 0; max-width: min(420px, calc(100vw - 44px)); animation: drop .35s var(--ease), fadeout .5s ease 4.5s forwards; }
@keyframes fadeout { to { opacity: 0; transform: translateY(-8px); visibility: hidden; } }

/* Geräte & Schnittstellen */
.if-card-head > div { flex: 1; min-width: 0; }
.dev-kicker { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.edit-dev:hover { background: var(--surface-2); color: var(--brand-2); }
.if-card .specs { margin: 0 0 8px; }
.dev-open-q { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 7px 10px; margin-bottom: 8px; }
.dev-open-q .i { width: 15px; height: 15px; margin-top: 2px; flex: none; }
.if-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 2px; }
.add-dev { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 160px; border: 1.5px dashed var(--line-2); box-shadow: none; background: transparent; color: var(--brand-2); }

.seg.three { grid-template-columns: repeat(3, 1fr); } .seg.three a { padding: 8px 4px; font-size: 13px; }
.qa-list { display: grid; gap: 10px; align-content: start; }
.qa { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 10px 12px; background: #fff; display: grid; gap: 6px; }
.qa-dev { display: inline-flex; gap: 6px; align-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.qa-dev .i { width: 14px; height: 14px; color: var(--c); }
.qa p { font-size: 13.5px; color: var(--ink); }
.qa-row { display: flex; gap: 6px; } .qa-row input { padding: 7px 10px; font-size: 13px; } .qa-row .btn { padding: 6px 10px; }

/* Architektur: Ebenen, Fokus, ruhigere Karten */
.layer-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.layer { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--line-2); border-radius: 99px; padding: 6px 12px; cursor: pointer; transition: all .15s; }
.layer::before { content: ""; width: 16px; height: 4px; border-radius: 2px; background: #cbd5d1; }
.layer.on { color: var(--ink); border-color: var(--ink); }
.layer.strom.on::before { background: #e9a800; } .layer.waerme.on::before { background: #f43f5e; }
.layer.daten.on::before { background: repeating-linear-gradient(90deg, #0ea5e9 0 3px, transparent 3px 6px); }
.legend-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.legend .changed::before { width: 10px; height: 10px; border-radius: 50%; background: #0ea5e9; }
.dev-mark { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dev-mark.open { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.dev-mark.changed { background: #0ea5e9; box-shadow: 0 0 0 3px #e0f2fe; }
.dev-type { flex: 1; }
.arch .edge, .arch .dev { transition: opacity .2s; }
.arch.focus .edge:not(.hl) { opacity: .12; }
.arch.focus .elabel { opacity: .2; }
.arch.focus .dev:not(.hl) { opacity: .35; }
.arch.focus .edge.hl .line { stroke-width: 3.2; }
.arch.focus .dev.hl { border-color: var(--c); }
